/* ============================================================================
   Cruisin — marketing landing page
   Spec: docs/superpowers/specs/2026-09-06-landing-page-design.md

   Tokens below are a COPY of src/app.css, not an import — landing/ is a
   standalone static page with no build step. A snapshot can't be broken by an
   app refactor, but it CAN drift. If the brand changes, change it here too.

   Dark only, on purpose. The app is `color-scheme: dark light` because it gets
   used in daylight; a marketing page has one mood.
   ========================================================================= */

@font-face {
	font-family: 'Inter Variable';
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url('assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
		U+2215, U+FEFF, U+FFFD;
}

:root {
	color-scheme: dark;

	--color-lime: #aaee00;
	--color-black: #0d0d0d;
	--color-surface: #1a1a1a;
	--color-elevated: #2a2a2a;
	--color-muted: #888888;
	--color-white: #ffffff;
	--color-alert: #ff4444;
	--color-warning: #ff8800;

	--status-good: var(--color-lime);
	--status-behind: var(--color-warning);
	--status-dropped: var(--color-muted);

	--radius-sm: 10px;
	--radius-md: 16px;
	--radius-lg: 22px;
	--radius-xl: 30px;
	--radius-pill: 999px;

	--tap-target: 52px;

	--bg: var(--color-black);
	--surface: var(--color-surface);
	--elevated: var(--color-elevated);
	--text: var(--color-white);
	--text-muted: var(--color-muted);
	/* Body copy sits brighter than the app's --color-muted (#888). That value is
	   tuned for dense UI on a static surface; here it's large text over a moving
	   route line, where it reads washed out. #a8a8a8 lifts it to ~9:1. */
	--text-body: #a8a8a8;

	--font-display: 'Inter Variable', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI',
		sans-serif;

	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);

	--gutter: clamp(1.25rem, 5vw, 5rem);
	--shadow-card: 0 8px 30px rgba(0, 0, 0, 0.4);

	/* Written by motion.js. Declared here so the page is correct with no JS. */
	--py: 0px;

	/* Phone-frame height. The mobile tiers override this on the media box and the
	   frame inherits it — so it MUST default here rather than on .device itself,
	   or a value set on the element would shadow the inherited override. */
	--dev-h: clamp(320px, calc(100svh - 13rem), 650px);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-display);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

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

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1,
h2,
p {
	margin: 0;
}

a {
	color: inherit;
}

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

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--color-lime);
	color: var(--color-black);
	font-weight: 700;
	text-decoration: none;
	border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus {
	left: 0;
}

/* ── Type ────────────────────────────────────────────────────────────────── */

.display {
	font-size: clamp(2.25rem, 6.5vw, 4.5rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.display--xl {
	font-size: clamp(2.75rem, 8vw, 6rem);
	line-height: 0.95;
}

.sub {
	margin-top: 1.25rem;
	max-width: 34ch;
	color: var(--text-body);
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	line-height: 1.5;
	text-wrap: pretty;
}

.eyebrow {
	margin-bottom: 1rem;
	color: var(--color-lime);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Lime discipline: at most twice per panel — one word, one CTA.
   This is what keeps it sleek instead of neon. */
.lime {
	color: var(--color-lime);
}
.dim {
	color: var(--text-muted);
}

.fineprint {
	margin-top: 1.5rem;
	color: var(--text-muted);
	font-size: 0.95rem;
}

@media (max-width: 640px) {
	.display {
		font-size: clamp(2.6rem, 12vw, 3.6rem);
		line-height: 1.02;
	}

	.display--xl {
		font-size: clamp(2.9rem, 13vw, 4.25rem);
		line-height: 0.98;
	}

	.sub {
		margin-top: 1.1rem;
		font-size: 1.12rem;
		line-height: 1.55;
		max-width: 30ch;
	}

	.panel--statement .sub,
	.panel--close .sub {
		max-width: 26ch;
	}

	.eyebrow {
		font-size: 0.75rem;
	}
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */

.nav {
	position: fixed;
	z-index: 50;
	top: calc(var(--safe-top) + 0.9rem);
	left: 0.9rem;
	right: 0.9rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0.5rem 0.5rem 1rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		backdrop-filter 0.25s ease;
}

/* Only grows a background once you've scrolled off the hero. */
.nav.is-stuck {
	background: rgba(13, 13, 13, 0.72);
	border-color: var(--elevated);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.nav__brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.mark {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: var(--radius-sm);
	background: var(--color-lime);
	color: var(--color-black);
	flex: none;
}

.nav__word {
	font-size: 1.05rem;
}

@media (max-width: 400px) {
	.nav__word {
		display: none;
	}
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--tap-target);
	padding: 0 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-family: inherit;
	font-size: 1.02rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		filter 0.15s ease,
		background-color 0.15s ease,
		border-color 0.15s ease,
		transform 0.05s ease;
}

.btn--primary {
	background: var(--color-lime);
	color: var(--color-black);
}
.btn--primary:hover {
	filter: brightness(0.95);
}

.btn--ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--elevated);
}
.btn--ghost:hover {
	background: var(--surface);
	border-color: var(--color-muted);
}

.btn:active {
	transform: scale(0.985);
}

.btn--sm {
	min-height: 44px;
	padding: 0 1.15rem;
	font-size: 0.95rem;
}

.btn--lg {
	min-height: 58px;
	padding: 0 2rem;
	font-size: 1.1rem;
}

.btn__arrow {
	transition: transform 0.15s ease;
}
.btn--ghost:hover .btn__arrow {
	transform: translateX(3px);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 2.25rem;
}

.actions--stack {
	justify-content: center;
}

/* Narrow screens: stack the CTAs full-width. Standard mobile practice — a
   52px-tall pill spanning the column is a better tap target than two pills
   competing for one line — and it removes any chance of the pair overflowing. */
@media (max-width: 460px) {
	.actions {
		flex-direction: column;
		align-items: stretch;
	}
	.actions .btn {
		width: 100%;
	}
}

/* ── Panels ──────────────────────────────────────────────────────────────── */

.panel {
	position: relative;
	display: grid;
	align-items: center;
	min-height: 100svh;
	padding: calc(var(--safe-top) + 5.25rem) var(--gutter) calc(var(--safe-bottom) + 3rem);
	overflow: hidden;
}

.panel__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 78rem;
	margin: 0 auto;
}

.panel--hero .panel__inner {
	max-width: 78rem;
}

.panel--statement {
	text-align: center;
	place-items: center;
}
.panel--statement .sub {
	margin-inline: auto;
	text-align: center;
	/* Wide enough to break as two lines rather than three. 34ch (the default
	   measure) forced a stray third line on this one sentence. */
	max-width: 47ch;
}

.panel--close {
	text-align: center;
	grid-template-rows: 1fr auto;
	align-items: stretch;
	justify-items: center;
	padding-bottom: 0;
}

.panel--close .panel__inner {
	align-self: center;
}
.panel--close .display {
	margin-inline: auto;
}

/* Alternating tone so consecutive full-screen panels don't blur together. */
.panel--split:nth-of-type(even) {
	background: linear-gradient(180deg, var(--bg), #111111 50%, var(--bg));
}

/* ── Split panels (text + device) ────────────────────────────────────────── */

.split {
	display: grid;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
	grid-template-columns: 1fr;
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: 1fr 1fr;
	}
	.panel--flip .split__text {
		order: 2;
	}
	.panel--flip .split__media {
		order: 1;
	}
}

.split__media {
	display: grid;
	place-items: center;
	translate: 0 var(--py);
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-top: 2rem;
	color: var(--text-muted);
	font-size: 0.95rem;
}
.legend li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dot-key {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: none;
}
.dot-key--good {
	background: var(--status-good);
}
.dot-key--behind {
	background: var(--status-behind);
}
.dot-key--dropped {
	background: var(--status-dropped);
}

/* ── Device frame ────────────────────────────────────────────────────────── */

/* Sized by VIEWPORT HEIGHT, not width. With mandatory snap a panel that is even
   30px taller than the viewport clips content you can never scroll to, and a
   fixed-height phone is what pushes it over. Driving height from 100svh means
   every panel fits its screen by construction. */
.device {
	/* Both dimensions are stated EXPLICITLY, derived from one custom property.
	   `aspect-ratio` + `width: auto` + a percentage height is not safe: Safari
	   fails to derive the width when the height resolves through a flex-sized
	   parent, and the frame collapses to just its padding + border (~22px) with a
	   zero-width image inside. That is the squashed sliver seen on iOS; Chrome
	   derived it correctly at the same viewport, which is why it survived testing.
	   Mobile tiers below only need to override --dev-h (defined on :root). */
	height: var(--dev-h);
	width: calc(var(--dev-h) * 9 / 19.5);
	max-width: 100%;
	padding: 10px;
	border: 1px solid var(--elevated);
	border-radius: 42px;
	background: #141414;
	box-shadow: var(--shadow-card);
}

.device__screen,
.device__shot {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 32px;
	background-color: var(--color-black);
}

/* Panel 6 has no real capture yet — its screen is a drawn SVG, sized the same
   way so it sits flush in the frame alongside the real screenshots.
   See assets/MANIFEST.md for how to swap it. */
.device__screen--drawn {
	object-fit: fill;
}

/* ── Pinned showcase (panels 3-5) ────────────────────────────────────────── *

   Apple's trick, and the only way to have hard snap AND things changing as you
   scroll: the section is three screens tall, but the part you look at is
   `position: sticky` so it stays put. The three .show__step blocks below it do
   nothing except provide scroll distance and act as the snap targets.

   Height maths: stage(100svh) + track(300svh) - 100svh margin = 300svh, and the
   stage stays pinned for the first 200svh — which is exactly the last snap
   point, so it unpins precisely as you leave for the next panel.
   ------------------------------------------------------------------------- */

.show {
	position: relative;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.show__slide {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
	width: 100%;
	max-width: 78rem;
	margin: 0 auto;
	padding: calc(var(--safe-top) + 5.25rem) var(--gutter) calc(var(--safe-bottom) + 3rem);
	min-height: 100svh;
}

@media (min-width: 900px) {
	.show__slide {
		grid-template-columns: 1fr 1fr;
		padding-block: 0;
	}
	.show__slide[data-slide='1'] .show__text {
		order: 2;
	}
	.show__slide[data-slide='1'] .show__media {
		order: 1;
	}
}

.show__media {
	display: grid;
	place-items: center;
}

.js-motion .show__stage {
	position: sticky;
	top: 0;
	z-index: 2;
	height: 100svh;
	overflow: hidden;
}

.js-motion .show__inner {
	position: relative;
	height: 100%;
}

.js-motion .show__track {
	position: relative;
	z-index: 1;
	margin-top: -100svh;
}

.js-motion .show__step {
	height: 100svh;
}

.js-motion .show__slide {
	position: absolute;
	inset: 0;
	min-height: 0;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.45s ease,
		visibility 0.45s ease;
}

.js-motion .show__slide.is-active {
	opacity: 1;
	visibility: visible;
}

/* The content lifts into place as its slide takes over — this is the bit that
   reads as "something changed" rather than a hard cut. */
.js-motion .show__text > *,
.js-motion .show__media {
	transform: translateY(26px);
	opacity: 0;
	transition:
		transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
		opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-motion .show__slide.is-active .show__text > *,
.js-motion .show__slide.is-active .show__media {
	transform: none;
	opacity: 1;
}

.js-motion .show__slide.is-active .show__text > *:nth-child(1) { transition-delay: 60ms; }
.js-motion .show__slide.is-active .show__text > *:nth-child(2) { transition-delay: 120ms; }
.js-motion .show__slide.is-active .show__text > *:nth-child(3) { transition-delay: 180ms; }
.js-motion .show__slide.is-active .show__text > *:nth-child(4) { transition-delay: 240ms; }
.js-motion .show__slide.is-active .show__media { transition-delay: 40ms; }

/* Continuous drift across the whole pinned run, so the phone is never dead
   still between steps. --sp is 0→1 through the section, written by motion.js. */
.js-motion .show__slide.is-active .show__media {
	translate: 0 calc((var(--sp, 0) - 0.5) * -26px);
}

/* ── Step indicator ─────────────────────────────────────────────────────── */

.show__dots {
	position: absolute;
	right: clamp(1rem, 3vw, 2.5rem);
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	z-index: 3;
}

html:not(.js-motion) .show__dots {
	display: none;
}

.show__dots li {
	width: 6px;
	height: 22px;
	border-radius: 3px;
	background: var(--elevated);
	transition:
		background-color 0.35s ease,
		height 0.35s ease;
}

.show[data-step='0'] .show__dots li:nth-child(1),
.show[data-step='1'] .show__dots li:nth-child(2),
.show[data-step='2'] .show__dots li:nth-child(3) {
	background: var(--color-lime);
	height: 34px;
}

@media (max-width: 640px) {
	.show__dots {
		display: none;
	}
}

html:not(.js-motion) .show__track {
	display: none;
}

/* ── Slide furniture ────────────────────────────────────────────────────── */

.live {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 0.5rem;
	border-radius: 50%;
	background: var(--color-lime);
	animation: livepulse 2s ease-out infinite;
}

@keyframes livepulse {
	0% {
		box-shadow: 0 0 0 0 rgba(170, 238, 0, 0.6);
	}
	70%,
	100% {
		box-shadow: 0 0 0 7px rgba(170, 238, 0, 0);
	}
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 2rem;
}

.chip {
	padding: 0.5rem 0.95rem;
	border: 1px solid var(--elevated);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--text-body);
	font-size: 0.92rem;
	font-weight: 500;
	white-space: nowrap;
}

.chip--warn {
	border-color: rgba(255, 136, 0, 0.4);
	color: var(--color-warning);
}

.chip--good {
	border-color: rgba(170, 238, 0, 0.4);
	color: var(--color-lime);
}

.invite {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 2rem;
	padding: 0.7rem 1.1rem;
	border: 1px dashed var(--elevated);
	border-radius: var(--radius-md);
	background: var(--surface);
}

.invite__label {
	color: var(--text-muted);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.invite__code {
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
	font-size: 0.95rem;
	color: var(--text-body);
}

.invite__code b {
	color: var(--color-lime);
	font-weight: 700;
	letter-spacing: 0.06em;
}

/* The showcase carries more furniture than a plain panel (chips, legend,
   invite), so its type runs a notch smaller on mobile to leave room. */
@media (max-width: 899px) {
	.show__slide .display {
		font-size: clamp(2rem, 8.6vw, 2.75rem);
	}

	.show__slide .sub {
		margin-top: 0.9rem;
		font-size: 1.02rem;
		line-height: 1.5;
		max-width: 34ch;
	}

	.show__slide .chips {
		margin-top: 1.1rem;
		gap: 0.4rem;
		flex-wrap: nowrap;
		min-width: 0;
		max-width: 100%;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 2px;
	}

	.show__slide .chips::-webkit-scrollbar {
		display: none;
	}

	.show__slide .chip {
		padding: 0.36rem 0.7rem;
		font-size: 0.84rem;
	}

	.show__slide .legend {
		margin-top: 1.1rem;
		gap: 0.85rem;
		font-size: 0.88rem;
	}

	.show__slide .invite {
		margin-top: 1.1rem;
		padding: 0.55rem 0.85rem;
	}

	.show__slide .invite__code {
		font-size: 0.85rem;
	}
}

/* Stacked layouts (phone under the text) can't use a fixed phone height tuned
   for one device — the text block's height varies with copy and wrapping, and
   the pinned stage is overflow:hidden, so anything that doesn't fit is CLIPPED,
   not scrollable.

   The obvious fix — let the media flex to fill leftover space and size the phone
   at height:100% — does NOT work: `.show__media` is a flex item with
   `flex: 1 1 auto`, so its height is not DEFINITE when the child's percentage
   resolves. The phone silently fell back to being sized by its image's width and
   rendered 975px tall inside a 130px box. Measured, not assumed.

   So the media box gets a definite viewport-relative height, and the phone fills
   that. Percentages resolve against a real number and overflow can't happen. */
@media (max-width: 899px) {
	.js-motion .show__slide,
	.panel--split .split {
		display: flex;
		flex-direction: column;
		/* `safe center` centres the group but degrades to flex-start when the
		   content is taller than the box — plain `center` would clip the TOP,
		   which is unreachable even with scrolling. */
		justify-content: center;
		justify-content: safe center;
		gap: 1.5rem;
		min-height: 0;
		/* NO overflow-y here. It was added as a "safety net" and broke the page:
		   a full-viewport scroll container with overscroll-behavior:contain stops
		   wheel events chaining to the document, so with the pinned showcase
		   filling the screen nothing scrolled at all. The viewport tiers below
		   are what keep content fitting; they measure clean from 533px up. */
	}

	.js-motion .show__slide,
	.panel {
		/* The floating nav's bottom edge is ~74px down (0.9rem offset + ~60px
		   tall). 4.25rem/68px tucked the eyebrow underneath it. */
		padding-top: calc(var(--safe-top) + 5.75rem);
		padding-bottom: calc(var(--safe-bottom) + 1.5rem);
	}

	.show__text,
	.split__text {
		flex: 0 0 auto;
		/* Without min-width:0 a flex item refuses to shrink below its content's
		   min-content width. The nowrap chips row made that ~502px inside a 500px
		   slide, so the whole text block overflowed its gutter. */
		min-width: 0;
		width: 100%;
	}

	/* Letting the phone flex-grow was tried and reverted: `flex-basis: auto`
	   takes its base size from the image's 1500px intrinsic height, so it
	   overshoots and clips. A definite height per viewport tier (below) is the
	   only version that measured clean at every height. */
	.show__media,
	.split__media {
		flex: 0 0 auto;
		--dev-h: min(34svh, 300px);
		height: var(--dev-h);
		min-height: 0;
		display: flex;
		justify-content: center;
		align-items: flex-start;
	}

	/* No sizing rule needed here: .device reads --dev-h, which the media box above
	   overrides. Both axes stay explicit, so there is no aspect-ratio derivation
	   for Safari to collapse. */
}

/* Below the snap gate (see the scroll-snap block) there is not enough height for
   a one-screen pinned layout at all, so the showcase disengages entirely and
   falls back to three ordinary stacked panels — the same shape it takes with no
   JS. Trying to pin here just clips, because the stage is overflow:hidden. */
@media (max-height: 559px) {
	.js-motion .show__stage {
		position: static;
		height: auto;
		overflow: visible;
	}

	.js-motion .show__slide {
		position: static;
		min-height: 100svh;
		opacity: 1;
		visibility: hidden;
	}

	.js-motion .show__slide,
	.js-motion .show__slide.is-active {
		visibility: visible;
	}

	.js-motion .show__text > *,
	.js-motion .show__media {
		transform: none;
		opacity: 1;
	}

	.js-motion .show__track,
	.show__dots {
		display: none;
	}
}

/* Short viewports (landscape phones, small handsets) have no room for both a
   full type scale and a phone. Shrink the type rather than clip the phone. */
@media (max-width: 899px) and (max-height: 720px) {
	/* Applies to every panel, not just the showcase — #explore has the same
	   text-above-phone stack and was clipping on very short viewports. */
	.display {
		font-size: clamp(1.9rem, 7.6vw, 2.5rem);
	}

	.display--xl {
		font-size: clamp(2.1rem, 8.5vw, 2.8rem);
	}

	.sub {
		font-size: 0.98rem;
	}

	.show__slide .display {
		font-size: clamp(1.65rem, 6.4vw, 2.1rem);
	}

	.show__slide .sub {
		font-size: 0.94rem;
		margin-top: 0.7rem;
	}

	.show__media,
	.split__media {
		--dev-h: min(32svh, 260px);
		height: var(--dev-h);
	}
}

@media (max-width: 899px) and (max-height: 620px) {
	.show__media,
	.split__media {
		--dev-h: min(23svh, 165px);
		height: var(--dev-h);
	}
}

/* ── Hero art ────────────────────────────────────────────────────────────── */

.hero__art {
	position: absolute;
	inset: 0;
	z-index: 0;
	translate: 0 var(--py);
	will-change: translate;
}

.hero__glow {
	position: absolute;
	inset: 0;
	background: radial-gradient(
		120% 80% at 50% 8%,
		rgba(170, 238, 0, 0.16),
		transparent 62%
	);
}

/* Keeps the headline legible over whatever the art is doing — today a route
   line and status dots, later a photograph. Without it the dots render on top
   of the type. Horizontal on wide screens (text sits left), vertical when the
   layout stacks. */
.hero__art::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(13, 13, 13, 0.9) 0%,
		rgba(13, 13, 13, 0.82) 40%,
		rgba(13, 13, 13, 0.88) 70%,
		rgba(13, 13, 13, 0.95) 100%
	);
}

@media (min-width: 900px) {
	.hero__art::after {
		background: linear-gradient(
			90deg,
			rgba(13, 13, 13, 0.95) 0%,
			rgba(13, 13, 13, 0.78) 34%,
			rgba(13, 13, 13, 0.12) 68%,
			transparent 100%
		);
	}
}

.hero__route {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 92%);
	mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 92%);
}

.hero__roads path {
	fill: none;
	stroke: var(--color-muted);
	stroke-opacity: 0.14;
	stroke-width: 1.6;
}

.hero__line {
	stroke-dasharray: 1400;
	stroke-dashoffset: 1400;
	animation: draw 3.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes draw {
	to {
		stroke-dashoffset: 0;
	}
}

.dot--good {
	fill: var(--status-good);
	animation: halo 2.6s ease-out infinite;
	transform-box: fill-box;
	transform-origin: center;
}
.dot--behind {
	fill: var(--status-behind);
}
.dot--dropped {
	fill: var(--status-dropped);
	opacity: 0.55;
}

@keyframes halo {
	0% {
		transform: scale(0.75);
		opacity: 0.9;
	}
	70%,
	100% {
		transform: scale(1.9);
		opacity: 0;
	}
}

.hero__inner {
	padding-top: 4vh;
}

.panel__glow {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient(
		90% 60% at 50% 110%,
		rgba(170, 238, 0, 0.18),
		transparent 65%
	);
	translate: 0 var(--py);
}

/* ── Scroll cue ──────────────────────────────────────────────────────────── */

.scrollcue {
	position: absolute;
	left: 50%;
	bottom: calc(var(--safe-bottom) + 1.75rem);
	transform: translateX(-50%);
	z-index: 1;
}

.scrollcue__line {
	display: block;
	width: 1px;
	height: 46px;
	background: linear-gradient(var(--color-muted), transparent);
	opacity: 0.6;
	animation: cue 2.4s ease-in-out infinite;
	transform-origin: top;
}

@keyframes cue {
	0%,
	100% {
		transform: scaleY(0.4);
		opacity: 0.25;
	}
	50% {
		transform: scaleY(1);
		opacity: 0.7;
	}
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

/* Lives INSIDE #get so it shares that panel's snap position. As a sibling after
   the last snap target it was unreachable — snap pulled you back up to #get and
   the footer could never be scrolled to at all. */
.foot {
	width: 100%;
	padding: 2.25rem 0 calc(var(--safe-bottom) + 1.5rem);
	border-top: 1px solid var(--elevated);
}

.foot__inner {
	max-width: 48rem;
	margin: 0 auto;
	text-align: center;
}

.foot__trust {
	color: var(--text-body);
	font-size: 0.95rem;
	line-height: 1.55;
}
.foot__trust strong {
	color: var(--text);
	font-weight: 600;
}

.foot__links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.75rem;
	margin-top: 1.25rem;
	font-size: 0.95rem;
}
.foot__links a {
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}
.foot__links a:hover {
	color: var(--text);
}

.foot__legal {
	margin-top: 1.25rem;
	color: var(--text-muted);
	font-size: 0.85rem;
	opacity: 0.7;
}

/* ── Motion ──────────────────────────────────────────────────────────────── *

   Reveals are OPT-IN. The hidden start state lives under .js-motion, which
   motion.js adds to <html>. If the script never runs, nothing is ever hidden
   and the page is fully readable. Built the other way round, one script error
   ships a blank page — silently.
   ------------------------------------------------------------------------- */

.js-motion .reveal {
	opacity: 0;
	transform: translateY(24px);
}

.js-motion .reveal.is-in {
	opacity: 1;
	transform: none;
	transition:
		opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
	transition-delay: calc(var(--i, 0) * 70ms);
}

/* Tier 2 of the motion plan: where the browser has scroll-driven animations,
   parallax runs off the main thread and motion.js skips its rAF loop (it feature-
   detects the same thing). Only ever one system driving `translate`. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		[data-parallax] {
			animation: parallax linear both;
			animation-timeline: view();
			animation-range: cover 0% cover 100%;
		}

		@keyframes parallax {
			from {
				translate: 0 calc(var(--depth, 0) * 90px);
			}
			to {
				translate: 0 calc(var(--depth, 0) * -90px);
			}
		}
	}
}

/* Scroll snap: MANDATORY, one screen at a time — you can never rest between two
   panels. `scroll-snap-stop: always` is the other half: without it a fast flick
   skips straight past a panel, which is the same problem wearing a hat.

   The known cost of mandatory is that it traps content taller than the viewport,
   so it is gated off when a panel cannot fit — below 560px tall the page falls
   back to ordinary scrolling rather than locking someone out of the copy. */
@media (min-height: 560px) and (prefers-reduced-motion: no-preference) {
	html {
		scroll-snap-type: y mandatory;
	}
	.panel,
	.js-motion .show__step,
	html:not(.js-motion) .show__slide {
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}
}

/* Mirrors the global kill in src/app.css:158-167. Parallax off, reveals
   instant, snap off, ambient loops stopped. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	html {
		scroll-snap-type: none;
	}

	.js-motion .reveal {
		opacity: 1;
		transform: none;
	}

	.hero__art,
	.split__media,
	.panel__glow {
		translate: none !important;
		animation: none !important;
	}

	.hero__line {
		stroke-dashoffset: 0;
	}

	.scrollcue {
		display: none;
	}

	.js-motion .show__text > *,
	.js-motion .show__media {
		transform: none;
		opacity: 1;
	}

	.js-motion .show__slide.is-active .show__media {
		translate: none;
	}

	.live {
		animation: none;
	}
}
