:root {
  --ink: #0C1A2B;
  --panel: #12263C;
  --line: #21405F;
  --mint: #1DE59F;
  --teal: #0E9E82;
  --deep: #0B5F57;
  --bear: #F2617A;
  --text: #E7F0EC;
  --muted: #93A9BA;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(12, 26, 43, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(33, 64, 95, 0.6);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark { font: 800 22px/1 var(--display); letter-spacing: -0.02em; }
.wordmark span { color: var(--mint); }
.brand.small .wordmark { font-size: 17px; }
.top-cta {
  font-weight: 600; font-size: 15px; text-decoration: none;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
}
.top-cta:hover { border-color: var(--mint); color: var(--mint); }
.top-links { display: flex; align-items: center; gap: 6px; }
.top-link { font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 10px; color: var(--muted); }
.top-link:hover { color: var(--text); }
.wl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--muted); background: rgba(255,255,255,.03); }

/* Hero */
.hero {
  display: grid; gap: 40px;
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(56px, 8vw, 104px);
  max-width: 1240px; margin: 0 auto;
}
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; color: var(--muted); font-size: 15px;
}
.pulse {
  width: 9px; height: 9px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 0 rgba(29, 229, 159, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(29, 229, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 229, 159, 0); }
}
h1 {
  font-size: clamp(56px, 13vw, 124px);
  font-weight: 800; letter-spacing: -0.045em;
  margin-bottom: 22px;
}
.lede { font-size: clamp(17px, 2.2vw, 20px); color: #C9D8D2; max-width: 34em; margin: 0 0 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  background: var(--mint); color: var(--ink);
  font: 700 17px/1 var(--body); text-decoration: none;
  border: 0; border-radius: 12px; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #45F0B5; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Chart */
.chart-wrap {
  position: relative; margin: 0;
  background: linear-gradient(180deg, #11253A 0%, #0E2033 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 14px 10px;
  min-width: 0;
}
.chart-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 2px 4px 8px; font-size: 13px; color: var(--muted);
}
.ticker { font-weight: 700; color: var(--text); font-size: 15px; }
.ticker em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 6px; }
#chart { display: block; width: 100%; height: clamp(280px, 62vw, 400px); }
.chart-head .sim { margin-left: auto; }
.replay {
  flex: none;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  font: 600 13px/1 var(--body); padding: 8px 12px; cursor: pointer;
}
.replay:hover { color: var(--text); border-color: var(--muted); }

.signal {
  margin-top: 10px;
  background: rgba(10, 22, 36, 0.9);
  border: 1px solid var(--mint);
  border-radius: 14px; padding: 12px 14px;
  transition: border-color .3s;
}
.signal.pop { animation: pop .4s cubic-bezier(.2, .9, .3, 1.2); }
.signal.watching { border-color: var(--line); }
.signal.watching .tag { background: var(--line); color: var(--text); }
.signal.watching .signal-title { color: var(--muted); font-weight: 500; }
.signal.hit { border-color: #8CF5CF; }
@keyframes pop { from { opacity: .3; transform: scale(.97); } }
.signal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag {
  font-size: 12px; font-weight: 700; color: var(--ink);
  background: var(--mint); border-radius: 6px; padding: 3px 8px;
}
.score { font-size: 12px; color: var(--muted); }
.signal-title { margin: 8px 0 8px; font: 700 16px/1.25 var(--display); }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 12px; margin: 0; }
.signal-grid dt { font-size: 11px; color: var(--muted); }
.signal-grid dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }

/* Stack demo */
.stack-demo {
  display: grid; gap: 40px; align-items: center;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--gutter);
  border-top: 1px solid var(--line);
}
h2 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 18px; }
.stack-copy > p { color: #C9D8D2; max-width: 32em; margin: 0 0 26px; }
.toggles { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.toggles button {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 16px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  font: 500 16px/1.3 var(--body); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.toggles button::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line); transition: all .2s;
}
.toggles button[aria-pressed="true"] { border-color: var(--teal); background: #10302F; }
.toggles button[aria-pressed="true"]::before {
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%230C1A2B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color: var(--mint);
}
.stack-visual { text-align: center; }
#stackSvg { width: min(300px, 80%); height: auto; margin: 0 auto; display: block; overflow: visible; }
#layers polyline { transition: stroke .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.25), opacity .35s; }
.grade { margin-top: 10px; }
.grade-letter {
  display: block; font: 800 clamp(72px, 14vw, 104px)/1 var(--display);
  letter-spacing: -0.04em; color: var(--mint); transition: color .3s;
}
.grade-letter.low { color: var(--muted); }
.grade-note { display: block; color: #C9D8D2; margin-top: 6px; min-height: 1.6em; }
.illus { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* Inside */
.inside {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--gutter);
  border-top: 1px solid var(--line);
}
.features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0 48px; }
.features li { padding: 22px 0; border-top: 1px solid var(--line); }
.features h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.features p { margin: 0; color: #B9CAC4; max-width: 34em; }

/* Honest */
.honest {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  border-top: 1px solid var(--line);
}
.honest-big { font: 800 clamp(28px, 4.6vw, 46px)/1.1 var(--display); letter-spacing: -0.025em; margin: 0 0 14px; max-width: 18em; }
.honest p:last-child { color: #C9D8D2; max-width: 34em; margin: 0; }

/* Waitlist */
.waitlist {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--gutter);
  border-top: 1px solid var(--line);
}
.waitlist > p { color: #C9D8D2; max-width: 32em; margin: 0 0 28px; }
form { display: grid; gap: 18px; max-width: 520px; }
.hp { position: absolute; left: -9999px; }
.field label, legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 16px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  font: 400 17px var(--body);
}
input[type="email"]::placeholder { color: #6E8698; }
input[type="email"]:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(29, 229, 159, 0.2); }
input[aria-invalid="true"] { border-color: var(--bear); }
.trades { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trades legend { width: 100%; }
.trades label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; min-height: 46px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 500; cursor: pointer;
}
.trades input { accent-color: var(--mint); width: 18px; height: 18px; margin: 0; }
.trades label:has(input:checked) { border-color: var(--teal); background: #10302F; }
.form-msg { margin: 0; min-height: 1.6em; font-weight: 500; }
.form-msg.ok { color: var(--mint); }
.form-msg.err { color: var(--bear); }

/* Footer */
.foot {
  max-width: 1240px; margin: 0 auto;
  padding: 36px var(--gutter) max(36px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.foot p { max-width: 62em; margin: 14px 0 0; }

/* Wider screens */
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1.15fr; align-items: center; gap: 56px; }
  .stack-demo { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .features { grid-template-columns: 1fr 1fr; }
  .waitlist form { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .top-cta { padding: 7px 11px; font-size: 14px; }
  .top-link { padding: 7px 6px; font-size: 14px; }
  .brand img { width: 26px; height: 31px; }
  .wordmark { font-size: 20px; }
  .signal { padding: 10px 12px; }
  .signal-grid dd { font-size: 14px; }
  .chart-head .sim { display: none; }
  .chart-head .ticker::after { content: " simulated"; font-weight: 500; font-size: 12px; color: var(--muted); }
  .signal-title { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
