/* ============================================
   BETTORBRAIN — Design System
   Dark editorial / sharp money aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=Barlow:wght@300;400;500;600&display=swap');

/* ---- Variables ---- */
:root {
  --bg:         #080c10;
  --bg-card:    #0e1318;
  --bg-raised:  #141a21;
  --border:     rgba(255,255,255,0.07);
  --border-mid: rgba(255,255,255,0.13);
  --gold:       #d4a843;
  --gold-light: #f0c96a;
  --green:      #00c896;
  --green-dark: #00a07a;
  --red:        #e05252;
  --text:       #f0ece4;
  --text-muted: #7a8390;
  --text-dim:   #3d4550;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --radius:     6px;
  --radius-lg:  12px;
  --max-w:      720px;
  --transition: 0.18s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

/* ---- Noise texture overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ---- Grid lines background ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout ---- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */
.nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--green); }
.nav-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.display {
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-transform: uppercase;
}

.display .accent { color: var(--gold); }
.display .accent-green { color: var(--green); }

.headline {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.subhead {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
  max-width: 540px;
}

/* ---- Eyebrow label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 16px 32px;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #080c10;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-mid);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.btn-green {
  background: var(--green);
  color: #080c10;
}
.btn-green:hover {
  background: #00dea8;
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 20px;
  padding: 20px 40px;
}

.btn-full { width: 100%; }

.btn-arrow::after {
  content: '→';
  font-family: var(--font-body);
  font-weight: 400;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card-hover {
  transition: var(--transition);
  cursor: pointer;
}
.card-hover:hover {
  border-color: var(--border-mid);
  background: var(--bg-raised);
  transform: translateY(-2px);
}

/* ---- Track selector cards ---- */
.track-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

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

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: var(--transition);
}

.track-card.sports::before { background: var(--gold); }
.track-card.racing::before { background: var(--green); }

.track-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-3px);
}

.track-card:hover::before { opacity: 1; }

.track-card.sports:hover { border-color: rgba(212,168,67,0.3); }
.track-card.racing:hover { border-color: rgba(0,200,150,0.3); }

.track-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.track-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: var(--text);
}

.track-card.sports .track-name { color: var(--gold); }
.track-card.racing .track-name { color: var(--green); }

.track-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.track-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.type-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---- Stats bar ---- */
.stats-bar {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 48px 0;
}

.stat-item {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- How it works ---- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 40px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: var(--text-dim);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- Quiz styles ---- */
.quiz-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.progress-wrap {
  margin-bottom: 8px;
}

.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quiz-body {
  padding: 48px 0;
  flex: 1;
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 32px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-btn {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

.answer-btn:hover {
  border-color: var(--gold);
  background: var(--bg-raised);
}

.answer-btn.selected {
  border-color: var(--gold);
  background: rgba(212,168,67,0.08);
}

.answer-letter {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dim);
  flex-shrink: 0;
  width: 20px;
  margin-top: 1px;
  transition: var(--transition);
}

.answer-btn:hover .answer-letter,
.answer-btn.selected .answer-letter {
  color: var(--gold);
}

.quiz-footer {
  padding: 20px 0 40px;
  border-top: 1px solid var(--border);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ---- Email gate ---- */
.gate-wrap {
  text-align: center;
  padding: 60px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gate-reveal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin: 24px 0;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.gate-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--bg-card) 60%);
  backdrop-filter: blur(4px);
}

.gate-type-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  filter: blur(5px);
  user-select: none;
}

.gate-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.email-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}

.email-input::placeholder { color: var(--text-muted); }

.input-group .btn {
  border-radius: 0;
  font-size: 14px;
  padding: 14px 20px;
}

.gate-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ---- Results page ---- */
.results-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}

.rarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(0,200,150,0.3);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.rarity-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.results-type {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 80px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--gold);
  margin-bottom: 12px;
}

.results-tagline {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}

.results-profile {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  max-width: 580px;
  border-left: 3px solid var(--gold);
  padding-left: 20px;
}

/* ---- Tips section ---- */
.tips-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.tip-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.tip-item:last-child { border-bottom: none; }

.tip-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--text-dim);
  flex-shrink: 0;
  width: 32px;
  line-height: 1;
  margin-top: 2px;
}

.tip-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

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

/* ---- Axis grid ---- */
.axis-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.axis-grid-wrap {
  max-width: 360px;
  margin: 24px auto 0;
}

/* ---- Sportsbook CTA ---- */
.cta-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-book-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 6px;
}

.cta-reason {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
}

/* ---- Share section ---- */
.share-section {
  padding: 48px 0;
}

.share-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ---- Footer ---- */
.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-text {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.7;
  text-align: center;
}

.footer-text a {
  color: var(--text-muted);
  text-decoration: none;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.25s; }
.fade-up-3 { animation-delay: 0.4s; }
.fade-up-4 { animation-delay: 0.55s; }
.fade-up-5 { animation-delay: 0.7s; }

/* ---- Utility ---- */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-muted { color: var(--text-muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
