/* =====================================================================
   KTC ZATCA E-Invoicing System — "Ledger Blue" design system
   Brand: KTC (Ktechclans)  |  Market: Kingdom of Saudi Arabia

   One blue family. Hairlines instead of glow. Accounting-grade numerals.
   Every colour lives in :root — change the brand in one place.
   ===================================================================== */

:root {
  /* ---- BRAND — one family, anchor #005CAE ---- */
  --c-brand-950: #04203e;
  --c-brand-900: #002f5c;
  --c-brand-800: #003e77;
  --c-brand-700: #004c90;
  --c-brand-600: #005cae;
  --c-brand-500: #2477c5;
  --c-brand-300: #7fb0dd;
  --c-brand-100: #dce8f4;
  --c-brand-050: #f0f5fa;

  /* ---- NEUTRAL ---- */
  --c-ink:      #0b1b2b;
  --c-ink-soft: #2e4257;
  --c-muted:    #5a6e85;
  --c-line:     #e3eaf2;
  --c-bg:       #ffffff;
  --c-bg-soft:  #f4f7fb;

  /* ---- ON DARK ---- */
  --c-on-dark:      #e6eef7;
  --c-on-dark-link: #bbd4ec;
  --c-footer-body:  #c3d2e2;
  --c-footer-muted: #8da3bc;

  /* ---- SINGLE ACCENT — hazard glyphs only. Never a background, never text. ---- */
  --c-signal-warn: #e8a400;

  /* ---- WHATSAPP — glyph only, never a surface ---- */
  --c-whatsapp: #25d366;

  /* ---- GRADIENTS + SHADOWS (two only; authority comes from 1px borders) ---- */
  --grad-brand: linear-gradient(135deg, #2477c5, #004c90);
  --grad-deep:  linear-gradient(160deg, #003e77 0%, #04203e 100%);
  --shadow-sm:  0 1px 2px rgba(11, 27, 43, .06);
  --shadow-md:  0 8px 24px -12px rgba(0, 47, 92, .20);

  /* ---- TYPE SCALE — fluid, rem-based so the AR uplift carries it ---- */
  --step--2: clamp(0.75rem,   0.73rem + 0.09vw, 0.8125rem);
  --step--1: clamp(0.875rem,  0.85rem + 0.11vw, 0.9375rem);
  --step-0:  clamp(1rem,      0.98rem + 0.09vw, 1.0625rem);
  --step-1:  clamp(1.0625rem, 1.02rem + 0.20vw, 1.1875rem);
  --step-2:  clamp(1.125rem,  1.06rem + 0.30vw, 1.3125rem);
  --step-3:  clamp(1.375rem,  1.24rem + 0.60vw, 1.75rem);
  --step-4:  clamp(1.75rem,   1.45rem + 1.50vw, 2.75rem);
  --step-5:  clamp(2rem,      1.55rem + 2.20vw, 3.5rem);
  --step-6:  clamp(2.375rem,  1.90rem + 2.20vw, 3.25rem);

  --font-en: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-ar: "Tajawal", "Segoe UI", Tahoma, sans-serif;

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

  --maxw:     1160px;
  --pad:      clamp(16px, 4vw, 24px);
  --header-h: clamp(60px, 12vw, 72px);

  --num: tabular-nums;
}

/* =====================================================================
   Reset & base
   ===================================================================== */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* sticky header must not sit on top of anchored sections */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-en);
  font-size: var(--step-0);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[dir="rtl"] body { font-family: var(--font-ar); }

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

a { color: var(--c-brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--c-ink); margin: 0 0 .5em; }
h1, h2, h3, .pill {
  hyphens: manual; -webkit-hyphens: manual;
  overflow-wrap: break-word; word-break: normal;
}
h1, h2 { text-wrap: balance; }
h1 { font-size: var(--step-5); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
h2 { font-size: var(--step-4); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
h3 { font-size: var(--step-2); font-weight: 700; line-height: 1.25; }
h4 { font-size: var(--step--1); font-weight: 700; line-height: 1.3; }
p  { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

/* Non-breaking compound — belt and braces with U+2011 in the copy itself */
.nb { white-space: nowrap; }

/* Accounting-grade figures */
.num, .price-now, .price-was, .invoice-row span:last-child, .invoice-total .amt {
  font-variant-numeric: var(--num);
  font-feature-settings: "tnum" 1;
}

/* Focus — did not exist anywhere in the previous stylesheet */
:focus-visible {
  outline: 3px solid var(--c-brand-500);
  outline-offset: 2px;
  border-radius: inherit;
}
.panel-deep :focus-visible,
.cta-final :focus-visible,
.footer :focus-visible { outline-color: var(--c-on-dark-link); }

.skip-link {
  position: absolute; inset-block-start: -100%; inset-inline-start: var(--pad);
  z-index: 100; background: #fff; color: var(--c-brand-700);
  font-weight: 700; padding: 12px 18px; border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-md);
}
.skip-link:focus-visible { inset-block-start: 0; text-decoration: none; }

/* =====================================================================
   Layout primitives
   ===================================================================== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section { padding-block: clamp(48px, 7vw, 84px); }
.text-center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--step--2); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-brand-700); background: var(--c-brand-050);
  border: 1px solid var(--c-brand-100);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 16px;
}
.lead {
  font-size: var(--step-1); color: var(--c-ink-soft);
  max-width: min(640px, 100%); text-wrap: pretty;
}
.section .lead.center { margin-inline: auto; }
.muted { color: var(--c-muted); }

/* Grid/flex children default to min-width:auto, which is the real source of
   horizontal overflow. Neutralise it everywhere text can live. */
.hero__inner > *, .split > *, .features__grid > *, .sectors__grid > *,
.trustbar__grid > *, .footer__grid > *, .nav > *, .btn { min-width: 0; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 700; font-size: var(--step-0);
  padding: 14px 26px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  white-space: normal;              /* long Arabic labels must wrap, not overflow */
  text-align: center; min-height: 48px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
.btn-lg { padding: 15px 30px; font-size: var(--step-1); min-height: 52px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--c-brand-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--c-brand-700); }

.btn-outline { background: #fff; color: var(--c-brand-700); border-color: var(--c-brand-700); }
.btn-outline:hover { background: var(--c-brand-050); }
.btn-outline .wa { color: var(--c-whatsapp); }

.btn-light { background: #fff; color: var(--c-brand-700); }
.btn-light:hover { background: var(--c-brand-050); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .10); }
.btn-ghost .wa { color: var(--c-whatsapp); }

/* WhatsApp green is a glyph, never a surface — and never the sole carrier of
   meaning: it always sits beside its own text label. */
.wa { color: var(--c-whatsapp); }

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.nav {
  display: flex; align-items: center; gap: 8px;
  min-height: var(--header-h); position: relative;
}
.nav__logo { display: flex; align-items: center; flex: 0 0 auto; }
.nav__logo img { height: 36px; width: auto; }

.nav__drawer {
  position: absolute; inset-block-start: 100%; inset-inline: calc(var(--pad) * -1);
  display: none; flex-direction: column; gap: 4px;
  background: #fff; border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-md);
  padding: 14px var(--pad) 20px;
  max-block-size: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.nav[data-open="true"] .nav__drawer { display: flex; }

.nav__links { display: flex; flex-direction: column; gap: 2px; list-style: none; }
.nav__links a {
  display: block; padding: 12px 4px;
  color: var(--c-ink-soft); font-weight: 600; font-size: var(--step-0);
}
.nav__links a:hover { color: var(--c-brand-700); text-decoration: none; }

.nav__signin {
  display: block; padding: 12px 4px;
  color: var(--c-brand-700); font-weight: 700; font-size: var(--step-0);
  border-top: 1px solid var(--c-line); margin-top: 6px;
}
.nav__trial { width: 100%; margin-top: 12px; }

.nav__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex: 0 0 auto; }

.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: var(--step--1);
  color: var(--c-brand-700);
  padding: 8px 10px; min-height: 40px; cursor: pointer;
}
.lang-toggle:hover { background: var(--c-brand-050); }
.lang-toggle svg { width: 16px; height: 16px; flex: 0 0 16px; }
.lang-toggle .lang-long { display: none; }

.nav__toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  margin-inline-end: -8px;
}
.nav__toggle span {
  display: block; width: 22px; height: 2px; background: var(--c-ink);
  border-radius: 2px; margin: 3px 0; transition: .2s;
}

@media (min-width: 768px) {
  :root { --header-h: 72px; }
  .nav { gap: 20px; }
  .nav__logo img { height: 40px; }
  .lang-toggle { padding: 8px 14px; }
  .lang-toggle .lang-long { display: inline; }
  .lang-toggle .lang-short { display: none; }
}

/* Desktop nav needs ~806px for logo + 5 links + Sign In + Trial + lang toggle.
   Below 1000px it compresses the trial pill into an unreadable disc, so the
   drawer + hamburger stays in charge until there is genuinely room. */
@media (min-width: 1000px) {
  .nav__drawer {
    position: static; display: flex; flex-direction: row; align-items: center;
    gap: 24px; background: none; border: 0; box-shadow: none; padding: 0;
    margin-inline-start: auto; max-block-size: none; overflow: visible;
  }
  .nav__links { flex-direction: row; align-items: center; gap: 24px; }
  .nav__links a { padding: 0; font-size: var(--step--1); }
  .nav__signin { padding: 0; border: 0; margin: 0; font-size: var(--step--1); white-space: nowrap; }
  .nav__trial { width: auto; margin: 0; padding: 10px 18px; min-height: 40px; font-size: var(--step--1); box-shadow: none; flex: 0 0 auto; white-space: nowrap; }
  .nav__actions { margin-inline-start: 0; }
  .nav__toggle { display: none; }
}

/* =====================================================================
   Sticky mobile action bar — recovers the trial CTA removed from the header
   ===================================================================== */
.sticky-bar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 45;
  display: none; align-items: center; gap: 10px;
  background: #fff; border-top: 1px solid var(--c-line);
  box-shadow: 0 -8px 24px -12px rgba(0, 47, 92, .20);
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
}
.sticky-bar .btn { flex: 1 1 auto; min-height: 48px; }
.sticky-bar__wa {
  flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1.5px solid var(--c-brand-700); border-radius: 999px; background: #fff;
}
.sticky-bar__wa svg { width: 22px; height: 22px; color: var(--c-whatsapp); }

/* The IntersectionObserver sentinel needs a real box — a zero-area target
   never changes isIntersecting, so the callback would never fire again. */
[data-hero-end] { display: block; height: 1px; }

/* Matches the nav breakpoint: whenever the trial CTA lives in the drawer
   rather than the header bar, the sticky bar carries it instead. */
@media (max-width: 999.98px) {
  body[data-sticky-visible="true"] .sticky-bar { display: flex; }
  /* Must reserve at least the bar's real height (78px measured: 1px border +
     10px padding + 57px CTA + 10px padding) AND the safe-area inset, or the
     bar occludes the end of the footer on notched devices. */
  body[data-sticky-visible="true"] { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  position: relative;
  background: var(--c-bg);
  overflow: clip;
}
/* Blueprint grid — precision, not glow. Replaces the two radial blooms. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--c-brand-050) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-brand-050) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(80% 70% at 60% 20%, #000, transparent);
  mask-image: radial-gradient(80% 70% at 60% 20%, #000, transparent);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; gap: clamp(32px, 5vw, 56px);
  padding-block: clamp(40px, 6vw, 72px) clamp(48px, 6vw, 80px);
}

/* Credentials plate — one bordered certificate, not three ragged pills */
.credplate {
  display: grid; margin-bottom: 22px;
  background: #fff; border: 1px solid var(--c-brand-100);
  border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
  max-width: min(620px, 100%);
}
.pill {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  font-size: var(--step--1); font-weight: 700; color: var(--c-brand-800);
}
.pill + .pill { border-top: 1px solid var(--c-line); }
.pill svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--c-brand-600); }

@media (min-width: 600px) {
  /* Equal columns rather than max-content: a long Arabic label wraps inside
     its own segment instead of pushing the plate past the column. */
  /* Equal thirds: a long label wraps inside its own ruled segment rather
     than pushing the plate past the column. Predictable in EN and AR. */
  .credplate { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pill + .pill { border-top: 0; border-inline-start: 1px solid var(--c-line); }
}

.hero h1 { margin-bottom: 16px; max-width: 13em; }
.hero h1 .hl { color: var(--c-brand-700); }
.hero__sub {
  font-size: var(--step-1); color: var(--c-ink-soft);
  max-width: min(46ch, 100%); margin-bottom: 26px; text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero__cta .btn { flex: 1 1 240px; }

.hero__reassure {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px;
  padding-top: 20px; border-top: 1px solid var(--c-line);
  font-size: var(--step--1); color: var(--c-muted);
}
.hero__reassure span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hero__reassure svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--c-brand-600); }

/* Hero visual — the invoice IS the argument */
.hero__visual { max-width: min(480px, 100%); margin-inline: auto; width: 100%; }
.invoice-card {
  background: #fff; border: 1px solid var(--c-brand-100);
  border-top: 3px solid var(--c-brand-600);
  border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 24px);
  box-shadow: var(--shadow-sm);
  animation: card-in .4s ease-out both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.invoice-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.invoice-card__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--c-brand-800); min-width: 0; }
.invoice-card__brand .dot {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: var(--grad-brand); display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: var(--step--2);
}
.chip-verified {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  font-size: var(--step--2); font-weight: 700; color: var(--c-brand-700);
  background: var(--c-brand-050); border: 1px solid var(--c-brand-100);
  border-radius: 999px; padding: 5px 10px;
}
.chip-verified svg { width: 13px; height: 13px; flex: 0 0 13px; }

.invoice-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--c-line); font-size: var(--step--1);
}
.invoice-row span:first-child { color: var(--c-muted); min-width: 0; }
.invoice-row span:last-child { font-weight: 700; flex: 0 0 auto; }
.invoice-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.invoice-total .lbl { font-weight: 700; }
.invoice-total .amt { font-size: var(--step-3); font-weight: 800; color: var(--c-brand-700); }

.invoice-qr {
  display: flex; align-items: center; gap: 14px; margin-top: 16px;
  background: var(--c-bg-soft); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 14px;
}
.invoice-qr strong { display: block; font-size: var(--step--1); }
.invoice-qr small { color: var(--c-muted); font-size: var(--step--2); }
.qr { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 8px; }

/* Anchored verification strip — the evidence. Never hidden on mobile. */
.verify-strip {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 12px 14px; min-height: 44px;
  background: var(--c-brand-050); border: 1px solid var(--c-brand-100);
  border-radius: 12px;
  font-size: var(--step--1); font-weight: 600; color: var(--c-brand-800);
}
.verify-strip svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--c-brand-600); }

@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; align-items: center; }
  .hero__reassure { grid-template-columns: repeat(3, auto); justify-content: start; }
}

/* =====================================================================
   Credentials strip (was .trustbar) — ruled, like a table of record
   ===================================================================== */
.trustbar { background: var(--c-bg-soft); border-block: 1px solid var(--c-line); }
.trustbar__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  padding-block: clamp(24px, 4vw, 34px); text-align: center;
}
.trustbar__grid > * { padding: 12px 10px; }
.trustbar__grid > *:nth-child(n + 3) { border-top: 1px solid var(--c-line); }
.trustbar__grid > *:nth-child(2n) { border-inline-start: 1px solid var(--c-line); }
.trustbar .num { font-size: var(--step-3); font-weight: 800; color: var(--c-brand-700); line-height: 1.2; }
.trustbar .cap { font-size: var(--step--1); color: var(--c-muted); }

@media (min-width: 900px) {
  .trustbar__grid { grid-template-columns: repeat(4, 1fr); }
  .trustbar__grid > *:nth-child(n + 3) { border-top: 0; }
  .trustbar__grid > *:nth-child(2n) { border-inline-start: 0; }
  .trustbar__grid > * + * { border-inline-start: 1px solid var(--c-line); }
}

/* =====================================================================
   Compliance (sits above Features — stakes before capability)
   ===================================================================== */
.split { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

.check-list { list-style: none; display: grid; gap: 14px; margin-top: 8px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--c-brand-600); margin-top: 3px; }
.check-list li div { min-width: 0; }
.check-list li strong { display: block; }
.check-list li span { color: var(--c-muted); font-size: var(--step--1); }

.panel-deep {
  background: var(--grad-deep); color: var(--c-on-dark);
  border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 40px);
}
.panel-deep h3 { color: #fff; }
.warn-list { list-style: none; display: grid; gap: 12px; }
.warn-list li { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
/* The single place a second hue appears — an amber hazard glyph beside
   the word "penalties". Semantic, not decorative. */
.warn-list li svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--c-signal-warn); margin-top: 3px; }
.panel-deep .btn-light { margin-top: 24px; }

/* =====================================================================
   Features
   ===================================================================== */
.features__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 18px; margin-top: clamp(32px, 5vw, 46px);
}
.feature {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 26px);
  transition: border-color .15s ease, background .15s ease;
}
.feature__ic {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--c-brand-050); color: var(--c-brand-600); margin-bottom: 14px;
  transition: background .15s ease;
}
.feature__ic svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--c-muted); font-size: var(--step--1); margin: 0; }

@media (hover: hover) {
  .feature:hover { border-color: var(--c-brand-300); }
  .feature:hover .feature__ic { background: var(--c-brand-100); }
}

/* =====================================================================
   Sectors — a dense index, never one tile per row
   ===================================================================== */
.sectors__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px; margin-top: clamp(28px, 4vw, 40px);
}
.sector {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 12px;
  padding: 14px; transition: border-color .15s ease;
}
.sector__ic { flex: 0 0 22px; color: var(--c-brand-600); }
.sector__ic svg { width: 22px; height: 22px; }
.sector b { font-size: var(--step--1); min-width: 0; }
@media (hover: hover) { .sector:hover { border-color: var(--c-brand-300); } }

/* =====================================================================
   Pricing
   ===================================================================== */
.pricing { background: var(--c-bg-soft); }
.price-card {
  max-width: min(560px, 100%); margin: clamp(28px, 4vw, 40px) auto 0;
  background: #fff; border: 2px solid var(--c-brand-100); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); overflow: hidden; position: relative;
}
/* Flat chip — RTL-correct by construction. The rotated ribbon is gone. */
.price-card__chip {
  position: absolute; inset-block-start: 16px; inset-inline-end: 16px; z-index: 1;
  background: var(--c-brand-700); color: #fff;
  font-size: var(--step--2); font-weight: 700; letter-spacing: .06em;
  border-radius: 999px; padding: 6px 14px;
}
.price-card__head { background: var(--grad-brand); color: #fff; padding: 30px clamp(20px, 4vw, 34px); }
.price-card__head h3 { color: #fff; margin: 0 0 4px; max-width: min(22ch, 100%); }
.price-card__head p { margin: 0; opacity: .92; font-size: var(--step--1); }
.price-card__body { padding: clamp(24px, 4vw, 32px) clamp(20px, 4vw, 34px) clamp(28px, 4vw, 36px); }

.price-amounts { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.price-was { font-size: var(--step-2); color: var(--c-muted); text-decoration: line-through; }
.price-now {
  font-size: var(--step-6); font-weight: 800; color: var(--c-brand-700);
  line-height: 1; min-height: 1em;      /* a 4-digit live price must not reflow */
}
.price-now small { font-size: var(--step-1); font-weight: 700; color: var(--c-ink-soft); }
.price-save {
  display: inline-block; margin-top: 10px;
  background: var(--c-brand-050); color: var(--c-brand-700);
  border: 1px solid var(--c-brand-100); border-radius: 999px;
  font-weight: 700; font-size: var(--step--1); padding: 6px 14px;
}
.price-daily { margin-top: 14px; font-size: var(--step-0); color: var(--c-ink-soft); }
.price-daily b { color: var(--c-brand-700); }
.price-list { list-style: none; display: grid; gap: 12px; margin: 22px 0 26px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); min-width: 0; }
.price-list li svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--c-brand-600); margin-top: 3px; }
.price-login {
  display: block; text-align: center; margin-top: 16px;
  font-size: var(--step--1); font-weight: 600; color: var(--c-brand-700);
}
.price-note { text-align: center; margin: 12px 0 0; font-size: var(--step--2); color: var(--c-muted); }

/* =====================================================================
   FAQ
   ===================================================================== */
.faq { max-width: min(820px, 100%); margin: clamp(28px, 4vw, 40px) auto 0; display: grid; gap: 12px; }
.faq details {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 0 clamp(16px, 3vw, 22px);
}
.faq details[open] { border-color: var(--c-brand-100); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none; cursor: pointer; font-weight: 700; font-size: var(--step-0);
  padding: 18px 0; min-height: 56px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 12px; width: 12px; height: 12px;
  border-inline-end: 2px solid var(--c-brand-600); border-block-end: 2px solid var(--c-brand-600);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq p { color: var(--c-muted); font-size: var(--step--1); padding-bottom: 18px; margin: 0; }

/* =====================================================================
   Final CTA
   ===================================================================== */
.cta-final { background: var(--grad-deep); color: var(--c-on-dark); }
.cta-final__inner { text-align: center; max-width: min(760px, 100%); margin-inline: auto; }
.cta-final h2 { color: #fff; margin-bottom: 16px; }
.cta-final p { font-size: var(--step-1); margin-bottom: 26px; }
.cta-final .hero__cta { justify-content: center; margin-bottom: 0; }
.cta-final .hero__cta .btn { flex: 0 1 auto; }
.cta-contacts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px;
  margin-top: 26px; font-weight: 600; font-size: var(--step--1);
}
.cta-contacts a { color: var(--c-on-dark-link); display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cta-contacts a:hover { color: #fff; }
.cta-contacts svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* =====================================================================
   Footer — ends inside the brand family, not in slate
   ===================================================================== */
.footer { background: var(--c-brand-950); color: var(--c-footer-body); padding: clamp(44px, 6vw, 60px) 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.footer__brand img { height: 40px; margin-bottom: 16px; }
.footer__brand p { font-size: var(--step--1); color: var(--c-footer-muted); max-width: min(34ch, 100%); }
.footer h3, .footer h4 { color: #fff; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { color: var(--c-footer-body); font-size: var(--step--1); }
.footer a:hover { color: #fff; text-decoration: none; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); min-width: 0; }
.footer__contact svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--c-brand-300); margin-top: 3px; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .10); margin-top: 40px; padding-top: 22px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: var(--step--2); color: var(--c-footer-muted);
}
.footer__bottom a { color: var(--c-footer-muted); }

@media (min-width: 560px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 36px; } }

/* =====================================================================
   Legal pages (privacy.html / terms.html)
   ===================================================================== */
.legal-hero { background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); padding: clamp(40px, 6vw, 56px) 0 40px; }
.legal-hero h1 { margin-bottom: 8px; }
.legal-body { padding: clamp(40px, 6vw, 56px) 0 80px; }
.legal-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.legal-toc { background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px; }
.legal-toc h4 { font-size: var(--step--2); text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); margin-bottom: 12px; }
.legal-toc ul { list-style: none; display: grid; gap: 8px; }
.legal-toc a { font-size: var(--step--1); color: var(--c-ink-soft); font-weight: 600; }
.legal-content h2 { font-size: var(--step-3); margin-top: 40px; scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: var(--step-2); margin-top: 24px; }
.legal-content p, .legal-content li { color: var(--c-ink-soft); font-size: var(--step-0); }
.legal-content ul { padding-inline-start: 22px; list-style: disc; display: grid; gap: 8px; margin-bottom: 16px; }
.legal-content a { font-weight: 600; }
.legal-updated {
  display: inline-block; background: var(--c-brand-050); color: var(--c-brand-700);
  border: 1px solid var(--c-brand-100); border-radius: 999px;
  padding: 6px 14px; font-size: var(--step--1); font-weight: 700;
}
@media (min-width: 900px) {
  .legal-wrap { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 48px; }
  .legal-toc { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* =====================================================================
   Language visibility helpers
   ===================================================================== */
[data-lang] { display: none; }
html[data-active-lang="en"] [data-lang="en"],
html[data-active-lang="ar"] [data-lang="ar"] { display: revert; }
html[data-active-lang="en"] span[data-lang="en"],
html[data-active-lang="ar"] span[data-lang="ar"] { display: inline; }

/* =====================================================================
   Arabic / RTL — a real mirror, not just text alignment.
   Layout mirrors via logical properties throughout; these rules fix the
   things direction alone cannot: optical size and Arabic line metrics.
   ===================================================================== */
html[dir="rtl"] { font-size: 106.25%; }        /* the whole rem scale lifts coherently */
html[dir="rtl"] body { line-height: 1.85; }
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 { line-height: 1.35; letter-spacing: 0; }
/* Negative tracking damages Arabic glyph joining; the eyebrow's wide
   tracking is equally wrong for it. */
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] .price-card__chip { letter-spacing: 0; }
/* The chevron is a rotated border box — mirror it so it opens the same way. */
html[dir="rtl"] .faq summary::after { transform: rotate(135deg) translate(-2px, -2px); }
html[dir="rtl"] .faq details[open] summary::after { transform: rotate(-45deg) translate(-2px, -2px); }
/* Western numerals stay in logical order inside an RTL paragraph. */
[dir="ltr"] { unicode-bidi: isolate; }

/* =====================================================================
   Reduced motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .invoice-card { animation: none; opacity: 1; transform: none; }
}

/* Legal pages: the body copy is English-only, so .legal-hero/.legal-body carry
   dir="ltr" to stop an Arabic page mangling its punctuation and numbering.
   This notice is translated, so it uses dir="auto" and aligns to its own text. */
.legal-lang-note{
  /* .legal-wrap becomes a 2-col grid at >=900px; without this the notice would
     occupy the 240px aside slot and displace the table of contents. */
  grid-column: 1 / -1;
  margin: 0 0 24px;
  padding: 10px 14px;
  border-inline-start: 3px solid var(--c-brand-600);
  background: var(--c-brand-050);
  color: var(--c-ink-soft);
  font-size: .9rem;
  border-radius: 0 8px 8px 0;
}
[dir="rtl"] .legal-lang-note{ border-radius: 8px 0 0 8px; }
