/* ═══════════════════════════════════════════════════════════════
   THINKING GYM — Landing Page Styles
   Dark + technical aesthetic: #0f1117 bg, #6366f1 accent
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0f1117;
  --bg-alt:      #13161f;
  --bg-card:     #1a1d29;
  --bg-card-alt: #1e2130;
  --border:      #2a2d3e;
  --border-light:#323548;
  --accent:      #6366f1;
  --accent-dim:  #4f51c4;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-soft: rgba(99, 102, 241, 0.08);
  --text:        #e2e8f0;
  --text-muted:  #8892a4;
  --text-dim:    #5a6478;
  --green:       #22c55e;
  --green-dim:   rgba(34, 197, 94, 0.15);
  --red:         #ef4444;
  --user-bg:     #1e293b;
  --ai-bg:       #1a1d29;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--mono); }

/* ── Layout ───────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  border: 1.5px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
}
.btn-primary:hover {
  background: var(--accent-dim);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-light);
  padding: 12px 22px;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}

.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Section headers ──────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-accent { color: var(--accent); }
.logo:hover { text-decoration: none; }

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { text-align: center; position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 32px;
}

.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  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.8); }
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
}

.headline-accent { color: var(--accent); }

.br-desktop { display: none; }
@media (min-width: 768px) { .br-desktop { display: block; } }

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Decorative session timer pill */
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
}

.session-label { color: var(--text-dim); }

.session-dot, .demo-timer-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.pulse {
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ══════════════════════════════════════════════════════════════
   PROBLEM
══════════════════════════════════════════════════════════════ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s;
}
.problem-card:hover { border-color: var(--border-light); }

.problem-icon { font-size: 28px; margin-bottom: 16px; }

.problem-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.problem-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.problem-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-block;
}

.problem-closing {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 32px;
  letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════════════════════
   COMPARISON
══════════════════════════════════════════════════════════════ */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

@media (max-width: 767px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-divider { display: none; }
}

.comparison-col {
  padding: 32px;
  border-radius: var(--radius-lg);
}

.comparison-old {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.comparison-new {
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.comparison-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0 24px;
}

.comparison-col-header { margin-bottom: 24px; }

.col-badge {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  padding: 4px 12px;
  letter-spacing: 0.06em;
}

.col-badge-muted {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.col-badge-accent {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent);
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comparison-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.x-mark { color: var(--red); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.check-mark { color: var(--green); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   OUR BET
══════════════════════════════════════════════════════════════ */
.bet-block {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.bet-block .section-tag { margin-bottom: 24px; }

.bet-quote {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin: 0 0 28px;
}

.bet-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* ══════════════════════════════════════════════════════════════
   DEMO SESSIONS
══════════════════════════════════════════════════════════════ */
.demo-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.demo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-meta-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.demo-drill {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.demo-step {
  font-size: 12px;
  color: var(--text-dim);
}

.demo-timer-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
}

.demo-timer {
  font-size: 13px;
  color: var(--text-muted);
}

/* Chat window */
.demo-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.demo-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 4px;
}

.demo-messages::-webkit-scrollbar { display: none; }

/* Individual message bubbles */
.msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-ai { flex-direction: row; }
.msg-user { flex-direction: row-reverse; }

.msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-weight: 600;
}

.msg-ai .msg-avatar {
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent);
}

.msg-user .msg-avatar {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.msg-bubble {
  max-width: 82%;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.msg-ai .msg-bubble {
  background: var(--ai-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-top-left-radius: 4px;
}

.msg-user .msg-bubble {
  background: var(--user-bg);
  border: 1px solid #2a3650;
  color: var(--text);
  border-top-right-radius: 4px;
  text-align: left;
}

/* Voice waveform — plays while a turn is being "spoken" */
.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
  margin-left: 8px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.voice-wave.active { opacity: 1; }

.voice-wave span {
  display: block;
  width: 3px;
  border-radius: 3px;
  animation: wave-bar 0.75s ease-in-out infinite;
}

.msg-ai .voice-wave span { background: var(--accent); }
.msg-user .voice-wave span { background: var(--text-muted); }

.voice-wave span:nth-child(1) { height: 4px;  animation-delay: 0.00s; }
.voice-wave span:nth-child(2) { height: 10px; animation-delay: 0.10s; }
.voice-wave span:nth-child(3) { height: 6px;  animation-delay: 0.20s; }
.voice-wave span:nth-child(4) { height: 12px; animation-delay: 0.15s; }
.voice-wave span:nth-child(5) { height: 5px;  animation-delay: 0.05s; }

@keyframes wave-bar {
  0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
  50%       { transform: scaleY(1.3); opacity: 1; }
}

/* Thinking dots */
.demo-thinking {
  display: none;
  gap: 5px;
  align-items: center;
  padding: 12px 0 4px 44px;
}

.demo-thinking.visible { display: flex; }

.demo-thinking span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: thinking-bounce 1.2s ease-in-out infinite;
}

.demo-thinking span:nth-child(2) { animation-delay: 0.2s; }
.demo-thinking span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%            { transform: translateY(-6px); opacity: 1; }
}

/* Completion bar */
.demo-completion {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-completion.visible { display: flex; }

.completion-check {
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
}

.completion-text { color: var(--text); }
.completion-text strong { color: var(--green); }

.completion-detail {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   SCORE EXPLAINER
══════════════════════════════════════════════════════════════ */
.score-block {
  display: flex;
  align-items: center;
  gap: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 48px;
}

@media (max-width: 767px) {
  .score-block {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
    gap: 32px;
  }
}

.score-display {
  flex-shrink: 0;
  text-align: center;
}

.score-number {
  font-family: var(--mono);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.score-label {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.score-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.score-text p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 20px;
}

.score-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.level {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}

.level-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   EARLY ACCESS
══════════════════════════════════════════════════════════════ */
.ea-block {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.ea-includes {
  list-style: none;
  text-align: left;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.ea-includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.ea-check {
  color: var(--green);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.ea-form { width: 100%; }

.ea-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 540px) {
  .ea-form-row { flex-direction: column; }
}

.ea-input {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.18s;
  outline: none;
}

.ea-input::placeholder { color: var(--text-dim); }
.ea-input:focus { border-color: var(--accent); }
.ea-input.error { border-color: var(--red); }

.ea-fine-print {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.ea-error {
  font-size: 13px;
  color: var(--red);
  min-height: 18px;
}

.ea-thanks {
  padding: 40px 24px;
  text-align: center;
}

.thanks-icon { font-size: 40px; margin-bottom: 16px; }

.ea-thanks h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.ea-thanks p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.footer-brand {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.footer-tagline { color: var(--text-dim); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text-muted); }
.footer-sep { color: var(--text-dim); }

.footer-copy { color: var(--text-dim); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
