/*
	Professional, modern design system
	- Light/Dark auto via prefers-color-scheme
	- Clear spacing scale, consistent components
*/




:root {
	--bg: #0a0d12;
	--bg-elev: #0f1622;
	--surface: #0f1622;
	--card: rgba(16, 22, 34, 0.7);
	--border: rgba(255, 255, 255, 0.09);
	--text: #e9f1fb;
	--muted: #9bb0c8;
	--primary: #6aa7ff;
	--primary-600: #3f86ff;
	--ghost: #202a39;
	--focus: #9bd1ff;
	--shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
	--radius: 16px;
	--radius-sm: 10px;
	--container: 1160px;
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-7: 28px;
	--space-8: 32px;
	--space-10: 40px;
	--space-12: 48px;
	--space-16: 64px;
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: #f7f9fc;
		--bg-elev: #ffffff;
		--surface: #ffffff;
		--card: rgba(255, 255, 255, 0.88);
		--border: rgba(12, 20, 33, 0.08);
		--text: #0b1524;
		--muted: #5c6f83;
		--ghost: #eaf0f7;
		--shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
	}
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	color: var(--text);
	line-height: 1.55;
	font-size: 14px; /* global smaller font */
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.page {
	display: flex;
	min-height: 100%;
	flex-direction: column;
}

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1 0 auto;
	display: block;
}

/* Center hero vertically on viewport (accounts for approx. navbar+footer) */
#search.hero-center {
	min-height: calc(100vh - 112px);
	display: flex;
	align-items: center;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */
.header {
	position: sticky;
	top: 0;
	z-index: 10;
	backdrop-filter: saturate(180%) blur(10px);
	background: linear-gradient(180deg, rgba(10, 13, 18, 0.75), rgba(10, 13, 18, 0.35));
	border-bottom: 1px solid var(--border);
}

.header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--text);
	font-weight: 700;
	letter-spacing: 0.2px;
}

.brand__logo {
	font-size: 20px;
}

.brand__text {
	font-size: 18px;
}

.nav {
	display: flex;
	align-items: center;
	gap: 10px;
}

.nav__link {
	color: var(--text);
	text-decoration: none;
	padding: 8px 10px;
	border-radius: 8px;
	opacity: 0.9;
}

	.nav__link:hover {
		background: var(--ghost);
	}

/* Hero */
.hero {
	padding: var(--space-16) 0 var(--space-6);
}

.hero__inner {
	display: grid;
	gap: var(--space-4);
	justify-items: start;
}

.hero__title {
	margin: 0;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.15;
	font-size: clamp(24px, 3.6vw, 40px);
}

.hero__subtitle {
	margin: 0;
	color: var(--muted);
	max-width: 760px;
}

/* Search */
.search {
	width: 100%;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: var(--space-5);
}

.search__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: var(--space-4);
}

.field {
	display: grid;
	gap: 6px;
}

.field--full {
	grid-column: 1 / -1;
}

.field__label {
	font-weight: 600;
	font-size: 13px;
	opacity: 0.9;
}

.field__hint {
	color: var(--muted);
	font-size: 12px;
}

.input {
	width: 100%;
	height: 44px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: color-mix(in oklab, var(--bg-elev) 82%, transparent);
	color: var(--text);
	padding: 10px 12px;
	outline: none;
	transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}

	.input::placeholder {
		color: color-mix(in oklab, var(--muted) 80%, transparent);
	}

	.input:focus {
		border-color: var(--focus);
		box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus) 25%, transparent);
	}

.input--textarea {
	height: auto;
	resize: vertical;
}

/* Placeholder size */
input::placeholder,
textarea::placeholder,
.form-control::placeholder {
	font-size: 13px;
}

.search__actions {
	margin-top: 10px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Buttons */
.btn {
	appearance: none;
	border: 1px solid transparent;
	background: #323232;
	color: #fff;
	padding: 10px 14px;
	border-radius: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.04s ease, background 0.15s, border 0.15s;
}

	.btn:active {
		transform: translateY(1px);
	}

.btn--primary {
	background: linear-gradient(180deg, var(--primary), var(--primary-600));
	color: #fff;
	border-color: color-mix(in oklab, var(--primary-600) 45%, transparent);
}

	.btn--primary:hover {
		filter: brightness(1.03);
	}

.btn--ghost {
	background: transparent;
	border-color: var(--border);
}

	.btn--ghost:hover {
		background: var(--ghost);
	}

.btn--sm {
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
}

.btn--full {
	width: 100%;
}

.icon-btn {
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	cursor: pointer;
	height: 36px;
	width: 36px;
	display: grid;
	place-items: center;
}

	.icon-btn:hover {
		background: var(--ghost);
	}

/* Results */
.results {
	padding: var(--space-6) 0 var(--space-16);
}

.results__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.results__meta {
	color: var(--muted);
	font-size: 14px;
}

.section__title {
	margin: 0;
	font-size: 20px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
	padding: 16px;
}

.card--empty {
	text-align: center;
	padding: 36px 16px;
	display: grid;
	gap: 10px;
	justify-items: center;
}

.card__icon {
	font-size: 28px;
}

.card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.card__title {
	margin: 0;
	font-size: 16px;
}

.card__body {
	display: grid;
	gap: 8px;
}

.card__footer {
	display: flex;
	justify-content: flex-end;
}

.badge {
	background: color-mix(in oklab, var(--primary) 16%, transparent);
	color: #fff;
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 4px 8px;
	font-size: 12px;
}

.list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.muted {
	color: var(--muted);
}

/* Footer */
.footer {
	margin-top: auto;
	border-top: 1px solid var(--border);
	background: linear-gradient(0deg, rgba(10, 13, 18, 0.7), rgba(10, 13, 18, 0.2));
}

.footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.footer__nav {
	display: flex;
	gap: 12px;
}

/* Fixed footer height */
.site-footer {
	box-sizing: border-box;
}

.site-footer--compact {
	height: 56px;
}

/* Forms */
.form {
	display: grid;
	gap: 12px;
}

.form--stack {
	gap: 10px;
}

.form__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.form__grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

.form--spacious {
	padding: var(--space-6);
}

.form__actions {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-3);
	margin-top: var(--space-4);
}

/* Subhero / content header */
.subhero {
	padding: var(--space-10) 0 var(--space-4);
	background: linear-gradient(180deg, rgba(10, 13, 18, 0.45), rgba(10, 13, 18, 0));
	border-bottom: 1px solid var(--border);
}

.subhero__inner {
	display: grid;
	gap: var(--space-3);
}

.breadcrumbs {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--muted);
	font-size: 14px;
}

.crumb {
	color: var(--muted);
	text-decoration: none;
}

	.crumb:hover {
		text-decoration: underline;
	}

.crumb-current {
	color: var(--text);
}

.page__title {
	margin: 0;
	font-size: clamp(22px, 2.8vw, 28px);
	font-weight: 700;
}

.content {
	padding: var(--space-6) 0 var(--space-16);
}

/* Responsive */
@media (max-width: 900px) {
	.search__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.form__grid--3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.header__inner {
		height: auto;
		padding: 12px 0;
		gap: 10px;
		flex-wrap: wrap;
	}

	.nav {
		width: 100%;
		justify-content: space-between;
	}

	.search__grid {
		grid-template-columns: 1fr;
	}

	.form__grid {
		grid-template-columns: 1fr;
	}

	.form__grid--3 {
		grid-template-columns: 1fr;
	}

	.grid {
		grid-template-columns: 1fr;
	}
}

/* Focus visibility */
:where(a, button, input, textarea, [tabindex]) :focus {
	outline: none;
}

:where(a, button, input, textarea, [tabindex]):focus-visible {
	box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus) 25%, transparent);
}
