/* ==========================================================================
   Recommended Movies — design system
   Replaces Bootstrap + Font Awesome + the old scraped theme with one
   self-contained sheet. Icons are inline SVG in the markup, so this is the
   only stylesheet the site loads.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
	/* Neutrals — a cool near-black ramp, so posters supply all the colour. */
	--ink-900: #08090d;
	--ink-800: #0c0e14;
	--ink-700: #11141c;
	--ink-600: #171b25;
	--ink-500: #1f2430;
	--line: rgba(255, 255, 255, 0.08);
	--line-strong: rgba(255, 255, 255, 0.16);

	--text: #eceef4;
	--text-dim: #a2abbd;
	--text-faint: #6f7889;

	/* One warm accent, used sparingly: CTAs, ratings, active states. */
	--accent: #ffc247;
	--accent-ink: #241a02;
	--accent-soft: rgba(255, 194, 71, 0.14);
	--accent-2: #ff6b6b;

	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;
	--radius-pill: 999px;

	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
	--shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
	--shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.6);

	--ease: cubic-bezier(0.2, 0.7, 0.3, 1);
	--shell: min(1680px, 100% - clamp(2rem, 5vw, 6rem));

	color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 108px;
}

body {
	margin: 0;
	background:
		radial-gradient(
			1200px 700px at 12% -10%,
			rgba(255, 194, 71, 0.07),
			transparent 60%
		),
		radial-gradient(
			1000px 600px at 92% 0%,
			rgba(255, 107, 107, 0.06),
			transparent 55%
		),
		var(--ink-900);
	color: var(--text);
	font-family:
		Inter,
		"Segoe UI Variable Text",
		"Segoe UI",
		system-ui,
		-apple-system,
		sans-serif;
	font-size: 15px;
	line-height: 1.55;
	font-weight: 400;
	letter-spacing: -0.006em;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
}

img {
	display: block;
	max-width: 100%;
}
svg {
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s var(--ease);
}
a:hover {
	color: var(--accent);
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.03em;
}

p {
	margin: 0;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.shell {
	width: var(--shell);
	margin-inline: auto;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   3. Buttons, chips, badges
   -------------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 44px;
	padding: 0 1.15rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.05);
	color: var(--text);
	font: inherit;
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background 0.18s var(--ease),
		border-color 0.18s var(--ease),
		transform 0.18s var(--ease),
		color 0.18s var(--ease);
}
.btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--line-strong);
	color: var(--text);
	transform: translateY(-1px);
}
.btn:active {
	transform: translateY(0);
}
.btn svg {
	width: 17px;
	height: 17px;
}

.btn--accent {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-ink);
}
.btn--accent:hover {
	background: #ffd275;
	border-color: #ffd275;
	color: var(--accent-ink);
}

.btn--icon {
	width: 44px;
	padding: 0;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	height: 30px;
	padding: 0 0.8rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text-dim);
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
}
a.chip:hover {
	color: var(--text);
	border-color: var(--line-strong);
	background: rgba(255, 255, 255, 0.08);
}

.count {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 0.6rem;
	border-radius: var(--radius-pill);
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.78rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   4. Search bar + segmented type switch
   -------------------------------------------------------------------------- */

.searchbar {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.05);
	transition:
		border-color 0.2s var(--ease),
		background 0.2s var(--ease),
		box-shadow 0.2s var(--ease);
}
.searchbar:focus-within {
	border-color: rgba(255, 194, 71, 0.5);
	background: rgba(255, 255, 255, 0.08);
	box-shadow: 0 0 0 4px rgba(255, 194, 71, 0.12);
}

.searchbar__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 0.4rem 0 1rem;
	border: 0;
	background: none;
	color: var(--text);
	font: inherit;
	font-size: 0.95rem;
}
.searchbar__input::placeholder {
	color: var(--text-faint);
}
.searchbar__input:focus {
	outline: none;
}

.searchbar--lg {
	padding: 0.5rem;
	border-radius: var(--radius-lg);
	background: rgba(14, 16, 22, 0.8);
	backdrop-filter: blur(20px);
	box-shadow: var(--shadow);
}
.searchbar--lg .searchbar__input {
	height: 56px;
	padding-left: 1.4rem;
	font-size: 1.05rem;
}
.searchbar--lg .btn {
	height: 56px;
	padding: 0 1.6rem;
}
.searchbar--lg .segmented label {
	height: 56px;
	padding: 0 1.15rem;
}

/* Real radios, visually rebuilt as a segmented control (keyboard + screen
   reader behaviour comes for free; the form still submits `t=movie|tv`). */
.segmented {
	display: flex;
	flex: 0 0 auto;
	padding: 3px;
	border-radius: var(--radius-pill);
	background: rgba(0, 0, 0, 0.4);
}
.segmented input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.segmented label {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 0.95rem;
	border-radius: var(--radius-pill);
	color: var(--text-dim);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition:
		background 0.18s var(--ease),
		color 0.18s var(--ease);
}
.segmented label:hover {
	color: var(--text);
}
.segmented input:checked + label {
	background: var(--accent);
	color: var(--accent-ink);
}
.segmented input:focus-visible + label {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   5. Site header
   -------------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid transparent;
	background: rgba(8, 9, 13, 0.72);
	backdrop-filter: blur(18px) saturate(140%);
	transition:
		border-color 0.2s var(--ease),
		background 0.2s var(--ease);
}
.site-header--scrolled {
	border-bottom-color: var(--line);
	background: rgba(8, 9, 13, 0.92);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
	height: 72px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	flex: 0 0 auto;
	font-weight: 800;
	font-size: 1.02rem;
	letter-spacing: -0.03em;
}
.brand:hover {
	color: var(--text);
}
.brand em {
	font-style: normal;
	color: var(--text-faint);
	font-weight: 600;
}

.site-header .searchbar {
	flex: 1 1 auto;
	max-width: 640px;
	margin-inline: auto;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   6. Home hero
   -------------------------------------------------------------------------- */

.hero-home {
	display: grid;
	place-items: center;
	/* min-height: calc(100vh - 72px); */
	padding: clamp(2rem, 8vw, 5rem) 0 clamp(2rem, 8vw, 5rem);
	text-align: center;
}

.hero-home__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text-dim);
	font-size: 0.8rem;
	font-weight: 500;
}
.hero-home__eyebrow b {
	color: var(--accent);
	font-weight: 600;
}

.hero-home__title {
	max-width: 18ch;
	margin: 0 auto 1.1rem;
	font-size: clamp(2.6rem, 7vw, 5.25rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.045em;
}
.hero-home__title span {
	background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-home__sub {
	max-width: 56ch;
	margin: 0 auto clamp(2rem, 4vw, 2.8rem);
	color: var(--text-dim);
	font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero-home__form {
	max-width: 780px;
	margin: 0 auto;
}

.hero-home__suggestions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.6rem;
}
.hero-home__suggestions .label {
	color: var(--text-faint);
	font-size: 0.8rem;
	line-height: 30px;
	margin-right: 0.2rem;
}

.hero-home__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(1.5rem, 5vw, 4rem);
	margin-top: clamp(3rem, 7vw, 5rem);
	padding-top: clamp(2rem, 4vw, 3rem);
	border-top: 1px solid var(--line);
}
.hero-home__stat b {
	display: block;
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -0.03em;
}
.hero-home__stat span {
	color: var(--text-faint);
	font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   7. Title hero (search results page)
   -------------------------------------------------------------------------- */

.hero {
	position: relative;
	isolation: isolate;
	padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
	overflow: hidden;
}

.hero__backdrop {
	position: absolute;
	inset: -20% 0 auto;
	height: 150%;
	z-index: -2;
}
.hero__backdrop img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.42;
	filter: saturate(115%);
}
.hero__backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(8, 9, 13, 0.55) 0%,
			rgba(8, 9, 13, 0.8) 45%,
			var(--ink-900) 96%
		),
		linear-gradient(
			to right,
			var(--ink-900) 2%,
			rgba(8, 9, 13, 0.35) 55%,
			rgba(8, 9, 13, 0.75) 100%
		);
}

/* Poster in column one spanning both rows; headline and body stacked beside
   it. On narrow screens the body drops below and spans the full width, so the
   synopsis never gets squeezed into a sliver next to the poster. */
.hero__inner {
	display: grid;
	grid-template-columns: 190px minmax(0, 1fr);
	column-gap: clamp(1.5rem, 3.5vw, 2.8rem);
	row-gap: 1.25rem;
	align-items: end;
}
.hero__poster {
	grid-row: 1 / span 2;
}
.hero__head,
.hero__body {
	grid-column: 2;
	min-width: 0;
}
.hero__head {
	align-self: end;
}

.hero__poster {
	position: relative;
	aspect-ratio: 2 / 3;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--ink-600);
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--line);
}
.hero__poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__eyebrow {
	display: block;
	margin-bottom: 0.7rem;
	color: var(--accent);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.hero__title {
	font-size: clamp(2rem, 5.2vw, 3.9rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	margin-bottom: 0.9rem;
	text-wrap: balance;
}

.hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 1.1rem;
}

.hero__overview {
	max-width: 72ch;
	margin-bottom: 1.5rem;
	color: var(--text-dim);
	font-size: 1.02rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.rating {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	height: 30px;
	padding: 0 0.75rem;
	border-radius: var(--radius-pill);
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.82rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.rating svg {
	width: 13px;
	height: 13px;
}

/* --------------------------------------------------------------------------
   8. Section nav (jump links + live filter)
   -------------------------------------------------------------------------- */

.subnav {
	position: sticky;
	top: 72px;
	z-index: 40;
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
	border-block: 1px solid var(--line);
	background: rgba(8, 9, 13, 0.86);
	backdrop-filter: blur(18px);
}
.subnav__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 60px;
	padding-block: 0.6rem;
}

.subnav__links {
	display: flex;
	gap: 0.4rem;
	overflow-x: auto;
	scrollbar-width: none;
	flex: 1 1 auto;
}
.subnav__links::-webkit-scrollbar {
	display: none;
}
.subnav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	height: 36px;
	padding: 0 0.85rem;
	border-radius: var(--radius-pill);
	color: var(--text-dim);
	font-size: 0.85rem;
	font-weight: 500;
	white-space: nowrap;
}
.subnav__link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text);
}
.subnav__link b {
	color: var(--text-faint);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.subnav__link.is-active {
	background: var(--accent-soft);
	color: var(--accent);
}
.subnav__link.is-active b {
	color: var(--accent);
}

.filter {
	position: relative;
	flex: 0 0 auto;
	width: clamp(180px, 22vw, 280px);
}
.filter svg {
	position: absolute;
	top: 50%;
	left: 0.85rem;
	width: 15px;
	height: 15px;
	margin-top: -7.5px;
	color: var(--text-faint);
	pointer-events: none;
}
.filter input {
	width: 100%;
	height: 38px;
	padding: 0 0.9rem 0 2.3rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text);
	font: inherit;
	font-size: 0.85rem;
}
.filter input::placeholder {
	color: var(--text-faint);
}
.filter input:focus {
	outline: none;
	border-color: rgba(255, 194, 71, 0.5);
	background: rgba(255, 255, 255, 0.07);
}

/* --------------------------------------------------------------------------
   9. Shelves + listing grid
   -------------------------------------------------------------------------- */

.shelf {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	scroll-margin-top: 140px;
}
.shelf:last-of-type {
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.shelf__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 1.35rem;
}
.shelf__title {
	font-size: clamp(1.15rem, 2.2vw, 1.6rem);
	font-weight: 700;
	letter-spacing: -0.035em;
}
.shelf__hint {
	margin-left: auto;
	color: var(--text-faint);
	font-size: 0.82rem;
}

/* Auto-fitting grid: 2 columns on a phone through 8+ on an ultrawide with no
   breakpoint maths, which is what a listing-dense page needs. */
.grid {
	display: grid;
	grid-template-columns: repeat(
		auto-fill,
		minmax(clamp(140px, 15vw, 200px), 1fr)
	);
	gap: clamp(0.9rem, 1.6vw, 1.6rem) clamp(0.75rem, 1.2vw, 1.25rem);
}

.shelf__more {
	display: flex;
	justify-content: center;
	margin-top: 1.75rem;
}

/* The ranked shelf is the headline result, so it gets a warm wash behind it
   and slightly larger cards without breaking the page's column alignment. */
.shelf--feature {
	position: relative;
	isolation: isolate;
}
.shelf--feature::before {
	content: "";
	position: absolute;
	inset: 0 -8vw auto;
	height: 340px;
	z-index: -1;
	background: radial-gradient(
		55% 100% at 50% 0%,
		rgba(255, 194, 71, 0.09),
		transparent 70%
	);
	pointer-events: none;
}
.shelf--feature .grid {
	grid-template-columns: repeat(
		auto-fill,
		minmax(clamp(150px, 16vw, 220px), 1fr)
	);
}

/* --------------------------------------------------------------------------
   10. Listing card
   -------------------------------------------------------------------------- */

.card {
	position: relative;
}

.card__link {
	display: block;
	border-radius: var(--radius);
}
.card__link:hover {
	color: inherit;
}

.card__art {
	position: relative;
	aspect-ratio: 2 / 3;
	margin-bottom: 0.7rem;
	border-radius: var(--radius);
	overflow: hidden;
	background: linear-gradient(
			110deg,
			var(--ink-600) 30%,
			var(--ink-500) 50%,
			var(--ink-600) 70%
		)
		0 0 / 220% 100%;
	border: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
	transition:
		transform 0.28s var(--ease),
		box-shadow 0.28s var(--ease),
		border-color 0.28s var(--ease);
}
/* Sits behind the artwork, so it only shows through when a title has no
   poster (or the CDN is blocked and the image is dropped). */
.card__art::before,
.hero__poster::before {
	content: "";
	position: absolute;
	inset: 0;
	background: center / 34% no-repeat
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.2'><rect x='3' y='4' width='18' height='16' rx='2'/><path d='M8 4v16M16 4v16M3 12h18'/></svg>");
	opacity: 0.12;
}

.card__art img,
.hero__poster img {
	position: relative;
	z-index: 1;
}

.card__art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition:
		transform 0.5s var(--ease),
		opacity 0.4s var(--ease);
}

/* Set by the footer script when an image fails to load. */
.card__art img[data-fallback],
.hero__poster img[data-fallback] {
	display: none;
}

.card__link:hover .card__art,
.card__link:focus-visible .card__art {
	transform: translateY(-6px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow);
}
.card__link:hover .card__art img {
	transform: scale(1.07);
}

/* Readability scrim + hover synopsis */
.card__veil {
	position: absolute;
	inset: 0;
	z-index: 2; /* above the artwork, which is raised over the empty-state icon */
	display: flex;
	align-items: flex-end;
	padding: 0.9rem;
	background: linear-gradient(
		to top,
		rgba(6, 7, 10, 0.94) 0%,
		rgba(6, 7, 10, 0.6) 34%,
		rgba(6, 7, 10, 0) 66%
	);
	opacity: 0;
	transition: opacity 0.28s var(--ease);
}
.card__link:hover .card__veil,
.card__link:focus-visible .card__veil {
	opacity: 1;
}
.card__synopsis {
	margin: 0;
	color: var(--text-dim);
	font-size: 0.78rem;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card__badges {
	position: absolute;
	inset: 0.6rem 0.6rem auto;
	z-index: 3;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.4rem;
	pointer-events: none;
}
.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	height: 24px;
	padding: 0 0.5rem;
	border-radius: var(--radius-sm);
	background: rgba(6, 7, 10, 0.78);
	backdrop-filter: blur(8px);
	color: var(--text);
	font-size: 0.74rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
}
.badge svg {
	width: 11px;
	height: 11px;
	color: var(--accent);
}
.badge--type {
	margin-left: auto;
	color: var(--text-dim);
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

/* Closeness score on the ranked "closest matches" shelf. */
.badge--match {
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 0.7rem;
}

.card__title {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.015em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	/* Reserve both lines so the meta rows below stay on a shared baseline
     whether a title wraps or not. */
	min-height: 2.7em;
}
.card__link:hover .card__title {
	color: var(--accent);
}

.card__meta {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: 0.25rem;
	color: var(--text-faint);
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
}
.card__meta .dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

.card__score {
	color: var(--accent);
	font-weight: 600;
}

/* Why the engine picked this title. */
.card__reason {
	margin-top: 0.3rem;
	color: var(--text-faint);
	font-size: 0.72rem;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.card__link:hover .card__reason {
	color: var(--text-dim);
}

/* Hidden by the "show more" control and the live filter. */
.card[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
   11. Empty / error state
   -------------------------------------------------------------------------- */

.state {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 1rem;
	min-height: 100vh;
	padding: 2rem;
	text-align: center;
}
.state__icon {
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	margin-bottom: 0.4rem;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	color: var(--accent);
}
.state__icon svg {
	width: 26px;
	height: 26px;
}
.state__title {
	font-size: clamp(1.5rem, 4vw, 2.2rem);
	letter-spacing: -0.035em;
}
.state__text {
	max-width: 46ch;
	color: var(--text-dim);
}
.state .searchbar {
	width: min(640px, 92vw);
	margin-top: 1rem;
}
.state__meta {
	margin-top: 0.5rem;
	color: var(--text-faint);
	font-size: 0.85rem;
}
.state__meta a {
	color: var(--text-dim);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.no-results {
	padding: 2.5rem;
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	color: var(--text-faint);
	text-align: center;
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.site-footer {
	margin-top: clamp(3rem, 6vw, 5rem);
	border-top: 1px solid var(--line);
	background: rgba(0, 0, 0, 0.32);
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	padding-block: 2.25rem;
	color: var(--text-faint);
	font-size: 0.85rem;
}
.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-left: auto;
}
.site-footer a:hover {
	color: var(--accent);
}

/* --------------------------------------------------------------------------
   13. Responsive + motion
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.site-header .searchbar {
		display: none;
	}
	.site-header__inner {
		justify-content: space-between;
	}
}

@media (max-width: 780px) {
	html {
		scroll-padding-top: 90px;
	}
	.hero__inner {
		grid-template-columns: 116px minmax(0, 1fr);
		align-items: start;
	}
	.hero__poster {
		grid-row: 1;
	}
	.hero__head {
		grid-column: 2;
		grid-row: 1;
		align-self: center;
	}
	.hero__body {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	.hero__overview {
		font-size: 0.95rem;
		display: -webkit-box;
		-webkit-line-clamp: 5;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.subnav {
		top: 64px;
	}
	.subnav__inner {
		flex-wrap: wrap;
	}
	.filter {
		width: 100%;
		order: -1;
	}
	/* The jump links scroll sideways here — fade the edge so that reads as a
     scrollable strip rather than a truncated one. */
	.subnav__links {
		mask-image: linear-gradient(to right, #000 88%, transparent);
		-webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
	}
	.shelf__hint {
		margin-left: 0;
		flex-basis: 100%;
	}
	.site-header__inner {
		height: 64px;
	}
	.searchbar--lg {
		border-radius: var(--radius);
	}
	.searchbar--lg .searchbar__input {
		height: 48px;
		font-size: 1rem;
	}
	.searchbar--lg .btn,
	.searchbar--lg .segmented label {
		height: 44px;
	}
}

@media (max-width: 560px) {
	.hero-home__form .searchbar {
		flex-wrap: wrap;
	}
	.hero-home__form .searchbar__input {
		flex: 1 0 100%;
	}
	.hero-home__form .segmented {
		flex: 1 1 auto;
	}
	.hero-home__form .segmented label {
		flex: 1 1 0;
		justify-content: center;
	}
	.hero-home__form .btn {
		flex: 1 1 100%;
	}
	.card__veil {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
