/* Same palette as the terminal (src/app/globals.css): near-black surfaces,
   brand blue #004aad, cool blue-grey text ramp. */
:root {
  --bg: #07080b;
  --card: #0c0f14;
  --raised: #141922;
  --text: #e7eaf0;
  --muted: #9aa4b2;
  --faint: #6b7482;
  --primary: #004aad;
  --primary-hover: #0066cc;
  --primary-light: #5b95ff;
  --positive: #34d399;
  --mark: #d9d9d9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 8, 11, 0.85);
  backdrop-filter: blur(8px);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; fill: var(--mark); }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a:not(.btn) { color: var(--muted); font-size: 15px; }
.nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px;
  border-radius: 8px;
  background: var(--primary); color: #fff;
  font-weight: 600; font-size: 15px;
  border: 0;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn-small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-ghost { background: var(--raised); color: var(--text); }
.btn-ghost:hover { background: #1a2029; }

/* Hero */
.hero { padding: 0 0 64px; text-align: center; }

/* Live chart behind the headline (hero-bg.js). The fade sits between the
   canvas and the text: darkest right behind the copy, clear at the sides,
   and blending into the page at the top and bottom edges. */
.hero-stage { position: relative; overflow: hidden; isolation: isolate; }
.hero-chart, .hero-fade, .hero-chips { position: absolute; inset: 0; pointer-events: none; }
.hero-chart { z-index: -3; }
.hero-fade {
  z-index: -2;
  background:
    radial-gradient(ellipse 46% 52% at 50% 46%, rgba(7, 8, 11, 0.92) 0%, rgba(7, 8, 11, 0.7) 45%, rgba(7, 8, 11, 0) 100%),
    linear-gradient(to bottom, var(--bg) 0%, rgba(7, 8, 11, 0) 8%, rgba(7, 8, 11, 0) 78%, var(--bg) 100%);
}
.hero-chips { z-index: -1; will-change: transform; }
.hero-copy { position: relative; padding-top: 56px; padding-bottom: 136px; }

/* PnL readouts: bare text, no card or glow. The dark text-shadow is only
   there to lift the text off whatever candle happens to sit behind it. */
.chip {
  position: absolute;
  display: flex; align-items: baseline; gap: 10px;
  font-size: 15px; line-height: 1; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(7, 8, 11, 0.9), 0 0 12px rgba(7, 8, 11, 0.8);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chip-in { opacity: 0.9; transform: none; }
.chip-out { opacity: 0; transform: translateY(-16px); }
.chip-tk { font-weight: 600; color: var(--muted); }
.chip-pnl { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip-up .chip-pnl { color: var(--positive); }
.chip-down .chip-pnl { color: #f87171; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 24px; padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 25, 34, 0.85); color: var(--muted); font-size: 13px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); }
h1 {
  margin: 0 auto; max-width: 760px;
  font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700;
}
.lead { margin: 24px auto 0; max-width: 640px; color: var(--muted); font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.shot {
  margin: 56px 0 0; padding: 8px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 30px 80px -20px rgba(0, 74, 173, 0.35);
}
.shot img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* Sections */
/* Anchor jumps (Product, Contact, Request early access) land below the
   sticky header instead of under it. */
.section { padding: 72px 0; scroll-margin-top: 64px; }
h2 { margin: 0 0 32px; font-size: clamp(26px, 3.5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 24px; border-radius: 12px; background: var(--card); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.two-col h2 { margin-bottom: 16px; }
.two-col p { margin: 0; color: var(--muted); font-size: 17px; }
.facts dl { margin: 0; padding: 6px 0; border-radius: 12px; background: var(--card); }
.facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

/* Early access */
.access-card {
  max-width: 560px; margin: 0 auto; padding: 40px 32px;
  text-align: center;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 30px 80px -30px rgba(0, 74, 173, 0.45);
}
.access-card h2 { margin-bottom: 12px; }
.access-lead { margin: 0 0 28px; color: var(--muted); }
/* Continue with X: white, like X's own sign-in buttons, so it reads as the
   main way in next to the blue email button. */
.btn-x {
  width: 100%; gap: 10px; cursor: pointer; font-family: inherit;
  background: #f5f6f8; color: #07080b;
}
.btn-x:hover { background: #ffffff; }
.btn-x:disabled { opacity: 0.6; cursor: default; }
.btn-x svg { width: 16px; height: 16px; fill: currentColor; }
.access-or { margin: 16px 0; color: var(--faint); font-size: 13px; }
.access-form { display: flex; gap: 8px; }
.access-form input[type="email"] {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  border: 0; border-radius: 8px;
  background: var(--raised); color: var(--text);
  /* 16px, not less: iOS Safari zooms the whole page into any field set
     smaller when it is tapped, and the page then slides around sideways. */
  font: inherit; font-size: 16px;
}
.access-form input[type="email"]::placeholder { color: var(--faint); }
.access-form input[type="email"]:focus { outline: 2px solid var(--primary-light); outline-offset: 1px; }
.access-form button { flex: none; cursor: pointer; font-family: inherit; }
.access-form button:disabled { opacity: 0.6; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.access-status { min-height: 24px; margin: 14px 0 0; font-size: 15px; }
.access-status.ok { color: var(--positive); }
.access-status.err { color: #f87171; }
.access-fine { margin: 8px 0 0; color: var(--faint); font-size: 13px; }
.access-fine a { color: var(--text); }

.notice { padding: 40px 0; }
.notice p { margin: 0; color: var(--muted); font-size: 15px; }
.notice strong { color: var(--text); }

/* Footer */
.foot { padding: 28px 0; color: var(--faint); font-size: 14px; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--muted); }

/* Terms page */
.doc { padding: 64px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { margin: 0; text-align: left; font-size: clamp(32px, 5vw, 44px); }
.doc .updated { margin: 8px 0 40px; color: var(--faint); font-size: 14px; }
.doc h2 { margin: 40px 0 12px; font-size: 21px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 20px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .nav a[href="#product"] { display: none; }
  .hero { padding: 0 0 40px; }
  .hero-copy { padding-top: 40px; padding-bottom: 88px; }
  /* The copy spans the whole width here, so the chart steps further back. */
  .hero-chart { opacity: 0.5; }
  .hero-fade {
    background:
      radial-gradient(ellipse 95% 42% at 50% 44%, rgba(7, 8, 11, 0.85) 0%, rgba(7, 8, 11, 0.55) 60%, rgba(7, 8, 11, 0) 100%),
      linear-gradient(to bottom, var(--bg) 0%, rgba(7, 8, 11, 0) 8%, rgba(7, 8, 11, 0) 78%, var(--bg) 100%);
  }
  .lead { font-size: 16px; }
  .cta .btn { width: 100%; }
  .access-card { padding: 32px 20px; }
  .access-form { flex-direction: column; }
  /* Stacked, `flex: 1` would apply to the height and squash the field to
     its text line; it takes the full width at its own 44px instead. */
  .access-form input[type="email"] { flex: none; width: 100%; }
}
