/* =====================================================================
   Lingvio — marketing site styles
   Design system: violet/indigo gradient, voice-wave motif, light lavender
   ===================================================================== */

:root {
  /* Colors */
  --primary: #6C5CE7;
  --primary-deep: #4A3FC4;
  --accent: #A78BFA;
  --bg: #FAF8FF;
  --bg-alt: #F1ECFE;
  --surface: #FFFFFF;
  --text: #1B1633;
  --text-muted: #6B6485;
  --line: rgba(108, 92, 231, 0.12);
  --grad-hero: linear-gradient(135deg, #7C6BF0 0%, #6C5CE7 38%, #5546D8 70%, #4338CA 100%);
  --grad-cta: linear-gradient(120deg, #8B7BF5 0%, #6C5CE7 50%, #4F46E5 100%);
  --grad-text: linear-gradient(120deg, #7C6BF0, #4F46E5);

  /* Radii */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 4px 16px rgba(75, 63, 196, 0.08);
  --shadow-md: 0 18px 50px rgba(75, 63, 196, 0.14);
  --shadow-lg: 0 40px 90px rgba(75, 63, 196, 0.22);
  --glow: 0 12px 40px rgba(108, 92, 231, 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);

  --maxw: 1180px;
  --nav-h: 72px;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --primary-deep: #B7A7FF;        /* lighter for legible eyebrows/links on dark */
  --bg: #0E0A1F;
  --bg-alt: #16112E;
  --surface: #1B1539;
  --text: #F3F0FF;
  --text-muted: #ABA2C9;
  --line: rgba(167, 139, 250, 0.18);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 40px 90px rgba(0, 0, 0, 0.6);
  --grad-text: linear-gradient(120deg, #A78BFA, #8B7BF5);
}
[data-theme="dark"] .btn--ghost { background: rgba(255, 255, 255, 0.06); color: #D8CEFF; }
[data-theme="dark"] .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .nav--scrolled { background: rgba(16, 10, 31, 0.72); box-shadow: 0 1px 0 var(--line), var(--shadow-sm); }
[data-theme="dark"] .nav--open { background: rgba(16, 10, 31, 0.97); }
[data-theme="dark"] .lang-select__btn { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .lang-select__btn:hover { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .lang-select__menu { background: rgba(27, 21, 57, 0.97); }
[data-theme="dark"] .nav__burger span { background: var(--text); }
[data-theme="dark"] .bento__card--streak { background: linear-gradient(160deg, #241a3a, #1B1539); }
[data-theme="dark"] .chip,
[data-theme="dark"] .scenario-chip { background: rgba(167, 139, 250, 0.14); }
/* Phone mockup + floating cards stay light "islands" on the dark page */
[data-theme="dark"] .phone__screen { background: linear-gradient(180deg, #F6F3FF, #FFFFFF 30%); }
[data-theme="dark"] .phone__screen .scenario-chip { background: #F1ECFE; color: #4A3FC4; }
[data-theme="dark"] .bubble--ai { background: #fff; color: #1B1633; border-color: rgba(108, 92, 231, 0.14); }
[data-theme="dark"] .mic-bar { background: #fff; }
[data-theme="dark"] .float-card { background: rgba(255, 255, 255, 0.96); color: #1B1633; }
[data-theme="dark"] .float-card span { color: #6B6485; }
[data-theme="dark"] .ring-mini span { color: #4A3FC4; }
[data-theme="dark"] .ring-mini__bg { stroke: #ECE6FF; }
[data-theme="dark"] .store-badge { background: #000; border: 1px solid rgba(255, 255, 255, 0.15); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

/* Offset anchored sections so the fixed nav never covers their headings */
[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* Visible keyboard focus for all interactive elements */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.lang-select__menu li:focus-visible,
details:focus-within > summary {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  z-index: 200;
}
.skip-link:focus { left: 16px; }

/* ---------- Eyebrow / titles ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-deep);
}
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section__title { font-size: clamp(2rem, 4vw, 3.25rem); margin: 14px 0 0; }
.section__subtitle {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.975rem;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s var(--ease-out),
    background 0.3s, color 0.3s;
  will-change: transform;
  text-align: center;
  overflow-wrap: break-word;
}
.btn--lg { padding: 16px 30px; font-size: 1.05rem; white-space: normal; }
.btn--primary {
  color: #fff;
  background: var(--grad-cta);
  background-size: 160% 160%;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  box-shadow: var(--glow);
  animation: gradShift 3s var(--ease-soft) infinite;
}
.btn--primary:active { transform: scale(0.97); }
.btn--ghost {
  color: var(--primary-deep);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-2px); }

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.nav--scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.brand__mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad-hero);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--grad-text);
  transition: width 0.3s var(--ease-out);
}
.nav__links a:hover { color: var(--primary-deep); }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

/* Language selector */
.lang-select { position: relative; }
.lang-select__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.lang-select__btn:hover { background: #fff; box-shadow: var(--shadow-sm); }
.lang-select__btn .chev { transition: transform 0.25s var(--ease-out); }
.lang-select.open .chev { transform: rotate(180deg); }
.lang-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 168px;
  list-style: none;
  margin: 0; padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
  max-height: 70vh;
  overflow: auto;
  z-index: 120;
}
.lang-select.open .lang-select__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-select__menu li {
  padding: 9px 13px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.lang-select__menu li:hover { background: var(--bg-alt); }
.lang-select__menu li[aria-selected="true"] {
  background: var(--grad-cta);
  color: #fff;
  font-weight: 700;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary-deep);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-out);
}
.theme-toggle:hover { background: var(--surface); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.theme-toggle svg { transition: transform 0.4s var(--ease-out), opacity 0.3s; }
[data-theme="dark"] .theme-toggle { background: rgba(255, 255, 255, 0.06); color: #E9C46A; }
/* Show moon in light mode, sun in dark mode */
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav--open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   Equalizer (brand voice-wave)
   ===================================================================== */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i {
  width: 3px;
  height: 100%;
  background: #fff;
  border-radius: var(--r-pill);
  transform-origin: bottom;
  animation: eqBar 1.1s var(--ease-soft) infinite;
}
.eq--mark i { width: 3px; }
.eq--mark i:nth-child(1) { animation-delay: -0.2s; }
.eq--mark i:nth-child(2) { animation-delay: -0.5s; }
.eq--mark i:nth-child(3) { animation-delay: -0.1s; }
.eq--mark i:nth-child(4) { animation-delay: -0.7s; }

@keyframes eqBar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

/* big equalizer in CTA band */
.eq--big { height: 56px; gap: 6px; margin-bottom: 8px; }
.eq--big i { width: 6px; animation-duration: 1.3s; }
.eq--big i:nth-child(odd) { animation-duration: 1s; }
.eq--big i:nth-child(3n) { animation-duration: 1.5s; }
.eq--big.eq--active i { animation-name: eqBarTall; }
@keyframes eqBarTall {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 70px) 0 90px;
  overflow: hidden;
}
.hero__mesh { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.blob--1 { width: 460px; height: 460px; background: #7C6BF0; top: -120px; inset-inline-start: -80px; animation: drift1 18s var(--ease-soft) infinite; }
.blob--2 { width: 420px; height: 420px; background: #4F46E5; top: 40px; inset-inline-end: -60px; animation: drift2 22s var(--ease-soft) infinite; }
.blob--3 { width: 320px; height: 320px; background: #A78BFA; bottom: -120px; inset-inline-start: 40%; animation: drift1 16s var(--ease-soft) infinite reverse; }
.dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(108, 92, 231, 0.16) 1.2px, transparent 1.3px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.12); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.08); }
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero__title {
  font-size: clamp(2.1rem, 6vw, 5rem);
  margin: 18px 0 0;
  overflow-wrap: break-word;
}
.hero__title span { display: block; }
.hero__subtitle {
  margin-top: 22px;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.12rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__proof { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.stars { color: #FBBF24; letter-spacing: 2px; font-size: 1.05rem; }
.hero__proof-text { display: flex; flex-direction: column; line-height: 1.3; }
.hero__proof-text strong { font-size: 0.98rem; }
.hero__proof-text span { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Phone mockup ---------- */
.hero__visual { position: relative; display: grid; place-items: center; }
.phone { position: relative; }
.phone__frame {
  position: relative;
  width: 300px;
  background: #15102e;
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  animation: floatY 6s var(--ease-soft) infinite;
  z-index: 2;
}
.phone__notch {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #15102e;
  border-radius: var(--r-pill);
  z-index: 3;
}
.phone__screen {
  background: linear-gradient(180deg, #F6F3FF, #FFFFFF 30%);
  border-radius: 34px;
  padding: 34px 14px 16px;
  height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-0.6deg); }
}
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 2px 6px 10px;
}
.appbar__title { font-weight: 700; color: var(--text); }
.appbar__live { color: #E0457B; font-weight: 700; }
.scenario-chip {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--primary-deep);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 12px;
}
.chat { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.bubble {
  max-width: 80%;
  padding: 10px 13px;
  font-size: 0.82rem;
  line-height: 1.45;
  border-radius: 16px;
}
.bubble--ai {
  align-self: flex-start;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.bubble--me {
  align-self: flex-end;
  background: var(--grad-cta);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bubble.typing span {
  width: 6px; height: 6px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chat-rise { animation: chatRise 0.6s var(--ease-out) backwards; animation-delay: calc(var(--i) * 0.5s + 0.3s); }
@keyframes chatRise {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.mic-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.mic-eq { display: inline-flex; align-items: center; gap: 3px; height: 22px; flex: 1; }
.mic-eq i {
  flex: 1;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-pill);
  transform-origin: center;
  animation: eqMid 1s var(--ease-soft) infinite;
}
.mic-eq i:nth-child(2) { animation-delay: -0.2s; background: var(--primary); }
.mic-eq i:nth-child(3) { animation-delay: -0.5s; }
.mic-eq i:nth-child(4) { animation-delay: -0.3s; background: var(--primary); }
.mic-eq i:nth-child(5) { animation-delay: -0.6s; }
.mic-eq i:nth-child(6) { animation-delay: -0.1s; background: var(--primary); }
.mic-eq i:nth-child(7) { animation-delay: -0.4s; }
@keyframes eqMid {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}
.mic-btn {
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--grad-cta);
  display: grid; place-items: center;
  box-shadow: var(--glow);
}

/* Floating overlay cards */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  z-index: 4;
  animation: floatY 5s var(--ease-soft) infinite;
}
.float-card strong { display: block; font-size: 0.95rem; line-height: 1.1; }
.float-card span { font-size: 0.72rem; color: var(--text-muted); }
.float-card__icon { font-size: 1.3rem; }
.float-card--streak { top: 18%; inset-inline-start: -42px; animation-delay: -1s; }
.float-card--xp { top: 44%; inset-inline-end: -46px; animation-delay: -2.4s; }
.float-card--score { bottom: 12%; inset-inline-start: -34px; animation-delay: -1.6s; }
.ring-mini { position: relative; width: 38px; height: 38px; }
.ring-mini svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.ring-mini circle { fill: none; stroke-width: 3.5; }
.ring-mini__bg { stroke: var(--bg-alt); }
.ring-mini__fg {
  stroke: url(#x);
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 97;
  stroke-dashoffset: 8;
  animation: ringFill 1.6s var(--ease-out) forwards;
}
@keyframes ringFill { from { stroke-dashoffset: 97; } }
.ring-mini span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; color: var(--primary-deep);
}

/* =====================================================================
   Reveal
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
[style*="--i"].reveal.in { transition-delay: calc(var(--i) * 80ms); }

/* =====================================================================
   TRUST / STATS
   ===================================================================== */
.trust { padding: 36px 0 10px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  margin-bottom: 30px;
}
.marquee__track {
  display: inline-flex;
  gap: 44px;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.phrase {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.7;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.trust__title { text-align: center; color: var(--text-muted); font-weight: 600; margin-bottom: 26px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  text-align: center;
  padding: 22px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.stat__value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-variant-numeric: tabular-nums;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { color: var(--text-muted); font-size: 0.88rem; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { padding: 90px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 54px; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.fcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.fcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.fcard--wide { grid-column: span 2; }
.fcard--premium {
  background: var(--grad-hero);
  color: #fff;
  border-color: transparent;
}
.fcard--premium p { color: rgba(255, 255, 255, 0.85); }
.fcard__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 1.6rem;
  border-radius: var(--r-md);
  background: var(--bg-alt);
  margin-bottom: 16px;
}
.fcard--premium .fcard__icon { background: rgba(255, 255, 255, 0.18); }
.fcard h3 { font-size: 1.28rem; margin-bottom: 8px; overflow-wrap: break-word; hyphens: auto; }
.fcard p { color: var(--text-muted); font-size: 0.96rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  color: var(--primary-deep);
}
.mini-eq { display: inline-flex; align-items: flex-end; gap: 4px; height: 40px; margin-top: 18px; }
.mini-eq i {
  width: 5px; height: 100%;
  background: var(--grad-cta);
  border-radius: var(--r-pill);
  transform-origin: bottom;
  animation: eqBar 1.2s var(--ease-soft) infinite;
}
.mini-eq i:nth-child(2n) { animation-duration: 0.9s; }
.mini-eq i:nth-child(3n) { animation-duration: 1.5s; }
.mini-eq i:nth-child(1) { animation-delay: -0.2s; }
.mini-eq i:nth-child(2) { animation-delay: -0.5s; }
.mini-eq i:nth-child(3) { animation-delay: -0.1s; }
.mini-eq i:nth-child(4) { animation-delay: -0.7s; }
.mini-eq i:nth-child(5) { animation-delay: -0.3s; }
.mini-eq i:nth-child(6) { animation-delay: -0.6s; }
.mini-eq i:nth-child(7) { animation-delay: -0.15s; }
.mini-eq i:nth-child(8) { animation-delay: -0.45s; }
.mini-eq i:nth-child(9) { animation-delay: -0.25s; }

/* ---------- How it works ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.steps__line {
  position: absolute;
  top: 34px; left: 12%; right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
  opacity: 0.5;
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 14px;
}
.step__num {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  margin: 0 auto 18px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-cta);
  box-shadow: var(--glow);
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Gamification bento ---------- */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}
.bento__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.bento__card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.bento__card p { color: var(--text-muted); font-size: 0.94rem; }
.bento__card--streak {
  grid-row: span 1;
  background: linear-gradient(160deg, #FFF6F0, #FFFFFF);
}
.bento__big {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 3rem;
  line-height: 1;
  margin: 4px 0 10px;
  color: #F97316;
}
.flame { font-size: 2rem; display: inline-block; animation: flame 1.6s var(--ease-soft) infinite; transform-origin: bottom; }
@keyframes flame {
  0%, 100% { transform: scale(1) rotate(-2deg); filter: hue-rotate(0); }
  50% { transform: scale(1.12) rotate(2deg); filter: hue-rotate(-12deg); }
}
.xp-bar {
  height: 12px;
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  overflow: hidden;
  margin: 16px 0 8px;
}
.xp-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--grad-cta);
}
.reveal.in .xp-bar__fill { animation: xpFill 1.6s var(--ease-out) forwards; }
@keyframes xpFill { to { width: 77.5%; } }
.xp-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.badges { display: flex; gap: 10px; margin-top: 16px; font-size: 1.5rem; }
.badges span { animation: pop 0.5s var(--ease-out) backwards; }
.reveal.in .badges span:nth-child(1) { animation-delay: 0.1s; }
.reveal.in .badges span:nth-child(2) { animation-delay: 0.2s; }
.reveal.in .badges span:nth-child(3) { animation-delay: 0.3s; }
.reveal.in .badges span:nth-child(4) { animation-delay: 0.4s; }
.reveal.in .badges span:nth-child(5) { animation-delay: 0.5s; }
.badges .locked { filter: grayscale(1); opacity: 0.5; font-size: 1.2rem; align-self: center; }
@keyframes pop { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.2); } to { transform: scale(1); opacity: 1; } }

/* ---------- Languages marquee ---------- */
.lang-marquee {
  overflow: hidden;
  margin-top: 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.lang-marquee__track {
  display: inline-flex;
  gap: 16px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
}
.lang-marquee:hover .lang-marquee__track { animation-play-state: paused; }
.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 11px 20px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.lang-chip__flag { font-size: 1.3rem; }

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.tcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.tcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.quote-mark {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.4rem;
  line-height: 0.6;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.tcard blockquote { margin: 0 0 20px; font-size: 1rem; }
.tcard figcaption { display: flex; align-items: center; gap: 12px; }
.tcard figcaption span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.tcard figcaption strong { font-size: 0.95rem; }
.tcard figcaption em { font-style: normal; color: var(--text-muted); font-size: 0.84rem; }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--grad-cta);
}

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.plan:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.plan h3 { font-size: 1.4rem; margin-bottom: 6px; overflow-wrap: break-word; hyphens: auto; }
.plan__tag { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; flex: 1; }
.plan__btn { width: 100%; }
.plan--featured {
  border: 0;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-cta) border-box;
  border: 2px solid transparent;
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-md);
}
.plan--featured:hover { transform: translateY(-12px) scale(1.02); }
.plan__badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--grad-cta);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  box-shadow: var(--glow);
  white-space: nowrap;
  animation: badgeGlow 2.4s var(--ease-soft) infinite;
}
.plan__badge--soft {
  background: var(--bg-alt);
  color: var(--primary-deep);
  box-shadow: none;
  animation: none;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 6px 18px rgba(108, 92, 231, 0.35); }
  50% { box-shadow: 0 10px 30px rgba(108, 92, 231, 0.6); }
}
.plans__note { text-align: center; color: var(--text-muted); margin-top: 26px; font-size: 0.92rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px 22px;
  box-shadow: var(--shadow-sm);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__a { overflow: hidden; }
.faq__a p { color: var(--text-muted); padding: 0 0 20px; }
.faq__item[open] .faq__a p { animation: faqIn 0.4s var(--ease-out); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- CTA band ---------- */
.cta-band { padding: 90px 0; }
.cta-band__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  border-radius: var(--r-lg);
  background: var(--grad-hero);
  color: #fff;
  text-align: center;
  padding: 64px 28px 70px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-band__mesh { position: absolute; inset: 0; opacity: 0.5; }
.cta-band__mesh .blob--1 { width: 360px; height: 360px; background: #A78BFA; top: -120px; inset-inline-start: -60px; }
.cta-band__mesh .blob--2 { width: 320px; height: 320px; background: #4338CA; bottom: -120px; inset-inline-end: -40px; }
.cta-band__inner h2 { position: relative; font-size: clamp(1.9rem, 4vw, 3rem); max-width: 720px; margin: 0 auto; }
.cta-band__inner p { position: relative; margin: 16px auto 0; max-width: 540px; color: rgba(255, 255, 255, 0.9); }
.cta-band__badges { position: relative; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #0f0a24;
  color: #fff;
  border-radius: 14px;
  padding: 11px 20px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.store-badge:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.3); }
/* Google Play "coming soon" — button reset + dimmed state + pill */
button.store-badge { font-family: inherit; cursor: pointer; }
.store-badge--soon { position: relative; opacity: 0.62; }
.store-badge--soon:hover { transform: translateY(-3px); opacity: 0.78; box-shadow: 0 14px 30px rgba(0,0,0,0.25); }
.store-badge__soon {
  position: absolute;
  top: -9px; inset-inline-end: -8px;
  background: var(--grad-cta);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }
[data-theme="dark"] .toast { background: #2a2350; border: 1px solid var(--line); }
.store-badge small { display: block; font-size: 0.64rem; opacity: 0.8; }
.store-badge strong { display: block; font-size: 1.02rem; font-family: "Space Grotesk", sans-serif; }
.store-badge__logo {
  width: 24px; height: 24px;
  background:  no-repeat center / contain;
  -webkit-mask: no-repeat center / contain;
}
.store-badge__logo {
  background: #fff;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 1.4c.1 1-.3 2-.9 2.7-.7.8-1.7 1.4-2.7 1.3-.1-1 .4-2 .9-2.6.7-.8 1.8-1.3 2.7-1.4zM19.7 16.9c-.5 1.1-.7 1.6-1.3 2.6-.9 1.4-2.2 3.1-3.7 3.1-1.4 0-1.7-.9-3.6-.9s-2.3.9-3.6.9c-1.5 0-2.7-1.6-3.6-2.9C1 16.5.8 12 2.4 9.6c1.1-1.7 2.9-2.7 4.5-2.7 1.7 0 2.7 1 4.1 1 1.3 0 2.1-1 4.1-1 1.4 0 3 .8 4 2.1-3.6 2-3 7.1.6 7.9z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 1.4c.1 1-.3 2-.9 2.7-.7.8-1.7 1.4-2.7 1.3-.1-1 .4-2 .9-2.6.7-.8 1.8-1.3 2.7-1.4zM19.7 16.9c-.5 1.1-.7 1.6-1.3 2.6-.9 1.4-2.2 3.1-3.7 3.1-1.4 0-1.7-.9-3.6-.9s-2.3.9-3.6.9c-1.5 0-2.7-1.6-3.6-2.9C1 16.5.8 12 2.4 9.6c1.1-1.7 2.9-2.7 4.5-2.7 1.7 0 2.7 1 4.1 1 1.3 0 2.1-1 4.1-1 1.4 0 3 .8 4 2.1-3.6 2-3 7.1.6 7.9z'/%3E%3C/svg%3E");
}
.store-badge__logo--play {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 2.3v19.4c0 .5.5.8.9.6l11-9.7-11-9.7c-.4-.4-.9 0-.9.4zm13.6 7.7L6.8 1.5l11.9 6.8-2.1 1.7zm0 4-2.1 1.7 11.9 6.8-9.8-8.5zM18.8 12l3.4-1.9c.7-.4.7-1.4 0-1.8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 2.3v19.4c0 .5.5.8.9.6l11-9.7-11-9.7c-.4-.4-.9 0-.9.4z'/%3E%3C/svg%3E");
}

/* ---------- Footer ---------- */
.footer { padding: 70px 0 30px; background: var(--bg-alt); }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.footer__brand p { color: var(--text-muted); margin-top: 14px; max-width: 320px; font-size: 0.95rem; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.footer__col a { color: var(--text); font-size: 0.95rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--primary-deep); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 14px;
}
.to-top {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary-deep);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.to-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

/* =====================================================================
   RTL
   ===================================================================== */
[dir="rtl"] body { font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] .marquee__track,
[dir="rtl"] .lang-marquee__track { animation-direction: reverse; }
[dir="rtl"] .nav__links a::after { left: auto; right: 0; }
[dir="rtl"] .bubble--ai { border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
[dir="rtl"] .bubble--me { border-bottom-right-radius: 16px; border-bottom-left-radius: 5px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 940px) {
  .nav__links, .nav__actions .btn { display: none; }
  .nav__burger { display: flex; }
  .nav--open {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
  }
  .nav--open .nav__links {
    display: flex;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 18px 24px 24px;
  }
  .nav--open .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }

  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero__title { margin-inline: auto; }
  .hero__subtitle { margin-inline: auto; }
  .hero__cta, .hero__proof { justify-content: center; }
  .hero__visual { order: -1; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .fcard--wide { grid-column: span 2; }
  .bento { grid-template-columns: 1fr 1fr; }
  .testimonials { grid-template-columns: 1fr; max-width: 540px; margin: 0 auto; }
  .plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-5px); }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps__line { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .section { padding: 64px 0; }
  .hero__cta { flex-direction: column; gap: 12px; }
  .hero__cta .btn { width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .fcard--wide { grid-column: span 1; }
  .bento { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .float-card--xp { inset-inline-end: -10px; }
  .float-card--streak { inset-inline-start: -10px; }
  .float-card--score { inset-inline-start: -6px; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-band__inner { padding: 48px 20px 54px; }
}

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