/* QuantumCat marketing site — same design language as the terminal:
   minimal, premium, glass. Hairlines over boxes, whitespace over chrome. */

/* Palette = the terminal's own design tokens (src/design/tokens.css).
   INK & TEAL: deep blue-black ink, one crisp cyan-teal accent. The site IS
   the app's look — nothing here that the terminal doesn't wear itself. */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --maxw: 1060px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e14;                          /* app --bg-solid */
  --bg-2: #12161e;
  --panel: rgba(170, 190, 220, 0.05);     /* app --panel */
  --panel-strong: rgba(170, 190, 220, 0.09);
  --hairline: rgba(148, 163, 199, 0.11);
  --hairline-strong: rgba(148, 163, 199, 0.20);
  --text: rgba(232, 238, 248, 0.94);
  --text-2: rgba(176, 190, 214, 0.60);
  --text-3: rgba(148, 163, 199, 0.38);
  --accent: #22c3d6;                      /* ink teal */
  --accent-soft: rgba(34, 195, 214, 0.14);
  --up: #16c784;
  --down: #f05252;
  --buy: #3b9eff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --glow-a: rgba(34, 195, 214, 0.10);     /* teal breath, not purple */
  --glow-b: rgba(59, 158, 255, 0.06);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f9fafd;                          /* app light --bg-solid */
  --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --hairline: rgba(13, 27, 48, 0.12);
  --hairline-strong: rgba(13, 27, 48, 0.24);
  --text: #0d1b30;
  --text-2: rgba(13, 27, 48, 0.64);
  --text-3: rgba(13, 27, 48, 0.42);
  --accent: #0e7490;
  --accent-soft: rgba(14, 116, 144, 0.14);
  --up: #059669;
  --down: #dc2f42;
  --buy: #1667d9;
  --shadow: 0 24px 80px rgba(13, 27, 48, 0.14);
  --glow-a: rgba(14, 116, 144, 0.07);
  --glow-b: rgba(22, 103, 217, 0.05);
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 640px at 20% -10%, var(--glow-a), transparent 60%),
    radial-gradient(900px 560px at 105% 20%, var(--glow-b), transparent 60%);
}

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.dim { color: var(--text-3); }
kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 1px 6px;
  border: 1px solid var(--hairline-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel);
}
code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 10px;
  margin-top: 8px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-2);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(20px, 5vw, 48px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--hairline);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand em { color: var(--accent); font-style: normal; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ghost {
  background: none;
  border: 1px solid var(--hairline);
  color: var(--text-2);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 15px;
}
.ghost:hover { border-color: var(--hairline-strong); color: var(--text); }

.btn-accent, .btn-ghost {
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 9px;
  transition: filter 0.15s var(--ease), background 0.15s var(--ease);
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.12); }
.btn-ghost { border: 1px solid var(--hairline-strong); color: var(--text); }
.btn-ghost:hover { background: var(--panel); }
.lg { padding: 12px 26px; font-size: 15px; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vh, 110px) 20px 30px;
  text-align: center;
}
.badge {
  display: inline-block;
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 750;
}
.hero .sub {
  max-width: 640px;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: clamp(15px, 2vw, 17.5px);
}
.hero .sub strong { color: var(--text); }
.cta-row { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-foot { margin-top: 26px; font-size: 13px; color: var(--text-3); }

/* ---------- hero screenshot ----------
   A real capture of the running macOS terminal (website/hero-app.png). Framed
   with a hairline + teal glow so it floats; the image already carries the
   app's own window chrome (traffic lights, titlebar). */
.hero-shot {
  margin: 48px auto 0;
  max-width: 780px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0e14;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(34, 195, 214, 0.06),
    0 30px 90px -40px rgba(34, 195, 214, 0.22);
}
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- brokers strip ---------- */
.brokers {
  max-width: var(--maxw);
  margin: 70px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.brokers .dim { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.broker-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.broker-badges span {
  padding: 6px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}
.broker-badges .soon { color: var(--text-3); border-style: dashed; font-weight: 400; }

/* ---------- blocks ---------- */
.block {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 11vh, 130px) 20px 0;
}
h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 730;
}
.lead { max-width: 620px; color: var(--text-2); margin-top: 16px; }
.lead strong { color: var(--text); }
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 10px;
}
.fine { font-size: 12.5px; color: var(--text-3); margin-top: 18px; }

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 46px;
  border-top: 1px solid var(--hairline);
}
.grid3 + .grid3 { margin-top: 0; }
.cell { padding: 26px 26px 30px 0; border-bottom: 1px solid var(--hairline); }
.cell + .cell { padding-left: 26px; border-left: 1px solid var(--hairline); }
.cell h3 { font-size: 16.5px; letter-spacing: -0.01em; margin-bottom: 8px; }
.cell p { font-size: 14px; color: var(--text-2); }
.tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--up);
}
.tag.soon { color: var(--text-3); }
/* inline capability tag inside feature headings (Protection section) */
.cell h3 .tag {
  margin: 0 0 0 8px;
  font-size: 10px;
  vertical-align: 2px;
  color: var(--accent);
}

/* ---------- pulse ---------- */
.pulse-block {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.trail-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 34px;
}
.trail-list li {
  display: flex;
  flex-direction: column;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.trail-list b { font-size: 13.5px; }
.trail-list span { font-size: 12.5px; color: var(--text-3); }
.pulse-gauge {
  text-align: center;
  padding: 40px 20px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
#needle { transition: transform 1.6s var(--ease); }
.gauge-t { fill: var(--text-3); font-size: 10px; font-family: var(--font-mono); }
.gauge-read { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-top: 6px; }
.gauge-read b { font-size: 34px; letter-spacing: -0.02em; }
.gauge-read span { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.gauge-conf {
  height: 3px;
  background: var(--hairline);
  border-radius: 2px;
  margin: 14px auto 8px;
  max-width: 180px;
  overflow: hidden;
}
.gauge-conf i {
  display: block;
  height: 100%;
  width: 78%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1.6s var(--ease);
}

/* ---------- builder mock ---------- */
.builder { margin-top: 40px; font-size: 13px; }
.b-rail {
  border-left: 2px solid var(--accent-soft);
  padding: 6px 0 6px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 660px;
}
.b-rail.inner { margin-left: 6px; }
.b-group {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.b-group.any { color: var(--up); }
.b-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.b-chip {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--text);
}
.b-op { color: var(--text-3); font-family: var(--font-mono); }
.b-row.action { margin-top: 6px; }
.b-do {
  background: var(--down);
  color: #fff;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 46px; border-top: 1px solid var(--hairline); }
.step { padding: 28px 26px 34px 0; }
.step + .step { padding-left: 26px; border-left: 1px solid var(--hairline); }
.step i {
  font-style: normal;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
}
.step h3 { margin: 8px 0; font-size: 16.5px; }
.step p { font-size: 14px; color: var(--text-2); }

/* ---------- pricing ---------- */
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 42px; max-width: 780px; }
.price-card {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 30px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}
.price-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); }
.price { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; margin: 10px 0 4px; }
.price span { font-size: 14px; font-weight: 500; color: var(--text-3); }
.price-card ul { list-style: none; padding: 0; margin: 14px 0 26px; }
.price-card li { padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; color: var(--text-2); }
.price-card a { text-align: center; margin-top: auto; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.faq details:first-of-type { margin-top: 34px; border-top: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 20px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--text-2); font-size: 14.5px; max-width: 720px; }

/* ---------- final cta / footer ---------- */
.final-cta { text-align: center; padding: clamp(80px, 13vh, 150px) 20px; }
.final-cta h2 { margin-bottom: 28px; }

footer {
  border-top: 1px solid var(--hairline);
  padding: 40px clamp(20px, 5vw, 48px) 50px;
  max-width: 100%;
}
.foot-brand { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.foot-brand .brand { font-size: 15px; gap: 0; }
.foot-brand .dim { font-size: 13px; }
.foot-links { display: flex; gap: 20px; margin: 18px 0 26px; }
.foot-links a { color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.foot-links a:hover { color: var(--text); }
.legal { font-size: 11.5px; line-height: 1.7; color: var(--text-3); max-width: 860px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #needle { transition: none; }
}

/* price flash in mockup */
@keyframes flashUp { from { color: var(--up); } }
@keyframes flashDown { from { color: var(--down); } }
.f-up { animation: flashUp 0.7s var(--ease); }
.f-down { animation: flashDown 0.7s var(--ease); }

/* ---------- live tape strip (hero) ---------- */
.tape {
  display: flex;
  align-items: center;
  gap: 26px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 34px auto 0;
  max-width: 860px;
  width: fit-content;
  padding: 10px 22px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  font-size: 12.5px;
}
.tape::-webkit-scrollbar { display: none; }
.tape-item { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.tape-item b { font-size: 11.5px; letter-spacing: 0.04em; color: var(--text-2); font-weight: 700; }
.t-px { color: var(--text); }
.t-chg { font-size: 11.5px; }
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--accent);
  white-space: nowrap;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px transparent; }
}

/* ---------- trailing-stop ratchet (protection) ---------- */
.ratchet-panel {
  margin-top: 42px;
  padding: 26px 22px 18px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.ratchet-panel svg { display: block; width: 100%; height: 200px; }
.ratchet-panel .fine { margin-top: 12px; text-align: center; }
.r-label { font-family: var(--font-mono); font-size: 10px; }
#r-stop { stroke-dasharray: 5 4; }

/* ---------- live intel board (intel) ---------- */
.intel-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 42px;
}
.ib-card {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 16px 18px;
}
.ib-title {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
}
.ib-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  transition: color 0.5s var(--ease);
}
.ib-breadth { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ib-bar {
  flex: 1;
  height: 6px;
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel-strong);
}
.ib-bar i { display: block; height: 100%; transition: width 1.4s var(--ease); }
#ib-bar-a { background: var(--up); width: 66%; }
#ib-bar-n { background: var(--text-3); width: 8%; }
#ib-bar-d { background: var(--down); width: 26%; }
.ib-movers { margin-top: 12px; font-size: 11.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ib-stats { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.ib-stats b { color: var(--text); font-weight: 600; }
.ib-stats .down { color: var(--down); }
#ib-spark { width: 100%; height: 48px; }
#ib-spark path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.reveal.in #ib-spark path { animation: sparkDraw 2.2s var(--ease) forwards; }
@keyframes sparkDraw { to { stroke-dashoffset: 0; } }
.ib-card .fine { margin-top: 8px; display: block; }

/* value tick flashes (tape + board) */
@keyframes tickUp { from { color: var(--up); } }
@keyframes tickDown { from { color: var(--down); } }
.tick-up { animation: tickUp 0.8s var(--ease); }
.tick-down { animation: tickDown 0.8s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .reveal.in #ib-spark path { animation: none; stroke-dashoffset: 0; }
  .ib-bar i, #needle { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .tape { justify-content: flex-start; }
  .intel-board { grid-template-columns: 1fr; }
  .t-body { grid-template-columns: 1fr; }
  .t-watch { display: none; }
  .t-ticket { border-left: none; border-top: 1px solid var(--hairline); }
  .pulse-block { grid-template-columns: 1fr; gap: 40px; }
  .grid3, .steps, .price-row { grid-template-columns: 1fr; }
  .cell, .step { padding: 22px 0; }
  .cell + .cell, .step + .step { padding-left: 0; border-left: none; }
  .trail-list { grid-template-columns: 1fr; }
}
