/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --fg: #f0ece0;
  --fg-muted: #888070;
  --accent: #F5A623;
  --accent-dim: rgba(245, 166, 35, 0.15);
  --border: rgba(240, 236, 224, 0.08);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.15);
  --amber: #F5A623;
  --red: #f87171;
  --warm: #fb923c;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-head);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ─── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245, 166, 35, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.08em;
}

/* ─── Hero ─── */
.hero {
  padding: 5rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(245,166,35,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
}
.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}
.hero-title {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 44ch;
  margin-bottom: 3rem;
  font-weight: 400;
}
.hero-stat-row {
  display: flex;
  gap: 2.5rem;
}
.hero-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.hero-stat-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg);
}
.hero-stat-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  max-width: 10ch;
}
.hero-case-study-link {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}
.hero-case-study-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,166,35,0.3);
  transition: border-color 0.15s;
}
.hero-case-study-link a:hover {
  border-color: var(--accent);
}

/* ─── Terminal ─── */
.terminal-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(245, 166, 35, 0.06), 0 20px 60px rgba(0,0,0,0.5);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-left: auto;
  margin-right: auto;
}
.terminal-body { padding: 1rem; }
.spread-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.4fr 0.8fr;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  align-items: center;
  margin-bottom: 0.3rem;
}
.spread-row--header { color: var(--fg-muted); font-size: 0.6rem; letter-spacing: 0.1em; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; padding-bottom: 0.75rem; }
.spread-row--active { background: var(--accent-dim); border: 1px solid rgba(245,166,35,0.2); }
.spread-row--alerting { border-color: rgba(245,166,35,0.3); box-shadow: 0 0 12px rgba(245,166,35,0.4); animation: spread-alert-pulse 1.5s ease-in-out infinite; }
@keyframes spread-alert-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(245,166,35,0.3); }
  50% { box-shadow: 0 0 18px rgba(245,166,35,0.6); }
}
.pair-name { color: var(--fg); font-weight: 500; }
.price-buy { color: var(--green); }
.price-sell { color: var(--fg); }
.spread-val { color: var(--accent); font-weight: 500; }
.status-dot {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.4rem;
  border-radius: 100px;
  text-align: center;
}
.status-dot.live { background: var(--green-dim); color: var(--green); }
.status-dot.warm { background: rgba(251,146,60,0.15); color: var(--warm); }
.status-dot.neutral { background: rgba(136,128,112,0.1); color: var(--fg-muted); }
.terminal-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74,222,128,0.4);
  animation: pulse-anim 2s infinite;
}
@keyframes pulse-anim {
  0% { box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  70% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.latency { margin-left: auto; color: var(--accent); }

/* ─── Spreadboard ─── */
.spreadboard {
  padding: 5rem 4rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-surface) 100%);
}
.spreadboard-inner { max-width: 1200px; }
.spreadboard-header { margin-bottom: 3rem; }
.spreadboard-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.arb-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.arb-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s;
}
.arb-card:hover { border-color: rgba(245,166,35,0.2); }
.arb-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.arb-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.arb-card p { font-size: 0.875rem; color: var(--fg-muted); line-height: 1.6; margin-bottom: 1.5rem; }
.arb-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.2);
  background: var(--accent-dim);
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

/* ─── How ─── */
.how {
  padding: 5rem 4rem;
  border-top: 1px solid var(--border);
}
.how-inner { max-width: 1200px; }
.how-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.8;
}
.how-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
}
.how-steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.step {
  flex: 1;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 1rem;
}
.step-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.step-body p { font-size: 0.875rem; color: var(--fg-muted); line-height: 1.65; }
.step-connector {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, rgba(245,166,35,0.3), rgba(245,166,35,0.05));
  flex-shrink: 0;
}

/* ─── Edge ─── */
.edge {
  padding: 5rem 4rem;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.edge-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  max-width: 1200px;
}
.edge-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.8;
}
.edge-left h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.edge-body { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.7; margin-bottom: 2.5rem; }
.edge-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.edge-col {
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.edge-col--us { background: var(--accent-dim); border-color: rgba(245,166,35,0.2); }
.edge-col--them { background: var(--bg-elevated); }
.edge-col-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 1rem; font-family: var(--font-mono); }
.edge-col ul { list-style: none; }
.edge-col li {
  font-size: 0.75rem;
  color: var(--fg-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.edge-col li:last-child { border-bottom: none; }
.edge-right { display: flex; flex-direction: column; gap: 1.5rem; }
.edge-block { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 1.75rem; }
.edge-stat { display: flex; flex-direction: column; gap: 0.5rem; }
.edge-num { font-family: var(--font-mono); font-size: 2rem; font-weight: 500; color: var(--accent); }
.edge-desc { font-size: 0.8rem; color: var(--fg-muted); line-height: 1.5; }

/* ─── Manifesto ─── */
.manifesto {
  padding: 5rem 4rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.manifesto-inner { max-width: 800px; }
.manifesto-quote {
  margin-bottom: 2.5rem;
  padding-left: 2rem;
  border-left: 3px solid var(--accent);
}
.manifesto-quote blockquote {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: var(--fg);
}
.manifesto-body p { font-size: 0.95rem; color: var(--fg-muted); line-height: 1.75; margin-bottom: 1.25rem; }

/* ─── Closing ─── */
.closing {
  padding: 6rem 4rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-surface) 100%);
  text-align: center;
}
.closing-inner { max-width: 700px; margin: 0 auto; }
.closing h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.closing p { font-size: 1rem; color: var(--fg-muted); margin-bottom: 2.5rem; line-height: 1.6; }
.closing-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245,166,35,0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
}

/* ─── Footer ─── */
.footer {
  padding: 2rem 4rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.footer-note { font-size: 0.75rem; color: var(--fg-muted); font-family: var(--font-mono); }

/* ─── Mobile ─── */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .hero { padding: 3rem 1.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-stat-row { gap: 1.5rem; flex-wrap: wrap; }
  .arb-cards { grid-template-columns: 1fr; }
  .how-steps { flex-direction: column; }
  .step-connector { width: 1px; height: 30px; background: linear-gradient(180deg, rgba(245,166,35,0.3), rgba(245,166,35,0.05)); }
  .edge-inner { grid-template-columns: 1fr; gap: 3rem; }
  .edge-comparison { grid-template-columns: 1fr; }
  .spreadboard, .how, .edge, .manifesto, .closing { padding: 3rem 1.5rem; }
  .footer { padding: 1.5rem; }
  .footer-inner { flex-direction: column; gap: 0.5rem; }
}
@media (max-width: 600px) {
  .spread-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .spread-row .status-dot { display: none; }
  .hero-title { font-size: 2.2rem; }
}