/* Values copied from ux/DESIGN.md (tokens.css). Headings use Manrope, not Clash Display:
   its licence is unconfirmed (docs/05-architecture/web-console-rewrite/README.md Q21). */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback keeps the swap from shifting layout (CLS). */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial");
  size-adjust: 103%;
  ascent-override: 104%;
  descent-override: 29%;
  line-gap-override: 0%;
}

:root {
  --pine-700: #0E3F3A;
  --pine-600: #145049;
  --pine-500: #2B7A72;
  --pine-50: #E8F5F3;
  --gold-400: #F4D68D;
  --gold-500: #ECC56A;
  --gold-700: #C49A30;
  --tea-500: #6DC094;
  --mint: #BFE6C7;
  --bark-700: #604827;
  --bark-50: #F6F3EB;
  --carbon-900: #1E1C1A;
  --carbon-700: #3D3935;
  --carbon-500: #6B6560;
  --parchment-50: #F4F1EE;
  --parchment-100: #EDE9E5;
  --parchment-200: #E5E1DD;
  --card: #FBFAF8;

  --font-sans: "Manrope", "Manrope Fallback", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgb(30 28 26 / 0.06), 0 1px 3px rgb(30 28 26 / 0.08);

  --duration-fast: 100ms;
  --duration-base: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Titles are kept to one line (enforced by a test), so the scale stays modest. */
  --fs-h2: clamp(1.375rem, 0.85rem + 2.2vw, 2.375rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem);
  --gold-50: #FBF3DD;
  --gold-100: #F6E7BF;
  --gutter: clamp(20px, 4vw, 32px);
  --section-gap: clamp(48px, 6.5vw, 88px);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; --duration-base: 0ms; }
  html { scroll-behavior: auto; }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: rgb(43 122 114 / 0.15); }

body {
  margin: 0;
  background: var(--parchment-50);
  color: var(--carbon-900);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--carbon-900);
  background: var(--parchment-200);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

a { color: var(--pine-700); text-underline-offset: 3px; }

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

main:focus { outline: none; }
/* Off-canvas showcase panels and loops must never create a horizontal scrollbar. */
main { overflow-x: clip; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--pine-700);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Buttons: DESIGN.md primary is pine 700, colour change only on hover, no lift. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform 0.35s var(--ease-out);
}
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-primary { background: var(--pine-700); color: #fff; }
.btn-primary:hover { background: var(--pine-600); }
.btn-accent { background: var(--gold-500); color: var(--carbon-900); }
.btn-accent:hover { background: var(--gold-400); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(244 241 238 / 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--parchment-200);
}
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.wordmark {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--pine-700);
  text-decoration: none;
}
.nav-links { display: none; gap: 28px; margin-left: auto; }
.nav-links a {
  color: var(--carbon-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}
.nav-links a:hover { color: var(--pine-700); }
.nav .btn { margin-left: auto; }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav .btn { margin-left: 0; }
}

/* Hero: a dark stage with a live field. The one section that inverts, by design. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: min(980px, 100svh);
  margin-top: -64px;
  padding-top: 64px;
  color: var(--parchment-50);
  background: radial-gradient(120% 90% at 50% 0%, #15544B 0%, #0B2F2B 46%, #061A17 100%);
}
/* Static grain plus a dark halo behind the copy so the field never fights the headline. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-light {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 38% at 50% 100%, rgb(43 122 114 / 0.55), rgb(43 122 114 / 0) 72%),
    radial-gradient(26% 22% at 50% 92%, rgb(236 197 106 / 0.16), rgb(236 197 106 / 0) 70%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  padding-top: clamp(64px, 10vh, 120px);
  padding-bottom: clamp(240px, 29vh, 300px);
}
.hero-eyebrow {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgb(236 197 106 / 0.4);
  background: rgb(255 255 255 / 0.05);
  color: var(--gold-400);
  font-size: 0.875rem;
  font-weight: 600;
}
.hero-title {
  margin-top: 26px;
  font-weight: 700;
  font-size: clamp(1.5rem, 5.4vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.hero-title .w > span { display: inline-block; }
.hl { position: relative; }
.hl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.3em;
  bottom: 0.02em;
  height: 0.07em;
  border-radius: 2px;
  background: var(--gold-500);
  transform-origin: left;
}
.hero-sub {
  max-width: 52ch;
  margin-top: 22px;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  color: rgb(232 245 243 / 0.8);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.btn-ghost-light { color: var(--parchment-50); border-color: rgb(244 241 238 / 0.32); background: transparent; }
.btn-ghost-light:hover { background: rgb(255 255 255 / 0.07); }

/* Product showcase: real niha surfaces in layered depth, straddling the stage edge. The terminal
   drives the choreography (motion.js); without motion everything shows its final state. */
.hero-product {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin-top: calc(-1 * clamp(170px, 22vh, 230px));
  perspective: 1600px;
}
.sc-tilt, .showcase { transform-style: preserve-3d; }
.sc-tilt { transform-origin: 50% 0; }
.showcase { position: relative; transition: transform 0.7s var(--ease-out); }
.hero-product .bezel {
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.22);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 50px 120px -40px rgb(4 20 18 / 0.75);
}
.sc-term { position: relative; z-index: 3; width: min(100%, 640px); margin-inline: auto; transform: translateZ(40px); }
.sc-panel { display: none; }
.sc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--parchment-200);
  font-size: 0.9375rem;
  font-weight: 700;
}
.sc-meta { font-size: 0.8125rem; font-weight: 500; color: var(--carbon-500); }
.sc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  font-size: 0.875rem;
  transition: background-color 0.5s var(--ease-out);
}
.sc-list li + li { border-top: 1px solid var(--parchment-200); }
.sc-list li.is-hit { background: #FFF6DF; }
.sc-log .mono { color: var(--pine-700); font-size: 0.75rem; }
.sc-toast {
  position: absolute;
  z-index: 4;
  margin: 0;
  max-width: 72%;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--parchment-200);
  background: #fff;
  color: var(--carbon-900);
  font-size: 0.8125rem;
  box-shadow: 0 18px 40px -16px rgb(4 20 18 / 0.6);
  transform: translateZ(90px);
}
.sc-toast strong { margin-right: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; }
.sc-toast-rule { top: -16px; right: 4px; }
.sc-toast-rule strong { background: var(--pine-50); color: var(--pine-700); }
.sc-toast-guard { bottom: -18px; left: 4px; }
.sc-toast-guard strong { background: var(--pine-700); color: #fff; }
@media (min-width: 1000px) {
  .sc-panel {
    display: block;
    position: absolute;
    z-index: 1;
    width: 330px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgb(255 255 255 / 0.6);
    background: #fff;
    color: var(--carbon-900);
    box-shadow: 0 40px 90px -40px rgb(4 20 18 / 0.75);
  }
  .sc-rules { top: 70px; left: 0; transform: translateZ(-70px) rotateY(12deg); transform-origin: right center; }
  .sc-log { top: 130px; right: 0; transform: translateZ(-70px) rotateY(-12deg); transform-origin: left center; }
  .sc-toast { max-width: none; white-space: nowrap; font-size: 0.875rem; padding: 10px 16px; }
  .sc-toast-rule { top: 84px; right: -8px; }
  .sc-toast-guard { bottom: -26px; left: -8px; }
}
@media (min-width: 1240px) {
  .sc-rules { left: -40px; }
  .sc-log { right: -40px; }
  .sc-toast-rule { right: -48px; }
  .sc-toast-guard { left: -48px; }
}
@media (min-width: 1380px) {
  .sc-panel { width: 320px; }
  .sc-rules { left: -100px; }
  .sc-log { right: -100px; }
  .sc-toast-rule { right: -76px; }
  .sc-toast-guard { left: -76px; }
}
@media (max-width: 999px) {
  .hero-product { margin-top: calc(-1 * clamp(110px, 16vh, 150px)); }
  .hero-inner { padding-bottom: clamp(140px, 20vh, 180px); }
  .sc-toast { padding: 6px 10px; font-size: 0.75rem; max-width: 80%; }
  .sc-toast strong { font-size: 0.6875rem; padding: 1px 6px; }
  .sc-toast-rule { top: -16px; right: 0; }
  .sc-toast-guard { bottom: -30px; left: 0; }
}
@keyframes tilt-in { from { transform: rotateX(18deg) scale(0.94); } to { transform: none; } }
@keyframes bob { 0%, 100% { transform: translateZ(90px) translateY(0); } 50% { transform: translateZ(90px) translateY(-6px); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sc-tilt { animation: tilt-in linear both; animation-timeline: view(); animation-range: entry 10% cover 42%; }
  }
}
.motion .sc-toast {
  opacity: 0;
  transform: translateZ(90px) translateY(12px) scale(0.96);
  transition: opacity 0.5s var(--ease-out), transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.motion .sc-toast.is-on { opacity: 1; transform: translateZ(90px); animation: bob 5s ease-in-out 0.8s infinite; }
.motion .sc-log .sc-new { opacity: 0; transform: translateX(-12px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.motion .sc-log .sc-new.is-on { opacity: 1; transform: none; background: #FFF6DF; }

/* Terminal: real CLI strings, so it is the product, not a mock-up. */
.bezel {
  min-width: 0;
  padding: 6px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.55);
  border: 1px solid var(--parchment-200);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8), 0 32px 64px -32px rgb(14 63 58 / 0.4);
}
.terminal pre,
.panel-term {
  margin: 0;
  background: var(--carbon-900);
  border-radius: 12px;
  padding: clamp(18px, 3vw, 28px);
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  line-height: 1.7;
  color: var(--parchment-50);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.t-line { display: block; min-height: 1.7em; }
.t-in { color: #fff; font-weight: 600; }
.t-prompt { color: var(--gold-500); }
.t-dim { color: #A8A29C; }
.t-ok { color: var(--tea-500); }
.t-advisory { color: var(--gold-400); }
.t-guardian {
  color: var(--bark-50);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold-500);
  padding-left: 12px;
}
#hero-terminal.is-typing .t-line.is-pending { visibility: hidden; }
.t-cmd.is-caret::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--gold-500);
}

/* Built-by band */
.trust-band {
  border-block: 1px solid var(--parchment-200);
  background: var(--parchment-100);
}
.trust-band p {
  padding-block: 18px;
  text-align: center;
  font-weight: 600;
  color: var(--carbon-700);
}

/* Section headings. The gold rule is the one accent DESIGN.md allows per title. */
.section-title {
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.section-sub { max-width: 60ch; margin-top: 12px; font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem); color: var(--carbon-500); }
.story .section-sub { color: rgb(232 245 243 / 0.72); }
.flow .section-title, .flow .section-sub { text-align: center; margin-inline: auto; }
.accent { font-style: normal; color: var(--pine-500); }
h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }

/* Layers overview */
.layers { padding-top: var(--section-gap); }
.layers-grid { display: grid; gap: 20px; margin-top: 36px; }

/* Pillars bento: four cells, varied surfaces so the grid has rhythm. */
.pillars { padding-top: var(--section-gap); }
.bento { display: grid; gap: 16px; margin-top: 36px; }
.cell { padding: clamp(28px, 4vw, 48px) 0; scroll-margin-top: 88px; }
.cell > p { margin-top: 12px; color: var(--carbon-700); max-width: 52ch; }

.signals { display: grid; gap: 8px; margin-top: 20px; }
.signal {
  font-size: 0.875rem;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--parchment-200);
  background: #fff;
  color: var(--carbon-700);
}
.signal strong {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}
.signal-info strong { background: var(--pine-50); color: var(--pine-700); }
.signal-approve strong { background: var(--bark-50); color: var(--bark-700); }
.signal-stop strong { background: var(--pine-700); color: #fff; }

.shields { display: grid; gap: 2px; margin-top: 24px; }
.shields div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--parchment-200);
  font-size: 0.9375rem;
}
.shields dt { font-weight: 700; color: var(--pine-700); }
.shields dd { color: var(--carbon-700); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--parchment-200);
  color: var(--pine-700);
}

.ledger { display: grid; gap: 6px; margin-top: 20px; }
.ledger li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--parchment-200);
  background: var(--card);
  font-size: 0.875rem;
}
.ledger-event { font-weight: 600; margin-right: auto; }
.ledger-hash, .ledger-prev { font-family: var(--font-mono); font-size: 0.75rem; }
.ledger-hash { color: var(--pine-700); }
.ledger-prev { color: var(--carbon-500); }

.pill {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}
.pill-info { background: var(--pine-50); color: var(--pine-700); }
.pill-approve { background: var(--bark-50); color: var(--bark-700); }
.pill-stop { background: var(--pine-700); color: #fff; }
.mono { font-family: var(--font-mono); font-size: 0.875em; }

/* Platform */
.platform { padding-top: var(--section-gap); }

/* Final CTA */
.cta-panel h2 {
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.cta-panel .accent { color: var(--gold-400); }
.cta-panel p { color: var(--mint); max-width: 52ch; margin-bottom: 12px; }

/* Footer */
.footer-inner {
  display: grid;
  gap: 20px;
  padding-block: 40px;
  font-size: 0.9375rem;
  color: var(--carbon-500);
}
.footer-brand .wordmark { font-size: 1.125rem; }
.footer-tag { font-size: 0.875rem; }
@media (min-width: 860px) {
  /* The empty third track keeps the copyright where it has always sat, 48px in from the edge. */
  .footer-inner { grid-template-columns: 1fr auto auto; align-items: center; gap: 48px; }
}

/* 404 */
.not-found { padding-block: 96px; }
.not-found p { margin-top: 16px; }

/* ---------- Motion ----------
   Only transform and opacity animate. Hero entry is CSS-only; everything else is gated on
   html.motion, which motion.js adds, so a failed script can never leave content hidden. */

.btn:active { transform: translateY(1px); }

.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgb(30 28 26 / 0.35); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}
@keyframes row-lit { 0%, 100% { opacity: 0; } 6% { opacity: 1; } 22% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow { animation: rise 0.8s var(--ease-out) both; }
  .hero-sub { animation: rise 0.9s var(--ease-out) 0.18s both; }
  .hero-actions { animation: rise 0.9s var(--ease-out) 0.26s both; }
}

/* Scroll reveals */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.motion [data-reveal].is-inview { opacity: 1; transform: none; }
.motion .bento [data-reveal] { transform: translateY(36px) scale(0.97); }
.motion .bento [data-reveal].is-inview { transform: none; }
.motion .bento [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.motion .bento [data-reveal]:nth-child(3) { transition-delay: 0.04s; }

.motion [data-stagger] { opacity: 1; transform: none; }
.motion [data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.motion [data-stagger].is-inview > * { opacity: 1; transform: none; }
.motion [data-stagger].is-inview > :nth-child(2) { transition-delay: 0.1s; }
.motion [data-stagger].is-inview > :nth-child(3) { transition-delay: 0.2s; }
.motion [data-stagger].is-inview > :nth-child(4) { transition-delay: 0.3s; }

/* Rules: the three responses arrive in order, showing guide-before-stop. */
.motion .signal { opacity: 0; transform: translateX(-12px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.motion .cell-rules.is-inview .signal { opacity: 1; transform: none; }
.motion .cell-rules.is-inview .signal:nth-child(1) { transition-delay: 0.35s; }
.motion .cell-rules.is-inview .signal:nth-child(2) { transition-delay: 0.95s; }
.motion .cell-rules.is-inview .signal:nth-child(3) { transition-delay: 1.55s; }

/* Guardian: a scan line passes each shield; each row lights as it passes. */
.motion .shields { position: relative; overflow: hidden; margin-inline: -12px; padding-inline: 12px; }
.motion .shields::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(to bottom, transparent calc(100% - 56px), rgb(236 197 106 / 0.12) calc(100% - 1px), rgb(236 197 106 / 0.55) calc(100% - 1px));
  animation: scan 4.5s linear 6;
}
.motion .shields div { position: relative; z-index: 1; }
.motion .shields div::before {
  content: "";
  position: absolute;
  inset: 0 -12px;
  z-index: -1;
  border-radius: 6px;
  background: var(--pine-50);
  opacity: 0;
  animation: row-lit 4.5s linear 6;
}
.motion .shields div:nth-child(1)::before { animation-delay: 0.45s; }
.motion .shields div:nth-child(2)::before { animation-delay: 1.25s; }
.motion .shields div:nth-child(3)::before { animation-delay: 2.05s; }
.motion .shields div:nth-child(4)::before { animation-delay: 2.85s; }
.motion .shields div:nth-child(5)::before { animation-delay: 3.65s; }
.motion .cell-security:not(.is-visible) .shields::after,
.motion .cell-security:not(.is-visible) .shields div::before { animation-play-state: paused; }

/* Audit log: entries append one by one, each sealed to the one before. */
.motion .ledger li { opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.motion .cell-compliance.is-inview .ledger li { opacity: 1; transform: none; }
.motion .cell-compliance.is-inview .ledger li:nth-child(1) { transition-delay: 0.3s; }
.motion .cell-compliance.is-inview .ledger li:nth-child(2) { transition-delay: 0.85s; }
.motion .cell-compliance.is-inview .ledger li:nth-child(3) { transition-delay: 1.4s; }

/* Logo strip: one slow loop, paused off-screen and on hover. */
.marquee.is-running {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee.is-running .logos {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  gap: 0;
  animation: marquee 38s linear 4;
}
.marquee.is-running .logos li { padding-right: 44px; }
.marquee.is-running:hover .logos,
.marquee.is-running:focus-within .logos,
.motion .cell-security:hover .shields::after,
.motion .cell-security:hover .shields div::before,
.hero:not(.is-visible) .marquee.is-running .logos { animation-play-state: paused; }

/* ---------- Cinematic layer ---------- */

@keyframes word-up { from { transform: translateY(108%); } to { transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes word-lit { from { color: var(--carbon-500); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-title .w > span { animation: word-up 1s var(--ease-out) both; }
  .hero-title .w:nth-child(1) > span { animation-delay: 0.04s; }
  .hero-title .w:nth-child(2) > span { animation-delay: 0.10s; }
  .hero-title .w:nth-child(3) > span { animation-delay: 0.16s; }
  .hero-title .w:nth-child(4) > span { animation-delay: 0.22s; }
  .hero-title .w:nth-child(5) > span { animation-delay: 0.28s; }
  .hl::after { animation: draw 0.8s var(--ease-out) 1.05s both; }
}

/* Flow graphic: the product in one picture. Packets are SVG SMIL, paused off-screen by motion.js. */
.flow { margin-top: var(--section-gap); padding-block: clamp(48px, 6vw, 80px); background: var(--pine-50); }

.flow-frame { margin-top: 40px; }
.flow-svg { display: block; width: 100%; height: auto; }
.flow-v { display: none; max-width: 420px; margin-inline: auto; }
@media (max-width: 700px) {
  .flow-h { display: none; }
  .flow-v { display: block; }
}
.flow-svg text { font-family: var(--font-sans); font-size: 17px; font-weight: 600; fill: var(--carbon-900); }
.flow-v text { font-size: 15px; }
.flow-svg text.mono { font-family: var(--font-mono); font-size: 15px; font-weight: 500; fill: var(--pine-700); }
.flow-v text.mono { font-size: 13px; }
.flow-svg .node-src { fill: #fff; stroke: var(--parchment-200); }
.flow-svg .node-repo { fill: var(--pine-50); stroke: #CFE7E2; }
.flow-svg .track { fill: none; stroke: #D3CCC5; stroke-width: 1.5; stroke-dasharray: 3 7; }
.flow-svg .gate rect { fill: var(--pine-700); }
.flow-svg .gate-name { fill: #fff; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.flow-svg .gate-sub { fill: var(--mint); font-size: 13px; font-weight: 600; }
.flow-svg .pk { fill: var(--pine-500); }
.flow-svg .pk-warn { fill: var(--gold-500); }
.flow-svg .pk-stop { fill: var(--bark-700); }
.flow-svg .badge rect { stroke-width: 1; }
.flow-svg .badge text { font-size: 14px; font-weight: 700; }
.flow-svg .badge-stop rect { fill: var(--pine-700); }
.flow-svg .badge-stop text { fill: #fff; }
.flow-svg .badge-warn rect { fill: var(--bark-50); stroke: #E6D9BE; }
.flow-svg .badge-warn text { fill: var(--bark-700); }
@media (prefers-reduced-motion: reduce) {
  .flow-svg .packets, .flow-svg .badges { display: none; }
}

/* Statement: words light up one by one as it scrolls through. */
.statement { padding-top: var(--section-gap); }
.statement-text {
  max-width: 36ch;
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2.125rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}
.sw-em { color: var(--pine-700); }
/* Dim state stays at AA contrast (carbon-500 is 5.1:1), so mid-scroll text is still readable. */
.motion .statement .sw { color: var(--carbon-500); transition: color 0.5s var(--ease-out); }
.motion .statement.is-inview .sw { color: var(--carbon-900); }
.motion .statement.is-inview .sw-em { color: var(--pine-700); }
.motion .statement.is-inview .sw:nth-child(1) { transition-delay: 0.00s; }
.motion .statement.is-inview .sw:nth-child(2) { transition-delay: 0.03s; }
.motion .statement.is-inview .sw:nth-child(3) { transition-delay: 0.06s; }
.motion .statement.is-inview .sw:nth-child(4) { transition-delay: 0.09s; }
.motion .statement.is-inview .sw:nth-child(5) { transition-delay: 0.12s; }
.motion .statement.is-inview .sw:nth-child(6) { transition-delay: 0.15s; }
.motion .statement.is-inview .sw:nth-child(7) { transition-delay: 0.18s; }
.motion .statement.is-inview .sw:nth-child(8) { transition-delay: 0.21s; }
.motion .statement.is-inview .sw:nth-child(9) { transition-delay: 0.24s; }
.motion .statement.is-inview .sw:nth-child(10) { transition-delay: 0.27s; }
.motion .statement.is-inview .sw:nth-child(11) { transition-delay: 0.30s; }
.motion .statement.is-inview .sw:nth-child(12) { transition-delay: 0.33s; }
.motion .statement.is-inview .sw:nth-child(13) { transition-delay: 0.36s; }
.motion .statement.is-inview .sw:nth-child(14) { transition-delay: 0.39s; }
.motion .statement.is-inview .sw:nth-child(15) { transition-delay: 0.42s; }
.motion .statement.is-inview .sw:nth-child(16) { transition-delay: 0.45s; }
.motion .statement.is-inview .sw:nth-child(17) { transition-delay: 0.48s; }
.motion .statement.is-inview .sw:nth-child(18) { transition-delay: 0.51s; }
.motion .statement.is-inview .sw:nth-child(19) { transition-delay: 0.54s; }
.motion .statement.is-inview .sw:nth-child(20) { transition-delay: 0.57s; }
.motion .statement.is-inview .sw:nth-child(21) { transition-delay: 0.60s; }
.motion .statement.is-inview .sw:nth-child(22) { transition-delay: 0.63s; }
.motion .statement.is-inview .sw:nth-child(23) { transition-delay: 0.66s; }
.motion .statement.is-inview .sw:nth-child(24) { transition-delay: 0.69s; }
@supports (animation-timeline: view()) {
  .motion .statement-text { view-timeline: --stmt block; }
  .motion .statement .sw { transition: none; animation: word-lit linear both; animation-timeline: --stmt; }
  .motion .statement .sw:nth-child(1) { animation-range: cover 12.0% cover 17.0%; }
  .motion .statement .sw:nth-child(2) { animation-range: cover 13.6% cover 18.6%; }
  .motion .statement .sw:nth-child(3) { animation-range: cover 15.1% cover 20.1%; }
  .motion .statement .sw:nth-child(4) { animation-range: cover 16.6% cover 21.6%; }
  .motion .statement .sw:nth-child(5) { animation-range: cover 18.2% cover 23.2%; }
  .motion .statement .sw:nth-child(6) { animation-range: cover 19.8% cover 24.8%; }
  .motion .statement .sw:nth-child(7) { animation-range: cover 21.3% cover 26.3%; }
  .motion .statement .sw:nth-child(8) { animation-range: cover 22.9% cover 27.9%; }
  .motion .statement .sw:nth-child(9) { animation-range: cover 24.4% cover 29.4%; }
  .motion .statement .sw:nth-child(10) { animation-range: cover 26.0% cover 31.0%; }
  .motion .statement .sw:nth-child(11) { animation-range: cover 27.5% cover 32.5%; }
  .motion .statement .sw:nth-child(12) { animation-range: cover 29.1% cover 34.0%; }
  .motion .statement .sw:nth-child(13) { animation-range: cover 30.6% cover 35.6%; }
  .motion .statement .sw:nth-child(14) { animation-range: cover 32.2% cover 37.2%; }
  .motion .statement .sw:nth-child(15) { animation-range: cover 33.7% cover 38.7%; }
  .motion .statement .sw:nth-child(16) { animation-range: cover 35.2% cover 40.2%; }
  .motion .statement .sw:nth-child(17) { animation-range: cover 36.8% cover 41.8%; }
  .motion .statement .sw:nth-child(18) { animation-range: cover 38.4% cover 43.4%; }
  .motion .statement .sw:nth-child(19) { animation-range: cover 39.9% cover 44.9%; }
  .motion .statement .sw:nth-child(20) { animation-range: cover 41.5% cover 46.5%; }
  .motion .statement .sw:nth-child(21) { animation-range: cover 43.0% cover 48.0%; }
  .motion .statement .sw:nth-child(22) { animation-range: cover 44.6% cover 49.6%; }
  .motion .statement .sw:nth-child(23) { animation-range: cover 46.1% cover 51.1%; }
  .motion .statement .sw:nth-child(24) { animation-range: cover 47.7% cover 52.7%; }
}

/* Story: a plain list plus the finished card without JS; pinned and stepped with it. */
.story-pin { display: grid; gap: 40px; }
.story-steps { display: grid; gap: 20px; margin-top: 36px; counter-reset: s; }
.story-steps li { position: relative; padding-left: 44px; counter-increment: s; }
.story-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  color: var(--mint);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.story-steps h3 { font-size: 1.125rem; color: var(--parchment-50); transition: color var(--duration-base) var(--ease-out); }
.story-steps p { margin-top: 6px; font-size: 0.9375rem; color: rgb(232 245 243 / 0.72); }
.story-rail, .story-marks { display: none; }
.cc { overflow: hidden; border-radius: 12px; border: 1px solid var(--parchment-200); background: #fff; transition: box-shadow 0.6s var(--ease-out); }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--parchment-200); }
.cc-repo { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; color: var(--pine-700); }
.cc-status { display: grid; justify-items: end; }
.cc-status .pill { grid-area: 1 / 1; opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.cc-status .cc-s5 { opacity: 1; transform: none; }
.pill-draft { background: var(--parchment-200); color: var(--carbon-700); }
.pill-done { background: #E3F3EA; color: #14522A; }
.cc-body {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  background: var(--carbon-900);
  color: var(--parchment-50);
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  line-height: 2;
}
.cc-line { white-space: pre-wrap; overflow-wrap: anywhere; transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.cc-ask { color: #fff; font-weight: 600; }
.cc-add { color: var(--tea-500); }
.cc-secret { display: grid; }
.cc-secret > span { grid-area: 1 / 1; transition: opacity 0.4s var(--ease-out); }
.cc-raw { opacity: 0; color: #F2C9A8; }
.cc-red { color: var(--gold-400); }
.cc-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent calc(100% - 64px), rgb(236 197 106 / 0.16) calc(100% - 1px), var(--gold-500) calc(100% - 1px));
  opacity: 0;
}
.cc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; font-size: 0.875rem; }
.cc-foot > * { transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.cc-who { font-weight: 600; }
.cc-hash { font-size: 0.75rem; color: var(--pine-700); }
@media (min-width: 960px) {
  .story-pin { grid-template-columns: 5fr 7fr; align-items: center; gap: 56px; }
}

.motion .story-marks { display: block; margin-top: calc(-100svh + 64px); pointer-events: none; }
.motion .story-marks i { display: block; height: 60svh; }
.motion .story-pin { position: sticky; top: 64px; min-height: calc(100svh - 64px); align-content: center; padding-block: 24px; }
.motion .story-rail { display: block; height: 3px; margin-top: 28px; border-radius: 3px; overflow: hidden; background: var(--parchment-200); }
.motion .story-rail span { display: block; height: 100%; background: var(--gold-500); transform: scaleX(0.2); transform-origin: left; transition: transform 0.6s var(--ease-out); }
@media (max-width: 959px) {
  .motion .story-pin { gap: 20px; }
  .motion .story-steps { margin-top: 16px; }
  .motion .story-steps li { grid-area: 1 / 1; opacity: 0; transition: opacity 0.4s var(--ease-out); }
  .motion .story-steps li.is-current { opacity: 1; }
}
.motion .story .cc-status .pill { opacity: 0; transform: translateY(6px); }
.motion .story[data-step="1"] .cc-s1,
.motion .story[data-step="2"] .cc-s2,
.motion .story[data-step="3"] .cc-s3,
.motion .story[data-step="4"] .cc-s4,
.motion .story[data-step="5"] .cc-s5 { opacity: 1; transform: none; }
.motion .story:not(.reached-2) .cc-l2 { opacity: 0; transform: translateX(-8px); }
.motion .story:not(.reached-3) .cc-raw { opacity: 1; }
.motion .story:not(.reached-3) .cc-red { opacity: 0; }
.motion .story.reached-3 .cc-scan { animation: scan 1.2s linear both; }
.motion .story:not(.reached-4) .cc-who,
.motion .story:not(.reached-5) .cc-hash { opacity: 0; transform: translateY(6px); }
.motion .story.reached-5 .cc { box-shadow: 0 0 0 2px var(--gold-500), 0 18px 40px -20px rgb(196 154 48 / 0.6); }

/* ---------- Colour and rhythm pass ---------- */

/* Hero proof: real logos instead of a checklist. White monochrome so seven brands read as one row. */
.hero-logos { width: min(100%, 760px); min-width: 0; margin-top: 40px; }
.hero-logos .marquee { max-width: 100%; margin-top: 14px; }
.hero-logos-label { font-size: 0.875rem; font-weight: 500; color: rgb(191 230 199 / 0.75); }
.hero-logos .logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; margin-top: 20px; }
.hero-logos .logos li { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.9375rem; color: rgb(244 241 238 / 0.82); }
.hero-logos .logos img { filter: brightness(0) invert(1); opacity: 0.8; }
@media (prefers-reduced-motion: no-preference) {
  .hero-logos { animation: rise 0.8s var(--ease-out) 0.5s both; }
}

/* Story: a second dark stage so the page has rhythm, not one long beige scroll. */
.story {
  margin-top: var(--section-gap);
  padding-block: clamp(48px, 6vw, 80px);
  color: var(--parchment-50);
  background: radial-gradient(90% 70% at 85% 10%, #15544B 0%, #0B2F2B 50%, #061A17 100%);
}
.story .section-title { color: var(--parchment-50); }
.story .accent { color: var(--gold-400); }
.motion .story-steps li.is-current::before { background: var(--gold-500); color: var(--carbon-900); }
.motion .story-steps li.is-current h3 { color: var(--gold-400); }
.motion .story-steps li:not(.is-current) h3 { color: rgb(232 245 243 / 0.75); }
.motion .story-rail { background: rgb(255 255 255 / 0.14); }
.story .bezel { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.2); box-shadow: 0 40px 100px -40px rgb(0 0 0 / 0.6); }
.story .cc-foot { color: var(--carbon-900); }

/* Coming-soon framing: the showcase is labelled as a preview of what is being built. */
.sc-preview {
  position: relative;
  z-index: 4;
  width: max-content;
  margin: 0 auto 14px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgb(236 197 106 / 0.4);
  background: rgb(6 26 23 / 0.6);
  color: var(--gold-400);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- No cards: full-bleed bands, open grids and dividers ----------
   Product screens (terminal, rules, log, change card) stay framed because they depict real UI. */

.site-header { transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.site-header.is-top { background: transparent; border-bottom-color: transparent; backdrop-filter: none; box-shadow: none; }
.site-header.is-top .wordmark { color: var(--parchment-50); }
.site-header.is-top .nav-links a { color: rgb(244 241 238 / 0.82); }
.site-header.is-top .nav-links a:hover { color: #fff; }
.site-header.is-top .btn-primary { background: var(--gold-500); color: var(--carbon-900); }
.site-header.is-top .btn-primary:hover { background: var(--gold-400); }
.site-header.is-top :focus-visible, .hero :focus-visible, .story :focus-visible, .cta-panel :focus-visible { outline-color: var(--gold-400); }

/* Layers: four open columns split by hairlines; the coloured tag carries the colour. */
.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.layers-grid > *:nth-child(1) .tag { background: var(--gold-500); color: var(--carbon-900); }
.layers-grid > *:nth-child(2) .tag { background: var(--pine-700); color: #fff; }
.layers-grid > *:nth-child(3) .tag { background: var(--bark-700); color: #fff; }
@media (min-width: 860px) {
  .layers-grid { gap: 0; }
  .layers-grid > * { padding: 4px 36px; }
  .layers-grid > *:first-child { padding-left: 0; }
  .layers-grid > *:last-child { padding-right: 0; }
}

/* Features: an open 2x2 grid drawn with rules, not four boxes. */
.bento { gap: 0; border-top: 1px solid var(--parchment-200); }
.cell + .cell { border-top: 1px solid var(--parchment-200); }
@media (min-width: 960px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .cell { padding: 40px 32px; }
  .cell:first-child { padding-left: 0; }
  .cell:last-child { padding-right: 0; }
  .cell + .cell { border-top: 0; border-left: 1px solid var(--parchment-200); }
}

/* Final call to action: a full-width dark band with gold light. */
.cta { margin-top: var(--section-gap); padding-block: 0; }
.cta-panel {
  color: var(--parchment-50);
  padding: clamp(72px, 10vw, 128px) 0;
  background: radial-gradient(50% 90% at 50% 120%, rgb(236 197 106 / 0.32), rgb(236 197 106 / 0) 60%), radial-gradient(80% 80% at 50% 0%, #15544B, var(--pine-700) 70%);
}
.cta-inner { display: grid; justify-items: center; gap: 16px; text-align: center; }
.cta-inner p { margin-inline: auto; }

/* ---------- Waitlist modal ----------
   <dialog> with showModal when JS runs; :target opens the same markup without JS. */
.wl {
  width: min(540px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: auto;
  background: var(--parchment-50);
  color: var(--carbon-900);
  box-shadow: 0 40px 120px -30px rgb(4 20 18 / 0.6);
}
.wl::backdrop { background: rgb(6 26 23 / 0.62); }
dialog.wl:target:not([open]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  height: fit-content;
  margin: auto;
  box-shadow: 0 0 0 100vmax rgb(6 26 23 / 0.62);
}
@media (prefers-reduced-motion: no-preference) {
  .wl[open] { animation: wl-in 0.35s var(--ease-out); }
}
@keyframes wl-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.wl-body { position: relative; padding: clamp(24px, 4vw, 40px); }
.wl-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--carbon-700);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}
.wl-close:hover { background: var(--parchment-200); }
.wl-kicker {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-50);
  color: var(--bark-700);
  font-size: 0.75rem;
  font-weight: 700;
}
.wl-title { margin-top: 14px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.wl-intro { margin-top: 8px; color: var(--carbon-500); }
.wl-form { display: grid; gap: 16px; margin-top: 24px; }
.wl-form[hidden], .wl-done[hidden] { display: none; }
.wl-row { display: grid; gap: 16px; }
@media (min-width: 480px) { .wl-row { grid-template-columns: 1fr 1fr; } }
.wl-field label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; }
.wl-field input, .wl-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #C9C1B9;
  border-radius: 10px;
  background: #fff;
  color: var(--carbon-900);
  font-size: 1rem;
}
.wl-field input::placeholder { color: var(--carbon-500); }
.wl-field input:focus-visible, .wl-field select:focus-visible { outline: 2px solid var(--pine-500); outline-offset: 1px; }
.wl-field input[aria-invalid="true"] { border-color: var(--bark-700); }
.wl-error { margin-top: 6px; color: var(--bark-700); font-size: 0.875rem; font-weight: 600; }
.wl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wl-consent { font-size: 0.8125rem; color: var(--carbon-500); }
.wl-submit { width: 100%; }
.wl-submit:disabled { opacity: 0.7; cursor: progress; }
.wl-status { min-height: 1.2em; font-size: 0.875rem; font-weight: 600; color: var(--bark-700); }
.wl-done { margin-top: 20px; text-align: center; }
.wl-done h3 { font-size: 1.375rem; color: var(--pine-700); }
.wl-done h3:focus { outline: none; }
.wl-done p { margin: 8px 0 20px; color: var(--carbon-700); }
.wl-joined { display: none; }
.wl-joined:target {
  display: block;
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--pine-700);
  color: #fff;
  font-weight: 600;
}
.wl-joined a { color: var(--gold-400); margin-left: 8px; }

/* ---------- Four perspectives: layers, CLI, sovereignty, platform ---------- */

.layers-grid > :nth-child(4) .tag { background: var(--tea-500); color: var(--carbon-900); }
.layer { display: block; color: inherit; text-decoration: none; }
.layer h3 { transition: color var(--duration-base) var(--ease-out); }
.layer:hover h3 { color: var(--pine-500); }
.layer p { margin-top: 10px; color: var(--carbon-700); }
@media (min-width: 640px) and (max-width: 859px) { .layers-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .layers-grid { grid-template-columns: repeat(4, 1fr); } }

.cli { padding-top: var(--section-gap); scroll-margin-top: 64px; }
.cli-platforms { margin-top: 28px; font-size: 0.9375rem; font-weight: 600; color: var(--carbon-500); }

.sovereignty {
  margin-top: var(--section-gap);
  padding-block: clamp(48px, 6vw, 80px);
  color: var(--parchment-50);
  background: radial-gradient(80% 70% at 10% 0%, #15544B 0%, #0B2F2B 55%, #061A17 100%);
  scroll-margin-top: 64px;
}
.sovereignty .accent { color: var(--gold-400); }
.sovereignty .section-sub { color: rgb(232 245 243 / 0.75); }
.sovereignty :focus-visible { outline-color: var(--gold-400); }
.sov-grid { display: grid; gap: 28px; }
.sov-grid li { position: relative; padding-top: 20px; }
.sov-grid li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgb(236 197 106 / 0.7); transform-origin: left; }
.sov-grid h3 { font-size: 1.125rem; color: var(--parchment-50); }
.sov-grid p { margin-top: 8px; font-size: 0.9375rem; color: rgb(232 245 243 / 0.75); }
@media (min-width: 640px) { .sov-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

.platform, #governance { scroll-margin-top: 64px; }

/* ---------- High-level pass: roadmap and per-section motion ---------- */

/* Layer tags pop in one after another. */
.motion .layers-grid .tag { opacity: 0; transform: scale(0.6); transition: opacity 0.4s var(--ease-out), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.motion .layers-grid.is-inview .tag { opacity: 1; transform: none; }
.motion .layers-grid.is-inview > :nth-child(1) .tag { transition-delay: 0.15s; }
.motion .layers-grid.is-inview > :nth-child(2) .tag { transition-delay: 0.3s; }
.motion .layers-grid.is-inview > :nth-child(3) .tag { transition-delay: 0.45s; }
.motion .layers-grid.is-inview > :nth-child(4) .tag { transition-delay: 0.6s; }

/* Sovereignty: each gold rule draws in. */
.motion .sov-grid li::before { transform: scaleX(0); transition: transform 0.9s var(--ease-out); }
.motion .sov-grid.is-inview li::before { transform: scaleX(1); }
.motion .sov-grid.is-inview li:nth-child(2)::before { transition-delay: 0.15s; }
.motion .sov-grid.is-inview li:nth-child(3)::before { transition-delay: 0.3s; }
.motion .sov-grid.is-inview li:nth-child(4)::before { transition-delay: 0.45s; }

/* Roadmap */
.roadmap { padding-top: var(--section-gap); }

/* ---------- Layers: 3D carousel ----------
   motion.js adds .is-ring and sets data-pos (0 front, 1 right, 2 behind, 3 left) on each face. */
.layer-viz { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.layer-viz i { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; font-style: normal; }
.viz-pills i { background: rgb(255 255 255 / 0.75); border: 1px solid var(--gold-100); color: var(--bark-700); }
.viz-term { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--carbon-900); font-family: var(--font-mono); }
.viz-term i { padding: 0; border-radius: 0; font-size: 0.8125rem; font-weight: 500; color: var(--parchment-50); }
.viz-term i:first-child { color: var(--gold-400); }
.viz-switch { width: max-content; padding: 4px; border-radius: 999px; background: rgb(30 28 26 / 0.08); }
.viz-switch i { padding: 6px 12px; color: inherit; }
.viz-switch .on { background: var(--gold-500); color: var(--carbon-900); }
.viz-signals i:nth-child(1) { background: var(--pine-50); color: var(--pine-700); }
.viz-signals i:nth-child(2) { background: var(--bark-50); color: var(--bark-700); }
.viz-signals i:nth-child(3) { background: var(--pine-700); color: #fff; }

.layers.is-ring .layers-stage { position: relative; height: 360px; margin-top: 44px; perspective: 1600px; }
.layers.is-ring .layers-grid { display: block; position: relative; height: 100%; margin-top: 0; transform-style: preserve-3d; }
.layers.is-ring .layers-grid > .layer {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(400px, 80vw);
  height: 100%;
  margin-left: calc(min(400px, 80vw) / -2);
  padding: 30px;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: 24px;
  box-shadow: 0 40px 80px -40px rgb(14 63 58 / 0.55);
  backface-visibility: hidden;
  cursor: pointer;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}
.layers.is-ring .layer h3 { font-size: 1.5rem; }
.layers.is-ring .layer p { margin-top: 0; }
.layers.is-ring .layer-viz { margin-top: auto; }
.layers.is-ring .layer[data-pos="0"] { transform: translate3d(0, 0, 0); }
.layers.is-ring .layer[data-pos="1"] { transform: translate3d(70%, 0, -280px) rotateY(-42deg); }
.layers.is-ring .layer[data-pos="2"] { transform: translate3d(0, 0, -560px) rotateY(180deg); }
.layers.is-ring .layer[data-pos="3"] { transform: translate3d(-70%, 0, -280px) rotateY(42deg); }
.layers.is-ring .layer:nth-child(1) { background: linear-gradient(160deg, #FFF8E6, #F3DFA8); color: var(--carbon-900); }
.layers.is-ring .layer:nth-child(2) { background: linear-gradient(160deg, #1B5E54, #0B2F2B); color: var(--parchment-50); }
.layers.is-ring .layer:nth-child(3) { background: linear-gradient(160deg, #6A5030, #3A2B17); color: var(--parchment-50); }
.layers.is-ring .layer:nth-child(4) { background: linear-gradient(160deg, #EAF6EF, #BFE3CD); color: var(--carbon-900); }
.layers.is-ring .layer:nth-child(2) p, .layers.is-ring .layer:nth-child(3) p { color: rgb(244 241 238 / 0.85); }
.layers.is-ring .layer:nth-child(2) .tag, .layers.is-ring .layer:nth-child(3) .tag { background: rgb(255 255 255 / 0.16); color: #fff; }
.layers.is-ring .layer:nth-child(3) .viz-switch { background: rgb(255 255 255 / 0.14); }
.layers.is-ring .layer:hover h3 { color: inherit; }
.layers.is-ring .layer:focus-visible { outline-color: var(--gold-500); outline-offset: 4px; }
/* The face that arrives at the front replays its mini visual. */
.layers.is-ring .layer[data-pos="0"] .layer-viz i { animation: rise 0.5s var(--ease-out) both; }
.layers.is-ring .layer[data-pos="0"] .layer-viz i:nth-child(2) { animation-delay: 0.08s; }
.layers.is-ring .layer[data-pos="0"] .layer-viz i:nth-child(3) { animation-delay: 0.16s; }
.layers.is-ring .layer[data-pos="0"] .layer-viz i:nth-child(4) { animation-delay: 0.24s; }

.ring-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.ring-controls button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--parchment-200);
  background: #fff;
  color: var(--carbon-700);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.ring-controls button[aria-pressed="true"] { background: var(--pine-700); border-color: var(--pine-700); color: #fff; }
.layers.is-ring .layer .tag { align-self: flex-start; margin-bottom: 4px; }

/* Carousel uses the full content width on larger screens: wider faces, side faces pushed to the edges. */
@media (min-width: 900px) {
  .layers.is-ring .layers-stage { height: 420px; }
  .layers.is-ring .layers-grid > .layer { width: min(540px, 46vw); margin-left: calc(min(540px, 46vw) / -2); padding: 40px; }
  .layers.is-ring .layer h3 { font-size: 1.875rem; }
  .layers.is-ring .layer p { font-size: 1.125rem; }
  .layers.is-ring .layer[data-pos="1"] { transform: translate3d(92%, 0, -240px) rotateY(-36deg); }
  .layers.is-ring .layer[data-pos="3"] { transform: translate3d(-92%, 0, -240px) rotateY(36deg); }
  .layers.is-ring .layer[data-pos="2"] { transform: translate3d(0, 0, -600px) rotateY(180deg); }
}
@media (min-width: 900px) and (max-width: 1279px) {
  .layers.is-ring .layer[data-pos="1"] { transform: translate3d(76%, 0, -260px) rotateY(-38deg); }
  .layers.is-ring .layer[data-pos="3"] { transform: translate3d(-76%, 0, -260px) rotateY(38deg); }
}

/* ---------- Showcases: CLI scenes, masking demo, console preview ----------
   [data-cycle] boxes get .is-cycling from motion.js; without JS every scene and pane shows stacked. */
.cli-dots { width: 42px; height: 10px; background: radial-gradient(circle, #E06C5A 4px, transparent 4.5px) 0 0 / 14px 10px, radial-gradient(circle, var(--gold-500) 4px, transparent 4.5px) 14px 0 / 14px 10px no-repeat, radial-gradient(circle, var(--tea-500) 4px, transparent 4.5px) 28px 0 / 14px 10px no-repeat; background-repeat: no-repeat; }
.sc-preview-inline { margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-400); border: 1px solid rgb(236 197 106 / 0.4); }

/* CLI: feature list drives a large terminal window. */
.cli-show { display: grid; gap: 28px; margin-top: 40px; align-items: stretch; }
.cli-tabs { display: grid; gap: 6px; grid-template-columns: 1fr; }
.cli-tab {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.cli-tab .t { font-weight: 700; font-size: 1.0625rem; color: var(--carbon-900); }
.cli-tab .d { font-size: 0.9375rem; color: var(--carbon-500); }
.cli-tab:hover { background: rgb(255 255 255 / 0.6); }
.cli-tab[aria-pressed="true"] { background: #fff; border-color: var(--parchment-200); box-shadow: var(--shadow-sm); }
.cli-tab[aria-pressed="true"] .t { color: var(--pine-700); }
.cli-window {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--carbon-900);
  box-shadow: 0 50px 100px -50px rgb(14 63 58 / 0.7), 0 0 0 1px rgb(255 255 255 / 0.04) inset;
}
.cli-chrome { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid rgb(255 255 255 / 0.08); color: #A8A29C; font-size: 0.8125rem; font-family: var(--font-mono); }
.cli-screens { position: relative; flex: 1; display: grid; }
.cli-scene { grid-area: 1 / 1; border-radius: 0; font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 1rem); padding: clamp(20px, 3vw, 32px); }
.cli-show.is-cycling .cli-scene:not(.is-active) { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .cli-show.is-cycling .cli-scene.is-active .t-line { animation: rise 0.4s var(--ease-out) both; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(2) { animation-delay: 0.25s; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(3) { animation-delay: 0.5s; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(4) { animation-delay: 0.75s; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(5) { animation-delay: 1s; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(6) { animation-delay: 1.25s; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(7) { animation-delay: 1.5s; }
  .cli-show.is-cycling .cli-scene.is-active .t-line:nth-child(8) { animation-delay: 1.75s; }
}
.cli-show:not(.is-cycling) .cli-screens { display: block; }
@media (min-width: 1024px) { .cli-show { grid-template-columns: 5fr 7fr; gap: 40px; } }

/* Sovereignty: live masking demo beside the four points. */
.sov-layout { display: grid; gap: 40px; margin-top: 44px; align-items: center; }
.mask-demo {
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: 22px;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.05);
  box-shadow: 0 40px 100px -40px rgb(0 0 0 / 0.6);
}
.md-label { font-size: 0.8125rem; font-weight: 600; color: var(--mint); }
.md-line { margin-top: 14px; font-family: var(--font-mono); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); line-height: 1.7; color: var(--parchment-50); }
.pii { display: inline-grid; vertical-align: bottom; }
.pii > span { grid-area: 1 / 1; padding: 0 6px; border-radius: 6px; }
.pii .raw { background: rgb(224 108 90 / 0.18); color: #F7C6BC; }
.pii .tok { background: rgb(236 197 106 / 0.2); color: var(--gold-400); opacity: 0; }
.md-route { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.md-chip { padding: 4px 12px; border-radius: 999px; background: var(--tea-500); color: var(--carbon-900); font-size: 0.8125rem; font-weight: 700; }
.md-switch { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.1); font-size: 0.8125rem; font-weight: 700; }
.md-switch i { position: relative; z-index: 1; padding: 6px 14px; font-style: normal; color: var(--parchment-50); }
.md-switch .on { color: var(--carbon-900); background: var(--gold-500); border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  .motion .pii .raw { animation: pii-raw 6s ease-in-out infinite; }
  .motion .pii .tok { animation: pii-tok 6s ease-in-out infinite; }
  .motion .pii + .pii > span { animation-delay: 0.4s; }
  .motion .sovereignty:not(.is-visible) .pii > span { animation-play-state: paused; }
}
@keyframes pii-raw { 0%, 30% { opacity: 1; } 40%, 85% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes pii-tok { 0%, 30% { opacity: 0; transform: translateY(6px); } 40%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@media (min-width: 1024px) {
  .sov-layout { grid-template-columns: 6fr 6fr; gap: 56px; }
  .sov-layout .sov-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Platform: a mini web console whose sidebar drives the main pane. */
.console {
  margin-top: 40px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--parchment-200);
  background: #fff;
  box-shadow: 0 50px 100px -50px rgb(14 63 58 / 0.45);
}
.console-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--pine-700); color: var(--mint); font-family: var(--font-mono); font-size: 0.8125rem; }
.console-body { display: grid; min-height: 380px; }
.console-nav { display: flex; gap: 4px; overflow-x: auto; padding: 12px; border-bottom: 1px solid var(--parchment-200); background: var(--parchment-50); }
.console-tab {
  flex: none;
  white-space: nowrap;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--carbon-700);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.console-tab:hover { background: var(--parchment-200); }
.console-tab[aria-pressed="true"] { background: var(--pine-700); color: #fff; }
.console-main { position: relative; display: grid; padding: clamp(20px, 3vw, 36px); }
.console-pane { grid-area: 1 / 1; }
.console-pane h3 { font-size: 1.375rem; }
.pane-desc { margin-top: 6px; color: var(--carbon-500); }
.console.is-cycling .console-pane:not(.is-active) { visibility: hidden; }
.console:not(.is-cycling) .console-main { display: block; }
.console:not(.is-cycling) .console-pane + .console-pane { margin-top: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .console.is-cycling .console-pane.is-active > :not(h3, .pane-desc) { animation: rise 0.5s var(--ease-out) both 0.1s; }
}
@media (min-width: 860px) {
  .console-body { grid-template-columns: 220px 1fr; }
  .console-nav { flex-direction: column; overflow: visible; border-bottom: 0; border-right: 1px solid var(--parchment-200); }
}
.pv-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.pv-board div { display: grid; align-content: start; gap: 8px; padding: 12px; border-radius: 12px; background: var(--parchment-50); min-height: 150px; }
.pv-board b { font-size: 0.8125rem; color: var(--carbon-500); }
.pv-board i { padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--parchment-200); font-style: normal; font-size: 0.875rem; font-weight: 600; }
.pv-rows { display: grid; gap: 8px; margin-top: 24px; }
.pv-rows li { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--parchment-50); font-family: var(--font-mono); font-size: 0.875rem; }
.pv-bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; margin-top: 24px; padding: 12px 12px 0; border-bottom: 2px solid var(--parchment-200); }
.pv-bars i { flex: 1; border-radius: 8px 8px 0 0; background: linear-gradient(to top, var(--pine-700), var(--pine-500)); transform-origin: bottom; }
.pv-bars i:nth-child(1) { height: 70%; } .pv-bars i:nth-child(2) { height: 45%; } .pv-bars i:nth-child(3) { height: 85%; }
.pv-bars i:nth-child(4) { height: 55%; } .pv-bars i:nth-child(5) { height: 95%; background: linear-gradient(to top, var(--gold-700), var(--gold-500)); }
.pv-bars i:nth-child(6) { height: 60%; } .pv-bars i:nth-child(7) { height: 75%; }
@media (prefers-reduced-motion: no-preference) {
  .console.is-cycling .console-pane.is-active .pv-bars i { animation: grow 0.8s var(--ease-out) both; }
}
@keyframes grow { from { transform: scaleY(0); } }
.pv-chat { display: grid; gap: 10px; margin-top: 24px; max-width: 560px; }
.pv-chat p { padding: 12px 16px; border-radius: 16px; font-size: 0.9375rem; }
.pv-chat .me { justify-self: end; background: var(--pine-700); color: #fff; border-bottom-right-radius: 4px; }
.pv-chat .ai { background: var(--parchment-50); border: 1px solid var(--parchment-200); border-bottom-left-radius: 4px; }
.pv-logos { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.pv-logos li { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--parchment-50); border: 1px solid var(--parchment-200); font-weight: 600; }
@media (max-width: 640px) { .pv-board { grid-template-columns: 1fr 1fr; } }

/* Roadmap: one closing statement, no list. */
.roadmap-line {
  text-align: center;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Waitlist selects: custom chevron with breathing room instead of the browser's edge-hugging arrow. */
.wl-field select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%233D3935' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
}
