/*
 * Landing styles. One file, no framework.
 *
 * Motion model: every element with [data-k] gets a number --k (0 → 1) from
 * app.js, computed from the scroll position of the day. CSS turns --k into
 * opacity and transform only, so the browser never lays out during a scroll.
 * Colours, radii and type follow the product (app/web/src/lib/theme).
 */

@font-face {
	font-family: 'Figtree';
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url('fonts/figtree.woff2') format('woff2');
}
@font-face {
	font-family: 'Big Shoulders';
	font-style: normal;
	font-display: swap;
	font-weight: 600 800;
	src: url('fonts/big-shoulders.woff2') format('woff2');
}

@property --k {
	syntax: '<number>';
	inherits: false;
	initial-value: 0;
}

:root {
	color-scheme: dark;
	--bg: #0b1220;
	--bg-2: #111b30;
	--bg-3: #18243d;
	--line: #2b3649;
	--ink: #eef2f8;
	--muted: #a9b3c5;
	--accent: #c8f04a;
	--accent-ink: #101829;
	--brand: #2460b4;
	--paper: #ffffff;
	--paper-ink: #141b2b;
	--paper-muted: #535d70;
	--paper-line: #d7dde8;
	--ok: #5cbf77;
	--warn: #eba94e;
	--warn-bg: #fdf0dc;
	--warn-ink: #7a4405;
	--r-a: #ee7859;
	--r-b: #6ca6ec;
	--r-c: #eba94e;
	--display: 'Big Shoulders', 'Arial Narrow', 'Roboto Condensed', sans-serif;
	--text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);
	--bar: 3.5rem;
	--ease: cubic-bezier(0.2, 0, 0, 1);
	--spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
* {
	margin: 0;
}
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: var(--bg);
	-webkit-tap-highlight-color: transparent;
}
body {
	font-family: var(--text);
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	font-synthesis: none;
	overflow-x: clip;
}
h1,
h2,
h3 {
	font-family: var(--display);
	font-weight: 800;
	line-height: 0.96;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	text-wrap: balance;
}
p {
	text-wrap: pretty;
}
ul,
ol {
	list-style: none;
	padding: 0;
}
svg {
	display: block;
}
button,
input {
	font: inherit;
	color: inherit;
}
button {
	cursor: pointer;
	border: 0;
	background: none;
	padding: 0;
}
a {
	color: inherit;
}
[hidden] {
	display: none !important;
}
:focus {
	outline: none;
}
:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}
::selection {
	background: var(--accent);
	color: var(--accent-ink);
}
.sr,
.sprite {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
	transform: translateY(-200%);
}
.skip:focus-visible {
	transform: none;
}

/* ---------- Motion vocabulary: --k in, transform and opacity out ---------- */

[data-k] {
	opacity: var(--k);
}
.k1 {
	--k: 1;
}
.inv[data-k] {
	opacity: calc(1 - var(--k));
}
.m-rise {
	transform: translateY(calc((1 - var(--k)) * 1.75rem));
}
.m-left {
	transform: translateX(calc((1 - var(--k)) * -2.5rem));
}
.m-pop {
	transform: scale(calc(0.7 + 0.3 * var(--k)));
}
.m-press {
	transform: scale(calc(1 - 0.07 * sin(var(--k) * 3.1416rad)));
}
.m-fill[data-k] {
	opacity: 1;
	transform: scaleX(var(--k));
	transform-origin: 0 50%;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0 1.1rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 120ms var(--ease), background-color 160ms var(--ease);
}
.btn:active {
	transform: scale(0.96);
}
.btn svg {
	width: 1.25rem;
	height: 1.25rem;
}
.btn--primary {
	background: var(--accent);
	color: var(--accent-ink);
}
.btn--ghost {
	color: var(--ink);
	box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 38%, transparent);
}
.btn--ghost:hover {
	background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.btn--dark {
	background: var(--accent-ink);
	color: #fff;
}
.btn--line {
	color: var(--accent-ink);
	box-shadow: inset 0 0 0 2px var(--accent-ink);
}
.btn--big {
	min-height: 3.5rem;
	padding: 0 1.6rem;
	font-size: 1.125rem;
}

/* ---------- Top bar ---------- */

.bar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	height: var(--bar);
	padding: 0 var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}
.bar::before {
	content: '';
	position: absolute;
	inset: 0 0 -1.25rem 0;
	background: linear-gradient(var(--bg) 62%, transparent);
	z-index: -1;
	pointer-events: none;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	text-decoration: none;
}
.brand .wm {
	height: 1.9rem;
	width: auto;
}
/* The lane of the z is too fine to draw at this size. */
.brand .wm-lane {
	display: none;
}
.bar__nav {
	display: flex;
	gap: 0.5rem;
}
@media (max-width: 26rem) {
	.bar__nav .btn--primary {
		display: none;
	}
}


/* ---------- The wordmark: voice bars, a fruit, a road ---------- */

.wm {
	display: block;
	overflow: visible;
}
.wm-bar {
	fill: var(--accent);
	transform-box: fill-box;
	transform-origin: 50% 100%;
}
.wm-fruit path {
	fill: var(--accent);
}
.wm-lane {
	stroke: var(--bg);
}
/* It introduces itself once: the voice rises, the fruit lands, the word follows. */
.brand .wm-bar {
	animation: wm-rise 520ms var(--spring) both;
}
.brand .wm-bar:nth-child(2) { animation-delay: 50ms; }
.brand .wm-bar:nth-child(3) { animation-delay: 100ms; }
.brand .wm-bar:nth-child(4) { animation-delay: 150ms; }
.brand .wm-bar:nth-child(5) { animation-delay: 200ms; }
.brand .wm-bar:nth-child(6) { animation-delay: 250ms; }
.brand .wm-fruit {
	transform-box: fill-box;
	transform-origin: 50% 100%;
	animation: wm-drop 560ms var(--spring) 420ms both;
}
.brand .wm-word,
.brand .wm-end {
	animation: wm-word 420ms var(--ease) 300ms both;
}
/* And it speaks when you come near. */
.brand:hover .wm-bar,
.brand:focus-visible .wm-bar {
	animation: wm-talk 560ms ease-in-out infinite alternate;
}
.brand:hover .wm-bar:nth-child(2n),
.brand:focus-visible .wm-bar:nth-child(2n) {
	animation-delay: -280ms;
}
.brand:hover .wm-bar:nth-child(3n),
.brand:focus-visible .wm-bar:nth-child(3n) {
	animation-delay: -420ms;
}
@keyframes wm-rise {
	from {
		transform: scaleY(0);
	}
}
@keyframes wm-drop {
	from {
		opacity: 0;
		transform: translateY(-1.4rem) scale(0.6);
	}
}
@keyframes wm-word {
	from {
		opacity: 0;
		transform: translateX(-0.5rem);
	}
}
@keyframes wm-talk {
	from {
		transform: scaleY(0.55);
	}
	to {
		transform: scaleY(1);
	}
}

/* ---------- Hero ---------- */

.hero {
	position: relative;
	min-height: 100svh;
	padding: calc(var(--bar) + 0.5rem) var(--gutter) 1.5rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: center;
	gap: 0.75rem;
	overflow: clip;
}
.hero::before {
	/* The same dawn as the day below, seen from before it starts. */
	content: '';
	position: absolute;
	inset: auto -20% -55% -20%;
	height: 90%;
	border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 34%, transparent), transparent 72%);
	pointer-events: none;
}
.hero h1 {
	font-size: clamp(2.9rem, 1.3rem + 7.6vw, 7rem);
}
.hero .lead {
	margin: 0.9rem 0 1.25rem;
	max-width: 34rem;
}
.hero__text,
.film {
	position: relative;
}
.hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}
.hero__cta .down {
	transform: rotate(90deg);
}
.film {
	justify-self: center;
	width: min(100%, 34rem, 46svh);
	aspect-ratio: 1;
}
.film__svg {
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* The pieces of the film. Hidden ones wait for app.js; with no script or with
   reduced motion the film is a still: the voice and what was said. */
.f-cap {
	font-family: var(--display);
	font-weight: 800;
	font-size: 34px;
	text-transform: uppercase;
	fill: var(--ink);
}
.f-time {
	fill: var(--accent);
	font-variant-numeric: tabular-nums;
}
.f-bar {
	fill: var(--accent);
	transform-box: fill-box;
	transform-origin: 50% 50%;
}
.f-say {
	font-size: 21px;
	font-weight: 500;
	fill: var(--muted);
}
.f-paper {
	fill: var(--paper);
}
.f-qty,
.f-name,
.f-kg text,
.f-stamp text {
	font-size: 21px;
	fill: var(--paper-ink);
}
.f-qty {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.f-kg {
	transform-box: fill-box;
	transform-origin: 50% 50%;
}
.f-kg rect {
	fill: #dff1e5;
}
.f-kg text {
	font-size: 18px;
	font-weight: 700;
	fill: #1f6335;
	font-variant-numeric: tabular-nums;
}
.f-lane {
	fill: none;
	stroke: var(--bg);
	stroke-width: 3;
	stroke-dasharray: 11 9;
	stroke-linecap: round;
}
.f-stop circle {
	fill: var(--accent);
	stroke: var(--bg);
	stroke-width: 3;
}
.f-stop path,
.f-stamp path {
	fill: none;
	stroke: var(--accent-ink);
	stroke-width: 3.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.f-fruit circle {
	fill: #ff8a5c;
	stroke: var(--bg);
	stroke-width: 3.5;
}
.f-fruit path {
	fill: var(--accent);
	stroke: var(--bg);
	stroke-width: 2;
}
.f-sign {
	fill: none;
	stroke: var(--accent);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1;
}
.f-stamp rect {
	fill: var(--ok);
}
.f-stamp text {
	font-size: 19px;
	font-weight: 700;
	fill: #06210f;
}
.f-stamp path {
	stroke: #06210f;
}
.f-row,
.f-lane,
.f-stop,
.f-fruit,
.f-sign,
.f-stamp,
.f-cap:not([data-cap='a']) {
	opacity: 0;
}

@media (min-width: 60rem) {
	.hero {
		grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
		align-items: center;
		gap: clamp(2rem, 5vw, 5rem);
		padding: calc(var(--bar) + 1rem) clamp(2rem, 6vw, 7rem) 2rem;
	}
	.film {
		width: min(100%, 36rem, 76svh);
	}
}
/* A phone: the film right under the headline, the words after it. */
@media (max-width: 59.99rem) {
	.hero__text {
		display: contents;
	}
	.hero h1 {
		order: 1;
	}
	.film {
		order: 2;
	}
	.hero .lead {
		order: 3;
		margin: 0;
	}
	.hero__cta {
		order: 4;
		margin-top: 0.4rem;
	}
	.hero__cta .btn {
		flex: 1 1 auto;
	}
}

/* The narrated film, when someone asks to watch it. */
.dlg.dlg--film {
	width: min(calc(100% - 1.5rem), 78svh, 46rem);
	padding: 0.6rem;
	background: #05090f;
}
.dlg--film video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 16px;
	background: #05090f;
}
.dlg__close {
	display: flex;
	margin: 0.6rem 0 0 auto;
}

/* ---------- The day ---------- */

.day {
	/* 7 scenes; each one lasts 85 % of a screen of scroll. */
	height: calc(7 * 85svh + 100svh);
	position: relative;
}
.stage {
	position: sticky;
	top: 0;
	height: 100svh;
	overflow: clip;
	contain: layout style;
}
.sun {
	position: absolute;
	left: 50%;
	top: 100%;
	width: 150vmax;
	height: 150vmax;
	margin-left: -75vmax;
	border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--brand) 22%, transparent) 45%, transparent 70%);
	opacity: 0.6;
	transform: translateY(-30%);
	pointer-events: none;
}
.rail {
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	z-index: 60;
}
.rail__fill {
	display: block;
	height: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
}
.clock {
	position: absolute;
	z-index: 3;
	top: calc(var(--bar) + 0.25rem);
	left: var(--gutter);
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(2.6rem, 1.6rem + 5vw, 5.5rem);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--accent);
	pointer-events: none;
}

.scene {
	position: absolute;
	inset: 0;
	padding: calc(var(--bar) + 0.5rem) var(--gutter) 1rem;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: 1rem;
	pointer-events: none;
}
.scene:not(.scene--hero) .cap {
	padding-top: clamp(2.9rem, 1.7rem + 5.4vw, 6rem); /* room for the clock */
}
.cap h2 {
	font-size: clamp(2rem, 1.2rem + 3.6vw, 4.25rem);
	margin: 0.15rem 0 0.6rem;
}
.cap > p:not(.eyebrow),
.lead {
	color: var(--muted);
	max-width: 34rem;
}
.eyebrow {
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink);
}
.vis {
	position: relative;
	min-height: 0;
	display: grid;
}
.vis--col {
	grid-template-rows: auto minmax(0, 1fr);
	gap: 0.75rem;
}
.slot {
	min-height: 0;
	min-width: 0;
}

/* Hero */
.scene--hero {
	z-index: 2;
	padding-bottom: 2.75rem;
}
.scene--hero h2 {
	font-size: clamp(2.7rem, 1.4rem + 6.4vw, 6rem);
	margin: 0.2rem 0 0;
}
.scene--hero h2 em,
.hero h1 em {
	font-style: normal;
	color: var(--accent);
	white-space: nowrap;
}
.lead {
	font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.35rem);
	margin: 0.75rem 0 1rem;
	color: var(--ink);
}
.say {
	max-width: 34rem;
}
.is-hero .say,
.is-hero .ticket {
	pointer-events: auto;
}
.say__label {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	margin-bottom: 0.4rem;
	color: var(--accent);
}
.say__row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem;
	border-radius: 999px;
	background: var(--bg-3);
	box-shadow: inset 0 0 0 1.5px var(--line);
	transition: box-shadow 160ms var(--ease);
}
.say__row:focus-within {
	box-shadow: inset 0 0 0 2px var(--accent);
}
.say__mic {
	position: relative;
	flex: none;
	width: 2.9rem;
	height: 2.9rem;
	border-radius: 50%;
	background: var(--accent);
	color: var(--accent-ink);
	display: grid;
	place-items: center;
	transition: transform 120ms var(--ease);
}
.say__mic:active {
	transform: scale(0.92);
}
.say__mic svg {
	width: 1.4rem;
	height: 1.4rem;
	transition: opacity 160ms;
}
.wave {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	opacity: 0;
	transition: opacity 160ms;
}
.wave i {
	width: 3px;
	height: 1.2rem;
	border-radius: 2px;
	background: var(--accent-ink);
	transform: scaleY(0.3);
}
.is-listening .say__mic svg {
	opacity: 0;
}
.is-listening .wave {
	opacity: 1;
}
.is-listening .wave i {
	animation: wave 620ms ease-in-out infinite alternate;
}
.wave i:nth-child(2) {
	animation-delay: -180ms;
}
.wave i:nth-child(3) {
	animation-delay: -420ms;
}
.wave i:nth-child(4) {
	animation-delay: -90ms;
}
.wave i:nth-child(5) {
	animation-delay: -310ms;
}
@keyframes wave {
	to {
		transform: scaleY(1);
	}
}
.say__input {
	flex: 1;
	min-width: 0;
	height: 2.9rem;
	border: 0;
	background: none;
	font-size: 1.0625rem;
	padding-right: 1rem;
}
.say__input::placeholder {
	color: var(--muted);
}
.say__input:focus-visible {
	outline: none;
}
.say__hint {
	margin-top: 0.45rem;
	font-size: 0.875rem;
	color: var(--muted);
}
.scrollcue {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.6rem;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
	pointer-events: none;
	text-shadow: 0 1px 8px var(--bg);
}
.scrollcue svg {
	width: 1.1rem;
	height: 1.1rem;
	transform: rotate(90deg);
	animation: nudge 1.4s var(--ease) infinite;
}
@keyframes nudge {
	50% {
		transform: rotate(90deg) translateX(5px);
	}
}

/* Chips of the scenes */
.chips {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.chips--stack {
	display: grid;
}
.chips--stack .chip {
	grid-area: 1 / 1;
	justify-self: start;
}
.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.5rem;
	padding: 0 0.9rem 0 0.7rem;
	border-radius: 999px;
	background: var(--bg-3);
	box-shadow: inset 0 0 0 1.5px var(--line);
	font-weight: 600;
	transform-origin: 0 50%;
}
.chip svg {
	width: 1.2rem;
	height: 1.2rem;
	color: var(--accent);
}
.chip--warn svg {
	color: var(--warn);
}
.chip--ok svg {
	color: var(--ok);
}

/* Routes */
.lanes {
	align-self: start;
	display: grid;
	gap: 0.75rem;
	width: min(100%, 34rem);
}
.lane {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0.8rem;
	border-radius: 20px;
	background: var(--bg-2);
	box-shadow: inset 0 0 0 1.5px var(--line);
}
.lane--a {
	--c: var(--r-a);
	--fill: 0.82;
}
.lane--b {
	--c: var(--r-b);
	--fill: 0.64;
}
.lane--c {
	--c: var(--r-c);
	--fill: 0.38;
}
.ring {
	width: 3rem;
	height: 3rem;
	transform: rotate(-90deg);
}
.ring circle {
	fill: none;
	stroke-width: 4.5;
}
.ring__bg {
	stroke: var(--line);
}
.ring__fg[data-k] {
	opacity: 1;
	stroke: var(--c);
	stroke-linecap: round;
	stroke-dasharray: 94.25;
	stroke-dashoffset: calc(94.25 * (1 - var(--k) * var(--fill)));
}
.lane__id strong {
	display: block;
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.5rem;
	line-height: 1;
	text-transform: uppercase;
}
.lane__id span {
	font-size: 0.9rem;
	color: var(--muted);
}
.lane__cards {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}
.mini,
.slot--mini {
	width: 2.4rem;
	height: 3.1rem;
	border-radius: 7px;
}
.mini {
	display: block;
	background: color-mix(in srgb, var(--c) 78%, #fff);
	box-shadow: inset 0 -0.9rem 0 color-mix(in srgb, var(--c) 100%, #000 12%);
}
.slot--mini {
	width: 3.4rem;
	height: 4.4rem;
}

/* Picking */
.scale {
	justify-self: start;
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	border-radius: 14px;
	background: #05090f;
	box-shadow: inset 0 0 0 1.5px var(--line);
	transform-origin: 0 50%;
}
.scale__label {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.scale__num {
	font-family: var(--display);
	font-weight: 800;
	font-size: 2.2rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--ok);
}

/* Delivery notes */
.make {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	width: min(100%, 26rem);
}
.fakebtn {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 1.1rem;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
	white-space: nowrap;
}
.make__bar {
	height: 6px;
	border-radius: 3px;
	background: var(--line);
	overflow: hidden;
}
.make__bar i {
	display: block;
	height: 100%;
	background: var(--ok);
}
.make__done {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 700;
	color: var(--ok);
	font-variant-numeric: tabular-nums;
}
.make__done svg {
	width: 1.2rem;
	height: 1.2rem;
}

/* Summary */
.slot--gone {
	position: absolute;
	top: 0;
	right: 0;
	width: 6rem;
	height: 6rem;
}
.stats {
	align-self: start;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.75rem, 2.5vw, 1.75rem) 1rem;
	width: min(100%, 34rem);
}
.stat dd {
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(3.4rem, 2rem + 7vw, 6.5rem);
	line-height: 0.9;
	font-variant-numeric: tabular-nums;
}
.stat small {
	font-size: 0.4em;
	margin-left: 0.15em;
}
.stat dt {
	color: var(--muted);
	font-weight: 600;
}
.stat--zero dd {
	color: var(--accent);
}
.stats__note {
	align-self: end;
	font-size: 0.875rem;
	color: var(--muted);
}

/* ---------- The ticket ---------- */

.ticket {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 5;
	width: 21rem;
	padding: 0.9rem 1rem 0.75rem;
	border-radius: 18px;
	background: var(--paper);
	color: var(--paper-ink);
	box-shadow: 0 2px 6px rgb(0 0 0 / 0.25), 0 18px 44px rgb(0 0 0 / 0.4);
	transform-origin: 0 0;
	will-change: transform;
	pointer-events: none;
	transition: opacity 220ms var(--ease);
}
.ticket:not(.is-ready) {
	opacity: 0;
}
.ticket__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	column-gap: 0.5rem;
	padding-bottom: 0.55rem;
	border-bottom: 2px solid var(--paper-ink);
}
.ticket__kind {
	grid-column: 1 / -1;
	display: grid;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--paper-muted);
}
.ticket__kind span {
	grid-area: 1 / 1;
}
.ticket__kind2 {
	color: var(--brand);
}
.ticket__client {
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.75rem;
	line-height: 1.05;
	text-transform: uppercase;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ticket__route {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: #fde6df;
	color: #8a2f17;
	margin-bottom: 0.2rem;
}
.ticket__route i {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--r-a);
}
.ticket__lines {
	min-height: 2.6rem;
}
.ticket__empty {
	padding: 0.6rem 0 0.4rem;
	color: var(--paper-muted);
}
.line {
	display: grid;
	grid-template-columns: 4.4rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.6rem;
	font-size: 1rem;
	border-bottom: 1px solid var(--paper-line);
}
.line.is-new {
	animation: line-in 360ms var(--spring) both;
}
@keyframes line-in {
	from {
		opacity: 0;
		transform: translateY(-0.6rem) scale(0.96);
	}
}
.line__qty {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.line__name {
	display: grid;
	min-width: 0;
}
.line__name > span {
	grid-area: 1 / 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.line__alt {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	color: var(--warn-ink);
	font-weight: 600;
}
.line__alt:not([data-k]) {
	display: none;
}
.line__alt span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
.line__alt svg {
	flex: none;
	width: 1rem;
	height: 1rem;
}
.line__kg {
	font-size: 0.9rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	padding: 0.1rem 0.45rem;
	border-radius: 6px;
	background: #e2f2e7;
	color: #1f6335;
	transform: scale(calc(0.6 + 0.4 * var(--k)));
}
.line__kg:empty {
	display: none;
}
.line--unknown .line__orig {
	color: var(--paper-muted);
	font-style: italic;
}
.line--warn .line__qty {
	color: #b63c24;
}
.ticket__warn {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.35rem 0.5rem;
	margin-top: 0.6rem;
	padding: 0.6rem 0.7rem;
	border-radius: 12px;
	background: var(--warn-bg);
	color: var(--warn-ink);
	font-size: 0.92rem;
	line-height: 1.35;
	animation: line-in 420ms var(--spring) both;
}
.ticket__warn > svg {
	width: 1.3rem;
	height: 1.3rem;
}
.ticket__warn-actions {
	grid-column: 1 / -1;
	display: flex;
	gap: 0.5rem;
}
.tbtn {
	min-height: 2.75rem;
	padding: 0 0.9rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	color: inherit;
	box-shadow: inset 0 0 0 1.5px currentColor;
	transition: transform 120ms var(--ease);
}
.tbtn:active {
	transform: scale(0.95);
}
.tbtn--main {
	background: var(--paper-ink);
	color: #fff;
	box-shadow: none;
}
.ticket__ext {
	position: absolute;
	top: calc(100% - 14px);
	left: 0;
	right: 0;
	padding: calc(14px + 0.5rem) 1rem 0.8rem;
	border-radius: 0 0 18px 18px;
	background: var(--paper);
	box-shadow: 0 18px 44px rgb(0 0 0 / 0.4);
	transform: translateY(calc((1 - var(--k)) * -1.25rem));
}
.ticket__ext::before {
	content: '';
	position: absolute;
	left: 1rem;
	right: 1rem;
	top: 14px;
	border-top: 2px dashed var(--paper-line);
}
.ticket__total {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.sign {
	position: relative;
	margin-top: 0.4rem;
	height: 4.2rem;
	border-radius: 10px;
	background: #f3f5f9;
}
.sign__label {
	position: absolute;
	top: 0.3rem;
	left: 0.55rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--paper-muted);
}
.sign__ink {
	position: absolute;
	inset: 0.3rem 0.5rem 0.1rem;
	width: calc(100% - 1rem);
	height: calc(100% - 0.4rem);
}
.sign__path[data-k] {
	opacity: 1;
	fill: none;
	stroke: #1b2f55;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 * (1 - var(--k)));
}
.stamp {
	position: absolute;
	right: -0.5rem;
	bottom: -0.55rem;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.3rem 0.65rem 0.3rem 0.45rem;
	border-radius: 999px;
	background: var(--ok);
	color: #06210f;
	font-weight: 700;
	font-size: 0.9rem;
	box-shadow: 0 6px 16px rgb(0 0 0 / 0.25);
	transform: rotate(-5deg) scale(calc(1.6 - 0.6 * var(--k)));
}
.stamp svg {
	width: 1.1rem;
	height: 1.1rem;
}

/* ---------- Wide screens: caption left, picture right ---------- */

@media (min-width: 60rem) {
	.scene {
		grid-template-rows: minmax(0, 1fr);
		grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
		gap: clamp(2rem, 5vw, 5rem);
		padding: calc(var(--bar) + 1.5rem) clamp(2rem, 6vw, 7rem) 3rem;
	}
	.cap {
		align-self: center;
	}
	.vis {
		align-content: center;
		justify-content: center;
		grid-template-columns: min(100%, 27rem);
	}
	.vis--col {
		grid-template-rows: auto minmax(0, 27rem);
	}
	.scene--hero .vis {
		grid-template-rows: minmax(0, 33rem);
	}
	.scene--hero {
		padding-bottom: 3rem;
	}
	.cap > p:not(.eyebrow) {
		font-size: 1.2rem;
	}
	.lanes,
	.stats {
		align-self: center;
	}
	.clock {
		left: clamp(2rem, 6vw, 7rem);
		top: calc(50% - 14.5rem);
	}
	.scene:not(.scene--hero) .cap {
		padding-top: 0;
	}
	.scrollcue {
		bottom: 1.25rem;
	}
}

/* Short phones: tighten the hero so the order stays on screen. */
@media (max-width: 59.99rem) and (max-height: 44rem) {
	.say__hint {
		display: none;
	}
	.lead {
		margin: 0.5rem 0 0.75rem;
	}
}

/* ---------- Sections after the day ---------- */

.sec {
	display: grid;
	gap: 2rem;
	padding: clamp(4rem, 10vw, 8rem) var(--gutter);
	max-width: 78rem;
	margin-inline: auto;
	align-items: center;
	grid-template-columns: minmax(0, 1fr);
}
.sec > * {
	min-width: 0;
}
.sec h2,
.end h2 {
	font-size: clamp(2.4rem, 1.2rem + 5.6vw, 5.5rem);
	margin-bottom: 1rem;
}
.sec__text p {
	color: var(--muted);
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
	max-width: 36rem;
}
@media (min-width: 60rem) {
	.sec {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: clamp(2rem, 6vw, 6rem);
	}
	.sec--flip .sec__text {
		order: 2;
	}
	.sec--list {
		grid-template-columns: 1fr;
	}
}
.reveal {
	opacity: 0;
	transform: translateY(1.75rem);
	transition: opacity 520ms var(--ease), transform 620ms var(--ease);
}
.reveal.is-in {
	opacity: 1;
	transform: none;
}

/* Resilience */
.resil {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* the belt must not widen the page */
	gap: 1rem;
}
.resil__switches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.sw {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 3rem;
	padding: 0 1rem 0 0.5rem;
	border-radius: 999px;
	background: var(--bg-3);
	box-shadow: inset 0 0 0 1.5px var(--line);
	font-weight: 600;
	transition: transform 120ms var(--ease), color 160ms;
}
.sw:active {
	transform: scale(0.96);
}
.sw__knob {
	position: relative;
	width: 2.6rem;
	height: 1.6rem;
	border-radius: 999px;
	background: var(--ok);
	transition: background-color 160ms var(--ease);
}
.sw__knob::after {
	content: '';
	position: absolute;
	top: 0.2rem;
	left: 0.2rem;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 50%;
	background: #fff;
	transform: translateX(1rem);
	transition: transform 220ms var(--spring);
}
.sw[aria-checked='false'] {
	color: var(--muted);
}
.sw[aria-checked='false'] .sw__knob {
	background: #5a657a;
}
.sw[aria-checked='false'] .sw__knob::after {
	transform: none;
}
.resil__floor {
	padding: 1.1rem;
	border-radius: 24px;
	background: var(--bg-2);
	box-shadow: inset 0 0 0 1.5px var(--line);
}
.resil__on {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
	line-height: 1;
	text-transform: uppercase;
}
.resil__on i {
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	background: var(--ok);
	animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
	50% {
		transform: scale(1.5);
		opacity: 0.5;
	}
}
.belt {
	margin: 1rem 0;
	height: 2.6rem;
	overflow: hidden;
	border-bottom: 3px solid var(--line);
}
.belt__run {
	display: flex;
	gap: 1.4rem;
	width: max-content;
	animation: belt 9s linear infinite;
}
.belt__run i {
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 6px;
	background: var(--accent);
	opacity: 0.9;
}
.belt__run i:nth-child(3n) {
	background: var(--r-a);
}
.belt__run i:nth-child(3n + 1) {
	background: var(--r-c);
}
@keyframes belt {
	from {
		transform: translateX(-21.6rem);
	}
	to {
		transform: none;
	}
}
.resil__notes {
	display: grid;
	gap: 0.5rem;
}
.resil__notes li {
	position: relative;
	padding-left: 1.5rem;
	color: var(--muted);
	min-height: 3em;
}
.resil__notes li::before {
	content: '';
	position: absolute;
	left: 0.1rem;
	top: 0.5em;
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 50%;
	background: var(--ok);
}
.resil__notes li.is-off {
	color: var(--ink);
}
.resil__notes li.is-off::before {
	background: var(--warn);
}
.resil__notes li.is-swap {
	animation: line-in 360ms var(--spring) both;
}

/* Assistant */
.ask {
	display: grid;
	gap: 0.9rem;
	padding: 1.1rem;
	border-radius: 24px;
	background: var(--bg-2);
	box-shadow: inset 0 0 0 1.5px var(--line);
}
.ask__log {
	display: grid;
	align-content: end;
	gap: 0.6rem;
	min-height: 15.5rem;
}
.ask__idle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	align-self: center;
	justify-self: center;
	color: var(--muted);
}
.ask__idle svg {
	width: 1.3rem;
	height: 1.3rem;
	color: var(--accent);
}
.msg {
	max-width: 92%;
	animation: line-in 380ms var(--spring) both;
}
.msg--me {
	justify-self: end;
	padding: 0.55rem 0.9rem;
	border-radius: 18px 18px 4px 18px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 600;
}
.msg--bot {
	justify-self: start;
	padding: 0.7rem 0.9rem;
	border-radius: 18px 18px 18px 4px;
	background: var(--bg-3);
}
.msg--wait {
	display: flex;
	gap: 0.3rem;
	padding: 0.9rem;
}
.msg--wait i {
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: var(--muted);
	animation: pulse 900ms ease-in-out infinite;
}
.msg--wait i:nth-child(2) {
	animation-delay: 150ms;
}
.msg--wait i:nth-child(3) {
	animation-delay: 300ms;
}
.card {
	margin-top: 0.6rem;
	padding: 0.75rem;
	border-radius: 14px;
	background: var(--paper);
	color: var(--paper-ink);
}
.card__what {
	font-weight: 700;
	line-height: 1.3;
}
.card__what span {
	font-weight: 500;
	color: var(--paper-muted);
}
.card__row {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.6rem;
}
.card__done {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.5rem;
	font-weight: 700;
	color: #1f6335;
	animation: line-in 360ms var(--spring) both;
}
.card__done svg {
	width: 1.2rem;
	height: 1.2rem;
}
.card.is-off .card__what {
	text-decoration: line-through;
	color: var(--paper-muted);
}
.link {
	min-height: 2.75rem;
	padding: 0 0.4rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	color: var(--paper-ink);
}
.ask__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.pill {
	min-height: 2.75rem;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	text-align: left;
	font-weight: 600;
	line-height: 1.25;
	box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 38%, transparent);
	transition: transform 120ms var(--ease), background-color 160ms var(--ease), color 160ms;
}
.pill:hover {
	background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.pill:active {
	transform: scale(0.96);
}
.pill[aria-pressed='true'] {
	background: var(--ink);
	color: var(--bg);
	box-shadow: none;
}

/* Yours */
.pick {
	display: grid;
	gap: 0.75rem;
	margin-top: 1.5rem;
}
.pick__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}
.swatch {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	box-shadow: inset 0 0 0 3px var(--bg), 0 0 0 0 transparent;
	transition: transform 220ms var(--spring), box-shadow 160ms;
}
.swatch--lima {
	background: #c8f04a;
}
.swatch--coral {
	background: #ff9273;
}
.swatch--amber {
	background: #ffc24f;
}
.swatch--sky {
	background: #84c4ff;
}
.swatch[aria-pressed='true'] {
	transform: scale(1.12);
	box-shadow: inset 0 0 0 3px var(--bg), 0 0 0 3px var(--ink);
}
.mock {
	justify-self: center;
	width: min(100%, 22rem);
}
.mock__url {
	display: inline-block;
	margin-bottom: 0.6rem;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background: var(--bg-3);
	font-size: 0.95rem;
	color: var(--muted);
}
.mock__url span {
	color: var(--accent);
	font-weight: 700;
}
.mock__app {
	padding: 1rem;
	border-radius: 26px;
	background: var(--paper);
	color: var(--paper-ink);
	box-shadow: 0 18px 44px rgb(0 0 0 / 0.45);
}
.mock__name {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.6rem;
	line-height: 1;
	text-transform: uppercase;
}
.mock__name i {
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 8px;
	background: var(--accent);
	box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / 0.15);
}
.mock__tabs {
	display: flex;
	gap: 0.35rem;
	margin: 0.9rem 0 0.6rem;
}
.mock__tabs li {
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--paper-muted);
}
.mock__tabs .is-on {
	background: var(--paper-ink);
	color: #fff;
}
.mock__rows li {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--paper-line);
}
.mock__rows span {
	color: var(--paper-muted);
}
.mock__btn {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 3rem;
	margin-top: 0.9rem;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
	box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / 0.12);
}

/* What is included */
.sec--list {
	align-items: start;
}
.cols {
	display: grid;
	gap: 2rem 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.col h3 {
	font-size: 1.6rem;
	color: var(--accent);
	margin-bottom: 0.6rem;
}
.col li {
	padding: 0.5rem 0;
	border-top: 1px solid var(--line);
	color: var(--ink);
}
.soon {
	color: var(--muted);
}
.soon strong {
	color: var(--ink);
}

/* Call to action */
.end {
	padding: clamp(4.5rem, 12vw, 9rem) var(--gutter);
	background: var(--accent);
	color: var(--accent-ink);
	text-align: center;
	display: grid;
	justify-items: center;
	gap: 1rem;
}
.end h2 {
	margin: 0;
	font-size: clamp(2.8rem, 1.2rem + 8vw, 8rem);
}
.end p {
	font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.35rem);
	font-weight: 500;
	max-width: 32rem;
}
.end__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 0.75rem;
}
.end :focus-visible {
	outline-color: var(--accent-ink);
}

.foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding: 1.5rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
	color: var(--muted);
	font-size: 0.95rem;
}
.foot__brand .wm {
	height: 2.6rem;
	width: auto;
}
.foot a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
}

/* ---------- Dialog: enter your company ---------- */

.dlg {
	width: min(calc(100% - 2rem), 26rem);
	margin: auto;
	padding: 1.4rem;
	border: 0;
	border-radius: 24px;
	background: var(--bg-2);
	color: var(--ink);
	box-shadow: 0 0 0 1.5px var(--line), 0 24px 60px rgb(0 0 0 / 0.6);
}
.dlg::backdrop {
	background: rgb(5 9 15 / 0.7);
}
.dlg[open] {
	animation: line-in 320ms var(--spring) both;
}
.dlg h2 {
	font-size: 2rem;
	margin-bottom: 0.4rem;
}
.dlg p {
	color: var(--muted);
}
.addr {
	display: flex;
	align-items: center;
	margin-top: 0.9rem;
	padding: 0 1rem;
	min-height: 3.5rem;
	border-radius: 14px;
	background: var(--bg);
	box-shadow: inset 0 0 0 1.5px #6c7890;
	font-size: 1.125rem;
}
.addr:focus-within {
	box-shadow: inset 0 0 0 2px var(--accent);
}
.addr input {
	flex: 1;
	min-width: 0;
	height: 3.5rem;
	border: 0;
	background: none;
	text-align: right;
	font-weight: 700;
}
.addr input:focus-visible {
	outline: none;
}
.addr__suffix {
	color: var(--muted);
	white-space: nowrap;
}
.dlg .dlg__err {
	margin-top: 0.5rem;
	color: #f6a08c;
	font-weight: 600;
}
.dlg__row {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 1.2rem;
}

/* ---------- Reduced motion: states change with a short fade ---------- */

@media (prefers-reduced-motion: reduce) {
	[data-k],
	.ticket {
		transition: opacity 120ms linear;
	}
	.m-rise,
	.m-left,
	.m-pop,
	.m-press,
	.ticket__ext,
	.stamp,
	.line__kg {
		transform: none;
	}
	.stamp {
		transform: rotate(-5deg);
	}
	.reveal {
		transform: none;
		transition: opacity 120ms linear;
	}
	.brand .wm-bar,
	.brand .wm-fruit,
	.brand .wm-word,
	.brand .wm-end,
	.brand:hover .wm-bar,
	.brand:focus-visible .wm-bar {
		animation: none;
	}
	.line.is-new,
	.ticket__warn,
	.msg,
	.card__done,
	.dlg[open],
	.resil__notes li.is-swap,
	.belt__run,
	.resil__on i,
	.scrollcue svg,
	.is-listening .wave i,
	.msg--wait i {
		animation: none;
	}
	.sw__knob::after,
	.swatch,
	.btn,
	.pill {
		transition: none;
	}
}
