/* ==========================================================================
   Semoce - design system
   Ink #0B0B0C · Signal #FF4D12 · Paper #F4F2EE
   ========================================================================== */

:root {
  --ink: #0b0b0c;
  --ink-2: #111113;
  --ink-3: #18181b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f2ee;
  --text-dim: rgba(244, 242, 238, 0.62);
  --text-faint: rgba(244, 242, 238, 0.38);
  --signal: #ff4d12;
  --signal-soft: rgba(255, 77, 18, 0.14);
  --paper: #f4f2ee;
  --paper-ink: #0b0b0c;
  --paper-dim: rgba(11, 11, 12, 0.6);
  --paper-line: rgba(11, 11, 12, 0.12);

  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 4px;
  --radius-card: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  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;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--signal); color: var(--ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--signal);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 55% 100%, 0 100%);
}
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}
.h1 { font-size: clamp(44px, 8.4vw, 128px); }
.h2 { font-size: clamp(36px, 5.4vw, 76px); }
.h3 { font-size: clamp(26px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.025em; }
.lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--text-dim); line-height: 1.55; max-width: 60ch; }
.mono { font-family: var(--font-mono); }
.signal { color: var(--signal); }
.dim { color: var(--text-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--signal); color: var(--ink); }
.btn-primary:hover { background: #ff6a3a; }
.btn-ghost { border-color: rgba(255,255,255,0.4); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link-arrow:hover { color: var(--signal); }

/* ---------- Header (floating pill) ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: 14px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 10px 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}
@media (max-width: 1360px) { .nav { margin: 0 var(--gutter); } }
.site-header .nav.wrap { width: auto; }
.site-header.scrolled .nav {
  background: rgba(28, 28, 31, 0.6);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 30px; width: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: rgba(244, 242, 238, 0.82);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.06); }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { height: 44px; padding: 0 20px; font-size: 14px; }
.nav-cta .btn-store { background: var(--ink); color: var(--text); border: 1px solid rgba(255,255,255,0.12); }
.nav-cta .btn-store:hover { background: #1d1d20; }
.nav-cta .btn-store svg { width: 18px; height: 18px; }
.nav-toggle { display: none; width: 40px; height: 40px; position: relative; }
.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-open .nav-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  padding-top: 100px !important;
  background: var(--ink);
  padding: 24px var(--gutter);
  z-index: 49;
  flex-direction: column;
}
.mobile-menu a:not(.btn) {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: -0.03em;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 28px; justify-content: center; }
.nav-open .mobile-menu { display: flex; }

@media (max-width: 960px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav { padding: 0 6px 0 20px; }
  .nav-toggle { display: block; }
}
@media (max-width: 480px) {
  .nav-cta .btn-store { display: none; }
}
.nav-open .site-header .nav { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, transparent 0%, rgba(11, 11, 12, 0.4) 60%, var(--ink) 100%),
    linear-gradient(180deg, rgba(11, 11, 12, 0) 40%, var(--ink) 100%);
  pointer-events: none;
}
.hero-inner { width: 100%; }
.hero h1 { max-width: 13ch; margin-top: 28px; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero-bottom {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-meta b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
@media (max-width: 860px) {
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Ticker ---------- */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  background: var(--ink);
}
.ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: ticker 48s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ticker-track span { display: inline-flex; align-items: center; gap: 56px; white-space: nowrap; }
.ticker-track span::after { content: "→"; color: var(--signal); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.section-tight { padding: clamp(72px, 9vw, 120px) 0; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.section-head .display { margin-top: 20px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 24px; } }

.paper { background: var(--paper); color: var(--paper-ink); }
.paper .eyebrow { color: var(--paper-dim); }
.paper .lead, .paper .dim { color: var(--paper-dim); }
.paper .btn-ghost { border-color: var(--paper-line); color: var(--paper-ink); }
.paper .btn-ghost:hover { border-color: var(--paper-ink); }

/* ---------- Pillars (two halves) ---------- */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar {
  background: var(--ink);
  padding: clamp(32px, 4vw, 56px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: background 0.5s var(--ease);
}
.pillar:hover { background: var(--ink-2); }
.pillar-index { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); letter-spacing: 0.1em; }
.pillar h3 { margin: 18px 0 16px; }
.pillar p { color: var(--text-dim); max-width: 44ch; margin: 0; }
.pillar-visual { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; min-height: 220px; }
.pillar-visual svg { width: 100%; max-width: 380px; height: auto; }
.pillar-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-dim);
}
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } .pillar { min-height: 0; } }

/* ---------- Flow stepper ---------- */
.flow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.flow-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.flow-step { border-bottom: 1px solid var(--line); }
.flow-step button {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 20px 0;
  color: var(--text-faint);
  transition: color 0.3s;
}
.flow-step button:hover { color: var(--text-dim); }
.flow-step .n { font-family: var(--font-mono); font-size: 12px; }
.flow-step .t { font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; font-weight: 500; }
.flow-step .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.flow-step.active button { color: var(--text); }
.flow-step.active .n { color: var(--signal); }
.flow-step .desc {
  max-height: 0;
  overflow: hidden;
  color: var(--text-dim);
  padding-left: 56px;
  transition: max-height 0.5s var(--ease), padding 0.5s var(--ease);
}
.flow-step.active .desc { max-height: 160px; padding-bottom: 22px; }
.flow-step .desc p { margin: 0; max-width: 48ch; }

.flow-panel { position: sticky; top: 110px; }
.term {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(255, 77, 18, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.term-bar .title { margin-left: 10px; }
.term-body {
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-dim);
  min-height: 360px;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .p { color: var(--signal); }
.term-body .c { color: var(--text); }
.term-body .ok { color: #7ee2a8; }
.term-body .w { color: #ffc27a; }
.term-body .f { color: var(--text-faint); }
.term-body .cursor { display: inline-block; width: 8px; height: 15px; background: var(--signal); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.flow-viz { margin-top: 16px; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.flow-viz i { height: 4px; background: var(--line-strong); transition: background 0.4s; display: block; }
.flow-viz i.on { background: var(--signal); }

@media (max-width: 960px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-panel { position: relative; top: 0; order: -1; }
  .term-body { min-height: 300px; font-size: 12px; padding: 18px; }
}

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cell {
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  background: #fbfaf7;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.cell:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(11, 11, 12, 0.25); }
.cell h4 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; font-weight: 600; margin: auto 0 0; line-height: 1.15; }
.cell p { margin: 0; color: var(--paper-dim); font-size: 15px; }
.cell .ic { width: 44px; height: 44px; border-radius: 6px; background: var(--paper-ink); display: grid; place-items: center; }
.cell .ic svg { width: 22px; height: 22px; }
.cell.span-2 { grid-column: span 2; }
.cell.span-3 { grid-column: span 3; }
.cell.span-4 { grid-column: span 4; }
.cell.dark { background: var(--ink); color: var(--text); border-color: var(--ink); }
.cell.dark p { color: var(--text-dim); }
.cell.dark .ic { background: var(--signal); }
.cell.signal { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.cell.signal p { color: rgba(11, 11, 12, 0.72); }
.cell .big { font-family: var(--font-display); font-size: clamp(56px, 6vw, 96px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.9; }
.cell-art { position: absolute; right: -10px; top: -10px; width: 60%; opacity: 0.9; pointer-events: none; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cell.span-2, .cell.span-3, .cell.span-4 { grid-column: span 2; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .cell.span-2, .cell.span-3, .cell.span-4 { grid-column: span 1; } }

/* ---------- Statement ---------- */
.statement { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 64px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; max-width: 22ch; margin: 0; }
.statement .w { color: var(--text-faint); transition: color 0.4s; }
.statement .w.lit { color: var(--text); }
.statement .w.lit.hl { color: var(--signal); }

/* ---------- Silicon roadmap ---------- */
.roadmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.road {
  padding: 32px 28px 40px 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.road:last-child { border-right: 0; }
.road + .road { padding-left: 28px; }
.road::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--text-faint); }
.road + .road::before { left: 28px; }
.road.now::before { background: var(--signal); box-shadow: 0 0 0 6px var(--signal-soft); }
.road .phase { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.road h4 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; margin: 16px 0 10px; font-weight: 600; }
.road p { color: var(--text-dim); margin: 0; font-size: 15px; }
@media (max-width: 960px) {
  .roadmap { grid-template-columns: 1fr 1fr; }
  .road:nth-child(2) { border-right: 0; }
  .road:nth-child(3) { padding-left: 0; }
  .road:nth-child(3)::before { left: 0; }
}
@media (max-width: 560px) {
  .roadmap { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); }
  .road, .road + .road { border-right: 0; padding: 0 0 36px 28px; }
  .road::before, .road + .road::before { top: 6px; left: -5px; }
}

/* ---------- Chip render ---------- */
.chip-stage { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: radial-gradient(ellipse at center, #17120f 0%, var(--ink) 70%); }
.chip-stage svg { width: 100%; height: 100%; }
.chip-label { position: absolute; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.chip-label::before { content: ""; width: 24px; height: 1px; background: var(--signal); }
@media (max-width: 640px) { .chip-label { display: none; } }

/* ---------- Spec list ---------- */
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.spec { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.spec dd { margin: 8px 0 0; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
@media (max-width: 760px) { .specs { grid-template-columns: 1fr 1fr; } }

/* ---------- Code block ---------- */
.code {
  background: var(--ink);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  border: 1px solid var(--line);
  margin: 0;
}
.code .k { color: var(--signal); }
.code .s { color: #7ee2a8; }
.code .c { color: var(--text-faint); }
.code .n { color: #ffc27a; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- List rows (careers, principles) ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 32px;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease), color 0.3s;
}
.row:hover { padding-left: 12px; }
.row:hover .row-arrow { color: var(--signal); transform: translateX(4px); }
.row-title { font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; font-weight: 500; }
.row-meta { color: var(--text-dim); font-size: 14px; }
.row-arrow { transition: transform 0.3s var(--ease), color 0.3s; color: var(--text-faint); }
@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 16px; }
  .row-meta { grid-column: 1; }
  .row-arrow { grid-row: 1; grid-column: 2; }
}
.paper .rows, .paper .row { border-color: var(--paper-line); }
.paper .row-meta { color: var(--paper-dim); }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; }
.principle .n { font-family: var(--font-mono); font-size: 12px; color: var(--signal); }
.principle h4 { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; margin: 14px 0 10px; font-weight: 600; line-height: 1.15; }
.principle p { margin: 0; color: var(--text-dim); }
.paper .principle p { color: var(--paper-dim); }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--signal); color: var(--ink); }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band .display { max-width: 14ch; }
.cta-band .lead { color: rgba(11, 11, 12, 0.72); }
.cta-band .btn-ghost { border-color: rgba(11, 11, 12, 0.3); color: var(--ink); }
.cta-band .btn-ghost:hover { border-color: var(--ink); }
.cta-band .btn-dark { background: var(--ink); color: var(--text); }
.cta-band .btn-dark:hover { background: #222; }
.cta-mark { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); width: min(38vw, 440px); opacity: 0.16; pointer-events: none; }
@media (max-width: 760px) { .cta-mark { width: 60vw; right: -12vw; opacity: 0.1; } }
.cta-mark polygon { fill: var(--ink) !important; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }

/* ---------- Form ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--text);
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--signal); }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { cursor: pointer; position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.field .btn { align-self: flex-start; }
.choice span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  transition: all 0.2s;
}
.choice input:checked + span { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.form-note { font-size: 13px; color: var(--text-faint); }
.form-status { grid-column: 1 / -1; color: var(--text-dim); font-family: var(--font-mono); font-size: 13px; min-height: 1em; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 180px 0 clamp(72px, 9vw, 120px); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero .display { margin-top: 24px; max-width: 16ch; }
.page-hero .lead { margin-top: 28px; }
.page-hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000 0%, transparent 70%);
}
.page-hero { isolation: isolate; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 80px 0 32px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand img { height: 22px; width: auto; }
.footer-brand p { color: var(--text-dim); max-width: 34ch; margin: 20px 0 0; font-size: 15px; }
.footer-col h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 16px; font-weight: 400; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-dim); font-size: 15px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-word { margin-top: 96px; opacity: 0.06; }
.footer-word img { width: 100%; height: auto; }
.footer-bottom { margin-top: 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-faint); font-family: var(--font-mono); }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

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

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cta-band .eyebrow::before { background: var(--ink); }


/* ==========================================================================
   Vicharak-style homepage components
   ========================================================================== */

/* ---------- 3D hero carousel ---------- */
.hero3d {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse 60% 70% at 68% 48%, #1a0f0a 0%, var(--ink) 65%);
}
.hero3d canvas.hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 0.7s var(--ease); }
.hero3d.webgl-ready canvas.hero-3d { opacity: 1; }
.hero3d::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 70% at 65% 45%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 65% 45%, #000 0%, transparent 75%);
  pointer-events: none;
}
/* the 2D wire animation is only a fallback for devices without WebGL; with WebGL the
   dot grid shows at once and the 3D model fades in, so nothing is replaced mid-view */
.hero3d .hero-canvas { display: none; z-index: -2; }
.hero3d-copy {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-62%);
}
.hero-wordmark { margin: 0; line-height: 0; }
.hero-wordmark img { width: clamp(260px, 34vw, 520px); height: auto; }
.hero3d-copy .lead { margin-top: 24px; max-width: 36ch; font-size: clamp(17px, 1.35vw, 20px); }
.hero3d-copy .hero-actions { margin-top: 32px; }
.hero3d-copy .btn { height: 46px; }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--paper); }

.hero-labels {
  position: absolute;
  left: 0;
  bottom: clamp(36px, 7vh, 80px);
  height: clamp(44px, 6vw, 84px);
  width: 100%;
  pointer-events: none;
}
.hero-labels li {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 24px);
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(30px, 4.6vw, 72px);
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hero-labels li::before { content: ""; width: clamp(32px, 4vw, 64px); height: 2px; background: var(--text); }
.hero-labels li.active { opacity: 1; transform: none; transition-delay: 0.35s; }
.hero-labels { list-style: none; margin: 0; padding: 0; }

.hero-dots {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(48px, 8vh, 92px);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-dots button { width: 40px; height: 20px; position: relative; }
.hero-dots button::before, .hero-dots button::after {
  content: ""; position: absolute; left: 0; top: 9px; height: 2px; border-radius: 2px;
}
.hero-dots button::before { right: 0; background: rgba(255,255,255,0.18); }
.hero-dots button::after { right: 0; background: var(--signal); transform: scaleX(0); transform-origin: left; }
.hero-dots button.active::after { animation: dot var(--dur, 6500ms) linear forwards; }
@keyframes dot { to { transform: scaleX(1); } }

.hero3d.no-webgl { background: radial-gradient(ellipse 60% 70% at 68% 48%, #1a0f0a 0%, var(--ink) 65%); }
.hero3d.no-webgl .hero-canvas { display: block; opacity: 1; }

@media (max-width: 860px) {
  .hero3d-copy { top: auto; bottom: 150px; transform: none; }
  .hero3d-copy .lead { max-width: none; }
  .hero-labels { bottom: 40px; }
  .hero-dots { bottom: 104px; right: auto; left: var(--gutter); }
  .hero-wordmark img { width: min(78vw, 360px); }
}

/* ---------- Product tiles (light) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; background: #fff; }
.tile {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 62vw, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 6vw, 80px) 24px 0;
  color: var(--ink);
  background: linear-gradient(160deg, #f2f2f3 0%, #d7d7da 55%, #c4c4c8 100%);
}
.tile.alt { background: linear-gradient(200deg, #f4f4f5 0%, #dedee1 50%, #cfcfd3 100%); }
.tile.ink { background: radial-gradient(ellipse at 50% 80%, #2a2a2e 0%, #0d0d0f 70%); color: var(--text); }
.tile .kicker { font-size: clamp(15px, 1.2vw, 18px); font-weight: 500; color: rgba(11,11,12,0.62); }
.tile.ink .kicker, .tile.ink .sub { color: var(--text-dim); }
.tile h3 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.4vw, 84px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 10px;
  text-transform: uppercase;
}
.tile h3 span { font-weight: 300; text-transform: none; letter-spacing: 0; }
.tile .sub { font-size: clamp(15px, 1.2vw, 18px); color: rgba(11,11,12,0.62); margin: 0; }
.tile .actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.tile .btn { height: 46px; }
.btn-outline-dark { border-color: rgba(11,11,12,0.8); color: var(--ink); }
.btn-outline-dark:hover { background: rgba(11,11,12,0.06); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #222225; }
.tile.ink .btn-outline-dark { border-color: rgba(255,255,255,0.6); color: #fff; }
.tile.ink .btn-dark { background: #fff; color: var(--ink); }
.tile > :not(.tile-img) { position: relative; z-index: 1; }
.tile-img {
  position: absolute;
  left: 50%;
  bottom: -3%;
  width: min(96%, 780px);
  transform: translateX(-50%) translateY(30px) scale(1.04);
  transition: transform 1.4s var(--ease);
}
.tile.in .tile-img, .tile:hover .tile-img { transform: translateX(-50%) translateY(0) scale(1); }
.tile:hover .tile-img { transform: translateX(-50%) translateY(-10px) scale(1.02); }
.badge-live { display: inline-flex; align-items: center; gap: 8px; }
.badge-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1fbf6a; box-shadow: 0 0 0 4px rgba(31,191,106,0.18); }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; padding: 10px; gap: 10px; } .tile { min-height: 600px; } .tile-img { width: 112%; } }

/* ---------- Centered section heading ---------- */
.center-head { text-align: center; max-width: 900px; margin: 0 auto clamp(48px, 6vw, 80px); }
.center-head .display { margin-top: 18px; }
.center-head .lead { margin: 22px auto 0; }

/* ---------- Dark product cards ---------- */
.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pcard {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  min-height: 600px;
  padding: clamp(32px, 4vw, 52px);
  background: linear-gradient(180deg, #161618 0%, #0e0e10 100%);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}
.pcard.light { background: linear-gradient(160deg, #f1f1f2 0%, #cfcfd3 100%); color: var(--ink); border-color: transparent; }
.pcard.wide { grid-column: 1 / -1; min-height: 520px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding: 0; }
.pcard.wide .pcard-copy { padding: clamp(32px, 4vw, 56px); background: linear-gradient(180deg, #19191c, #111113); border-radius: var(--radius-card) 0 0 var(--radius-card); }
.pcard h3 { font-family: var(--font-display); font-size: clamp(40px, 4.4vw, 64px); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-transform: uppercase; line-height: 1; }
.pcard p { color: var(--text-dim); max-width: 46ch; margin: 22px 0 0; font-size: 17px; }
.pcard.light p { color: rgba(11,11,12,0.66); }
.pcard .more { margin-top: 24px; display: inline-block; border-bottom: 1px solid currentColor; padding-bottom: 2px; font-weight: 500; color: var(--text-dim); width: max-content; }
.pcard.light .more { color: rgba(11,11,12,0.7); }
.pcard .more:hover { color: var(--signal); }
.pcard-art { flex: 1; position: relative; margin: 32px calc(-1 * clamp(32px, 4vw, 52px)) calc(-1 * clamp(32px, 4vw, 52px)); min-height: 280px; }
.pcard-art svg, .pcard-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard.wide .pcard-art { margin: 0; }
@media (max-width: 960px) {
  .pcards { grid-template-columns: 1fr; }
  .pcard { min-height: 540px; }
  .pcard.wide { grid-template-columns: 1fr; }
  .pcard.wide .pcard-copy { border-radius: var(--radius-card) var(--radius-card) 0 0; }
  .pcard.wide .pcard-art { min-height: 340px; }
}

/* ---------- Applications bento ---------- */
.apps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 320px; gap: 20px; }
.app {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: radial-gradient(ellipse at 50% 60%, #1b1b1e 0%, #101012 80%);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: border-color 0.4s, transform 0.6s var(--ease);
}
.app:hover { border-color: rgba(255,77,18,0.5); transform: translateY(-4px); }
.app.tall { grid-row: span 2; }
.app.signal { background: radial-gradient(ellipse at 50% 70%, #3a1606 0%, #1a0b04 70%); border-color: rgba(255,77,18,0.35); }
.app h4 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; margin: 0; position: relative; z-index: 1; text-align: center; color: var(--text); text-wrap: balance; }
.app h4 em { font-style: normal; color: var(--signal); }
.app p { position: relative; z-index: 1; color: var(--text-dim); margin: 8px auto 0; font-size: 15px; text-align: center; max-width: 34ch; }
.app > svg { position: absolute; left: 24px; right: 24px; bottom: 18px; width: calc(100% - 48px); height: 52%; }
.app.tall > svg { height: 72%; bottom: 24px; }
@media (max-width: 960px) { .apps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .apps { grid-template-columns: 1fr; grid-auto-rows: auto; } .app { min-height: 320px; } .app.tall { grid-row: span 1; min-height: 480px; } }

/* ---------- Partner / ecosystem pills ---------- */
.collab { text-align: center; }
.collab .lead { margin: 22px auto 0; }
.btn-gradient {
  background: linear-gradient(90deg, #ff4d12 0%, #ff8a3d 50%, #ffb27a 100%);
  color: var(--ink);
  height: 54px;
  padding: 0 34px;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 16px 50px -14px rgba(255, 77, 18, 0.7);
  background-size: 200% 100%;
  transition: background-position 0.6s var(--ease), transform 0.3s var(--ease);
}
.btn-gradient:hover { background-position: 100% 0; transform: translateY(-2px); }
.pills { margin-top: clamp(56px, 7vw, 96px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.pills-track { display: flex; gap: 24px; width: max-content; animation: ticker 60s linear infinite; padding: 6px 0; }
.pills:hover .pills-track { animation-play-state: paused; }
.pill {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 116px;
  padding: 0 40px 0 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #19191c 0%, #101012 100%);
  border: 1px solid rgba(255,255,255,0.07);
  white-space: nowrap;
}
.pill .chip-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #0b0b0c; border: 1px solid rgba(255,255,255,0.1); font-family: var(--font-mono); font-size: 12px; color: var(--signal); font-weight: 500; }
.pill .div { width: 1px; height: 64px; background: rgba(255,255,255,0.12); }
.pill b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; text-align: left; }
.pill small { display: block; color: var(--text-dim); font-size: 15px; text-align: left; }

/* ---------- Support cards ---------- */
.support { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 1200px; margin: 0 auto; }
.scard {
  border-radius: 28px;
  border: 1.5px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, #19191c, #0f0f11);
  padding: 40px 32px 36px;
  text-align: center;
  transition: border-color 0.3s, transform 0.5s var(--ease);
}
.scard:hover { border-color: var(--signal); transform: translateY(-6px); }
.scard svg { width: 64px; height: 64px; margin: 0 auto 22px; }
.scard h4 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.scard p { color: var(--text-dim); margin: 10px 0 0; font-size: 15px; }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 900px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; font-family: var(--font-display); font-size: clamp(19px, 1.8vw, 24px); font-weight: 500; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 24px; color: var(--signal); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 26px; color: var(--text-dim); max-width: 70ch; }

/* ---------- Product bands (silicon page) ---------- */
.product-band { background: linear-gradient(160deg, #f2f2f3 0%, #d7d7da 100%); color: var(--ink); }
.product-band.alt { background: linear-gradient(200deg, #f4f4f5 0%, #cfcfd3 100%); }
.product-band .lead { color: rgba(11, 11, 12, 0.66); }
.product-band .spec, .product-band .specs { border-color: rgba(11, 11, 12, 0.12); }
.product-band .spec dt { color: rgba(11, 11, 12, 0.55); }
.product-band .spec dd { color: var(--ink); }
.product-band .kicker-dark .status { margin-left: 14px; font-size: 14px; }
.kicker-dark { font-size: 16px; font-weight: 500; color: rgba(11, 11, 12, 0.6); }
.product-band .split > img { width: 100%; }
@media (min-width: 861px) { .product-band.alt .split > img { order: -1; } }
.term-note { margin: 14px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #f5a623; box-shadow: 0 0 0 4px rgba(245,166,35,0.18); }
.status.testing::before { background: #1fbf6a; box-shadow: 0 0 0 4px rgba(31,191,106,0.18); }
.tile h3 .lc { text-transform: none; font-weight: 600; letter-spacing: -0.03em; }

/* ---------- Docs ---------- */
.docs-hero { position: relative; isolation: isolate; overflow: hidden; padding: 160px 0 56px; border-bottom: 1px solid var(--line); }
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-top: 48px; padding-bottom: 120px; }
.docs-side nav { position: sticky; top: 104px; max-height: calc(100vh - 124px); overflow: auto; }
.docs-group { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin: 24px 0 8px; }
.docs-group:first-child { margin-top: 0; }
.docs-side ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-side a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-dim); font-size: 15px; transition: color 0.2s, border-color 0.2s; }
.docs-side a:hover { color: var(--text); }
.docs-side a.active { color: var(--text); border-left-color: var(--signal); }
.docs-body { max-width: 820px; }
.doc { padding: 8px 0 48px; scroll-margin-top: 104px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.doc:last-child { border-bottom: 0; }
.doc h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.doc h2 .status { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-dim); }
.doc p { color: var(--text-dim); margin: 0 0 18px; font-size: 17px; }
.doc p strong { color: var(--text); font-weight: 500; }
.doc code { font-family: var(--font-mono); font-size: 0.88em; background: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--text); }
.doc pre.code { margin: 8px 0 0; white-space: pre; }
.doc-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); font-weight: 400; padding: 12px 16px; background: var(--ink-2); }
.doc-table td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text-dim); vertical-align: top; }
.doc-table td:first-child { white-space: nowrap; color: var(--text); }
.doc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 24px; }
.doc-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); transition: border-color 0.2s; }
.doc-card:hover { border-color: var(--signal); }
.doc-card b { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.doc-card span { color: var(--text-dim); font-size: 14px; }
.doc-card em { font-style: normal; font-size: 13px; color: var(--text-faint); margin-top: 8px; }
.doc-note { border: 1px solid rgba(255, 77, 18, 0.35); background: rgba(255, 77, 18, 0.06); border-radius: 10px; padding: 14px 18px; color: var(--text-dim); font-size: 15px; }
.doc-note a { color: var(--signal); }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: 0; gap: 24px; }
  /* sidebar becomes a sticky, horizontally scrolling row of section pills */
  .docs-side { position: sticky; top: 84px; z-index: 5; margin: 0 calc(-1 * var(--gutter)); background: rgba(11, 11, 12, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .docs-side nav { position: static; max-height: none; display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--gutter); scrollbar-width: none; }
  .docs-side nav::-webkit-scrollbar { display: none; }
  .docs-group { display: none; }
  .docs-side ul { display: contents; }
  .docs-side a { white-space: nowrap; padding: 7px 14px; margin: 0; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; }
  .docs-side a.active { border-color: var(--signal); background: rgba(255, 77, 18, 0.12); }
  .doc { scroll-margin-top: 150px; }
  .doc p { font-size: 16px; }
  .doc-cards { grid-template-columns: minmax(0, 1fr); }
  .doc-table td:first-child { white-space: normal; word-break: break-word; min-width: 140px; }
}

/* ---------- Proof: verification console ---------- */
.proof { grid-column: 1 / -1; position: relative; overflow: hidden; border-radius: var(--radius-card); border: 1px solid rgba(255, 255, 255, 0.07); background: radial-gradient(ellipse 60% 80% at 85% 0%, rgba(255, 77, 18, 0.10), transparent 60%), linear-gradient(180deg, #151517 0%, #0e0e10 100%); padding: clamp(28px, 4vw, 52px); }
.proof-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 56px; align-items: end; }
.proof-kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); }
.proof h3 { margin: 12px 0 0; font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 52px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; }
.proof-head p { margin: 0; color: var(--text-dim); font-size: 17px; max-width: 62ch; }
.proof-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-top: 36px; }
.wave-panel { border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; background: #0a0a0b; overflow: hidden; display: flex; flex-direction: column; }
.wave-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 12px; color: var(--text-faint); }
.legend { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.legend i + i, .legend .lg-net { margin-left: 10px; }
.lg-rtl { background: #f4f2ee; }
.lg-net { background: var(--signal); }
.wave-panel canvas { display: block; width: 100%; flex: 1; min-height: 300px; }
.refs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.refs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
.refs b { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--text); }
.refs span { grid-column: 1; font-size: 13px; color: var(--text-faint); }
.refs em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); display: inline-flex; align-items: center; gap: 8px; }
.refs em::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-faint); }
.refs li.on { border-color: rgba(31, 191, 106, 0.28); background: rgba(31, 191, 106, 0.05); }
.refs li.on em { color: #3ad08a; }
.refs li.on em::before { border: 0; background: #3ad08a; box-shadow: 0 0 0 3px rgba(58, 208, 138, 0.2); }
.proof-more { margin-top: 28px; }
@media (max-width: 960px) {
  .proof-head { grid-template-columns: minmax(0, 1fr); }
  .proof-body { grid-template-columns: minmax(0, 1fr); }
  .refs { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 560px) { .wave-panel canvas { min-height: 260px; } .refs { grid-template-columns: minmax(0, 1fr); } }
