/*!
 * Meyar Almoallem (معيار المعلم) — marketing site stylesheet v2
 * Vanilla CSS, no build step, no framework.
 */

/* ------------------------------------------------------------------ */
/* 1. Fonts                                                            */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.woff2") format("woff2-variations"), url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ */
/* 2. Design tokens                                                    */
/* ------------------------------------------------------------------ */

:root {
  /* Brand */
  --primary: #1565d8;
  --primary-600: #1155ba;
  --primary-700: #0d3e8f;
  --primary-50: #eaf1fd;

  /* Accents (Material-3-ish, cycled across cards) */
  --blue: #1e88e5;
  --blue-50: #e8f2fd;
  --green: #43a047;
  --green-50: #e7f6e8;
  --orange: #fb8c00;
  --orange-50: #fff2e1;
  --purple: #8e24aa;
  --purple-50: #f4e7f8;

  /* Neutrals */
  --ink: #1a2233;
  --ink-soft: #48566b;
  --muted: #5b6b82;
  --line: rgba(26, 34, 51, 0.09);
  --surface: #ffffff;
  --bg: #f6f8fc;

  --font-ar: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-en: "Inter", "Segoe UI", Tahoma, Arial, sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 3px rgba(26, 34, 51, 0.07);
  --shadow-sm: 0 6px 18px rgba(26, 34, 51, 0.08);
  --shadow-md: 0 14px 36px rgba(26, 34, 51, 0.12);
  --shadow-lg: 0 28px 60px rgba(21, 101, 216, 0.22);
  --shadow-glow: 0 0 0 1px rgba(21, 101, 216, 0.08), 0 20px 44px rgba(21, 101, 216, 0.16);

  --container-w: 1160px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-contrast: more) {
  :root {
    --muted: #3d4a5c;
    --line: rgba(26, 34, 51, 0.24);
  }
}

/* ------------------------------------------------------------------ */
/* 3. Reset & base                                                     */
/* ------------------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  min-height: 100vh;
}

html[data-lang="en"] body {
  font-family: var(--font-en);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.6em;
  color: var(--ink);
}

/* Tight tracking reads well on Latin headlines but harms Arabic letter
   joining, so it's scoped to English mode only. */
html[data-lang="en"] h1,
html[data-lang="en"] h2,
html[data-lang="en"] h3,
html[data-lang="en"] h4 {
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-inline-start: 1.4em;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ */
/* 4. Bilingual toggle                                                 */
/* ------------------------------------------------------------------ */

html[data-lang="ar"] .i18n-en {
  display: none !important;
}

html[data-lang="en"] .i18n-ar {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* 5. Scroll-reveal animation utility                                  */
/* ------------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* 6. Buttons & badges                                                 */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease), opacity 0.2s var(--ease);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-3px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600) 70%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 32px 64px rgba(21, 101, 216, 0.3);
  color: #fff;
}

.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.95;
}

.btn[aria-disabled="true"]:hover {
  transform: none;
}

.badge-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--orange);
  color: var(--ink);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  margin-inline-start: 8px;
  vertical-align: middle;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 13px 24px 13px 20px;
}

.store-btn svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: #fff;
}

.store-btn .store-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: start;
}

.store-btn .store-btn-text small {
  font-size: 11px;
  opacity: 0.8;
}

.store-btn .store-btn-text strong {
  font-size: 15px;
}

/* ------------------------------------------------------------------ */
/* 7. Header (glassmorphism)                                           */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  position: relative;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s var(--ease);
}

.main-nav a[aria-current="page"] {
  color: var(--primary);
}

.main-nav a[aria-current="page"]::after,
.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--primary);
  text-decoration: none;
}

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

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* ------------------------------------------------------------------ */
/* 8. Hero                                                             */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 120px;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite;
}

.hero-blob.b1 {
  width: 420px;
  height: 420px;
  background: var(--primary);
  top: -140px;
  inset-inline-end: -100px;
  animation-duration: 22s;
}

.hero-blob.b2 {
  width: 320px;
  height: 320px;
  background: var(--purple);
  bottom: -120px;
  inset-inline-start: -80px;
  animation-duration: 26s;
  animation-delay: -6s;
}

.hero-blob.b3 {
  width: 260px;
  height: 260px;
  background: var(--green);
  top: 40%;
  inset-inline-start: 38%;
  opacity: 0.28;
  animation-duration: 20s;
  animation-delay: -10s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -24px) scale(1.06);
  }
  66% {
    transform: translate(-24px, 20px) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob {
    animation: none;
  }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

/* Entrance choreography: hero content is above the fold and already
   visible on load, so it animates in immediately rather than waiting
   for the scroll-triggered .reveal observer used further down the page. */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow,
.hero-logo,
.hero h1,
.hero p.lede,
.hero-actions,
.hero-trust,
.hero-media {
  animation: hero-rise 0.7s var(--ease) both;
}

.hero-eyebrow {
  animation-delay: 0.05s;
}

.hero-logo {
  animation-delay: 0.1s;
}

.hero h1 {
  animation-delay: 0.15s;
}

.hero p.lede {
  animation-delay: 0.22s;
}

.hero-actions {
  animation-delay: 0.29s;
}

.hero-trust {
  animation-delay: 0.36s;
}

.hero-media {
  animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-logo,
  .hero h1,
  .hero p.lede,
  .hero-actions,
  .hero-trust,
  .hero-media {
    animation: none;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 101, 216, 0.08);
  border: 1px solid rgba(21, 101, 216, 0.18);
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}

.hero-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--ink) 40%, var(--primary-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not (background-clip: text) {
  .hero h1 {
    color: var(--ink);
    -webkit-text-fill-color: currentColor;
  }
}

.hero p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 48ch;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 34px;
  font-size: 13.5px;
  color: var(--muted);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.hero-trust svg {
  color: var(--green);
}

.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-banner {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-banner img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  display: block;
  filter: drop-shadow(0 26px 40px rgba(20, 30, 70, 0.32));
}

.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}

.hero-chip.c1 {
  top: 10%;
  inset-inline-end: -6%;
  animation-delay: -1.5s;
}

.hero-chip.c2 {
  bottom: 6%;
  inset-inline-end: 4%;
  animation-delay: -3s;
}

.hero-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-chip {
    animation: none;
  }
}

/* ------------------------------------------------------------------ */
/* 9. Sections                                                         */
/* ------------------------------------------------------------------ */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 660px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
}

.section-head p {
  color: var(--muted);
  font-size: 16.5px;
}

/* ---- Feature grid (11 cards) ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(21, 101, 216, 0.18);
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 0.3s var(--ease);
}

.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(-4deg);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.feature-icon.tone-blue {
  background: var(--blue-50);
  color: var(--blue);
}

.feature-icon.tone-green {
  background: var(--green-50);
  color: var(--green);
}

.feature-icon.tone-orange {
  background: var(--orange-50);
  color: var(--orange);
}

.feature-icon.tone-purple {
  background: var(--purple-50);
  color: var(--purple);
}

.feature-card h3 {
  font-size: 17.5px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 0;
}

/* ---- Screenshot gallery + lightbox ---- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  gap: 32px;
  justify-content: center;
}

.gallery-item {
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  transition: transform 0.3s var(--ease);
  text-align: center;
  font: inherit;
  color: inherit;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-6px);
}

.gallery-item picture,
.gallery-item img {
  width: auto;
  max-width: 100%;
}

.gallery-item img {
  display: block;
  margin-inline: auto;
  height: auto;
  max-height: 480px;
  filter: drop-shadow(0 18px 30px rgba(20, 30, 70, 0.3));
  transition: filter 0.3s var(--ease);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  filter: drop-shadow(0 24px 38px rgba(20, 30, 70, 0.38));
}

.gallery-item figcaption,
.gallery-caption {
  margin-top: 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 24, 0.86);
  backdrop-filter: blur(6px);
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: min(94vw, 640px);
  width: 100%;
  text-align: center;
}

.lightbox-inner img {
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  width: 100%;
  object-fit: contain;
  background: var(--ink);
}

.lightbox-caption {
  color: #fff;
  margin-top: 16px;
  font-weight: 700;
  font-size: 14px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color 0.2s var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.26);
}

.lightbox-close {
  top: -56px;
  inset-inline-end: 0;
}

.lightbox-nav.prev {
  inset-inline-start: -60px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.next {
  inset-inline-end: -60px;
  top: 50%;
  transform: translateY(-50%);
}

/* Chevrons are drawn pointing left/right; mirror them in RTL so "prev"
   and "next" still point toward their true reading-order direction. */
html[dir="rtl"] .lightbox-nav svg {
  transform: scaleX(-1);
}

@media (max-width: 640px) {
  .lightbox-nav.prev {
    inset-inline-start: 6px;
  }
  .lightbox-nav.next {
    inset-inline-end: 6px;
  }
  .lightbox-close {
    top: -48px;
  }
}

/* ---- Why us ---- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.why-card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.why-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  transform: scaleX(0);
  transform-origin: 0 0;
  transition: transform 0.35s var(--ease);
}

html[dir="rtl"] .why-card::before {
  transform-origin: 100% 0;
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.why-card:hover::before {
  transform: scaleX(1);
}

.why-card .why-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--primary-50);
  color: var(--primary);
}

.why-card .why-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.why-card h3 {
  font-size: 16.5px;
  margin-bottom: 6px;
}

.why-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

/* ---- Privacy banner ---- */

.privacy-banner {
  position: relative;
  background: linear-gradient(135deg, var(--ink) 0%, #0c1936 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  overflow: hidden;
}

.privacy-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px 320px at 90% 10%, rgba(21, 101, 216, 0.35), transparent 70%);
  pointer-events: none;
}

.privacy-banner > * {
  position: relative;
}

.privacy-banner h2 {
  color: #fff;
  font-size: 25px;
}

.privacy-banner p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 62ch;
  margin-bottom: 0;
}

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 11px;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14.5px;
}

.privacy-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.4;
  margin-top: 2px;
}

/* ---- CTA ---- */

.cta-section {
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(26px, 3.2vw, 34px);
}

.cta-section p {
  color: var(--muted);
  max-width: 54ch;
  margin-inline: auto;
}

.cta-section .hero-actions {
  justify-content: center;
}

/* ------------------------------------------------------------------ */
/* 10. Footer                                                          */
/* ------------------------------------------------------------------ */

.site-footer {
  background: linear-gradient(180deg, var(--ink), #0b1730);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 30px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.footer-dev {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-dev strong {
  color: rgba(255, 255, 255, 0.85);
}

.footer-col h3 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
}

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

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: #fff;
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ------------------------------------------------------------------ */
/* 11. Legal pages (sidebar nav + search)                              */
/* ------------------------------------------------------------------ */

.page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  color: #fff;
  padding: 64px 0;
  text-align: center;
  overflow: hidden;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 8px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.page-hero-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(13, 30, 66, 0.35), 0 0 0 6px rgba(255, 255, 255, 0.14);
  margin: 0 auto 22px;
}

.page-hero-logo img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.legal-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
  padding: 64px 0 100px;
}

.legal-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 16px;
}

.legal-search {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.legal-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.legal-search-field svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
}

.legal-search-field input {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
  width: 100%;
  outline: none;
}

.legal-search-status {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.legal-search-nav {
  display: inline-flex;
  gap: 6px;
}

.legal-search-nav button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legal-search-nav button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.legal-toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  max-height: 50vh;
  overflow-y: auto;
}

.legal-toc a {
  display: block;
  color: var(--ink-soft);
  padding: 7px 10px;
  border-radius: 8px;
  font-weight: 500;
}

.legal-toc a.is-active {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 700;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--primary);
  text-decoration: none;
}

.legal-toc li[hidden] {
  display: none;
}

.legal-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 46px;
  box-shadow: var(--shadow-sm);
}

.legal-article .updated {
  display: inline-block;
  background: var(--green-50);
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
}

.legal-article section {
  margin-bottom: 38px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.legal-article section[hidden] {
  display: none;
}

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

.legal-article h2 {
  font-size: 20px;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-50);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.legal-article p,
.legal-article li {
  color: var(--ink);
  font-size: 15px;
}

.legal-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.legal-article th,
.legal-article td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: start;
}

.legal-article th {
  background: var(--bg);
}

.legal-article strong {
  color: var(--ink);
}

.legal-article mark {
  background: #ffe699;
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.legal-article mark.is-current {
  background: var(--orange);
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* 12. FAQ (support page)                                              */
/* ------------------------------------------------------------------ */

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

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

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

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

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--primary);
  flex: none;
  transition: transform 0.2s var(--ease);
}

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

.faq-item .faq-answer {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 14.5px;
}

.faq-item .faq-answer p:last-child {
  margin-bottom: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 56px;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.support-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(21, 101, 216, 0.18);
}

.support-card .why-icon,
.support-card .feature-icon {
  margin-inline: auto;
}

.support-card .feature-icon {
  margin-bottom: 20px;
}

.support-card h3 {
  font-size: 16.5px;
  margin-bottom: 6px;
}

.support-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.support-card .btn,
.support-card .store-btn {
  margin-top: auto;
}

/* Google Play / App Store "coming soon" card gets the same dark store-pill used in the hero */
.support-card .store-btn {
  width: 100%;
  justify-content: center;
}

.store-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.support-contact {
  max-width: 780px;
  margin: 56px auto 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.support-contact h2 {
  font-size: 20px;
  color: #fff;
}

.support-contact p {
  color: rgba(255, 255, 255, 0.85);
}

.support-contact-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.support-contact a.mail-link {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: inline-block;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: rgba(255, 255, 255, 0.26);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

.copy-btn-done {
  display: none;
}

.copy-btn.is-copied .copy-btn-idle {
  display: none;
}

.copy-btn.is-copied .copy-btn-done {
  display: inline;
}

/* ---- FAQ category grouping ---- */

.faq-category {
  display: block;
  color: var(--primary);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 36px 0 12px;
}

/* The first category has both an AR and EN label as siblings (only one
   shown at a time via the i18n toggle) — zero the top margin on both. */
.faq-list > .faq-category:nth-child(-n + 2) {
  margin-top: 0;
}

/* ------------------------------------------------------------------ */
/* 13. 404 page                                                        */
/* ------------------------------------------------------------------ */

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.error-page .error-code {
  font-size: clamp(64px, 12vw, 130px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}

.error-page h1 {
  font-size: 22px;
}

.error-page p {
  color: var(--muted);
  max-width: 46ch;
  margin-inline: auto 24px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ------------------------------------------------------------------ */
/* 14. Responsive                                                      */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .hero {
    padding: 64px 0 88px;
  }

  .section {
    padding: 72px 0;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p.lede {
    max-width: none;
    margin-inline: auto;
  }

  .hero-trust,
  .hero-actions {
    justify-content: center;
  }

  .hero-media {
    margin-top: 36px;
  }

  .hero-chip {
    display: none;
  }

  .privacy-banner {
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .legal-wrap {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-article {
    padding: 30px;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 48px 0 64px;
  }

  .section {
    padding: 56px 0;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a::after {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 78vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    justify-content: start;
  }

  .gallery-item {
    scroll-snap-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ */
/* 15. Print (legal pages)                                             */
/* ------------------------------------------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .legal-sidebar,
  .lang-toggle,
  .nav-toggle,
  .skip-link {
    display: none !important;
  }

  .legal-wrap {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .legal-article {
    border: none;
    padding: 0;
    box-shadow: none;
  }

  body {
    background: #fff;
  }
}
