/* ============================================================
   TAKAFUL · TVS Platform — Design System v2.0
   Focus: Information architecture, hierarchy, restraint
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ===== TOKENS — refined, restrained ===== */
:root {
  /* Brand — only essential ink colors */
  --c-navy: #15295A;
  --c-navy-2: #1E3A8A;
  --c-orange: #F58D2F;
  --c-orange-dark: #D8741C;
  --c-gold: #C99838;

  /* Surfaces — only 4 levels */
  --bg: #FBFAF6;
  --surface: #FFFFFF;
  --surface-2: #F6F2E8;
  --surface-3: #EDE6D2;

  /* Ink — only 4 levels */
  --ink-1: #15192A;       /* primary text */
  --ink-2: #4B5063;       /* secondary text */
  --ink-3: #7B8094;       /* muted */
  --ink-on: #FFFFFF;

  /* Borders */
  --line: #E8E0CC;
  --line-soft: #F0EAD9;

  /* Semantic */
  --ok: #16A34A;
  --warn: #EA580C;
  --err: #DC2626;
  --info: #2563EB;

  /* Level palette (used very sparingly) */
  --lv1: #6BB6D8; --lv1-bg: #EDF5FA;
  --lv2: #57AB67; --lv2-bg: #EAF3EC;
  --lv3: #E5B832; --lv3-bg: #FAF1D5;
  --lv4: #F58D2F; --lv4-bg: #FCE5D1;
  --lv5: #D32F32; --lv5-bg: #F8D7D9;
  --lv6: #15295A; --lv6-bg: #DCE3F2;

  /* Type scale — clear hierarchy with clamp */
  --t-display: clamp(40px, 5.4vw, 76px);
  --t-h1: clamp(32px, 4vw, 52px);
  --t-h2: clamp(26px, 3vw, 38px);
  --t-h3: clamp(20px, 2vw, 26px);
  --t-h4: clamp(17px, 1.4vw, 20px);
  --t-lead: clamp(17px, 1.3vw, 19px);
  --t-body: 16px;
  --t-sm: 14px;
  --t-xs: 12px;
  --t-eyebrow: 11px;

  /* Line heights */
  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-base: 1.55;
  --lh-loose: 1.7;

  /* Spacing — strict 4px scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-14: 56px;
  --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* Section spacing — only 3 sizes */
  --sec-sm: var(--s-12);
  --sec-md: var(--s-20);
  --sec-lg: var(--s-32);

  /* Radius — only 4 sizes */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Shadows — only 3 levels, restrained */
  --sh-1: 0 1px 2px rgba(15,25,42,.06);
  --sh-2: 0 6px 18px rgba(15,25,42,.08);
  --sh-3: 0 20px 50px rgba(15,25,42,.14);

  /* Layout */
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --bottom-nav-h: 68px;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --t-quick: 150ms;
  --t-base: 220ms;
  --t-slow: 360ms;

  /* Z-index */
  --z-bottom-nav: 70;
  --z-header: 80;
  --z-mega: 90;
  --z-modal: 100;
}

/* ===== BASE ===== */
html, body {
  font-family: 'Inter', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-base);
  color: var(--ink-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern', 'liga', 'cv11';
}
body[dir="rtl"], .tvs-root[dir="rtl"], .tvs-root[dir="rtl"] * {
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
}
::selection { background: var(--c-orange); color: white; }

/* ===== LAYOUT ===== */
.tvs-container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.tvs-narrow { max-width: 880px; margin-inline: auto; }
.tvs-wide { max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }

/* ===== TYPOGRAPHY (strict hierarchy) ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: ''; width: 18px; height: 1.5px;
  background: var(--c-orange);
}

h1, .h-display { font-size: var(--t-display); font-weight: 800; line-height: var(--lh-tight); letter-spacing: -1.5px; color: var(--c-navy); }
h2, .h-1 { font-size: var(--t-h1); font-weight: 800; line-height: var(--lh-snug); letter-spacing: -1px; color: var(--c-navy); }
h3, .h-2 { font-size: var(--t-h2); font-weight: 800; line-height: var(--lh-snug); letter-spacing: -.5px; color: var(--c-navy); }
h4, .h-3 { font-size: var(--t-h3); font-weight: 700; line-height: var(--lh-snug); color: var(--c-navy); }
h5, .h-4 { font-size: var(--t-h4); font-weight: 700; line-height: var(--lh-snug); color: var(--c-navy); }

.lead { font-size: var(--t-lead); line-height: var(--lh-loose); color: var(--ink-2); }
.body { font-size: var(--t-body); line-height: var(--lh-loose); color: var(--ink-2); }
.sm { font-size: var(--t-sm); color: var(--ink-3); }
.xs { font-size: var(--t-xs); color: var(--ink-3); }
.muted { color: var(--ink-3); }
.mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace; }

.gradient-text {
  background: linear-gradient(120deg, var(--c-orange), var(--c-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===== SECTION (consistent rhythm) ===== */
.sec { padding: var(--sec-md) 0; }
.sec--sm { padding: var(--sec-sm) 0; }
.sec--lg { padding: var(--sec-lg) 0; }
.sec--alt { background: var(--surface-2); }
.sec--dark { background: var(--c-navy); color: white; }
.sec--dark .h-1, .sec--dark .h-2 { color: white; }
.sec--dark .body, .sec--dark .lead { color: rgba(255,255,255,.75); }

.sec-head { text-align: center; max-width: 720px; margin: 0 auto var(--s-12); }
.sec-head--start { text-align: start; max-width: 720px; margin-bottom: var(--s-12); }
.sec-head .lead { margin-top: var(--s-3); }

/* ===== BUTTONS — only 3 styles ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--t-sm);
  letter-spacing: .1px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--t-quick) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-orange); color: white; box-shadow: 0 4px 12px rgba(245,141,47,.32); }
.btn--primary:hover { background: var(--c-orange-dark); box-shadow: 0 8px 20px rgba(245,141,47,.45); }
.btn--secondary { background: var(--c-navy); color: white; box-shadow: 0 4px 12px rgba(21,41,90,.28); }
.btn--secondary:hover { background: #0F1D44; box-shadow: 0 8px 20px rgba(21,41,90,.4); }
.btn--ghost { background: transparent; color: var(--c-navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--c-navy); background: var(--surface); }
.btn--lg { padding: 16px 28px; font-size: var(--t-body); }
.btn--sm { padding: 8px 14px; font-size: var(--t-xs); }
.btn-row { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ===== CARDS — only 1 base style ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: var(--s-6);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base);
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--c-orange); }
.card--flat { border: 0; box-shadow: var(--sh-1); }
.card--padded { padding: var(--s-8); }

/* ===== CHIPS — minimal ===== */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-1);
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .2px;
}
.chip--orange { background: rgba(245,141,47,.12); color: var(--c-orange-dark); }
.chip--green { background: rgba(22,163,74,.10); color: #166534; }
.chip--blue { background: rgba(37,99,235,.10); color: #1E40AF; }
.chip--gold { background: rgba(201,152,56,.12); color: #8B6915; }
.chip--outline { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* ===== HEADER (refined) ===== */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(251, 250, 246, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
  height: var(--header-h);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--c-navy); flex-shrink: 0; }
.brand__mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-orange), var(--c-gold));
  color: white; font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
  letter-spacing: -.5px;
}
.brand__txt { line-height: 1.1; }
.brand__name { font-size: 16px; font-weight: 800; }
.brand__sub { font-size: 11px; color: var(--ink-3); font-weight: 500; }

/* Primary nav — desktop */
.nav { display: flex; align-items: center; gap: var(--s-4); }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-1);
  padding: 8px 4px;
  position: relative;
  transition: color var(--t-quick);
}
.nav__link:hover { color: var(--c-orange); }
.nav__link.is-active { color: var(--c-orange); }
.nav__link.is-active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--c-orange); border-radius: 2px;
}
.nav__link svg { width: 12px; height: 12px; opacity: .55; transition: transform var(--t-quick); }
.nav__item:hover .nav__link svg { transform: rotate(180deg); }

/* Mega menu */
.mega {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 540px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  padding: var(--s-5);
  display: none;
  z-index: var(--z-mega);
}
[dir="rtl"] .mega { left: auto; right: 50%; transform: translateX(50%) translateY(8px); }
.nav__item:hover .mega, .nav__item:focus-within .mega { display: block; animation: megaIn .2s var(--ease); }
@keyframes megaIn { from { opacity: 0; transform: translateX(-50%) translateY(0); } to { opacity: 1; transform: translateX(-50%) translateY(8px); } }
[dir="rtl"] @keyframes megaIn { from { opacity: 0; transform: translateX(50%) translateY(0); } to { opacity: 1; transform: translateX(50%) translateY(8px); } }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.mega__link {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-sm);
  transition: background var(--t-quick);
}
.mega__link:hover { background: var(--surface-2); }
.mega__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-orange), var(--c-gold));
  color: white;
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.mega__icon--navy { background: linear-gradient(135deg, var(--c-navy), #2D4DA8); }
.mega__icon--gold { background: linear-gradient(135deg, var(--c-gold), #92710C); }
.mega__icon--blue { background: linear-gradient(135deg, var(--lv1), var(--c-navy)); }
.mega__icon--green { background: linear-gradient(135deg, var(--lv2), #047857); }
.mega__title { font-weight: 700; color: var(--c-navy); font-size: var(--t-sm); }
.mega__desc { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; line-height: 1.5; }

/* Right cluster */
.nav-actions { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  color: var(--ink-1);
  transition: background var(--t-quick), color var(--t-quick);
}
.icon-btn:hover { background: var(--surface-2); color: var(--c-orange); }
.icon-btn svg { width: 18px; height: 18px; }

.lang-pill {
  background: transparent; border: 1.5px solid var(--line); color: var(--c-navy);
  padding: 6px 14px; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--t-xs);
  transition: all var(--t-quick);
}
.lang-pill:hover { border-color: var(--c-navy); background: var(--c-navy); color: white; }

.mobile-toggle { display: none; }

/* ===== BREADCRUMBS ===== */
.crumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); color: var(--ink-3);
  padding: var(--s-4) 0;
}
.crumbs a { color: var(--ink-3); transition: color var(--t-quick); }
.crumbs a:hover { color: var(--c-orange); }
.crumbs__sep { opacity: .55; }
.crumbs__current { color: var(--c-navy); font-weight: 600; }

/* ===== PAGE HERO (consistent across all pages) ===== */
.page-hero {
  padding: var(--s-16) 0 var(--s-14);
  background: linear-gradient(180deg, #FFF8EE 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 320px at 20% -10%, rgba(245,141,47,.10), transparent 60%),
    radial-gradient(ellipse 600px 280px at 90% 110%, rgba(21,41,90,.06), transparent 60%);
  pointer-events: none;
}
.page-hero > .tvs-container { position: relative; z-index: 1; }
.page-hero__head { max-width: 760px; }
.page-hero__head--center { margin: 0 auto; text-align: center; }
.page-hero__title { margin-bottom: var(--s-4); }
.page-hero__sub { margin-bottom: var(--s-6); }

/* Search bar (used in multiple places) */
.searchbar {
  position: relative;
  display: flex; align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px;
  box-shadow: var(--sh-1);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.searchbar:focus-within { border-color: var(--c-orange); box-shadow: 0 0 0 4px rgba(245,141,47,.12); }
.searchbar__icon { padding: 0 12px; color: var(--ink-3); }
.searchbar__input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 12px 8px;
  font-size: var(--t-sm);
}

/* ===== CTA BAND (consistent across all pages) ===== */
.cta-band {
  padding: var(--sec-md) 0;
}
.cta-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--c-navy) 0%, #2D4DA8 100%);
  border-radius: var(--r-lg);
  padding: var(--s-16) var(--s-10);
  text-align: center;
  box-shadow: var(--sh-3);
}
.cta-card::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,141,47,.30), transparent 70%);
  filter: blur(40px);
}
[dir="rtl"] .cta-card::before { right: auto; left: -100px; }
.cta-card > * { position: relative; z-index: 1; }
.cta-card .h-1 { color: white; max-width: 640px; margin: 0 auto var(--s-3); }
.cta-card .lead { color: rgba(255,255,255,.85); max-width: 540px; margin: 0 auto var(--s-6); }

/* ===== STATS ===== */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-4);
}
.stat {
  text-align: center;
  padding: var(--s-5);
}
.stat__num { font-size: clamp(28px, 3vw, 40px); font-weight: 800; color: var(--c-navy); line-height: 1; letter-spacing: -1px; }
.stat__num--gradient { background: linear-gradient(120deg, var(--c-orange), var(--c-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__lbl { font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); margin-top: var(--s-2); letter-spacing: .8px; text-transform: uppercase; }

/* ===== PROGRESS ===== */
.progress {
  height: 8px;
  background: var(--line-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--c-orange), var(--c-gold));
  border-radius: var(--r-pill);
  transition: width .6s var(--ease);
  position: relative;
}
.progress__bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shimmer 2.4s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ===== AVATAR ===== */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-orange), var(--c-gold));
  color: white;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: var(--sh-1);
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.avatar--xl { width: 96px; height: 96px; font-size: 30px; }

/* ===== ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-d="1"] { transition-delay: 60ms; }
.reveal[data-d="2"] { transition-delay: 120ms; }
.reveal[data-d="3"] { transition-delay: 180ms; }
.reveal[data-d="4"] { transition-delay: 240ms; }

/* ===== LANGUAGE TOGGLE ===== */
.tvs-root[data-lang="en"] .lang-ar { display: none !important; }
.tvs-root[data-lang="ar"] .lang-en { display: none !important; }

/* ===== MOBILE BOTTOM NAV ===== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: var(--z-bottom-nav);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line-soft);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav__inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 4px;
  color: var(--ink-3);
  transition: color var(--t-quick);
}
.bottom-nav__item.is-active { color: var(--c-orange); }
.bottom-nav__item svg { width: 22px; height: 22px; }
.bottom-nav__lbl { font-size: 10px; font-weight: 700; letter-spacing: .2px; }

/* ===== MOBILE DRAWER ===== */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(15,25,42,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; opacity: 0; transition: opacity var(--t-base);
}
.drawer.is-open { display: block; opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: min(360px, 90vw);
  background: var(--surface);
  padding: var(--s-6);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease);
}
[dir="rtl"] .drawer__panel { right: auto; left: 0; transform: translateX(-100%); }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-6); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line-soft); }
.drawer__close { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.drawer__nav { display: flex; flex-direction: column; gap: 4px; }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-weight: 600; color: var(--ink-1);
  transition: background var(--t-quick);
}
.drawer__link:hover { background: var(--surface-2); }
.drawer__link.is-active { background: rgba(245,141,47,.10); color: var(--c-orange); }
.drawer__group-label { font-size: var(--t-xs); font-weight: 800; color: var(--ink-3); letter-spacing: 1.5px; text-transform: uppercase; padding: var(--s-4) var(--s-4) var(--s-2); }

/* ===== MODAL ===== */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(15,25,42,.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; align-items: flex-start; justify-content: center;
  padding: var(--s-6) var(--s-3);
  overflow-y: auto;
}
.modal.is-open { display: flex; animation: fadeIn .2s ease; }
.modal__card {
  background: var(--surface);
  border-radius: var(--r-lg);
  max-width: 880px; width: 100%;
  overflow: hidden;
  box-shadow: var(--sh-3);
  animation: scaleIn .25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }

.modal__head { padding: var(--s-8); position: relative; color: white; }
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.22); color: white; cursor: pointer;
}
[dir="rtl"] .modal__close { right: auto; left: 14px; }
.modal__body { padding: var(--s-8); }

/* ===== UTILS ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); } .mt-12 { margin-top: var(--s-12); }
.mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); } .mb-12 { margin-bottom: var(--s-12); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); } .gap-6 { gap: var(--s-6); }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.divider { height: 1px; background: var(--line-soft); margin: var(--s-8) 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--3-on-tablet { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .mobile-toggle { display: grid; }
  .bottom-nav { display: block; }
  body { padding-bottom: var(--bottom-nav-h); }
  .header { height: 58px; }
  :root { --header-h: 58px; }
  .page-hero { padding: var(--s-12) 0; }
  .page-hero__head { text-align: center; margin-inline: auto; }
  .cta-card { padding: var(--s-12) var(--s-5); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* No scroll-jacking on macOS-like devices */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
