/* ============================================================
   Dystro — marketing site
   "Control-plane" aesthetic: near-black canvas, lime signal,
   mono technical labels, convergence motif.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg:          #09090b;
  --bg-grid:     rgba(255,255,255,0.022);
  --elev:        #101014;
  --surface:     #16161c;
  --surface-2:   #1c1c24;
  --line:        rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --text:        #EDEDF2;
  --dim:         #9A9AA7;
  --mute:        #63636F;
  --signal:      #C8F94E;
  --signal-ink:  #0b0f02;
  --signal-dim:  rgba(200,249,78,0.12);
  --signal-glow: rgba(200,249,78,0.28);

  --display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --maxw: 1140px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* fine grid + top glow texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; top: -30vh; left: 50%; transform: translateX(-50%);
  width: 120vw; height: 70vh;
  background: radial-gradient(ellipse at center, var(--signal-dim), transparent 62%);
  filter: blur(30px); opacity: 0.5; pointer-events: none; z-index: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ---------- shared atoms ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--signal);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: '//'; color: var(--mute); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s;
}
.btn-primary { background: var(--signal); color: var(--signal-ink); box-shadow: 0 0 0 1px var(--signal), 0 8px 30px -10px var(--signal-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--signal), 0 14px 40px -12px var(--signal-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); transform: translateY(-2px); }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand .mark { width: 26px; height: 26px; }
nav.top { display: flex; align-items: center; gap: 30px; }
nav.top a.link { font-size: 14.5px; color: var(--dim); transition: color .16s; }
nav.top a.link:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; }

/* ---------- hero ---------- */
.hero { padding: 92px 0 40px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700; font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98; letter-spacing: -0.035em; margin: 22px 0 0;
}
.hero h1 em { font-style: normal; color: var(--signal); position: relative; white-space: nowrap; }
.hero p.lede { font-size: 19px; color: var(--dim); margin-top: 24px; max-width: 34ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta { margin-top: 30px; display: flex; gap: 26px; font-family: var(--mono); font-size: 12.5px; color: var(--mute); flex-wrap: wrap; }
.hero-meta b { color: var(--text); font-weight: 500; }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); animation: rise .7s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .23s; }
.d4 { animation-delay: .32s; } .d5 { animation-delay: .41s; } .d6 { animation-delay: .5s; }

/* convergence visual */
.converge { position: relative; aspect-ratio: 1 / 1; }
.converge svg { width: 100%; height: 100%; overflow: visible; }
.converge .spoke { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.converge .pulse { stroke: var(--signal); stroke-width: 1.4; fill: none; stroke-dasharray: 5 240; opacity: .9; animation: flow 3.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -245; } }
.converge .node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.converge .node-label { font-family: var(--mono); font-size: 11px; fill: var(--dim); }
.converge .core { fill: var(--signal); }
.converge .core-ring { fill: none; stroke: var(--signal); opacity: .35; animation: ring 3s ease-out infinite; }
@keyframes ring { 0% { r: 30px; opacity: .5; } 100% { r: 74px; opacity: 0; } }
.converge .core-word { font-family: var(--display); font-weight: 700; font-size: 15px; fill: var(--signal-ink); }

/* ---------- platform strip ---------- */
.strip { border-block: 1px solid var(--line); margin-top: 40px; padding: 26px 0; }
.strip .wrap { display: flex; align-items: center; gap: 14px 40px; flex-wrap: wrap; justify-content: center; }
.strip .lab { font-family: var(--mono); font-size: 11.5px; color: var(--mute); letter-spacing: .1em; text-transform: uppercase; margin-right: 8px; }
.strip .pf { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--dim); opacity: .78; transition: color .16s, opacity .16s; }
.strip .pf:hover { color: var(--signal); opacity: 1; }

/* ---------- sections ---------- */
section.block { padding: 96px 0; }
.section-head { max-width: 620px; margin-bottom: 52px; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.04; letter-spacing: -0.03em; margin-top: 16px; }
.section-head p { color: var(--dim); margin-top: 16px; font-size: 18px; }

/* feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: linear-gradient(180deg, var(--elev), var(--bg));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 28px; position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--signal-glow), transparent); opacity: 0; transition: opacity .25s; }
.card:hover::after { opacity: 1; }
.card .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--signal-dim); border: 1px solid var(--line-strong); display: grid; place-items: center; margin-bottom: 18px; }
.card .ic svg { width: 19px; height: 19px; stroke: var(--signal); fill: none; stroke-width: 1.6; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.card p { color: var(--dim); font-size: 15px; margin-top: 9px; }
.card .tag { margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--mute); }

/* code showcase */
.showcase { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 46px; align-items: center; }
.showcase ul { list-style: none; margin-top: 26px; display: grid; gap: 16px; }
.showcase li { display: flex; gap: 13px; font-size: 15.5px; color: var(--dim); }
.showcase li b { color: var(--text); font-weight: 600; }
.showcase li .dot { flex: none; width: 7px; height: 7px; border-radius: 99px; background: var(--signal); margin-top: 9px; box-shadow: 0 0 0 4px var(--signal-dim); }
.code {
  background: #0c0c10; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9);
}
.code .bar { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: #0a0a0d; }
.code .bar i { width: 11px; height: 11px; border-radius: 99px; background: var(--surface-2); display: inline-block; }
.code .bar .fn { margin-left: 10px; color: var(--mute); font-size: 12px; }
.code pre { padding: 20px 22px; overflow-x: auto; color: #C9CDD6; }
.code .k { color: var(--signal); } .code .s { color: #9BE7A0; } .code .c { color: var(--mute); } .code .p { color: #7FB0FF; } .code .n { color: #E0A26B; }

/* CTA */
.cta { position: relative; border: 1px solid var(--line-strong); border-radius: 20px; padding: 64px 40px; text-align: center; overflow: hidden; background: radial-gradient(ellipse 80% 140% at 50% 0%, var(--signal-dim), transparent 60%), var(--elev); }
.cta h2 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -0.03em; line-height: 1.02; }
.cta p { color: var(--dim); margin: 16px auto 30px; max-width: 46ch; font-size: 18px; }
.cta .hero-actions { justify-content: center; }

/* waitlist form */
.waitlist { display: flex; gap: 10px; max-width: 460px; margin: 30px auto 0; flex-wrap: wrap; justify-content: center; }
.waitlist input[type="email"] {
  flex: 1 1 240px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 12px 16px; color: var(--text); font-family: var(--body); font-size: 15px;
  outline: none; transition: border-color .16s, box-shadow .16s;
}
.waitlist input[type="email"]:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.waitlist input[type="email"]::placeholder { color: var(--mute); }
.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.waitlist button { flex: 0 0 auto; }
.waitlist button:disabled { opacity: .7; cursor: default; }
.waitlist-msg { flex-basis: 100%; margin: 4px 0 0; font-family: var(--mono); font-size: 13px; min-height: 1.1em; }
.waitlist-msg.ok { color: var(--signal); }
.waitlist-msg.err { color: #ff6b6b; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 62px 0 40px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.foot-grid .about p { color: var(--mute); font-size: 14px; margin-top: 14px; max-width: 30ch; }
.foot-col h4 { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); margin-bottom: 16px; }
.foot-col a { display: block; color: var(--dim); font-size: 14.5px; padding: 5px 0; transition: color .15s; }
.foot-col a:hover { color: var(--signal); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.foot-bottom p { font-family: var(--mono); font-size: 12px; color: var(--mute); }

/* ---------- legal pages ---------- */
.legal { padding: 70px 0 40px; }
.legal .col { max-width: 760px; margin: 0 auto; }
.legal .eyebrow { margin-bottom: 14px; }
.legal h1 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1.03; }
.legal .updated { font-family: var(--mono); font-size: 13px; color: var(--mute); margin-top: 16px; }
.legal .note { margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line-strong); border-left: 3px solid var(--signal); border-radius: 8px; background: var(--signal-dim); color: var(--dim); font-size: 14.5px; }
.legal .body { margin-top: 40px; }
.legal .body h2 { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; margin: 42px 0 12px; scroll-margin-top: 90px; }
.legal .body h3 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 26px 0 8px; }
.legal .body p, .legal .body li { color: var(--dim); font-size: 16px; }
.legal .body p { margin: 12px 0; }
.legal .body ul, .legal .body ol { margin: 12px 0 12px 22px; display: grid; gap: 8px; }
.legal .body a { color: var(--signal); border-bottom: 1px solid var(--signal-dim); }
.legal .body strong { color: var(--text); }
.legal .body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.legal .body th, .legal .body td { text-align: left; padding: 11px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal .body th { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); background: var(--elev); }
.legal .body td { color: var(--dim); }
.ph { color: var(--signal) !important; font-family: var(--mono); font-size: 0.86em; background: var(--signal-dim); padding: 1px 6px; border-radius: 5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .showcase, .foot-grid { grid-template-columns: 1fr; }
  .converge { max-width: 420px; margin: 8px auto 0; }
  .features { grid-template-columns: 1fr 1fr; }
  nav.top { display: none; }
  .foot-grid { gap: 34px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .features { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 24px; }
  .cta { padding: 44px 22px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .pulse, .core-ring { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
