/* ===================== TAG Educators — shared styles ===================== */
/* Brand idea: every subject is its own world with its own sky; TAG is the
   ark that carries a student from one horizon to the next. The arc/horizon
   line is the one recurring mark — in the nav, in cards, in the single
   transition moment between pages. Everything else stays quiet. */

:root{
  --bg: #150C1B;
  --bg-panel: #221430;
  --bg-panel-2: #2E1C3F;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.20);
  --plum: #6B2F78;
  --plum-light: #A855C4;
  --plum-glow: #B472CC;
  --slate: #9FA6B5;
  --gold: #C77FDC;
  --text: #F5F2F8;
  --text-muted: #B7AFC4;
  --ink: #1E1922;
  --ink-muted: #6A6374;
  --danger: #E8899E;
  --success: #7FCB9A;

  --serif: 'Source Serif 4', ui-serif, Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;

  --fs-hero: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 1.35rem + 1.1vw, 2.3rem);
  --fs-h3: 1.1rem;
  --fs-body: 1rem;
  --fs-small: 0.88rem;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  overflow-x:hidden;
}
h1,h2,h3{
  font-family:var(--serif);
  font-weight:600;
  margin:0;
  line-height:1.15;
  color:var(--text);
}
p{margin:0;color:var(--text-muted);max-width:60ch;}
a{color:inherit;}
img,svg{max-width:100%;display:block;}
button{font-family:inherit;}
.wrap{max-width:1120px;margin:0 auto;padding:0 28px;}
.accent{color:var(--plum-glow);}

/* ---------- The arc mark ---------- */
/* The recurring brand flourish: a shallow rising curve, echoing the logo's
   hull/arc and the horizon line used in the page transition. */
.arc-mark{
  width:44px;height:13px;
  stroke:var(--plum-glow);
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  display:block;
}
/* Small "go" glyph for links: a horizon with a rising sun — replaces a
   generic arrow, and literally previews the transition the click starts. */
.go-arc{width:20px;height:14px;flex-shrink:0;transition:transform .2s ease;}
.go-arc .horizon{stroke:currentColor;stroke-width:1.4;opacity:.55;}
.go-arc .sun{fill:currentColor;}
a:hover .go-arc,button:hover .go-arc{transform:translateX(3px);}

/* ---------- Nav ---------- */
.site-topbar{
  position:sticky;
  top:0;
  z-index:50;
}
header{
  background:rgba(21,12,27,0.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line-strong);
}
nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 28px;
  max-width:1120px;
  margin:0 auto;
  gap:20px;
}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;flex-shrink:0;}
.brand img{height:36px;width:36px;border-radius:50%;}
.brand-logo{height:58px;width:58px;border-radius:50%;}
.brand-text{display:flex;flex-direction:column;line-height:1.2;}
.brand-text strong{font-family:var(--serif);font-weight:600;font-size:1.08rem;color:var(--text);}
.brand-text em{font-style:normal;font-size:0.68rem;color:var(--text-muted);letter-spacing:0.01em;}
.brand span{font-family:var(--serif);font-weight:600;font-size:1.05rem;color:var(--text);}
.nav-links{display:flex;align-items:center;gap:30px;list-style:none;margin:0;padding:0;}
.nav-links a{
  text-decoration:none;
  font-size:0.95rem;
  color:var(--text);
  border-bottom:1px solid transparent;
  padding-bottom:2px;
  transition:border-color .15s ease, color .15s ease;
}
.nav-links a:hover{border-color:var(--plum-glow);color:var(--plum-glow);}
.nav-cta{
  background:linear-gradient(135deg, var(--plum), var(--plum-light));
  color:#fff;
  padding:10px 20px;
  border-radius:30px;
  text-decoration:none;
  font-size:0.92rem;
  font-weight:600;
  transition:filter .15s ease, transform .15s ease;
  white-space:nowrap;
  flex-shrink:0;
}
.nav-cta:hover{filter:brightness(1.12);transform:translateY(-1px);}
.menu-btn{display:none;background:none;border:none;cursor:pointer;padding:6px;flex-shrink:0;}
.menu-btn span{display:block;width:22px;height:2px;background:var(--text);margin:5px 0;}

/* ---------- Buttons ---------- */
.btn-primary{
  background:linear-gradient(135deg, var(--plum), var(--plum-light));
  color:#fff;
  padding:13px 26px;
  border-radius:30px;
  text-decoration:none;
  font-size:0.98rem;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:9px;
  border:none;
  cursor:pointer;
  transition:filter .15s ease, transform .15s ease;
}
.btn-primary:hover{filter:brightness(1.12);transform:translateY(-1px);}
.btn-primary:disabled{opacity:0.6;cursor:not-allowed;transform:none;}
.btn-secondary{
  padding:13px 26px;
  border:1px solid var(--line-strong);
  border-radius:30px;
  text-decoration:none;
  font-size:0.98rem;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  gap:9px;
  transition:border-color .15s ease, color .15s ease;
}
.btn-secondary:hover{border-color:var(--plum-glow);color:var(--plum-glow);}
.btn-row{display:flex;gap:14px;flex-wrap:wrap;justify-content:center;}

/* ---------- Sections ---------- */
section{padding:100px 0 76px;}
.section-head{max-width:56ch;margin-bottom:40px;}
.section-head.center{margin-left:auto;margin-right:auto;text-align:center;}
.section-head h2{font-size:var(--fs-h2);}
.section-head p{margin-top:14px;font-size:1.05rem;}

/* Load-in: reserved for the hero only, so it reads as one deliberate
   moment rather than a scroll gimmick repeated on every section. */
@media (prefers-reduced-motion: no-preference){
  .load-in{opacity:0;transform:translateY(16px);animation:loadIn .7s ease forwards;}
  .load-in.d1{animation-delay:.08s;}
  .load-in.d2{animation-delay:.16s;}
  .load-in.d3{animation-delay:.24s;}
  @keyframes loadIn{to{opacity:1;transform:translateY(0);}}
}

/* ---------- Scroll reveal ---------- */
/* One quiet, repeated pattern (not scattered one-offs): sections rise and
   fade in as they enter the viewport, staggered where they're grouped. */
@media (prefers-reduced-motion: no-preference){
  .reveal{opacity:0;transform:translateY(20px);transition:opacity .6s ease, transform .6s ease;}
  .reveal.in-view{opacity:1;transform:translateY(0);}
  .reveal-stagger > *{opacity:0;transform:translateY(20px);transition:opacity .6s ease, transform .6s ease;}
  .reveal-stagger.in-view > *{opacity:1;transform:translateY(0);}
  .reveal-stagger.in-view > *:nth-child(2){transition-delay:.08s;}
  .reveal-stagger.in-view > *:nth-child(3){transition-delay:.16s;}
  .reveal-stagger.in-view > *:nth-child(4){transition-delay:.24s;}
  .reveal-stagger.in-view > *:nth-child(5){transition-delay:.32s;}
  .reveal-stagger.in-view > *:nth-child(6){transition-delay:.4s;}
  .reveal-stagger.in-view > *:nth-child(7){transition-delay:.48s;}
  .reveal-stagger.in-view > *:nth-child(8){transition-delay:.56s;}
}

/* ---------- Footer ---------- */
footer{
  background:linear-gradient(180deg, var(--bg-panel), #0D0712);
  border-top:1px solid var(--line);
  padding:56px 0 28px;
}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px;}
.footer-brand .arc-mark{margin:16px 0 0;}
.footer-brand p{margin-top:10px;font-size:0.92rem;max-width:32ch;}
.footer-col h4{font-size:0.85rem;font-weight:600;margin-bottom:16px;color:var(--text);}
.footer-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.footer-col a{text-decoration:none;font-size:0.92rem;color:var(--text-muted);transition:color .15s ease;}
.footer-col a:hover{color:var(--plum-glow);}
.footer-bottom{
  margin-top:48px;
  padding-top:24px;
  border-top:1px solid var(--line);
  font-size:0.85rem;
  color:var(--text-muted);
  text-align:center;
}

/* =====================================================================
   Homepage
   ===================================================================== */
.hero{
  position:relative;
  min-height:88vh;
  display:flex;
  align-items:center;
  padding:150px 0 110px;
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(ellipse 65% 55% at 50% 15%, color-mix(in srgb, var(--plum-light) 20%, transparent), transparent 70%),
    radial-gradient(ellipse 55% 50% at 50% 95%, color-mix(in srgb, var(--plum) 22%, transparent), transparent 70%);
  pointer-events:none;
  z-index:0;
}
.hero-grid{
  position:relative;z-index:1;
  max-width:760px;margin:0 auto;text-align:center;
}
.hero-copy h1{font-size:var(--fs-hero);letter-spacing:-0.01em;text-align:center;}
.hero-copy .arc-mark{margin:0 auto 18px;}
.hero-eyebrow{
  display:inline-flex;align-items:center;gap:10px;
  max-width:none;margin:0 auto 22px;
  font-family:var(--sans);font-weight:700;font-size:0.92rem;
  text-transform:uppercase;letter-spacing:0.14em;
  color:var(--plum-glow);
}
.eyebrow-rule{display:inline-block;width:28px;height:1px;background:var(--plum-glow);}
.grad-text{
  background:linear-gradient(90deg, var(--plum-glow), var(--gold));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}

/* ---------- Hero split headline + Ark icon ---------- */
.hero-split{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  margin:0;line-height:0.98;
}
.split-line{
  font-size:clamp(2.6rem, 1.6rem + 5vw, 5.2rem);
  font-weight:700;letter-spacing:-0.01em;
}
.line-white{color:var(--text);}
.line-grad{
  background:linear-gradient(90deg, var(--plum-glow), var(--gold));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero-tagline{
  font-family:var(--serif);font-weight:600;font-size:clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  color:var(--text);margin:30px auto 0;max-width:36ch;line-height:1.25;
}

/* ---------- Wave scene (Ark sailing through the hero) ---------- */
/* Each layer is two identical SVG tiles placed side by side (width:200%
   overall, each tile 50%); animating the layer exactly half its own width
   is mathematically guaranteed seamless, since tile 2 is pixel-identical
   to tile 1 — no reliance on a single path's internal periodicity. */
.hero-waves{
  position:absolute;left:0;right:0;bottom:0;height:150px;
  overflow:hidden;pointer-events:none;z-index:0;
}
.wave-layer{
  position:absolute;bottom:0;left:0;
  width:200%;height:100%;
  display:flex;
  will-change:transform;
}
.wave-layer svg{width:50%;height:100%;flex-shrink:0;display:block;}
.wave-back svg{fill:color-mix(in srgb, var(--plum) 65%, var(--bg));}
.wave-back{opacity:0.6;}
.wave-front svg{fill:color-mix(in srgb, var(--plum-light) 50%, var(--bg));}
.wave-front{opacity:0.95;}
@media (prefers-reduced-motion: no-preference){
  .wave-back{animation:waveDrift 18s linear infinite;}
  .wave-front{animation:waveDrift 10s linear infinite;}
}
@keyframes waveDrift{
  from{transform:translateX(0);}
  to{transform:translateX(-50%);}
}
.hero-sail-ark{
  position:absolute;left:50%;bottom:78px;
  width:72px;height:58px;
  transform:translateX(-50%);
  color:var(--text);
  filter:drop-shadow(0 0 18px color-mix(in srgb, var(--plum-glow) 65%, transparent));
  z-index:1;
}
.hero-sail-ark svg{width:100%;height:100%;}
@media (prefers-reduced-motion: no-preference){
  .hero-sail-ark{animation:sailBob 3.6s ease-in-out infinite;}
}
@keyframes sailBob{
  0%,100%{transform:translateX(-50%) translateY(0) rotate(-4deg);}
  50%{transform:translateX(-50%) translateY(-9px) rotate(4deg);}
}
@media (max-width:640px){
  .hero-waves{height:100px;}
  .hero-sail-ark{width:52px;height:42px;bottom:52px;}
}

.hero-sub{margin:22px auto 0;font-size:1.15rem;max-width:52ch;text-align:center;}
.hero .btn-row{margin-top:34px;justify-content:center;}
.trust-strip{justify-content:center;}

/* ---------- Hero trust strip (tutor credentials) ---------- */
.trust-strip{
  display:flex;flex-wrap:wrap;align-items:center;
  gap:8px 12px;margin-top:20px;
  font-size:0.86rem;color:var(--text-muted);
}
.trust-strip span{display:inline-flex;align-items:center;gap:6px;}
.trust-strip svg{color:var(--plum-glow);flex-shrink:0;}
.trust-strip .dot-sep{color:var(--line-strong);}
@media (max-width:640px){.trust-strip{font-size:0.8rem;gap:6px 10px;}}

/* ---------- Hero subject search ---------- */
/* Deliberately a bright card against the dark hero — the one "light" object
   in the scene, same move the reference makes with its search box. */
.hero-search{
  position:relative;
  display:flex;align-items:center;gap:8px;
  max-width:460px;margin:32px auto 0;
  background:#FBF8FC;
  border:1px solid rgba(0,0,0,0.06);
  border-radius:40px;
  padding:6px 6px 6px 22px;
  box-shadow:0 20px 40px -18px rgba(0,0,0,0.55);
  transition:box-shadow .2s ease;
}
.hero-search:focus-within{
  box-shadow:0 20px 40px -18px rgba(0,0,0,0.55), 0 0 0 4px color-mix(in srgb, var(--plum-glow) 35%, transparent);
}
.hero-search input{
  flex:1;border:none;outline:none;background:transparent;
  font-family:var(--sans);font-size:0.97rem;color:var(--ink);padding:11px 0;
}
.hero-search input::placeholder{color:var(--ink-muted);}
.hero-search button{
  flex-shrink:0;width:40px;height:40px;border-radius:50%;border:none;
  background:linear-gradient(135deg, var(--plum), var(--plum-light));color:#fff;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:filter .15s ease;
}
.hero-search button:hover{filter:brightness(1.12);}
@keyframes searchPulse{
  0%{box-shadow:0 20px 40px -18px rgba(0,0,0,0.55), 0 0 0 0 color-mix(in srgb, var(--plum-glow) 45%, transparent);}
  100%{box-shadow:0 20px 40px -18px rgba(0,0,0,0.55), 0 0 0 16px color-mix(in srgb, var(--plum-glow) 0%, transparent);}
}
.hero-search.pulse{animation:searchPulse .55s ease;}
.hero-search-status{margin:12px auto 0;max-width:none;font-size:0.87rem;min-height:1.3em;text-align:center;transition:opacity .2s ease;}
.hero-search-status.success{color:var(--plum-glow);}
.hero-search-status.error{color:var(--danger);}

/* ---------- Orbit strip (subjects, homepage) ---------- */
#orbit{padding-top:64px;padding-bottom:64px;}
.orbit-head{display:flex;align-items:baseline;justify-content:space-between;gap:20px;margin-bottom:30px;flex-wrap:wrap;}
.orbit-head h2{font-size:1.5rem;}
.orbit-head a{font-size:0.92rem;color:var(--plum-glow);text-decoration:none;display:inline-flex;align-items:center;gap:8px;}
.orbit-track{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding-bottom:10px;
  scrollbar-width:thin;
}
.orbit-chip{
  flex:0 0 auto;
  width:168px;
  border:1px solid var(--line);
  background:var(--bg-panel);
  border-radius:4px;
  padding:20px 18px;
  text-decoration:none;
  transition:border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.orbit-chip:hover{transform:translateY(-3px);box-shadow:0 14px 28px -22px rgba(42,26,48,0.35);}
.orbit-chip .dot{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:14px;}
.orbit-chip .dot svg{width:16px;height:16px;}
.orbit-chip .name{font-size:0.95rem;font-weight:600;color:var(--text);}
.orbit-chip .lvl{font-size:0.78rem;color:var(--text-muted);margin-top:4px;display:block;}

/* ---------- How it works ---------- */
#how{
  background:linear-gradient(180deg, var(--bg), var(--bg-panel) 40%, var(--bg));
}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.step{border-top:1px solid var(--line-strong);padding-top:20px;}
.step .num{
  font-family:var(--serif);font-weight:700;font-size:2.4rem;
  background:linear-gradient(90deg, var(--plum-glow), var(--gold));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.step h3{margin-top:10px;font-size:1.05rem;}
.step p{margin-top:8px;font-size:0.94rem;}

/* ---------- FAQ ---------- */
.faq-list{
  display:flex;flex-direction:column;gap:1px;
  background:var(--line);border:1px solid var(--line);
  max-width:760px;margin:0 auto;
}
.faq-item{background:var(--bg-panel);}
.faq-q{
  width:100%;text-align:left;background:none;border:none;color:var(--text);
  font-family:var(--serif);font-size:1.05rem;font-weight:600;
  padding:22px 26px;cursor:pointer;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.faq-q .plus{flex-shrink:0;width:22px;height:22px;display:flex;align-items:center;justify-content:center;color:var(--plum-glow);transition:transform .25s ease;}
.faq-item.open .faq-q .plus{transform:rotate(45deg);}
.faq-a{max-height:0;overflow:hidden;transition:max-height .3s ease;}
.faq-a p{padding:0 26px 22px;font-size:0.97rem;max-width:none;}
.faq-item.open .faq-a{max-height:200px;}

/* ---------- Stats band (trust numbers, homepage) ---------- */
.stats-band{
  padding:52px 0;
  background:var(--bg-panel);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  position:relative;
  overflow:hidden;
}
.stats-band-watermark{
  position:absolute;
  right:-60px;top:50%;transform:translateY(-50%);
  width:340px;height:260px;
  color:var(--plum-glow);
  opacity:0.06;
  pointer-events:none;
  z-index:0;
}
.stats-band-grid{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);}
.stat-block{background:var(--bg-panel);padding:6px 20px;text-align:center;}
.stat-block-figure{display:flex;align-items:baseline;justify-content:center;gap:2px;}
.stat-block-figure .stat-num{font-size:clamp(2rem, 1.6rem + 1.2vw, 2.7rem);}
.stat-block-suffix{font-family:var(--serif);font-weight:700;font-size:1.5rem;color:var(--gold);}
.stat-block-label{margin-top:6px;font-size:0.82rem;letter-spacing:0.03em;text-transform:uppercase;color:var(--text-muted);}
@media (max-width:640px){.stats-band-grid{grid-template-columns:repeat(2,1fr);gap:1px;}.stat-block{padding:16px 10px;}}

/* ---------- Results (grade breakdown + trajectory) ---------- */
.results-layout{display:grid;grid-template-columns:0.9fr 1.1fr;gap:56px;align-items:center;}
.donut-card{
  display:flex;align-items:center;gap:28px;flex-wrap:wrap;
  background:var(--bg-panel);border:1px solid var(--line);border-radius:4px;padding:32px;
}
.donut{
  width:148px;height:148px;border-radius:50%;flex-shrink:0;
  background:conic-gradient(var(--plum) 0% 67.6%, var(--plum-light) 67.6% 94.6%, var(--slate) 94.6% 100%);
  position:relative;
}
.donut::after{
  content:"";position:absolute;inset:22px;
  background:var(--bg-panel);border-radius:50%;
  z-index:1;
}
.donut-total{
  position:absolute;inset:22px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-family:var(--serif);
  z-index:2;
}
.donut-total .n{font-size:1.6rem;font-weight:700;color:var(--text);}
.donut-total .l{font-size:0.68rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.03em;}
.donut-legend{display:flex;flex-direction:column;gap:12px;}
.donut-legend .row{display:flex;align-items:center;gap:10px;font-size:0.95rem;color:var(--text);}
.donut-legend .dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;}
.donut-legend .row b{font-family:var(--serif);}
.results-copy h2{font-size:var(--fs-h2);}
.results-copy p{margin-top:14px;font-size:1.02rem;}
.trajectory{display:flex;align-items:center;gap:10px;margin-top:24px;flex-wrap:wrap;}
.trajectory .chip{
  padding:8px 16px;border-radius:20px;border:1px solid var(--line-strong);
  font-family:var(--serif);font-weight:600;font-size:0.95rem;color:var(--text);
  background:var(--bg-panel);
}
.trajectory .chip.up{color:#fff;background:var(--plum);border-color:var(--plum);}
.trajectory svg{color:var(--plum-glow);flex-shrink:0;}
@media (max-width:900px){
  .results-layout{grid-template-columns:1fr;gap:36px;}
  .donut-card{justify-content:center;}
}

/* ---------- Feature grid ("what you get") ---------- */
.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);border:1px solid var(--line);}
.feature-item{background:var(--bg-panel);padding:30px 26px;}
.feature-item .icon{
  width:42px;height:42px;border-radius:10px;
  background:color-mix(in srgb, var(--plum-glow) 20%, transparent);
  color:var(--plum-glow);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:16px;
}
.feature-item .icon svg{width:21px;height:21px;}
.feature-item h3{font-size:1.02rem;}
.feature-item p{margin-top:8px;font-size:0.92rem;}
@media (max-width:900px){.feature-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){.feature-grid{grid-template-columns:1fr;}}
/* ---------- Testimonials ---------- */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);}
.stat-card{background:var(--bg-panel);padding:36px 24px;text-align:center;}
.stat-num{font-family:var(--serif);font-size:2.5rem;font-weight:700;color:var(--gold);}
.stat-label{margin-top:8px;font-size:0.9rem;color:var(--text-muted);}
.testimonial-author{font-family:var(--serif);font-weight:600;color:var(--plum);font-size:1rem;margin-top:16px;}
.stats-note{text-align:center;font-size:0.82rem;color:var(--text-muted);margin-top:20px;opacity:0.7;}

/* ---------- Video reviews (YouTube, homepage) ---------- */
.review-track{
  display:flex;gap:18px;justify-content:center;flex-wrap:wrap;
}
.review-card{flex:0 0 auto;width:216px;}
.review-frame{
  position:relative;
  aspect-ratio:9/16;
  border-radius:10px;
  overflow:hidden;
  background:var(--bg-panel);
  border:1px solid var(--line);
  cursor:pointer;
}
.review-thumb{width:100%;height:100%;object-fit:cover;display:block;}
.review-play{
  position:absolute;inset:0;margin:auto;
  width:54px;height:54px;border-radius:50%;
  background:rgba(255,255,255,0.94);color:var(--plum);
  border:none;display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 10px 24px -8px rgba(30,20,35,0.45);
  transition:transform .15s ease;
}
.review-play svg{margin-left:2px;}
.review-frame:hover .review-play{transform:scale(1.08);}
.review-caption{margin-top:10px;font-size:0.86rem;color:var(--text-muted);text-align:center;}
@media (max-width:640px){
  .review-track{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding-bottom:8px;}
  .review-card{width:168px;}
}

/* ---------- Final CTA band ---------- */
.cta-band{
  background:linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  text-align:center;
}
.cta-band h2{font-size:var(--fs-h2);}
.cta-band p{margin:14px auto 0;font-size:1.05rem;}
.cta-band .btn-row{margin-top:30px;}

@media (max-width:900px){
  .stats-grid{grid-template-columns:repeat(2,1fr);}
  .steps{grid-template-columns:1fr;gap:28px;}
}
@media (max-width:640px){
  .hero h1{font-size:var(--fs-hero);}
  .hero{min-height:auto;padding:90px 0 56px;}
  .stats-grid{grid-template-columns:1fr;}
}

/* =====================================================================
   Courses page
   ===================================================================== */
.courses-hero{padding:150px 0 36px;text-align:center;}
.courses-hero h1{font-size:var(--fs-hero);}
.courses-hero p{margin:14px auto 0;font-size:1.05rem;max-width:52ch;}

.subjects-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;}
.subject-card{
  border:1px solid var(--line);
  background:var(--bg-panel);
  padding:26px 22px;
  display:flex;flex-direction:column;
  border-radius:4px;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.subject-card:hover{
  transform:translateY(-4px);
  border-color:color-mix(in srgb, var(--plum-glow) 55%, var(--line));
  box-shadow:0 20px 40px -20px rgba(0,0,0,0.7), 0 0 26px -6px color-mix(in srgb, var(--plum-glow) 45%, transparent);
}
.subject-card .arc-mark{stroke:var(--plum-glow);margin-bottom:16px;}
.subject-card .icon{
  width:40px;height:40px;border-radius:10px;
  background:color-mix(in srgb, var(--plum-glow) 20%, transparent);
  color:var(--plum-glow);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:14px;
}
.subject-card h3{font-size:var(--fs-h3);font-weight:600;color:var(--text);}
.subject-card .levels{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 14px;}
.subject-card .levels span{
  font-size:0.74rem;padding:3px 9px;border-radius:20px;
  border:1px solid var(--line-strong);color:var(--text-muted);
}
.subject-card .desc{font-size:0.9rem;color:var(--text-muted);margin-bottom:20px;flex-grow:1;}
.subject-card .learn-more{
  align-self:flex-start;display:inline-flex;align-items:center;gap:9px;
  font-size:0.92rem;font-weight:500;color:var(--plum-glow);
  text-decoration:none;
}
.subject-card .go-arc .sun{fill:var(--plum-glow);}

@media (max-width:900px){.subjects-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){
  .courses-hero{padding:120px 0 28px;}
  .courses-hero h1{font-size:2rem;}
  .subjects-grid{grid-template-columns:1fr;}
}

/* =====================================================================
   Subject page
   ===================================================================== */

/* A faint, subject-specific motif tiled behind the whole page — the one
   place color differentiates by subject; everything else stays purple/grey.
   Sits behind all content and never darkens the white background. */
#subjectPatternLayer{
  position:fixed;
  inset:0;
  z-index:-1;
  color:var(--plum-glow);
  opacity:0.22;
  pointer-events:none;
}
#subjectPatternLayer svg{width:100%;height:100%;}

.subject-hero{padding:150px 0 0;}
.back-link{display:inline-flex;align-items:center;gap:8px;margin-bottom:22px;font-size:0.9rem;color:var(--text-muted);text-decoration:none;}
.back-link:hover{color:var(--plum-glow);}
.back-link .go-arc{transform:scaleX(-1);}
.subject-hero .subject-icon{
  width:52px;height:52px;border-radius:12px;
  background:color-mix(in srgb, var(--plum-glow) 20%, transparent);
  color:var(--plum-glow);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;
}
.subject-hero .subject-icon svg{width:26px;height:26px;}
.subject-hero h1{font-size:var(--fs-hero);}
.subject-hero .levels{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;}
.subject-hero .levels span{font-size:0.82rem;padding:5px 12px;border-radius:20px;border:1px solid var(--line-strong);color:var(--text-muted);}
.subject-hero p.blurb{margin-top:18px;font-size:1.05rem;max-width:56ch;}

.subject-layout{display:grid;grid-template-columns:1.15fr 0.85fr;gap:44px;align-items:start;}
.subject-main > * + *{margin-top:56px;}

.tutor-card{
  display:flex;align-items:flex-start;gap:20px;
  background:var(--bg-panel);border:1px solid var(--line);padding:28px;border-radius:4px;
}
.tutor-avatar{
  flex-shrink:0;width:56px;height:56px;border-radius:50%;
  background:color-mix(in srgb, var(--plum-glow) 20%, transparent);
  color:var(--plum-glow);display:flex;align-items:center;justify-content:center;
}
.tutor-label{display:block;font-size:0.8rem;text-transform:uppercase;letter-spacing:0.04em;color:var(--plum-glow);margin-bottom:6px;}
.tutor-card h3{font-size:1.15rem;margin-bottom:8px;}
.tutor-card p{font-size:0.95rem;}

.batch-list{border-top:1px solid var(--line-strong);}
.batch-row{
  display:flex;align-items:baseline;justify-content:space-between;gap:16px;
  padding:16px 2px;border-bottom:1px solid var(--line);
}
.batch-row h4{font-family:var(--sans);font-weight:600;font-size:0.98rem;color:var(--text);}
.batch-row span{font-size:0.9rem;color:var(--text-muted);text-align:right;}
.batches-note{font-size:0.85rem;color:var(--text-muted);margin-top:16px;}

.register-card{
  position:sticky;top:96px;
  background:#FBF8FC;
  padding:34px 30px;border-radius:16px;
  box-shadow:0 30px 60px -20px rgba(0,0,0,0.6);
}
.register-card h2,.register-card h3{color:var(--ink);font-size:1.45rem;}
.register-card > p{margin-top:12px;font-size:0.98rem;color:var(--ink-muted);}
.subject-pill{display:inline-flex;margin-top:16px;padding:7px 16px;border-radius:20px;background:color-mix(in srgb, var(--plum-glow) 16%, transparent);color:var(--plum);font-size:0.86rem;font-weight:600;}
.register-note{margin-top:18px;font-size:0.87rem;color:var(--ink-muted);}
.register-note a{color:var(--plum);}
.reg-form{margin-top:26px;display:flex;flex-direction:column;gap:18px;}
.field label{display:block;font-size:0.9rem;font-weight:500;color:var(--ink);margin-bottom:7px;}
.field input[type="text"],.field input[type="tel"],.field input[type="email"]{
  width:100%;padding:11px 14px;border:1px solid rgba(0,0,0,0.14);border-radius:8px;
  font-family:var(--sans);font-size:0.97rem;color:var(--ink);background:#fff;
  transition:border-color .15s ease;
}
.field input:focus{outline:none;border-color:var(--plum-glow);}
.radio-group,.checkbox-group{display:flex;flex-wrap:wrap;gap:9px 18px;}
.radio-group label,.checkbox-group label{display:flex;align-items:center;gap:8px;font-size:0.93rem;font-weight:400;margin-bottom:0;cursor:pointer;color:var(--ink);}
.radio-group input,.checkbox-group input{accent-color:var(--plum);width:16px;height:16px;cursor:pointer;}
.reg-form .btn-primary{align-self:flex-start;margin-top:4px;}
.form-status{margin-top:0;font-size:0.9rem;min-height:1.3em;max-width:none;}
.form-status.success{color:#2F7A4A;}
.form-status.error{color:#B23A55;}

@media (max-width:900px){
  .subject-layout{grid-template-columns:1fr;}
  .register-card{position:static;}
}
@media (max-width:640px){
  .subject-hero{padding:120px 0 0;}
  .subject-hero h1{font-size:2rem;}
  .tutor-card{flex-direction:column;text-align:left;}
  .register-card{padding:26px 22px;}
}

/* =====================================================================
   About page
   ===================================================================== */
.about-hero{padding:150px 0 20px;}
.about-hero h1{font-size:var(--fs-hero);max-width:16ch;}
.about-hero p.lede{margin-top:18px;font-size:1.1rem;max-width:56ch;}
.about-points{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:8px;}
.about-point{border-top:1px solid var(--line-strong);padding-top:18px;}
.about-point h3{font-size:1.02rem;}
.about-point p{margin-top:8px;font-size:0.94rem;}
.about-cta{text-align:left;margin-top:52px;padding-top:36px;border-top:1px solid var(--line);}
@media (max-width:900px){.about-points{grid-template-columns:1fr;gap:28px;}}
@media (max-width:640px){.about-hero{padding:120px 0 10px;}.about-hero h1{font-size:2rem;max-width:none;}}

/* =====================================================================
   Resources page
   ===================================================================== */
.resources-hero{padding:150px 0 36px;text-align:center;}
.resources-hero h1{font-size:var(--fs-hero);}
.resources-hero p{margin:14px auto 0;font-size:1.05rem;max-width:56ch;}

.resources-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
.resource-card{
  border:1px solid var(--line);
  background:var(--bg-panel);
  padding:26px 24px;
  border-radius:4px;
}
.resource-card .icon{
  width:40px;height:40px;border-radius:10px;
  background:color-mix(in srgb, var(--plum-glow) 20%, transparent);
  color:var(--plum-glow);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:14px;
}
.resource-card .icon svg{width:20px;height:20px;}
.resource-card h3{font-size:var(--fs-h3);font-weight:600;color:var(--text);margin-bottom:14px;}
.resource-list{border-top:1px solid var(--line-strong);}
.resource-item{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:13px 2px;border-bottom:1px solid var(--line);
  text-decoration:none;transition:color .15s ease;
}
.resource-item:hover{color:var(--plum-glow);}
.resource-item-title{font-size:0.94rem;color:var(--text);}
.resource-item:hover .resource-item-title{color:var(--plum-glow);}
.resource-item-type{
  flex-shrink:0;font-size:0.72rem;font-weight:600;letter-spacing:0.03em;text-transform:uppercase;
  color:var(--text-muted);border:1px solid var(--line-strong);border-radius:20px;padding:3px 10px;
}
.resource-empty{font-size:0.92rem;color:var(--text-muted);}
.resources-note{text-align:center;font-size:0.85rem;color:var(--text-muted);margin:26px auto 0;max-width:none;}

@media (max-width:900px){.resources-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){
  .resources-hero{padding:120px 0 28px;}
  .resources-hero h1{font-size:2rem;}
  .resources-grid{grid-template-columns:1fr;}
}

/* =====================================================================
   Page-to-page transition
   A single quiet, reused moment: the outgoing page fades down with a soft
   plum wash, the incoming page fades up through the same wash. Handled by
   transitions.js, which toggles the classes below.
   ===================================================================== */
body{
  transition:opacity .28s ease;
}
html.tag-arriving body{opacity:0;}
body.tag-leaving{opacity:0;}
body::before{
  content:"";
  position:fixed;inset:0;
  z-index:9999;
  pointer-events:none;
  opacity:0;
  background:radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--plum-glow) 22%, transparent), transparent 62%);
  transition:opacity .28s ease;
}
html.tag-arriving body::before,
body.tag-leaving::before{opacity:1;}

@media (prefers-reduced-motion: reduce){
  body,body::before{transition:none;}
  html.tag-arriving body{opacity:1;}
  html.tag-arriving body::before,
  body.tag-leaving::before{opacity:0;}
}

/* ---------- Voyage tracker (site-wide journey progress) ---------- */
/* A real, persisted (sessionStorage) record of how far a visitor has sailed
   toward enrolling — Home, Courses, Their Course, Registering, Enrolled —
   not tied to scroll position on any one page. */
.voyage-bar{
  background:var(--bg-panel);
  border-bottom:1px solid var(--line);
  padding:16px 28px 12px;
}
.voyage-track{
  position:relative;
  max-width:1120px;margin:0 auto;
  height:4px;
  background:var(--line-strong);
  border-radius:2px;
}
.voyage-fill{
  position:absolute;left:0;top:0;height:100%;
  background:linear-gradient(90deg, var(--plum), var(--plum-glow));
  border-radius:2px;
  transition:width .6s ease;
}
.voyage-ark{
  position:absolute;top:50%;
  width:26px;height:20px;
  color:var(--gold);
  transform:translate(-50%,-70%);
  transition:left .6s ease;
}
.voyage-ark svg{width:100%;height:100%;}
@media (prefers-reduced-motion: no-preference){
  .voyage-ark{animation:voyageBob 2.4s ease-in-out infinite;}
}
@keyframes voyageBob{
  0%,100%{transform:translate(-50%,-70%) rotate(-4deg);}
  50%{transform:translate(-50%,-84%) rotate(4deg);}
}
.voyage-stops{
  max-width:1120px;margin:7px auto 0;
  display:flex;justify-content:space-between;
}
.voyage-stop{display:flex;flex-direction:column;align-items:center;gap:5px;flex:1;text-align:center;}
.voyage-stop:first-child{align-items:flex-start;text-align:left;}
.voyage-stop:last-child{align-items:flex-end;text-align:right;}
.voyage-dot{width:8px;height:8px;border-radius:50%;background:var(--line-strong);transition:background .3s ease;}
.voyage-stop.done .voyage-dot{background:var(--plum-glow);}
.voyage-stop.current .voyage-dot{background:var(--gold);box-shadow:0 0 0 4px color-mix(in srgb, var(--gold) 30%, transparent);}
.voyage-label{font-size:0.68rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.03em;}
.voyage-stop.current .voyage-label{color:var(--text);font-weight:700;}
.voyage-stop.done .voyage-label{color:var(--plum-glow);}
@media (max-width:700px){
  .voyage-label{display:none;}
  .voyage-bar{padding:14px 16px 10px;}
}

/* ---------- Sticky "Ask us" tab (site-wide) ---------- */
.ask-tab{
  position:fixed;
  right:0;top:50%;
  transform:translateY(-50%) translateX(0);
  z-index:60;
  display:flex;align-items:center;gap:8px;
  background:linear-gradient(135deg, var(--plum), var(--plum-light));
  color:#fff;
  padding:14px 12px;
  border-radius:12px 0 0 12px;
  text-decoration:none;
  font-size:0.86rem;font-weight:600;
  writing-mode:vertical-rl;
  box-shadow:-8px 8px 24px -10px rgba(0,0,0,0.5);
  transition:padding-right .15s ease, filter .15s ease;
}
.ask-tab:hover{padding-right:18px;filter:brightness(1.1);}
.ask-tab svg{writing-mode:horizontal-tb;flex-shrink:0;}
@media (max-width:640px){
  .ask-tab{padding:10px 8px;font-size:0.78rem;}
}

/* ---------- Mobile ---------- */
@media (max-width:640px){
  .brand-logo{height:44px;width:44px;}
  .brand-text strong{font-size:0.98rem;}
  .brand-text em{font-size:0.6rem;}
  .nav-links{
    position:absolute;top:100%;left:0;right:0;
    background:var(--bg-panel);border-bottom:1px solid var(--line);
    flex-direction:column;align-items:flex-start;gap:0;
    display:none;padding:8px 28px 18px;
  }
  .nav-links.open{display:flex;}
  .nav-links a{padding:12px 0;border-bottom:1px solid var(--line);width:100%;}
  .nav-cta{display:none;}
  .menu-btn{display:block;}
  section{padding:64px 0 48px;}
  .footer-grid{grid-template-columns:1fr;gap:32px;}
}
