/* Vantage — vendor pitch. MACHINED INSTRUMENT direction.
   Portillo Technologies: black anodized (#0A0A0A) + warm bone (#E8E5E0) + ONE
   signal red (#C7361E) used only for ARMED / ALERT / SENSING. No gradients, no
   soft drop shadows, no pill badges, no glow dots. Söhne Mono carries every
   status readout and model number (hard brand rule). Reads like operating a
   precision device, not a marketing page.

   Brand fonts (Söhne Breit Halbfett / Buch / Mono) are licensed binaries, not
   bundled. Drop the woff2s into /static/fonts/ and uncomment the @font-face block
   to go pixel-exact; the fallbacks below carry the same intent until then. */

/* @font-face { font-family:"Söhne Breit"; src:url('/static/fonts/soehne-breit-halbfett.woff2') format('woff2'); font-weight:600; font-display:swap; }
   @font-face { font-family:"Söhne"; src:url('/static/fonts/soehne-buch.woff2') format('woff2'); font-weight:400; font-display:swap; }
   @font-face { font-family:"Söhne Mono"; src:url('/static/fonts/soehne-mono-buch.woff2') format('woff2'); font-weight:400; font-display:swap; } */

:root {
  --bg:      #0A0A0A;
  --raise:   #0f0f0e;
  --raise-2: #151513;
  --tray:    #060605;
  --line:    #26261f;     /* hairline */
  --line-2:  #38382f;     /* brighter hairline */
  --text:    #E8E5E0;
  --muted:   #8C8782;
  --faint:   #565049;
  --signal:  #C7361E;
  --signal-2:#e85c44;
  --grid:    rgba(232,229,224,0.045);
  --mono: "Söhne Mono", ui-monospace, "SF Mono", "Menlo", monospace;
  --disp: "Söhne Breit", "Helvetica Neue", Arial, sans-serif;
  --body: "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.sig { color: var(--signal); }
h1, h2, h3, .display { font-family: var(--disp); font-weight: 600; letter-spacing: -0.012em; line-height: 1.06; margin: 0; text-wrap: balance; }
a { color: var(--text); text-decoration: none; }
::selection { background: var(--signal); color: #fff; }

/* fixed grain-free instrument frame: faint registration grid over the whole page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 35%, transparent 80%);
}

/* ---- fixed chrome ---------------------------------------------------- */
.chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--disp); font-weight: 600; font-size: 16px; letter-spacing: 0.32em; text-transform: uppercase; padding-left: 0.32em; display: flex; align-items: center; gap: 10px; }
.wordmark .rule { width: 28px; height: 1px; background: var(--line-2); }
.wordmark .sn { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--faint); }
.aud { display: inline-flex; border: 1px solid var(--line); }
.aud button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); background: none; border: 0; border-left: 1px solid var(--line);
  cursor: pointer; padding: 8px 14px; transition: color .4s var(--ease), background .4s var(--ease);
}
.aud button:first-child { border-left: 0; }
.aud button:hover { color: var(--text); }
.aud button[aria-pressed="true"] { color: var(--bg); background: var(--text); }
.chrome .back { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--faint); text-transform: uppercase; }
.chrome .back:hover { color: var(--muted); }

/* ---- section scaffold ----------------------------------------------- */
main { position: relative; z-index: 1; }
section {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 132px 24px 104px; border-bottom: 1px solid var(--line);
}
.idx { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--faint); margin-bottom: 24px; text-transform: uppercase; }
.idx b { color: var(--text); font-weight: 400; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--signal); margin-bottom: 18px; }
.lede { font-size: 19px; color: var(--muted); max-width: 62ch; margin-top: 22px; line-height: 1.6; text-wrap: pretty; }
.fine { font-size: 13px; color: var(--faint); max-width: 66ch; line-height: 1.6; }

/* scroll-reveal */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* status readout pill (no rounded badge — a bracketed mono tag) */
.tag {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); padding: 6px 12px;
}
.tag .led { width: 6px; height: 6px; background: var(--muted); }
.tag.live .led { background: var(--signal); }

/* ---- hero ----------------------------------------------------------- */
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(40px, 7.5vw, 94px); }
.hero .over { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; }
.hero .lede { font-size: clamp(18px, 2.2vw, 23px); color: var(--text); max-width: 50ch; }
.hero .tag { margin-top: 36px; align-self: flex-start; }
.scrollcue { position: absolute; bottom: 30px; left: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--faint); text-transform: uppercase; }

/* ---- pipeline ------------------------------------------------------- */
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--line); margin-top: 14px; }
.pipe .step { padding: 22px 18px; border-left: 1px solid var(--line); }
.pipe .step:first-child { border-left: 0; }
.pipe .step .n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--signal); }
.pipe .step h3 { font-size: 16px; margin: 14px 0 9px; }
.pipe .step p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ============ THE INSTRUMENT (interactive demo) ===================== */
.rig { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0; margin-top: 18px; border: 1px solid var(--line-2); background: var(--tray); }
.rig .pane { padding: 18px; }
.rig .pane.left { border-right: 1px solid var(--line-2); }

/* instrument header bar */
.ihead { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.ihead .node { color: var(--text); }
.ihead .src { display: inline-flex; align-items: center; gap: 7px; }
.ihead .src .led { width: 6px; height: 6px; background: var(--signal); }

/* the stage (oscilloscope) */
.stage-wrap { position: relative; background: #050504; border: 1px solid var(--line); }
.stage-wrap svg { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.corner { position: absolute; width: 10px; height: 10px; border: 1px solid var(--line-2); pointer-events: none; }
.corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* 2D / 3D view toggle */
.viewtoggle { display: inline-flex; border: 1px solid var(--line-2); }
.viewtoggle button { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: none; border: 0; border-left: 1px solid var(--line-2); cursor: pointer; padding: 6px 11px; transition: color .3s var(--ease), background .3s var(--ease); }
.viewtoggle button:first-child { border-left: 0; }
.viewtoggle button:hover { color: var(--text); }
.viewtoggle button[aria-pressed="true"] { color: var(--bg); background: var(--text); }

/* 3D volume container */
.stage3d { width: 100%; aspect-ratio: 600 / 440; background: #050504; }
.stage3d canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-wrap[data-view="3d"] > #stage { display: none; }
.stage-wrap[data-view="2d"] > #stage3d { display: none; }

/* "take it" prompt overlay */
.takeit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; background: rgba(5,5,4,0.74); opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.takeit.show { opacity: 1; pointer-events: auto; }
.takeit .big { font-family: var(--disp); font-size: 30px; letter-spacing: -0.01em; }
.takeit .sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* transport controls */
.transport { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ibtn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--raise-2); color: var(--text); border: 1px solid var(--line-2); cursor: pointer;
  padding: 10px 16px; transition: transform .25s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.ibtn:hover { border-color: var(--muted); }
.ibtn:active { transform: scale(0.97); }
.ibtn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.ibtn.primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.ibtn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* timeline scrubber */
.scrub { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.08em; }
.scrub input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 2px; background: var(--line-2); cursor: pointer; }
.scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--text); border: 0; cursor: grab; }
.scrub input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--text); border: 0; cursor: grab; }
.scrub input[type=range]:active::-webkit-slider-thumb { background: var(--signal); }

/* right pane: readout + zones + scenarios + feed */
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.readout { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); margin-bottom: 18px; }
.readout .row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 13px; border-bottom: 1px solid var(--line); }
.readout .row:last-child { border-bottom: 0; }
.readout .k { color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; }
.readout .v { color: var(--text); }
.readout .v.alert { color: var(--signal); }

.chipset { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--raise);
  padding: 7px 11px; cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--muted); background: var(--raise-2); }
.chip.scenario.on { color: var(--bg); background: var(--text); border-color: var(--text); }
.chip.zone[data-armed="true"] { color: var(--signal); border-color: var(--signal); }
.chip.zone[data-armed="true"]::before { content: "● "; }
.chip.zone[data-armed="false"]::before { content: "○ "; color: var(--faint); }

.feed { border: 1px solid var(--line); max-height: 196px; overflow: auto; }
.feed .none { padding: 13px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.feed .e { padding: 11px 13px; border-bottom: 1px solid var(--line); border-left: 2px solid var(--signal); }
.feed .e:last-child { border-bottom: 0; }
.feed .e .t { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); }
.feed .e .d { font-size: 13px; color: var(--text); margin-top: 4px; }
.feed .e .d .mono { color: var(--muted); }

/* ---- columns / claims ---------------------------------------------- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin-top: 24px; }
.cols.five { grid-template-columns: repeat(5, 1fr); }
.cols .c { padding: 24px 22px; border-left: 1px solid var(--line); }
.cols .c:first-child { border-left: 0; }
.cols .c .n { font-family: var(--mono); color: var(--signal); font-size: 12px; letter-spacing: 0.12em; }
.cols .c h3 { font-size: 17px; margin: 14px 0 9px; }
.cols .c p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.55; }

/* proven vs pending */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 22px; border: 1px solid var(--line); }
.ledger .col { padding: 22px; }
.ledger .col.pending { border-left: 1px solid var(--line); }
.ledger .col h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px; }
.ledger .proven h3 { color: var(--text); }
.ledger .pending h3 { color: var(--signal); }
.ledger ul { margin: 0; padding: 0; }
.ledger li { list-style: none; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); display: flex; gap: 12px; line-height: 1.5; }
.ledger li:last-child { border-bottom: 0; }
.ledger li .mark { font-family: var(--mono); flex: none; }
.ledger .proven li .mark { color: var(--muted); }
.ledger .pending li .mark { color: var(--signal); }
.ledger li small { display: block; color: var(--faint); font-size: 12px; margin-top: 3px; }

/* CTA */
.cta h2 { font-size: clamp(30px, 5vw, 58px); }
.cta .line { margin-top: 28px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cta .addr { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.05em; }

/* audience-conditional blocks */
[data-for]:not(.show) { display: none; }

@media (max-width: 940px) {
  .pipe, .cols, .cols.five { grid-template-columns: 1fr; }
  .pipe .step, .cols .c { border-left: 0; border-top: 1px solid var(--line); }
  .pipe .step:first-child, .cols .c:first-child { border-top: 0; }
  .rig { grid-template-columns: 1fr; }
  .rig .pane.left { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .ledger { grid-template-columns: 1fr; }
  .ledger .col.pending { border-left: 0; border-top: 1px solid var(--line); }
  section { padding: 116px 18px 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
