/* ============================================================
   Frontier Labs — landing page design system: tokens and base.

   The ONE place the page's design decisions live. components.css and
   sections.css use these custom properties and never restate a raw colour,
   size, duration or curve. Nothing here is shared with the legacy page at
   /legacy/landing/: it keeps main.css, which is frozen (site/test/legacy.py).

   Direction: dark-first, high-contrast, precise. A neutral near-black base
   (deliberately not the legacy navy), three layered surfaces, 1px hairlines,
   and one signature accent — ion cyan — used only where something is live,
   active or actionable.

   Fonts are self-hosted (the CSP allows font-src 'self' only), cut to latin:
     Hubot Sans  — display. Width axis pinned to 112 and weights to 500–800
                   with fontTools.varLib.instancer: 93 KB -> 37 KB.
     Geist       — body.
     Geist Mono  — technical accents.
   All three are SIL OFL 1.1; licences sit beside the files.
   ============================================================ */

@font-face {
	font-family: "Hubot Sans";
	src: url("/assets/fonts/home/HubotSans.woff2") format("woff2-variations");
	font-weight: 500 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Geist";
	src: url("/assets/fonts/home/Geist.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Geist Mono";
	src: url("/assets/fonts/home/GeistMono.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: dark;

	/* ---- colour --------------------------------------------------------
	   Contrast (WCAG 2.x), computed, on --c-base … --c-surface-3:
	     --c-text       17.3 … 14.4 : 1
	     --c-text-dim    7.8 …  6.5 : 1
	     --c-text-faint  5.7 …  4.75: 1   (the floor: AA for small text on every surface)
	     --c-accent     13.5 … 11.2 : 1
	     --c-on-accent on --c-accent: 11.6 : 1
	   site/test/responsive.mjs re-measures every rendered text node. */
	--c-base: #08090b;
	--c-surface-1: #0f1114;
	--c-surface-2: #15181d;
	--c-surface-3: #1b1f25;
	--c-line: rgb(255 255 255 / .08);
	--c-line-strong: rgb(255 255 255 / .14);
	--c-text: #edeff3;
	--c-text-dim: #9ba3af;
	--c-text-faint: #828a96;
	--c-accent: #5eead4;
	--c-accent-2: #7dd3fc;
	--c-accent-soft: rgb(94 234 212 / .14);
	--c-accent-glow: rgb(94 234 212 / .35);
	--c-on-accent: #04201c;
	--c-warn: #fbbf24;

	/* The glow's raw channels, for rgb(var(--glow-rgb) / alpha) in gradients
	   whose alpha is computed at runtime (Magic Bento's border glow). */
	--glow-rgb: 94 234 212;

	/* ---- type ----------------------------------------------------------
	   A 1.25 modular scale from 1rem, with the two display steps fluid. */
	--font-display: "Hubot Sans", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

	--fs-2xs: .6875rem;
	--fs-xs: .75rem;
	--fs-sm: .875rem;
	--fs-base: 1rem;
	--fs-md: 1.125rem;
	--fs-lg: 1.25rem;
	--fs-xl: 1.5625rem;
	--fs-2xl: clamp(1.75rem, 1.3rem + 1.6vw, 2.45rem);
	--fs-3xl: clamp(2.1rem, 1.35rem + 3vw, 3.8rem);
	--fs-display: clamp(2.5rem, 1.4rem + 4.4vw, 4.85rem);
	--fs-hero: clamp(2.6rem, 1.1rem + 5.4vw, 5.6rem);

	--lh-tight: 1;
	--lh-snug: 1.18;
	--lh-body: 1.6;
	--tracking-display: -.035em;
	/* Hubot Sans' space is narrow for its width; at negative tracking word
	   gaps closed up ("whoscope"). One token restores them everywhere. */
	--word-display: .12em;
	--tracking-mono: .08em;

	/* ---- space: a 4px grid ---------------------------------------------- */
	--sp-1: .25rem;
	--sp-2: .5rem;
	--sp-3: .75rem;
	--sp-4: 1rem;
	--sp-5: 1.25rem;
	--sp-6: 1.5rem;
	--sp-8: 2rem;
	--sp-10: 2.5rem;
	--sp-12: 3rem;
	--sp-16: 4rem;
	--sp-section: clamp(5rem, 3.5rem + 6vw, 9.5rem);
	--gutter: clamp(1rem, .6rem + 1.8vw, 1.5rem);
	--shell: 1200px;

	/* ---- radius ---------------------------------------------------------- */
	--r-sm: 6px;
	--r-md: 10px;
	--r-lg: 18px;
	--r-xl: 24px;
	--r-pill: 999px;

	/* ---- motion -----------------------------------------------------------
	   Durations are named by role, curves by shape. --ease-std is Logo
	   Loop's hover curve, cubic-bezier(.4,0,.2,1), kept exact. */
	--dur-instant: 120ms;
	--dur-fast: 200ms;
	--dur-base: 300ms;
	--dur-slow: 500ms;
	--dur-reveal: 800ms;
	--dur-shine: 1600ms;
	--dur-orbit: 6s;
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	--ease-in-out: cubic-bezier(.65, 0, .35, 1);
	--ease-std: cubic-bezier(.4, 0, .2, 1);

	/* ---- focus: visible, on-brand, never removed ------------------------- */
	--focus-ring: 0 0 0 2px var(--c-base), 0 0 0 4px var(--c-accent);
}

/* Spotlight / glow values, registered so CSS transitions can ease them and
   home.js writes at most one value per frame. */
@property --glow-x { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --glow-y { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --glow-intensity { syntax: "<number>"; inherits: true; initial-value: 0; }

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 5.5rem;
	background: var(--c-base);
}

/* NO overflow-x: hidden on html or body — see site/test/responsive.mjs.
   Decorative layers are trimmed by `overflow: clip` on their own section. */
/* The base colour lives on html ONLY. With html painting its own
   background, a body background is painted as an ordinary block — above
   every z-index:-1 layer — and it hid the site-wide dot grid and the grain
   completely. */
body {
	margin: 0;
	background: transparent;
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: var(--lh-body);
	font-synthesis-weight: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	scrollbar-gutter: stable;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
	border-radius: var(--r-sm);
}

::selection { background: var(--c-accent); color: var(--c-on-accent); }

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

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--c-accent);
	color: var(--c-on-accent);
	padding: var(--sp-3) var(--sp-4);
	font-weight: 600;
}
.skip:focus { left: var(--sp-4); top: var(--sp-4); }

.shell {
	width: min(100% - 2 * var(--gutter), var(--shell));
	margin-inline: auto;
}

/* ---------- type primitives ---------- */
.display {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: var(--lh-tight);
	letter-spacing: var(--tracking-display);
	word-spacing: var(--word-display);
	text-wrap: balance;
}
.h2 { font-size: var(--fs-3xl); }
.mono {
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: var(--tracking-mono);
	text-transform: uppercase;
}
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: var(--tracking-mono);
	text-transform: uppercase;
	color: var(--c-accent);
	margin-bottom: var(--sp-5);
}
.eyebrow::before {
	content: "";
	width: 18px;
	height: 1px;
	background: currentColor;
}
.lede {
	font-size: var(--fs-md);
	line-height: var(--lh-body);
	color: var(--c-text-dim);
	max-width: 60ch;
	margin-top: var(--sp-5);
	text-wrap: pretty;
}
