/* ============================================================
   SIDECHANNEL — "Switchboard" design system
   An engraved front panel / technical spec plate.
   Flat only. No gradients, no glow, no glass.
   ============================================================ */

:root {
  --ink: #0C0F14;
  --panel: #12161D;
  --panel-2: #171C25;
  --line: #232A35;
  --line-strong: #39424F;
  --text: #E8ECF1;
  --text-dim: #B9C1CE;
  --muted: #8B94A3;
  --accent: #4D7CFE;
  --green: #34C77B;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --wrap: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--ink); }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img { display: block; max-width: 100%; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- shared atoms ---------- */

.mono { font-family: var(--font-mono); }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* the jack: a ring terminal on the patch bay */
.jack {
  flex: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  position: relative;
  background: var(--ink);
}
.jack.live { border-color: var(--accent); }
.jack.live::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.jack.green { border-color: var(--green); }
.jack.green::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--green);
}

/* section header: jack — label ——— cord line ——— plate no. */
.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}
.sec-head .rule { flex: 1; height: 1px; background: var(--line); }
.sec-head .plate-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.sec-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.sec-sub {
  color: var(--muted);
  font-size: 16.5px;
  max-width: 62ch;
  margin-bottom: 44px;
}

section { padding: 84px 0; }
section + section { border-top: 1px solid var(--line); }

/* panel plate: hairline frame + corner screws */
.plate {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
}
.screw {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink);
  z-index: 2;
}
.screw::after {
  content: "";
  position: absolute;
  left: 0.5px;
  right: 0.5px;
  top: 50%;
  height: 1px;
  margin-top: -0.5px;
  background: var(--line-strong);
  transform: rotate(38deg);
}
.screw.tl { top: 8px; left: 8px; }
.screw.tr { top: 8px; right: 8px; }
.screw.bl { bottom: 8px; left: 8px; }
.screw.br { bottom: 8px; right: 8px; }

.plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.plate figcaption .fig { color: var(--text-dim); white-space: nowrap; }

/* patch cord divider */
.cord { display: block; width: 100%; height: 76px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-primary { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.btn-primary:hover { background: #3D6BEE; border-color: #3D6BEE; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text-dim); }

/* ---------- top bar ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 60px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.22em;
}
.wordmark .jack { width: 11px; height: 11px; }
.topnav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.topnav a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.topnav a:hover { color: var(--text); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  padding: 6px 12px;
  white-space: nowrap;
}
.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

/* ---------- hero ---------- */

.hero { padding: 76px 0 30px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 60px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--accent); }
.hero .sub {
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.62;
  max-width: 54ch;
  margin-bottom: 34px;
}
.hero .sub strong { color: var(--text-dim); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--line-strong);
}
.hero-shot { margin: 0; }
.hero-shot .frame {
  height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ---------- the board ---------- */

.board-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: start;
}
.directory { border: 1px solid var(--line); background: var(--panel); }
.dir-group-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.dir-group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dir-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 18px;
  border-top: 1px solid transparent;
}
.dir-row:hover { background: var(--panel-2); }
.dir-row .idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  width: 22px;
  flex: none;
}
.dir-row .chan {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.dir-row .chan .hash { color: var(--accent); }
.dir-row .desc {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}
.dir-group { padding-bottom: 12px; }
.dir-group + .dir-group { border-top: 1px solid var(--line); }
.board-shot { margin: 0; position: sticky; top: 24px; }
.board-shot .frame { height: 520px; overflow: hidden; }
.board-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.board-note {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 14px;
  max-width: 46ch;
}
.board-note .jack { margin-top: 5px; }

/* ---------- features ---------- */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 48px;
}
.feat {
  background: var(--ink);
  padding: 30px 28px 32px;
}
.feat .jack { width: 15px; height: 15px; margin-bottom: 20px; }
.feat .jack.live::after { inset: 3.5px; }
.feat h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18.5px;
  letter-spacing: -0.005em;
  margin-bottom: 9px;
}
.feat p { color: var(--muted); font-size: 14.5px; line-height: 1.62; }
.feat p .hl { color: var(--text-dim); }
.feat-shot { margin: 0; }
.feat-shot .frame { aspect-ratio: 16 / 9.2; overflow: hidden; }
.feat-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.step { border-top: 1px solid var(--line-strong); padding-top: 26px; }
.step .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 76px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-strong);
  display: block;
  margin-bottom: 20px;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 9px;
}
.step p { color: var(--muted); font-size: 14.5px; line-height: 1.62; }

/* ---------- founding 100 ---------- */

.founding-plate { padding: 52px 48px 48px; }
.founding-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
.founding-plate h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 16px 0 16px;
}
.founding-plate .copy { color: var(--muted); font-size: 16px; max-width: 52ch; }
.founding-plate .copy strong { color: var(--text-dim); font-weight: 600; }
.perk-list { list-style: none; }
.perk-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 15px;
}
.perk-list li:first-child { border-top: none; padding-top: 2px; }
.perk-list .jack { margin-top: 5px; }
.perk-list strong { color: var(--text); font-weight: 600; }
.waves { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 30px; }
.wave {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
}
.wave b { color: var(--accent); font-weight: 600; }
.launch-date {
  border: 1px solid var(--line);
  background: var(--ink);
  padding: 20px 22px;
}
.launch-date .label { display: block; margin-bottom: 6px; }
.launch-date .date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.launch-date p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- sponsor note ---------- */

.sponsor-strip { border-top: 1px solid var(--line); }
.sponsor-in {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding-top: 30px;
  padding-bottom: 30px;
}
.sponsor-in .ad-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  flex: none;
}
.sponsor-in p {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.sponsor-in p b { color: var(--text-dim); font-weight: 600; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 40px;
  padding: 52px 0 40px;
}
.footer-grid .tag { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 30ch; }
.footer-col .label { display: block; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-dim);
  font-size: 14.5px;
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent); }
.api-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  text-decoration: none;
}
.api-status:hover { color: var(--accent); }
.api-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 20px 0 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- legal pages ---------- */

.legal-main { padding: 64px 0 90px; }
.legal-doc { max-width: 760px; }
.legal-doc .doc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.legal-doc h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 44px);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin-bottom: 14px;
}
.legal-doc .updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 30px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.legal-doc .updated a { color: var(--accent); text-decoration: none; }
.legal-doc h2 {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin: 38px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.legal-doc h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.legal-doc p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal-doc ul, .legal-doc ol { margin: 0 0 18px; padding: 0; list-style: none; }
.legal-doc li {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.75;
  padding: 10px 0 10px 22px;
  border-top: 1px solid var(--line);
  position: relative;
}
.legal-doc li:last-child { border-bottom: 1px solid var(--line); }
.legal-doc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.legal-doc ol { counter-reset: rule; }
.legal-doc ol li { padding-left: 44px; }
.legal-doc ol li::before {
  counter-increment: rule;
  content: counter(rule, decimal-leading-zero);
  border: none;
  border-radius: 0;
  width: auto;
  height: auto;
  top: 11px;
  left: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.legal-doc strong { color: var(--text); font-weight: 600; }
.legal-doc a { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  section { padding: 64px 0; }
  .hero { padding-top: 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-shot .frame { height: 480px; }
  .board-grid { grid-template-columns: 1fr; }
  .board-shot { position: static; }
  .board-shot .frame { height: 440px; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .step { display: grid; grid-template-columns: 92px 1fr; column-gap: 22px; }
  .step .num { font-size: 58px; margin-bottom: 0; }
  .step h3 { align-self: end; }
  .step p { grid-column: 1 / -1; }
  .founding-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .topbar-in { flex-wrap: wrap; gap: 10px 14px; padding-top: 12px; padding-bottom: 12px; }
  .topnav { order: 3; margin-left: 0; gap: 22px; width: 100%; }
  .wordmark { font-size: 13.5px; letter-spacing: 0.18em; gap: 9px; }
  .status-pill {
    margin-left: auto;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    padding: 5px 9px;
    gap: 6px;
  }
  .hero-shot .frame { height: 420px; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-shot .frame { aspect-ratio: 4 / 3.4; }
  .founding-plate { padding: 34px 24px 30px; }
  .dir-row .desc { display: none; }
  .sponsor-in { flex-direction: column; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 40px 0 30px; }
  .step { grid-template-columns: 74px 1fr; }
  .step .num { font-size: 48px; }
  .cord { height: 54px; }
}
