/* ========== snapx design tokens ========== */
:root {
  /* Brand */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-ring: rgba(37, 99, 235, 0.18);

  /* Neutrals — light */
  --bg: #ffffff;
  --bg-muted: #f7f8fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0a0e1a;
  --text-muted: #4b5563;
  --text-dim: #6b7280;

  /* States */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.18), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 32px 64px -24px rgba(15, 23, 42, 0.24);

  /* Layout */
  --container: 1200px;
  --header-h: 68px;
}

[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-muted: #0f1217;
  --bg-elevated: #15181f;
  --surface: #15181f;
  --surface-2: #1c2029;
  --border: #242935;
  --border-strong: #2f3543;
  --text: #f1f3f8;
  --text-muted: #a1a8b8;
  --text-dim: #767e8f;

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-ring: rgba(59, 130, 246, 0.32);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
}

/* ========== reset ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}
[lang="ar"] body, html[lang="ar"] body, body[lang="ar"] { font-family: var(--font-arabic); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: transparent; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ========== layout ========== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 640px) { .container { padding-inline: 16px; } }

.section { padding-block: 96px; }
.section--tight { padding-block: 64px; }
@media (max-width: 768px) { .section { padding-block: 64px; } .section--tight { padding-block: 48px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-full);
  letter-spacing: 0.02em;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  margin-block: 16px 12px;
  text-wrap: balance;
}
.section-sub {
  color: var(--text-muted);
  font-size: 17px;
  text-wrap: pretty;
  max-width: 640px;
}
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .section-sub { margin-inline: auto; }

/* ========== header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, #7c3aed));
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 6px 14px -4px var(--accent-ring), inset 0 1px 0 rgba(255,255,255,0.25);
}
.brand-mark svg { width: 16px; height: 16px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-md);
  transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.is-active { color: var(--text); }
@media (max-width: 880px) { .nav { display: none; } }

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.lang-select { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.lang-toggle:hover,
.lang-select.is-open .lang-toggle { background: var(--surface-2); color: var(--text); }
.lang-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.lang-toggle .lang-chev {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.18s;
}
.lang-select.is-open .lang-chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px -12px rgba(8, 11, 18, 0.18), 0 2px 8px rgba(8, 11, 18, 0.06);
  padding: 6px;
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  animation: lang-menu-in 0.16s ease-out;
}
@keyframes lang-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lang-menu li:hover { background: var(--surface-2); color: var(--text); }
.lang-menu li.is-active { color: var(--accent); background: var(--accent-soft); }
.lang-menu .lang-check {
  display: inline-flex;
  width: 16px;
  height: 16px;
  opacity: 0;
  color: var(--accent);
}
.lang-menu .lang-check svg { width: 100%; height: 100%; }
.lang-menu li.is-active .lang-check { opacity: 1; }

/* ========== buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: background 0.15s, color 0.15s, transform 0.05s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 16px -6px var(--accent-ring);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost {
  background: var(--surface-2);
  color: var(--text);
}
.btn--ghost:hover { background: color-mix(in oklab, var(--surface-2) 70%, var(--text) 6%); }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16px; border-radius: var(--r-lg); }
.btn--block { width: 100%; }

/* ========== hero ========== */
.hero {
  position: relative;
  padding-top: 64px;
  padding-bottom: 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 520px;
  background:
    radial-gradient(60% 60% at 30% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, color-mix(in oklab, #8b5cf6 14%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lede {
  margin-top: 18px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: 620px;
  margin-inline: auto;
}

/* download form */
.dl-form {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dl-form:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-ring);
}
.dl-form .field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-width: 0;
}
.dl-form .field svg { width: 20px; height: 20px; color: var(--text-dim); flex-shrink: 0; }
.dl-form input {
  flex: 1;
  height: 40px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  min-width: 0;
}
.dl-form input::placeholder { color: var(--text-dim); }

/* paste / clear field actions */
.field-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.field-action:hover { background: var(--surface-2); color: var(--text); }
.field-action svg { width: 16px; height: 16px; }
.field-action[data-clear-input] { width: 38px; padding: 0; justify-content: center; }
.field-action[data-paste-input] { width: 38px; padding: 0; justify-content: center; }
.field-action[hidden] { display: none !important; }
.paste-btn { color: var(--accent); }
.paste-btn:hover { background: var(--accent-soft); color: var(--accent); }
.dl-form .btn { height: 44px; padding: 0px 20px; border-radius: var(--r-sm); }
@media (max-width: 640px) {
  .dl-form { flex-direction: column; padding: 8px; gap: 8px; border-radius: var(--r-md); }
  .dl-form .field { width: 100%; padding: 0 12px; }
  .dl-form .btn { width: 100%; }
}

.hero-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: var(--text-dim);
  font-size: 13.5px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 14px; height: 14px; color: var(--success); }

/* ========== platforms strip ========== */
.platforms {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.platform-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: white;
}
.platform-icon svg { width: 22px; height: 22px; }
.pi-facebook { background: #1877f2; }
.pi-tiktok { background: #0a0a0a; }
.pi-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.pi-twitter { background: #0a0a0a; }
.pi-youtube { background: #ff0000; }
.pi-snapchat { background: #fffc00; color: #0a0a0a; }
@media (max-width: 880px) { .platforms { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .platforms { grid-template-columns: repeat(2, 1fr); } }

/* ========== how it works ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14.5px; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

/* ========== features ========== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--text-muted); font-size: 14.5px; }
@media (max-width: 880px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ========== FAQ ========== */
.faq-wrap { max-width: 760px; margin-inline: auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: 10px; }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 600;
  text-align: start;
  color: var(--text);
  cursor: pointer;
}
.faq-q .chev {
  width: 20px; height: 20px;
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-a {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ========== popular sites ========== */
.popular {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.popular a {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s, color 0.15s;
}
.popular a:hover { border-color: var(--accent); color: var(--text); }
.popular a svg { width: 14px; height: 14px; opacity: 0.6; }
@media (max-width: 700px) { .popular { grid-template-columns: 1fr 1fr; } }

/* ========== footer ========== */
.site-footer {
  margin-top: 64px;
  padding-block: 48px 32px;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-disclaimer {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 28px;
  text-wrap: pretty;
}
.footer-disclaimer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-disclaimer a:hover { color: var(--text); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 36px;
  margin-bottom: 24px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }
.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
}
.footer-social a:hover { color: var(--text); transform: translateY(-1px); }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom-line {
  font-size: 14px;
  color: var(--text-muted);
}
.footer-bottom-line strong { color: var(--text); font-weight: 600; }
@media (max-width: 720px) {
  .footer-links { gap: 6px 20px; }
}

/* ========== modal ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 18, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-backdrop.is-open { display: flex; opacity: 1; }
.modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--bg-elevated);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.22s ease;
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  padding-inline-end: 60px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  text-wrap: balance;
}
.modal-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.modal-meta strong { color: var(--text); font-weight: 600; }
.modal-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px 28px 28px;
}
.modal-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.modal-thumb-ph {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      color-mix(in oklab, var(--text) 4%, transparent) 0 8px,
      transparent 8px 16px
    ),
    var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  padding: 16px;
}
.modal-thumb-duration {
  position: absolute;
  bottom: 8px; inset-inline-end: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
}
.modal-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tab {
  padding: 10px 4px;
  margin-inline-end: 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover:not(.is-active) { color: var(--text); }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.select-wrap {
  position: relative;
  margin-bottom: 18px;
}
.select-wrap select {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
[dir="rtl"] .select-wrap select { padding: 0 14px 0 40px; }
.select-wrap select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 10px;
}
.modal-hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 600px) {
  .modal-body { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .modal-thumb { aspect-ratio: 16 / 9; max-width: 100%; }
  .modal-header { padding: 20px 56px 18px 20px; }
}
[dir="rtl"] .modal-header { padding: 24px 28px 20px; padding-inline-start: 60px; }

/* utility */
.hidden { display: none !important; }

/* rotator (typing effect) */
.rotator {
  display: inline-block;
  position: relative;
  min-width: 1ch;
  white-space: nowrap;
}
.rotator__text { display: inline; }
.rotator__caret {
  display: inline-block;
  width: 0.08em;
  height: 0.95em;
  margin-inline-start: 0.06em;
  vertical-align: -0.1em;
  background: currentColor;
  border-radius: 1px;
  animation: rotator-blink 0.95s steps(1) infinite;
  opacity: 0.85;
}
@keyframes rotator-blink {
  0%, 49% { opacity: 0.85; }
  50%, 100% { opacity: 0; }
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* RTL fixes */
[dir="rtl"] .hero-meta svg,
[dir="rtl"] .step-num,
[dir="rtl"] .feature-icon { /* keep mirror-safe */ }
[dir="rtl"] .popular a svg { transform: scaleX(-1); }

/* ========== platform page hero variant ========== */
.platform-hero {
  position: relative;
  padding-top: 56px;
  padding-bottom: 56px;
  overflow: hidden;
}
.platform-hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 460px;
  background:
    radial-gradient(60% 60% at 30% 0%, color-mix(in oklab, var(--brand-1, var(--accent)) 22%, transparent), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, color-mix(in oklab, var(--brand-2, #8b5cf6) 16%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.platform-hero .container { position: relative; z-index: 1; }

/* per-platform brand glow colors */
body[data-platform="tiktok"]    { --brand-1: #ff0050; --brand-2: #00f2ea; }
body[data-platform="instagram"] { --brand-1: #f58529; --brand-2: #dd2a7b; }
body[data-platform="facebook"]  { --brand-1: #1877f2; --brand-2: #00c6ff; }
body[data-platform="twitter"]   { --brand-1: #1da1f2; --brand-2: #0a0a0a; }
body[data-platform="youtube"]   { --brand-1: #ff0000; --brand-2: #ff7a00; }
body[data-platform="snapchat"]  { --brand-1: #fffc00; --brand-2: #ffb300; }

/* ========== legal/about page hero glow ========== */
.prose-section {
  position: relative;
  overflow: hidden;
}
.prose-section::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 380px;
  background:
    radial-gradient(60% 60% at 30% 0%, color-mix(in oklab, var(--brand-1, var(--accent)) 16%, transparent), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, color-mix(in oklab, var(--brand-2, #8b5cf6) 12%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.prose-section .container { position: relative; z-index: 1; }

body[data-page="about"]   { --brand-1: #2563eb; --brand-2: #8b5cf6; }
body[data-page="privacy"] { --brand-1: #10b981; --brand-2: #06b6d4; }
body[data-page="terms"]   { --brand-1: #f59e0b; --brand-2: #ef4444; }
body[data-page="contact"] { --brand-1: #ec4899; --brand-2: #8b5cf6; }
.platform-hero-inner {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}
.platform-hero .platform-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  margin-inline: auto;
  margin-bottom: 18px;
}
.platform-hero .platform-icon svg { width: 32px; height: 32px; }

/* legal/about pages */
.prose {
  max-width: 760px;
  margin-inline: auto;
}
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.prose .updated { color: var(--text-dim); font-size: 14px; margin-bottom: 32px; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.7; }
.prose ul { padding-inline-start: 22px; list-style: disc; color: var(--text-muted); margin-bottom: 14px; }
.prose ul li { margin-bottom: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ========== modal download results ========== */
.modal-thumb-img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--r-md);
}
.dl-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px;
}
.dl-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: snapx-spin 0.7s linear infinite;
}
@keyframes snapx-spin { to { transform: rotate(360deg); } }
.dl-links {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 4px;
}
.btn--dl {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; height: 48px; padding: 0 20px;
  border-radius: var(--r-md); font-weight: 600; font-size: 14px;
  text-decoration: none; transition: background 0.15s, transform 0.1s;
}
.btn--dl:active { transform: translateY(1px); }
.btn--dl svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--secondary:hover { background: color-mix(in oklab, var(--surface-2) 60%, var(--text) 8%); }
.modal-error {
  color: var(--danger);
  background: color-mix(in oklab, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--danger) 25%, transparent);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 14px;
  text-align: center;
}
