@font-face { font-family: Geist; src: url(fonts/Geist-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
/* Third Peg landing. Tokens per design brief §2; glass ladder §3; motion §4. */
/* Tokens: the same design system as the internal dashboard (lab/library/templates/base.html). */
:root {
  color-scheme: light;
  --bg: #f4f4f6; --card: #ffffff; --bd: #e5e5e9; --tx: #15151a; --mut: #70707a; --sub: #f6f6f8;
  --or: #ef5a1d; --orbg: #fdeee7; --or-text: #c2410c;
  --pos: #159a47; --posbg: #e6f5ea; --neg: #df3f3a; --negbg: #fdeaea; --am: #b3731a; --ambg: #fdf1da;
  --glass-bg: rgba(255,255,255,.8); --glass-solid: rgba(255,255,255,.96); --glass-rim: rgba(255,255,255,.9);
  --shadow-float: 0 8px 28px rgba(21,21,26,.07);
  --dot: rgba(21,21,26,.09);
  /* legacy aliases used across this sheet */
  --canvas: var(--bg); --canvas-alt: var(--bg); --surface: var(--card);
  --hairline: var(--bd); --hairline-soft: var(--bd); --glass-edge: var(--bd);
  --ink: var(--tx); --ink-2: var(--mut);
  --accent: var(--or); --accent-text: var(--or-text); --focus: var(--or);
  --pass: var(--pos); --fail: var(--neg);
  --font: Geist, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 17px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 80px; --s-9: 128px;
  --gutter: 16px; --max: 1200px;
  --r-chip: 999px; --r-card: 20px; --r-stage: 20px; --r-pill: 9999px;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --ease-inout: cubic-bezier(.65,0,.35,1);
  --spring-snappy: linear(0, 0.1752, 0.4734, 0.7228, 0.8833, 0.9685, 1.0047, 1.0148, 1.0136, 1.0093, 1.0051, 1.0023, 1.0008, 1, 0.9998, 0.9998, 0.9998, 0.9999, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
  --spring-soft: linear(0, 0.1135, 0.3188, 0.5143, 0.6693, 0.7818, 0.8592, 0.9108, 0.9442, 0.9655, 0.9789, 0.9872, 0.9923, 0.9954, 0.9972, 0.9984, 0.999, 0.9994, 0.9997, 0.9998, 0.9999, 0.9999, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
}
/* No JS: follow the system. With JS, js-flag.js always sets data-theme (manual choice or system). */
@media (prefers-color-scheme: dark) { :root:not([data-theme]) {
  --bg: #121316; --card: #1b1c20; --bd: #2b2c32; --tx: #ececef; --mut: #9a9ba4; --sub: #23242a;
  --orbg: #3b2114; --or-text: #ff8a57;
  --pos: #3ecb6d; --posbg: #153420; --neg: #f4726d; --negbg: #3d1c1c; --am: #e3a63d; --ambg: #3b2f14;
  --glass-bg: rgba(27,28,32,.62); --glass-solid: rgba(27,28,32,.96); --glass-rim: rgba(255,255,255,.07);
  --shadow-float: 0 10px 30px rgba(0,0,0,.35);
  --dot: rgba(255,255,255,.07);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #121316; --card: #1b1c20; --bd: #2b2c32; --tx: #ececef; --mut: #9a9ba4; --sub: #23242a;
  --orbg: #3b2114; --or-text: #ff8a57;
  --pos: #3ecb6d; --posbg: #153420; --neg: #f4726d; --negbg: #3d1c1c; --am: #e3a63d; --ambg: #3b2f14;
  --glass-bg: rgba(27,28,32,.62); --glass-solid: rgba(27,28,32,.96); --glass-rim: rgba(255,255,255,.07);
  --shadow-float: 0 10px 30px rgba(0,0,0,.35);
  --dot: rgba(255,255,255,.07);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 17px/1.5 var(--font); letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.5vw, 56px); line-height: 1.08; letter-spacing: -0.035em; }
h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 var(--s-4); max-width: 68ch; text-wrap: pretty; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.num, b { font-variant-numeric: tabular-nums; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; margin: 0; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.defs { position: absolute; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: var(--r-pill); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 734px) { .wrap { padding: 0 var(--s-6); } }
.narrow { max-width: 820px; }
.center { text-align: center; margin-inline: auto; }
.sec { position: relative; padding: clamp(80px, 11vw, 140px) 0; background: var(--bg); }
.sec.alt { background: var(--bg); border-top: 1px solid var(--bd); }
.h-display { margin-bottom: var(--s-5); }
.sub { color: var(--ink-2); font-size: clamp(19px, 1.8vw, 24px); line-height: 1.3; letter-spacing: .004em; margin-bottom: var(--s-7); }
.sub.center { max-width: 40ch; }
.strong { font-weight: 600; color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 1px solid var(--tx); border-radius: var(--r-pill);
  background: var(--tx); color: var(--card);
  font: 600 16px/1 var(--font); letter-spacing: -0.015em; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 450ms var(--ease-spring), background-color .2s, box-shadow .3s;
}
@supports (transition-timing-function: linear(0, 1)) {
  .btn { transition: transform 450ms var(--spring-snappy), background-color .2s, box-shadow .3s; }
}
.btn:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(21,21,26,.18); }
.btn:active { transform: scale(.95); transition: transform 80ms ease-out; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 18px; }
.btn.ghost { background: var(--card); color: var(--tx); border-color: var(--bd); }
.btn.ghost:hover { border-color: var(--tx); box-shadow: none; }
.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--bd); background: var(--card); font-weight: 600; font-size: 16px; color: var(--tx); position: relative; transition: border-color .2s; }
.link:hover { border-color: var(--tx); }
.link::after { display: none; content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-inout); }
.link:hover { text-decoration: none; }
.link:hover::after { transform: scaleX(1); }

/* ---------- glass ladder ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass-solid);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-rim), var(--shadow-float);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
}
.glass::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, var(--glass-rim), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass-card { border-radius: var(--r-card); overflow: hidden; }
.card { position: relative; background: var(--card); border: 1px solid var(--bd); border-radius: var(--r-card); overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), var(--orbg), transparent 65%); opacity: 0; transition: opacity .3s; }
.card:hover::after { opacity: .7; }
.card > * { position: relative; z-index: 1; }
.glass-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--orbg), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.glass-card:hover::after { opacity: 1; }
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) { .glass { border: 2px solid currentColor; background: var(--glass-solid); } }
@media (forced-colors: active) {
  .glass { background: Canvas; border: 1px solid CanvasText; }
  .glass::before, .glass::after { display: none; }
}

/* ---------- nav ---------- */
.nav { position: fixed; top: 10px; left: 0; right: 0; z-index: 50; padding: 0 10px; pointer-events: none; }
.nav-pill {
  pointer-events: auto; margin: 0 auto; max-width: 1060px; height: 52px; padding: 0 8px 0 18px;
  display: flex; align-items: center; gap: 16px; border-radius: var(--r-pill);
  color: var(--tx);
  transition: max-width .5s var(--ease-out), height .5s var(--ease-out);
}
.nav.scrolled .nav-pill { max-width: 860px; height: 46px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; line-height: 1; color: inherit; letter-spacing: -0.02em; min-height: 44px; }
/* logo: one SVG used as a mask, so it takes the text color in both themes */
.brandmark { display: block; height: 40px; aspect-ratio: 309 / 176; background: currentColor;
  -webkit-mask: url(img/third-peg.svg) center / contain no-repeat; mask: url(img/third-peg.svg) center / contain no-repeat; }
.foot-brand .brandmark { height: 56px; }
.nav.scrolled .brandmark { height: 34px; }
@media (forced-colors: active) { .brandmark { background: CanvasText; } }
.logo:hover { text-decoration: none; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); color: var(--ink-2); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--card); background: var(--tx); text-decoration: none; }
.nav-act { display: flex; align-items: center; gap: 6px; }
.lang {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; align-items: center; width: 84px; height: 34px; padding: 3px;
  border-radius: var(--r-pill); cursor: pointer; color: var(--tx); font: 600 11px/1 var(--mono); letter-spacing: .06em;
  background: var(--sub); border: 1px solid var(--bd);
}
.btn-icono { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--mut); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn-icono:hover { background: var(--card); border-color: var(--bd); color: var(--tx); }
.btn-icono svg { transition: transform 500ms var(--ease-spring); }
.btn-icono:active svg { transform: rotate(-30deg) scale(.9); }
.btn-icono .i-sol { display: none; }
:root[data-theme="dark"] .btn-icono .i-luna { display: none; }
:root[data-theme="dark"] .btn-icono .i-sol { display: inline-flex; }
.lang-opt { position: relative; z-index: 1; text-align: center; color: var(--ink-2); transition: color .3s; }
.lang-opt:nth-of-type(2) { color: var(--card); }
.lang[aria-checked="true"] .lang-opt:nth-of-type(2) { color: var(--ink-2); }
.lang[aria-checked="true"] .lang-opt:nth-of-type(3) { color: var(--card); }
.lang-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--r-pill);
  background: var(--tx); box-shadow: 0 2px 6px rgba(21,21,26,.18);
  transition: transform 450ms var(--ease-spring);
}
@supports (transition-timing-function: linear(0, 1)) { .lang-thumb { transition: transform 450ms var(--spring-snappy); } }
.lang[aria-checked="true"] .lang-thumb { transform: translateX(100%); }
.lang[aria-busy="true"] .lang-thumb { animation: lpulse 1s ease-in-out infinite alternate; }
@keyframes lpulse { to { opacity: .45; } }
@media (max-width: 1100px) { .nav nav { display: none; } .nav-act { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { background: var(--bg); position: relative; overflow: hidden; min-height: 100svh; padding: 168px 0 var(--s-8); isolation: isolate; }
.dots { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%); }
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 70%, transparent 100%); }
.hero-in { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-title { font-weight: 650; font-size: clamp(44px, 8.6vw, 104px); line-height: 1.02; letter-spacing: -0.045em; margin-bottom: var(--s-5); max-width: 20ch; }
.hero-title .line { display: block; overflow: clip; margin-bottom: -.16em; }
.hero-title .line > span { display: inline-block; padding: 0 .04em .16em; }
.hl { color: var(--or); }
@media (forced-colors: active) { .hl { color: CanvasText; } }
.lede { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.38; color: var(--ink-2); letter-spacing: .002em; max-width: 44ch; margin-bottom: var(--s-6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: center; }
.hero-foot { margin-top: clamp(56px, 8vw, 96px); width: 100%; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: var(--s-7); align-items: end; text-align: left; }
.thesis-box { padding-bottom: var(--s-3); }
.thesis { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; color: var(--ink); font-weight: 650; max-width: 30ch; letter-spacing: -0.01em; }

/* hero entrance (one focal sequence) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .line > span { transform: translateY(108%); animation: rise .9s var(--ease-out) forwards; }
  .js .hero-title .line:nth-child(2) > span { animation-delay: .1s; }
  .js .hero-lede, .js .hero-cta, .js .hero-foot { opacity: 0; animation: fadeup .8s var(--ease-out) forwards; }
  .js .hero-lede { animation-delay: .35s; }
  .js .hero-cta { animation-delay: .5s; }
  .js .hero-foot { animation-delay: .75s; animation-duration: 1.1s; }
}
@keyframes rise { to { transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* verdict slip: a preview of the dashboard's verdict card */
.slip { margin: 0; padding: 22px 24px 18px; color: var(--tx); }
.slip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.slip-head .chip-veredicto { margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.chip-env { color: var(--mut); background: var(--card); border: 1px solid var(--bd); }
.chip-mono { color: var(--mut); background: var(--sub); }
.chip-veredicto { border: 1px solid var(--bd); background: var(--sub); color: var(--mut); }
.slip-name { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 4px; }
.slip-src { font-size: 13px; color: var(--mut); margin-bottom: 12px; }
.slip-gates { list-style: none; margin: 0 0 14px; padding: 0; }
.slip-gates li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--bd); font-size: 14px; font-weight: 500; }
.pildora { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-weight: 600; font-size: 12.5px; line-height: 1.3; background: var(--sub); color: var(--mut); white-space: nowrap; }
.pildora::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pildora.pos { background: var(--posbg); color: var(--pos); }
.slip-why { font-size: 13.5px; color: var(--mut); margin-bottom: 10px; }
.slip-why strong { color: var(--tx); }
.slip-cap { font: 500 11px var(--mono); letter-spacing: .02em; color: var(--mut); }

/* ---------- split layouts + stages ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split-rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.stage { position: relative; margin: 0; padding: clamp(16px, 2.4vw, 28px); border-radius: var(--r-stage); background: var(--card); border: 1px solid var(--bd); }
.stage-light, .stage-dark { background: var(--card); }
.stage figcaption { font-size: 14px; line-height: 1.43; color: var(--ink-2); margin-top: var(--s-3); max-width: 60ch; }
.chart { display: block; width: 100%; height: auto; aspect-ratio: 600 / 380; overflow: visible; }
.chart .grid line { stroke: var(--hairline); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .grid text, .ax-lbl { fill: var(--ink-2); font: 400 13px var(--font); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ax-lbl.acc { fill: var(--or); font-weight: 600; }
.ln { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ln-is { stroke: var(--ink); }
.ln-oos { stroke: var(--or); }
.oos-band { fill: var(--orbg); opacity: .6; }
.divider { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }


/* ---------- scrollytelling ---------- */
.scrolly { padding: 0; }
.scrolly-stage { padding: clamp(80px, 10vw, 120px) 0; }
html.sticky-ok .scrolly { height: calc(var(--steps, 4) * 75vh + 100vh); }
html.sticky-ok .scrolly-stage { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; padding: 80px 0 40px; }
html.sticky-ok #how { --steps: 5; }

/* pipeline */
#how .h-display, #how .sub { text-align: center; margin-inline: auto; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
.flow li { position: relative; padding: 56px 20px 24px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--bd); transition: transform .6s var(--ease-out), box-shadow .6s, opacity .6s; }
.flow .node { position: absolute; top: 20px; left: 20px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bd); background: var(--card); transition: all .5s var(--ease-out); }
.flow h3 { margin-bottom: 8px; }
.flow p { font-size: 15px; line-height: 1.47; color: var(--ink-2); margin: 0; }
html.sticky-ok .flow li { opacity: .45; }
html.sticky-ok .flow li.done { opacity: .85; }
.flow li.on { opacity: 1 !important; transform: translateY(-8px); border-color: var(--tx); box-shadow: 0 18px 40px rgba(21,21,26,.08); }
.flow li.done .node { border-color: var(--tx); background: var(--tx); }
.flow li.on .node { border-color: var(--or); background: var(--or); box-shadow: 0 0 0 6px var(--orbg); }
.rail { position: relative; height: 3px; margin: 28px auto 0; max-width: 100%; border-radius: 3px; background: var(--hairline); overflow: hidden; }
.rail i { position: absolute; inset: 0; background: var(--tx); transform-origin: left; transform: scaleX(var(--p, 1)); }



/* ---------- improve: diagnosis card + three steps ---------- */
.improve-card { max-width: 520px; justify-self: end; width: 100%; }
.pildora.neg { background: var(--negbg); color: var(--neg); }
.pildora.am { background: var(--ambg); color: var(--am); }
.improve-steps { list-style: none; padding: 0; margin: var(--s-8) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.improve-steps li:nth-child(2) { --i: 1; }
.improve-steps li:nth-child(3) { --i: 2; }
.improve-steps li { border-top: 1px solid var(--tx); padding-top: var(--s-5); }
.improve-n { display: block; font: 600 13px var(--mono); color: var(--or-text); margin-bottom: var(--s-4); }
.improve-steps h3 { margin-bottom: var(--s-3); }
.improve-steps p { color: var(--ink-2); font-size: 16px; margin: 0; }
.improve-thesis { margin: var(--s-8) auto 0; max-width: 32ch; text-align: center; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: var(--s-7); perspective: 1000px; }
.cell { padding: clamp(24px, 2.6vw, 36px); color: var(--ink); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease-out), opacity .3s; }
.cell.tilting { transition: transform .12s ease-out; }
.cell h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; margin-bottom: var(--s-4); }
.cell p { font-size: 15.5px; color: var(--mut); }
.cell p:last-child { margin-bottom: 0; }
.cell .strong { color: var(--ink); }
.cell-a { grid-column: span 3; }
.cell-b { grid-column: span 3; }
.cell-c { grid-column: span 6; }
@media (hover: hover) { .bento:has(.cell:hover) .cell:not(:hover) { opacity: .72; } }



/* ---------- who / principles ---------- */
.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: var(--s-7); }
.who li { padding: 32px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--bd); }
.who h3 { font-size: 24px; margin-bottom: 10px; }
.who p { color: var(--ink-2); margin: 0; }
.principles { margin-top: var(--s-6); }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.duo .principles li { grid-template-columns: 1fr; gap: 8px; padding: var(--s-5) 0; }
.duo .principles h3 { font-size: clamp(20px, 1.9vw, 26px); }
.duo .principles p { font-size: 17px; }
.contact-strip { margin-top: var(--s-8); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4) var(--s-5); padding: var(--s-5) var(--s-6); border: 1px solid var(--bd); border-radius: var(--r-card); background: var(--orbg); }
.contact-strip p { margin: 0; font-size: 19px; color: var(--ink-2); }
.contact-strip strong { color: var(--ink); }
.principles li { padding: var(--s-6) 0; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); }
.principles h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.011em; }
.principles p { color: var(--ink-2); font-size: 19px; margin: 0; }

/* ---------- FAQ ---------- */
.faq { margin-top: var(--s-6); }
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 16px 0; font-family: var(--font-display); font-weight: 650; letter-spacing: -0.02em; font-size: clamp(19px, 1.8vw, 22px); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sub); border: 1px solid var(--bd); position: relative; transition: transform .45s var(--ease-out), background-color .2s; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--ink); border-radius: 2px; transition: transform .45s var(--ease-out); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i { transform: rotate(180deg); background: var(--orbg); }
.faq details[open] summary i::after { transform: rotate(0deg); }
.faq .ans p { color: var(--ink-2); padding-bottom: 20px; margin: 0; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
:root { interpolate-size: allow-keywords; }

/* ---------- access dialog ---------- */
html.modal-open { overflow: hidden; }
.modal { border: 0; padding: 0; background: transparent; color: var(--tx); width: calc(100% - 32px); max-width: 520px; max-height: calc(100dvh - 48px); overflow: visible; }
.modal::backdrop { background: rgba(12,12,16,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal .panel { position: relative; max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; padding: 36px 28px 28px; box-shadow: 0 24px 60px rgba(12,12,16,.22); }
.modal .panel::after { display: none; }
.modal .h-display { font-size: clamp(26px, 4vw, 34px); padding-right: 36px; }
.modal .sub { font-size: 17px; margin-bottom: var(--s-5); }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in 520ms var(--ease-spring) both; }
  @supports (transition-timing-function: linear(0, 1)) { .modal[open] { animation-timing-function: var(--spring-soft); } }
  .modal[open]::backdrop { animation: fade-in .25s ease-out both; }
  .modal.closing { animation: modal-out .2s ease-in both; }
  .modal.closing::backdrop { animation: fade-out .2s ease-in both; }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@media (max-width: 480px) {
  .modal { width: 100%; max-width: none; margin: auto 0 0; max-height: 92dvh; }
  .modal .panel { max-height: 92dvh; border-radius: 20px 20px 0 0; border-bottom: 0; padding: 32px 20px calc(24px + env(safe-area-inset-bottom)); }
  @keyframes modal-in { from { transform: translateY(100%); } }
  @keyframes modal-out { to { transform: translateY(100%); } }
}
/* closing band: the trading desk at night behind the last call to action, same in both themes */
.sec.cta-band { isolation: isolate; overflow: hidden; padding: clamp(140px, 18vw, 230px) 0; background: #0c0f18; color: #f4f4f6; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(img/mesa.jpg) center 45% / cover no-repeat; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(75% 70% at 50% 50%, rgba(10,12,20,.5), rgba(10,12,20,.88)); }
.cta-band .h-display { margin-bottom: var(--s-6); color: #fff; max-width: 18ch; margin-inline: auto; }
.cta-band .btn { background: #fff; color: #15151a; border-color: #fff; }
.cta-band .btn:hover { box-shadow: 0 8px 26px rgba(0,0,0,.4); }
.cta-band .nojs { margin: var(--s-5) auto 0; color: rgba(255,255,255,.75); }
.panel { color: var(--ink); }
.panel .h-display { margin-bottom: var(--s-3); }
.panel .sub { margin-bottom: var(--s-6); font-size: 19px; }
form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
form label { display: block; font-size: 14px; font-weight: 600; margin: 18px 0 8px; color: var(--ink); }
form input[type=email], form input[type=text], form select, form textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--bd); background: var(--card); color: var(--tx);
  font: 400 17px/1.3 var(--font); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
form select option { background: var(--card); color: var(--tx); }
form textarea { resize: vertical; min-height: 110px; }
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 4px var(--orbg); }
form [aria-invalid="true"] { border-color: var(--fail) !important; }
.fuse { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: var(--r-pill); border: 1px solid var(--bd); background: var(--sub); transition: border-color .2s, box-shadow .2s; }
.fuse:focus-within { border-color: var(--or); box-shadow: 0 0 0 4px var(--orbg); }
.fuse input[type=email] { flex: 1 1 auto; min-width: 0; width: auto; border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: var(--r-pill); min-height: 44px; }
.fuse .btn { flex: none; }
.err { color: var(--fail); font-size: 14px; margin: 8px 0 0; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tx); flex: none; }
.check label { margin: 0; font-weight: 400; font-size: 15px; color: var(--ink-2); }
#step2 { margin-top: var(--s-5); animation: fadeup .5s var(--ease-out); }
#step2 legend { font-size: 19px; font-weight: 600; padding: 0; }
.count { font-size: 12px; color: var(--ink-2); text-align: right; margin: 6px 0 0; max-width: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s-5); }
.status { margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.status:empty { display: none; }
.status.is-err { color: var(--fail); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#done { text-align: center; padding: var(--s-5) 0; animation: fadeup .6s var(--ease-out); }
.done-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--posbg); color: var(--pos); font-size: 26px; font-weight: 600; margin-bottom: var(--s-4); }
#done h3 { font-size: 28px; margin-bottom: 8px; }
#done p { margin-inline: auto; color: var(--ink-2); }

/* ---------- privacy / footer ---------- */
.privacy { padding: var(--s-8) 0; }
.privacy h2 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: var(--s-5); }
.privacy p { font-size: 15px; color: var(--ink-2); }
.foot { background: var(--card); border-top: 1px solid var(--hairline); padding: var(--s-6) 0 calc(var(--s-8) + env(safe-area-inset-bottom)); font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.foot-in { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-5); align-items: start; }
.foot p { margin: 0; }
.foot-brand { font-weight: 600; color: var(--ink); font-size: 14px; }


/* ---------- reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 5% cover 25%; }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
html.io .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
html.io .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .duo { grid-template-columns: 1fr; gap: var(--s-7); }
  .improve-steps { grid-template-columns: 1fr; gap: var(--s-5); margin-top: var(--s-7); }
  .improve-card { justify-self: start; }
  .flow { grid-template-columns: 1fr; gap: 10px; max-width: 560px; margin: 0 auto; }
  .flow li { padding: 18px 20px 18px 56px; }
  .flow .node { top: 22px; }
  .flow li.on { transform: translateX(6px); }
  .rail { display: none; }
  html.sticky-ok #how { height: auto; }
  html.sticky-ok #how .scrolly-stage { position: relative; min-height: 0; padding: clamp(80px, 10vw, 120px) 0; }
  .split, .split-rev { grid-template-columns: 1fr; }
  .split-rev .stage { order: 2; }
  .hero-foot { grid-template-columns: 1fr; gap: var(--s-6); }
  .slip { max-width: 480px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-a, .cell-b, .cell-c { grid-column: span 2; }
  .who { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-top: 112px; }
  .hero-title { letter-spacing: -0.025em; }
  .bento { grid-template-columns: 1fr; }
  .cell-a, .cell-b, .cell-c { grid-column: auto; }
  .principles li { grid-template-columns: 1fr; gap: 8px; padding: var(--s-5) 0; }
  .who li { padding: 24px; }
  .foot-in { grid-template-columns: 1fr; gap: 12px; }
  .fuse { flex-direction: column; align-items: stretch; gap: 10px; padding: 0; border: 0; background: none; border-radius: 0; }
  .fuse:focus-within { box-shadow: none; }
  .fuse input[type=email] { width: 100%; border: 1px solid var(--bd) !important; background: var(--card) !important; min-height: 48px; padding: 0 18px; }
  .fuse input[type=email]:focus { border-color: var(--or) !important; box-shadow: 0 0 0 4px var(--orbg) !important; }
  .fuse .btn { width: 100%; min-height: 48px; }
  .nav-pill { padding-left: 14px; }
  .ax-lbl { font-size: 16px; }
}
@media (max-width: 420px) { .logo [data-brand] { display: none; } .nav-pill { gap: 8px; padding-left: 12px; padding-right: 6px; } .nav-act .btn-sm { padding: 0 12px; font-size: 13px; } .lang { width: 76px; } }
@media (max-width: 380px) { .nav-act .btn-sm { padding: 0 10px; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .cell { transform: none !important; }
}

/* no-JS: the form only posts through JS, so hide it and explain */
.nojs { color: var(--ink-2); }
.js .nojs { display: none; }
html:not(.js) #waitlist { display: none; }
