/* ==========================================================================
   Sima — Landing Stylesheet
   Brand: violet-500 (#8B5CF6) on zinc-950 dark canvas, Vazirmatn variable.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype-variations"),
       url("../fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary:        #8B5CF6;
  --primary-dark:   #7C3AED;
  --primary-soft:   rgba(139, 92, 246, 0.16);
  --primary-glow:   rgba(139, 92, 246, 0.40);

  --accent:         #C4B5FD;
  --accent-amber:   #F59E0B;
  --accent-emerald: #10B981;
  --accent-pink:    #EC4899;
  --accent-sky:     #38BDF8;

  --bg:             #09090B;
  --bg-elev-1:      #0F0F12;
  --bg-elev-2:      #18181B;
  --bg-elev-3:      #1F1F23;
  --border:         #2A2A30;
  --border-strong:  #3F3F46;
  --text:           #FAFAFA;
  --text-mute:      #A1A1AA;
  --text-dim:       #71717A;

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-soft:   0 10px 30px -10px rgba(0,0,0,0.5);
  --shadow-glow:   0 20px 60px -20px var(--primary-glow);
  --shadow-card:   0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px -12px rgba(0,0,0,0.6);

  --container:     1200px;
  --gutter:        clamp(16px, 4vw, 32px);

  --font-fa: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-en: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Display",
             "Helvetica Neue", "Roboto", Arial, sans-serif;
}

/* English locale: switch to a modern Western type stack, looser letter-spacing,
   and disable the Persian OpenType stylistic sets. */
html[lang="en"] {
  --font-fa: var(--font-en);
}
html[lang="en"] body {
  font-feature-settings: "ss01", "cv11"; /* Inter niceties when available */
  letter-spacing: -0.005em;
}

/* -------------------------------------------------------------------------- */
/* Reset & base                                                                */
/* -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Hard guard against horizontal scroll/jiggle.
   iOS Safari and a few Android engines ignore body's overflow-x and bubble
   the scroll up to <html>, so both must be set. `overflow-x: clip` is the
   right answer (it doesn't break position:fixed children the way `hidden`
   does), with `hidden` as the fallback for older engines. The double
   declaration is safe: browsers that don't know `clip` use `hidden`. */
html, body {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-fa);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-feature-settings: "ss02", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--primary); color: white; }

/* -------------------------------------------------------------------------- */
/* Layout helpers                                                              */
/* -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Belt-and-suspenders: nothing under <main> may force horizontal scroll. */
main { max-width: 100%; overflow-x: clip; }

.section {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 72px);
}
.section-head .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.section-head p {
  margin: 0;
  color: var(--text-mute);
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
}

.gradient-text {
  background: linear-gradient(120deg, #C4B5FD 0%, var(--primary) 45%, #F0ABFC 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* -------------------------------------------------------------------------- */
/* Background ambience                                                         */
/* -------------------------------------------------------------------------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% -10%, rgba(139, 92, 246, 0.28) 0%, transparent 60%),
    radial-gradient(40% 35% at 95% 20%, rgba(236, 72, 153, 0.10) 0%, transparent 70%),
    radial-gradient(35% 30% at 5% 70%, rgba(56, 189, 248, 0.10) 0%, transparent 70%);
}
.ambient::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  opacity: 0.5;
}

/* -------------------------------------------------------------------------- */
/* Navbar                                                                      */
/* -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(9, 9, 11, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.nav.scrolled {
  background: rgba(9, 9, 11, 0.78);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem;
}
.brand-mark {
  /* The new Sima glyph carries its own gradient (magenta → orange) plus
     digital sparkle accents, so the tile no longer needs a violet fill —
     a transparent square with a soft outer glow lets the brand colors
     read on both light and dark backdrops. */
  width: 36px; height: 36px;
  display: grid; place-items: center;
  filter: drop-shadow(0 6px 16px rgba(236, 72, 153, 0.28));
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
/* Backwards-compat: any leftover inline SVG inside .brand-mark stays sized. */
.brand-mark svg { width: 22px; height: 22px; }
/* Slightly larger glyph in the footer for visual weight. */
.foot-brand .brand-mark { width: 40px; height: 40px; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-mute);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.nav-cta { display: inline-flex; gap: 10px; }
@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                     */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 10px 24px -12px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { box-shadow: 0 16px 36px -10px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.2); }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--primary); }

.btn-soft {
  background: var(--primary-soft);
  color: var(--accent);
  border-color: rgba(139, 92, 246, 0.30);
}
.btn-soft:hover { background: rgba(139, 92, 246, 0.24); color: white; }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }

/* -------------------------------------------------------------------------- */
/* Hero                                                                        */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 120px) 0 clamp(40px, 6vw, 80px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  font-size: 0.83rem; color: var(--text-mute);
  margin-bottom: 22px;
}
.hero-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5.6vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero p.lead {
  margin: 0 0 28px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.85;
  color: var(--text-mute);
  max-width: 56ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  font-size: 0.85rem; color: var(--text-dim);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 16px; height: 16px; color: var(--accent-emerald); }

/* Hero visual — real filter mosaic */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 540px;
  margin-inline-start: auto;
  width: 100%;
}
.hero-mosaic {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}
.hero-tile {
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
  display: grid; place-items: end stretch;
  color: white;
}
.hero-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-tile::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
}
.hero-tile .label {
  position: relative; z-index: 2;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
.hero-tile.feature {
  grid-column: span 2; grid-row: span 2;
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 20px 50px -20px var(--primary-glow), var(--shadow-card);
}
.hero-tile.feature .label { font-size: 1rem; padding: 14px 16px; }

.hero-glow {
  position: absolute; inset: -20%; z-index: -1;
  background: radial-gradient(60% 60% at 50% 50%, rgba(139, 92, 246, 0.35) 0%, transparent 65%);
  filter: blur(40px);
}

/* Hero floating badges */
.hero-badge {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 15, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  font-size: 0.82rem; font-weight: 600;
  box-shadow: var(--shadow-card);
  z-index: 2;
}
.hero-badge svg { width: 14px; height: 14px; color: var(--accent); }
.hero-badge.top    { top: -10px; inset-inline-start: -8px; animation: float 6s ease-in-out infinite; }
.hero-badge.bottom { bottom: 16px; inset-inline-end: -12px; animation: float 7s 1s ease-in-out infinite reverse; }
/* On phones, pull the floating badges INSIDE the hero-visual so they don't
   poke past the viewport and create a stray horizontal-scroll gutter. */
@media (max-width: 640px) {
  .hero-badge.top    { top: 6px;   inset-inline-start: 6px; }
  .hero-badge.bottom { bottom: 6px; inset-inline-end: 6px; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* -------------------------------------------------------------------------- */
/* Marquee / Stat strip                                                        */
/* -------------------------------------------------------------------------- */
.stats {
  border-block: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  padding: 28px 20px;
  text-align: center;
  border-inline-end: 1px solid var(--border);
}
.stat:last-child { border-inline-end: none; }
.stat .num {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent) 0%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .label {
  font-size: 0.875rem;
  color: var(--text-mute);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .stat:nth-child(2n) { border-inline-end: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
}

/* -------------------------------------------------------------------------- */
/* Feature cards                                                               */
/* -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 960px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  position: relative;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.25s ease, border-color 0.25s, background 0.25s;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary) 0%, transparent 50%);
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.35); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-mute);
  line-height: 1.8;
}
.feature-card.alt-pink .feature-icon { background: rgba(236, 72, 153, 0.14); color: var(--accent-pink); }
.feature-card.alt-amber .feature-icon { background: rgba(245, 158, 11, 0.14); color: var(--accent-amber); }
.feature-card.alt-emerald .feature-icon { background: rgba(16, 185, 129, 0.14); color: var(--accent-emerald); }
.feature-card.alt-sky .feature-icon { background: rgba(56, 189, 248, 0.14); color: var(--accent-sky); }

/* Highlight feature card with cover image (uses grid double-span) */
.feature-card.cover {
  padding: 0;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: var(--bg-elev-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 260px;
}
.feature-card.cover .cover-img {
  position: relative;
  flex: 1;
  min-height: 160px;
  overflow: hidden;
}
.feature-card.cover .cover-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-card.cover:hover .cover-img img { transform: scale(1.05); }
.feature-card.cover .cover-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 15, 18, 0.95) 100%);
}
.feature-card.cover .cover-body {
  padding: 22px 24px 24px;
  position: relative;
  margin-top: -40px;
  z-index: 1;
}
.feature-card.cover .cover-body h3 { color: white; }

/* -------------------------------------------------------------------------- */
/* How it works                                                                */
/* -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.step-card {
  padding: 28px 24px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.step-num {
  position: absolute;
  inset-inline-start: 24px;
  top: -18px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  font-weight: 800; color: white;
  font-size: 0.95rem;
  box-shadow: 0 8px 22px -6px var(--primary-glow);
}
.step-card h3 { margin: 18px 0 8px; font-size: 1.05rem; font-weight: 700; }
.step-card p { margin: 0; color: var(--text-mute); font-size: 0.9rem; line-height: 1.8; }

/* -------------------------------------------------------------------------- */
/* Filters showcase                                                            */
/* -------------------------------------------------------------------------- */
.showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 960px) { .showcase { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .showcase { grid-template-columns: repeat(2, 1fr); } }

.filter-card {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.25s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
  color: white;
  isolation: isolate;
}
.filter-card img.cover {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s;
}
.filter-card::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 35%, rgba(0,0,0,0.88) 100%);
}
.filter-card > .filter-body { position: relative; z-index: 2; }
.filter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -18px rgba(0,0,0,0.7);
  border-color: rgba(139, 92, 246, 0.45);
}
.filter-card:hover img.cover { transform: scale(1.06); }
.filter-card h4 {
  margin: 0; font-size: 1.0625rem; font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.filter-card .tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.32);
  border: 1px solid rgba(139, 92, 246, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: max-content;
  margin-bottom: 10px;
  text-shadow: none;
}
.filter-card .tag.amber   { background: rgba(245, 158, 11, 0.32); border-color: rgba(245, 158, 11, 0.45); }
.filter-card .tag.pink    { background: rgba(236, 72, 153, 0.32); border-color: rgba(236, 72, 153, 0.45); }
.filter-card .tag.emerald { background: rgba(16, 185, 129, 0.32); border-color: rgba(16, 185, 129, 0.45); }
.filter-card .tag.sky     { background: rgba(56, 189, 248, 0.32); border-color: rgba(56, 189, 248, 0.45); }

/* -------------------------------------------------------------------------- */
/* Before/After comparison                                                     */
/* -------------------------------------------------------------------------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 880px) {
  .compare-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
    gap: 18px;
  }
}

.compare-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.compare-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 24px 50px -22px var(--primary-glow);
}
@media (max-width: 880px) {
  .compare-card { padding: 10px; border-radius: var(--radius); }
}

.compare {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  /* On phones, avoid the slider eating the viewport. */
  max-height: 70dvh;
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: var(--bg-elev-2);
  container-type: inline-size;
  /* Allow vertical scrolling by default — the handle hijacks horizontal only.
     JS adds .is-dragging which switches to touch-action:none during a drag. */
  touch-action: pan-y;
}
.compare.is-dragging { touch-action: none; }
.compare img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* The "after" wrap is anchored to the logical start edge (right in RTL,
   left in LTR) and its width grows from 0 → 100% based on --pos. The child
   image is sized to the full frame (100cqi = 100% of container inline size)
   so the cropped slice always aligns perfectly with the "before" behind it. */
.compare .after-wrap {
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-start: 0;
  width: var(--pos, 50%);
  overflow: hidden;
  z-index: 2;
  /* Smooth ease when the position changes programmatically (entry sweep,
     keyboard nudge, click-to-snap). Removed during active drag via JS. */
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
}
.compare.is-dragging .after-wrap { transition: none; }
.compare .after-wrap img {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100cqi;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

/* The handle is a *decorative* vertical line — it never receives pointer events,
   so taps near the line but not on the knob don't get hijacked away from
   normal page scrolling. The knob inside is the only grabbable target. */
.compare .handle {
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-start: var(--pos, 50%);
  width: 2px;
  margin-inline-start: -1px;
  z-index: 3;
  pointer-events: none; /* line itself is non-interactive */
  transition: inset-inline-start 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.45);
}
.compare.is-dragging .handle { transition: none; }

/* The grabbable knob — the ONLY interactive element of the slider.
   It carries `touch-action: none` so the browser never starts a vertical
   scroll while the user is dragging it. Combined with `setPointerCapture`
   on pointerdown (in JS), drags continue smoothly even if the finger leaves
   the knob's geometry. */
.compare .knob {
  position: absolute;
  top: 50%;
  inset-inline-start: var(--pos, 50%);
  transform: translate(50%, -50%); /* RTL: center on the inline-start anchor */
  z-index: 4;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(139, 92, 246, 0.22);
  display: grid; place-items: center;
  color: var(--primary);
  cursor: ew-resize;
  touch-action: none;       /* required for reliable Pointer Events on touch */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    inset-inline-start 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s;
}
/* In LTR documents `inset-inline-start: 50%` anchors from the left and the
   knob needs `translateX(-50%)` to center; in RTL it anchors from the right
   so it needs `translateX(50%)`. The rule above is RTL-default; this is the
   LTR override. */
html:not([dir="rtl"]) .compare .knob { transform: translate(-50%, -50%); }

.compare.is-dragging .knob {
  transition: none;
  transform: translate(50%, -50%) scale(1.08);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 0 11px rgba(139, 92, 246, 0.35);
}
html:not([dir="rtl"]) .compare.is-dragging .knob { transform: translate(-50%, -50%) scale(1.08); }

/* An invisible larger hit-area around the knob — important on touch screens
   where a 48px target is the published minimum but fingers are imprecise. */
.compare .knob::before {
  content: "";
  position: absolute;
  inset: -14px;             /* extends the tap area by ~14px on every side */
  border-radius: 50%;
}

.compare .knob svg { width: 22px; height: 22px; pointer-events: none; }

.compare-card:hover .compare .knob {
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.5),
    0 0 0 9px rgba(139, 92, 246, 0.28);
}
.compare .knob:focus-visible {
  outline: none;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.5),
    0 0 0 4px var(--bg),
    0 0 0 8px var(--primary);
}

/* On phones, give the knob a bit more presence — finger targets are coarser. */
@media (max-width: 620px) {
  .compare .knob { width: 56px; height: 56px; }
  .compare .knob svg { width: 26px; height: 26px; }
  .compare .knob::before { inset: -18px; }
}

/* Idle pulse — gentle breathing ring to invite interaction. */
@keyframes compare-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(139, 92, 246, 0.22); }
  50%      { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 12px rgba(139, 92, 246, 0.10); }
}
.compare:not(.is-dragging) .knob {
  animation: compare-pulse 2.6s ease-in-out infinite;
}
.compare-card:hover .compare:not(.is-dragging) .knob,
.compare.is-dragging .knob {
  animation: none;
}

/* One-time hint chip — invites the user to drag, fades after first touch. */
.compare .hint {
  position: absolute;
  z-index: 4;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.78);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: white;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  animation: compare-hint-in 0.5s ease 0.9s forwards, compare-hint-float 3s ease-in-out 1.4s infinite;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
@keyframes compare-hint-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0);    }
}
@keyframes compare-hint-float {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, -4px); }
}
.compare.touched .hint {
  opacity: 0;
  transform: translate(-50%, 12px);
  animation: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .compare .hint { animation: none; opacity: 1; transform: translateX(-50%); }
  .compare:not(.is-dragging) .knob { animation: none; }
  .compare .after-wrap, .compare .handle, .compare .knob { transition: none; }
}
.compare .tag-fixed {
  position: absolute;
  top: 12px;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.75);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 4;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.compare .tag-fixed.before { inset-inline-start: 12px; }
.compare .tag-fixed.after  { inset-inline-end: 12px; color: var(--accent); border-color: rgba(139, 92, 246, 0.45); }

.compare-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px 4px;
}
.compare-meta h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.compare-meta .chip {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-mute);
  background: var(--primary-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 4px 10px; border-radius: 999px;
  color: var(--accent);
}

/* -------------------------------------------------------------------------- */
/* Pricing                                                                     */
/* -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1080px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}
.price-card:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, 0.4); }
.price-card.highlight {
  border-color: rgba(139, 92, 246, 0.55);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.02));
  box-shadow: var(--shadow-glow);
}
.price-card .badge-best {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 14px -4px var(--primary-glow);
}
.price-card .pack-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.price-card .diamonds {
  display: inline-flex; align-items: baseline; gap: 4px;
  margin-bottom: 4px;
}
.price-card .diamonds .n {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #C4B5FD, var(--primary));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.price-card .diamonds .u { color: var(--text-mute); font-size: 0.85rem; }
.price-card .bonus {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.price-card .toman {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  font-size: 0.85rem;
  color: var(--text-mute);
}
.price-card .toman strong { color: var(--text); font-weight: 700; }

.pricing-note {
  margin-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* -------------------------------------------------------------------------- */
/* Quality tiers                                                               */
/* -------------------------------------------------------------------------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 880px) { .tiers { grid-template-columns: 1fr; } }
.tier-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  position: relative;
}
.tier-card .ribbon {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(139, 92, 246, 0.16); color: var(--accent);
  display: inline-block; margin-bottom: 12px;
}
.tier-card.eco .ribbon { background: rgba(16, 185, 129, 0.14); color: var(--accent-emerald); }
.tier-card.std .ribbon { background: rgba(56, 189, 248, 0.14); color: var(--accent-sky); }
.tier-card.pre .ribbon { background: rgba(245, 158, 11, 0.14); color: var(--accent-amber); }
.tier-card h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.tier-card .price-line { color: var(--text-mute); font-size: 0.92rem; margin-bottom: 16px; }
.tier-card ul { list-style: none; padding: 0; margin: 0; }
.tier-card li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.925rem; color: var(--text-mute); padding: 6px 0;
}
.tier-card li::before {
  content: "";
  width: 18px; height: 18px; flex: 0 0 18px;
  background: var(--primary-soft);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 11px 11px;
  margin-top: 3px;
}

/* -------------------------------------------------------------------------- */
/* Trust / privacy                                                             */
/* -------------------------------------------------------------------------- */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 880px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  display: flex; gap: 16px; align-items: flex-start;
}
.trust-icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.trust-icon svg { width: 24px; height: 24px; }
.trust-card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.trust-card p { margin: 0; color: var(--text-mute); font-size: 0.9375rem; line-height: 1.85; }

/* -------------------------------------------------------------------------- */
/* FAQ                                                                         */
/* -------------------------------------------------------------------------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-1);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.faq-item[open] { border-color: rgba(139, 92, 246, 0.35); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 0.98rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 8px;
  background: var(--primary-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 12px 12px;
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item .answer {
  padding: 0 22px 18px;
  color: var(--text-mute);
  font-size: 0.92rem;
  line-height: 1.95;
}

/* -------------------------------------------------------------------------- */
/* CTA                                                                         */
/* -------------------------------------------------------------------------- */
.cta-section {
  padding: clamp(56px, 8vw, 96px) 0;
}
.cta-inner {
  position: relative;
  padding: clamp(40px, 6vw, 64px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(124, 58, 237, 0.08) 60%, rgba(236, 72, 153, 0.10) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  text-align: center;
  overflow: hidden;
}
.cta-strip {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative; z-index: 1;
}
.cta-strip img {
  width: 92px; height: 92px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.6);
  transition: transform 0.3s ease;
}
.cta-strip img:hover { transform: translateY(-4px) rotate(-2deg); }
@media (max-width: 620px) {
  .cta-strip img { width: 64px; height: 64px; }
}
.cta-inner::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60% 60% at 50% 0%, rgba(139, 92, 246, 0.28) 0%, transparent 60%);
}
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.cta-inner p {
  margin: 0 0 28px;
  color: var(--text-mute);
  font-size: clamp(1rem, 1.4vw, 1.075rem);
  max-width: 580px;
  margin-inline: auto;
}
.cta-stores {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(15, 15, 18, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
  text-align: start;
  cursor: not-allowed;
  opacity: 0.92;
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--primary); }
.store-btn .store-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  flex: 0 0 32px;
  font-weight: 800; font-size: 1.15rem;
}
.store-btn.bazaar .store-logo { background: linear-gradient(135deg, #06B6D4 0%, #0E7490 100%); color: white; }
.store-btn.myket  .store-logo { background: linear-gradient(135deg, #DC2626 0%, #7F1D1D 100%); color: white; }
.store-btn .store-meta { display: flex; flex-direction: column; line-height: 1.3; }
.store-btn .store-meta .small { font-size: 0.72rem; color: var(--text-dim); }
.store-btn .store-meta .big   { font-size: 0.95rem; font-weight: 700; color: var(--text); }

/* -------------------------------------------------------------------------- */
/* Footer                                                                      */
/* -------------------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(139, 92, 246, 0.04));
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-brand p {
  color: var(--text-mute);
  font-size: 0.9rem;
  line-height: 1.85;
  max-width: 38ch;
  margin: 12px 0 0;
}
.foot-col h4 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 10px; }
.foot-col a {
  color: var(--text-mute);
  font-size: 0.92rem;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--primary); }

.foot-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* -------------------------------------------------------------------------- */
/* Reveal on scroll                                                            */
/* -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-badge { animation: none; }
  .hero-pill .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Legal pages (privacy / terms) — single-column text layout with sticky TOC
   ========================================================================== */
.legal-hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(139, 92, 246, 0.16) 0%, transparent 60%);
}
.legal-hero .container { text-align: center; max-width: 820px; }
.legal-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.legal-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.legal-hero .sub {
  color: var(--text-mute);
  font-size: clamp(0.95rem, 1.4vw, 1.075rem);
  margin: 0 0 18px;
  line-height: 1.9;
}
.legal-hero .meta {
  display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  font-size: 0.83rem; color: var(--text-dim);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
}
.legal-hero .meta strong { color: var(--text-mute); font-weight: 700; }

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
  align-items: start;
}
@media (max-width: 980px) { .legal-layout { grid-template-columns: 1fr; } }

.legal-toc {
  position: sticky;
  top: 84px;
  align-self: start;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 12px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.legal-toc h4 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
}
.legal-toc ol {
  list-style: none; padding: 0; margin: 0;
  counter-reset: toc;
}
.legal-toc li { margin-bottom: 4px; }
.legal-toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-mute);
  line-height: 1.5;
  transition: color 0.2s, background 0.2s;
  counter-increment: toc;
}
.legal-toc a::before {
  content: counter(toc, decimal);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 18px;
  font-feature-settings: "tnum";
}
.legal-toc a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.legal-toc a.active {
  background: var(--primary-soft);
  color: var(--accent);
}
.legal-toc a.active::before { color: var(--primary); }

@media (max-width: 980px) {
  .legal-toc {
    position: static;
    max-height: none;
    margin-bottom: 8px;
  }
  .legal-toc ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
  }
}
@media (max-width: 560px) {
  .legal-toc ol { grid-template-columns: 1fr; }
}

.legal-body {
  max-width: 760px;
  font-size: clamp(0.95rem, 1.2vw, 1.025rem);
  line-height: 2;
  color: var(--text-mute);
}
.legal-body section { margin-bottom: clamp(32px, 4vw, 48px); scroll-margin-top: 80px; }
.legal-body h2 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.legal-body h2 .num {
  display: inline-grid; place-items: center;
  min-width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 8px;
  font-feature-settings: "tnum";
}
.legal-body h3 {
  margin: 22px 0 8px;
  font-size: 1.025rem;
  font-weight: 700;
  color: var(--text);
}
.legal-body p { margin: 0 0 12px; }
.legal-body ul, .legal-body ol {
  margin: 0 0 14px;
  padding-inline-start: 22px;
}
.legal-body li { margin-bottom: 6px; }
.legal-body strong { color: var(--text); font-weight: 700; }
.legal-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: var(--primary); }
.legal-body code {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--text);
  direction: ltr;
  unicode-bidi: isolate;
}

.callout {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  font-size: 0.94rem;
  line-height: 1.95;
}
.callout.warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
}
.callout.warn strong { color: var(--accent-amber); }
.callout.info {
  border-color: rgba(56, 189, 248, 0.40);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.06), rgba(56, 189, 248, 0.02));
}
.callout.info strong { color: var(--accent-sky); }
.callout.danger {
  border-color: rgba(220, 38, 38, 0.45);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.02));
}
.callout.danger strong { color: #FCA5A5; }

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
  border: 0;
}

.legal-foot-back {
  margin-top: 24px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.legal-foot-back .btn-soft .icon {
  width: 16px; height: 16px;
  transform: scaleX(-1); /* arrow points "back" in RTL */
}

/* ==========================================================================
   Language switcher (lives inside the nav, after the nav-links)
   ========================================================================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev-1);
  margin-inline-end: 8px;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px -4px var(--primary-glow);
}
@media (max-width: 720px) {
  .lang-switch { margin-inline-end: 4px; }
  .lang-switch a { min-width: 28px; height: 24px; padding: 0 8px; font-size: 0.7rem; }
}

/* For the legal pages, the back arrow icon must point the right way per locale. */
html[lang="en"] .legal-foot-back .btn-soft .icon { transform: none; }

/* ==========================================================================
   Toast / snackbar — locale-agnostic floater used for "coming soon" feedback
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 24px);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.92);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: white;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.toast .icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
@media (max-width: 480px) {
  .toast { font-size: 0.85rem; padding: 10px 16px; white-space: normal; text-align: center; }
}

/* ==========================================================================
   Download platforms — Android (3 stores) + iOS (PWA) two-column layout
   ========================================================================== */
.download-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.6vw, 28px);
  max-width: 900px;
  margin: 0 auto;
  text-align: start;
}
@media (max-width: 720px) {
  .download-platforms { grid-template-columns: 1fr; gap: 18px; }
}

.platform-col {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 2.4vw, 26px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 38%),
    rgba(15, 15, 18, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
/* Gradient accent bar along the top edge, revealed on hover. */
.platform-col::before {
  content: "";
  position: absolute;
  top: 0; inset-inline: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), #F0ABFC, transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
/* Soft radial glow that warms up on hover. */
.platform-col::after {
  content: "";
  position: absolute;
  top: -40%; inset-inline-end: -30%;
  width: 70%; height: 80%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}
.platform-col:hover {
  border-color: rgba(139, 92, 246, 0.40);
  transform: translateY(-3px);
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.75);
}
.platform-col:hover::before { opacity: 1; }
.platform-col:hover::after  { opacity: 0.5; }

.platform-col-head {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}
.platform-col-head .icon-wrap {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.22);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.platform-col-head .icon-wrap svg { width: 21px; height: 21px; }
.platform-col-head h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.platform-col-head .badge {
  font-size: 0.68rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft);
  color: var(--accent);
  border: 1px solid rgba(139, 92, 246, 0.3);
  margin-inline-start: auto;
  letter-spacing: 0.02em;
}

.platform-list {
  display: flex; flex-direction: column; gap: 10px;
}
.platform-item {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-1);
  color: var(--text);
  cursor: pointer;
  width: 100%;
  text-align: start;
  font: inherit;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
/* Sliding sheen that sweeps across on hover. */
.platform-item::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-start: -120%;
  width: 80%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: skewX(-18deg);
  transition: inset-inline-start 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.platform-item:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: var(--bg-elev-2);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(139, 92, 246, 0.45);
}
.platform-item:hover::after { inset-inline-start: 140%; }
.platform-item:active { transform: translateY(0) scale(0.99); }
.platform-item:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.platform-item .logo {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 1.15rem;
  flex-shrink: 0;
  color: white;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.platform-item .logo svg { width: 22px; height: 22px; }
.platform-item:hover .logo { transform: scale(1.06) rotate(-2deg); }
.platform-item .logo.bazaar  { background: linear-gradient(135deg, #22C55E 0%, #15803D 100%); }
.platform-item .logo.myket   { background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%); }
.platform-item .logo.direct  { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.platform-item .logo.pwa     { background: linear-gradient(135deg, #38BDF8 0%, #2563EB 100%); }
.platform-item .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.platform-item .meta .top    { font-size: 0.72rem; color: var(--text-dim); font-weight: 500; }
.platform-item .meta .bottom { font-size: 0.97rem; font-weight: 700; letter-spacing: -0.01em; }
.platform-item .chev {
  margin-inline-start: auto;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.25s ease, color 0.25s ease;
}
.platform-item:hover .chev { color: var(--primary); transform: translateX(-3px); }
html[lang="en"] .platform-item:hover .chev { transform: translateX(3px); }
.platform-item[data-soon] .chev,
.platform-item[aria-disabled="true"] .chev { opacity: 0.7; }

/* Accessibility: skip-to-content link (RTL/LTR-safe, slides down from top) */
/* NOTE: <a> defaults to display:inline, on which `transform` is ignored by
   several engines. Force inline-block so the off-screen translate applies. */
.skip-to-content {
  position: absolute !important;
  top: 0 !important;
  left: 1rem !important;
  display: inline-block !important;
  transform: translateY(-200%) !important;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  transform: translateY(0) !important;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
