/* ============================================================
   Eyad Academy — design tokens & global styles
   Palette: cream #FBF6EC · navy #0F1B3D · gold #D9A441
            purple #8B7AD9 · soft yellow #F5D67A
   Type: Tajawal (display) + Cairo (body) + Plus Jakarta (EN)
   ============================================================ */

:root {
  /* Surfaces */
  --cream: #FBF6EC;
  --cream-2: #FFFCF5;
  --cream-3: #F4ECDA;

  /* Brand */
  --navy: #0F1B3D;
  --navy-2: #1B2654;
  --navy-3: #2D3A6E;
  --ink: #1A1F3A;
  --ink-soft: #4D5378;
  --ink-mute: #7B82A6;

  /* Accents */
  --gold: #D9A441;
  --gold-2: #E8B954;
  --gold-deep: #B8862D;
  --yellow: #F5D67A;
  --purple: #8B7AD9;
  --purple-deep: #6B5BC0;
  --blue-glow: #8FB8E8;
  --rose: #E89B8B;

  /* Fixed brand tokens (don't invert with theme) */
  --always-cream: #FBF6EC;
  --always-navy:  #0F1B3D;

  /* Functional */
  --hairline: rgba(15, 27, 61, 0.08);
  --hairline-strong: rgba(15, 27, 61, 0.14);
  --shadow-sm: 0 2px 8px rgba(15, 27, 61, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 27, 61, 0.08), 0 2px 8px rgba(15, 27, 61, 0.04);
  --shadow-lg: 0 24px 60px rgba(15, 27, 61, 0.12), 0 8px 20px rgba(15, 27, 61, 0.06);
  --shadow-gold: 0 14px 40px rgba(217, 164, 65, 0.32);
  --shadow-glow: 0 0 80px rgba(245, 214, 122, 0.4);

  /* Nav-glass override (dark uses different value) */
  --glass-bg: rgba(251, 246, 236, 0.78);
  --glass-border: rgba(255, 255, 255, 0.6);

  /* Course filter pill (dark inverts) */
  --chip-bg: rgba(15, 27, 61, 0.04);
  --chip-bg-hover: rgba(15, 27, 61, 0.08);
  --chip-active-bg: var(--navy);
  --chip-active-fg: var(--cream);

  /* Footer */
  --footer-bg: var(--cream-3);

  /* Radii */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-2xl: 48px;
  --r-pill: 999px;

  /* Type */
  --f-display: 'Readex Pro', system-ui, sans-serif;
  --f-body:    'Readex Pro', system-ui, sans-serif;
  --f-en:      'Plus Jakarta Sans', 'Readex Pro', system-ui, sans-serif;

  /* Easing */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   DARK THEME
   ============================================================ */
[data-theme="dark"] {
  --cream:   #0B1126;
  --cream-2: #131A35;
  --cream-3: #1A2244;

  --navy:    #FBF6EC;        /* swap roles: 'navy' now becomes the bright fg */
  --navy-2:  #E9E2D0;
  --navy-3:  #C6BCA0;
  --ink:     #F1ECE0;
  --ink-soft: #A8B0CE;
  --ink-mute: #7E87AB;

  --gold: #E8B954;
  --gold-2: #F5CC6E;
  --gold-deep: #D9A441;
  --yellow: #F5D67A;
  --purple: #A99AF0;
  --purple-deep: #8B7AD9;

  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55), 0 8px 20px rgba(0, 0, 0, 0.3);

  --glass-bg: rgba(19, 26, 53, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);

  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-bg-hover: rgba(255, 255, 255, 0.1);
  --chip-active-bg: var(--gold);
  --chip-active-fg: #0B1126;

  --footer-bg: #0A0F22;
}

[data-theme="dark"] body { background: var(--cream); color: var(--ink); }
[data-theme="dark"] html { background: var(--cream); }
[data-theme="dark"] .btn-dark { background: var(--gold); color: #0B1126; }
[data-theme="dark"] .btn-primary { color: #0B1126; }
[data-theme="dark"] .achievements { background: #060A1A; }
[data-theme="dark"] .cta-inner { background:
    radial-gradient(60% 80% at 80% 20%, rgba(232, 185, 84, 0.3), transparent 60%),
    radial-gradient(60% 80% at 20% 80%, rgba(169, 154, 240, 0.3), transparent 60%),
    linear-gradient(135deg, #060A1A 0%, #131A35 100%); }
[data-theme="dark"] .cert { background:
    radial-gradient(120% 80% at 50% 0%, rgba(245, 214, 122, 0.2), transparent 60%),
    linear-gradient(135deg, #1A2244, #131A35);
  color: var(--ink); }
[data-theme="dark"] .cert > div { color: inherit; }
[data-theme="dark"] .hv-photo { background:
    radial-gradient(120% 80% at 30% 20%, rgba(245, 214, 122, 0.5), transparent 60%),
    radial-gradient(100% 80% at 80% 90%, rgba(169, 154, 240, 0.4), transparent 60%),
    linear-gradient(160deg, #131A35 0%, #060A1A 100%); }
[data-theme="dark"] .hv-chip,
[data-theme="dark"] .hv-progress { background: #1A2244; }
[data-theme="dark"] .modal { background: var(--cream-2); }
[data-theme="dark"] .nav-inner { background: var(--glass-bg); border-color: var(--glass-border); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--cream); }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--cream);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--navy); }

/* ============================================================
   Layout primitives
   ============================================================ */

.shell { min-height: 100vh; position: relative; }
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section { position: relative; padding: 120px 0; }
@media (max-width: 900px) { .section { padding: 80px 0; } }

.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: rgba(217, 164, 65, 0.12);
  color: var(--gold-deep);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

h1, h2, h3, h4 { font-family: var(--f-display); color: var(--navy); margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 6vw, 80px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.2vw, 54px); font-weight: 600; letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.015em; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-soft); line-height: 1.75; font-weight: 400; }
.en { font-family: var(--f-en); direction: ltr; unicode-bidi: isolate; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-out), background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 60%, var(--gold-deep) 100%);
  color: var(--navy);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(217, 164, 65, 0.45), inset 0 1px 0 rgba(255,255,255,0.4); }
.btn-ghost {
  background: rgba(15, 27, 61, 0.04);
  color: var(--navy);
  border: 1px solid var(--hairline-strong);
}
.btn-ghost:hover { background: rgba(15, 27, 61, 0.08); transform: translateY(-2px); }
.btn-dark {
  background: var(--navy);
  color: var(--cream);
}
.btn-dark:hover { background: var(--navy-2); transform: translateY(-2px); }

.btn .arrow { transition: transform .25s var(--ease-spring); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(-3px) scaleX(-1); }
[dir="ltr"] .btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--cream-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ============================================================
   Background ambient
   ============================================================ */
.bg-ambient {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -30px) scale(1.08); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}
@keyframes spin-slow { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 16px; z-index: 50;
  margin: 16px 24px 0;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 14px 12px 24px;
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  border-radius: var(--r-pill);
}
.nav .brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-display); font-weight: 700;
  font-size: 19px; color: var(--navy);
  letter-spacing: -0.015em;
}
.nav .brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  box-shadow: 0 4px 14px rgba(217, 164, 65, 0.4), inset 0 1px 0 rgba(255,255,255,0.4);
  color: var(--navy);
}
.nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav ul a {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.nav ul a:hover, .nav ul a.active { background: rgba(15, 27, 61, 0.07); color: var(--navy); }
.nav .nav-cta { display: flex; gap: 8px; align-items: center; }
.nav .btn { padding: 10px 18px; font-size: 14px; }

.nav-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chip-bg);
  color: var(--navy);
  border: 1px solid var(--hairline);
  transition: background .2s, transform .2s, color .2s;
}
.nav-icon-btn:hover { background: var(--chip-bg-hover); transform: translateY(-1px); }

@media (max-width: 900px) {
  .nav-inner { padding: 10px 12px 10px 14px; }
  .nav ul { display: none; }
  .nav-login { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 80px 0 100px; position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

.hero h1 .grad {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-2) 50%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .lead { max-width: 520px; margin-top: 22px; font-size: 19px; }
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 36px; margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.hero-stat .n { font-family: var(--f-display); font-weight: 700; font-size: 32px; color: var(--navy); line-height: 1; letter-spacing: -0.02em; }
.hero-stat .l { font-size: 13px; color: var(--ink-mute); margin-top: 6px; }

/* Hero visual — layered cards */
.hero-visual { position: relative; height: 560px; }
@media (max-width: 980px) { .hero-visual { height: 480px; } }

.hv-photo {
  position: absolute; inset: 40px 0 40px 60px;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(245, 214, 122, 0.55), transparent 60%),
    radial-gradient(100% 80% at 80% 90%, rgba(139, 122, 217, 0.45), transparent 60%),
    linear-gradient(160deg, #2D3A6E 0%, #0F1B3D 100%);
  box-shadow: var(--shadow-lg);
  display: grid; place-items: center;
}
[dir="rtl"] .hv-photo { inset: 40px 60px 40px 0; }

.hv-mascot {
  position: absolute;
  top: -30px; left: -40px;
  width: 220px; height: 220px;
  z-index: 3;
  animation: bob 6s ease-in-out infinite;
  filter: drop-shadow(0 30px 50px rgba(217, 164, 65, 0.45));
}
[dir="rtl"] .hv-mascot { left: auto; right: -40px; }
.hv-mascot img { width: 100%; height: 100%; object-fit: contain; }

.hv-chip {
  position: absolute;
  background: var(--cream-2);
  border-radius: var(--r-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-display);
  font-weight: 700;
  animation: bob 7s ease-in-out infinite;
}
.hv-chip-a { top: 90px; right: -20px; }
.hv-chip-b { bottom: 110px; left: -28px; animation-delay: -2s; }
.hv-chip-c { bottom: 30px; right: 80px; animation-delay: -4s; }
[dir="rtl"] .hv-chip-a { right: auto; left: -20px; }
[dir="rtl"] .hv-chip-b { left: auto; right: -28px; }
[dir="rtl"] .hv-chip-c { right: auto; left: 80px; }

.hv-chip .icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--yellow), var(--gold));
  color: var(--navy);
}
.hv-chip .l { font-size: 13px; color: var(--ink-mute); font-weight: 500; }
.hv-chip .n { font-size: 16px; color: var(--navy); }

.hv-progress {
  position: absolute; bottom: 20px; left: 80px; right: 20px;
  background: var(--cream-2);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 2;
}
.hv-progress .bar { height: 8px; background: rgba(15, 27, 61, 0.08); border-radius: var(--r-pill); overflow: hidden; }
.hv-progress .bar > div {
  height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--gold-2), var(--purple));
  width: 72%;
  position: relative;
}
.hv-progress .bar > div::after {
  content: ''; position: absolute; right: 0; top: -3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--cream-2); border: 3px solid var(--gold);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ============================================================
   Why Eyad — value pillars
   ============================================================ */
.why-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 980px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

.pillar {
  padding: 28px 26px;
  border-radius: var(--r-lg);
  background: var(--cream-2);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pillar .icon {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  margin-bottom: 22px;
  position: relative; z-index: 1;
  color: var(--navy);
}
.pillar:nth-child(1) .icon { background: linear-gradient(135deg, var(--yellow), var(--gold)); box-shadow: 0 6px 18px rgba(217, 164, 65, 0.35); }
.pillar:nth-child(2) .icon { background: linear-gradient(135deg, #C9B8FF, var(--purple)); box-shadow: 0 6px 18px rgba(139, 122, 217, 0.35); }
.pillar:nth-child(3) .icon { background: linear-gradient(135deg, #B5D5F2, #6FA8DC); box-shadow: 0 6px 18px rgba(111, 168, 220, 0.35); }
.pillar:nth-child(4) .icon { background: linear-gradient(135deg, #F2B5B0, var(--rose)); box-shadow: 0 6px 18px rgba(232, 155, 139, 0.35); }
.pillar h3 { font-size: 20px; margin-bottom: 10px; }
.pillar p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; margin: 0; }
.pillar::after {
  content: ''; position: absolute; top: -40px; left: -40px; width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
[dir="rtl"] .pillar::after { left: auto; right: -40px; }

/* ============================================================
   Subjects
   ============================================================ */
.subjects-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 980px) { .subjects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .subjects-grid { grid-template-columns: 1fr; } }

.subject {
  position: relative;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: var(--cream-2);
  cursor: pointer;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out), border-color .25s;
  overflow: hidden;
}
.subject:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.subject .glyph {
  width: 60px; height: 60px; border-radius: 18px;
  display: grid; place-items: center; margin-bottom: 18px;
}
.subject .meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-mute); }
.subject h3 { font-size: 22px; margin-bottom: 6px; }
.subject .en-label { font-family: var(--f-en); font-size: 13px; color: var(--ink-mute); margin-bottom: 14px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ============================================================
   Courses
   ============================================================ */
.filter-bar {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 40px;
}
.filter-chip {
  padding: 10px 22px;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  font-family: var(--f-display); font-weight: 700; font-size: 14px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all .25s var(--ease-out);
}
.filter-chip:hover { background: var(--chip-bg-hover); }
.filter-chip.active {
  background: var(--chip-active-bg); color: var(--chip-active-fg); box-shadow: var(--shadow-md);
}
.filter-chip .count { opacity: 0.6; margin-inline-start: 6px; font-size: 12px; }

.courses-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 980px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .courses-grid { grid-template-columns: 1fr; } }

.course {
  background: var(--cream-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out);
  cursor: pointer;
  display: flex; flex-direction: column;
}
.course:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.course-cover {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.course-cover .ph {
  position: absolute; inset: 0;
  font-family: monospace; font-size: 11px; color: rgba(255,255,255,0.6);
  display: grid; place-items: center;
  letter-spacing: 0.1em;
}
.course-cover .stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.04) 0,
    rgba(255,255,255,0.04) 12px,
    transparent 12px,
    transparent 24px
  );
}
.course-badge {
  position: absolute; top: 16px; right: 16px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  font-family: var(--f-display); font-weight: 700; font-size: 12px;
  backdrop-filter: blur(6px);
}
[dir="rtl"] .course-badge { right: auto; left: 16px; }
.course-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.course-tag { font-family: var(--f-display); font-size: 12px; font-weight: 700; color: var(--gold-deep); letter-spacing: 0.04em; text-transform: uppercase; }
.course-title { font-family: var(--f-display); font-size: 20px; font-weight: 600; color: var(--navy); line-height: 1.35; letter-spacing: -0.015em; }
.course-meta { display: flex; align-items: center; gap: 16px; color: var(--ink-mute); font-size: 13px; }
.course-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.course-teacher {
  display: flex; align-items: center; gap: 12px;
  padding-top: 14px; border-top: 1px solid var(--hairline);
  margin-top: auto;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--gold));
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 14px; font-family: var(--f-display);
  border: 2px solid var(--cream-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.course-teacher .name { font-family: var(--f-display); font-weight: 700; font-size: 14px; color: var(--navy); }
.course-teacher .role { font-size: 12px; color: var(--ink-mute); }

.course-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-mute); }
.course-progress .bar { flex: 1; height: 5px; background: rgba(15, 27, 61, 0.08); border-radius: var(--r-pill); overflow: hidden; }
.course-progress .bar > div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--purple)); border-radius: var(--r-pill); }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 27, 61, 0.5);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadein .25s var(--ease-out);
}
.modal {
  width: 100%; max-width: 720px;
  background: var(--cream);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: pop .35s var(--ease-spring);
  max-height: 90vh; overflow-y: auto;
}
.modal-cover { height: 220px; position: relative; }
.modal-close {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--navy);
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  transition: transform .2s;
}
[dir="rtl"] .modal-close { left: auto; right: 16px; }
.modal-close:hover { transform: rotate(90deg); }
.modal-body { padding: 28px 32px 32px; }
.modal-body h2 { font-size: 28px; margin-bottom: 8px; }
.modal-body .lead { margin-top: 12px; font-size: 16px; }
.modal-cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.modal-stats .s { text-align: center; }
.modal-stats .n { font-family: var(--f-display); font-size: 22px; font-weight: 900; color: var(--navy); }
.modal-stats .l { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
.modal-curriculum { margin-top: 24px; }
.modal-curriculum li {
  list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--f-display); font-weight: 600;
  color: var(--navy);
}
.modal-curriculum li:last-child { border-bottom: 0; }
.modal-curriculum li .n {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(217, 164, 65, 0.15);
  color: var(--gold-deep);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.modal-curriculum li .dur { margin-inline-start: auto; font-size: 13px; color: var(--ink-mute); font-weight: 500; }

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ============================================================
   Learning journey
   ============================================================ */
.journey-wrap { position: relative; }
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
@media (max-width: 980px) { .journey { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .journey { grid-template-columns: 1fr; } }

.journey::before {
  content: '';
  position: absolute;
  top: 36px; left: 8%; right: 8%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--gold) 0, var(--gold) 6px, transparent 6px, transparent 14px);
  z-index: 0;
}
@media (max-width: 980px) { .journey::before { display: none; } }

.step {
  position: relative;
  text-align: center;
  z-index: 1;
}
.step .num {
  width: 72px; height: 72px; margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--gold);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md), inset 0 0 0 6px var(--cream);
}
.step .num::after {
  content: '';
  position: absolute; inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.2) 0%, transparent 70%);
  z-index: -1;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-soft); margin: 0; padding: 0 8px; }

/* ============================================================
   Teachers
   ============================================================ */
.teachers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .teachers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .teachers-grid { grid-template-columns: 1fr; } }

.teacher {
  background: var(--cream-2);
  border-radius: var(--r-lg);
  padding: 0;
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out);
}
.teacher:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.teacher-photo {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.teacher-photo .ph {
  position: absolute; inset: 0;
  font-family: monospace; font-size: 11px; color: rgba(255,255,255,0.55);
  display: grid; place-items: center;
}
.teacher-body { padding: 20px 22px 22px; }
.teacher h3 { font-size: 19px; margin-bottom: 4px; }
.teacher .subj { font-family: var(--f-display); font-weight: 600; font-size: 13.5px; color: var(--gold-deep); }
.teacher-stats {
  display: flex; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline);
  font-size: 12.5px; color: var(--ink-mute);
}
.teacher-stats > div { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   Achievements / counters
   ============================================================ */
.achievements {
  background: var(--navy);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.achievements::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(217, 164, 65, 0.2), transparent 60%),
    radial-gradient(40% 60% at 80% 70%, rgba(139, 122, 217, 0.25), transparent 60%);
  pointer-events: none;
}
.achievements h2, .achievements .lead { color: var(--always-cream); }
.achievements .lead { color: rgba(251, 246, 236, 0.7); }
.achievements .eyebrow { background: rgba(217, 164, 65, 0.18); color: var(--gold-2); }

.ach-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  position: relative; z-index: 1;
}
@media (max-width: 900px) { .ach-grid { grid-template-columns: repeat(2, 1fr); } }
.ach-tile {
  text-align: center;
  padding: 32px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  backdrop-filter: blur(6px);
}
.ach-tile .n {
  font-family: var(--f-display); font-size: 56px; font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-2), var(--yellow));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}
.ach-tile .l { margin-top: 12px; font-family: var(--f-display); font-weight: 600; color: rgba(251, 246, 236, 0.8); font-size: 15px; }

.cert-showcase {
  margin-top: 64px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: center;
  position: relative; z-index: 1;
}
@media (max-width: 900px) { .cert-showcase { grid-template-columns: 1fr; } }

.cert {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(245, 214, 122, 0.25), transparent 60%),
    linear-gradient(135deg, #FFFCF5, #F4ECDA);
  border-radius: var(--r-xl);
  padding: 40px;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(217, 164, 65, 0.15);
  color: var(--navy);
  transform: rotate(-2deg);
  transition: transform .4s var(--ease-spring);
}
.cert:hover { transform: rotate(0deg) scale(1.02); }
.cert .border-mark {
  position: absolute; inset: 16px; border: 2px solid var(--gold);
  border-radius: calc(var(--r-xl) - 16px);
  pointer-events: none;
  opacity: 0.4;
}
.cert .seal {
  position: absolute; bottom: 36px; left: 36px;
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  display: grid; place-items: center;
  color: var(--navy);
  font-family: var(--f-display); font-weight: 900;
  box-shadow: var(--shadow-md);
}
[dir="rtl"] .cert .seal { left: auto; right: 36px; }

/* ============================================================
   Testimonials
   ============================================================ */
.testi-wrap { position: relative; }
.testi-track {
  display: flex; gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 24px;
  scrollbar-width: none;
  scroll-padding: 0 32px;
}
.testi-track::-webkit-scrollbar { display: none; }
.testi {
  flex: 0 0 420px;
  scroll-snap-align: start;
  padding: 32px;
  background: var(--cream-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 560px) { .testi { flex: 0 0 86vw; padding: 24px; } }
.testi .quote-mark { color: var(--gold); font-family: var(--f-display); font-size: 48px; line-height: 1; margin-bottom: -8px; opacity: 0.6; }
.testi .body { font-size: 17px; line-height: 1.7; color: var(--navy); margin-bottom: 24px; }
.testi .who { display: flex; align-items: center; gap: 12px; }
.testi .who .name { font-family: var(--f-display); font-weight: 700; color: var(--navy); }
.testi .who .role { font-size: 13px; color: var(--ink-mute); }
.testi .stars { color: var(--gold); margin-bottom: 14px; letter-spacing: 4px; }

.testi-controls { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.testi-controls button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream-2); border: 1px solid var(--hairline);
  display: grid; place-items: center;
  transition: transform .2s, background .2s;
}
.testi-controls button:hover { background: var(--gold); transform: translateY(-2px); }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  position: relative;
  padding: 120px 0;
}
.cta-inner {
  background:
    radial-gradient(60% 80% at 80% 20%, rgba(217, 164, 65, 0.35), transparent 60%),
    radial-gradient(60% 80% at 20% 80%, rgba(139, 122, 217, 0.35), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--r-2xl);
  padding: 72px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .cta-inner { grid-template-columns: 1fr; padding: 48px 28px; } }

.cta h2 { color: var(--always-cream); }
.cta p { color: rgba(251, 246, 236, 0.75); font-size: 17px; line-height: 1.7; margin-top: 16px; }
.cta .eyebrow { background: rgba(217, 164, 65, 0.2); color: var(--gold-2); }

.signup {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  padding: 28px;
  backdrop-filter: blur(8px);
}
.signup label { display: block; font-family: var(--f-display); font-weight: 600; font-size: 13px; color: rgba(251, 246, 236, 0.7); margin-bottom: 6px; }
.signup input, .signup select {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--always-cream);
  font-size: 15px;
  transition: border-color .2s, background .2s;
  margin-bottom: 14px;
}
.signup input::placeholder { color: rgba(251, 246, 236, 0.4); }
.signup input:focus, .signup select:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, 0.12); }
.signup .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.signup .err { color: var(--rose); font-size: 12px; margin-top: -10px; margin-bottom: 12px; }
.signup .btn-primary { width: 100%; justify-content: center; padding: 16px; margin-top: 6px; }
.signup-success {
  text-align: center; padding: 28px 8px;
}
.signup-success .check {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  display: grid; place-items: center;
  color: var(--navy);
  box-shadow: 0 0 0 8px rgba(217, 164, 65, 0.2);
}
.signup-success h3 { color: var(--always-cream); }
.signup-success p { color: rgba(251, 246, 236, 0.8); margin: 8px 0 0; }

.cta-mascot {
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  animation: bob 6s ease-in-out infinite;
  filter: drop-shadow(0 24px 40px rgba(217, 164, 65, 0.5));
  z-index: 0;
  opacity: 0.55;
}
[dir="rtl"] .cta-mascot { right: auto; left: -40px; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--footer-bg);
  padding: 80px 0 32px;
  border-top: 1px solid var(--hairline);
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--hairline-strong);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 13px; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--navy); font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { font-size: 14.5px; color: var(--ink-soft); transition: color .2s; }
.footer a:hover { color: var(--navy); }

.footer-about { max-width: 380px; }
.footer-about p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; margin: 14px 0 22px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cream); border: 1px solid var(--hairline);
  display: grid; place-items: center;
  color: var(--navy);
  transition: transform .2s, background .2s, color .2s;
}
.socials a:hover { background: var(--navy); color: var(--cream); transform: translateY(-2px); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 13px; color: var(--ink-mute);
  flex-wrap: wrap; gap: 12px;
}

/* ============================================================
   Decorative floating shapes
   ============================================================ */
.float-shape {
  position: absolute; pointer-events: none;
  opacity: 0.6;
}
.sparkle {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: twinkle 3s ease-in-out infinite;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.wa-fab {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.wa-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0,0,0,0.15);
  position: relative;
  transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.wa-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 18px 40px rgba(37, 211, 102, 0.55); }
.wa-pulse {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { opacity: 0.5; transform: scale(0.95); }
  100% { opacity: 0;   transform: scale(1.45); }
}

.wa-card {
  width: 300px;
  background: var(--cream-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--hairline);
  overflow: hidden;
  position: relative;
  animation: wa-pop .3s var(--ease-spring);
}
@keyframes wa-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.wa-card-close {
  position: absolute; top: 10px; insert-inline-end: 10px;
  inset-inline-end: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.06); color: var(--ink-soft);
  display: grid; place-items: center;
  z-index: 2;
}
.wa-card-close:hover { background: rgba(0,0,0,0.1); }
.wa-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px 12px;
  background: linear-gradient(135deg, #128C7E, #075E54);
  color: white;
}
.wa-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid; place-items: center;
}
.wa-card-name { font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.wa-card-status {
  font-size: 12px;
  opacity: 0.85;
  display: flex; align-items: center; gap: 6px;
}
.wa-card-status span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4FE17F;
  display: inline-block;
}
.wa-bubble {
  margin: 16px 18px;
  background: var(--cream-3);
  border-radius: 4px 16px 16px 16px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  position: relative;
}
[dir="rtl"] .wa-bubble { border-radius: 16px 4px 16px 16px; }
.wa-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 14px 14px;
  padding: 12px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border-radius: var(--r-pill);
  font-family: var(--f-display); font-weight: 600; font-size: 14px;
  transition: transform .2s;
}
.wa-cta:hover { transform: translateY(-1px); }

/* ============================================================
   AUTH SCREENS — split layout (brand panel + form panel)
   ============================================================ */
.auth-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.1fr);
  background: var(--cream);
  animation: fadein .25s var(--ease-out);
  overflow: hidden;
}
@media (max-width: 880px) {
  .auth-root { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
}

/* ── Side panel (brand / hero) ───────────────────────────── */
.auth-side {
  position: relative;
  background: linear-gradient(160deg, #2D3A6E 0%, #0F1B3D 100%);
  color: var(--always-cream);
  padding: 48px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.auth-side-login { background: linear-gradient(160deg, #2D3A6E 0%, #0F1B3D 100%); }
.auth-side-register { background: linear-gradient(160deg, #B8862D 0%, #6B5BC0 80%); }

.auth-side-blob {
  position: absolute; border-radius: 50%; filter: blur(80px);
  pointer-events: none;
}
.auth-side-blob-1 {
  top: -10%; inset-inline-end: -10%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(245,214,122,0.55), transparent 70%);
  animation: drift 14s ease-in-out infinite;
}
.auth-side-blob-2 {
  bottom: -10%; inset-inline-start: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(139,122,217,0.45), transparent 70%);
  animation: drift 18s ease-in-out infinite reverse;
}
.auth-side-stars { position: absolute; inset: 0; pointer-events: none; }
.auth-star {
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  background: #FFE9A8;
  box-shadow: 0 0 12px #F5D67A;
  animation: twinkle 3s ease-in-out infinite;
}

.auth-back {
  position: absolute;
  top: 24px; inset-inline-start: 24px;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
  color: var(--always-cream);
  font-family: var(--f-display); font-weight: 500; font-size: 13px;
  backdrop-filter: blur(6px);
  transition: background .2s, transform .2s;
  z-index: 3;
}
.auth-back:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.auth-back .icon { transform: scaleX(-1); }
[dir="ltr"] .auth-back svg { transform: scaleX(1); }
[dir="rtl"] .auth-back svg { transform: scaleX(-1); }

.auth-side-mascot {
  position: absolute;
  top: 12%; inset-inline-end: 12%;
  width: 180px; height: 180px;
  animation: bob 7s ease-in-out infinite;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.4));
}
.auth-side-mascot img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 880px) {
  .auth-side-mascot { width: 110px; height: 110px; top: 50%; transform: translateY(-50%); inset-inline-end: 24px; }
}

.auth-side-copy { position: relative; z-index: 1; max-width: 420px; }
.auth-side-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-family: var(--f-display); font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.1);
  margin-bottom: 18px;
}
.auth-side-kicker .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-2); }
.auth-side-copy h2 { color: var(--always-cream); font-size: clamp(24px, 3vw, 36px); margin-bottom: 12px; }
.auth-side-copy p { color: rgba(251,246,236,0.75); font-size: 15px; line-height: 1.7; max-width: 380px; }

@media (max-width: 880px) {
  .auth-side { padding: 24px; justify-content: flex-start; }
  .auth-side-copy { display: none; }
}

/* ── Main form panel ─────────────────────────────────────── */
.auth-main {
  background: var(--cream);
  padding: 48px;
  overflow-y: auto;
  display: flex; align-items: flex-start; justify-content: center;
}
@media (max-width: 880px) { .auth-main { padding: 28px 20px 40px; } }

.auth-form {
  width: 100%;
  max-width: 460px;
  margin: auto 0;
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 700; font-size: 17px;
  margin-bottom: 32px;
  color: var(--navy);
}
.auth-brand .brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  box-shadow: 0 4px 12px rgba(217,164,65,0.4);
  color: var(--always-navy);
}
.auth-head { margin-bottom: 28px; }
.auth-head h1 { font-size: clamp(28px, 3.4vw, 38px); color: var(--navy); letter-spacing: -0.025em; margin-bottom: 8px; line-height: 1.2; }
.auth-head p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; margin: 0; }

/* ── Fields ──────────────────────────────────────────────── */
.auth-fields { display: flex; flex-direction: column; gap: 12px; }
.af-label {
  font-family: var(--f-display); font-weight: 500; font-size: 13px;
  color: var(--ink); display: block; margin-bottom: 4px;
}
.af-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.af-input::placeholder { color: var(--ink-mute); opacity: 0.6; }
.af-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,0.18); background: var(--cream-2); }
.af-input-wrap { position: relative; }
.af-toggle {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-end: 12px;
  color: var(--ink-mute); padding: 4px;
}
.af-toggle:hover { color: var(--ink); }
.af-row-between { display: flex; justify-content: space-between; align-items: baseline; }
.af-link { color: var(--gold-deep); font-family: var(--f-display); font-weight: 500; font-size: 13px; }
.af-link:hover { text-decoration: underline; }
.af-err {
  font-size: 12.5px; color: #C05050;
  margin-top: -4px;
  display: flex; align-items: center; gap: 6px;
}
.af-err::before { content: "⚠"; }
.af-hint { font-size: 12.5px; color: var(--ink-mute); margin-bottom: 4px; }
.af-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 480px) { .af-grid-2 { grid-template-columns: 1fr; } }

.af-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--ink-soft);
  cursor: pointer;
  margin-top: 4px;
  line-height: 1.6;
}
.af-check input { display: none; }
.af-check-box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--hairline-strong);
  background: var(--cream-2);
  display: grid; place-items: center;
  color: transparent;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all .2s;
}
.af-check input:checked + .af-check-box {
  background: var(--gold); border-color: var(--gold); color: var(--always-navy);
}

.af-segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--chip-bg); border-radius: var(--r-md);
  padding: 4px;
  border: 1px solid var(--hairline);
}
.af-seg {
  padding: 11px 14px;
  border-radius: calc(var(--r-md) - 4px);
  font-family: var(--f-display); font-weight: 500; font-size: 14px;
  color: var(--ink-soft);
  transition: all .2s;
}
.af-seg.active { background: var(--navy); color: var(--cream); box-shadow: var(--shadow-sm); }

/* ── Submit + step-nav buttons ───────────────────────────── */
.auth-submit { width: 100%; justify-content: center; margin-top: 12px; padding: 15px; font-size: 15px; }
.auth-step-nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 28px;
}
.auth-step-nav .btn { padding: 13px 22px; }

/* ── OR divider + social buttons ─────────────────────────── */
.auth-or {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0 18px;
  color: var(--ink-mute); font-size: 12.5px;
}
.auth-or::before, .auth-or::after {
  content: ''; flex: 1; height: 1px; background: var(--hairline-strong);
}
.auth-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  font-family: var(--f-display); font-weight: 500; font-size: 14px;
  transition: background .2s, transform .2s;
}
.auth-social:hover { background: var(--cream-3); transform: translateY(-1px); }

.auth-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ── Stepper ─────────────────────────────────────────────── */
.auth-stepper {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
  padding: 12px;
  background: var(--cream-2);
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.step-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--r-pill);
  font-family: var(--f-display); font-weight: 500; font-size: 12.5px;
  flex: 1; min-width: 0;
}
.step-n {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-todo { color: var(--ink-mute); }
.step-todo .step-n { background: var(--chip-bg); color: var(--ink-mute); }
.step-active { color: var(--navy); background: rgba(217,164,65,0.12); }
.step-active .step-n { background: var(--gold); color: var(--always-navy); }
.step-done { color: var(--gold-deep); }
.step-done .step-n { background: var(--gold-deep); color: var(--always-cream); }
.step-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 540px) { .step-label { display: none; } }

/* ── Step 2: subject grid ────────────────────────────────── */
.af-subj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .af-subj-grid { grid-template-columns: 1fr; } }
.af-subj {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1.5px solid var(--hairline);
  text-align: start;
  transition: all .2s;
  position: relative;
}
.af-subj:hover { border-color: var(--hairline-strong); transform: translateY(-1px); }
.af-subj.on { border-color: var(--gold); background: rgba(217,164,65,0.06); box-shadow: 0 4px 14px rgba(217,164,65,0.15); }
.af-subj-glyph {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--always-navy);
  flex-shrink: 0;
}
.af-subj-text { flex: 1; }
.af-subj-name { font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--navy); }
.af-subj-en { font-family: var(--f-en); font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.af-subj-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold);
  color: var(--always-navy);
  opacity: 0; transform: scale(0.6);
  transition: all .25s var(--ease-spring);
}
.af-subj.on .af-subj-check { opacity: 1; transform: scale(1); }

/* ── Step 3: plans ───────────────────────────────────────── */
.af-plans {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 8px;
}
@media (max-width: 600px) { .af-plans { grid-template-columns: 1fr; } }
.af-plan {
  text-align: start;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1.5px solid var(--hairline);
  transition: all .25s var(--ease-out);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  cursor: pointer;
}
.af-plan:hover { border-color: var(--hairline-strong); transform: translateY(-2px); }
.af-plan.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(217,164,65,0.08), transparent 60%), var(--cream-2); box-shadow: var(--shadow-md); }
.af-plan.popular { border-color: var(--purple); }
.af-plan.popular.on { border-color: var(--gold); }
.af-plan-pop {
  position: absolute; top: -10px; inset-inline-start: 14px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  color: var(--always-navy);
  font-family: var(--f-display); font-weight: 600; font-size: 11px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 10px rgba(217,164,65,0.4);
}
.af-plan-name { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--navy); }
.af-plan-price { display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.af-plan-price .num { font-family: var(--f-display); font-weight: 700; font-size: 32px; color: var(--navy); letter-spacing: -0.02em; }
.af-plan-price .cur { font-family: var(--f-display); font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.af-plan-price .per { font-size: 12px; color: var(--ink-mute); margin-inline-start: 4px; }
.af-plan-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.af-plan-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.af-plan-feats li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.5;
}
.af-plan-feats .dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(217,164,65,0.18);
  color: var(--gold-deep);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.af-plan-pick {
  margin-top: auto;
  padding: 9px;
  text-align: center;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--ink-soft);
  font-family: var(--f-display); font-weight: 500; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.af-plan.on .af-plan-pick { background: var(--gold); color: var(--always-navy); }

/* ── Success state ───────────────────────────────────────── */
.auth-success { text-align: center; padding: 32px 8px; }
.auth-check {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  display: grid; place-items: center;
  color: var(--always-navy);
  box-shadow: 0 0 0 10px rgba(217,164,65,0.18), var(--shadow-md);
  animation: pop .5s var(--ease-spring);
}
.auth-success h2 { font-size: 28px; color: var(--navy); margin-bottom: 10px; }
.auth-success p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; max-width: 380px; margin: 0 auto; }
.auth-tip {
  margin: 22px auto 0; max-width: 380px;
  padding: 12px 16px;
  background: rgba(217,164,65,0.1);
  color: var(--gold-deep);
  border-radius: var(--r-md);
  font-size: 13px;
  font-family: var(--f-display); font-weight: 500;
}
.auth-success-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
