/* ==========================================================
   S.M.C Godda — Mathematic Classes
   Main Stylesheet
   ========================================================== */

/* ---------- Theme tokens ---------- */
:root {
  --bg: #f7f8fc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3fb;
  --text: #141a33;
  --text-muted: #5a6284;
  --border: rgba(124, 108, 255, 0.14);
  --primary: #6c5ce7;
  --primary-2: #8b7bff;
  --accent: #22c1dc;
  --accent-2: #f5a623;
  --gradient: linear-gradient(120deg, #6c5ce7 0%, #8b7bff 45%, #22c1dc 100%);
  --shadow: 0 18px 50px rgba(29, 34, 74, 0.09);
  --shadow-lg: 0 28px 70px rgba(29, 34, 74, 0.14);
  --radius: 20px;
  --header-h: 78px;
  --max-w: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  --bg: #0a0d1c;
  --bg-alt: #0e1226;
  --surface: #121731;
  --surface-2: #171d3d;
  --text: #eef1ff;
  --text-muted: #a5aecb;
  --border: rgba(140, 130, 255, 0.2);
  --primary: #8b7bff;
  --primary-2: #a99cff;
  --accent: #34d8ee;
  --accent-2: #ffc14d;
  --gradient: linear-gradient(120deg, #8b7bff 0%, #a99cff 45%, #34d8ee 100%);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
body.menu-open { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; line-height: 1.2; margin: 0; font-weight: 700; }
p { margin: 0 0 1rem; }
::selection { background: var(--primary); color: #fff; }

.container { width: min(100% - 40px, var(--max-w)); margin-inline: auto; }
.section { padding: clamp(70px, 9vw, 120px) 0; position: relative; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .3s var(--ease), box-shadow .3s ease, background .3s ease, color .3s ease;
  white-space: nowrap;
}
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 12px 30px rgba(108, 92, 231, .35); }
.btn--primary:hover { box-shadow: 0 18px 40px rgba(108, 92, 231, .5); }
.btn--ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--small { padding: 10px 18px; font-size: .82rem; }

/* ---------- Section heading ---------- */
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--primary);
  margin-bottom: 16px;
}
.section-label span { width: 28px; height: 2px; background: var(--gradient); border-radius: 2px; }
.section-head--center .section-label { justify-content: center; }
.section-title { font-size: clamp(1.9rem, 4.2vw, 2.9rem); letter-spacing: -0.02em; }
.section-desc { color: var(--text-muted); font-size: 1.02rem; max-width: 620px; }
.section-head--center .section-desc { margin-inline: auto; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; }
.preloader__symbol {
  font-family: 'Poppins', sans-serif; font-size: 4rem; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pulseRotate 1.4s ease-in-out infinite;
}
.preloader__text { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.2rem; margin-top: 8px; }
.preloader__text span { color: var(--primary); }
.preloader__bar { width: 160px; height: 3px; background: var(--surface-2); border-radius: 4px; margin: 18px auto 0; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 40%; background: var(--gradient); border-radius: 4px; animation: loadingBar 1s ease-in-out infinite; }
@keyframes pulseRotate { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(8deg); } }
@keyframes loadingBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1001;
  background: var(--gradient); transition: width .1s linear;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 1000;
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, height .3s ease;
}
.header.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  height: 68px;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__icon {
  width: 42px; height: 42px; color: var(--primary);
  display: grid; place-items: center;
  filter: drop-shadow(0 4px 12px rgba(108,92,231,.3));
}
.brand__icon svg { width: 100%; height: 100%; }
.brand__text strong { display: block; font-family: 'Poppins', sans-serif; font-size: 1.05rem; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.brand__text strong em { font-style: normal; color: var(--primary); }
.brand__text small { display: block; font-size: .62rem; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav__link {
  font-size: .88rem; font-weight: 500; color: var(--text-muted); position: relative;
  transition: color .25s ease;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--gradient); border-radius: 2px; transition: width .3s var(--ease);
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__cta { margin-left: 4px; }

.header__actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: grid; place-items: center;
  transition: background .3s ease, border-color .3s ease, transform .3s var(--ease);
}
.theme-toggle:hover { border-color: var(--primary); transform: rotate(20deg); }
.theme-toggle svg { width: 20px; height: 20px; position: absolute; transition: opacity .3s ease, transform .4s var(--ease); }
.theme-toggle { position: relative; }
.theme-toggle__sun { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle__moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .theme-toggle__sun { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="dark"] .theme-toggle__moon { opacity: 1; transform: rotate(0) scale(1); }

.menu-toggle {
  display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); padding: 10px;
}
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 5px 0; transition: .3s var(--ease); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; padding: calc(var(--header-h) + 60px) 0 90px;
  display: flex; align-items: center; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 10%, transparent 72%);
  opacity: .7;
}
.hero__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; }
.hero__glow--1 { width: 460px; height: 460px; background: #6c5ce7; top: -80px; right: -60px; animation: glowFloat 9s ease-in-out infinite; }
.hero__glow--2 { width: 360px; height: 360px; background: #22c1dc; bottom: -100px; left: -80px; animation: glowFloat 11s ease-in-out infinite reverse; }
@keyframes glowFloat { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px, 40px); } }

.float-symbol {
  position: absolute; left: var(--x); top: var(--y);
  font-family: 'Poppins', sans-serif; font-size: var(--s); font-weight: 700;
  color: var(--primary); opacity: .13;
  animation: floaty var(--t) ease-in-out infinite; animation-delay: var(--d);
  user-select: none;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-24px) rotate(12deg); } }

.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  color: var(--primary); box-shadow: var(--shadow); margin-bottom: 24px;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c1dc; box-shadow: 0 0 0 4px rgba(34,193,220,.16); animation: blink 1.8s infinite; }
@keyframes blink { 0%,100% { box-shadow: 0 0 0 4px rgba(34,193,220,.16); } 50% { box-shadow: 0 0 0 8px rgba(34,193,220,0); } }

.hero__title { font-size: clamp(2.4rem, 5.5vw, 4.1rem); letter-spacing: -.035em; margin-bottom: 22px; }
.underline-svg { position: relative; white-space: nowrap; }
.underline-svg svg { position: absolute; left: 0; bottom: -8px; width: 100%; height: 14px; color: var(--accent); }
.hero__desc { color: var(--text-muted); font-size: 1.05rem; max-width: 530px; margin-bottom: 30px; }
.hero__desc strong { color: var(--text); }
.hero__desc em { color: var(--primary); font-style: normal; font-weight: 600; }
.hero__buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero__trust { display: flex; align-items: center; gap: 14px; }
.avatars { display: flex; }
.avatars span {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; color: #fff; border: 2px solid var(--bg);
  margin-left: -9px; background: var(--primary);
}
.avatars span:nth-child(1){background:#6c5ce7}.avatars span:nth-child(2){background:#22c1dc}
.avatars span:nth-child(3){background:#f5a623}.avatars span:nth-child(4){background:#ef5a8a}
.avatars span:nth-child(5){background:var(--surface-2);color:var(--text)}
.avatars span:first-child { margin-left: 0; }
.stars { color: #f5a623; font-size: .9rem; letter-spacing: 2px; }
.stars span { color: var(--text); font-size: .8rem; letter-spacing: 0; font-weight: 600; margin-left: 6px; }
.hero__trust p { font-size: .8rem; color: var(--text-muted); margin: 2px 0 0; }
.hero__trust p strong { color: var(--text); }

/* Hero visual board */
.hero__visual { position: relative; }
.board {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow-lg); overflow: hidden; transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  animation: boardFloat 6s ease-in-out infinite;
}
@keyframes boardFloat { 0%,100% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(0); } 50% { transform: perspective(1200px) rotateY(-3deg) rotateX(1deg) translateY(-12px); } }
.board__topbar {
  height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.board__dots { display: flex; gap: 6px; }
.board__dots i { width: 9px; height: 9px; border-radius: 50%; background: #ef5a8a; }
.board__dots i:nth-child(2) { background: #f5a623; }
.board__dots i:nth-child(3) { background: #22c1dc; }
.board__title { font-size: .7rem; color: var(--text-muted); font-family: monospace; }
.board__wifi { margin-left: auto; color: var(--primary); }
.board__body { position: relative; padding: 34px 28px; min-height: 330px; color: var(--primary); }
.board__graph { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.curve-line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: drawCurve 3s ease forwards .5s; }
@keyframes drawCurve { to { stroke-dashoffset: 0; } }
.curve-dot { animation: blink 2s infinite; }
.board__equation {
  position: relative; font-family: 'Poppins', sans-serif; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  border-radius: 12px; padding: 10px 16px; display: inline-block;
}
.board__equation--main { font-size: 1.15rem; color: var(--text); }
.board__equation--sub { margin-top: 14px; font-size: 1rem; color: var(--primary); }
.frac { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; font-size: .82rem; line-height: 1.2; }
.frac span:first-child { border-bottom: 1px solid currentColor; padding: 0 6px 2px; }
.board__chip {
  position: absolute; font-size: .68rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary);
  border: 1px solid var(--border); animation: floaty 5s ease-in-out infinite;
}
.board__chip--1 { top: 60px; right: 24px; }
.board__chip--2 { bottom: 70px; right: 40px; animation-delay: 1s; }
.board__chip--3 { bottom: 34px; left: 30px; animation-delay: 2s; }
.board__cursor { position: absolute; width: 10px; height: 16px; background: var(--primary); right: 18%; top: 46%; opacity: .8; animation: cursorMove 7s steps(1) infinite; }
@keyframes cursorMove { 0%,100% { transform: translate(0,0); opacity: .8; } 50% { transform: translate(-60px, 90px); opacity: .2; } }

.floating-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: 12px 16px; border-radius: 14px; z-index: 2; animation: floaty 5s ease-in-out infinite;
}
.floating-card--a { top: -26px; left: -34px; animation-delay: .5s; }
.floating-card--b { bottom: -26px; right: -26px; animation-delay: 2s; }
.floating-card__icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-size: 1.1rem; font-weight: 700;
}
.floating-card strong { display: block; font-family: 'Poppins', sans-serif; font-size: .8rem; }
.floating-card small { font-size: .68rem; color: var(--text-muted); }
.sparkle { position: absolute; color: var(--accent-2); font-size: 1.4rem; animation: twinkle 2.5s ease-in-out infinite; }
.sparkle--1 { top: 10%; right: 8%; }
.sparkle--2 { bottom: 12%; left: 8%; animation-delay: .8s; }
.sparkle--3 { top: 48%; left: -18px; animation-delay: 1.6s; }
@keyframes twinkle { 0%,100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(90deg); } }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.hero__mouse { width: 22px; height: 34px; border: 2px solid var(--text-muted); border-radius: 12px; display: grid; justify-items: center; padding-top: 6px; }
.hero__mouse i { width: 3px; height: 7px; background: var(--primary); border-radius: 3px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--gradient); color: #fff; padding: 14px 0; overflow: hidden; transform: rotate(-1.5deg) scale(1.02);
  position: relative; z-index: 3; box-shadow: var(--shadow);
}
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__track span { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .9rem; letter-spacing: .18em; padding-right: 30px; white-space: nowrap; }
.marquee__track b { opacity: .6; margin: 0 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 80px; align-items: center; }
.about__visual { position: relative; }
.about__frame {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; position: relative; box-shadow: var(--shadow);
}
.about__art { width: 100%; height: auto; border-radius: 12px; }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--primary); }
.corner--tl { top: -6px; left: -6px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner--tr { top: -6px; right: -6px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner--bl { bottom: -6px; left: -6px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner--br { bottom: -6px; right: -6px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.about__experience {
  position: absolute; bottom: -30px; right: -20px; width: 128px; height: 128px; border-radius: 50%;
  background: var(--gradient); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 16px 40px rgba(108,92,231,.4); border: 5px solid var(--bg); animation: floaty 5s ease-in-out infinite;
}
.about__experience strong { font-family: 'Poppins', sans-serif; font-size: 2rem; line-height: 1; }
.about__experience strong span { font-size: 1.2rem; }
.about__experience p { font-size: .68rem; text-align: center; margin: 4px 0 0; line-height: 1.3; }
.about__content .section-title { margin-bottom: 18px; }
.about__features { margin: 28px 0 32px; display: grid; gap: 18px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-item__icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .85rem;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary);
  border: 1px solid var(--border);
}
.feature-item strong { font-family: 'Poppins', sans-serif; font-size: .98rem; }
.feature-item p { color: var(--text-muted); font-size: .88rem; margin: 2px 0 0; }

/* ---------- Courses ---------- */
.courses { background: var(--bg-alt); }
.courses__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.course-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
  transition: transform .4s var(--ease), box-shadow .4s ease, border-color .3s ease;
  overflow: hidden;
}
.course-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.course-card:hover::before { transform: scaleX(1); }
.course-card--featured { border-color: var(--primary); }
.course-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.course-card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary);
  font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 700;
}
.course-card__tag { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--gradient); padding: 5px 12px; border-radius: 999px; }
.course-card__tag--alt { background: var(--surface-2); color: var(--text-muted); }
.course-card h3 { font-size: 1.28rem; }
.course-card h3 span { display: block; font-family: 'Inter', sans-serif; font-size: .78rem; font-weight: 500; color: var(--primary); letter-spacing: .04em; margin-top: 4px; }
.course-card > p { color: var(--text-muted); font-size: .9rem; margin: 14px 0 18px; }
.course-card__list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.course-card__list li { position: relative; padding-left: 24px; font-size: .86rem; color: var(--text-muted); }
.course-card__list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 700; }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 18px; }
.course-card__batch { font-size: .76rem; color: var(--text-muted); }
.course-card__link { font-size: .85rem; font-weight: 600; color: var(--primary); transition: transform .3s var(--ease); }
.course-card__link:hover { transform: translateX(4px); }

/* Sparkling animated border on featured card */
@property --spark-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.spark-border {
  position: absolute; inset: -2px; border-radius: 22px; z-index: 0; pointer-events: none;
  background: conic-gradient(from var(--spark-angle), transparent 0 70%, var(--primary) 78%, var(--accent) 86%, #fff 92%, transparent 100%);
  animation: spinBorder 4s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
}
@keyframes spinBorder { to { --spark-angle: 360deg; } }
.course-card--featured::after {
  content: '✦'; position: absolute; top: 14px; right: 16px; color: var(--accent-2); font-size: 1.2rem;
  animation: twinkle 2.5s ease-in-out infinite; opacity: .9;
}

/* ---------- Results / Stats ---------- */
.results { color: #fff; overflow: hidden; background: linear-gradient(135deg, #1a1b3a 0%, #23245c 50%, #12142e 100%); }
.results__overlay {
  position: absolute; inset: 0; opacity: .3;
  background-image: radial-gradient(circle at 20% 30%, #6c5ce7 0, transparent 40%), radial-gradient(circle at 80% 70%, #22c1dc 0, transparent 40%);
}
.results__inner { position: relative; z-index: 1; }
.results .section-title { color: #fff; }
.results .gradient-text { background: linear-gradient(120deg, #a99cff, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.results .section-label { color: #a99cff; }
.results .section-label span { background: #a99cff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat {
  text-align: center; padding: 32px 16px; border-radius: 18px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px); transition: transform .4s var(--ease), background .3s ease;
}
.stat:hover { transform: translateY(-8px); background: rgba(255,255,255,.1); }
.stat__icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.stat strong { font-family: 'Poppins', sans-serif; font-size: clamp(2rem, 4vw, 2.8rem); display: block; line-height: 1; background: linear-gradient(120deg,#fff,#a99cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat p { margin: 8px 0 0; font-size: .85rem; color: rgba(255,255,255,.7); }

/* ---------- Why ---------- */
.why__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px; box-shadow: var(--shadow); text-align: center;
  transition: transform .4s var(--ease), box-shadow .4s ease;
}
.why-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-lg); }
.why-card__bubble {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center;
  font-size: 1.7rem; background: var(--surface-2); border: 1px solid var(--border);
  transition: transform .4s var(--ease);
}
.why-card:hover .why-card__bubble { transform: rotate(-10deg) scale(1.1); }
.why-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.why-card p { color: var(--text-muted); font-size: .87rem; margin: 0; }

/* ---------- Testimonial carousel ---------- */
.testimonials { background: var(--bg-alt); overflow: hidden; }
.carousel { position: relative; max-width: 760px; margin-inline: auto; }
.carousel__viewport { overflow: hidden; border-radius: var(--radius); }
.carousel__track { display: flex; transition: transform .6s var(--ease); }
.carousel__slide { min-width: 100%; padding: 8px; }
.testimonial {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 46px 36px; box-shadow: var(--shadow); text-align: center; min-height: 310px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.testimonial__quote {
  position: absolute; top: 8px; left: 26px; font-family: 'Poppins', sans-serif; font-size: 6rem;
  line-height: 1; color: var(--primary); opacity: .16;
}
.testimonial__stars { color: #f5a623; letter-spacing: 3px; margin-bottom: 14px; }
.testimonial p { font-size: 1.05rem; color: var(--text); max-width: 600px; margin-bottom: 26px; font-style: italic; }
.testimonial__person { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700;
}
.testimonial__person strong { display: block; font-family: 'Poppins', sans-serif; font-size: .92rem; }
.testimonial__person small { color: var(--text-muted); font-size: .76rem; }
.carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 1.7rem; line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow);
  transition: background .3s ease, color .3s ease, transform .3s var(--ease); z-index: 2;
}
.carousel__arrow:hover { background: var(--primary); color: #fff; transform: translateY(-50%) scale(1.08); }
.carousel__arrow--prev { left: -22px; }
.carousel__arrow--next { right: -22px; }
.carousel__dots { display: flex; justify-content: center; gap: 9px; margin-top: 26px; }
.carousel__dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: var(--border); padding: 0; transition: width .3s var(--ease), background .3s ease; }
.carousel__dots button.active { width: 28px; background: var(--gradient); }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.faq__intro .section-title { margin: 0 0 18px; }
.faq__intro .btn { margin-top: 10px; }
.faq__list { display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: border-color .3s ease; }
.faq-item.open { border-color: var(--primary); }
.faq-item__q {
  width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .95rem; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item__q span { color: var(--primary); font-size: 1.3rem; transition: transform .3s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-item__q span { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-item__a p { padding: 0 20px 18px; color: var(--text-muted); font-size: .88rem; margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-alt); }
.contact__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; margin-bottom: 48px; }
.contact__info { display: grid; gap: 14px; align-content: start; }
.contact-card {
  display: flex; align-items: center; gap: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), border-color .3s ease;
}
.contact-card:hover { transform: translateX(6px); border-color: var(--primary); }
.contact-card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); flex-shrink: 0;
}
.contact-card strong { font-family: 'Poppins', sans-serif; font-size: .92rem; display: block; }
.contact-card p { font-size: .86rem; color: var(--text-muted); margin: 2px 0 0; }
.contact-card p small { font-size: .7rem; opacity: .6; }
.contact-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 18px;
  border-radius: 14px; background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px dashed var(--primary);
}
.contact-note span { color: var(--primary); font-size: 1.2rem; }
.contact-note p { font-size: .82rem; color: var(--text-muted); margin: 0; }
.contact-note strong { color: var(--text); }

.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-lg); }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 7px; font-family: 'Poppins', sans-serif; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: .88rem; outline: none;
  transition: border-color .3s ease, box-shadow .3s ease; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.field input.invalid, .field select.invalid { border-color: #ef5a8a; }
.field .error { display: block; color: #ef5a8a; font-size: .72rem; margin-top: 4px; min-height: 0; }
.contact-form__submit { width: 100%; justify-content: center; margin-top: 6px; }
.form-status { margin: 14px 0 0; font-size: .85rem; color: var(--primary); font-weight: 600; text-align: center; min-height: 0; }

.map-wrap { display: grid; gap: 14px; }
.map-address {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.map-address__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); font-size: 1.2rem; flex-shrink: 0;
}
.map-address__text { flex: 1 1 260px; }
.map-address__text strong { font-family: 'Poppins', sans-serif; font-size: .95rem; display: block; }
.map-address__text p { font-size: .82rem; color: var(--text-muted); margin: 2px 0 0; }
.map-address__directions {
  font-size: .8rem; font-weight: 600; color: var(--primary); border: 1px solid var(--border);
  padding: 9px 16px; border-radius: 999px; white-space: nowrap; transition: background .3s ease, color .3s ease, transform .3s var(--ease);
}
.map-address__directions:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.map { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 380px; border: 0; display: block; filter: grayscale(.15); }
[data-theme="dark"] .map iframe { filter: invert(.9) hue-rotate(180deg) grayscale(.2); }
.map__link {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--surface); color: var(--primary); padding: 10px 18px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; box-shadow: var(--shadow-lg); white-space: nowrap;
  transition: transform .3s var(--ease);
}
.map__link:hover { transform: translateX(-50%) translateY(-3px); }

/* ---------- Footer ---------- */
.footer { background: #0d1024; color: #c9cfeb; padding: 70px 0 24px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer .brand__icon { color: #a99cff; }
.footer .brand__text strong { color: #fff; }
.footer .brand__text strong em { color: #a99cff; }
.footer .brand__text small { color: #7b83a8; }
.footer__brand p { font-size: .86rem; color: #7b83a8; max-width: 280px; margin: 18px 0; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.14); color: #c9cfeb; font-size: .9rem; font-weight: 600;
  transition: background .3s ease, color .3s ease, transform .3s var(--ease);
}
.footer__social a:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }
.footer__links h4 { color: #fff; font-size: .95rem; margin-bottom: 18px; }
.footer__links a, .footer__links p { display: block; font-size: .85rem; color: #7b83a8; margin-bottom: 10px; transition: color .25s ease; }
.footer__links a:hover { color: #a99cff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer__bottom p { font-size: .78rem; color: #6e769c; margin: 0; }
.heart { color: #ef5a8a; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--gradient); color: #fff; font-size: 1.3rem; z-index: 500;
  box-shadow: 0 12px 30px rgba(108,92,231,.4); opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s var(--ease);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav { gap: 18px; }
  .nav__link { font-size: .82rem; }
  .hero__inner { gap: 36px; }
  .about__grid { gap: 50px; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__links:last-child { grid-column: 2 / 4; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); padding: 20px 24px 30px;
    box-shadow: var(--shadow-lg); border-top: 1px solid var(--border);
    transform: translateY(-130%); transition: transform .45s var(--ease); z-index: 999;
    height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav__link { font-size: 1rem; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav__link::after { display: none; }
  .nav__cta { margin-top: 14px; text-align: center; justify-content: center; }
  .menu-toggle { display: block; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 50px; }
  .hero__desc { margin-inline: auto; }
  .hero__buttons, .hero__trust { justify-content: center; }
  .hero__visual { max-width: 520px; margin-inline: auto; width: 100%; }
  .about__grid, .faq__grid, .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .courses__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .faq__intro { text-align: center; }
  .faq__intro .section-desc { margin-inline: auto; }
}

@media (max-width: 560px) {
  .section { padding: 66px 0; }
  .brand__text small { display: none; }
  .hero { padding-top: calc(var(--header-h) + 40px); }
  .hero__title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero__desc { font-size: .95rem; }
  .hero__buttons .btn { width: 100%; justify-content: center; }
  .board__body { padding: 24px 18px; min-height: 280px; }
  .board__equation--main { font-size: .95rem; }
  .floating-card--a { left: -8px; top: -20px; }
  .floating-card--b { right: -8px; bottom: -20px; }
  .floating-card { padding: 9px 12px; }
  .floating-card strong { font-size: .72rem; }
  .floating-card small { font-size: .6rem; }
  .about__frame { padding: 16px; }
  .about__experience { width: 100px; height: 100px; right: -8px; }
  .stats { gap: 14px; }
  .stat { padding: 24px 10px; }
  .why__grid { grid-template-columns: 1fr; }
  .testimonial { padding: 40px 22px 28px; }
  .testimonial__quote { left: 12px; font-size: 4.5rem; }
  .carousel__arrow { width: 36px; height: 36px; font-size: 1.4rem; }
  .carousel__arrow--prev { left: -6px; }
  .carousel__arrow--next { right: -6px; }
  .contact-form__row { grid-template-columns: 1fr; gap: 0; }
  .contact-form-wrap { padding: 24px 20px; }
  .map iframe { height: 300px; }
  .map-address { padding: 14px; gap: 10px; }
  .map-address__icon { width: 38px; height: 38px; }
  .map-address__directions { width: 100%; text-align: center; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__links:last-child { grid-column: 1 / -1; }
  .footer__bottom { justify-content: center; text-align: center; }
  .hero__scroll { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
