/* ============================================================
   HorseTrainer.ai — Global Design System
   Dark Western Premium Aesthetic
   Mobile-first · 320px base · min-width breakpoints
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:           #080604;
  --bg-raised:    #111009;
  --bg-card:      #181410;
  --bg-card-hover:#201a12;
  --surface:      #221c14;
  --border:       #2e2518;
  --border-light: #3d3020;

  --gold:         #c8860a;
  --gold-light:   #e8a420;
  --gold-dim:     #8a5c06;
  --amber:        #d4760a;
  --rust:         #8b3a10;
  --cream:        #f0e6d0;
  --cream-dim:    #b8a888;
  --muted:        #6a5c48;
  --white:        #faf6ee;

  --green:        #2d6a2d;
  --green-light:  #3d8a3d;
  --yellow:       #8a6a00;
  --yellow-light: #c8960a;
  --red:          #7a1a0a;
  --red-light:    #c0280a;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-w:     1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-mid:  300ms;
  --t-slow: 500ms;

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 20px rgba(200,134,10,0.2);
  --shadow-glow: 0 0 40px rgba(200,134,10,0.12);
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--gold-light); }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, select, textarea {
  font-family: var(--font-body);
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--cream);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  width: 100%;
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,134,10,0.15);
}
select option { background: var(--bg-card); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.15; font-weight: 600; }
p { color: var(--cream-dim); }
ul { list-style: none; }

/* ── LAYOUT UTILITIES ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.section { padding: var(--space-3xl) 0; }
.section-sm { padding: var(--space-2xl) 0; }

.grid-2 { display: grid; gap: 1.5rem; }
.grid-3 { display: grid; gap: 1.5rem; }
.grid-4 { display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-cream { color: var(--cream); }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── DIVIDER ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  border: none;
  margin: var(--space-2xl) 0;
}

/* ── SECTION LABEL ─────────────────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--t-mid) var(--ease);
  min-height: 44px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.05); }

.btn-primary {
  background: var(--gold);
  color: #0a0600;
  box-shadow: 0 4px 20px rgba(200,134,10,0.3);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: #080400;
  box-shadow: 0 6px 28px rgba(200,134,10,0.45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,134,10,0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  padding: 0.875rem 0;
}
.btn-ghost:hover { color: var(--gold-light); }
.btn-ghost .arrow { transition: transform var(--t-mid) var(--ease); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

.btn-danger {
  background: var(--red-light);
  color: var(--white);
}
.btn-danger:hover { background: #d43010; }

.btn-lg { padding: 1.1rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--t-mid) var(--ease);
  box-shadow: var(--shadow-card);
}
.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card-link { cursor: pointer; }

/* ── BADGES / TAGS ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.625rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-gold   { background: rgba(200,134,10,0.15); color: var(--gold); border: 1px solid rgba(200,134,10,0.3); }
.badge-green  { background: rgba(45,106,45,0.2);   color: #5cbd5c;     border: 1px solid rgba(45,106,45,0.4); }
.badge-yellow { background: rgba(138,106,0,0.2);   color: #d4aa20;     border: 1px solid rgba(138,106,0,0.35); }
.badge-red    { background: rgba(122,26,10,0.2);   color: #f05030;     border: 1px solid rgba(122,26,10,0.4); }
.badge-muted  { background: rgba(106,92,72,0.15);  color: var(--muted); border: 1px solid var(--border); }

/* ── RISK INDICATORS ───────────────────────────────────────── */
.risk-banner {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.risk-banner .risk-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }
.risk-banner p { color: inherit; margin: 0; }
.risk-banner strong { display: block; margin-bottom: 0.25rem; }
.risk-green  { background: rgba(45,106,45,0.12);  border: 1px solid rgba(45,106,45,0.3);  color: #7dd87d; }
.risk-yellow { background: rgba(138,106,0,0.12);  border: 1px solid rgba(138,106,0,0.3);  color: #d4b040; }
.risk-red    { background: rgba(122,26,10,0.15);  border: 1px solid rgba(192,40,10,0.35); color: #f06040; }

/* ── NAVIGATION ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,6,4,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-mid);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cream-dim);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--cream); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--gold); }
.nav-cta { display: none; }
@media (min-width: 640px) { .nav-cta { display: flex; } }
.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-light);
}
@media (min-width: 900px) { .nav-menu-btn { display: none; } }
.nav-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream-dim);
  border-radius: 2px;
  transition: all var(--t-mid);
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--bg-raised);
  z-index: 99;
  padding: 1.5rem 1.25rem;
  transform: translateX(100%);
  transition: transform var(--t-mid) var(--ease);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  max-width: 320px;
  margin-left: auto;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer .nav-link {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-4xl) 0 var(--space-3xl);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(200,134,10,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 20% 70%, rgba(139,58,16,0.08) 0%, transparent 50%);
}
.hero-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46,37,24,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,37,24,0.4) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::after {
  content: '';
  height: 1px;
  width: 48px;
  background: var(--gold);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 16ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--cream-dim);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.hero-horse {
  position: absolute;
  right: -2%;
  bottom: 0;
  width: min(55%, 600px);
  opacity: 0.07;
  pointer-events: none;
}
@media (min-width: 768px) { .hero-horse { opacity: 0.1; } }

/* ── ENTRY PATHS ───────────────────────────────────────────── */
.entry-paths {
  display: grid;
  gap: 1.25rem;
  margin-top: var(--space-2xl);
}
@media (min-width: 640px) { .entry-paths { grid-template-columns: 1fr 1fr; } }

.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
  position: relative;
  overflow: hidden;
}
.entry-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--t-mid);
}
.entry-card:hover { border-color: var(--gold-dim); background: var(--bg-card-hover); transform: translateY(-3px); box-shadow: var(--shadow-card), var(--shadow-gold); }
.entry-card:hover::before { opacity: 1; }
.entry-card-icon {
  width: 48px; height: 48px;
  background: rgba(200,134,10,0.12);
  border: 1px solid rgba(200,134,10,0.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
}
.entry-card h3 { font-size: 1.35rem; color: var(--cream); margin-bottom: 0.5rem; }
.entry-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; margin-bottom: 1.25rem; }
.entry-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--t-fast);
}
.entry-card:hover .entry-card-link { gap: 0.65rem; }

/* ── DISCIPLINE GRID ───────────────────────────────────────── */
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}
@media (min-width: 480px) { .discipline-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .discipline-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px){ .discipline-grid { grid-template-columns: repeat(6, 1fr); } }

.disc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}
.disc-card:hover {
  border-color: var(--gold-dim);
  background: rgba(200,134,10,0.06);
  transform: translateY(-2px);
}
.disc-card-icon { font-size: 1.5rem; }
.disc-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream-dim);
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.disc-card-cat {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── INTAKE MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
@media (min-width: 640px) { .modal-overlay { align-items: center; } }
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 92svh;
  overflow-y: auto;
  padding: 1.75rem 1.5rem 2rem;
  position: relative;
  animation: slideUp 0.35s var(--ease);
}
@media (min-width: 640px) {
  .modal { border-radius: var(--radius-xl); max-height: 88svh; padding: 2rem; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  color: var(--muted);
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--border-light); color: var(--cream); }

/* Progress */
.intake-progress {
  margin-bottom: 1.5rem;
}
.intake-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.intake-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  transition: width 0.4s var(--ease);
}
.intake-step-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* Intake steps */
.intake-step { display: none; }
.intake-step.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.intake-q {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.intake-hint { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }

/* Option grid */
.option-grid {
  display: grid;
  gap: 0.625rem;
  grid-template-columns: repeat(2, 1fr);
}
.option-grid.cols-1 { grid-template-columns: 1fr; }
.option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 400px) { .option-grid, .option-grid.cols-3 { grid-template-columns: 1fr 1fr; } }

.opt-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream-dim);
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 44px;
  line-height: 1.3;
}
.opt-btn:hover { border-color: var(--gold-dim); color: var(--cream); background: rgba(200,134,10,0.06); }
.opt-btn.selected { border-color: var(--gold); color: var(--gold); background: rgba(200,134,10,0.1); }
.opt-btn .opt-icon { font-size: 1.1rem; display: block; margin-bottom: 3px; }

/* Danger slider */
.danger-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2d6a2d, #c8960a, #c0280a);
  outline: none;
  margin: 1rem 0;
  border: none;
  box-shadow: none;
}
.danger-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--gold);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.danger-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

/* Intake nav */
.intake-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  gap: 1rem;
}
.intake-nav-back {
  font-size: 0.875rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--t-fast);
}
.intake-nav-back:hover { color: var(--cream); }

/* AI Response */
.ai-response { animation: fadeIn 0.4s ease; }
.ai-response-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.ai-avatar {
  width: 40px; height: 40px;
  background: rgba(200,134,10,0.15);
  border: 1px solid rgba(200,134,10,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.ai-response-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--cream); }
.ai-response-sub   { font-size: 0.8rem; color: var(--muted); }
.ai-section { margin-bottom: 1.25rem; }
.ai-section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.ai-section p, .ai-section li { font-size: 0.9rem; color: var(--cream-dim); line-height: 1.55; }
.ai-steps { padding: 0; }
.ai-steps li {
  display: flex; gap: 0.75rem; padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.ai-steps li:last-child { border-bottom: none; }
.ai-step-num {
  width: 22px; height: 22px; flex-shrink: 0;
  background: rgba(200,134,10,0.15);
  border: 1px solid rgba(200,134,10,0.25);
  border-radius: 50%;
  font-size: 0.72rem; font-weight: 700;
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.ai-page-links { display: flex; flex-direction: column; gap: 0.5rem; }
.ai-page-link {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--gold);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--t-fast), gap var(--t-fast);
}
.ai-page-link:hover { color: var(--gold-light); gap: 0.75rem; }
.ai-loading { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.9rem; padding: 1.5rem 0; }
.ai-loading-dots { display: flex; gap: 4px; }
.ai-loading-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: dot-bounce 1.2s infinite ease-in-out;
}
.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce { 0%,80%,100% { transform: scale(0.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* ── TRAINER CARDS ─────────────────────────────────────────── */
.trainer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-mid) var(--ease);
}
.trainer-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.trainer-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.trainer-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.trainer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.trainer-info { flex: 1; min-width: 0; }
.trainer-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--cream); margin-bottom: 2px; }
.trainer-location { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.3rem; }
.trainer-card-body { padding: 1rem 1.25rem; }
.trainer-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.875rem; }
.trainer-bio { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.match-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
}
.match-score-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.match-score-fill { height: 100%; background: var(--gold); border-radius: 99px; }
.trainer-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── KB PAGES ──────────────────────────────────────────────── */
.page-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-2xl);
}
.page-header .badge { margin-bottom: 1rem; }
.page-header h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); color: var(--white); margin-bottom: 0.75rem; }
.page-header .lead { font-size: 1.05rem; color: var(--cream-dim); max-width: 620px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--border-light); }

.article-body { max-width: 720px; }
.article-body h2 {
  font-size: 1.65rem;
  color: var(--white);
  margin: 2rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.article-body h3 { font-size: 1.25rem; color: var(--cream); margin: 1.5rem 0 0.5rem; }
.article-body p { color: var(--cream-dim); line-height: 1.75; margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.article-body ul { list-style: none; }
.article-body ul li { position: relative; padding-left: 1.25rem; color: var(--cream-dim); line-height: 1.65; margin-bottom: 0.5rem; }
.article-body ul li::before { content: '—'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.article-body ol li { color: var(--cream-dim); line-height: 1.65; margin-bottom: 0.5rem; }
.article-body strong { color: var(--cream); font-weight: 600; }

/* Callout boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-left: 3px solid var(--gold);
  background: rgba(200,134,10,0.06);
}
.callout p { color: var(--cream-dim); margin: 0; font-size: 0.95rem; }
.callout strong { color: var(--gold); }

/* Sidebar */
.page-layout { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .page-layout { grid-template-columns: 1fr 320px; } }
.sidebar { position: sticky; top: 80px; height: fit-content; display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.sidebar-title { font-family: var(--font-display); font-size: 1.05rem; color: var(--cream); margin-bottom: 0.875rem; }
.sidebar-links { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-link {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.4rem;
  transition: color var(--t-fast);
}
.sidebar-link:hover { color: var(--gold); }
.sidebar-link:last-child { border-bottom: none; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
@media (min-width: 900px)  { .footer-grid { grid-template-columns: 2.5fr 1fr 1fr 1fr; } }
.footer-brand .nav-logo { font-size: 1.15rem; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.85rem; color: var(--muted); max-width: 260px; line-height: 1.6; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.875rem; }
.footer-col a { display: block; font-size: 0.875rem; color: var(--muted); padding: 0.25rem 0; transition: color var(--t-fast); }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ── SEARCH BAR ────────────────────────────────────────────── */
.search-bar {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 99px;
  padding: 1rem 3.5rem 1rem 1.5rem;
  font-size: 0.95rem;
  color: var(--cream);
  width: 100%;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(200,134,10,0.12); }
.search-btn {
  position: absolute;
  right: 6px;
  top: 50%; transform: translateY(-50%);
  background: var(--gold);
  color: #080400;
  border: none;
  border-radius: 99px;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}
.search-btn:hover { background: var(--gold-light); }

/* ── VIDEO CARDS ───────────────────────────────────────────── */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-mid) var(--ease);
  cursor: pointer;
}
.video-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface);
  overflow: hidden;
}
.video-thumb iframe { width: 100%; height: 100%; border: none; }
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  transition: background var(--t-fast);
}
.video-card:hover .video-play-overlay { background: rgba(0,0,0,0.2); }
.video-play-btn {
  width: 52px; height: 52px;
  background: rgba(200,134,10,0.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  transition: transform var(--t-fast), background var(--t-fast);
}
.video-card:hover .video-play-btn { transform: scale(1.08); background: var(--gold); }
.video-info { padding: 1rem; }
.video-title { font-size: 0.9rem; font-weight: 600; color: var(--cream); line-height: 1.4; margin-bottom: 0.4rem; }
.video-meta { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }

/* ── TOPIC CARDS (KB) ──────────────────────────────────────── */
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--t-mid) var(--ease);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.topic-card:hover { border-color: var(--gold-dim); background: var(--bg-card-hover); transform: translateY(-2px); }
.topic-card-icon {
  width: 40px; height: 40px;
  background: rgba(200,134,10,0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.topic-card-content { flex: 1; min-width: 0; }
.topic-card-title { font-size: 0.95rem; font-weight: 600; color: var(--cream); margin-bottom: 0.25rem; line-height: 1.3; }
.topic-card-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* ── FORM STYLES ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--cream-dim); margin-bottom: 0.5rem; }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 480px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ── ANIMATIONS ────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── UTILITY ────────────────────────────────────────────────── */
.hidden { display: none !important; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ── PRINT ──────────────────────────────────────────────────── */
@media print {
  .nav, .modal-overlay, .footer { display: none; }
  body { background: white; color: black; }
}
