/* ============================================================
   Lughati — official website stylesheet
   Source of truth for tokens: app/src/main/java/.../ui/theme/Palette.kt
   and marketing/brand/BRAND_GUIDE.md. No colours outside the palette.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --royal: #3A1C6B;        /* dominant */
  --royal-deep: #24123F;
  --sky: #4D3480;
  --floor: #351D5C;
  --scene-near: #4C3B7C;
  --lavender-glow: rgba(201, 176, 245, .30);

  --turquoise: #00C2A3;    /* secondary: interaction */
  --turquoise-light: #6FDDD2;
  --turquoise-ink: #0E9F94; /* turquoise readable on cream */

  --gold: #C8A06D;         /* accent: rationed */
  --seal: #EFC468;         /* earned light */
  --hairline-gold: rgba(200, 160, 109, .55);

  --cream: #FFF8F0;        /* contrast */
  --cream-deep: #F5EDE2;
  --on-scene: #FBF4E8;
  --cream-muted: rgba(251, 244, 232, .78);
  --cream-faint: rgba(251, 244, 232, .58);

  --ember: #E8907B;        /* attention only — never red */

  --ink: #24123F;          /* text on cream */
  --ink-soft: #4C3B7C;
  --ink-muted: #6E5A98;

  --shadow-soft: 0 18px 40px rgba(15, 11, 22, .28);
  --shadow-zizo: drop-shadow(0 18px 26px rgba(15, 11, 22, .45));

  /* Arch: rounder above than below — the shape signature */
  --arch-lg: 28px 28px 16px 16px;
  --arch-md: 20px 20px 12px 12px;
  --arch-sm: 12px 12px 8px 8px;
  --pill: 999px;

  --font: 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 28px; --space-7: 40px; --space-8: 64px; --space-9: 96px;
  --gutter: 20px;
  --container: 1120px;
  --narrow: 760px;

  --ease-enter: cubic-bezier(.16, 1, .3, 1);
  --ease-exit: cubic-bezier(.7, 0, .84, 0);
  --t-quick: 180ms; --t-standard: 260ms; --t-entrance: 420ms;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  /* A short page (contact, FAQ) kept its footer mid-screen with the page's
     background showing under it; the column pins it to the bottom. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  letter-spacing: 0;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--space-3); font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }
ul, ol { padding-inline-start: 1.4em; margin: 0 0 var(--space-4); }
li { margin-bottom: var(--space-2); }
strong { font-weight: 700; }
hr { border: 0; height: 1px; background: var(--hairline-gold); margin: var(--space-7) 0; }

:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 3px;
  border-radius: 6px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-4); top: -60px;
  background: var(--cream); color: var(--royal); padding: 10px 16px;
  border-radius: var(--pill); z-index: 100; font-weight: 700;
  transition: top var(--t-quick) var(--ease-enter);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Language switching ----------
   Blocks carry data-lang. The html element carries the active language.
   Everything works without JavaScript: the markup defaults to Arabic.  */
html[data-lang="ar"] [data-lang="en"] { display: none !important; }
html[data-lang="en"] [data-lang="ar"] { display: none !important; }
[dir="ltr"] { text-align: start; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--narrow); }
.section { padding-block: clamp(56px, 9vw, 112px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--night { background: linear-gradient(180deg, var(--sky) 0%, var(--royal) 58%, var(--floor) 100%); color: var(--on-scene); }
.section--royal { background: var(--royal); color: var(--on-scene); }
.section--cream { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%); color: var(--ink); }
.section--deep { background: var(--royal-deep); color: var(--on-scene); }

.eyebrow {
  display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: 0;
  color: var(--turquoise-ink); margin-bottom: var(--space-2);
  padding-bottom: 4px; border-bottom: 2px solid var(--turquoise);
}
.section--night .eyebrow, .section--royal .eyebrow, .section--deep .eyebrow { color: var(--turquoise-light); border-color: var(--turquoise); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.section--night .lede, .section--royal .lede, .section--deep .lede { color: var(--cream-muted); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.split { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1.1fr .9fr; }
  .split--reverse > :first-child { order: 2; }
}

/* ---------- Panels (the one way to make a card) ---------- */
.panel {
  border-radius: var(--arch-lg);
  padding: var(--space-6);
  background: rgba(255, 248, 240, .07);
  border: 1px solid rgba(251, 244, 232, .14);
  transition: transform var(--t-standard) var(--ease-enter), border-color var(--t-standard), background var(--t-standard);
}
.panel:hover { transform: translateY(-3px); border-color: rgba(111, 221, 210, .45); }
.section--cream .panel {
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--hairline-gold);
}
.section--cream .panel:hover { border-color: var(--turquoise); background: rgba(255,255,255,.8); }
.panel h3 { margin-top: var(--space-2); }
/* Doubled class so the feature surface still wins inside a cream section:
   `.section--cream .panel` above is two classes, and a one-class rule lost to
   it — which left cream text on a cream panel. */
.panel.panel--feature {
  background: linear-gradient(180deg, var(--royal) 0%, var(--royal-deep) 100%);
  color: var(--on-scene);
  border: 1px solid var(--hairline-gold);
}
.panel.panel--feature:hover { background: linear-gradient(180deg, var(--royal) 0%, var(--royal-deep) 100%); border-color: var(--seal); }
.panel--feature .eyebrow { color: var(--turquoise-light); border-color: var(--turquoise); }
.panel--feature h3, .panel--feature p, .panel--feature li { color: var(--on-scene); }
.panel-icon {
  width: 48px; height: 48px; border-radius: 14px 14px 9px 9px;
  display: grid; place-items: center;
  background: rgba(0, 194, 163, .14); color: var(--turquoise);
  margin-bottom: var(--space-3);
}
.section--cream .panel-icon { background: rgba(0, 194, 163, .12); color: var(--turquoise-ink); }
/* …but the feature surface is the night even inside cream: the icon keeps the bright secondary. */
.panel--feature .panel-icon { background: rgba(0, 194, 163, .14); color: var(--turquoise); }
.panel-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: var(--pill);
  font-weight: 700; font-size: 1.05rem; border: 1px solid transparent;
  transition: transform var(--t-quick) var(--ease-enter), background var(--t-standard), box-shadow var(--t-standard), border-color var(--t-standard);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 22px; height: 22px; }
/* Primary on the night: the one filled surface — cream pill, violet ink, gold hairline */
.btn--primary { background: var(--cream); color: var(--royal); border-color: var(--hairline-gold); box-shadow: 0 10px 30px rgba(15, 11, 22, .25); }
.btn--primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(15, 11, 22, .32); }
/* Secondary on the night: cream wash */
.btn--secondary { background: rgba(255, 248, 240, .08); color: var(--on-scene); border-color: rgba(251, 244, 232, .35); min-height: 48px; }
.btn--secondary:hover { background: rgba(255, 248, 240, .16); border-color: var(--turquoise-light); }
/* On cream: royal fill and royal outline */
.btn--royal { background: var(--royal); color: var(--cream); border-color: var(--royal-deep); }
.btn--royal:hover { background: var(--royal-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(58, 28, 107, .28); }
.btn--outline { background: transparent; color: var(--royal); border-color: var(--royal); min-height: 48px; }
.btn--outline:hover { background: rgba(58, 28, 107, .06); }
/* A store button whose URL is not set yet: visibly pending, not a link */
.btn--pending { cursor: default; opacity: .92; }
.btn--pending:hover { transform: none; }
.btn--pending .pending-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--seal);
  box-shadow: 0 0 0 4px rgba(239, 196, 104, .25);
}
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cta-note { font-size: .9rem; color: var(--cream-faint); margin-top: var(--space-3); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(36, 18, 63, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200, 160, 109, .22);
  color: var(--on-scene);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--on-scene); }
/* The bar carries the name itself: «لغتي │ Lughati», one line, the second
   name behind a gold hairline. No mark beside it — the logo lives in the hero. */
.brand-word { display: inline-flex; flex-direction: row; align-items: center; gap: 9px; line-height: 1; }
.brand-word small {
  font-weight: 500; font-size: .78rem; color: var(--cream-muted);
  position: relative; padding-inline-start: 10px; letter-spacing: .01em;
}
.brand-word small::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 15px; background: rgba(200, 160, 109, .6);
}
.brand { transition: opacity var(--t-quick); }
.brand:hover { opacity: .88; }
.nav-links { display: none; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 10px 14px; border-radius: var(--pill);
  font-weight: 500; color: var(--cream-muted);
  transition: color var(--t-quick), background var(--t-quick);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-scene); background: rgba(255, 248, 240, .08); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--turquoise); border-radius: 12px 12px 4px 4px; }
.nav-tools { display: flex; align-items: center; gap: var(--space-2); }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: var(--pill);
  border: 1px solid rgba(251, 244, 232, .35); background: transparent; color: var(--on-scene);
  font-weight: 700; transition: border-color var(--t-quick), background var(--t-quick);
}
.lang-switch:hover { border-color: var(--turquoise-light); background: rgba(255, 248, 240, .08); }
.lang-switch svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1px solid rgba(251, 244, 232, .3); background: transparent; color: var(--on-scene);
}
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
/* Mobile drawer */
.nav-drawer {
  display: none; padding: var(--space-2) 0 var(--space-4);
  border-top: 1px solid rgba(200, 160, 109, .2);
}
.nav-drawer.is-open { display: block; }
.nav-drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-drawer a { display: block; padding: 12px 10px; border-radius: 12px; font-weight: 500; color: var(--cream-muted); }
.nav-drawer a:hover, .nav-drawer a[aria-current="page"] { color: var(--on-scene); background: rgba(255,248,240,.08); }
@media (min-width: 900px) { .nav-drawer { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, var(--royal) 58%, var(--floor) 100%);
  color: var(--on-scene);
  padding-block: clamp(48px, 8vw, 96px) 0;
}
.hero::before {
  content: ""; position: absolute; inset-inline-end: -180px; top: -260px;
  width: 720px; height: 720px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--lavender-glow) 0%, rgba(201,176,245,0) 62%);
}
.hero-inner { display: grid; gap: var(--space-6); align-items: end; position: relative; }
@media (min-width: 880px) { .hero-inner { grid-template-columns: 1.15fr .85fr; } }
.hero-copy { padding-bottom: clamp(40px, 6vw, 80px); position: relative; z-index: 2; }
/* No plate. The logo stands in a pool of warm light that dissolves into the
   night — the brand's own "knowledge is light", and the reason the black
   calligraphy stays readable without a single one of its colours changing. */
.hero-logo {
  width: min(180px, 44vw); margin-bottom: var(--space-4);
  position: relative; background: none; box-shadow: none; border-radius: 0;
}
.hero-logo::before {
  content: ""; position: absolute; inset: -4% -30%;
  /* One pool, under the calligraphy: the feather rises out of it into the night. */
  background: radial-gradient(ellipse 62% 38% at 50% 72%,
    rgba(255, 248, 240, .96) 0%, rgba(255, 248, 240, .82) 40%,
    rgba(255, 246, 236, .34) 64%, rgba(255, 246, 236, 0) 84%);
  filter: blur(16px);
  pointer-events: none;
}
.hero-logo img { position: relative; }
.hero-logo img { width: 100%; height: auto; }
.hero h1 { color: var(--cream); max-width: 14ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--turquoise-light); }
.hero .lede { color: var(--cream-muted); font-size: 1.2rem; }
.hero-stage { position: relative; min-height: 360px; display: flex; align-items: flex-end; justify-content: center; }
.hero-zizo {
  position: relative; z-index: 2; width: min(300px, 62vw); height: auto;
  filter: var(--shadow-zizo);
  animation: zizo-breathe 3.6s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.hero-ground {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 62%; height: 46px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(15,11,22,.45) 0%, rgba(15,11,22,0) 70%);
}
.hero-light {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 90%; height: 140px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(111,221,210,.32) 0%, rgba(111,221,210,0) 70%);
}
.hero-road { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
@keyframes zizo-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.012); } }

/* ---------- Journey road ---------- */
.journey { position: relative; }
.journey-road { width: 100%; height: auto; }
.milestones { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); margin-top: var(--space-6); }
@media (min-width: 720px) { .milestones { grid-template-columns: repeat(6, 1fr); } }
.milestone {
  text-align: center; padding: var(--space-4) var(--space-2);
  border-radius: var(--arch-md); background: rgba(255,248,240,.06); border: 1px solid rgba(251,244,232,.12);
}
.milestone .lvl { display: block; font-weight: 800; font-size: 1.4rem; color: var(--turquoise-light); }
.milestone .lbl { display: block; font-size: .9rem; color: var(--cream-muted); }
.milestone--lit { border-color: var(--hairline-gold); background: rgba(239,196,104,.08); }
.milestone--lit .lvl { color: var(--seal); }

/* ---------- Steps (how it works) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step { position: relative; padding: var(--space-5); border-radius: var(--arch-md); background: rgba(255,255,255,.55); border: 1px solid var(--hairline-gold); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--royal); color: var(--cream); font-weight: 800; margin-bottom: var(--space-3);
}
.step h3 { font-size: 1.1rem; }
.step p { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Language chips ---------- */
.lang-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .lang-grid { grid-template-columns: repeat(4, 1fr); } }
.lang-chip {
  padding: var(--space-4); border-radius: var(--arch-md);
  background: rgba(255,248,240,.06); border: 1px solid rgba(251,244,232,.14);
  display: grid; gap: 4px; transition: border-color var(--t-standard), transform var(--t-standard) var(--ease-enter);
}
.lang-chip:hover { border-color: var(--turquoise-light); transform: translateY(-2px); }
.lang-chip .native { font-size: 1.4rem; font-weight: 700; color: var(--cream); line-height: 1.3; }
.lang-chip .name { font-size: .95rem; color: var(--cream-muted); }
.lang-chip .level { font-size: .8rem; color: var(--turquoise-light); font-weight: 700; }
.lang-from { margin-top: var(--space-5); padding: var(--space-4) var(--space-5); border-radius: var(--arch-md); border: 1px dashed rgba(200,160,109,.5); color: var(--cream-muted); }

/* ---------- Zizo showcase ---------- */
.zizo-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 320px; }
.zizo-stage img { width: min(260px, 60vw); filter: var(--shadow-zizo); position: relative; z-index: 1; }
.zizo-stage::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 70%; height: 120px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 100%, rgba(111,221,210,.28) 0%, rgba(111,221,210,0) 70%);
}
.zizo-stage--gold::after { background: radial-gradient(ellipse at 50% 100%, rgba(239,196,104,.32) 0%, rgba(239,196,104,0) 70%); }
.zizo-stage--cream img { filter: drop-shadow(0 18px 26px rgba(58,28,107,.28)); }
.zizo-stage--cream::after { background: radial-gradient(ellipse at 50% 100%, rgba(0,194,163,.18) 0%, rgba(0,194,163,0) 70%); }
.expr-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .expr-grid { grid-template-columns: repeat(4, 1fr); } }
.expr { text-align: center; padding: var(--space-4); border-radius: var(--arch-md); background: rgba(255,248,240,.06); border: 1px solid rgba(251,244,232,.12); }
.expr img { width: 120px; margin-inline: auto; filter: var(--shadow-zizo); }
.expr span { display: block; margin-top: var(--space-3); color: var(--cream-muted); font-size: .95rem; }

/* ---------- Feature lists ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.checks li { position: relative; padding-inline-start: 34px; }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,194,163,.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300C2A3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.checks--gold li::before {
  background: rgba(239,196,104,.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EFC468' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.note {
  padding: var(--space-4) var(--space-5); border-radius: var(--arch-md);
  border: 1px solid var(--hairline-gold); background: rgba(239,196,104,.08); font-size: .98rem;
}
.note--ember { border-color: rgba(232,144,123,.6); background: rgba(232,144,123,.10); }

/* ---------- Final CTA band ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band .split { align-items: end; }
.cta-band .zizo-stage { min-height: 280px; }
.cta-band .zizo-stage img { width: min(240px, 56vw); }

/* ---------- Footer ---------- */
.site-footer { background: var(--royal-deep); color: var(--cream-muted); padding-block: var(--space-7) var(--space-6); border-top: 1px solid rgba(200,160,109,.25); }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: var(--space-3); color: var(--on-scene); font-weight: 800; }
.site-footer h4 { color: var(--on-scene); font-size: .95rem; margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--cream-muted); transition: color var(--t-quick); }
.site-footer a:hover { color: var(--turquoise-light); }
.footer-bottom { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid rgba(251,244,232,.12); font-size: .88rem; color: var(--cream-faint); display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; }

/* ---------- Documents (privacy, terms, delete-account) ---------- */
.doc-hero { background: linear-gradient(180deg, var(--sky) 0%, var(--royal) 100%); color: var(--on-scene); padding-block: clamp(40px, 6vw, 72px); }
.doc-hero h1 { color: var(--cream); margin-bottom: var(--space-2); }
.doc-hero .lede { color: var(--cream-muted); }
.doc-meta { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); color: var(--cream-muted); font-size: .95rem; }
.doc-meta > span { display: inline; }
.doc { padding-block: clamp(40px, 6vw, 72px); }
.doc-layout { display: grid; gap: var(--space-7); }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
/* On phones the doc is a single column, so the contents list is a normal block
   in the flow; it only becomes a sticky sidebar where the two-column layout
   exists (>=960px). Sticky on a single column pinned it over the body text and
   swallowed taps on the links beneath it. */
.doc-toc { position: static; padding: var(--space-5); border-radius: var(--arch-md); background: rgba(255,255,255,.55); border: 1px solid var(--hairline-gold); font-size: .93rem; }
@media (min-width: 960px) { .doc-toc { position: sticky; top: 88px; } }
@media (max-width: 959px) { .doc-toc { position: static; top: auto; } }
.doc-toc h2 { font-size: 1rem; margin-bottom: var(--space-3); }
.doc-toc ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; }
.doc-toc a { color: var(--ink-soft); }
.doc-toc a:hover { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; }
.doc-body { max-width: 74ch; }
.doc-body h2 { font-size: 1.5rem; margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--hairline-gold); scroll-margin-top: 90px; }
.doc-body h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.doc-body h3 { font-size: 1.12rem; margin-top: var(--space-5); color: var(--royal); scroll-margin-top: 90px; }
.doc-body p, .doc-body li { color: #2E2247; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-bottom: var(--space-4); }
.doc-body th, .doc-body td { text-align: start; padding: 10px 12px; border-bottom: 1px solid rgba(200,160,109,.35); vertical-align: top; }
.doc-body th { color: var(--royal); font-weight: 700; background: rgba(58,28,107,.05); }
.doc-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc-body a { color: var(--turquoise-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc-body a:hover { color: var(--royal); }
.summary {
  padding: var(--space-5) var(--space-6); border-radius: var(--arch-lg);
  background: linear-gradient(180deg, var(--royal) 0%, var(--royal-deep) 100%);
  color: var(--on-scene); border: 1px solid var(--hairline-gold); margin-bottom: var(--space-6);
}
.summary h2 { border: 0 !important; margin: 0 0 var(--space-3) !important; padding: 0 !important; color: var(--cream); font-size: 1.2rem; }
.summary li, .summary p { color: var(--cream-muted); }
/* Something the owner must fill in before publishing. Deliberately loud. */
.todo {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  background: rgba(232,144,123,.18); color: #7A3A2C; border: 1px dashed rgba(232,144,123,.9);
  font-weight: 700; font-size: .92em;
}
.section--night .todo, .doc-hero .todo, .summary .todo { color: #FFD9CF; background: rgba(232,144,123,.22); }
.steps-doc { counter-reset: s; list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; gap: var(--space-3); }
.steps-doc li { position: relative; padding: var(--space-4) var(--space-5); padding-inline-start: 64px; border-radius: var(--arch-md); background: rgba(255,255,255,.6); border: 1px solid var(--hairline-gold); }
.steps-doc li::before {
  counter-increment: s; content: counter(s);
  position: absolute; inset-inline-start: 18px; top: 18px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--royal); color: var(--cream); font-weight: 800; font-size: .95rem;
}
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--pill); font-size: .82rem; font-weight: 700; }
.status-pill--ok { background: rgba(0,194,163,.14); color: var(--turquoise-ink); }
.status-pill--wait { background: rgba(232,144,123,.16); color: #7A3A2C; }

/* ---------- FAQ ---------- */
.faq details { border-radius: var(--arch-md); border: 1px solid var(--hairline-gold); background: rgba(255,255,255,.55); margin-bottom: var(--space-3); }
.faq summary { cursor: pointer; padding: var(--space-4) var(--space-5); font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--turquoise-ink); font-size: 1.3rem; line-height: 1; transition: transform var(--t-quick); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 var(--space-5) var(--space-5); color: var(--ink-soft); }

/* ---------- Reveal on scroll (subtle entrance) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-entrance) var(--ease-enter), transform var(--t-entrance) var(--ease-enter); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

/* ---------- Print (documents) ---------- */
@media print {
  .site-header, .site-footer, .doc-toc, .skip-link, .nav-drawer { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .doc-hero { background: none; color: #000; padding: 0 0 12pt; }
  .doc-hero h1 { color: #000; }
  .doc-meta { color: #333; }
  .summary { background: none; color: #000; border: 1px solid #999; }
  .summary h2, .summary li, .summary p { color: #000; }
  .doc-body a { color: #000; }
  .doc-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .doc-layout { grid-template-columns: 1fr; }
  .todo { border: 1px solid #000; background: none; color: #000; }
}

/* The road rises from under Zizo toward the copy: Zizo sits on the inline-end side, so mirror in LTR. */
[dir="ltr"] .hero-road { transform: scaleX(-1); }

/* Grid children must be allowed to shrink below their min-content (long words, nowrap buttons). */
.grid > *, .split > *, .hero-inner > *, .footer-grid > *, .doc-layout > * { min-width: 0; }
@media (max-width: 520px) {
  .cta-row .btn { white-space: normal; flex: 1 1 100%; text-align: center; }
}
/* Hero logo: a square cream card that crops the tall wordmark to its feather + calligraphy */
/* The whole logo, uncropped: feather above, «لغتي» below, nothing cut off. */
.hero-logo { width: min(190px, 46vw); height: auto; padding: 0; display: block; overflow: visible; }
.hero-logo img { width: 100%; height: auto; max-width: none; transform: none; }
@media print { .reveal { opacity: 1 !important; transform: none !important; } }
/* Single-column hero: the road would cut across Zizo, so it rests. */
@media (max-width: 879px) { .hero-road { display: none; } }

/* ---------- Page frame: the footer sits at the bottom of a short page ---------- */
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* ---------- Life, kept quiet ----------
   Every movement below is short, small, and off under prefers-reduced-motion
   (the block near the end of this file collapses them). Nothing loops in the
   reader's eye-line while text is being read. */

/* Cards in a row arrive one after another rather than all at once. */
.grid .reveal:nth-child(2), .expr-grid .reveal:nth-child(2) { transition-delay: 70ms; }
.grid .reveal:nth-child(3), .expr-grid .reveal:nth-child(3) { transition-delay: 140ms; }
.grid .reveal:nth-child(4), .expr-grid .reveal:nth-child(4) { transition-delay: 210ms; }

/* Zizo breathes wherever he stands, not only in the hero. */
@keyframes zizo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.zizo-stage img, .expr img { animation: zizo-float 6.4s ease-in-out infinite; }
.expr:nth-child(2) img { animation-delay: .5s; }
.expr:nth-child(3) img { animation-delay: 1s; }
.expr:nth-child(4) img { animation-delay: 1.5s; }

/* The bar earns a hairline and a touch more weight once the page has moved. */
.site-header { transition: background var(--t-standard), box-shadow var(--t-standard), border-color var(--t-standard); }
.site-header.is-scrolled { background: rgba(36, 18, 63, .94); box-shadow: 0 10px 30px rgba(15, 11, 22, .28); border-bottom-color: rgba(200, 160, 109, .38); }

/* Nav items: the turquoise underline grows from the centre instead of blinking on. */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px;
  background: var(--turquoise); border-radius: 2px;
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform var(--t-standard) var(--ease-enter);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { box-shadow: none; border-radius: var(--pill); }

/* The drawer slides rather than appears. */
@keyframes drawer-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-drawer.is-open { animation: drawer-in var(--t-standard) var(--ease-enter); }

/* A card lifts a little further when the pointer is actually on it. */
.step, .faq details { transition: transform var(--t-standard) var(--ease-enter), border-color var(--t-standard), background var(--t-standard); }
.step:hover, .faq details:hover { transform: translateY(-2px); border-color: var(--turquoise); }
.milestone { transition: transform var(--t-standard) var(--ease-enter), border-color var(--t-standard); }
.milestone:hover { transform: translateY(-2px); border-color: var(--turquoise-light); }

@media (prefers-reduced-motion: reduce) {
  .zizo-stage img, .expr img { animation: none !important; }
  .grid .reveal, .expr-grid .reveal { transition-delay: 0ms !important; }
  .nav-drawer.is-open { animation: none; }
}

/* ============================================================
   Enhancements (Oct 2026): richer reveal variants, the interactive
   language explorer, and the in-page section nav. Additive — the
   existing .reveal system and every component above are untouched.
   ============================================================ */

/* ---------- Reveal variants (data-reveal) ---------- */
[data-reveal] {
  opacity: 0;
  transition: opacity var(--t-entrance) var(--ease-enter), transform var(--t-entrance) var(--ease-enter), filter var(--t-entrance) var(--ease-enter);
  will-change: opacity, transform;
}
[data-reveal="up"]    { transform: translateY(20px); }
[data-reveal="fade"]  { transform: none; }
[data-reveal="scale"] { transform: scale(.94); }
[data-reveal="left"]  { transform: translateX(-26px); }
[data-reveal="right"] { transform: translateX(26px); }
[data-reveal="blur"]  { transform: translateY(12px); filter: blur(8px); }
/* Logical (direction-aware) slide-ins; used by the GSAP engine and as the
   IntersectionObserver fallback transform when GSAP is absent. */
[data-reveal="start"] { transform: translateX(-26px); }
[data-reveal="end"]   { transform: translateX(26px); }
html[dir="rtl"] [data-reveal="start"] { transform: translateX(26px); }
html[dir="rtl"] [data-reveal="end"]   { transform: translateX(-26px); }
[data-reveal="stagger"], [data-reveal="clip"] { transform: none; }
[data-reveal].is-visible { opacity: 1; transform: none; filter: none; }
.no-js [data-reveal] { opacity: 1; transform: none; filter: none; }

/* ---------- GSAP motion engine hand-off ----------
   When lughati-motion.js is driving, it sets html[data-motion] (full | lite |
   reduced) and owns the hidden/shown states inline (gsap.set + clearProps).
   The CSS must then NOT impose its own opacity:0 — otherwise clearProps would
   revert elements to the CSS hidden state and they would vanish. With
   data-motion present the CSS shows the element and drops its transition so the
   two systems never double-animate. GSAP re-hides off-screen elements inline
   (autoAlpha:0) and reveals them on scroll; above-the-fold elements play at
   once. If GSAP is absent, html has no data-motion and the IntersectionObserver
   path (.is-visible) stays in charge. */
html[data-motion] .reveal,
html[data-motion] [data-reveal] {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
  will-change: auto;
}

/* ---------- Lenis smooth scroll base styles ----------
   Lenis adds these classes to <html> only when its JS runs; they are inert
   otherwise, so native scrolling is untouched when Lenis is not active. The
   !important override is required because html has scroll-behavior:smooth,
   which would fight Lenis's JS-driven scrolling. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Language explorer ---------- */
.lang-explorer { margin-top: var(--space-2); }
.lx-sources {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.lx-source {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 18px; border-radius: var(--arch-sm);
  background: rgba(255, 248, 240, .07); border: 1px solid rgba(251, 244, 232, .18);
  color: var(--on-scene);
  transition: transform var(--t-quick) var(--ease-enter), border-color var(--t-standard), background var(--t-standard);
}
.lx-source:hover { transform: translateY(-2px); border-color: var(--turquoise-light); }
.lx-source[aria-selected="true"] {
  background: rgba(0, 194, 163, .16); border-color: var(--turquoise);
  box-shadow: inset 0 -3px 0 var(--turquoise);
}
.lx-source__native { font-size: 1.15rem; font-weight: 800; line-height: 1.1; }
.lx-source__name { font-size: .82rem; color: var(--cream-muted); }
.lx-source[aria-selected="true"] .lx-source__name { color: var(--turquoise-light); }

.lx-panel__head { color: var(--cream-muted); margin-bottom: var(--space-4); font-size: 1.02rem; }
.lx-panel__head strong { color: var(--on-scene); }
.lx-targets { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .lx-targets { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .lx-targets { grid-template-columns: repeat(4, 1fr); } }
.lx-target {
  padding: var(--space-4); border-radius: var(--arch-md);
  background: rgba(255, 248, 240, .06); border: 1px solid rgba(251, 244, 232, .14);
  display: grid; gap: 4px;
  transition: border-color var(--t-standard), transform var(--t-standard) var(--ease-enter), background var(--t-standard);
}
.lx-target:hover { border-color: var(--turquoise-light); transform: translateY(-3px); background: rgba(255, 248, 240, .1); }
.lx-target__native { font-size: 1.3rem; font-weight: 700; color: var(--cream); line-height: 1.3; }
.lx-target__name { font-size: .92rem; color: var(--cream-muted); }
.lx-target__level { font-size: .78rem; color: var(--turquoise-light); font-weight: 700; }
.lx-principle { margin-top: var(--space-5); }

/* The explorer on a cream section (languages.html) wears the cream palette. */
.section--cream .lx-source { background: rgba(255,255,255,.55); border-color: var(--hairline-gold); color: var(--ink); }
.section--cream .lx-source__name { color: var(--ink-muted); }
.section--cream .lx-source[aria-selected="true"] { background: rgba(0,194,163,.12); border-color: var(--turquoise); }
.section--cream .lx-source[aria-selected="true"] .lx-source__name { color: var(--turquoise-ink); }
.section--cream .lx-panel__head { color: var(--ink-soft); }
.section--cream .lx-panel__head strong { color: var(--ink); }
.section--cream .lx-target { background: rgba(255,255,255,.55); border-color: var(--hairline-gold); }
.section--cream .lx-target:hover { border-color: var(--turquoise); background: rgba(255,255,255,.85); }
.section--cream .lx-target__native { color: var(--royal); }
.section--cream .lx-target__name { color: var(--ink-soft); }
.section--cream .lx-target__level { color: var(--turquoise-ink); }

/* ---------- In-page section nav (scrollspy) ---------- */
.section-nav {
  position: sticky; top: 68px; z-index: 40;
  background: rgba(36, 18, 63, .80);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 160, 109, .20);
}
.section-nav ul {
  list-style: none; margin: 0; padding: 8px var(--gutter);
  display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: var(--container); margin-inline: auto; scrollbar-width: none;
}
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a {
  display: inline-block; white-space: nowrap; padding: 7px 14px; border-radius: var(--pill);
  font-size: .92rem; font-weight: 600; color: var(--cream-muted);
  transition: color var(--t-quick), background var(--t-quick);
}
.section-nav a:hover { color: var(--on-scene); background: rgba(255,248,240,.08); }
.section-nav a[aria-current="true"] { color: var(--royal); background: var(--cream); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* ============================================================
   Interaction craft (Oct 2026, phase 2): pointer 3D tilt on cards,
   count-up stats, and a light page-in transition. All additive and
   fully disabled under prefers-reduced-motion.
   ============================================================ */

/* ---------- Pointer 3D tilt (fine pointers only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .tilt { transform-style: preserve-3d; }
  .tilt.is-tilting {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px);
    transition: transform 80ms linear;
  }
}

/* ---------- Stats band with count-ups ---------- */
.stats { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  text-align: center; padding: var(--space-5) var(--space-4); border-radius: var(--arch-md);
  background: rgba(255, 248, 240, .06); border: 1px solid rgba(251, 244, 232, .14);
}
.stat .num { display: block; font-weight: 800; font-size: clamp(2rem, 5vw, 2.8rem); color: var(--seal); line-height: 1; }
.stat .num .suffix { color: var(--turquoise-light); }
.stat .lbl { display: block; margin-top: var(--space-2); color: var(--cream-muted); font-size: .95rem; }
.section--cream .stat { background: rgba(255, 255, 255, .55); border-color: var(--hairline-gold); }
.section--cream .stat .num { color: var(--turquoise-ink); }
.section--cream .stat .num .suffix { color: var(--gold); }
.section--cream .stat .lbl { color: var(--ink-soft); }

/* ---------- Light page-in transition ---------- */
html:not(.no-js):not(.page-ready) main { opacity: 0; }
html.page-ready main { animation: page-in 450ms var(--ease-enter) both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tilt, .tilt.is-tilting { transform: none !important; }
  [data-parallax] { transform: none !important; }
  html:not(.no-js):not(.page-ready) main { opacity: 1; }
  html.page-ready main { animation: none; }
}
