/* CodeRight — pitch site. Blueprint register: engineering schematic, condensed + mono + one serif moment.
   Tokens from the b-blueprint direction. No Inter, no gradients, no rounded-card-in-card. */

:root {
  --bg: #0E0F11;
  --bg-2: #101214;
  --grid: rgba(150, 170, 190, .055);
  --grid-strong: rgba(150, 170, 190, .11);
  --panel: #14161A;
  --panel-2: #171A1F;
  --inset: #0A0B0D;
  --text: #E9ECF0;
  --muted: #AEB6C0;
  --faint: #8893A0;
  --copper: #CB7B45;
  --copper-2: #D88a55;
  /* lighter copper for SMALL text only (keeps ~6:1 on dark; full copper is reserved for
     large display text + fills where near-black text sits on it). WCAG fix. */
  --copper-text: #DE9663;
  --copper-soft: rgba(203, 123, 69, .15);
  --steel: #88A6BE;
  --sage: #84B58E;
  --line: rgba(150, 170, 190, .16);
  --line-soft: rgba(150, 170, 190, .09);
  --cond: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'Cascadia Mono', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
}
::selection { background: var(--copper-soft); }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--copper); }

/* visible keyboard focus (WCAG 2.4.7) — copper ring, never removed */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--copper-2);
  outline-offset: 3px;
}
.mono { font-family: var(--mono); }
.steel { color: var(--steel); }
.sage { color: var(--sage); }
.copper { color: var(--copper); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

.skip-link { position: absolute; left: -9999px; background: var(--copper); color: #160e08; padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 12px; top: 12px; }

/* ---- nav ---- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(14, 15, 17, .86); backdrop-filter: blur(9px); border-bottom: 1px solid var(--line-soft); }
.nav { display: flex; align-items: center; gap: 16px; height: 60px; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .01em; font-size: 15px; color: var(--text); }
.brand .mk { width: 14px; height: 14px; border: 1.5px solid var(--copper); border-radius: 3px; position: relative; }
.brand .mk::after { content: ""; position: absolute; inset: 3px; background: var(--copper); }
.brand b { color: var(--copper-text); font-weight: 700; }
.nav-links { display: flex; gap: 22px; margin-left: 14px; }
.nav-links a { color: var(--faint); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.nav-links a:hover { color: var(--text); }
.nav-sp { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--cond); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: 14px; padding: 9px 18px; border: 1px solid var(--line); color: var(--muted); cursor: pointer; background: transparent; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--panel); color: var(--text); }
.btn.go { background: var(--copper); border-color: var(--copper); color: #160e08; font-weight: 700; }
.btn.go:hover { background: var(--copper-2); color: #160e08; }
.btn.lg { padding: 12px 24px; font-size: 15px; }

/* ---- section scaffolding ---- */
section { padding: 80px 0; border-top: 1px solid var(--line-soft); position: relative; }
.secnum { font-family: var(--mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.secnum::before { content: ""; width: 26px; height: 1px; background: var(--copper); opacity: .7; }
h2 { font-family: var(--cond); font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.0; letter-spacing: .01em; margin: 0 0 18px; }
h2 .c { color: var(--copper); }
.lede { color: var(--muted); font-size: 16px; max-width: 62ch; margin: 0; }

/* ---- hero ---- */
.hero { padding: 56px 0 40px; border-top: none; }
.hero-top { display: flex; align-items: flex-start; gap: 24px; }
.kick { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
h1 { font-family: var(--cond); font-weight: 700; text-transform: uppercase; font-size: clamp(40px, 6.2vw, 86px); line-height: .94; letter-spacing: .005em; margin: 12px 0 0; }
h1 .c { color: var(--copper); }
.hero-sub { color: var(--muted); font-size: 16px; margin-top: 18px; max-width: 64ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.specbar { margin-left: auto; text-align: right; font-size: 12px; color: var(--faint); line-height: 2.1; border-left: 1px solid var(--line-soft); padding-left: 20px; white-space: nowrap; }
.specbar b { color: var(--steel); font-weight: 500; }

.diagram { margin-top: 40px; border: 1px solid var(--line-soft); background: rgba(10, 11, 13, .5); padding: 18px 8px; }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.node { fill: var(--panel); stroke: rgba(150, 170, 190, .24); }
.node.live { stroke: var(--copper); filter: drop-shadow(0 0 7px var(--copper-soft)); }
.nlabel { font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; fill: var(--text); }
.nrole { font-family: var(--cond); font-weight: 600; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; fill: var(--text); }
.nmodel { font-family: var(--mono); font-size: 9.5px; fill: var(--steel); }
.ndetail { font-family: var(--mono); font-size: 9.5px; fill: var(--faint); }
.nstat { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.nstat.ok { fill: var(--sage); } .nstat.rej { fill: var(--copper); }
.trace { stroke: rgba(150, 170, 190, .3); stroke-width: 1.4; fill: none; }
.flow { stroke: var(--copper); stroke-width: 1.8; fill: none; stroke-dasharray: 5 9; animation: dash 1.5s linear infinite; }
.loop { stroke: var(--copper); stroke-width: 1.4; fill: none; stroke-dasharray: 3 6; opacity: .8; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.tag { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; fill: var(--faint); }
.tag.c { fill: var(--copper); }
.secdiv { font-family: var(--cond); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; fill: var(--faint); }

/* ---- thesis (the one serif moment) ---- */
.thesis { text-align: left; padding: 96px 0; }
.thesis .q { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5.2vw, 72px); line-height: 1.05; letter-spacing: -.01em; max-width: 18ch; margin: 0; }
.thesis .q .em { color: var(--copper); font-style: italic; }
.thesis .by { margin-top: 26px; color: var(--faint); font-size: 13px; letter-spacing: .04em; }

/* ---- the ladder (category positioning) ---- */
.ladder { display: flex; flex-direction: column; gap: 0; margin-top: 44px; border: 1px solid var(--line-soft); }
.rung { display: grid; grid-template-columns: 200px 1fr 220px; gap: 24px; padding: 22px 26px; border-bottom: 1px solid var(--line-soft); align-items: center; position: relative; }
.rung:last-child { border-bottom: none; }
.rung .who { font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 18px; color: var(--text); }
.rung .who .ex { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: none; color: var(--faint); margin-top: 4px; }
.rung .what { color: var(--muted); font-size: 14px; }
.rung .gap { font-size: 12px; color: var(--faint); text-align: right; }
.rung .gap .x { color: var(--copper-text); }
.rung.cr { background: #1A1512; border-left: 2px solid var(--copper); }
.rung.cr .who { color: var(--text); }
.rung.cr .who .ex { color: var(--copper-text); }
.rung.cr .what { color: var(--text); }
.rung.cr .gap { color: var(--sage); }
.rung .tier { position: absolute; left: -1px; top: -1px; font-family: var(--mono); font-size: 10px; color: var(--faint); padding: 3px 7px; border: 1px solid var(--line-soft); border-top: none; border-left: none; }

/* ---- runtime steps / cards (grouped, no rounded-box-in-box) ---- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 44px; border: 1px solid var(--line-soft); }
.cell { padding: 28px 26px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.cell:nth-child(3n) { border-right: none; }
.cell .n { font-family: var(--mono); font-size: 12px; color: var(--copper-text); letter-spacing: .1em; }
.cell h3 { font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 19px; margin: 12px 0 8px; }
.cell p { color: var(--muted); font-size: 13.5px; margin: 0; }
.cell p .hl { color: var(--text); }

/* ---- stat row ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 40px; border: 1px solid var(--line-soft); }
.stat { padding: 26px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: none; }
.stat .v { font-family: var(--cond); font-weight: 700; font-size: 34px; color: var(--copper); line-height: 1; }
.stat .l { font-size: 12px; color: var(--faint); margin-top: 8px; }

/* ---- evolution loop strip ---- */
.evo { margin-top: 40px; border: 1px solid var(--line-soft); padding: 24px 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; }
.evo .lbl { font-family: var(--cond); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); font-size: 13px; }
.evo .step { color: var(--muted); }
.evo .arr { color: var(--faint); }
.evo .win { color: var(--sage); }

/* ---- governance list ---- */
.guards { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line-soft); }
.guard { display: flex; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); align-items: baseline; }
.guard:nth-child(2n) { border-right: none; }
.guard .k { color: var(--copper); font-size: 13px; flex: none; }
.guard .t { color: var(--muted); font-size: 13.5px; }

/* ---- waitlist / ask ---- */
.ask { text-align: center; padding: 96px 0; }
.ask h2 { margin-bottom: 16px; }
.ask .lede { margin: 0 auto 30px; }
.wl-card { max-width: 480px; margin: 0 auto; border: 1px solid var(--line); background: var(--panel); padding: 26px; text-align: left; }
.wl-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.wl-row label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.wl-row input, .wl-row textarea { font: inherit; font-size: 14px; padding: 11px 13px; border: 1px solid var(--line); background: var(--inset); color: var(--text); width: 100%; }
.wl-row input::placeholder, .wl-row textarea::placeholder { color: var(--faint); }
.wl-row input:focus, .wl-row textarea:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.wl-row textarea { min-height: 78px; resize: vertical; }
.wl-card .btn.go { width: 100%; }
.wl-help { font-size: 12px; color: var(--faint); margin: 8px 0 0; }
.wl-status { font-size: 13px; margin: 12px 0 0; min-height: 1.2em; color: var(--sage); }
.wl-status.error { color: var(--copper); }
.wl-step-two { display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.wl-step-two.visible { display: block; }
.invest { margin-top: 18px; font-size: 12.5px; color: var(--faint); }
.invest a { color: var(--steel); }
.ask-close { font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); line-height: 1.15; color: var(--muted); margin: 56px auto 0; max-width: 22ch; }
.ask-close .em { color: var(--copper); font-style: italic; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line-soft); padding: 40px 0; color: var(--faint); font-size: 13px; }
.foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.foot-links a { color: var(--faint); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.foot-links a:hover { color: var(--copper); }
.foot-fine { margin-top: 16px; font-size: 12px; color: var(--faint); }

/* ---- responsive ---- */
@media (max-width: 920px) {
  /* keep the schematic legible: render at full width + let it scroll, never crush the text */
  .diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 14px; }
  .diagram svg { min-width: 760px; }
  .hero-top { flex-direction: column; }
  .specbar { margin-left: 0; border-left: none; padding-left: 0; text-align: left; }
  .cols { grid-template-columns: 1fr; }
  .cell { border-right: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: none; }
  .rung { grid-template-columns: 1fr; gap: 10px; }
  .rung .gap { text-align: left; }
  .guards { grid-template-columns: 1fr; }
  .guard { border-right: none; }
  .nav-links { display: none; }
}
