/* =========================================================
   QualityFour — design tokens
   Deliberately single dark theme: data-center at night.
   ========================================================= */
:root {
  color-scheme: dark;
  --ink: #070a12;
  --ink-2: #0b1020;
  --surface: #0e1322;
  --surface-2: #141a2d;
  --line: rgba(160, 180, 230, 0.12);
  --line-strong: rgba(160, 180, 230, 0.24);
  --text: #eaf0ff;
  --muted: #8c97b2;
  --dim: #5b6580;
  --ice: #5ce1e6;
  --violet: #7b61ff;
  --amber: #ffb547;
  --ok: #4ade80;
  --grad: linear-gradient(100deg, var(--ice), var(--violet));

  --f-display: "Syne", "Arial Black", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.2rem, 1.5rem + 2.8vw, 4.2rem);
  --step-5: clamp(2.6rem, 1.2rem + 4.6vw, 6.2rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ice); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* Eyebrow label */
.eyebrow {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: var(--step--1);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ice);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--ice); box-shadow: 0 0 12px var(--ice); border-radius: 2px; }

/* ---------------------------------------------------------
   WebGL canvas + atmosphere
   --------------------------------------------------------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.06;
  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='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(0,0)} }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(3,5,10,0.7) 100%); }
main, .site-footer { position: relative; z-index: 2; }

/* ---------------------------------------------------------
   Preloader + page curtain
   --------------------------------------------------------- */
.preloader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: grid; place-items: center; transition: opacity .6s var(--ease), visibility .6s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { display: grid; gap: 18px; justify-items: center; }
.preloader__grid { display: grid; grid-template-columns: repeat(2, 22px); gap: 6px; }
.preloader__grid span { width: 22px; height: 22px; border: 1.5px solid var(--ice); border-radius: 4px; animation: pl 1.2s var(--ease) infinite; }
.preloader__grid span:nth-child(2) { animation-delay: .15s; }
.preloader__grid span:nth-child(3) { animation-delay: .45s; }
.preloader__grid span:nth-child(4) { animation-delay: .3s; border-color: var(--violet); }
@keyframes pl { 0%,100%{ background: transparent; transform: scale(1);} 50%{ background: currentColor; color: var(--ice); transform: scale(.82);} }
.preloader__count { font-family: var(--f-mono); font-size: var(--step--1); color: var(--muted); letter-spacing: .2em; font-variant-numeric: tabular-nums; }

.curtain { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.curtain span { background: var(--surface); transform: scaleY(0); transform-origin: bottom; border-right: 1px solid var(--line); }
.curtain span:nth-child(odd) { background: var(--ink-2); }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); }

/* ---------------------------------------------------------
   Cursor
   --------------------------------------------------------- */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 80; pointer-events: none; border-radius: 50%; translate: -50% -50%; }
.cursor { width: 6px; height: 6px; background: var(--ice); }
.cursor-ring { width: 38px; height: 38px; border: 1px solid rgba(92,225,230,.5); transition: width .3s var(--ease), height .3s var(--ease), background .3s, border-color .3s; display: grid; place-items: center; }
.cursor-ring.is-hover { width: 72px; height: 72px; background: rgba(92,225,230,.08); border-color: var(--ice); }
.cursor-ring__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--ice); opacity: 0; transition: opacity .2s; text-transform: uppercase; }
.cursor-ring.is-hover .cursor-ring__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-ring { display: none; } }
@media (hover: hover) and (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .4s, backdrop-filter .4s, border-color .4s, transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(7,10,18,.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; }
.logo b { color: var(--ice); font-weight: 800; }
.nav__links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(14,19,34,.5); }
.nav__links a { display: block; padding: 8px 16px; border-radius: 999px; font-size: .92rem; color: var(--muted); transition: color .25s, background .25s; }
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--ink); background: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; font-family: var(--f-mono); font-size: .74rem; }
.lang button { padding: 5px 10px; border-radius: 999px; color: var(--muted); letter-spacing: .08em; }
.lang button[aria-pressed="true"] { background: var(--ice); color: var(--ink); }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.menu-open .burger span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: rgba(7,10,18,.96); backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
  clip-path: circle(0% at calc(100% - 44px) 36px); transition: clip-path .8s var(--ease); visibility: hidden;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 44px) 36px); visibility: visible; }
.mobile-menu a { font-family: var(--f-display); font-size: clamp(2.2rem, 11vw, 4rem); font-weight: 700; line-height: 1.15; display: flex; align-items: baseline; gap: 14px; }
.mobile-menu a small { font-family: var(--f-mono); font-size: .8rem; color: var(--ice); font-weight: 400; }
.mobile-menu__foot { margin-top: 40px; color: var(--muted); font-family: var(--f-mono); font-size: .8rem; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  --bg: var(--text); --fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px; border-radius: 999px; background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: .98rem; overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: color .4s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad); transform: translateY(101%); transition: transform .5s var(--ease); border-radius: inherit; }
.btn:hover::before { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px) rotate(-45deg); }
.btn--ghost { --bg: transparent; --fg: var(--text); border: 1px solid var(--line-strong); }
.btn--ghost:hover { color: var(--ink); }
.btn--sm { padding: 10px 18px; font-size: .88rem; }
.magnetic { will-change: transform; }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */
.section { padding-block: clamp(80px, 12vw, 160px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vw, 100px); }
.section__head { display: grid; gap: 20px; max-width: 820px; margin-bottom: clamp(40px, 6vw, 80px); }
.section__head h2 { font-size: var(--step-4); }
.section__head p { color: var(--muted); font-size: var(--step-1); max-width: 62ch; }
.section__head--split { max-width: none; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 40px; }
.panel-bg { background: linear-gradient(180deg, rgba(7,10,18,0) 0%, rgba(7,10,18,.86) 12%, rgba(7,10,18,.9) 88%, rgba(7,10,18,0) 100%); }
.solid-bg { background: var(--ink); }

/* Hero */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--header-h) + 40px); padding-bottom: 60px; position: relative; }
.hero__content { display: grid; gap: 28px; max-width: 900px; }
.hero h1 { font-size: var(--step-5); font-weight: 700; letter-spacing: -0.03em; line-height: .98; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hero__lead { font-size: var(--step-1); color: var(--muted); max-width: 54ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero--page h1 { font-size: var(--step-4); }
.hero__meta {
  position: absolute; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: var(--step--1); color: var(--muted); letter-spacing: .06em;
}
.hero__meta ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; }
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue i { width: 1px; height: 44px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ice); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

.tag { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--f-mono); font-size: .74rem; color: var(--muted); letter-spacing: .06em; background: rgba(14,19,34,.6); }
.tag b { color: var(--ice); font-weight: 500; }

/* Marquee */
.marquee { border-block: 1px solid var(--line); background: rgba(7,10,18,.8); overflow: hidden; padding-block: 22px; position: relative; z-index: 2; }
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { font-family: var(--f-display); font-size: var(--step-2); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; color: var(--muted); }
.marquee__item::after { content: "◆"; font-size: .5em; color: var(--ice); }
.marquee__item em { font-style: normal; color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Story (morph) */
.story { position: relative; }
.story__step { min-height: 100svh; display: flex; align-items: center; }
.story__card {
  max-width: 480px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius);
  background: rgba(14,19,34,.62); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; gap: 16px;
}
.story__step:nth-child(odd) .story__card { margin-left: auto; }
.story, .stages { overflow-x: clip; }
.story__num { font-family: var(--f-mono); color: var(--ice); font-size: var(--step--1); letter-spacing: .14em; }
.story__card h3 { font-size: var(--step-3); }
.story__card p { color: var(--muted); }
.story__card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-family: var(--f-mono); font-size: .84rem; color: var(--text); }
.story__card li { display: flex; gap: 10px; }
.story__card li::before { content: "→"; color: var(--ice); }
.story__rail { position: fixed; right: var(--gutter); top: 50%; translate: 0 -50%; z-index: 3; display: grid; gap: 14px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.story__rail.is-on { opacity: 1; }
.story__rail span { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: .7rem; color: var(--dim); letter-spacing: .1em; justify-content: flex-end; }
.story__rail span::after { content: ""; width: 18px; height: 2px; background: var(--dim); transition: width .4s var(--ease), background .4s; }
.story__rail span.is-active { color: var(--ice); }
.story__rail span.is-active::after { width: 40px; background: var(--ice); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 32px 24px 8px 0; display: grid; gap: 8px; border-right: 1px solid var(--line); padding-left: 24px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--f-display); font-size: var(--step-4); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat__num small { font-size: .45em; color: var(--ice); margin-left: 4px; letter-spacing: 0; }
.stat__label { color: var(--muted); font-size: .92rem; }

/* Generic grid + cards */
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; padding: clamp(24px, 2.6vw, 36px); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20,26,45,.82), rgba(14,19,34,.82));
  border: 1px solid var(--line); display: grid; gap: 14px; align-content: start; overflow: hidden;
  transform-style: preserve-3d; transition: border-color .4s;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { font-size: var(--step-2); }
.card p { color: var(--muted); }
.card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(92,225,230,.08); border: 1px solid rgba(92,225,230,.25); color: var(--ice); }
.card__icon svg { width: 26px; height: 26px; }
.card__kicker { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.card__glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(92,225,230,.14), transparent 45%); opacity: 0; transition: opacity .4s; }
.card:hover .card__glare { opacity: 1; }
.tilt { will-change: transform; }
.card ul.specs { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; font-size: .9rem; }
.card ul.specs li { display: flex; justify-content: space-between; gap: 12px; }
.card ul.specs li span:first-child { color: var(--muted); }
.card ul.specs li span:last-child { font-family: var(--f-mono); font-size: .82rem; text-align: right; }

/* Audience cards */
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
.who .card { align-content: start; gap: 28px; }
.who__big { font-family: var(--f-display); font-size: 4.2rem; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line-strong); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(200px, auto); gap: clamp(14px, 2vw, 20px); }
.bento .card:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.bento .card:nth-child(2) { grid-column: span 2; }
.bento .card:nth-child(3) { grid-column: span 2; }
.bento .card:nth-child(4) { grid-column: span 2; }
.bento .card:nth-child(5) { grid-column: span 2; }
.bento .card:nth-child(6) { grid-column: span 2; }
.bento__vis { margin-top: auto; display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; }
.bento__vis i { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); transition: background .3s, box-shadow .3s; }
.bento__vis i.on { background: var(--ice); box-shadow: 0 0 10px rgba(92,225,230,.6); border-color: transparent; }
.bento__vis i.on2 { background: var(--violet); box-shadow: 0 0 10px rgba(123,97,255,.6); border-color: transparent; }
.big-num { font-family: var(--f-display); font-size: var(--step-4); font-weight: 700; line-height: 1; }

/* Terminal */
.terminal-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.terminal { border-radius: var(--radius); border: 1px solid var(--line-strong); background: #060912; overflow: hidden; box-shadow: 0 40px 120px -40px rgba(92,225,230,.35); }
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .74rem; color: var(--dim); }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); }
.terminal__bar span { margin-left: auto; }
.terminal pre { margin: 0; padding: 22px; min-height: 340px; font-family: var(--f-mono); font-size: clamp(.72rem, .68rem + .2vw, .86rem); line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: var(--muted); overflow-x: auto; }
.terminal .c-cmd { color: var(--text); }
.terminal .c-ok { color: var(--ok); }
.terminal .c-ice { color: var(--ice); }
.terminal .c-amb { color: var(--amber); }
.terminal .caret { display: inline-block; width: .6em; height: 1.1em; background: var(--ice); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.checklist li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 6px; border: 1px solid rgba(92,225,230,.4); background: rgba(92,225,230,.1) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235ce1e6' stroke-width='3'><path d='M5 12l5 5 9-10'/></svg>") center/14px no-repeat; }
.checklist b { display: block; font-weight: 600; }
.checklist span { color: var(--muted); font-size: .95rem; }

/* CTA */
.cta { text-align: center; display: grid; justify-items: center; gap: 28px; padding-block: clamp(100px, 14vw, 200px); }
.cta h2 { font-size: var(--step-5); font-weight: 700; letter-spacing: -.035em; line-height: .95; }
.cta p { color: var(--muted); font-size: var(--step-1); max-width: 52ch; }
.cta .btn { padding: 22px 40px; font-size: 1.1rem; }

/* Manifesto (scroll fill words) */
.manifesto { font-family: var(--f-display); font-size: var(--step-3); font-weight: 600; line-height: 1.18; letter-spacing: -.02em; max-width: 26ch; }
.manifesto .w { color: rgba(234,240,255,.14); transition: color .3s; }
.manifesto .w.is-lit { color: var(--text); }
.manifesto .w.is-lit.hl { color: var(--ice); }

/* Four qualities */
.four { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.four__item { padding: clamp(24px, 2.6vw, 36px); display: grid; gap: 14px; align-content: start; border-right: 1px solid var(--line); background: rgba(14,19,34,.7); position: relative; min-height: 340px; transition: background .5s; }
.four__item:last-child { border-right: 0; }
.four__item:hover { background: rgba(20,26,45,.95); }
.four__q { font-family: var(--f-display); font-weight: 800; font-size: 5rem; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--ice); transition: color .5s; }
.four__item:hover .four__q { color: var(--ice); }
.four__item h3 { font-size: var(--step-2); margin-top: auto; }
.four__item p { color: var(--muted); font-size: .95rem; }

/* Timeline (day of a file) */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline__fill { position: absolute; left: 118px; top: 8px; width: 1px; height: 0; background: var(--grad); box-shadow: 0 0 12px var(--ice); }
.timeline__row { display: grid; grid-template-columns: 100px 36px 1fr; gap: 0 0; padding-block: 22px; align-items: start; }
.timeline__time { font-family: var(--f-mono); font-size: .86rem; color: var(--ice); padding-top: 4px; text-align: right; padding-right: 0; }
.timeline__dot { justify-self: center; width: 12px; height: 12px; margin-top: 8px; border-radius: 50%; background: var(--ink); border: 2px solid var(--ice); position: relative; z-index: 1; margin-left: 0; }
.timeline__row h3 { font-size: var(--step-1); font-family: var(--f-body); font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.timeline__row p { color: var(--muted); max-width: 60ch; }
.timeline__row code { font-family: var(--f-mono); font-size: .8rem; color: var(--amber); }

/* Regions */
.regions { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.hq { padding: clamp(28px, 3vw, 44px); border-radius: var(--radius); border: 1px solid rgba(92,225,230,.35); background: radial-gradient(circle at 100% 0%, rgba(92,225,230,.14), transparent 60%), rgba(14,19,34,.85); display: grid; gap: 16px; }
.hq h3 { font-size: var(--step-3); }
.hq dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 8px 0 0; font-size: .95rem; }
.hq dt { font-family: var(--f-mono); font-size: .76rem; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.hq dd { margin: 0; }
.region-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.region-list li { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: padding .4s var(--ease), color .3s; }
.region-list li:hover { padding-left: 12px; color: var(--ice); }
.region-list li span:first-child { font-family: var(--f-display); font-size: var(--step-1); font-weight: 600; }
.region-list li span:last-child { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }

/* Compliance badges */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(14,19,34,.7); font-family: var(--f-mono); font-size: .82rem; }
.badge svg { width: 18px; height: 18px; color: var(--ice); }

/* Tabs */
.tabs { display: grid; grid-template-columns: 320px 1fr; gap: clamp(20px, 4vw, 56px); align-items: start; }
.tabs__list { display: grid; gap: 4px; position: sticky; top: calc(var(--header-h) + 24px); }
.tabs__btn { text-align: left; padding: 16px 18px; border-radius: 12px; color: var(--muted); display: flex; gap: 14px; align-items: baseline; border: 1px solid transparent; transition: background .3s, color .3s, border-color .3s; }
.tabs__btn small { font-family: var(--f-mono); font-size: .72rem; color: var(--dim); }
.tabs__btn:hover { color: var(--text); background: rgba(20,26,45,.6); }
.tabs__btn[aria-selected="true"] { color: var(--text); background: rgba(20,26,45,.9); border-color: var(--line-strong); }
.tabs__btn[aria-selected="true"] small { color: var(--ice); }
.tabs__panel { padding: clamp(24px, 3.2vw, 48px); border-radius: var(--radius); border: 1px solid var(--line); background: rgba(14,19,34,.85); display: grid; gap: 22px; min-height: 460px; }
.tabs__panel h3 { font-size: var(--step-3); }
.tabs__panel > p { color: var(--muted); font-size: var(--step-1); max-width: 60ch; }
.tabs__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tabs__cols h4 { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; font-weight: 500; margin-bottom: 12px; }
.tabs__cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tabs__cols li { display: flex; gap: 10px; }
.tabs__cols li::before { content: "+"; color: var(--ice); font-family: var(--f-mono); }
.tabs__meter { display: grid; gap: 10px; }
.meter { display: grid; grid-template-columns: 150px 1fr 60px; gap: 14px; align-items: center; font-size: .88rem; }
.meter span:first-child { color: var(--muted); }
.meter__bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.meter__bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; width: 0; transition: width 1.2s var(--ease); }
.meter span:last-child { font-family: var(--f-mono); font-size: .8rem; text-align: right; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); align-items: stretch; }
.plan { padding: clamp(28px, 3vw, 40px); border-radius: var(--radius); border: 1px solid var(--line); background: rgba(14,19,34,.85); display: grid; gap: 20px; align-content: start; position: relative; }
.plan--featured { border-color: rgba(92,225,230,.5); background: radial-gradient(circle at 50% 0%, rgba(92,225,230,.16), transparent 60%), rgba(14,19,34,.95); }
.plan__badge { position: absolute; top: 20px; right: 20px; }
.plan h3 { font-size: var(--step-2); }
.plan__cap { font-family: var(--f-display); font-size: var(--step-3); font-weight: 700; line-height: 1; }
.plan__cap small { font-size: .4em; color: var(--muted); font-family: var(--f-body); font-weight: 400; margin-left: 6px; }
.plan ul { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: .95rem; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.plan li::before { content: "✓"; color: var(--ice); }
.plan li.off { color: var(--dim); }
.plan li.off::before { content: "–"; color: var(--dim); }
.plan .btn { justify-content: center; margin-top: auto; }

/* Integrations cloud */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9rem; background: rgba(14,19,34,.7); transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.chip:hover { background: var(--ice); color: var(--ink); border-color: var(--ice); transform: translateY(-3px); }

/* Stages (pipeline page) */
.stages { position: relative; }
.stage { min-height: 90svh; display: flex; align-items: center; }
.stage__card { max-width: 520px; display: grid; gap: 18px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); background: rgba(14,19,34,.7); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stage:nth-child(even) .stage__card { margin-left: auto; }
.stage__card h3 { font-size: var(--step-3); }
.stage__card p { color: var(--muted); }
.stage__io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stage__io div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .86rem; }
.stage__io b { display: block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; color: var(--dim); font-weight: 500; margin-bottom: 4px; text-transform: uppercase; }

/* Horizontal tracks */
.hscroll { position: relative; overflow: hidden; }
.hscroll__track { display: flex; gap: clamp(16px, 2vw, 28px); padding-inline: var(--gutter); width: max-content; }
.track-card { width: min(440px, 80vw); flex-shrink: 0; min-height: 520px; padding: clamp(26px, 3vw, 40px); border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(20,26,45,.95), rgba(10,14,26,.95)); display: grid; gap: 18px; align-content: start; position: relative; overflow: hidden; }
.track-card__n { font-family: var(--f-display); font-size: 6rem; font-weight: 800; line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(92,225,230,.5); }
.track-card h3 { font-size: var(--step-2); }
.track-card p { color: var(--muted); }
.track-card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.track-card ul { margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 8px; font-size: .92rem; }
.track-card li::before { content: "→ "; color: var(--ice); }
.track-card--end { background: var(--grad); color: var(--ink); align-content: center; justify-items: start; }
.track-card--end h3 { font-size: var(--step-3); }
.track-card--end p { color: rgba(7,10,18,.75); }
.track-card--end .btn { --bg: var(--ink); --fg: var(--text); }

/* Formats */
.formats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.format { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; background: rgba(14,19,34,.75); display: grid; place-content: center; text-align: center; gap: 6px; transition: border-color .3s, transform .4s var(--ease); }
.format:hover { border-color: var(--ice); transform: translateY(-6px) rotateX(10deg); }
.format b { font-family: var(--f-mono); font-size: 1.05rem; color: var(--text); font-weight: 500; }
.format span { font-size: .74rem; color: var(--dim); }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 26px 0; font-family: var(--f-display); font-size: var(--step-1); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; transition: transform .4s var(--ease), background .3s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--text); translate: -50% -50%; }
.faq summary i::after { rotate: 90deg; transition: rotate .4s var(--ease); }
.faq details[open] summary i { background: var(--ice); border-color: var(--ice); }
.faq details[open] summary i::before, .faq details[open] summary i::after { background: var(--ink); }
.faq details[open] summary i::after { rotate: 0deg; }
.faq .faq__a { padding: 0 0 26px; color: var(--muted); max-width: 70ch; }

/* Contact form */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.form { display: grid; gap: 16px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); border: 1px solid var(--line); background: rgba(14,19,34,.88); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--ink-2); color: var(--text); font: inherit; font-size: .98rem; transition: border-color .3s, box-shadow .3s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 4px rgba(92,225,230,.12); }
.form__note { font-size: .88rem; color: var(--muted); min-height: 1.4em; }
.form__note.is-ok { color: var(--ok); }
.contact__info { display: grid; gap: 22px; }
.contact__line { display: grid; gap: 4px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.contact__line small { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.contact__line span { font-size: var(--step-1); user-select: all; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--ink); padding-top: clamp(60px, 8vw, 100px); padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__grid h4 { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__grid a { color: var(--muted); transition: color .3s; }
.footer__grid a:hover { color: var(--ice); }
.footer__about p { color: var(--muted); max-width: 36ch; margin-top: 16px; }
.footer__giant { font-family: var(--f-display); font-weight: 800; font-size: clamp(3.4rem, 17vw, 17rem); line-height: .8; letter-spacing: -.05em; margin-top: 60px; color: transparent; -webkit-text-stroke: 1px var(--line-strong); white-space: nowrap; user-select: none; background: linear-gradient(90deg, var(--ice), var(--violet)) no-repeat; background-size: var(--fill, 0%) 100%; -webkit-background-clip: text; background-clip: text; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: .76rem; color: var(--dim); }

/* Reveal helpers (visible by default; JS animates FROM hidden) */
.split-line { display: block; overflow: hidden; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .burger { display: inline-block; }
  .nav__actions .btn { display: none; }
  .grid--4, .four { grid-template-columns: repeat(2, 1fr); }
  .four__item:nth-child(2) { border-right: 0; }
  .four__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .bento .card:nth-child(1) { grid-column: span 2; }
  .tabs { grid-template-columns: 1fr; }
  .tabs__list { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; }
  .formats { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .story__rail { display: none; }
}
@media (max-width: 820px) {
  .grid--3, .grid--2, .who, .plans, .terminal-wrap, .regions, .contact, .section__head--split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
  .who .card { min-height: 0; }
  .tabs__cols { grid-template-columns: 1fr; }
  .meter { grid-template-columns: 110px 1fr 48px; }
  .story__card, .stage__card { max-width: none; }
  .story__step:nth-child(odd) .story__card, .stage:nth-child(even) .stage__card { margin-left: 0; }
  .hero__meta { position: static; margin-top: 48px; }
  .hero { flex-direction: column; justify-content: center; align-items: stretch; }
}
@media (max-width: 560px) {
  .grid--4, .four, .bento, .formats { grid-template-columns: 1fr 1fr; }
  .four { grid-template-columns: 1fr; }
  .four__item { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .bento .card:nth-child(n) { grid-column: span 2; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .timeline::before, .timeline__fill { left: 78px; }
  .timeline__row { grid-template-columns: 60px 36px 1fr; }
  .timeline__time { font-size: .76rem; }
  .stage__io { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .track-card { min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee__track { animation: none; }
}
