/* ==========================================================================
   Lexio — "Obsidian Luxe / Premium Dark" Theme
   High-performance, modern stylesheet for Lexio Landing Page
   ========================================================================== */

:root {
  /* Color Tokens matching React Native Obsidian Luxe Theme */
  --bg-deep: #050509;
  --bg-main: #08080f;
  --bg-surface: #0e0e18;
  --bg-card: rgba(16, 16, 26, 0.72);
  --bg-card-hover: rgba(24, 24, 40, 0.88);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-glow-violet: rgba(139, 92, 246, 0.35);
  --border-glow-cyan: rgba(34, 211, 238, 0.3);

  /* Accents */
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #6d28d9;
  --primary-glow: rgba(139, 92, 246, 0.35);

  --secondary: #06b6d4;
  --secondary-light: #22d3ee;
  --secondary-glow: rgba(6, 182, 212, 0.35);

  --accent-gold: #f59e0b;
  --accent-gold-light: #fcd34d;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);

  --success: #10b981;
  --success-light: #34d399;

  /* Typography */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: 
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 90% 25%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 70%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
    var(--bg-main);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 8, 15, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--trans-smooth);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--trans-fast);
}

.nav-link:hover {
  color: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--trans-smooth);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.55);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border-color: var(--border-medium);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-playstore {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 22px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all var(--trans-smooth);
}

.btn-playstore:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
}

.btn-playstore-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-playstore-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.btn-playstore-text .sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.btn-playstore-text .main {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-large {
  padding: 15px 30px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--secondary-light);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-gold-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Hero Section */
.hero-section {
  padding: 70px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-badge-wrap {
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.4rem;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, var(--primary-light) 65%, var(--secondary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.18rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 34px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero Phone Mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup-wrapper {
  position: relative;
  width: 320px;
  height: 640px;
  background: #000;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(139, 92, 246, 0.25),
    inset 0 0 0 2px rgba(255, 255, 255, 0.15);
  border: 4px solid #1a1a28;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg-deep);
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 20px;
  background: #000;
  border-radius: 12px;
  z-index: 10;
}

/* Floating Mascot */
.floating-mascot {
  position: absolute;
  bottom: -20px;
  right: -35px;
  width: 170px;
  z-index: 5;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
  animation: floatMascot 4s ease-in-out infinite alternate;
}

@keyframes floatMascot {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(3deg); }
}

.floating-card-badge {
  position: absolute;
  top: 15%;
  left: -40px;
  z-index: 6;
  background: rgba(14, 14, 24, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: floatCard 4.5s ease-in-out infinite alternate 0.5s;
}

@keyframes floatCard {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-10px); }
}

.floating-card-badge .icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  display: grid;
  place-items: center;
  color: var(--accent-gold);
}

.floating-card-badge .fc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.floating-card-badge .fc-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.section-tag {
  margin-bottom: 14px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.08rem;
  color: var(--text-secondary);
}

/* Feature Cards Grid */
.features-section {
  padding: 90px 0;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
  transition: all var(--trans-smooth);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
  opacity: 0;
  transition: opacity var(--trans-smooth);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.15);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 22px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--primary-light);
}

.feature-card.cyan .feature-icon-box {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
  color: var(--secondary-light);
}

.feature-card.gold .feature-icon-box {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--accent-gold-light);
}

.feature-card.emerald .feature-icon-box {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--success-light);
}

.feature-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.feature-card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Interactive Demo Section */
.demo-section {
  padding: 80px 0;
}

.demo-card {
  background: linear-gradient(180deg, rgba(18, 18, 30, 0.85) 0%, rgba(10, 10, 18, 0.95) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.demo-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.demo-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.demo-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.demo-tab-btn.active {
  background: rgba(139, 92, 246, 0.18);
  color: var(--primary-light);
  border-color: rgba(139, 92, 246, 0.4);
}

.demo-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.flashcard-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  text-align: center;
  position: relative;
}

.flashcard-badge {
  font-size: 0.72rem;
  color: var(--secondary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 16px;
}

.flashcard-phrase {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.flashcard-phonetic {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.flashcard-trans {
  font-size: 1.25rem;
  color: var(--primary-light);
  font-weight: 600;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.flashcard-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.audio-play-btn {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.audio-play-btn:hover {
  background: var(--primary);
  transform: scale(1.08);
}

.audio-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.waveform-bar {
  width: 3px;
  height: 10px;
  background: var(--primary-light);
  border-radius: 2px;
  animation: pulseWave 1.2s infinite ease-in-out alternate;
}

.waveform-bar:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.waveform-bar:nth-child(3) { animation-delay: 0.4s; height: 14px; }
.waveform-bar:nth-child(4) { animation-delay: 0.1s; height: 22px; }
.waveform-bar:nth-child(5) { animation-delay: 0.3s; height: 12px; }

@keyframes pulseWave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* Stories & Community Deep Dive */
.deep-dive-section {
  padding: 90px 0;
}

.dive-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  margin-bottom: 90px;
}

.dive-row.reverse {
  direction: rtl;
}

.dive-row.reverse > * {
  direction: ltr;
}

.dive-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.dive-card-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 440px;
}

.dive-card-preview img {
  width: 100%;
  display: block;
}

/* FAQ Section */
.faq-section {
  padding: 80px 0 100px;
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--trans-fast);
}

.faq-item.active {
  border-color: var(--border-glow-violet);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 22px 26px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question svg {
  transition: transform var(--trans-smooth);
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--primary-light);
}

.faq-answer {
  padding: 0 26px 22px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Download CTA Banner */
.cta-banner {
  padding: 70px 0;
  position: relative;
}

.cta-box {
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.28) 0%, rgba(14, 14, 24, 0.95) 75%);
  border: 1px solid var(--border-glow-violet);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.cta-box .mascot-bg {
  position: absolute;
  bottom: -15px;
  right: 20px;
  width: 140px;
  opacity: 0.25;
  pointer-events: none;
}

.cta-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-deep);
  padding: 70px 0 40px;
  margin-top: 60px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 16px 0 20px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--trans-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 16px;
}

/* Document / Legal Pages */
.legal-page {
  padding: 60px 0 100px;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.legal-content {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 44px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-light);
  margin: 28px 0 12px;
}

.legal-content p {
  margin-bottom: 18px;
}

.legal-content ul, .legal-content ol {
  margin: 0 0 20px 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.legal-content th, .legal-content td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border-subtle);
}

.legal-content th {
  background: var(--bg-surface);
  color: #fff;
  font-weight: 600;
}

.legal-content tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin: 0 auto 34px;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-metrics {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .demo-content-grid {
    grid-template-columns: 1fr;
  }
  .dive-row {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .dive-row.reverse {
    direction: ltr;
  }
  .dive-visual {
    order: -1;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px;
    left: 0;
    width: 100%;
    background: var(--bg-deep);
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 18px;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .floating-mascot {
    width: 130px;
    right: -10px;
  }
  .floating-card-badge {
    left: 10px;
    top: 10px;
  }
}


/* App Screen Gallery */
.gallery-section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transition: all var(--trans-smooth);
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow-violet);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.2);
}

.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.gallery-item-caption {
  padding: 16px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.gallery-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}

.gallery-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Interactive Preview Lessons Component
   ========================================================================== */

.mode-switch-tabs {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.mode-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--trans-smooth);
}

.mode-tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35) 0%, rgba(109, 40, 217, 0.45) 100%);
  color: #fff;
  border-color: var(--primary-light);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.35);
}

.lesson-player-wrapper {
  background: radial-gradient(circle at 50% 10%, #16152b 0%, #0a0a14 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.lesson-selector-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 18px;
}

.lesson-picker-btns {
  display: flex;
  gap: 10px;
}

.lesson-picker-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.lesson-picker-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.lesson-picker-btn.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-light);
  border-color: rgba(139, 92, 246, 0.5);
}

.lesson-meta-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.lesson-meta-stats .stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.lesson-progress-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 28px;
}

.lesson-progress-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary-light) 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.lesson-prompt-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 26px;
  position: relative;
}

.lesson-question-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--secondary-light);
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 12px;
}

.lesson-phrase-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.lesson-phrase-text {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.lesson-speaker-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

.lesson-speaker-btn:hover {
  background: var(--primary);
  transform: scale(1.08);
}

.lesson-speaker-btn.pulsing {
  animation: pulseButton 0.8s infinite alternate;
}

@keyframes pulseButton {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(139, 92, 246, 0); }
  100% { transform: scale(1.1); box-shadow: 0 0 20px rgba(139, 92, 246, 0.6); }
}

.lesson-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 26px;
}

.lesson-opt-btn {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 14px;
}

.lesson-opt-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.lesson-opt-btn .opt-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.lesson-opt-btn.correct {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: var(--success-light) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.lesson-opt-btn.correct .opt-badge {
  background: var(--success);
  color: #fff;
}

.lesson-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: var(--error) !important;
  color: #fff !important;
  animation: shake 0.4s ease-in-out;
}

.lesson-opt-btn.wrong .opt-badge {
  background: var(--error);
  color: #fff;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.lesson-feedback-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: 10px;
  display: none;
}

.lesson-feedback-bar.show {
  display: flex;
}

.lesson-feedback-bar.correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--success-light);
}

.lesson-feedback-bar.wrong {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.lesson-next-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.lesson-next-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Completion Card */
.lesson-complete-card {
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.lesson-complete-card.show {
  display: block;
}

.complete-mascot {
  width: 120px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 15px 30px rgba(139, 92, 246, 0.4));
  animation: floatMascot 3s ease-in-out infinite alternate;
}

.complete-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.complete-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.complete-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.complete-stat-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px 28px;
}

.complete-stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-gold-light);
}

.complete-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .lesson-options-grid {
    grid-template-columns: 1fr;
  }
  .lesson-phrase-text {
    font-size: 1.6rem;
  }
  .lesson-player-wrapper {
    padding: 24px 18px;
  }
}

/* ==========================================================================
   UI Vector Icons & Flag Badges
   ========================================================================== */
.ui-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-star {
  color: var(--accent-gold);
}

.icon-flame {
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
}

.icon-zap {
  color: var(--secondary-light);
}

.icon-sparkle {
  color: var(--primary-light);
}

.icon-check {
  display: inline-block;
  vertical-align: middle;
}

.flag-icon {
  display: inline-block;
  vertical-align: middle;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* ==========================================================================
   Language Selector Dropdown (Navbar & Mobile)
   ========================================================================== */
.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-dropdown-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.lang-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  color: #fff;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 175px;
  background: #12121e;
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.lang-dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.2s ease;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--trans-fast);
}

.lang-item:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #fff;
}

.lang-item.active {
  background: rgba(139, 92, 246, 0.25);
  color: var(--primary-light);
  font-weight: 700;
}

/* Mobile Language Selector in drawer */
.mobile-lang-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: none;
  flex-direction: column;
  gap: 10px;
}

.mobile-lang-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mobile-lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--trans-fast);
}

.mobile-lang-pill:hover,
.mobile-lang-pill.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--primary-light);
  color: #fff;
}

@media (max-width: 900px) {
  .mobile-lang-row {
    display: flex;
  }
}

/* ==========================================================================
   Arabic (RTL) Layout Support
   ========================================================================== */
[dir="rtl"] {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle,
[dir="rtl"] .section-desc,
[dir="rtl"] .dive-text,
[dir="rtl"] .feature-card-text,
[dir="rtl"] .footer-brand-desc {
  text-align: right;
}

[dir="rtl"] .hero-actions {
  justify-content: flex-start;
}

[dir="rtl"] .lang-dropdown-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .lesson-opt-btn {
  text-align: right;
}

[dir="rtl"] .faq-question {
  text-align: right;
}

[dir="rtl"] .footer-top {
  text-align: right;
}

[dir="rtl"] .footer-links {
  text-align: right;
}



/* ─── Lexio In-App Achievement Toast & Celebration ───────────────────────── */
.celebration-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.ach-toast-wrapper {
  position: relative;
  max-width: 480px;
  width: 100%;
  margin: 0 auto 24px;
  perspective: 1000px;
  z-index: 14;
}

.ach-toast-halo {
  position: absolute;
  inset: -15px -20px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(245, 158, 11, 0.25) 45%, transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  border-radius: 30px;
  animation: haloBreathe 3s ease-in-out infinite alternate;
}

.ach-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(28, 16, 52, 0.95), rgba(13, 9, 28, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.55);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  text-align: left;
  animation: achEntrance 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[dir="rtl"] .ach-toast {
  text-align: right;
}

.ach-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.14) 45%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.14) 55%, transparent 80%);
  transform: translateX(-150%) skewX(-20deg);
  animation: achShineSweep 3.2s ease-in-out infinite 0.5s;
  pointer-events: none;
}

.ach-crest-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.ach-crest-ripple {
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(245, 158, 11, 0.6);
  border-radius: 50%;
  animation: crestRipple 2.2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.ach-crest-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 2;
}

.ach-crest-icon svg {
  width: 24px;
  height: 24px;
}

.ach-toast-info {
  flex: 1;
  min-width: 0;
}

.ach-toast-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.ach-sparkle-dot {
  color: #F59E0B;
  animation: sparkleTwinkle 1.8s ease-in-out infinite alternate;
}

.ach-toast-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ach-toast-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ach-reward-chip {
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #FBBF24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Failure Mode State */
.ach-toast.fail-mode {
  background: linear-gradient(135deg, rgba(46, 14, 22, 0.95), rgba(20, 8, 12, 0.98));
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ach-toast.fail-mode .ach-crest-icon {
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

.ach-toast.fail-mode .ach-crest-ripple {
  border-color: rgba(239, 68, 68, 0.5);
}

.ach-toast.fail-mode .ach-toast-eyebrow {
  color: #F87171;
}

.ach-toast.fail-mode .ach-sparkle-dot {
  color: #F87171;
}

.ach-toast.fail-mode .ach-reward-chip {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
  box-shadow: none;
}

/* Keyframes */
@keyframes achEntrance {
  0% {
    opacity: 0;
    transform: translateY(-24px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes haloBreathe {
  0% {
    opacity: 0.65;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes crestRipple {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes achShineSweep {
  0% {
    transform: translateX(-150%) skewX(-20deg);
  }
  45%, 100% {
    transform: translateX(250%) skewX(-20deg);
  }
}

@keyframes sparkleTwinkle {
  0% {
    opacity: 0.4;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@media (max-width: 540px) {
  .ach-toast {
    padding: 12px 14px;
    gap: 12px;
  }
  .ach-toast-title {
    font-size: 1rem;
  }
  .ach-toast-desc {
    font-size: 0.78rem;
  }
  .ach-reward-chip {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
}
