/* =============================================================================
   FORSOVA LUMA — PREMIUM REDESIGN STYLES
   Light + dark themes, glass/glow visual language, responsive layout,
   EN/AR + RTL support. Theme is driven by html[data-theme] which is set
   before first paint by the inline script in each page's <head>.
   ============================================================================ */

:root {
  color-scheme: light;

  /* Base surfaces + ink */
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f5;
  --ink: #11212a;
  --ink-soft: #35505e;
  --muted: #557383;
  --muted-2: #7c95a3;
  --line: rgba(17, 33, 42, 0.12);
  --line-2: rgba(17, 33, 42, 0.2);

  /* Brand */
  --accent: #0d9d65;
  --accent-2: #00b8d3;
  --accent-dark: #0a7f52;
  --accent-soft: #d6f8ea;
  --accent-ink: #0a7f52;
  --premium: #e97714;
  --premium-soft: #fff0de;
  --premium-ink: #9f4f07;
  --danger-soft: #ffe8e8;

  /* Component surfaces */
  --ico-bg: #ddf8ee;
  --input-bg: #ffffff;
  --card-veil: rgba(255, 255, 255, 0.78);
  --header-bg: rgba(244, 247, 248, 0.72);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-border: rgba(255, 255, 255, 0.55);
  --seg-active-bg: var(--ink);
  --seg-active-ink: #ffffff;
  --on-accent: #ffffff;

  /* Gradients + glows */
  --grad-brand: linear-gradient(130deg, #0d9d65, #05a56f 55%, #00b8d3);
  --glow-a: rgba(13, 157, 101, 0.18);
  --glow-b: rgba(0, 184, 211, 0.14);
  --grid-line: rgba(17, 33, 42, 0.03);
  --band-soft-a: rgba(255, 255, 255, 0.4);
  --band-soft-b: rgba(214, 244, 236, 0.85);

  /* Card surface details */
  --card-topline: rgba(255, 255, 255, 0.65);
  --card-grad: linear-gradient(180deg, #ffffff, #fbfdfd);

  /* Decorative data colors (macro bars) */
  --macro-protein: #0d9d65;
  --macro-carb: #00b8d3;
  --macro-fat: #e9a13c;

  /* Film-grain noise (kills gradient banding) */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");

  /* Elevation */
  --shadow-xs: 0 8px 24px -14px rgba(10, 30, 40, 0.28);
  --shadow-sm: 0 18px 50px -26px rgba(10, 30, 40, 0.32);
  --shadow: 0 28px 70px -32px rgba(10, 30, 40, 0.35);
  --glow-shadow: 0 30px 80px -30px rgba(13, 157, 101, 0.4);

  /* Shape + layout */
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --radius-xl: 36px;
  --maxw: 1160px;
  --ctrl-h: 48px;
  --header-h: clamp(62px, 8vw, 78px);

  --focus-color: rgba(13, 157, 101, 0.6);

  --font-latin: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Tajawal", "Sora", "Inter", system-ui, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1218;
  --surface: #121c24;
  --surface-2: #0e171e;
  --ink: #e9f2f4;
  --ink-soft: #b9cdd6;
  --muted: #8fa8b4;
  --muted-2: #6b8492;
  --line: rgba(233, 242, 244, 0.1);
  --line-2: rgba(233, 242, 244, 0.18);

  --accent: #1fc97f;
  --accent-2: #22d3ee;
  --accent-dark: #17a86a;
  --accent-soft: rgba(31, 201, 127, 0.14);
  --accent-ink: #3ee2a0;
  --premium-soft: rgba(233, 119, 20, 0.16);
  --premium-ink: #f0a35e;
  --danger-soft: rgba(255, 90, 90, 0.16);

  --ico-bg: rgba(31, 201, 127, 0.14);
  --input-bg: #0e171e;
  --card-veil: rgba(18, 28, 36, 0.62);
  --header-bg: rgba(11, 18, 24, 0.68);
  --glass: rgba(18, 28, 36, 0.55);
  --glass-strong: rgba(14, 22, 29, 0.92);
  --glass-border: rgba(233, 242, 244, 0.09);
  --seg-active-bg: var(--accent);
  --seg-active-ink: #06110c;

  --grad-brand: linear-gradient(130deg, #14b877, #10bd8d 55%, #22d3ee);
  --glow-a: rgba(31, 201, 127, 0.13);
  --glow-b: rgba(34, 211, 238, 0.09);
  --grid-line: rgba(233, 242, 244, 0.035);
  --band-soft-a: rgba(18, 28, 36, 0.35);
  --band-soft-b: rgba(16, 34, 32, 0.6);

  --card-topline: rgba(255, 255, 255, 0.07);
  --card-grad: linear-gradient(180deg, #16222b, #101a22);
  --macro-fat: #f0b45a;

  --shadow-xs: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 18px 50px -24px rgba(0, 0, 0, 0.55);
  --shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.6);
  --glow-shadow: 0 30px 90px -30px rgba(31, 201, 127, 0.3);

  --focus-color: rgba(62, 226, 160, 0.65);
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-latin);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(900px 500px at -10% 5%, var(--glow-b), transparent 60%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
  line-height: 1.9;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; overflow-wrap: break-word; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow-wrap: break-word;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 { letter-spacing: 0; }

body.lang-loading { opacity: 0; }
body { transition: opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 30px);
}

html[dir="rtl"] .rtl-flip { transform: scaleX(-1); }

/* Inline SVG icons */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* ---- Ambient background ------------------------------------------------- */
.bg-orb,
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.orb-a { background: radial-gradient(700px 420px at 80% 2%, var(--glow-a), transparent 60%); }
.orb-b { background: radial-gradient(620px 420px at 5% 18%, var(--glow-b), transparent 58%); }

.bg-grid {
  opacity: 0.35;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}

/* ---- Controls ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--ctrl-h);
  padding: 11px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: clamp(0.89rem, 1.7vw, 0.95rem);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  max-width: 100%;
  transition: transform 0.16s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: clamp(0.95rem, 2vw, 1rem); }

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--grad-brand);
  color: var(--on-accent);
  box-shadow: 0 14px 34px -14px rgba(13, 157, 101, 0.65);
}

.btn-primary:hover {
  box-shadow: 0 20px 42px -14px rgba(13, 157, 101, 0.7);
}

/* Gradient shine sweep on hover */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.4) 50%, transparent 68%);
  transform: translateX(-130%);
  pointer-events: none;
}

.btn-primary:hover::after {
  transform: translateX(130%);
  transition: transform 0.65s ease;
}

html[dir="rtl"] .btn-primary::after { transform: translateX(130%); }
html[dir="rtl"] .btn-primary:hover::after { transform: translateX(-130%); }

.hero-cta .btn-primary { animation: cta-breathe 3.6s ease-in-out infinite; }

@keyframes cta-breathe {
  0%, 100% { box-shadow: 0 14px 34px -14px rgba(13, 157, 101, 0.65); }
  50% { box-shadow: 0 18px 44px -12px rgba(13, 157, 101, 0.85), 0 0 24px -6px rgba(0, 184, 211, 0.35); }
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ctrl-h);
  height: var(--ctrl-h);
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.16s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Theme toggle: shows moon in light mode, sun in dark mode */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.98rem, 2.1vw, 1.05rem);
  font-weight: 800;
  flex: 0 0 auto;
}

.brand img { height: clamp(30px, 5vw, 38px); width: auto; }
.brand span { white-space: nowrap; }

.nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }

.nav-links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease;
  white-space: nowrap;
  padding: 6px 2px;
  border-radius: 6px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transition: width 0.2s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: clamp(8px, 1.5vw, 12px); flex: 0 0 auto; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: var(--ctrl-h);
  padding: 4px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  gap: 3px;
}

.lang-opt {
  min-width: 40px;
  height: 100%;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-opt.active {
  background: var(--seg-active-bg);
  color: var(--seg-active-ink);
}

.menu-toggle { display: none; border-radius: 14px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-bars { display: none; }

/* ---- Mobile menu panel --------------------------------------------------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  padding: clamp(18px, 4vw, 28px);
  background: var(--glass-strong);
  border-top: 1px solid var(--line);
  overflow-y: auto;
  flex-direction: column;
  gap: 18px;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .mobile-menu {
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
  }
}

body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { display: flex; }

.mobile-links {
  display: grid;
  gap: 2px;
}

.mobile-links a {
  padding: 15px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  border-radius: 8px;
}

.mobile-links a:last-child { border-bottom: none; }

.mobile-menu .btn { width: 100%; }

.mobile-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

/* ---- Shared section rhythm --------------------------------------------- */
section { padding: clamp(56px, 8vw, 96px) 0; }
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(28px, 4vw, 44px);
}

.section-head h2 {
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--muted);
  font-size: clamp(0.98rem, 2.3vw, 1.08rem);
}

.kicker,
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: clamp(0.73rem, 1.8vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.kicker.gold { background: var(--premium-soft); color: var(--premium-ink); }

/* Eyebrow: quieter alternative to the pill kicker */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
}

html[lang="ar"] .eyebrow { letter-spacing: 0; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(36px, 6vw, 76px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -18% -12% auto auto;
  width: min(880px, 92vw);
  height: min(820px, 92vw);
  border-radius: 50%;
  background:
    conic-gradient(from 210deg at 62% 38%,
      transparent 0deg,
      color-mix(in srgb, var(--accent) 22%, transparent) 70deg,
      color-mix(in srgb, var(--accent-2) 20%, transparent) 150deg,
      transparent 240deg),
    radial-gradient(closest-side at 30% 70%, var(--glow-b), transparent 70%),
    radial-gradient(closest-side at 70% 30%, var(--glow-a), transparent 65%);
  filter: blur(48px) saturate(1.15);
  pointer-events: none;
  z-index: -1;
}

html[dir="rtl"] .hero::before {
  inset: -18% auto auto -12%;
  background:
    conic-gradient(from 150deg at 38% 38%,
      transparent 0deg,
      color-mix(in srgb, var(--accent-2) 20%, transparent) 70deg,
      color-mix(in srgb, var(--accent) 22%, transparent) 150deg,
      transparent 240deg),
    radial-gradient(closest-side at 70% 70%, var(--glow-b), transparent 70%),
    radial-gradient(closest-side at 30% 30%, var(--glow-a), transparent 65%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  background-size: 160px 160px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -1;
}

html[data-theme="dark"] .hero::after { opacity: 0.08; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
}

.hero-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--accent-ink);
  box-shadow: var(--shadow-xs);
}

.hero-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6.8vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

html[lang="ar"] .hero h1 { line-height: 1.28; letter-spacing: 0; }

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero h1 {
    background: linear-gradient(115deg, var(--ink) 0%, var(--ink) 52%, var(--accent) 82%, var(--accent-2) 105%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  html[dir="rtl"] .hero h1 {
    background: linear-gradient(245deg, var(--ink) 0%, var(--ink) 52%, var(--accent) 82%, var(--accent-2) 105%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.hero-lead {
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.4vw, 1.14rem);
  max-width: 620px;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.hero-meta .icon { color: var(--accent); }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

/* Floating glass stat chips around the phone */
.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--card-topline);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  z-index: 3;
  animation: chip-float 7s ease-in-out infinite;
  will-change: transform;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .float-chip {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

.float-chip .icon { width: 18px; height: 18px; color: var(--accent-ink); }
.float-chip .chip-num { letter-spacing: -0.02em; }
.float-chip .chip-label { color: var(--muted); font-weight: 600; font-size: 0.76rem; }

.chip-kcal  { top: 12%; inset-inline-end: -5%; }
.chip-water { top: 58%; inset-inline-start: -7%; animation-duration: 8.5s; animation-delay: -2.4s; }
.chip-ai    { bottom: 5%; inset-inline-end: -1%; animation-duration: 6.2s; animation-delay: -3.8s; }
.chip-water .icon { color: var(--accent-2); }
.chip-ai .icon { color: var(--premium); }

.chip-ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: conic-gradient(var(--accent) 0 74%,
    color-mix(in srgb, var(--accent) 18%, transparent) 74% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent 56%, #000 60%);
  mask: radial-gradient(farthest-side, transparent 56%, #000 60%);
}

@keyframes chip-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* Phone mockup frame */
.hero-frame {
  position: relative;
  width: min(370px, 84%);
  border-radius: var(--radius-xl);
  padding: 12px;
  background: linear-gradient(160deg, #22323c, #0c141a 70%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    var(--shadow),
    var(--glow-shadow);
  transform-style: preserve-3d;
}

.hero-frame::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 24px;
  border-radius: 14px;
  background: #0c141a;
  z-index: 2;
}

.hero-image {
  width: 100%;
  border-radius: calc(var(--radius-xl) - 10px);
  transition: transform 0.18s ease-out;
}

html[data-theme="dark"] .hero-image { filter: brightness(0.94) contrast(1.02); }

.proof-strip {
  margin-top: clamp(26px, 5vw, 40px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-radius: var(--radius);
  background: var(--card-veil);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xs), inset 0 1px 0 var(--card-topline);
  overflow: hidden;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .proof-strip {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.proof-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
}

.proof-card + .proof-card { border-inline-start: 1px solid var(--line); }

.proof-ico {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.proof-card h3 {
  font-size: 0.96rem;
  margin-bottom: 4px;
}

.proof-card p {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---- Cards and grids ---------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 22px);
}

.card {
  position: relative;
  background: var(--card-grad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-xs), inset 0 1px 0 var(--card-topline);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 55%, transparent),
      color-mix(in srgb, var(--accent-2) 45%, transparent)) border-box;
  box-shadow: var(--shadow-sm), 0 12px 40px -18px var(--glow-a);
}

.card .ico {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--ico-bg), var(--ico-bg)) padding-box,
    var(--grad-brand) border-box;
  color: var(--accent-ink);
  margin-bottom: 16px;
}

.card:hover .ico { animation: ico-pop 0.45s ease; }

@keyframes ico-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12) rotate(-3deg); }
  100% { transform: scale(1); }
}

.card .ico .icon { width: 24px; height: 24px; }

.card h3 {
  font-size: clamp(1.02rem, 2.3vw, 1.16rem);
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: clamp(0.9rem, 2vw, 0.97rem);
}

/* ---- Bento features grid ------------------------------------------------- */
.feature-grid.bento { grid-template-columns: repeat(4, 1fr); }

.bento .card-lg {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
}

.bento .card-lg > p { margin-bottom: 18px; }

.macro-bars {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.macro-bars .bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 18%, transparent);
  position: relative;
  overflow: hidden;
}

.macro-bars .bar::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: inherit;
}

.bar-p::after { width: 72%; background: linear-gradient(90deg, var(--macro-protein), color-mix(in srgb, var(--macro-protein) 60%, #fff)); }
.bar-c::after { width: 48%; background: var(--macro-carb); }
.bar-f::after { width: 60%; background: var(--macro-fat); }
html[dir="rtl"] .bar-p::after { background: linear-gradient(270deg, var(--macro-protein), color-mix(in srgb, var(--macro-protein) 60%, #fff)); }

.card-lg .spark {
  margin-top: auto;
  width: 100%;
  height: 56px;
  opacity: 0.9;
}

html[dir="rtl"] .card-lg .spark { transform: scaleX(-1); }

/* ---- AI membership band: always dark ------------------------------------- */
.ai-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 82% 0%, rgba(233, 119, 20, 0.13), transparent 55%),
    radial-gradient(80% 110% at 12% 100%, rgba(13, 157, 101, 0.2), transparent 60%),
    linear-gradient(180deg, #0b161d 0%, #0c1d1a 100%);
}

html[data-theme="dark"] .ai-section {
  background:
    radial-gradient(90% 120% at 82% 0%, rgba(233, 119, 20, 0.18), transparent 55%),
    radial-gradient(80% 110% at 12% 100%, rgba(31, 201, 127, 0.22), transparent 60%),
    linear-gradient(180deg, #070f14 0%, #091712 100%);
}

.ai-section::before,
.ai-section::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(233, 119, 20, 0.5), rgba(0, 184, 211, 0.4), transparent);
}

.ai-section::before { top: 0; }
.ai-section::after { bottom: 0; }

.ai-section .section-head h2 { color: #eef6f4; }
.ai-section .section-head p { color: #9fb6bf; }

.ai-section .kicker.gold {
  background: rgba(233, 119, 20, 0.16);
  color: #f2b26b;
  border: 1px solid rgba(233, 119, 20, 0.3);
}

.ai-section .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 50px -26px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-section .card h3 { color: #f3eee5; }
.ai-section .card p { color: #a9bac1; }

.ai-section .card:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)) padding-box,
    linear-gradient(135deg, rgba(233, 119, 20, 0.6), rgba(0, 184, 211, 0.4)) border-box;
  border-color: transparent;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65), 0 0 40px -14px rgba(233, 119, 20, 0.3);
}

.gold-card .ico {
  background:
    linear-gradient(rgba(233, 119, 20, 0.14), rgba(233, 119, 20, 0.14)) padding-box,
    linear-gradient(135deg, #e97714, rgba(233, 119, 20, 0.2)) border-box;
  color: #f4b26a;
}

/* The AI section holds 4 cards — 2×2 reads better than a 3-col orphan */
.ai-section .feature-grid { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin-inline: auto; }

/* ---- Pricing ------------------------------------------------------------ */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto clamp(24px, 4vw, 34px);
}

.billing-switch {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  padding: 5px;
  gap: 3px;
}

.bill-opt {
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bill-opt.active {
  background: var(--seg-active-bg);
  color: var(--seg-active-ink);
}

.bill-save {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--premium-soft);
  color: var(--premium-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  align-items: stretch;
}

.plan {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Recommended plan: gradient keyline + breathing ambient glow */
.plan.recommended {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-brand) border-box;
  box-shadow: var(--shadow-sm), var(--glow-shadow);
  animation: plan-glow 4.5s ease-in-out infinite;
}

@keyframes plan-glow {
  0%, 100% { box-shadow: var(--shadow-sm), 0 30px 80px -30px rgba(13, 157, 101, 0.4); }
  50% { box-shadow: var(--shadow-sm), 0 30px 90px -26px rgba(13, 157, 101, 0.6), 0 0 30px -8px rgba(0, 184, 211, 0.25); }
}

.plan-badge {
  position: absolute;
  top: -14px;
  inset-inline-start: 24px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--grad-brand);
  color: var(--on-accent);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.plan-head h3 { font-size: clamp(1.2rem, 2.8vw, 1.4rem); margin-bottom: 6px; }
.plan .tagline { color: var(--muted); font-size: 0.9rem; }

.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }

.price-line .amount {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.plan.recommended .price-line .amount {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.price-line .period { font-size: 0.9rem; color: var(--muted); }

.price-sub { font-size: 0.84rem; color: var(--accent-ink); font-weight: 600; margin-top: -6px; }
.plan-credits { font-size: 0.95rem; color: var(--ink); font-weight: 700; }

.plan-includes { margin-top: auto; }

.includes-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}

html[lang="ar"] .includes-title { letter-spacing: 0; }

.plan-list {
  list-style: none;
  display: grid;
  gap: 9px;
}

.plan-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.plan-list .icon { width: 17px; height: 17px; color: var(--accent); flex: 0 0 auto; }

.compare-wrap {
  margin-top: clamp(28px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: clamp(16px, 3vw, 24px);
}

.compare-wrap h3 {
  font-size: clamp(1.15rem, 2.8vw, 1.36rem);
  margin-bottom: 14px;
}

.table-scroll { overflow-x: auto; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.compare-table th,
.compare-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: start;
  font-size: 0.9rem;
}

.compare-table thead th {
  color: var(--ink);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-table tbody tr:last-child td { border-bottom: none; }

/* ---- Credits ------------------------------------------------------------ */
.credits-section {
  position: relative;
  background: linear-gradient(180deg, var(--band-soft-a), var(--band-soft-b));
}

.credits-section::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
}

.credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 20px);
}

.credits-rules { display: flex; align-items: center; }

.credits-rules ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.credits-rules li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--ink-soft);
  font-weight: 600;
}

.credits-rules li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
}

.estimator h3 { font-size: 1.2rem; margin-bottom: 12px; }

.estimator label {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.estimator label span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.estimator input {
  width: 100%;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: var(--input-bg);
  padding: 11px 12px;
  font-size: 0.95rem;
  color: var(--ink);
  font-family: inherit;
}

.estimator input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-a);
}

.estimate-result {
  margin-top: 8px;
  border-top: 1px dashed var(--line-2);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.estimate-result p { font-size: 0.9rem; color: var(--ink-soft); }

[data-estimator-plan] {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.estimate-result.has-plan [data-estimator-plan] {
  background: var(--grad-brand);
  color: var(--on-accent);
}

.estimator-tip {
  margin-top: 12px;
  border-top: 1px dashed var(--line-2);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.estimator-tip .tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.estimator-tip p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq-section { background: var(--surface-2); }

.faq-list {
  max-width: 840px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .faq-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.faq-item summary .faq-ico .icon { width: 14px; height: 14px; }

.faq-item[open] summary .faq-ico { transform: rotate(45deg); }

.faq-item > p {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Smooth accordion where supported; instant elsewhere */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

@supports selector(::details-content) {
  .faq-item::details-content {
    opacity: 0;
    block-size: 0;
    overflow: hidden;
    transition: content-visibility 0.3s allow-discrete, opacity 0.3s ease, block-size 0.3s ease;
  }

  .faq-item[open]::details-content {
    opacity: 1;
    block-size: auto;
  }
}

/* ---- Download ----------------------------------------------------------- */
.download-page { padding-top: clamp(44px, 7vw, 90px); }

.download-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(34px, 6vw, 62px) clamp(20px, 4vw, 38px);
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(0, 184, 211, 0.3), transparent 55%),
    radial-gradient(100% 130% at 8% 105%, rgba(13, 157, 101, 0.42), transparent 60%),
    conic-gradient(from 205deg at 50% -30%, rgba(255, 255, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #0b1a22 0%, #0d2430 100%);
  color: #f2fbff;
  box-shadow:
    0 34px 70px -30px rgba(8, 18, 24, 0.52),
    0 0 60px -20px rgba(0, 184, 211, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  background-size: 160px 160px;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Decorative phone-outline echo */
.download-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  bottom: -60px;
  width: 220px;
  height: 300px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 40px;
  transform: rotate(14deg);
  pointer-events: none;
}

html[dir="rtl"] .download-card::after {
  inset-inline-end: auto;
  inset-inline-start: -40px;
  transform: rotate(-14deg);
}

.download-card .kicker {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.download-card h2 {
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 10px;
}

.download-card > p {
  color: rgba(242, 251, 255, 0.9);
  max-width: 620px;
  margin: 0 auto 24px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  position: relative;
}

/* Both store badges are official self-contained artwork — no extra frame. */
.store-badges a {
  display: inline-flex;
  transition: transform 0.16s ease;
}

.store-badges a:hover { transform: translateY(-3px); }
.store-badges img { height: clamp(48px, 8vw, 56px); width: auto; }

.download-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(242, 251, 255, 0.86);
  font-size: 0.88rem;
  flex-wrap: wrap;
  position: relative;
}

.platform-grid {
  margin: clamp(26px, 4vw, 40px) auto 0;
  max-width: 780px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 18px);
}

.platform-card h3 { font-size: 1.15rem; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--card-veil);
  padding: clamp(40px, 5vw, 54px) 0 28px;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--accent), var(--accent-2), transparent 95%);
  opacity: 0.5;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(20px, 3.5vw, 34px);
  margin-bottom: 26px;
}

.footer-brand {
  max-width: 360px;
  min-width: 240px;
}

.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; }

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-col a { color: var(--muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent-ink); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.84rem;
}

/* ---- Reveal --------------------------------------------------------------
   Uses the translate/scale properties (not transform) so it composes with
   the recommended plan's transform: scale() and the hero tilt transforms. */
.reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.55s ease, translate 0.55s ease, scale 0.55s ease;
}

.card.reveal,
.plan.reveal {
  translate: 0 16px;
  scale: 0.965;
}

.reveal.in {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

/* ---- Legal pages -------------------------------------------------------- */
.legal-page { padding: clamp(30px, 5vw, 56px) 0 clamp(44px, 6vw, 66px); }
.legal-container { max-width: 860px; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: clamp(16px, 2.8vw, 24px);
}

.legal-back:hover { color: var(--accent-ink); }

.legal-page h1 {
  font-size: clamp(1.85rem, 5vw, 2.8rem);
  margin-bottom: 10px;
}

.legal-updated {
  color: var(--muted-2);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 clamp(22px, 3.6vw, 34px);
  padding-bottom: clamp(16px, 2.8vw, 22px);
  border-bottom: 1px solid var(--line);
}

.legal-section {
  margin-bottom: clamp(16px, 2.6vw, 24px);
  padding: clamp(16px, 3vw, 22px);
  background: var(--card-veil);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.legal-section h2 {
  font-size: clamp(1.12rem, 2.8vw, 1.34rem);
  margin-bottom: 10px;
}

.legal-section p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 12px;
  line-height: 1.78;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-list {
  list-style: none;
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
  padding-inline-start: 2px;
}

.legal-list li {
  position: relative;
  color: var(--ink-soft);
  padding-inline-start: 20px;
  line-height: 1.75;
}

.legal-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

html[lang="ar"] .legal-section p,
html[lang="ar"] .legal-list li { line-height: 1.92; }

/* ---- Motion keyframes --------------------------------------------------- */
.hero-float { animation: floaty 6s ease-in-out infinite; }

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

/* ---- Responsive --------------------------------------------------------- */
@media (min-width: 921px) {
  .plan.recommended { transform: scale(1.02); }
  .mobile-menu { display: none !important; }
}

@media (max-width: 920px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-actions > .header-cta { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-meta { justify-content: center; }
  .float-chip { display: none; }

  .proof-strip { grid-template-columns: 1fr; }
  .proof-card + .proof-card {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid.bento { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .credits-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .feature-grid,
  .feature-grid.bento,
  .ai-section .feature-grid { grid-template-columns: 1fr; }
  .bento .card-lg { grid-column: auto; }
  .platform-grid { grid-template-columns: 1fr; }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn { width: 100%; }

  .compare-wrap { padding: 12px; }

  /* Hide the header lang switch on small screens — it lives in the menu */
  .nav-actions > .lang-switch { display: none; }

  /* Comparison table becomes stacked cards */
  .table-scroll { overflow-x: visible; }
  .compare-table { min-width: 0; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; }
  .compare-table thead { display: none; }

  .compare-table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    padding: 6px 14px 10px;
    background: var(--surface);
  }

  .compare-table tbody tr:last-child { margin-bottom: 0; }

  .compare-table td {
    border-bottom: 0;
    padding: 8px 0;
  }

  .compare-table td:first-child {
    font-weight: 700;
    border-bottom: 1px dashed var(--line);
  }

  .compare-table td:not(:first-child) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .compare-table td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 400px) {
  :root { --ctrl-h: 44px; }
  .lang-opt { min-width: 36px; padding: 0 10px; }
  .brand span { font-size: 0.92rem; }
}

@media (hover: none) {
  .btn:hover,
  .card:hover,
  .store-badges a:hover { transform: none; }

  .card:hover {
    background: var(--card-grad);
    border-color: var(--line);
    box-shadow: var(--shadow-xs), inset 0 1px 0 var(--card-topline);
  }

  .ai-section .card:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 18px 50px -26px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .card:hover .ico { animation: none; }
  .btn-primary:hover::after { transition: none; }
}

@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;
  }
}
