@font-face{font-family:'Bricolage Grotesque';src:url('/static/bricolage.woff2') format('woff2');font-weight:300 800;font-display:swap}
@font-face{font-family:'Plus Jakarta Sans';src:url('/static/jakarta.woff2') format('woff2');font-weight:400 800;font-display:swap}
@font-face{font-family:'Cairo';src:url('/static/cairo.woff2') format('woff2');font-weight:400 800;font-display:swap}
/* =========================================================
   PRAGMATHA — Le Jardin des Savoirs
   Design tokens + base styles
   ========================================================= */

:root {
  /* Palette: Soleil de Tunis (default) */
  --paper:        #F6EDD9;
  --paper-2:      #EFE2C4;
  --paper-3:      #FAF4E5;
  --ink:          #1B2240;
  --ink-soft:     #3B4366;
  --terracotta:   #C5532A;
  --terracotta-d: #9E3F1E;
  --saffron:      #E8A93C;
  --saffron-d:    #C68721;
  --sage:         #5E7A4C;
  --sage-d:       #41573A;
  --plum:         #6B3556;
  --sky:          #87B2C7;
  --rose:         #E8B8A8;
  --leaf:         #8FB36A;
  --shadow:       0 14px 40px -18px rgba(27, 34, 64, .35);
  --shadow-sm:    0 4px 14px -6px rgba(27, 34, 64, .22);
  --shadow-lg:    0 30px 60px -24px rgba(27, 34, 64, .35);

  --radius:       18px;
  --radius-sm:    12px;
  --radius-lg:    28px;

  --container:    1180px;

  /* Type */
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body:    "Plus Jakarta Sans", system-ui, sans-serif;
  --font-script:  "Caveat", "Bricolage Grotesque", cursive;
  --font-ar:      "Cairo", "Amiri", system-ui, sans-serif;
  --font-ar-serif:"Amiri", "Cairo", serif;
}

/* Palette variants */
[data-palette="verger"] {
  --paper:        #F2EFE2;
  --paper-2:      #E6E2D1;
  --paper-3":     #F7F4E8;
  --ink:          #1F2A21;
  --ink-soft:     #3D4B3F;
  --terracotta:   #A8623E;
  --terracotta-d: #7F4326;
  --saffron:      #D7A446;
  --sage:         #4A6B3C;
  --sage-d:       #2E4626;
  --plum:         #553C50;
  --sky:          #9CB39C;
  --rose:         #D9B7A0;
  --leaf:         #7CA158;
}
[data-palette="crepuscule"] {
  --paper:        #F6EAE2;
  --paper-2:      #EAD6C8;
  --paper-3:      #FBF1EA;
  --ink:          #2A1E3F;
  --ink-soft:     #4A3C63;
  --terracotta:   #D85C5C;
  --terracotta-d: #A33F46;
  --saffron:      #F2B85C;
  --sage:         #7A6BA8;
  --sage-d:       #524286;
  --plum:         #8B3A6A;
  --sky:          #B59FD1;
  --rose:         #F2C0B5;
  --leaf:         #B89BD7;
}

/* RTL */
html[dir="rtl"] body { font-family: var(--font-ar); }
html[dir="rtl"] .font-display { font-family: var(--font-ar); font-weight: 800; }
html[dir="rtl"] .font-script { font-family: var(--font-ar-serif); font-style: italic; }

/* ========== Reset / Base ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--saffron); color: var(--ink); }

/* ========== Layout helpers ========== */
.container {
  width: min(var(--container), 100% - 40px);
  margin-inline: auto;
}
.container-wide {
  width: min(1320px, 100% - 32px);
  margin-inline: auto;
}
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.font-script {
  font-family: var(--font-script);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  transition: transform .12s ease, box-shadow .2s ease, background .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper-3);
  box-shadow: 0 0 0 0 var(--saffron), var(--shadow);
}
.btn-primary:hover {
  background: var(--terracotta-d);
  box-shadow: 0 0 0 4px var(--saffron), 0 16px 30px -10px rgba(27, 34, 64, .4);
}
.btn-tomato {
  background: var(--terracotta);
  color: var(--paper-3);
  box-shadow: var(--shadow);
}
.btn-tomato:hover {
  background: var(--terracotta-d);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper-3); }

.btn-cta {
  position: relative;
  padding: 18px 28px;
  font-size: 18px;
  background: var(--terracotta);
  color: var(--paper-3);
  border-radius: 999px;
  box-shadow:
    0 0 0 5px var(--paper),
    0 0 0 6px var(--ink),
    0 14px 30px -10px rgba(197, 83, 42, .55);
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn-cta:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow:
    0 0 0 5px var(--paper),
    0 0 0 6px var(--ink),
    0 22px 38px -10px rgba(197, 83, 42, .65);
}

/* ========== Pill/chip ========== */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
}
.chip-ink { background: var(--ink); color: var(--paper-3); }
.chip-saffron { background: var(--saffron); color: var(--ink); }
.chip-sage { background: var(--sage); color: var(--paper-3); }

/* ========== Eyebrow ========== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--terracotta);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px;
  background: currentColor;
}

/* ========== Card ========== */
.card {
  background: var(--paper-3);
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  padding: 24px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-soft {
  background: var(--paper-3);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27, 34, 64, .06);
}

/* ========== Navbar ========== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid rgba(27, 34, 64, .08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  transition: color .15s;
}
.nav-links a:hover { color: var(--terracotta); }
.nav-right { display: flex; align-items: center; gap: 12px; }
@media (max-width: 1040px) {
  .nav-links { display: none; }
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 22px;
  color: var(--ink);
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--terracotta);
  display: grid; place-items: center;
  color: var(--paper-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 4px 10px -4px rgba(197, 83, 42, .5);
}

/* Lang toggle */
.lang-toggle {
  display: inline-flex; align-items: center;
  background: var(--paper-2);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid rgba(27, 34, 64, .12);
  position: relative;
}
.lang-toggle button {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color .2s;
  position: relative; z-index: 1;
}
.lang-toggle button.active { color: var(--paper-3); }
.lang-toggle .lang-pill {
  position: absolute; top: 4px; bottom: 4px;
  background: var(--ink);
  border-radius: 999px;
  transition: left .35s cubic-bezier(.6,.05,.3,1.1), width .35s cubic-bezier(.6,.05,.3,1.1);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  color: var(--ink);
}
.hero h1 .ink-script {
  font-family: var(--font-script);
  color: var(--terracotta);
  font-weight: 700;
  font-size: 0.95em;
  letter-spacing: -0.01em;
  display: inline-block;
  transform: translateY(0.04em) rotate(-2deg);
}
.hero h1 em {
  font-style: normal;
  color: var(--terracotta);
}
.hero h1 .hero-emph {
  font-style: normal;
  color: var(--terracotta);
  background-image: linear-gradient(transparent 78%, var(--saffron) 78%, var(--saffron) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 4px;
}
.hero-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: 32px;
}
.hero-ctas {
  display: flex; gap: 18px; align-items: center;
  flex-wrap: wrap;
}
.hero-trust {
  display: flex; align-items: center; gap: 14px;
  margin-top: 28px;
  font-size: 13px; color: var(--ink-soft);
}
.hero-trust .stars { color: var(--saffron); letter-spacing: 1px; }

.hero-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

/* Floating mini-cards over hero */
.hero-card {
  position: absolute;
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.hero-card .ic { font-size: 22px; }

/* ========== Section ========== */
.section { padding: 100px 0; position: relative; }
.section-tight { padding: 70px 0; }
.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}
.section .lede {
  font-size: clamp(17px, 1.3vw, 20px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 48px;
}
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-head .right { max-width: 36ch; color: var(--ink-soft); }

/* ========== Garden (progress tree) ========== */
.garden {
  background: var(--ink);
  color: var(--paper-3);
  border-radius: 32px;
  margin: 30px 0;
  padding: 80px 5%;
  position: relative;
  overflow: hidden;
}
.garden h2 { color: var(--paper-3); }
.garden .lede { color: rgba(246, 237, 217, .75); }

.tree-stage {
  position: relative;
  aspect-ratio: 1 / 0.78;
  max-width: 720px;
  margin: 0 auto;
}
.tree-bud {
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper-3);
  color: var(--ink);
  font-weight: 800;
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 3px var(--saffron);
  cursor: pointer;
  font-size: 22px;
  transition: transform .25s cubic-bezier(.6,.05,.3,1.4);
  z-index: 2;
}
.tree-bud.locked {
  background: rgba(246, 237, 217, .12);
  color: rgba(246, 237, 217, .35);
  box-shadow: 0 0 0 2px rgba(246, 237, 217, .15);
  border-color: rgba(246, 237, 217, .25);
}
.tree-bud:hover:not(.locked) { transform: scale(1.12) rotate(-4deg); }
.tree-bud .label-tag {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  background: var(--paper-3); color: var(--ink);
  padding: 4px 10px; font-size: 12px; border-radius: 999px;
  font-weight: 700; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.tree-bud:hover .label-tag { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ========== Skill Tree (replaces garden buds) ========== */
.skill-tree-stage {
  position: relative;
  aspect-ratio: 1 / 0.62;
  width: 100%;
  max-width: 980px;
  margin: 30px auto 0;
}
.skill-tree-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.skill-trunk-label {
  position: absolute;
  top: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 3;
}
.skill-trunk-dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 12px 2px currentColor;
}
html[dir="rtl"] .skill-tree-stage .skill-trunk-label[style*="right"] { left: 8% !important; right: auto !important; }

.skill-node {
  position: absolute;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  border: 2px solid;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.5,1.5,.6,1.1), box-shadow .25s ease;
  padding: 0;
}
.skill-node:hover, .skill-node:focus-visible {
  transform: scale(1.16);
  outline: none;
}
.skill-node-inner {
  display: grid; place-items: center;
  width: 100%; height: 100%;
}
.skill-progress-badge {
  position: absolute;
  bottom: -10px;
  left: 50%; transform: translateX(-50%);
  padding: 2px 8px 3px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.skill-current-tag {
  position: absolute;
  bottom: -28px;
  left: 50%; transform: translateX(-50%);
  padding: 4px 12px 5px;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--ink);
}

/* Pulse for in-progress nodes */
@keyframes skill-pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor, 0 0 22px 2px currentColor; }
  50%      { box-shadow: 0 0 0 5px currentColor, 0 0 30px 5px currentColor; }
}
.skill-progress {
  animation: skill-pulse 2.4s ease-in-out infinite;
}

/* Tooltip */
.skill-tooltip {
  position: absolute;
  z-index: 10;
  width: 250px;
  background: var(--paper-3);
  color: var(--ink);
  border: 1.5px solid;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 6px 6px 0 var(--ink), 0 18px 40px -10px rgba(0,0,0,.5);
  pointer-events: none;
  animation: tipIn .22s cubic-bezier(.5,1.5,.6,1);
  margin-top: -8px;
}
@keyframes tipIn {
  from { opacity: 0; transform: translate(var(--tx, -50%), calc(var(--ty, -100%) + 6px)); }
  to   { opacity: 1; }
}
.skill-tooltip-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.skill-tooltip-ic {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.skill-tooltip-head strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.01em;
  flex: 1;
}
.skill-tooltip-prog {
  padding: 2px 8px 3px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.skill-tooltip p {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.skill-tooltip-lock {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: rgba(232, 169, 60, .18);
  color: var(--terracotta-d);
  border: 1px dashed currentColor;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.skill-tooltip-lock strong { color: var(--ink); margin-inline-start: 2px; }

@media (max-width: 720px) {
  .skill-tree-stage { aspect-ratio: 1 / 0.85; max-width: 100%; }
  .skill-node { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .skill-tooltip { width: 200px; }
  .skill-trunk-label { font-size: 11px; }
}

/* Stats bar above the tree */
.skill-stats {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin: 18px 0 24px;
  align-items: center; justify-content: space-between;
}
.skill-stat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(250, 244, 229, 0.08);
  border: 1.5px solid rgba(250, 244, 229, 0.18);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--paper-3);
}
.skill-stat-pill strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.skill-stat-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 12px 2px currentColor;
}


.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  padding: 30px 24px 26px;
  box-shadow: 5px 5px 0 var(--ink);
  position: relative;
}
.step-num {
  position: absolute;
  top: -18px; left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--saffron);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
}
.step h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 22px 0 8px;
  letter-spacing: -0.02em;
}
.step p { color: var(--ink-soft); margin: 0; font-size: 15.5px; }
.step .step-art { height: 130px; margin-bottom: 10px; }

/* ========== Lesson preview ========== */
.lesson-frame {
  background: var(--paper-3);
  border: 2px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--ink);
  display: grid;
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
}
.lesson-top {
  background: var(--paper-2);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1.5px solid var(--ink);
}
.lesson-progress {
  flex: 1; margin: 0 18px;
  height: 12px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  overflow: hidden;
}
.lesson-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--terracotta));
  transition: width .5s cubic-bezier(.6,.05,.3,1.1);
}
.lesson-body {
  padding: 36px 32px 28px;
}
.lesson-q {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.lesson-q-num {
  display: inline-block;
  background: var(--ink);
  color: var(--paper-3);
  border-radius: 12px;
  padding: 4px 14px 6px;
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 6px;
  line-height: 1;
  transform: rotate(-1deg);
}
.lesson-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 22px;
}
@media (max-width: 520px) { .lesson-options { grid-template-columns: 1fr; } }
.lesson-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  border-radius: 14px;
  font-weight: 700;
  font-size: 18px;
  text-align: start;
  transition: all .15s ease;
  position: relative;
}
.lesson-opt:hover { background: var(--paper-2); transform: translateY(-2px); }
.lesson-opt .key {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper-3);
  font-size: 13px; font-weight: 800;
}
.lesson-opt.correct {
  background: var(--leaf);
  border-color: var(--sage-d);
  color: var(--ink);
  animation: pop .35s cubic-bezier(.5,1.5,.6,1.1);
}
.lesson-opt.wrong {
  background: var(--rose);
  border-color: var(--terracotta-d);
  color: var(--ink);
  animation: shake .35s;
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.lesson-bottom {
  padding: 16px 24px;
  background: var(--paper-2);
  border-top: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.lesson-streak {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink); color: var(--saffron);
  font-weight: 800; font-size: 13px;
  letter-spacing: 0.02em;
}
.lesson-streak .flame {
  display: inline-block;
  animation: flame 1.2s ease-in-out infinite;
}
@keyframes flame {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.08) rotate(2deg); }
}

/* Celebration overlay */
.lesson-celebration {
  position: absolute; inset: 0;
  background: rgba(232, 169, 60, .95);
  display: grid; place-items: center;
  text-align: center;
  padding: 32px;
  z-index: 4;
}
.lesson-celebration h3 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 12px 0 6px;
  color: var(--ink);
}
.lesson-celebration p { color: var(--ink); font-weight: 600; margin: 0 0 18px; }
.lesson-celebration .rewards {
  display: flex; gap: 18px; justify-content: center;
  margin: 18px 0 6px;
  flex-wrap: wrap;
}
.lesson-celebration .reward-pill {
  background: var(--ink); color: var(--saffron);
  padding: 10px 16px; border-radius: 999px;
  font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}

/* ========== Curriculum ========== */
.curriculum-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 860px) { .curriculum-grid { grid-template-columns: 1fr; } }
.country-stack {
  display: grid; gap: 14px;
}
.country-row {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.country-row .flag {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 28px;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
}
.country-row .meta { flex: 1; }
.country-row strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
}
.country-row span { display: block; font-size: 13px; color: var(--ink-soft); }
.country-row .badge {
  background: var(--sage); color: var(--paper-3);
  padding: 6px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* Subject tags */
.subjects {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 22px;
}
.subject-tag {
  padding: 8px 16px;
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 3px 3px 0 var(--ink);
}

/* ========== Bilingual block ========== */
.biling {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--paper-2);
  border-radius: 28px;
  padding: 32px;
  border: 1.5px solid var(--ink);
  align-items: stretch;
}
@media (max-width: 760px) { .biling { grid-template-columns: 1fr; } }
.biling-card {
  background: var(--paper-3);
  border-radius: 20px;
  padding: 24px;
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.biling-card.ar { direction: rtl; font-family: var(--font-ar); }
.biling-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}
.biling-card.ar h4 { font-family: var(--font-ar); font-weight: 800; }
.biling-mini-q {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin: 18px 0 14px;
  letter-spacing: -0.02em;
}
.biling-card.ar .biling-mini-q { font-family: var(--font-ar-serif); font-weight: 700; }
.biling-options { display: flex; gap: 8px; flex-wrap: wrap; }
.biling-options span {
  padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 12px;
  background: var(--paper); font-weight: 700;
}
.biling-options span.ok { background: var(--leaf); }

/* ========== Parent space ========== */
.parent-section {
  background: var(--paper-2);
  border-radius: 32px;
  padding: 70px 5% 70px;
  position: relative;
  overflow: hidden;
}
.parent-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 920px) { .parent-grid { grid-template-columns: 1fr; } }

.privacy-list { display: grid; gap: 16px; margin-top: 30px; }
.privacy-item {
  display: flex; gap: 16px; align-items: start;
  padding: 16px 18px;
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
}
.privacy-item .ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--sage); color: var(--paper-3);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.privacy-item strong { font-family: var(--font-display); font-size: 17px; }
.privacy-item p { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* Parent dashboard mockup */
.parent-dash {
  background: var(--paper-3);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 10px 10px 0 var(--ink);
}
.parent-dash-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.parent-dash-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--saffron);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
}
.parent-dash-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.dash-stat {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
}
.dash-stat .num {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  line-height: 1; letter-spacing: -0.02em;
  color: var(--terracotta);
}
.dash-stat .num.gold { color: var(--saffron-d); }
.dash-stat .num.green { color: var(--sage-d); }
.dash-stat .label {
  font-size: 11.5px; color: var(--ink-soft);
  margin-top: 6px; font-weight: 600;
}
.parent-dash-chart {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 16px;
}
.chart-bars {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
  align-items: end;
  height: 90px;
  margin-top: 8px;
}
.chart-bar {
  background: var(--terracotta);
  border-radius: 6px 6px 2px 2px;
  border: 1.5px solid var(--ink);
  position: relative;
}
.chart-day {
  text-align: center; font-size: 11px; color: var(--ink-soft);
  margin-top: 4px; font-weight: 700;
}

/* ========== Testimonials ========== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 920px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  padding: 26px 24px 22px;
  position: relative;
  box-shadow: 5px 5px 0 var(--ink);
}
.testimonial .quote-mark {
  font-family: var(--font-display);
  font-size: 84px;
  line-height: 0.3;
  color: var(--saffron);
  position: absolute;
  top: 28px; right: 24px;
  font-weight: 800;
}
html[dir="rtl"] .testimonial .quote-mark { right: auto; left: 24px; }
.testimonial p {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 6px 0 22px;
  color: var(--ink);
}
.testimonial-meta {
  display: flex; align-items: center; gap: 12px;
  border-top: 1.5px dashed var(--ink);
  padding-top: 16px;
}
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--rose);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  color: var(--ink);
  flex-shrink: 0;
}
.testimonial-meta strong { display: block; font-weight: 800; font-size: 14.5px; }
.testimonial-meta span { font-size: 12.5px; color: var(--ink-soft); }
.testimonial .stars { color: var(--saffron); margin-bottom: 8px; letter-spacing: 2px; font-size: 14px; }

/* ========== Final CTA banner ========== */
.cta-banner {
  position: relative;
  background: var(--terracotta);
  color: var(--paper-3);
  border-radius: 32px;
  padding: 80px 6%;
  margin: 30px 0 60px;
  text-align: center;
  overflow: hidden;
}
.cta-banner h2 {
  color: var(--paper-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0 auto 16px;
  max-width: 18ch;
}
.cta-banner p {
  color: rgba(246, 237, 217, .85);
  font-size: 18px;
  max-width: 30em;
  margin: 0 auto 32px;
}
.cta-banner .btn-cta {
  background: var(--ink);
  color: var(--paper-3);
  box-shadow:
    0 0 0 5px var(--terracotta),
    0 0 0 6px var(--paper),
    0 20px 30px -10px rgba(0,0,0,.4);
}
.cta-banner .btn-cta:hover {
  background: var(--ink);
}

/* ========== Footer ========== */
.footer {
  background: var(--ink);
  color: rgba(246, 237, 217, .8);
  padding: 70px 0 30px;
  font-size: 14.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(246, 237, 217, .15);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer h5 {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0 0 16px;
  color: var(--paper-3);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a:hover { color: var(--saffron); }
.footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 13px;
  color: rgba(246, 237, 217, .55);
}

/* ========== Modal (signup demo flow) ========== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(27, 34, 64, .55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 12px 12px 0 var(--ink);
  max-width: 520px;
  width: 100%;
  padding: 36px 32px 30px;
  position: relative;
  animation: rise .35s cubic-bezier(.5,1.6,.6,1);
}
@keyframes rise {
  from { transform: translateY(20px) scale(.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper-2); border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-weight: 800;
}
html[dir="rtl"] .modal-close { right: auto; left: 18px; }
.modal h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.modal p.sub { color: var(--ink-soft); margin: 0 0 24px; font-size: 15.5px; }
.modal-step-dots {
  display: flex; gap: 6px; margin-bottom: 22px;
}
.modal-step-dots span {
  flex: 1; height: 6px; border-radius: 99px;
  background: var(--paper-2); border: 1px solid var(--ink);
}
.modal-step-dots span.active { background: var(--terracotta); }
.modal-step-dots span.done { background: var(--sage); }
.opts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 0 0 24px;
}
.opt-btn {
  padding: 18px 14px;
  background: var(--paper-3);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  transition: all .15s;
}
.opt-btn:hover { background: var(--paper-2); transform: translateY(-2px); }
.opt-btn.selected {
  background: var(--ink); color: var(--paper-3);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--saffron);
}
.opt-btn-lg { padding: 22px 18px; }
.opt-btn-lg .ic { font-size: 28px; display: block; margin-bottom: 8px; }
.opt-row {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px;
}
.input-field {
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
  background: var(--paper-3);
  border-radius: 14px;
  font: 600 16px var(--font-body);
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: box-shadow .15s, transform .15s;
}
.input-field:focus { box-shadow: 0 0 0 3px var(--saffron); }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-foot .back {
  color: var(--ink-soft); font-weight: 700; font-size: 14px;
}
.success-art {
  display: grid; place-items: center;
  margin-bottom: 18px;
}

/* ========== Decorative wave/seal ========== */
.deco-seal {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--paper-3);
  border: 1.5px dashed var(--ink);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Density tweak */
[data-density="cozy"] .section { padding: 80px 0; }
[data-density="cozy"] .hero { padding: 40px 0 60px; }
[data-density="airy"] .section { padding: 130px 0; }
[data-density="airy"] .hero { padding: 80px 0 100px; }

/* Motion off */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.6,.05,.3,1.1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Decorative orbiting sparkle for hero */
.spark {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--saffron);
  border-radius: 4px;
  transform: rotate(45deg);
  animation: twinkle 3.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: rotate(45deg) scale(1); }
  50% { opacity: 0.3; transform: rotate(45deg) scale(0.6); }
}
