/* Octavious page. Loaded after style.css: reuses its colour tokens, nav, pill and waitlist,
   and adds the long-form layout and the 3D simulation stage. */
:root {
  --paper-2: #151412; --card: #1B1A17; --ink-2: #C9C5BC; --line: #2B2A27;
  --signal: #E8703C; --ok: #45B074; --warn: #E0A830; --bad: #E0605A;
  --picker: #5AA9DE; --sorter: #A08AD9; --stage: #14181C; --hud: rgba(23, 25, 28, .84);
  --f-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-serif: 'Instrument Serif', 'Times New Roman', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

body.oct { color: var(--ink); font-family: var(--f-sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.oct *, .oct *::before, .oct *::after { box-sizing: border-box; }
.oct em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* Top bar: same nav as the other pages, kept on screen while scrolling */
.oct-bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em;
  padding: 14px clamp(20px, 4vw, 48px);
}
.nav-sections { display: flex; gap: 22px; }
@media (max-width: 760px) { .nav-sections { display: none; } }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: clamp(20px, 4vw, 48px); padding-right: clamp(20px, 4vw, 48px); }
.eyebrow { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Hero */
.oct-hero { padding-block: 56px 28px; }
.oct-hero h1 {
  font-family: var(--f-sans); font-weight: 500;
  font-size: clamp(2.9rem, 9vw, 6.4rem); line-height: .98; letter-spacing: -.035em;
  margin: 14px 0 0; max-width: none; text-align: left; text-wrap: balance;
}
.oct-hero h1 em { font-size: 1em; letter-spacing: -.01em; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px; margin-top: 22px; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 40ch; margin: 0; color: var(--ink-2); text-wrap: pretty; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .82rem/1 var(--f-mono); padding: 13px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--ink); opacity: 1; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--ink-2); }
.oct :focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* Simulation stage */
.stage { position: relative; height: clamp(560px, 76vh, 840px); background: var(--stage); border-block: 1px solid var(--line); overflow: hidden; }
#viewer { position: absolute; inset: 0; }
#viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; font-family: var(--f-mono); font-size: 10.5px; line-height: 1; padding: 4px 7px; border-radius: 999px; background: var(--hud); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; will-change: transform; }
.lbl.rom { border-color: var(--signal); color: var(--signal); }
.lbl.picker { border-color: var(--picker); }
.lbl.sorter { border-color: var(--sorter); }
.sim-err { position: absolute; inset: auto 14px 70px 14px; z-index: 5; background: var(--card); border: 1px solid var(--bad); color: var(--ink); border-radius: 10px; padding: 12px 14px; font: 12px/1.5 var(--f-mono); }
/* Control deck: floating panels inside the 3D stage */
.deck { position: absolute; z-index: 3; background: var(--hud); border: 1px solid var(--line); border-radius: 14px; padding: 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.deck-title { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 2px 8px; }
.deck-title b { color: var(--ink); font-weight: 500; }
.deck-worlds { top: 14px; left: 14px; }
.deck-stats { top: 14px; right: 14px; }
.deck-views { bottom: 14px; left: 14px; }
.deck-sim { bottom: 14px; right: 14px; display: flex; gap: 6px; padding: 8px; }
.worlds-row { display: grid; grid-template-columns: repeat(4, 84px); gap: 6px; }
.world {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 9px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink-2);
  font: 500 .68rem/1.1 var(--f-mono); cursor: pointer; transition: border-color .15s, transform .15s, color .15s;
}
.world svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.world:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.world[aria-pressed="true"] { border-color: #f2c14e; color: var(--ink); box-shadow: inset 0 0 0 1px #f2c14e; }
.world[aria-pressed="true"] svg { stroke: #f2c14e; }
.counters { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 16px; padding: 10px 14px; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.counters b { font-family: var(--f-sans); font-weight: 500; font-size: 1.1rem; display: block; line-height: 1.1; letter-spacing: -.01em; }
.counters span { font-size: .62rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 .72rem/1 var(--f-mono); padding: 9px 12px; border-radius: 999px; color: var(--ink-2); cursor: pointer; background: var(--card); border: 1px solid var(--line); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (max-width: 900px) { .deck-stats { display: none; } }
@media (max-width: 620px) {
  .worlds-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deck-worlds { right: 14px; }
  .deck-views { right: 14px; bottom: 62px; }
  .deck-views .deck-title { display: none; }
}

/* Sections */
section.band { padding-block: 88px; border-bottom: 1px solid var(--line); }
section.band.alt { background: var(--paper-2); }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; max-width: 62ch; }
.oct h2 { font-family: var(--f-sans); font-weight: 500; font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.02; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.sec-head p, .intro { margin: 0; color: var(--muted); max-width: 52ch; }
.intro { margin-top: 16px; }

.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.mod { padding: 22px 22px 4px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mod + .mod { padding-left: 22px; border-left: 1px solid var(--line); }
.mod .tag, .use .zone { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mod h3 { font-weight: 500; font-size: 1.7rem; margin: 0; line-height: 1; letter-spacing: -.02em; }
.mod p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.spec { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.spec li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.spec li span { color: var(--muted); }
.spec li b { font-family: var(--f-mono); font-weight: 500; text-align: right; }
.foot { margin-top: 18px; font-family: var(--f-mono); font-size: .7rem; color: var(--muted); }
@media (max-width: 860px) {
  .modules { grid-template-columns: minmax(0, 1fr); }
  .mod, .mod + .mod { padding: 22px 0 8px; border-left: 0; }
  .mod + .mod { border-top: 1px solid var(--line); }
}

.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.use { border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; background: var(--card); min-width: 0; }
.use h3 { font-weight: 500; font-size: 1.45rem; margin: 0; line-height: 1.05; letter-spacing: -.015em; }
.use p { margin: 0; color: var(--ink-2); font-size: .95rem; flex: 1; }
.use .btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 760px) { .uses { grid-template-columns: minmax(0, 1fr); } }

.math { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin: 28px 0 24px; }
.figs div { padding: 14px 12px 0 0; }
.figs b { display: block; font-weight: 500; font-size: 2.8rem; line-height: 1; letter-spacing: -.03em; }
.figs span { font-size: .78rem; color: var(--muted); }
.math p { color: var(--ink-2); margin: 0 0 14px; max-width: 58ch; }
.fleet { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.fleet .fh { display: flex; justify-content: space-between; padding: 11px 16px; font-family: var(--f-mono); font-size: .7rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.fleet li.r { display: grid; grid-template-columns: auto minmax(0, 1fr) 72px; gap: 2px 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.fleet li.r:last-child { border-bottom: 0; }
.fleet .dot { width: 8px; height: 8px; border-radius: 50%; grid-row: 1 / span 2; }
.fleet .who { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet .who b { font-family: var(--f-mono); font-weight: 500; margin-right: 6px; }
.fleet .who small { color: var(--muted); }
.fleet .st { grid-column: 2; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet .bt { grid-column: 3; grid-row: 1 / span 2; font-family: var(--f-mono); font-size: .68rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.fleet .bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 5px; }
.fleet .bar span { display: block; height: 100%; }
@media (max-width: 860px) { .math { grid-template-columns: minmax(0, 1fr); } }

/* Waitlist section: reuses the homepage form, left-aligned */
.join { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: end; }
.join .waitlist { margin: 0; width: 100%; max-width: 420px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; animation: none; }
@media (max-width: 860px) { .join { grid-template-columns: minmax(0, 1fr); } }

/* Footer: same line as the other pages */
.oct-footer { padding: 40px clamp(20px, 4vw, 48px) clamp(20px, 3vw, 32px); font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; }
.oct-footer .motto { font-family: var(--f-sans); font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.02em; color: var(--ink); margin: 0 0 22px; }
.oct-footer .note { margin: 0 0 22px; }
.oct-footer .footer { animation: none; }

/* Meet Octavious: studio still with numbered parts */
.meet { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.still { margin: 0; }
.still-frame { position: relative; background: var(--stage); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.still-frame img { display: block; width: 100%; height: auto; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f2c14e; color: #111; border: 2px solid var(--stage);
  font: 500 11px/1 var(--f-mono); letter-spacing: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.still figcaption { margin-top: 12px; font-family: var(--f-mono); font-size: .7rem; color: var(--muted); }
.meet-copy .sec-head { margin-bottom: 28px; }
.parts-group + .parts-group { margin-top: 28px; }
.parts-group h3 { font-weight: 500; font-size: 1.35rem; letter-spacing: -.015em; margin: 0 0 10px; }
.parts-group h3 span { color: var(--muted); font-weight: 400; }
.parts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: part calc(var(--start, 1) - 1); }
.parts[start="5"] { --start: 5; }
.parts li { counter-increment: part; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.parts li::before {
  content: counter(part); width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: #f2c14e; color: #111;
  font: 500 11px/1 var(--f-mono);
}
.parts li span { color: var(--muted); font-size: .82rem; text-align: right; }
@media (max-width: 860px) {
  .meet { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .parts li { grid-template-columns: 24px minmax(0, 1fr); }
  .parts li span { grid-column: 2; text-align: left; }
}

/* System cards: studio render of each module */
.mod-img { margin: 0 0 6px; background: var(--stage); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mod-img { aspect-ratio: 4 / 3; }
.mod-img img { display: block; width: 100%; height: 100%; object-fit: contain; color: transparent; }
