/* === Zion Labz — Design tokens & globals === */
:root {
  --bg: #0A0A0B;
  --bg-elev: #111113;
  --bg-elev-2: #17171A;
  --line: #1F1F23;
  --line-strong: #2A2A30;
  --ink: #F4F4F5;
  --ink-2: #B8B8BE;
  --ink-3: #6E6E76;
  --ink-4: #3F3F46;
  --accent: #1E7BFF;
  --accent-ink: #4D97FF;
  --accent-soft: rgba(30, 123, 255, 0.12);
  --accent-line: rgba(30, 123, 255, 0.28);
  --warn: #F5C518;
  --ok: #3BD07A;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  --max: 1440px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.4;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Grain overlay — pure SVG noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Typography scale */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 1px;
  box-shadow: 0 0 10px var(--accent);
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.display {
  font-size: clamp(44px, 7.2vw, 118px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 400;
}
.display .serif-it {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.h2 {
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.h3 {
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.mono { font-family: var(--font-mono); }

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.section {
  border-top: 1px solid var(--line);
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 64px 0 24px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}
.section-head .label { display: flex; flex-direction: column; gap: 8px; }
.section-head .label .num {
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.section-head .title { max-width: 900px; }
.section-head .title p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 640px;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; padding: 48px 0 20px; }
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--bg-elev);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--bg-elev-2); border-color: var(--ink-4); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(30,123,255,0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn.primary:hover { background: #398AFF; border-color: #398AFF; }
.btn .arrow {
  display: inline-flex;
  width: 16px; height: 16px;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Ticker */
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.ticker .track {
  display: flex;
  gap: 48px;
  padding: 14px 0;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.ticker .track span.k { color: var(--ink-3); }
.ticker .track span.v { color: var(--ink); }
.ticker .track span.up { color: var(--ok); }
.ticker .track span.down { color: var(--warn); }

/* Marquee hover pause */
.ticker:hover .track { animation-play-state: paused; }

/* Pulse dot */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.25; }
}
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
  box-shadow: 0 0 0 0 rgba(59,208,122,0.6);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
  opacity: 0.3;
  z-index: -1;
}

/* Grid lines helpers */
.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.4;
}

/* Card */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  transition: border-color .2s, background .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); background: var(--bg-elev-2); }

/* Utility */
.hide-sm { display: block; }
@media (max-width: 720px) { .hide-sm { display: none; } }

/* Keyboard focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection { background: var(--accent); color: #fff; }
