/* ==========================================================================
   MATHSWATCH — Maths Learning Platform
   Core stylesheet: tokens, layout, components
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  /* ---- Color tokens ---- */
  --ink:            #16213E;
  --ink-soft:       #4A5578;
  --indigo:         #4C4FF5;
  --indigo-dark:    #3638C4;
  --violet:         #7C5CFC;
  --mint:           #17B890;
  --mint-soft:      #E4FBF3;
  --paper:          #FAFBFF;
  --paper-alt:      #F1F3FC;
  --line:           #E1E5F5;
  --white:          #FFFFFF;
  --amber:          #FF9F45;

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* ---- Spacing scale ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;
  --sp-9: 128px;

  /* ---- Shape ---- */
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-full: 999px;

  /* ---- Shadow ---- */
  --shadow-s: 0 2px 8px rgba(22,33,62,0.06);
  --shadow-m: 0 8px 24px rgba(22,33,62,0.10);
  --shadow-l: 0 20px 48px rgba(22,33,62,0.14);

  --container: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; }
body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }
button{ font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select{ font-family: inherit; font-size: inherit; }
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--ink); line-height: 1.15; font-weight: 600; }
:focus-visible{ outline: 3px solid var(--violet); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.container{ max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.section{ padding: var(--sp-8) 0; }
.section-alt{ background: var(--paper-alt); }

.eyebrow{
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--indigo);
  background: rgba(76,79,245,0.08); border-radius: var(--radius-full);
  padding: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-3);
}
.eyebrow::before{ content:''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

.section-head{ max-width: 640px; margin: 0 auto var(--sp-7); text-align: center; }
.section-head h2{ font-size: clamp(28px, 4vw, 42px); margin-bottom: var(--sp-3); }
.section-head p{ color: var(--ink-soft); font-size: 17px; }

/* ---- Buttons ---- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 600; font-size: 15px; padding: 14px 28px; border-radius: var(--radius-full);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn-primary{ background: var(--indigo); color: var(--white); box-shadow: var(--shadow-m); }
.btn-primary:hover{ background: var(--indigo-dark); transform: translateY(-2px); box-shadow: var(--shadow-l); }
.btn-secondary{ background: var(--white); color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover{ border-color: var(--indigo); color: var(--indigo); transform: translateY(-2px); }
.btn-ghost{ color: var(--indigo); font-weight: 600; }
.btn-ghost:hover{ color: var(--indigo-dark); }
.btn-sm{ padding: 10px 18px; font-size: 14px; }

/* ==========================================================================
   LOGO MARK (used in footer)
   ========================================================================== */
.logo-mark{
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  transform: rotate(-6deg);
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header{
  position: sticky; top: 0; z-index: 500; width: 100%;
  background: rgba(250,251,255,0.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); height: 76px;
}
.site-logo{
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--ink); flex-shrink: 0; min-width: 0;
}
.site-logo .logo-text{ white-space: nowrap; }

.site-nav{
  display: flex; align-items: center; gap: var(--sp-5);
  flex: 1; justify-content: center; min-width: 0;
}
.site-nav a{
  font-size: 15px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 6px 2px; white-space: nowrap;
  transition: color .2s ease;
}
.site-nav a::after{
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--indigo); border-radius: var(--radius-full);
  transition: right .25s ease;
}
.site-nav a:hover{ color: var(--ink); }
.site-nav a:hover::after{ right: 0; }

.header-actions{ display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.header-cta{ white-space: nowrap; }

/* ---- Hamburger toggle (tablet & mobile only) ---- */
.nav-toggle{
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 42px; height: 42px; border-radius: var(--radius-s);
  background: transparent; border: 1.5px solid var(--line); cursor: pointer;
  flex-shrink: 0; padding: 0;
}
.nav-toggle-bar{
  width: 20px; height: 2px; background: var(--ink); border-radius: var(--radius-full);
  transition: transform .28s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile / tablet slide-in nav panel ---- */
.mobile-nav{
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(320px, 84vw);
  background: var(--white); box-shadow: var(--shadow-l);
  transform: translateX(100%); transition: transform .32s ease;
  z-index: 700; overflow-y: auto; padding: 96px var(--sp-5) var(--sp-6);
}
.mobile-nav.active{ transform: translateX(0); }
.mobile-nav-close{
  position: absolute; top: 20px; right: 20px; width: 40px; height: 40px;
  border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.mobile-nav-close:hover{ background: var(--indigo); color: #fff; border-color: var(--indigo); }
.mobile-nav nav{ display: flex; flex-direction: column; gap: var(--sp-1); }
.mobile-nav a{
  font-size: 17px; font-weight: 500; color: var(--ink);
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.mobile-nav .mobile-cta{
  margin-top: var(--sp-4); text-align: center; border-bottom: none; color: #fff;
}

.mobile-nav-backdrop{
  position: fixed; inset: 0; background: rgba(22,33,62,0.45);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease;
  z-index: 600;
}
.mobile-nav-backdrop.active{ opacity: 1; visibility: visible; }

body.nav-open{ overflow: hidden; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative; padding: var(--sp-8) 0 var(--sp-7);
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
  overflow: hidden;
}
.hero::before{
  content:''; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(76,79,245,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,79,245,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 30%, transparent 75%);
}
.hero-inner{ position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-7); align-items: center; }
.hero-copy h1{ font-size: clamp(38px, 5.4vw, 62px); letter-spacing: -0.01em; margin-bottom: var(--sp-4); }
.hero-copy h1 .accent{ color: var(--indigo); position: relative; }
.hero-copy h1 .underline-svg{ position: absolute; left: 0; bottom: -6px; width: 100%; height: 10px; }
.hero-copy p.lede{ font-size: 18px; color: var(--ink-soft); max-width: 480px; margin-bottom: var(--sp-5); }

.hero-search{
  display: flex; align-items: center; background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--radius-full); padding: 6px 6px 6px 20px; box-shadow: var(--shadow-m);
  max-width: 480px; margin-bottom: var(--sp-5);
}
.hero-search input{ border: none; outline: none; flex: 1; font-size: 15px; background: transparent; }
.hero-search button{
  background: var(--indigo); color: #fff; border-radius: var(--radius-full);
  padding: 12px 22px; font-weight: 600; font-size: 14px; transition: background .2s ease;
}
.hero-search button:hover{ background: var(--indigo-dark); }

.hero-ctas{ display: flex; gap: var(--sp-3); margin-bottom: var(--sp-6); flex-wrap: wrap; }

.hero-stats{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.stat-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--sp-3); text-align: left; transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-m); }
.stat-num{ font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--indigo); font-variant-mathswatchc: tabular-nums; }
.stat-label{ font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* Hero illustration: orbiting symbols around a chalkboard-style panel */
.hero-visual{ position: relative; height: 460px; }
.hero-panel{
  position: absolute; inset: 30px; border-radius: var(--radius-l);
  background: linear-gradient(155deg, var(--ink) 0%, #24325c 100%);
  box-shadow: var(--shadow-l);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-panel svg{ width: 84%; }
.floating-symbol{
  position: absolute; font-family: var(--font-mono); font-weight: 600;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-m); display: flex; align-items: center; justify-content: center;
  color: var(--indigo); animation: float 6s ease-in-out infinite;
}
.floating-symbol.f1{ top: 6%; left: -4%; width: 64px; height: 64px; font-size: 24px; animation-delay: 0s; color: var(--mint); }
.floating-symbol.f2{ top: 68%; left: -8%; width: 56px; height: 56px; font-size: 20px; animation-delay: 1.2s; }
.floating-symbol.f3{ top: 4%; right: -6%; width: 58px; height: 58px; font-size: 22px; animation-delay: .6s; color: var(--amber); }
.floating-symbol.f4{ top: 74%; right: -4%; width: 66px; height: 66px; font-size: 22px; animation-delay: 1.8s; }

.wave-divider{ display: block; width: 100%; line-height: 0; }
.wave-divider svg{ width: 100%; height: 60px; }

/* ==========================================================================
   MARQUEE (equation strip)
   ========================================================================== */
.equation-strip{
  background: var(--ink); overflow: hidden; padding: var(--sp-3) 0;
  border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.marquee-track{ display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span{
  font-family: var(--font-mono); color: rgba(255,255,255,0.55); font-size: 17px;
  padding: 0 var(--sp-6); white-space: nowrap;
}
.marquee-track span b{ color: var(--mint); font-weight: 500; }

/* ==========================================================================
   TOPIC GRID
   ========================================================================== */
.topic-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.topic-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--sp-5); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative; overflow: hidden;
}
.topic-card::before{
  content:''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: var(--topic-color, var(--indigo)); transform: scaleY(0); transform-origin: bottom;
  transition: transform .3s ease;
}
.topic-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-l); border-color: transparent; }
.topic-card:hover::before{ transform: scaleY(1); }
.topic-icon{
  width: 48px; height: 48px; border-radius: var(--radius-s); display: flex; align-items: center; justify-content: center;
  background: var(--topic-bg, var(--mint-soft)); color: var(--topic-color, var(--mint)); margin-bottom: var(--sp-3);
  font-family: var(--font-mono); font-size: 20px; font-weight: 600;
}
.topic-card h3{ font-size: 18px; margin-bottom: 6px; }
.topic-card p{ font-size: 14px; color: var(--ink-soft); }
.topic-card .topic-count{ font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: var(--sp-3); display: block; }

/* ==========================================================================
   PRACTICE CARDS
   ========================================================================== */
.practice-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.practice-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3);
  transition: transform .3s ease, box-shadow .3s ease;
}
.practice-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow-m); }
.practice-card .topic-icon{ margin-bottom: 0; }
.practice-card p{ color: var(--ink-soft); font-size: 14px; flex: 1; }

/* ==========================================================================
   WORKSHEETS
   ========================================================================== */
.worksheet-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.worksheet-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3); transition: box-shadow .3s ease, transform .3s ease;
}
.worksheet-card:hover{ box-shadow: var(--shadow-m); transform: translateY(-4px); }
.worksheet-top{ display: flex; justify-content: space-between; align-items: flex-start; }
.difficulty{ font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: var(--radius-full); }
.difficulty.easy{ background: var(--mint-soft); color: var(--mint); }
.difficulty.medium{ background: #FFF1E0; color: var(--amber); }
.difficulty.hard{ background: #FDE9EC; color: #E14C6B; }
.worksheet-actions{ display: flex; gap: var(--sp-2); margin-top: auto; }
.worksheet-actions button{ flex: 1; }

/* ---- Worksheet preview modal ---- */
.ws-modal-overlay{
  position: fixed; inset: 0; background: rgba(22,33,62,0.55); backdrop-filter: blur(2px);
  z-index: 800; display: flex; align-items: center; justify-content: center; padding: var(--sp-4);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.ws-modal-overlay.show{ opacity: 1; visibility: visible; }
.ws-modal{
  background: var(--white); border-radius: var(--radius-l); max-width: 560px; width: 100%;
  max-height: 82vh; overflow-y: auto; padding: var(--sp-6); box-shadow: var(--shadow-l);
  transform: translateY(14px) scale(.98); transition: transform .25s ease;
}
.ws-modal-overlay.show .ws-modal{ transform: translateY(0) scale(1); }
.ws-modal-top{ display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.ws-modal-top h3{ font-size: 21px; }
.ws-modal-close{ font-size: 20px; color: var(--ink-soft); line-height: 1; padding: 4px; }
.ws-modal-close:hover{ color: var(--ink); }
.ws-modal-list{ list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--sp-5); }
.ws-modal-list li{ font-size: 14.5px; color: var(--ink); font-family: var(--font-mono); }
.ws-modal-actions{ display: flex; gap: var(--sp-3); }
.ws-toast{
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: var(--radius-full);
  font-size: 14px; box-shadow: var(--shadow-l); z-index: 900; opacity: 0; visibility: hidden;
  transition: all .3s ease;
}
.ws-toast.show{ opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   CALCULATORS
   ========================================================================== */
.calc-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-3); }
.calc-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--sp-4) var(--sp-3); text-align: center; transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.calc-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-m); background: var(--paper-alt); }
.calc-card .topic-icon{ margin: 0 auto var(--sp-3); }
.calc-card h4{ font-size: 14px; font-weight: 600; }

/* ==========================================================================
   FORMULA LIBRARY (accordion)
   ========================================================================== */
.formula-list{ display: flex; flex-direction: column; gap: var(--sp-3); max-width: 780px; margin: 0 auto; }
.formula-item{ background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.formula-head{ display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); cursor: pointer; }
.formula-head h4{ font-size: 16px; }
.formula-head .plus{ font-family: var(--font-mono); font-size: 20px; color: var(--indigo); transition: transform .3s ease; }
.formula-item.open .plus{ transform: rotate(45deg); }
.formula-body{ max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.formula-body-inner{ padding: 0 var(--sp-4) var(--sp-4); color: var(--ink-soft); font-family: var(--font-mono); font-size: 14px; line-height: 1.9; }

/* ==========================================================================
   RESOURCES GRID
   ========================================================================== */
.resource-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.resource-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-3); transition: box-shadow .25s ease, transform .25s ease;
}
.resource-card:hover{ box-shadow: var(--shadow-m); transform: translateY(-3px); }

/* ==========================================================================
   LEARNING PATH TIMELINE
   ========================================================================== */
.timeline{ position: relative; max-width: 820px; margin: 0 auto; }
.timeline::before{
  content:''; position: absolute; left: 27px; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 8px, transparent 8px 16px);
}
.timeline-step{ position: relative; padding-left: 76px; margin-bottom: var(--sp-6); }
.timeline-step:last-child{ margin-bottom: 0; }
.timeline-dot{
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--indigo); color: var(--indigo);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow-s);
}
.timeline-step.done .timeline-dot{ background: var(--mint); border-color: var(--mint); color: #fff; }
.timeline-step h4{ font-size: 18px; margin-bottom: 4px; }
.timeline-step p{ color: var(--ink-soft); font-size: 14px; max-width: 520px; }

/* ==========================================================================
   DAILY CHALLENGE
   ========================================================================== */
.challenge-card{
  max-width: 720px; margin: 0 auto; background: linear-gradient(155deg, var(--ink), #24325c);
  border-radius: var(--radius-l); padding: var(--sp-6); color: #fff; position: relative; overflow: hidden;
}
.challenge-card::after{
  content: '∑ π √ ∞'; position: absolute; right: -10px; bottom: -20px; font-family: var(--font-mono);
  font-size: 90px; color: rgba(255,255,255,0.06); letter-spacing: 10px;
}
.challenge-label{ font-family: var(--font-mono); font-size: 13px; color: var(--mint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--sp-3); }
.challenge-question{ font-size: 22px; font-family: var(--font-display); margin-bottom: var(--sp-5); max-width: 520px; }
.challenge-actions{ display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.challenge-hint{ display: none; margin-top: var(--sp-4); padding: var(--sp-3); background: rgba(255,255,255,0.08); border-radius: var(--radius-s); font-size: 14px; }
.challenge-hint.show{ display: block; }
.challenge-answer{ display: none; margin-top: var(--sp-3); font-family: var(--font-mono); color: var(--mint); font-size: 18px; }
.challenge-answer.show{ display: block; }

/* ==========================================================================
   QUIZ
   ========================================================================== */
.quiz-card{
  max-width: 680px; margin: 0 auto; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: var(--sp-6); box-shadow: var(--shadow-m);
}
.quiz-top{ display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.progress-bar{ height: 8px; background: var(--paper-alt); border-radius: var(--radius-full); overflow: hidden; margin-bottom: var(--sp-5); }
.progress-bar-fill{ height: 100%; background: linear-gradient(90deg, var(--indigo), var(--violet)); width: 0%; transition: width .4s ease; border-radius: var(--radius-full); }
.quiz-question{ font-size: 20px; margin-bottom: var(--sp-5); }
.quiz-options{ display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.quiz-option{
  text-align: left; padding: var(--sp-3) var(--sp-4); border: 1.5px solid var(--line); border-radius: var(--radius-m);
  font-size: 15px; transition: all .2s ease; display: flex; justify-content: space-between; align-items: center;
}
.quiz-option:hover{ border-color: var(--indigo); background: var(--paper-alt); }
.quiz-option.correct{ border-color: var(--mint); background: var(--mint-soft); color: var(--mint); font-weight: 600; }
.quiz-option.incorrect{ border-color: #E14C6B; background: #FDE9EC; color: #E14C6B; font-weight: 600; }
.quiz-footer{ display: flex; justify-content: space-between; align-items: center; }
.quiz-score{ font-family: var(--font-mono); font-weight: 600; color: var(--indigo); }

/* ==========================================================================
   SKILLS PROGRESS
   ========================================================================== */
.skills-list{ display: flex; flex-direction: column; gap: var(--sp-4); max-width: 640px; margin: 0 auto; }
.skill-row .skill-top{ display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.skill-row .skill-top span:last-child{ font-family: var(--font-mono); color: var(--ink-soft); }
.skill-bar{ height: 10px; background: var(--paper-alt); border-radius: var(--radius-full); overflow: hidden; }
.skill-bar-fill{ height: 100%; border-radius: var(--radius-full); width: 0%; transition: width 1.2s cubic-bezier(.22,1,.36,1); background: linear-gradient(90deg, var(--indigo), var(--mint)); }

/* ==========================================================================
   WHY CHOOSE / FEATURES
   ========================================================================== */
.feature-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.feature-card{ padding: var(--sp-4); border-radius: var(--radius-m); transition: transform .25s ease; }
.feature-card:hover{ transform: translateY(-4px); }
.feature-card h4{ font-size: 16px; margin-bottom: 6px; }
.feature-card p{ font-size: 13.5px; color: var(--ink-soft); }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonial-carousel{ max-width: 640px; margin: 0 auto; }
.testimonial-viewport{ overflow: hidden; border-radius: var(--radius-m); }
.testimonial-track{ display: flex; transition: transform .5s ease; }
.testimonial-card{
  min-width: 100%; flex: 0 0 100%; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: var(--sp-5); box-sizing: border-box;
}
.testimonial-dots{ display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: var(--sp-4); }
.t-dot{
  width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: background .25s ease, transform .25s ease;
}
.t-dot:hover{ background: var(--indigo); opacity: .75; }
.t-dot.active{ background: var(--indigo); transform: scale(1.3); }
.t-person{ display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.t-avatar{
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 16px;
}
.t-stars{ color: var(--amber); font-size: 13px; margin-bottom: var(--sp-2); letter-spacing: 2px; }
.t-name{ font-weight: 600; font-size: 14px; }
.t-role{ font-size: 12px; color: var(--ink-soft); }
.t-quote{ font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; }

/* ==========================================================================
   STATS COUNTER SECTION
   ========================================================================== */
.stats-band{ background: var(--ink); border-radius: var(--radius-l); padding: var(--sp-6) var(--sp-5); }
.stats-band-grid{ display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.stats-band .stat-num{ color: var(--mint); font-size: 34px; }
.stats-band .stat-label{ color: rgba(255,255,255,0.65); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-controls{ display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; margin-bottom: var(--sp-6); }
.faq-search{
  display: flex; align-items: center; gap: var(--sp-2); background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--radius-full); padding: 10px 18px; max-width: 340px; flex: 1;
}
.faq-search input{ border: none; outline: none; flex: 1; font-size: 14px; background: transparent; }
.faq-cat{ padding: 8px 16px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500; border: 1.5px solid var(--line); color: var(--ink-soft); transition: all .2s ease; }
.faq-cat.active, .faq-cat:hover{ background: var(--indigo); border-color: var(--indigo); color: #fff; }
.faq-columns{ display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-5); }
.faq-item{ border-bottom: 1px solid var(--line); }
.faq-item:hover .faq-q{ color: var(--indigo); }
.faq-q{ display: flex; justify-content: space-between; gap: var(--sp-3); align-items: center; padding: var(--sp-4) 0; cursor: pointer; font-weight: 500; transition: color .2s ease; }
.faq-q .plus{ font-family: var(--font-mono); color: var(--indigo); flex-shrink: 0; transition: transform .3s ease; }
.faq-item.open .plus{ transform: rotate(45deg); }
.faq-a{ max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner{ padding-bottom: var(--sp-4); color: var(--ink-soft); font-size: 14.5px; }
.faq-empty{ text-align: center; color: var(--ink-soft); padding: var(--sp-6) 0; display: none; }

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-banner{
  background: linear-gradient(135deg, var(--indigo), var(--violet)); border-radius: var(--radius-l);
  padding: var(--sp-7) var(--sp-6); text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-banner::before{
  content:''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, black 40%, transparent 80%);
}
.cta-banner h2{ color: #fff; font-size: clamp(26px, 4vw, 38px); margin-bottom: var(--sp-3); position: relative; }
.cta-banner p{ color: rgba(255,255,255,0.85); margin-bottom: var(--sp-5); position: relative; max-width: 480px; margin-inline: auto; }
.cta-banner .btn-primary{ background: #fff; color: var(--indigo); position: relative; }
.cta-banner .btn-primary:hover{ background: var(--paper-alt); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: start; }
.form-group{ margin-bottom: var(--sp-4); }
.form-group label{ display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.form-group input, .form-group textarea{
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  font-size: 14.5px; transition: border-color .2s ease; background: var(--white);
}
.form-group input:focus, .form-group textarea:focus{ border-color: var(--indigo); outline: none; }
.form-group.error input, .form-group.error textarea{ border-color: #E14C6B; }
.form-error{ font-size: 12px; color: #E14C6B; margin-top: 4px; display: none; }
.form-group.error .form-error{ display: block; }
.form-success{ display: none; background: var(--mint-soft); color: var(--mint); padding: var(--sp-3); border-radius: var(--radius-s); margin-bottom: var(--sp-4); font-size: 14px; font-weight: 500; }
.form-success.show{ display: block; }
.map-placeholder{
  height: 100%; min-height: 260px; border-radius: var(--radius-m); border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, var(--paper-alt), var(--paper-alt) 10px, var(--white) 10px, var(--white) 20px);
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 14px; margin-bottom: var(--sp-4);
  flex-direction: column; gap: var(--sp-2);
}
.contact-cards{ display: grid; gap: var(--sp-3); }
.contact-card{ display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--white); }

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */
.legal-hero{ padding: var(--sp-7) 0 var(--sp-6); border-bottom: 1px solid var(--line); background: var(--paper-alt); }
.legal-hero h1{ font-size: clamp(28px, 4vw, 40px); margin: var(--sp-3) 0; }
.legal-updated{ color: var(--ink-soft); font-size: 13.5px; font-family: var(--font-mono); }
.legal-intro{ color: var(--ink-soft); font-size: 16px; max-width: 720px; margin-top: var(--sp-3); }

.legal-wrap{ display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-7); align-items: start; padding: var(--sp-7) 0; }

.legal-toc{ position: sticky; top: 24px; border-left: 1.5px solid var(--line); }
.legal-toc-label{ font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding-left: var(--sp-3); margin-bottom: var(--sp-2); display: block; }
.legal-toc a{
  display: block; padding: 7px var(--sp-3); font-size: 13.5px; color: var(--ink-soft);
  border-left: 2px solid transparent; margin-left: -1.5px; transition: color .2s ease, border-color .2s ease;
}
.legal-toc a:hover, .legal-toc a.active{ color: var(--indigo); border-color: var(--indigo); font-weight: 500; }

.legal-body{ max-width: 720px; }
.legal-body section{ margin-bottom: var(--sp-6); scroll-margin-top: 16px; }
.legal-body h2{ font-size: clamp(20px, 2.6vw, 24px); margin-bottom: var(--sp-3); display: flex; align-items: center; gap: var(--sp-2); }
.legal-body .num{ font-family: var(--font-mono); color: var(--indigo); font-size: 15px; font-weight: 600; }
.legal-body h3{ font-size: 16.5px; margin: var(--sp-4) 0 var(--sp-2); color: var(--ink); }
.legal-body p{ color: var(--ink-soft); font-size: 15px; line-height: 1.85; margin-bottom: var(--sp-3); }
.legal-body ul, .legal-body ol{ color: var(--ink-soft); font-size: 15px; line-height: 1.85; margin: 0 0 var(--sp-3) var(--sp-4); }
.legal-body li{ margin-bottom: 8px; }
.legal-body li::marker{ color: var(--indigo); }
.legal-body strong{ color: var(--ink); }
.legal-body table{ width: 100%; border-collapse: collapse; margin-bottom: var(--sp-4); font-size: 14px; }
.legal-body th, .legal-body td{ text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.legal-body th{ color: var(--ink); font-weight: 600; background: var(--paper-alt); }
.legal-callout{
  background: var(--mint-soft); border: 1px solid rgba(23,184,144,0.25); border-radius: var(--radius-m);
  padding: var(--sp-4); font-size: 14px; color: var(--ink); margin-bottom: var(--sp-4);
}
.legal-callout strong{ color: var(--mint); }
.legal-contact-box{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--sp-4); display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{ background: var(--ink); color: rgba(255,255,255,0.75); padding-top: var(--sp-8); }
.footer-grid{ display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--sp-6); padding-bottom: var(--sp-7); }
.footer-col h4{ color: #fff; font-size: 15px; margin-bottom: var(--sp-4); }
.footer-col ul{ display: flex; flex-direction: column; gap: 10px; }
.footer-col a{ font-size: 14px; color: rgba(255,255,255,0.6); transition: color .2s ease; }
.footer-col a:hover{ color: var(--mint); }
.footer-logo{ display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; margin-bottom: var(--sp-3); }
.footer-desc{ font-size: 14px; color: rgba(255,255,255,0.55); max-width: 280px; margin-bottom: var(--sp-4); }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.1); padding: var(--sp-4) 0; display: flex; justify-content: center;
  align-items: center; font-size: 13px; color: rgba(255,255,255,0.5);
}

.back-to-top{
  position: fixed; bottom: 28px; right: 28px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--indigo); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-l); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s ease; z-index: 300; font-size: 18px;
}
.back-to-top.show{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover{ background: var(--indigo-dark); }
