/* Bettor AI — landing page styles
   Aesthetic: trading terminal × sharp-money. Deep black canvas, neon green
   primary, gold for premium accents, monospace for stat blocks. Brand
   palette mirrors lib/core/theme.dart so the site reads like a continuation
   of the app, not a marketing skin. */

:root {
  --bg: #0a0a0a;
  --bg-elev: #0f0f0f;
  --bg-card: #141414;
  --border: #222222;
  --border-strong: #333333;
  --primary: #00ff85;
  --primary-dim: #00b85f;
  --premium: #ffd700;
  --premium-dim: #c5a300;
  --danger: #ff3b30;
  --text: #ffffff;
  --text-mid: #bbbbbb;
  --text-muted: #8a8a8a;   /* WCAG AA: 5.62:1 on #0a0a0a — was #777777 (4.42:1, sub-AA) */
  --text-faint: #999999;   /* WCAG AA: 6.65:1 — was #555555 (2.66:1, hard fail) */
  --max-w: 1180px;
  --pad-x: clamp(20px, 5vw, 56px);
  --space-section: clamp(80px, 12vw, 140px);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; transition: opacity 0.18s ease; }
a:hover { opacity: 0.75; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ───── Header ───── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  /* Subtle neon halo to echo the in-icon glow without doubling the canvas. */
  box-shadow: 0 0 14px rgba(0, 255, 133, 0.25);
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--text-mid);
  font-size: 13px;
  letter-spacing: 0.2px;
}

.nav a:hover { color: var(--text); opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 24px rgba(0, 255, 133, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(0, 255, 133, 0.4);
  opacity: 1;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--bg-card);
  opacity: 1;
}

/* ───── Sections ───── */

section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(0, 255, 133, 0.08);
  border: 1px solid rgba(0, 255, 133, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.kicker-gold {
  color: var(--premium);
  background: rgba(255, 215, 0, 0.06);
  border-color: rgba(255, 215, 0, 0.25);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0 0 18px 0;
  color: var(--text);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-mid);
  max-width: 640px;
  margin: 0 0 56px 0;
  line-height: 1.55;
}

/* ───── Hero ───── */

.hero {
  position: relative;
  padding-top: clamp(80px, 14vw, 160px);
  padding-bottom: clamp(80px, 12vw, 140px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(0, 255, 133, 0.12), transparent 70%),
    radial-gradient(40% 30% at 85% 30%, rgba(255, 215, 0, 0.06), transparent 70%);
  pointer-events: none;
}

.hero-icon {
  width: clamp(72px, 9vw, 110px);
  height: clamp(72px, 9vw, 110px);
  border-radius: 22px;
  margin-bottom: 28px;
  display: block;
  /* Larger glow to anchor the hero composition — the icon already has a
     halo painted in, so we layer a soft outer aura to bleed beyond its
     bounding box. */
  box-shadow:
    0 0 40px rgba(0, 255, 133, 0.35),
    0 0 80px rgba(0, 255, 133, 0.15);
  animation: heroIconPulse 4s ease-in-out infinite;
}

@keyframes heroIconPulse {
  0%, 100% {
    box-shadow:
      0 0 40px rgba(0, 255, 133, 0.35),
      0 0 80px rgba(0, 255, 133, 0.15);
  }
  50% {
    box-shadow:
      0 0 48px rgba(0, 255, 133, 0.5),
      0 0 100px rgba(0, 255, 133, 0.22);
  }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 7vw, 88px);
  letter-spacing: -3px;
  line-height: 0.95;
  margin: 0 0 24px 0;
}

.hero h1 .accent {
  color: var(--primary);
  display: inline-block;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-mid);
  max-width: 540px;
  margin: 0 0 36px 0;
  line-height: 1.5;
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.hero-meta span::before {
  content: '/ ';
  color: var(--primary);
}

/* Phone mock card — terminal style */
.phone-mock {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow:
    0 0 60px rgba(0, 255, 133, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: 'JetBrains Mono', monospace;
}

.phone-mock-q {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.phone-mock-question {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 22px;
  line-height: 1.35;
}

.phone-mock-verdict {
  border: 1px solid rgba(0, 255, 133, 0.4);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 255, 133, 0.08), transparent);
  margin-bottom: 18px;
}

.phone-mock-verdict-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.phone-mock-verdict-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 12px;
}

.phone-mock-conf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-mid);
}

.phone-mock-conf-bar {
  width: 110px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.phone-mock-conf-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 74%;
  background: linear-gradient(90deg, var(--danger), var(--premium), var(--primary));
  border-radius: 3px;
}

.phone-mock-conf-value {
  color: var(--primary);
  font-weight: 700;
}

.phone-mock-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
}

.phone-mock-row .chip {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  color: var(--premium);
  letter-spacing: 0.5px;
}

/* ───── How it works ───── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 26px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.step p {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* ───── Features (Premium grid) ───── */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: border-color 0.2s ease;
}

.feature:hover { border-color: var(--premium); }

.feature .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--premium);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.feature h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.feature p {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* ───── Stat block (data terminal) ───── */

.stat-block {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.65;
  margin-top: 40px;
}

.stat-block .divider {
  border: none;
  border-top: 1px dashed var(--border-strong);
  margin: 14px 0;
}

.stat-block .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-block .pos { color: var(--primary); }
.stat-block .neg { color: var(--danger); }
.stat-block .net { color: var(--premium); font-weight: 600; }

/* ───── FAQ ───── */

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.faq-item[open] { border-color: var(--border-strong); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  color: var(--primary);
  transition: transform 0.18s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item .answer {
  padding: 0 22px 22px;
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.55;
}

.faq-item .answer a { color: var(--primary); }

/* ───── CTA strip ───── */

.cta-strip {
  background:
    radial-gradient(70% 100% at 50% 50%, rgba(0, 255, 133, 0.12), transparent 70%),
    var(--bg-elev);
  border: 1px solid rgba(0, 255, 133, 0.25);
  border-radius: 22px;
  padding: clamp(40px, 7vw, 72px) clamp(28px, 5vw, 56px);
  text-align: center;
}

.cta-strip h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0 0 16px 0;
}

.cta-strip h2 .accent { color: var(--primary); }

.cta-strip p {
  color: var(--text-mid);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto 32px;
}

.cta-strip .hero-cta-row { justify-content: center; }

/* ───── Disclaimer band ───── */

.disclaimer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.disclaimer .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.disclaimer .badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--danger);
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
}

.disclaimer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  min-width: 280px;
}

/* ───── Footer ───── */

.site-footer {
  background: var(--bg);
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
}

.site-footer .brand { color: var(--text); }

.footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.footer-col a:hover { color: var(--text); opacity: 1; }

.footer-baseline {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

/* ───── Legal pages (privacy / terms / support) ───── */

.legal {
  padding: clamp(56px, 10vw, 110px) 0;
  max-width: 780px;
  margin: 0 auto;
}

.legal h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0 0 8px 0;
}

.legal .updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: 0.5px;
}

.legal h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 36px 0 12px 0;
  color: var(--text);
}

.legal h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 22px 0 8px 0;
  color: var(--text);
}

.legal p, .legal li {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
}

.legal ul, .legal ol { padding-left: 22px; }

.legal a { color: var(--primary); }

.legal strong { color: var(--text); font-weight: 600; }

/* Reveal-on-scroll (script.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───── Focus visibility (WCAG 2.4.7) ─────
   Browser-default outlines render orange/blue on dark UIs and get hidden by
   custom button styling. Explicit visible focus = our neon-green primary. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible {
  outline-offset: 4px;
}
.faq-item summary:focus-visible {
  outline-offset: -2px;
}

/* ───── Skip-to-content link (WCAG 2.4.1) ───── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  background: var(--primary);
  color: #000;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
  opacity: 1;
}

/* ───── Reduced motion (WCAG 2.3.3, EAA baseline) ─────
   Reviewers and a11y users disable motion globally. Strip every animation
   + transition + transform so the page renders correctly without JS-driven
   reveal. */
@media (prefers-reduced-motion: reduce) {
  .hero-icon {
    animation: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
  .step:hover {
    transform: none;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Mobile overflow guard for monospace stat tables (WCAG 1.4.10 Reflow). */
.stat-block {
  white-space: pre-wrap;
  overflow-x: auto;
}
