@import url("tokens.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }

a { color: inherit; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 40px; height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.02em;
  text-decoration: none; color: var(--fg);
}
.brand .mark { width: 18px; height: 18px; display: inline-block; }
.brand .mark svg { width: 100%; height: 100%; display: block; }
.brand .word { line-height: 1; }
.brand .word .em { color: var(--fg); }
.nav-links { display: flex; gap: 28px; flex: 1; align-items: center; }
.nav-links a {
  font-size: 14px; color: var(--fg-muted); text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-md);
  font-family: var(--font-sans); font-weight: 500; font-size: 14px; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--n800); }
[data-theme="dark"] .btn-primary { background: var(--fg); color: var(--n1000); }
[data-theme="dark"] .btn-primary:hover { background: #E8E4D6; }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost { background: transparent; color: var(--fg-muted); }
.btn-ghost:hover { color: var(--fg); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn .arrow { opacity: 0.5; transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(2px); opacity: 0.85; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 112px 0 96px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px;
  align-items: stretch;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-subtle); font-weight: 500;
  font-family: var(--font-mono);
}
.eyebrow .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.hero h1 {
  margin-top: 28px;
  font-size: clamp(44px, 6.4vw, 80px);
  line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 14ch;
  text-transform: lowercase;
}
.hero h1 .accent-word { color: var(--fg); position: relative; }
.hero h1 .accent-word::after {
  content: "";
  display: inline-block;
  width: 0.5em; height: 0.5em;
  background: var(--accent);
  margin-left: 0.08em;
  vertical-align: 0.05em;
}
.hero .sub {
  font-size: 19px; color: var(--fg-muted); max-width: 52ch;
  margin-top: 28px; line-height: 1.55;
}
.hero .cta-row {
  display: flex; gap: 12px; margin-top: 40px; align-items: center;
  flex-wrap: wrap;
}
.hero .cta-row .meta {
  font-size: 13px; color: var(--fg-subtle); margin-left: 6px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
}

/* Hero side panel — quiet "tape" */
.tape {
  align-self: stretch;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 380px;
}
.tape-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-subtle);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.tape-head .live { display: inline-flex; align-items: center; gap: 8px; }
.tape-rows { display: flex; flex-direction: column; flex: 1; }
.tape-row {
  display: grid;
  grid-template-columns: 56px 1fr 90px 80px 90px;
  padding: 10px 16px;
  border-bottom: 1px dashed var(--border);
  color: var(--fg-muted);
  align-items: center;
  gap: 8px;
}
.tape-row:last-child { border-bottom: none; }
.tape-row .t { color: var(--fg-subtle); font-size: 11px; }
.tape-row .sym { color: var(--fg); font-weight: 500; letter-spacing: -0.01em; }
.tape-row .px { color: var(--fg); text-align: right; }
.tape-row .sz { color: var(--fg-subtle); text-align: right; font-size: 11px; }
.tape-row .side { text-align: right; font-size: 11px; letter-spacing: 0.04em; }
.tape-row .side.buy { color: var(--accent); }
.tape-row .side.sell { color: var(--fg-muted); }
.tape-row.fresh { background: color-mix(in oklab, var(--accent) 6%, transparent); }
.tape-foot {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  color: var(--fg-subtle); font-size: 11px;
  font-family: var(--font-mono);
}

/* ============================================================
   Stats strip
   ============================================================ */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.stat:last-child { border-right: none; }
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-subtle);
}
.stat .val {
  font-size: 40px; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1; color: var(--fg);
  font-feature-settings: "tnum" 1;
}
.stat .val small {
  font-size: 16px; color: var(--fg-subtle); font-weight: 500;
  margin-left: 4px; letter-spacing: 0;
}
.stat .note { font-size: 13px; color: var(--fg-muted); margin-top: 2px; }

/* ============================================================
   Section frame
   ============================================================ */
.section { padding: 112px 0; border-top: 1px solid var(--border); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; margin-bottom: 64px; }
.section-head h2 {
  font-size: clamp(36px, 4.4vw, 56px);
  letter-spacing: -0.03em; line-height: 1.04;
  font-weight: 600; text-transform: lowercase;
  max-width: 20ch;
}
.section-head .lede { font-size: 18px; color: var(--fg-muted); line-height: 1.55; max-width: 52ch; }
.section-head .eyebrow { margin-bottom: 20px; display: block; }

/* ============================================================
   Services
   ============================================================ */
.svc-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.svc {
  display: grid;
  grid-template-columns: 64px 1.1fr 1.4fr 1fr;
  gap: 40px;
  padding: 40px 8px;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: background var(--dur-fast) var(--ease);
}
.svc:hover { background: var(--bg-hover); }
.svc .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  padding-top: 8px;
}
.svc h3 {
  font-size: 28px; letter-spacing: -0.02em; line-height: 1.1;
  font-weight: 600; text-transform: lowercase;
  max-width: 16ch;
}
.svc .desc { font-size: 15px; color: var(--fg-muted); line-height: 1.6; }
.svc .desc p + p { margin-top: 10px; }
.svc .scope {
  display: flex; flex-direction: column; gap: 8px;
}
.svc .scope .label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 4px;
}
.svc .scope-item {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg);
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  line-height: 1.5;
}
.svc .scope-item::before {
  content: "";
  display: block;
  width: 8px; height: 8px;
  background: var(--fg);
  margin-top: 6px;
}

/* ============================================================
   Why grid
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.why {
  padding: 40px 36px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.why .k {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-subtle);
}
.why h3 {
  font-size: 22px; letter-spacing: -0.02em; line-height: 1.15;
  font-weight: 600; text-transform: lowercase;
  max-width: 18ch;
}
.why p { font-size: 15px; color: var(--fg-muted); line-height: 1.6; max-width: 42ch; }

/* ============================================================
   CTA
   ============================================================ */
.cta-section {
  padding: 128px 0;
  border-top: 1px solid var(--border);
}
.cta-card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-raised);
  padding: 64px 64px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.cta-card h2 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.03em; line-height: 1.05;
  font-weight: 600; text-transform: lowercase;
  max-width: 18ch;
}
.cta-card .sub { font-size: 17px; color: var(--fg-muted); margin-top: 20px; line-height: 1.55; max-width: 50ch; }
.cta-side {
  display: flex; flex-direction: column; gap: 14px;
}
.cta-side .row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  align-items: center;
}
.cta-side .row .v { color: var(--fg); }
.cta-side .row .v.ok { color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.cta-side .actions { display: flex; gap: 10px; margin-top: 6px; }
.cta-side .actions .btn { flex: 1; justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
}
.footer-row { display: flex; gap: 64px; align-items: flex-start; flex-wrap: wrap; }
.footer .col { display: flex; flex-direction: column; gap: 10px; }
.footer h4 {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-subtle); font-weight: 500;
  font-family: var(--font-mono);
}
.footer a { font-size: 14px; color: var(--fg-muted); text-decoration: none; }
.footer a:hover { color: var(--fg); }
.footer .blurb { font-size: 13px; color: var(--fg-subtle); margin-top: 14px; max-width: 36ch; line-height: 1.55; }
.footer .legal {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--fg-subtle);
  font-family: var(--font-mono);
}
.footer .legal .live { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================================
   Responsive (very light — desktop-first per Relay)
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tape { min-height: 320px; }
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .svc { grid-template-columns: 48px 1fr; gap: 16px; }
  .svc .desc, .svc .scope { grid-column: 2 / -1; }
  .svc h3 { grid-column: 2 / -1; }
  .why-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .cta-card { grid-template-columns: 1fr; padding: 40px; }
  .nav-links { display: none; }
}
