/* Ventgris public site. Page layout and components. Tokens live in tokens.css and are never redefined here. */

/* ---------- base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  /* ASCII is the material: "-->" stays three characters. The mono font draws its code ligatures through
     contextual alternates, and every `font:` shorthand would switch them back on, hence !important. */
  font-variant-ligatures: no-contextual !important;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-color: var(--line-strong) var(--bg);
  scrollbar-width: thin;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The page stays dark for a blink so the boot sequence can cover it before anything shows.
   Pure CSS: without JavaScript the content simply appears after 180 ms. */
@media (prefers-reduced-motion: no-preference) {
  body { animation: vg-page-in 1ms linear 180ms backwards; }
}
@keyframes vg-page-in { from { opacity: 0; } to { opacity: 1; } }

/* A film of scanlines over everything, barely there. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(231, 233, 236, 0.02) 0 1px, transparent 1px 3px);
}

::selection { background: var(--accent); color: var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 2px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
i { font-style: normal; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

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

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  --gutter: clamp(20px, 5vw, 40px);
}

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--bg);
  font: 600 0.875rem/1 var(--font-mono);
  border-radius: var(--radius-s);
  transform: translateY(-200%);
}
.skip:focus { transform: none; outline-color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 46px;
  padding: 0 18px;
  font: 600 0.875rem/1 var(--font-mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-arrow {
  display: inline-block;
  min-width: 3ch;
  text-align: left;
  transition: transform 0.35s var(--ease-out), letter-spacing 0.35s var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary:active { background: var(--ink); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-s { min-height: 44px; padding: 0 14px; font-size: 0.8125rem; }
@media (hover: hover) {
  .btn:hover .btn-arrow { transform: translateX(4px); letter-spacing: 0.08em; }
}
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] .btn-arrow { transform: none; letter-spacing: 0; text-align: center; }

/* ---------- header ---------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.site-head.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.head-row { display: flex; align-items: center; gap: 18px; height: 68px; }
.head-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 600 1.0625rem/1 var(--font-mono);
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand-mark { flex: none; overflow: visible; }
.brand-mark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  a.brand:hover .brand-mark path { animation: vg-mark 0.9s var(--ease-out); }
}
@keyframes vg-mark { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 0.75rem/1 var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
}
.chip-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.chip-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--signal);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .chip-dot::after { animation: vg-ping 2.4s var(--ease-out) infinite; }
}
@keyframes vg-ping { 0% { transform: scale(0.4); opacity: 0.9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

.lang { display: inline-flex; align-items: center; font: 500 0.8125rem/1 var(--font-mono); color: var(--ink-4); }
html:not(.js) .lang { display: none; }
.lang-btn {
  min-width: 36px;
  min-height: 44px;
  padding: 0 6px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.btn-label-short { display: none; }

@media (max-width: 760px) {
  .chip { display: none; }
}
@media (max-width: 520px) {
  .head-row { gap: 8px; height: 60px; }
  .head-end { gap: 4px; }
  .btn-label-long { display: none; }
  .btn-label-short { display: inline; }
  .site-head .btn-arrow { display: none; }
}

/* ---------- section rail (wide screens only) ---------- */
.rail { display: none; }
@media (min-width: 1440px) {
  .js .rail {
    position: fixed;
    left: 26px;
    top: 50%;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transform: translateY(-50%);
    font: 500 0.6875rem/1 var(--font-mono);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }
  .js .rail.is-on { opacity: 1; pointer-events: auto; }
  .rail a { display: flex; align-items: center; gap: 10px; height: 30px; color: var(--ink-3); transition: color 0.2s; }
  .rail a::before { content: ""; width: 10px; height: 1px; background: var(--ink-4); transition: width 0.35s var(--ease-out), background-color 0.2s; }
  .rail-name { padding: 4px 6px; margin-left: -6px; background: var(--bg); opacity: 0; transform: translateX(-4px); transition: opacity 0.25s, transform 0.25s var(--ease-out); white-space: nowrap; }
  .rail a:hover, .rail a.is-active { color: var(--ink); }
  .rail a.is-active::before { width: 26px; background: var(--accent); }
  .rail a:hover .rail-name, .rail a:focus-visible .rail-name { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}
.hero-scene, .hero-fallback { position: absolute; inset: 0; z-index: 0; }
.hero-fallback {
  background-image: radial-gradient(circle at center, color-mix(in srgb, var(--ink-4) 55%, transparent) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 46% 60% at 72% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 60% at 72% 50%, #000 0%, transparent 100%);
  transition: opacity 0.8s;
}
.hero.has-scene .hero-fallback { opacity: 0; }
.hero-orb {
  position: absolute;
  top: 50%;
  right: max(3vw, calc((100vw - 1200px) / 2));
  transform: translateY(-50%);
  font: 500 clamp(9px, 0.92vw, 13px)/1 var(--font-mono);
  letter-spacing: 0;
  color: var(--accent);
  opacity: 0.62;
  white-space: pre;
  user-select: none;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 95%, transparent) 30%, color-mix(in srgb, var(--bg) 84%, transparent) 44%, color-mix(in srgb, var(--bg) 36%, transparent) 54%, transparent 68%),
    linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 9%, transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 16%);
}
.hero-wrap { position: relative; z-index: 2; padding-block: 112px 104px; pointer-events: none; }
/* hero.js draws its mass on the right half: the text keeps to the left 46% of the viewport. */
.hero-content {
  max-width: min(560px, calc(46vw - max(var(--gutter), (100vw - 1120px) / 2)));
  pointer-events: auto;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 26px;
  font: 500 0.8125rem/1.4 var(--font-mono);
  color: var(--ink-3);
}
.eyebrow-tag { color: var(--accent); }
.eyebrow-sep { color: var(--ink-4); }

.hero-title {
  font: 600 clamp(2.2rem, 1.2rem + 3.2vw, 3.5rem)/1.06 var(--font-mono);
  letter-spacing: -0.045em;
  word-spacing: -0.16em;
  color: var(--ink);
  text-wrap: balance;
}
.hero-title::after {
  content: "_";
  margin-left: 0.08em;
  color: var(--signal);
  font-weight: 500;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-title::after { animation: vg-caret 1.1s steps(1, end) infinite; }
}
@keyframes vg-caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

.hero-lead {
  margin-top: 26px;
  max-width: 33.5em;
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  padding: 6px 10px;
  transform: translateX(-50%);
  font: 500 0.6875rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-3);
  transition: color 0.2s;
}
.scroll-cue:hover { color: var(--ink); }
.scroll-cue-art { display: flex; flex-direction: column; align-items: center; line-height: 0.95; color: var(--ink-4); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue-art i { animation: vg-cue 1.8s var(--ease-in-out) infinite; }
  .scroll-cue-art i:nth-child(2) { animation-delay: 0.15s; }
  .scroll-cue-art i:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes vg-cue { 0%, 100% { color: var(--ink-4); } 40% { color: var(--accent); } }
@media (max-height: 700px), (max-width: 760px) {
  .scroll-cue { display: none; }
}

/* Hero entrance, played once the boot overlay is gone. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.is-ready) .hero-content > * { opacity: 0; }
  .js.is-ready .hero-content > * { animation: vg-rise 0.9s var(--ease-out) both; }
  .js.is-ready .hero-content > :nth-child(2) { animation-delay: 0.07s; }
  .js.is-ready .hero-content > :nth-child(3) { animation-delay: 0.16s; }
  .js.is-ready .hero-content > :nth-child(4) { animation-delay: 0.25s; }
}
@keyframes vg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .hero { align-items: flex-start; }
  .hero-wrap { padding-block: 104px 44svh; }
  .hero-content { max-width: 620px; }
  .hero-scrim {
    background:
      linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 95%, transparent) 50%, color-mix(in srgb, var(--bg) 86%, transparent) 70%, color-mix(in srgb, var(--bg) 42%, transparent) 82%, transparent 94%),
      linear-gradient(0deg, var(--bg) 0%, transparent 12%);
  }
  .hero-fallback {
    -webkit-mask-image: radial-gradient(ellipse 80% 34% at 50% 82%, #000 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 34% at 50% 82%, #000 0%, transparent 100%);
  }
  .hero-orb { top: auto; bottom: -4svh; right: 50%; transform: translateX(50%); font-size: clamp(7px, 2.1vw, 11px); opacity: 0.5; }
}
@media (max-width: 520px) {
  .hero-wrap { padding-block: 92px 38svh; }
  .eyebrow { margin-bottom: 20px; font-size: 0.75rem; }
  .eyebrow-tag, .eyebrow-sep { display: none; }
  .hero-lead { margin-top: 20px; font-size: 1rem; }
}

/* ---------- waitlist form ---------- */
.wl { margin-top: 34px; max-width: 560px; }
.wl-row {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wl-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.wl-field { display: flex; align-items: center; flex: 1; min-width: 0; }
.wl-prompt { flex: none; padding: 0 2px 0 12px; font: 600 1rem/1 var(--font-mono); color: var(--accent); }
.wl-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--ink);
  font: 500 1rem/1 var(--font-mono);
  letter-spacing: -0.01em;
  outline: none;
  caret-color: var(--signal);
}
.wl-input::placeholder { color: var(--ink-3); opacity: 1; }
.wl-input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px var(--surface) inset; caret-color: var(--signal); }
.wl.is-error .wl-row { border-color: var(--bad); }
.wl.is-error .wl-row:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.wl-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.wl-submit { flex: none; }

.wl-done {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 16px;
  border: 1px dashed var(--accent-line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
  font: 500 0.9375rem/1.35 var(--font-mono);
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow: hidden;
}
.wl-done:focus { outline: none; }
.wl-done-mark { flex: none; color: var(--accent-strong); white-space: nowrap; }
.wl-done-text { min-width: 0; }
.wl-done-wind { flex: none; margin-left: auto; color: var(--accent); white-space: pre; opacity: 0.8; }
@media (prefers-reduced-motion: no-preference) {
  .wl-done { animation: vg-done 0.6s var(--ease-out) both; }
  .wl-done-wind { animation: vg-gust 2.8s var(--ease-in-out) infinite; }
}
@keyframes vg-done { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes vg-gust { 0% { transform: translateX(-10px); opacity: 0; } 30% { opacity: 0.85; } 100% { transform: translateX(10px); opacity: 0; } }

.wl-foot { display: grid; margin-top: 12px; min-height: 1.5em; font: 500 0.8125rem/1.5 var(--font-mono); letter-spacing: -0.01em; }
.wl-foot > * { grid-area: 1 / 1; }
.wl-note { color: var(--ink-3); transition: opacity 0.2s; }
.wl-msg { color: var(--bad); }
.wl-msg:empty { display: none; }
.wl.is-error .wl-note { visibility: hidden; }
.wl-noscript { margin-top: 8px; font: 500 0.8125rem/1.5 var(--font-mono); color: var(--signal); }

.wl-center { margin-inline: auto; }
.wl-center .wl-foot { justify-items: center; text-align: center; }

@media (max-width: 560px) {
  .wl-row { flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; }
  .wl-row:focus-within { box-shadow: none; }
  .wl-field {
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .wl-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  .wl.is-error .wl-row:focus-within { box-shadow: none; }
  .wl.is-error .wl-field { border-color: var(--bad); }
  .wl.is-error .wl-field:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
  .wl-input { height: 52px; }
  .wl-submit { min-height: 52px; width: 100%; font-size: 0.9375rem; }
  .wl-foot { min-height: 3em; }
  .wl-done { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 8px 12px; min-height: 114px; }
  .wl-done-wind { grid-column: 2; margin-left: 0; justify-self: start; }
}

/* ---------- sections ---------- */
.sec { position: relative; padding-block: clamp(56px, 7vw, 96px); }
.sec-tag {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 44px);
  font: 500 0.8125rem/1 var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
}
.sec-tag::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent 85%); }
.sec-num { color: var(--accent); }
.sec-tag-center { justify-content: center; }
.sec-tag-center::after { display: none; }

.sec-title {
  max-width: 19em;
  font: 600 clamp(1.6rem, 1.05rem + 2.1vw, 2.5rem)/1.12 var(--font-mono);
  letter-spacing: -0.04em;
  word-spacing: -0.14em;
  color: var(--ink);
  text-wrap: balance;
}
.sec-title-wide { max-width: 24em; white-space: pre-line; }
.sec-p { max-width: 36em; margin-top: 22px; text-wrap: pretty; }
.sec-p + .sec-p { margin-top: 14px; }
.sec-p-lead { margin-top: 0; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem); max-width: 37em; }

/* reveal on scroll: only once main.js has put .js on <html> */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- 01 what it is ---------- */
.what-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
.kit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; max-width: 30em; font: 500 0.8125rem/1 var(--font-mono); color: var(--ink-2); }
.kit li { display: inline-flex; align-items: center; gap: 0.6em; height: 30px; padding: 0 10px; border: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; transition: border-color 0.2s, color 0.2s; }
.kit li::before { content: "+"; color: var(--accent); }
.kit li:hover { border-color: var(--accent-line); color: var(--ink); }

/* fx.js builds a terminal of fixed height: 406 px under 580 px of width, 504 px above. Reserve the same. */
.term-slot { position: relative; min-height: 406px; }
@media (min-width: 1200px) { .term-slot { min-height: 504px; } }
.term-fallback {
  display: flex;
  flex-direction: column;
  min-height: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 50%, var(--bg)));
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); font: 500 0.75rem/1 var(--font-mono); color: var(--ink-3); }
.term-dots { color: var(--ink-4); letter-spacing: 0.05em; }
.term-pre { flex: 1; padding: 18px 16px; font: 500 0.8125rem/1.75 var(--font-mono); color: var(--ink-2); white-space: pre; overflow: hidden; }
.term-pre .c-p { color: var(--ink-4); }
.term-pre .c-a { color: var(--accent); }
.term-caret { color: var(--signal); }
@media (prefers-reduced-motion: no-preference) { .term-caret { animation: vg-caret 1.1s steps(1, end) infinite; } }

@media (max-width: 900px) {
  .what-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 650px) and (max-width: 900px) {
  .term-slot { min-height: 504px; }
}

/* ---------- wind dividers ---------- */
.wind { position: relative; height: 160px; overflow: hidden; }
.wind:empty::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line-strong) 50%, var(--line) 80%, transparent);
}
@media (max-width: 600px) { .wind { height: 120px; } }

/* ---------- 02 autonomy ---------- */
.loop-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-top: 30px;
}
.loop-aside {
  padding: 2px 0 2px 18px;
  border-left: 1px solid var(--accent-line);
  font: 500 0.875rem/1.6 var(--font-mono);
  letter-spacing: -0.01em;
  color: var(--ink-3);
  text-wrap: pretty;
}
@media (max-width: 860px) {
  .loop-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

.pipe { margin-top: clamp(40px, 6vw, 68px); }
/* Room for the diagram is reserved while fx.js loads, so nothing below moves when it mounts. */
.pipe-slot { position: relative; width: 100%; }
.js .pipe-slot { min-height: 380px; }
@media (max-width: 860px) { .js .pipe-slot { min-height: 820px; } }
.js .pipe.is-fallback .pipe-slot, .js .pipe.is-mounted .pipe-slot { min-height: 0; }

/* The list is the diagram's text equivalent.
   Without JavaScript: a plain readable list. With the diagram: hidden from sight, kept for assistive tech.
   Without the diagram (fx.js missing): a row of stages you can point at. */
.pipe-list { display: grid; gap: 10px; font: 500 0.8125rem/1.5 var(--font-mono); color: var(--ink-2); }
.pipe-list li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 16px; align-items: baseline; }
.pipe-name { color: var(--accent); white-space: nowrap; }
.pipe-desc { font: 400 0.9375rem/1.5 var(--font-ui); color: var(--ink-2); }
@media (max-width: 600px) { .pipe-list li { grid-template-columns: minmax(0, 1fr); } }

.js .pipe:not(.is-fallback) .pipe-list,
.js .pipe.is-fallback .pipe-desc {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.js .pipe.is-fallback .pipe-list { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px 0; line-height: 1; }
.js .pipe.is-fallback .pipe-list li { display: flex; align-items: center; cursor: default; }
.js .pipe.is-fallback .pipe-list li + li::before { content: "-->"; padding: 0 10px; color: var(--ink-4); }
.js .pipe.is-fallback .pipe-name {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.js .pipe.is-fallback li:hover .pipe-name,
.js .pipe.is-fallback li:focus-visible .pipe-name,
.js .pipe.is-fallback li.is-on .pipe-name { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.js .pipe.is-fallback li:focus-visible { outline: none; }
.js .pipe.is-fallback li[data-stage="agent"] .pipe-name,
.js .pipe.is-fallback li[data-stage="world"] .pipe-name { border-style: dashed; background: none; }
.js .pipe.is-fallback .pipe-list li[data-stage="kill"] { flex-basis: 100%; }
.js .pipe.is-fallback .pipe-list li[data-stage="kill"]::before { content: "[ ! ]"; padding: 0 10px 0 0; color: var(--ink-3); }

/* Our hint line: used with the fallback list, or with a diagram that has no hint of its own. */
.pipe-hint {
  display: none;
  align-items: baseline;
  gap: 14px;
  min-height: 4.6em;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font: 500 0.875rem/1.55 var(--font-mono);
  letter-spacing: -0.01em;
}
.js .pipe.is-fallback .pipe-hint,
.js .pipe.is-mounted:not(.has-own-hint) .pipe-hint { display: flex; }
.pipe-hint-key { flex: none; min-width: 7.5em; color: var(--accent); }
.pipe-hint-key::before { content: "> "; color: var(--ink-4); }
.pipe-hint-text { color: var(--ink-2); max-width: 62em; }
@media (max-width: 600px) {
  .pipe-hint { flex-direction: column; gap: 4px; min-height: 7.4em; }
}

/* ---------- 03 the parts ---------- */
.parts-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 5vw, 72px); align-items: end; }
.parts-head .sec-p { margin-top: 0; }
@media (max-width: 860px) {
  .parts-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: clamp(36px, 5vw, 56px); }
.cards > li { display: flex; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 14px 20px 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2) 0%, color-mix(in srgb, var(--bg-2) 35%, var(--bg)) 100%);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out), border-color 0.3s;
}
.card.is-tilting { transition: transform 0.12s linear, border-color 0.3s; }
/* a border that lights along the pointer */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), var(--accent), transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.35s;
}
/* corner marks: four "+" drawn with gradients */
.card::after {
  content: "";
  position: absolute;
  inset: -6px;
  pointer-events: none;
  --c: var(--ink-3);
  background:
    linear-gradient(var(--c), var(--c)) 0 5px / 11px 1px,
    linear-gradient(var(--c), var(--c)) 5px 0 / 1px 11px,
    linear-gradient(var(--c), var(--c)) 100% 5px / 11px 1px,
    linear-gradient(var(--c), var(--c)) calc(100% - 5px) 0 / 1px 11px,
    linear-gradient(var(--c), var(--c)) 0 calc(100% - 5px) / 11px 1px,
    linear-gradient(var(--c), var(--c)) 5px 100% / 1px 11px,
    linear-gradient(var(--c), var(--c)) 100% calc(100% - 5px) / 11px 1px,
    linear-gradient(var(--c), var(--c)) calc(100% - 5px) 100% / 1px 11px;
  background-repeat: no-repeat;
}
@media (hover: hover) {
  .card:hover::before { opacity: 1; }
  .card:hover::after { --c: var(--accent); }
  .card:hover .card-num { color: var(--accent-strong); }
}

.card-glyph { position: relative; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 14px; overflow: hidden; }
/* Static placeholders, shown only without JavaScript or when glyphs.js could not load. */
html:not(.js) .card-glyph:empty, .no-glyphs .card-glyph:empty { display: grid; place-items: center; }
.card-glyph:empty::before {
  white-space: pre;
  font: 500 clamp(10px, 1.05vw, 12px)/1.35 var(--font-mono);
  color: var(--ink-3);
  text-align: left;
}
html:not(.js) .card-glyph[data-glyph="broker"]:empty::before, .no-glyphs .card-glyph[data-glyph="broker"]:empty::before  { content: "           +-----+\A · · · --> | = = | --> ·\A · · · --> | = = | -->\A · · · --> | = = | --> ·\A           +-----+"; }
html:not(.js) .card-glyph[data-glyph="vault"]:empty::before, .no-glyphs .card-glyph[data-glyph="vault"]:empty::before   { content: "+---------------+\A|  .---------.  |\A|  |   (o)   |  |\A|  |    |    |  |\A|  '---------'  |\A+---------------+"; }
html:not(.js) .card-glyph[data-glyph="sandbox"]:empty::before, .no-glyphs .card-glyph[data-glyph="sandbox"]:empty::before { content: "+ - - - - - - - +\A¦   +-------+   ¦\A¦   | > _   |   ¦\A¦   +-------+   ¦\A+ - - - - - - - +"; }
html:not(.js) .card-glyph[data-glyph="memory"]:empty::before, .no-glyphs .card-glyph[data-glyph="memory"]:empty::before  { content: "# memory.md\A- rule  ........\A- skill ........\A- agent ........\A\A[ git ]  [ fts ]"; }
html:not(.js) .card-glyph[data-glyph="scheduler"]:empty::before, .no-glyphs .card-glyph[data-glyph="scheduler"]:empty::before { content: "*   *   *   *   *\A|   |   |   |   |\A+---+---+---+---+--> run\A\A  00:00  ok\A  00:05  ok"; }
html:not(.js) .card-glyph[data-glyph="portable"]:empty::before, .no-glyphs .card-glyph[data-glyph="portable"]:empty::before { content: "[ amd64 ]     [ arm64 ]\A    |             ^\A    +-- export ---+\A        import"; }

.card-tag { padding-top: 14px; border-top: 1px solid var(--line); font: 500 0.75rem/1 var(--font-mono); color: var(--ink-3); }
.card-num { color: var(--accent); transition: color 0.3s; }
.card-title { margin-top: 14px; font: 600 1.0625rem/1.3 var(--font-mono); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.card-text { margin-top: 10px; font-size: 0.9688rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* ---------- 04 data sheet ---------- */
.spec {
  display: grid;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: clamp(28px, 4.5vw, 60px);
  margin-top: clamp(32px, 5vw, 52px);
  padding-block: 14px;
  border-block: 1px solid var(--line);
  font: 500 0.875rem/1.4 var(--font-mono);
  letter-spacing: -0.01em;
}
.spec-row { display: flex; align-items: baseline; min-width: 0; padding: 11px 0; }
.spec dt { display: flex; align-items: baseline; flex: 1; min-width: 0; color: var(--ink-3); white-space: nowrap; }
.spec dt::after { content: ""; flex: 1; min-width: 14px; margin: 0 10px; border-bottom: 1px dotted var(--ink-4); transform: translateY(-3px); }
.spec dd { flex: none; color: var(--ink); white-space: pre; }
.spec dd.is-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--signal); transform: translateY(-1px); }
@media (max-width: 980px) {
  .spec { grid-template-rows: repeat(6, auto); }
}
@media (max-width: 620px) {
  .spec { grid-template-rows: none; grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
  .spec-row { padding: 10px 0; }
}

/* ---------- 05 access ---------- */
.cta { overflow: hidden; padding-block: clamp(96px, 13vw, 176px) clamp(88px, 11vw, 150px); text-align: center; isolation: isolate; }
.cta-wind { position: absolute; inset: 0; z-index: -2; }
.cta-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 56% 62% at 50% 52%, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 55%, transparent 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 80%, var(--bg) 100%);
}
.cta-title {
  margin-inline: auto;
  max-width: 14em;
  font: 600 clamp(2.1rem, 1rem + 5vw, 4.4rem)/1.03 var(--font-mono);
  letter-spacing: -0.05em;
  word-spacing: -0.16em;
  color: var(--ink);
  text-wrap: balance;
}
.cta-lead { max-width: 30em; margin: 24px auto 0; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); text-wrap: balance; }
.cta .wl { margin-top: 38px; text-align: left; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; min-height: 84px; padding-block: 16px; }
.brand-foot { font-size: 0.9375rem; color: var(--ink-2); }
.brand-foot .brand-mark path { stroke: var(--ink-3); }
.foot-copy { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 500 0.75rem/1.4 var(--font-mono); color: var(--ink-3); }
.foot-sep { color: var(--ink-4); }
.site-foot .lang { margin-left: auto; }

/* ---------- boot overlay (created by main.js, never present in the HTML) ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--accent-line);
  transition: transform 0.46s var(--ease-in-out);
  will-change: transform;
}
.boot.is-out { transform: translateY(-101%); }
.boot-pre {
  font: 500 0.8125rem/1.85 var(--font-mono);
  letter-spacing: -0.01em;
  color: var(--ink-3);
  white-space: pre;
}
.boot-pre b { font-weight: 500; color: var(--accent); }
.boot-pre em { font-style: normal; color: var(--ink); }
.boot-caret { color: var(--signal); animation: vg-caret 0.7s steps(1, end) infinite; }
