/* Hallmark · shape: a descent, daylight altitude down through haze to the deck · genre: modern-minimal · theme: custom · job: book · idea: "the page is a flight that descends through four threats to the hard deck, and the visitor flies it with a fighter HUD" · vibe: "clear daylight sky, cockpit symbology, calm precision"
 * paper: oklch(93% 0.025 235) · accent: oklch(86% 0.2 145) · display: Chakra Petch · body: Archivo · hero: headline set on open sky, clouds drifting, the HUD reticle as the cursor and jets launched by clicking · nav: edge-aligned wordmark, four anchors and one action · footer: the deck, a dark band below a glowing deck line · imagery: none, the HUD panels and the film carry the page · signature: the HUD reticle cursor that launches a jet on each click
 * axes: light/grotesk-technical/chromatic-green · posture: daylight sky ground, navy ink, HUD green used only for symbology · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, the theme panels are a repeated two-column rhythm, broken by alternating sides and by the film and waypoint sections */
/* waive 38-face: Chakra Petch is the real Hard Deck brand display face (Hard Deck Brand System, 2026-06-11), kept by brand truth */
/* waive 29: the panels sit over drifting cloud, and a tinted canopy glass is the cockpit material the page is built from */
/* waive 64: mono appears only inside HUD symbology and the terminal panel, where monospace is the material */
@import url("./tokens.css");
@import url("./base.css");

:root { --nav-h: 72px; --container: 1240px; }

html { scroll-behavior: smooth; }
body {
  background: linear-gradient(180deg, var(--color-sky-top) 0, var(--color-sky-mid) 900px, var(--color-haze) 2200px, var(--color-paper) 100%);
  min-height: 100vh;
}

/* the sky: two drifting cloud layers, fixed to the window */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.clouds { position: absolute; inset: -10% -20%; width: 140%; height: 120%; will-change: transform; }
.clouds rect { fill: var(--color-cloud); }
.clouds-far { opacity: 0.55; animation: drift 140s var(--ease-in-out) infinite alternate; }
.clouds-near { opacity: 0.5; animation: drift 90s var(--ease-in-out) infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(-6%, 0, 0); } to { transform: translate3d(6%, -2%, 0); } }

main, .nav, .deck { position: relative; z-index: 1; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); height: var(--nav-h); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); text-decoration: none; font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-ink); }
.wordmark svg path:first-child { stroke: var(--color-ink); stroke-width: 2; fill: none; }
.wordmark svg path:last-child { fill: var(--color-ink); }
.nav nav { display: flex; align-items: center; gap: var(--space-lg); }
.nav nav a:not(.btn) { text-decoration: none; font-size: var(--text-sm); color: var(--color-ink-2); }
.nav nav a:not(.btn):hover { color: var(--color-ink); text-decoration: underline; }
@media (max-width: 52rem) { .nav nav a:not(.btn) { display: none; } }

/* buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg);
  background: var(--color-ink); color: var(--color-paper-solid, var(--color-paper)); border: 1px solid var(--color-ink);
  border-radius: var(--radius-card); text-decoration: none; font-weight: 600; font-size: var(--text-md);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--color-ink-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; transition: none; }
.btn-small { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.link { color: var(--color-ink); font-weight: 600; text-underline-offset: 0.25em; }
.link:hover { text-decoration-thickness: 2px; }
.link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.nav nav a:focus-visible, .wordmark:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* hero: open sky */
.hero { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; gap: var(--space-lg); padding-block: var(--space-2xl) var(--space-3xl); }
.hero h1 { font-size: clamp(3rem, 6.2vw + 0.5rem, 6.5rem); line-height: 0.98; letter-spacing: var(--tracking-display); max-width: 13ch; color: var(--color-ink); }
.lead { font-size: var(--text-lead); max-width: 34ch; color: var(--color-ink-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); }
.hint { font-size: var(--text-sm); color: var(--color-ink-2); margin-top: var(--space-xl); }

/* the four themes */
.theme { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); align-items: center; padding-block: var(--section-gap-s); }
.theme-flip .copy { order: 2; }
.theme h2, .flight h2, .plan h2, .cta h2 { font-size: var(--text-section); line-height: 1.04; color: var(--color-ink); }
.copy { display: grid; gap: var(--space-lg); }
.copy p { font-size: var(--text-lead); color: var(--color-ink-2); max-width: 46ch; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-sm); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: baseline; color: var(--color-ink); }
.steps li::before { content: counter(step); font-family: var(--font-display); color: var(--color-muted); }
@media (max-width: 56rem) { .theme { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } .theme-flip .copy { order: 0; } }

/* HUD panels: glass over the sky */
.panel { margin: 0; background: var(--color-panel); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--color-rule); border-radius: 6px; padding: var(--space-xl); color: var(--color-ink); }
.panel-head { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--space-md); }
.term pre { margin: 0 0 var(--space-lg); padding: var(--space-lg); background: var(--color-deck); border-radius: 4px; overflow-x: auto; font-family: var(--font-outlier); font-size: var(--text-sm); line-height: 1.9; color: var(--color-deck-ink); }
.term .prompt { color: var(--color-deck-muted); }
.term .bad { color: var(--color-term-bad); }
.term .good { color: var(--color-accent); }
.term figcaption { font-size: var(--text-sm); color: var(--color-ink-2); }

.debrief { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.debrief th { text-align: left; font-weight: 500; color: var(--color-muted); padding: 0 var(--space-sm) var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.debrief td { padding: var(--space-sm) var(--space-sm) var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.debrief tr:last-child td { border-bottom: 0; }
.sev { font-weight: 600; }
.sev-major { color: var(--color-major); }
.sev-moderate { color: var(--color-moderate); }

.datamap, .agent { margin: 0; display: grid; }
.datamap > div, .agent > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: var(--space-md); padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
.datamap > div:last-child, .agent > div:last-child { border-bottom: 0; }
.datamap dt, .agent dt { color: var(--color-muted); font-size: var(--text-sm); }
.datamap dd, .agent dd { margin: 0; display: grid; gap: var(--space-2xs); }
.datamap .fix { color: var(--color-ok); font-weight: 600; }
.datamap .fix::before { content: "Fix: "; font-weight: 500; color: var(--color-muted); }

/* the film */
.flight { padding-block: var(--section-gap-s); display: grid; gap: var(--space-md); }
.flight > p { font-size: var(--text-lead); color: var(--color-ink-2); }
.film { margin-top: var(--space-lg); border-radius: 6px; overflow: hidden; border: 1px solid var(--color-rule); background: var(--color-deck); aspect-ratio: 16 / 9; }
.film video { width: 100%; height: 100%; object-fit: cover; }

/* the flight plan */
.plan { padding-block: var(--section-gap-s); }
.waypoints { list-style: none; margin: var(--space-2xl) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); position: relative; }
.waypoints::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; border-top: 2px dashed var(--color-ink-2); opacity: 0.5; }
.waypoints li { position: relative; padding-top: var(--space-2xl); display: grid; gap: var(--space-xs); }
.waypoints li::before { content: ""; position: absolute; top: 0; left: 0; width: 18px; height: 18px; transform: rotate(45deg); background: var(--color-paper-solid, var(--color-paper)); border: 2px solid var(--color-ink); }
.waypoints h3 { font-size: var(--text-title); color: var(--color-ink); }
.waypoints p { color: var(--color-ink-2); }
@media (max-width: 56rem) { .waypoints { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: var(--space-xl); } .waypoints::before { display: none; } }
@media (max-width: 34rem) { .waypoints { grid-template-columns: minmax(0, 1fr); } }

/* the call */
.cta { padding-block: var(--section-gap) var(--section-gap-s); display: grid; justify-items: start; gap: var(--space-lg); }
.cta p { font-size: var(--text-lead); color: var(--color-ink-2); max-width: 36ch; }

/* below the deck */
.deck { background: var(--color-deck); color: var(--color-deck-ink); padding-block: var(--space-2xl) var(--space-3xl); margin-top: var(--space-2xl); }
.deck-inner { display: grid; gap: var(--space-sm); }
.deck-line { height: 2px; background: var(--color-accent); box-shadow: 0 0 18px var(--color-accent); margin-bottom: var(--space-xl); }
.deck-mark { font-family: var(--font-display); font-size: var(--text-2xl); }
.deck p:last-child { color: var(--color-deck-muted); }

/* HUD: only when the script runs on a fine pointer */
.hud, .jets { display: none; }
.hud-on, .hud-on * { cursor: none; }
.hud-on input, .hud-on textarea, .hud-on video { cursor: auto; }
.hud-on .hud { display: block; position: fixed; left: 0; top: 0; z-index: var(--z-tooltip); pointer-events: none; will-change: transform; }
.jets-on .jets { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-toast); pointer-events: none; }
.reticle { position: absolute; left: -40px; top: -40px; overflow: visible; }
.reticle .ring, .reticle .ticks, .reticle .lock { fill: none; stroke: var(--color-accent); stroke-width: 2; paint-order: stroke; filter: drop-shadow(0 0 1px var(--color-hud-edge)) drop-shadow(0 0 1px var(--color-hud-edge)); }
.reticle .pip { fill: var(--color-accent); filter: drop-shadow(0 0 1px var(--color-hud-edge)); }
.reticle .lock { opacity: 0; transition: opacity var(--dur-micro) var(--ease-out); }
.hud.is-lock .reticle .lock { opacity: 1; }
.hud.is-lock .reticle .ring { opacity: 0.35; }
.readout { position: absolute; left: 30px; top: 22px; display: grid; font-family: var(--font-outlier); font-size: 11px; line-height: 1.35; color: var(--color-accent); text-shadow: 0 0 2px var(--color-hud-edge), 0 0 2px var(--color-hud-edge); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .clouds-far, .clouds-near { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 40rem) { .panel { padding: var(--space-lg); } .term pre { font-size: var(--text-xs); } }
