/* Ihdaa website — one hand-written stylesheet.
 * Visual system from docs/WEBSITE_CONTENT_AND_DESIGN_BRIEF.md §6: the brand palette only, sharp corners (4px at
 * most), big type, generous white space, one accent per section. Outfit for headings, Montserrat for body,
 * Tajawal for Arabic. Layout uses logical properties throughout so the Arabic pages (dir="rtl") mirror without a
 * second stylesheet. Phone first; wider screens add columns. */

:root {
  /* Brand palette (the brief's six colours, plus the success green used only for ticks). */
  --midnight: #143052;      /* navy: text, footer, awnings */
  --navy: #1F4278;          /* royal blue: buttons, links */
  --gold: #E3B226;          /* primary button, ribbons, accents */
  --cream: #F4E6C9;         /* warm panels */
  --sky: #E0EDFA;           /* ice: light panels */
  --white: #FFFFFF;
  --success: #2D6A4F;

  /* Derived tints — mixes of the palette, not new hues. */
  --gold-soft: #F8EDC7;
  --cream-deep: #E9D6AE;
  --paper: #FFFFFF;
  --ink: #143052;
  --ink-soft: #3E516B;      /* body copy: 8:1 on white, 6.6:1 on cream */
  --muted: #56667C;         /* small text: 5.7:1 on white, 4.7:1 on cream */
  --border: #DCE3EC;
  --success-bg: #E3F1EA;
  --error: #B00020;
  --error-bg: #FBE9EC;

  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", "Montserrat", system-ui, sans-serif;

  --r: 4px;                 /* the only corner radius on the site */
  --gutter: 16px;
  --wrap: 1180px;
  --shadow-sm: 0 1px 0 rgba(20, 48, 82, .06);
  --shadow-md: 0 14px 34px -14px rgba(20, 48, 82, .28);
  --touch: 44px;
  --ease: cubic-bezier(.3, 0, .2, 1);
}
@media (min-width: 700px) { :root { --gutter: 28px; } }

html[dir="rtl"] {
  --font-body: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Tajawal", system-ui, sans-serif;
}

/* Arabic pages wait (briefly) for their strings so English does not flash first. site.js always removes this. */
html.i18n-pending body { visibility: hidden; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[dir="rtl"] body { font-size: 1.06rem; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--midnight); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { color: var(--midnight); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; font-family: var(--font-display); }
h1, h2 { letter-spacing: -0.02em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 7.4vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4.6vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.08rem, 2.2vw, 1.28rem); color: var(--ink-soft); max-width: 38em; line-height: 1.6; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; font-size: .76rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--navy); margin-block-end: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--gold); flex-shrink: 0; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.wrap.narrow { max-width: calc(780px + 2 * var(--gutter)); }
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section-tight { padding-block: clamp(2rem, 6vw, 3.5rem); }
.section-cream { background: var(--cream); }
.section-sky { background: var(--sky); }
.section-navy { background: var(--midnight); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy .lead, .section-navy p { color: #D6E0EE; }
.section-navy .eyebrow { color: var(--gold); }
.section-cream .lead, .section-cream p { color: var(--ink-soft); }
.section-head { max-width: 46em; margin-block-end: clamp(2rem, 5vw, 3rem); }
.section-head h2 { max-width: 20em; }

.skip { position: absolute; inset-inline-start: 1rem; top: -60px; background: var(--midnight); color: var(--white);
        padding: .6rem 1rem; border-radius: var(--r); z-index: 100; }
.skip:focus { top: 1rem; color: var(--white); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.35rem; border-radius: var(--r);
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s, transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: var(--midnight); }
.btn-gold:hover { background: #D4A31C; color: var(--midnight); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--midnight); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.section-navy .btn-outline { border-color: var(--white); color: var(--white); }
.section-navy .btn-outline:hover { background: var(--white); color: var(--midnight); }
.btn-ghost { background: transparent; color: var(--midnight); padding-inline: .9rem; }
.btn-ghost:hover { background: rgba(31, 66, 120, .08); }
.btn-danger { background: transparent; border-color: var(--error); color: var(--error); }
.btn-danger:hover { background: var(--error-bg); color: var(--error); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.arrow-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--navy);
              border-block-end: 2px solid var(--gold); padding-block: .2rem; }
.arrow-link::after { content: "\2192"; transition: transform .2s var(--ease); }
html[dir="rtl"] .arrow-link::after { content: "\2190"; }
.arrow-link:hover::after { transform: translateX(3px); }
html[dir="rtl"] .arrow-link:hover::after { transform: translateX(-3px); }
.section-navy .arrow-link { color: var(--white); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-block-end: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
/* The brand is ONE lockup (the mark and the wordmark are a single unit in the brand guide and are never split):
   assets/logo-full.png in English, assets/logo-full-ar.png in Arabic, each composed with the recipe in
   README.md "The logo". The wordmark sits in the lower part of the lockup (bottom-aligned to the mark), so the
   whole unit is moved until the wordmark letters' vertical centre meets the menu text — the mark moves with it,
   and nothing inside the lockup is ever nudged on its own. Measured in Chromium at 1366 wide, 29 Sep 2026, the
   lockup box-centred in the 72px header: the English letters (dot excluded) sat 5.0px below the menu's x-height
   centre; the Arabic letters (leaf excluded) sat 2.4px above the menu text's ink centre (Tajawal's tooth height
   is not the visual centre of a word with three alefs, so the full ink extent is the like-for-like reference).
   On phones the menu is hidden and the same offsets are kept: the letters then sit within 1px of the header's
   centre line, which is what the burger is centred on. */
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
html[lang="en"] .brand { transform: translateY(-5px); }
html[lang="ar"] .brand { transform: translateY(2.5px); }
html[lang="ar"] .brand .lockup-en, html[lang="en"] .brand .lockup-ar { display: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: var(--touch); height: var(--touch);
  border: 0; border-radius: var(--r); background: transparent; color: var(--midnight); cursor: pointer;
}
.nav-toggle:hover { background: rgba(31, 66, 120, .08); }
.burger, .burger::before, .burger::after {
  display: block; width: 22px; height: 2px; background: currentColor; position: relative;
  transition: transform .2s, background .2s;
}
.burger::before, .burger::after { content: ""; position: absolute; inset-inline-start: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; inset-inline: 0; top: 100%; background: var(--white); border-block-end: 3px solid var(--gold);
  padding: .5rem var(--gutter) 1.25rem; box-shadow: var(--shadow-md); display: none; max-height: calc(100vh - 72px); overflow-y: auto;
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: flex; align-items: center; min-height: var(--touch); padding-inline: .25rem; color: var(--midnight);
  font-weight: 600; text-decoration: none; border-block-end: 1px solid var(--border);
}
.site-nav li a[aria-current="page"] { color: var(--navy); box-shadow: inset 3px 0 0 var(--gold); padding-inline-start: .75rem; }
html[dir="rtl"] .site-nav li a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--gold); }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-block-start: 1rem; }
.lang-switch {
  display: inline-flex; align-items: center; min-height: var(--touch); padding-inline: .75rem; font-weight: 700;
  color: var(--navy); text-decoration: none; border-radius: var(--r);
}
.lang-switch:hover { background: rgba(31, 66, 120, .08); }
.lang-switch[lang="ar"] { font-family: "Tajawal", system-ui, sans-serif; font-size: 1.05rem; }
.lang-switch[lang="en"] { font-family: "Montserrat", system-ui, sans-serif; font-size: .92rem; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; inset-inline-start: 0; top: calc(100% + 8px); min-width: 300px; background: var(--white);
  border: 1px solid var(--border); border-block-start: 3px solid var(--gold); border-radius: var(--r);
  box-shadow: var(--shadow-md); padding: .35rem; z-index: 60;
}
.dropdown-menu a {
  display: block; padding: .75rem .85rem; border-radius: var(--r); color: var(--midnight); text-decoration: none; font-weight: 700;
}
.dropdown-menu a small { display: block; font-weight: 400; color: var(--muted); }
.dropdown-menu a:hover, .dropdown-menu a:focus-visible { background: var(--sky); }
.caret { width: 0; height: 0; border-inline: 5px solid transparent; border-top: 6px solid currentColor; }

.site-header .wrap { max-width: 1280px; }
@media (min-width: 1140px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex !important; align-items: center; gap: 1rem; background: none; border: 0;
    box-shadow: none; padding: 0; max-height: none; overflow: visible; flex: 1; justify-content: space-between;
    margin-inline-start: 1.5rem;
  }
  .site-nav ul { display: flex; gap: .1rem; }
  .site-nav li a { border: 0; padding-inline: .6rem; font-size: .9rem; white-space: nowrap; position: relative; }
  .site-nav li a::after {
    content: ""; position: absolute; inset-inline: .6rem; bottom: 8px; height: 2px; background: var(--gold);
    transform: scaleX(0); transition: transform .2s var(--ease);
  }
  .site-nav li a:hover::after { transform: scaleX(1); }
  .site-nav li a[aria-current="page"], html[dir="rtl"] .site-nav li a[aria-current="page"] { box-shadow: none; padding-inline: .6rem; }
  .site-nav li a[aria-current="page"]::after { transform: scaleX(1); }
  .header-actions { padding: 0; flex-wrap: nowrap; }
  .header-actions .btn, .lang-switch { white-space: nowrap; }
  .header-actions .btn { min-height: 42px; padding-block: .55rem; }
  .dropdown-menu { inset-inline-start: auto; inset-inline-end: 0; }
}

/* ------------------------------------------------------------------ hero (home)
 * The painted scene (scene1) is the hero's background, in two layers: the cafe plate (scene1-send-bg, inside
 * .hero-kb) and the woman on a transparent cut-out above it (scene1-send-people, inside .hero-people). Phones: the
 * picture on top, fading into navy, the words below it. From 900px: the picture fills the hero from 40% to the far
 * edge and a navy gradient on the text side (left in English, right in Arabic) keeps the headline readable (the
 * browser suite measures the contrast). Both layers use the same .hero-art box, sized like `object-fit: cover` with
 * container units, so they line up; in Arabic both are mirrored. The gift glowing above her phone is painted into
 * the cut-out.
 * Motion, all off under "reduce motion": the plate gets a slow Ken Burns drift (the `scale` property, CSS) and moves
 * at about 0.6x the scroll speed; the woman moves at about 0.8x (site.js, the `translate` property). The cut-out
 * ends at the bottom edge of its canvas, so it is only ever moved down: its bottom edge never rises into view. */
.hero { position: relative; overflow: hidden; background: var(--midnight); color: var(--white); isolation: isolate; }
.hero-media { position: relative; height: clamp(240px, 46svh, 440px); overflow: hidden; container-type: size; z-index: 0; }
.hero-kb { position: absolute; inset: 0; transform-origin: 60% 40%; animation: hero-kb 25s ease-in-out infinite alternate; }
@keyframes hero-kb { from { scale: 1; } to { scale: 1.06; } }
.hero-art { position: absolute; inset: 0; --hx: .55; --hy: .4; }
@supports (width: 1cqw) {
  .hero-art {
    inset: auto; width: max(100cqw, 150cqh); height: max(100cqh, 66.667cqw);
    inset-block-start: calc((100cqh - max(100cqh, 66.667cqw)) * var(--hy));
    inset-inline-start: calc((100cqw - max(100cqw, 150cqh)) * var(--hx));
  }
}
.hero-art .art { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.hero-people { position: absolute; inset: 0; pointer-events: none; }
html[dir="rtl"] .hero-art { transform: scaleX(-1); }
.hero-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
              background: linear-gradient(to bottom, rgba(20, 48, 82, 0) 42%, rgba(20, 48, 82, .72) 74%, var(--midnight) 96%); }
.hero-inner { position: relative; z-index: 2; padding-block: 0 clamp(2.5rem, 7vw, 4rem); margin-block-start: -1rem; }
.hero-copy { max-width: 36rem; }
.hero h1 { max-width: 12em; color: var(--white); }
.hero .eyebrow { color: var(--gold); }
.hero .lead { color: #D6E0EE; margin-block-end: 2rem; }
.hero .btn-outline { border-color: var(--white); color: var(--white); }
.hero .btn-outline:hover { background: var(--white); color: var(--midnight); }
.hero-quiet { margin-block: 1.1rem 0; font-weight: 600; }
.hero-quiet a { color: #D6E0EE; }
.hero-quiet a:hover { color: var(--white); }
@media (min-width: 900px) {
  .hero { min-height: clamp(560px, calc(100svh - 72px), 880px); display: grid; align-items: center; }
  .hero-media { position: absolute; inset-block: 0; inset-inline-start: 40%; inset-inline-end: 0; height: auto; }
  .hero-art { --hx: .5; --hy: .45; }
  .hero-shade { background: linear-gradient(to right, var(--midnight) 0%, rgba(20, 48, 82, .92) 14%, rgba(20, 48, 82, .5) 27%, rgba(20, 48, 82, 0) 44%),
                            linear-gradient(to top, rgba(20, 48, 82, .35), rgba(20, 48, 82, 0) 22%); }
  html[dir="rtl"] .hero-shade { background: linear-gradient(to left, var(--midnight) 0%, rgba(20, 48, 82, .92) 14%, rgba(20, 48, 82, .5) 27%, rgba(20, 48, 82, 0) 44%),
                                            linear-gradient(to top, rgba(20, 48, 82, .35), rgba(20, 48, 82, 0) 22%); }
  .hero-inner { margin-block: 0; padding-block: clamp(3rem, 7vw, 5rem); width: 100%; }
  .hero-copy { max-width: min(34rem, 37vw); }
  .hero h1 { font-size: clamp(2.5rem, 4.4vw, 4rem); }
}

/* ------------------------------------------------------------------ the story (home)
 * Six painted panels, each two layers on the same box: the background plate (.layer-bg) and the people on a
 * transparent cut-out (.layer-people). CSS alone puts one on the other, so the picture is the same with or without
 * JavaScript. Without JavaScript, on phones and under "reduce motion" the panels are stacked, each with its
 * caption; site.js adds .story-reveal (a fade-up as each scrolls in) where motion is allowed. From 900px with
 * motion, site.js adds .is-pinned: the section is pinned under the header and GSAP ScrollTrigger scrubs from one
 * panel to the next. Captions sit on the picture's free side (data-cap: t/b = top/bottom, s/e/c = start/end/centre);
 * in Arabic the pictures are mirrored, so the logical sides stay free.
 * The bottom-anchor rule: the people are cut off at the bottom edge of their canvas, so that edge must never show
 * inside the panel. Both layers are anchored to the top of the picture (object-position 50% 0), so a wide panel
 * crops only the bottom; --overscan lets both layers reach a little below the panel for the two cut-outs whose
 * people stop just short of the canvas edge (scenes 3, 4 and 5); and the people are only ever scaled from their
 * bottom edge (transform-origin 50% 100%) or moved down, never lifted. */
.story { background: var(--midnight); color: var(--white); padding-block: clamp(2.5rem, 7vw, 4.5rem); --header-h: 72px; }
.story-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: 1.25rem; width: 100%; }
.story-head h2.eyebrow { font-family: var(--font-body); line-height: 1.4; color: var(--gold); margin: 0; }
html[dir="rtl"] .story-head h2.eyebrow { font-size: .95rem; font-weight: 700; }
.story-dots { list-style: none; margin: 0; padding: 0; display: none; gap: 6px; }
.story-dots li { width: 22px; height: 3px; background: rgba(255, 255, 255, .28); transition: background .3s, width .3s var(--ease); }
.story-dots li.on { background: var(--gold); width: 34px; }
.story-stage { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem); max-width: 1440px; margin-inline: auto; }
.story .panel { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; position: relative;
                display: grid; overflow: hidden; }
.story .layer { grid-area: 1 / 1; position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.story .layer-people, .story .layer-fg { pointer-events: none; }
.story .layer > img { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% + var(--overscan, 0%));
                      object-fit: cover; object-position: 50% 0; }
html[dir="rtl"] .story .layer > img { transform: scaleX(-1); }
.story [data-scene="3"] { --overscan: 3%; }
.story [data-scene="4"] { --overscan: 3.5%; }
.story [data-scene="5"] { --overscan: 4.5%; }
.story figcaption {
  grid-area: 2 / 1; display: flex; align-items: baseline; gap: .75rem; padding: .9rem var(--gutter) 0;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.3; color: var(--white);
}
.scene-num { font-family: var(--font-body); font-size: .78rem; font-weight: 700; color: var(--gold); letter-spacing: .08em; flex-shrink: 0; }
@media (min-width: 700px) {
  .story .panel { display: block; height: min(72vh, 66.667vw); max-height: 960px; }
  .story .layer { position: absolute; inset: 0; aspect-ratio: auto; }
  .story figcaption {
    position: absolute; z-index: 3; max-width: min(34rem, 50%); padding: 1rem 1.25rem; margin: 0;
    background: var(--white); color: var(--midnight); border-radius: var(--r); border-inline-start: 4px solid var(--gold);
    box-shadow: 0 18px 40px -18px rgba(20, 48, 82, .6);
  }
  .scene-num { color: var(--navy); }
  .story [data-cap^="t"] figcaption { inset-block-start: 6%; }
  .story [data-cap^="b"] figcaption { inset-block-end: 6%; }
  .story [data-cap$="s"] figcaption { inset-inline-start: 4%; }
  .story [data-cap$="e"] figcaption { inset-inline-end: 4%; }
  .story [data-cap$="c"] figcaption { inset-inline: 0; margin-inline: auto; width: fit-content; }
}
/* Stacked reveal (site.js adds .story-reveal, then .in per panel). Individual transform properties, so the
 * Arabic mirror (transform) is untouched. Both layers move together (down and larger, never up), so they stay in
 * register and the people's bottom edge stays below the panel's. */
.story-reveal .panel .layer > img { opacity: 0; translate: 0 28px; scale: 1.04; transition: opacity .8s var(--ease), translate 1.1s var(--ease), scale 1.4s var(--ease); }
.story-reveal .panel.in .layer > img { opacity: 1; translate: none; scale: none; }
/* Pinned (desktop, motion allowed). */
.story.is-pinned { padding: 0; }
.story.is-pinned .story-pin { height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; }
.story.is-pinned .story-dots { display: flex; }
.story.is-pinned .story-stage { display: block; position: relative; width: 100%; height: min(72vh, 62vw, calc(100vh - var(--header-h) - 6rem)); overflow: hidden; }
.story.is-pinned .panel { position: absolute; inset: 0; height: auto; max-height: none; will-change: transform; }
.story.is-pinned .layer { will-change: transform, opacity; }
/* The parallax while a panel is on stage: site.js tweens --k on the panel from 0 to 1. The plate drifts up by 5% of
 * its height (it is scaled 1.06 so its edges never show); the people grow 6% from their bottom edge. */
.story.is-pinned .layer-bg > img { scale: 1.06; translate: 0 calc((.5 - var(--k, .5)) * 5%); }
.story.is-pinned .layer-people > img { transform-origin: 50% 100%; scale: calc(1 + var(--k, 0) * .06); }

/* ------------------------------------------------------------------ the vector animation layer (home story)
 * Two parts, both only while the story is pinned (desktop, motion allowed): phones, "reduce motion" and no JavaScript
 * never see them, so the stacked fallback is exactly the painted pictures.
 * 1. Props: small faceted SVGs inside each panel's .layer-fg, placed in the cut-out's own 1536x1024 canvas pixels
 *    (--x, --y, --w, --h) and turned into panel pixels with container units, so they stay in register with the people
 *    layer at any width; the layer is scaled from its bottom edge with the same --k as the people, so a prop on a phone
 *    or a monitor stays on it through the parallax. Logical inset-inline-start mirrors the positions in Arabic exactly
 *    as the pictures are mirrored. Twinkles, the tick drawing itself and the pulsing button are CSS keyframes on
 *    transform/opacity/stroke-dashoffset only.
 * 2. The travelling gift: .gift-overlay above the stage; site.js (giftFlight) moves the .gift SVG (and the three
 *    .gift-mini clones for the allocation moment) with GSAP on the same scrubbed timeline. */
.story .layer-fg { display: none; }
@supports (width: 1cqw) {
  .story.is-pinned .layer-fg { display: block; container-type: size; transform-origin: 50% 100%; scale: calc(1 + var(--k, 0) * .06); }
}
.prop {
  position: absolute; --h: var(--w);
  inset-inline-start: calc(var(--x) / 1536 * 100cqw); top: calc(var(--y) / 1536 * 100cqw);
  width: calc(var(--w) / 1536 * 100cqw); height: calc(var(--h) / 1536 * 100cqw);
  margin-inline-start: calc(var(--w) / -3072 * 100cqw); margin-top: calc(var(--h) / -3072 * 100cqw);
  will-change: transform, opacity; overflow: visible;
}
.prop-spark { animation: prop-twinkle 4.2s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes prop-twinkle { 0%, 100% { opacity: .15; scale: .6; rotate: 0deg; } 50% { opacity: 1; scale: 1.15; rotate: 22deg; } }
.prop-tick polyline { stroke-dasharray: 100; stroke-dashoffset: 100; animation: prop-tick-draw 5s ease-in-out infinite; }
@keyframes prop-tick-draw { 0% { stroke-dashoffset: 100; opacity: 1; } 28% { stroke-dashoffset: 0; opacity: 1; } 72% { stroke-dashoffset: 0; opacity: 1; } 84%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.prop-pulse { background: #F6D774; border-radius: 3px; opacity: 0; animation: prop-pulse 2.6s ease-in-out infinite; }
@keyframes prop-pulse { 0%, 100% { opacity: 0; scale: 1; } 50% { opacity: .45; scale: 1.04; } }
.gift-overlay { display: none; position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.story.is-pinned .gift-overlay { display: block; }
.gift-overlay svg { position: absolute; left: 0; top: 0; overflow: visible; opacity: 0; will-change: transform, opacity; }
.gift-overlay .gift-bob { animation: gift-bob 3.4s ease-in-out infinite alternate; }
@keyframes gift-bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.gift-overlay .gift-lid, .gift-overlay .gift-tails, .gift-overlay .spark, .gift-overlay .gift-confetti polygon { will-change: transform, opacity; }

/* The app section's vector scenario: a faceted phone on the corner of the painted picture. The base styles are the
 * finished "sent" state (what "reduce motion" and no animation show); the keyframes play the card sliding in, the
 * ribbon tying and the tick appearing, on an 8-second loop that site.js (initAppScenario) only runs while the
 * section is on screen (.play). */
.app-art { position: relative; }
.app-scenario { position: absolute; inset-block-end: -6%; inset-inline-start: 0; width: 44%; max-width: 196px; padding: 5%;
                background: var(--midnight); border-radius: var(--r); box-shadow: 0 18px 40px -18px rgba(20, 48, 82, .6);
                pointer-events: none; }
.app-scenario::after { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 40px; height: 4px; background: var(--gold); }
@media (min-width: 860px) { .app-scenario { inset-inline-start: -8%; } }
.app-scenario svg { display: block; width: 100%; height: auto; overflow: visible; }
.app-scenario .sc-card, .app-scenario .sc-ribbon, .app-scenario .sc-knot, .app-scenario .sc-sent {
  animation-duration: 8s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; animation-play-state: paused;
  will-change: transform, opacity;
}
.app-scenario.play .sc-card, .app-scenario.play .sc-ribbon, .app-scenario.play .sc-knot, .app-scenario.play .sc-sent { animation-play-state: running; }
.app-scenario .sc-card { animation-name: sc-card; }
.app-scenario .sc-ribbon { animation-name: sc-ribbon; transform-origin: 24px 70px; transform-box: view-box; }
.app-scenario .sc-knot { animation-name: sc-knot; transform-origin: 60px 64px; transform-box: view-box; }
.app-scenario .sc-sent { animation-name: sc-sent; transform-origin: 60px 163px; transform-box: view-box; }
@keyframes sc-card { 0% { transform: translateX(110px); opacity: 0; } 14% { transform: translateX(0); opacity: 1; } 82% { transform: translateX(0); opacity: 1; } 92%, 100% { transform: translateX(-110px); opacity: 0; } }
@keyframes sc-ribbon { 0%, 18% { transform: scaleX(0); } 32% { transform: scaleX(1); } 82% { transform: scaleX(1); opacity: 1; } 90%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes sc-knot { 0%, 32% { transform: scale(0); } 40% { transform: scale(1.25); } 46% { transform: scale(1); } 82% { transform: scale(1); opacity: 1; } 90%, 100% { transform: scale(1); opacity: 0; } }
@keyframes sc-sent { 0%, 50% { transform: scale(.5); opacity: 0; } 58% { transform: scale(1.08); opacity: 1; } 64% { transform: scale(1); opacity: 1; } 82% { transform: scale(1); opacity: 1; } 90%, 100% { transform: scale(1); opacity: 0; } }
@media (max-width: 899.98px) { .gift-overlay, .story .layer-fg { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .gift-overlay, .story .layer-fg { display: none !important; } }

/* ------------------------------------------------------------------ inner page heroes */
.page-hero { background: var(--cream); padding-block: clamp(2.75rem, 8vw, 5.5rem) clamp(2.25rem, 6vw, 4rem); position: relative; }
.page-hero::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: min(180px, 30vw); height: 6px; background: var(--gold); }
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); max-width: 16em; }
.page-hero-grid { display: grid; gap: 2rem; align-items: center; }
.page-hero-art { max-width: 340px; width: 100%; }
@media (min-width: 860px) {
  .page-hero-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
  .page-hero-art { justify-self: end; }
}

/* ------------------------------------------------------------------ cards, steps, grids */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: clamp(1.35rem, 3vw, 1.85rem);
  box-shadow: var(--shadow-sm);
}
.section-cream .card { border-color: transparent; }
.card h3 { margin-block-end: .35rem; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }
.card-kicker { font-size: .78rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .1em; }
html[dir="rtl"] .card-kicker { letter-spacing: 0; font-size: .9rem; }

/* Three "how" cards on the home page, each with a painted crop (assets/art/crop-*.webp) above its text: a 3:2 picture
 * that fills the card's width, sharp corners from the card itself (overflow: hidden). */
.how-cards { display: grid; gap: 1.25rem; counter-reset: how; }
@media (min-width: 760px) { .how-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.how-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
            transition: transform .2s var(--ease), box-shadow .2s var(--ease); counter-increment: how; }
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.how-card .how-art { background: var(--sky); display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; object-position: 50% 50%; }
.how-card .body { padding: 1.35rem 1.5rem 1.6rem; }
.how-card h3 { font-size: 1.5rem; display: flex; align-items: baseline; gap: .6rem; margin-block-end: .4rem; }
.how-card h3::before { content: "0" counter(how); font-size: .85rem; color: var(--navy); font-family: var(--font-body); font-weight: 700; }
.how-card p { margin: 0; color: var(--ink-soft); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.2rem 1.25rem; padding-inline: 4.4rem 1.25rem;
}
.section-cream .steps li { border-color: transparent; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 1.1rem; top: 1.1rem; width: 2.25rem; height: 2.25rem;
  border-radius: var(--r); background: var(--gold); color: var(--midnight); font-weight: 800; display: grid; place-items: center;
  font-family: var(--font-display);
}
.steps h3 { font-size: 1.08rem; margin-block-end: .2rem; }
.steps p { margin: 0; color: var(--ink-soft); }
@media (min-width: 800px) { .steps-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

.audience { display: grid; gap: 2.5rem; }
.audience-block h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
@media (min-width: 980px) { .audience { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* A text column beside an illustration (how-it-works, home strips, about). */
.split { display: grid; gap: clamp(1.75rem, 5vw, 3.5rem); align-items: center; }
.split > * { min-width: 0; }
.split-art { width: 100%; max-width: 420px; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .split.flip > .split-art { order: -1; }
  .split-art { justify-self: center; }
}

/* ------------------------------------------------------------------ packages */
.packages { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .packages { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); } }
.package {
  background: var(--white); border: 1px solid var(--border); border-block-start: 4px solid var(--navy); border-radius: var(--r);
  padding: 1.6rem; display: flex; flex-direction: column; gap: .9rem; position: relative; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.section-cream .package { border-color: transparent; border-block-start-color: var(--navy); }
.package:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.package.selected { border-color: var(--navy); border-block-start-color: var(--gold); box-shadow: 0 0 0 3px var(--sky), var(--shadow-md); }
.package h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin: 0; }
.package .tagline { color: var(--ink-soft); margin: 0; }
.package-figures { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.figure { background: var(--sky); border-radius: var(--r); padding: .8rem .9rem; }
.figure .num { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--midnight); line-height: 1.2; font-variant-numeric: tabular-nums; }
.figure .lbl { display: block; font-size: .78rem; color: var(--ink-soft); line-height: 1.4; }
.example {
  background: var(--gold-soft); border-inline-start: 4px solid var(--gold); border-radius: 0 var(--r) var(--r) 0;
  padding: .9rem 1rem; font-size: .95rem; color: var(--midnight); margin: 0;
}
html[dir="rtl"] .example { border-radius: var(--r) 0 0 var(--r); }
.example strong { font-variant-numeric: tabular-nums; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.features li { position: relative; padding-inline-start: 1.6rem; }
.features li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: .9rem; height: .5rem;
  border-inline-start: 2.5px solid var(--success); border-bottom: 2.5px solid var(--success); transform: rotate(-45deg);
}
html[dir="rtl"] .features li::before { transform: rotate(45deg) scaleX(-1); }
.package-desc { color: var(--ink-soft); font-size: .95rem; }
.package-desc p:last-child { margin: 0; }
.package .btn { margin-block-start: auto; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .55rem; border-radius: 2px; background: var(--sky); color: var(--navy);
}
html[dir="rtl"] .badge { letter-spacing: 0; font-size: .82rem; }
.badge-warn { background: var(--gold-soft); color: #5A4200; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-bad { background: var(--error-bg); color: var(--error); }
.badge-grey { background: #EEF1F5; color: var(--ink-soft); }
.honest-note { margin-block-start: 1.5rem; max-width: 50em; color: var(--ink-soft); font-size: .95rem;
               padding-inline-start: 1rem; border-inline-start: 3px solid var(--navy); }

/* ------------------------------------------------------------------ pledge */
.pledge-figures { display: grid; gap: 1rem; margin-block: 2rem; }
@media (min-width: 640px) { .pledge-figures { grid-template-columns: 1fr 1fr; } }
.pledge-figure { border-radius: var(--r); padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--white); border: 1px solid var(--border);
                 transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.pledge-figure:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); }
.pledge-figure.gold { background: var(--gold); border-color: var(--gold); }
.pledge-figure .big {
  display: block; font-family: var(--font-display); font-size: clamp(3.75rem, 14vw, 7rem); font-weight: 700; line-height: 1;
  color: var(--midnight); font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
}
.pledge-figure .cap { display: block; margin-block-start: .6rem; font-weight: 600; color: var(--midnight); }
.section-navy .pledge-figure:not(.gold) { background: transparent; border-color: rgba(255, 255, 255, .35); }
.section-navy .pledge-figure:not(.gold) .big, .section-navy .pledge-figure:not(.gold) .cap { color: var(--white); }
.basis-note { border-inline-start: 4px solid var(--gold); padding-inline-start: 1rem; color: var(--ink-soft); }
.prose { max-width: 44em; }
.prose h2 { font-size: 1.6rem; margin-block-start: 2rem; }
.prose h3 { margin-block-start: 1.5rem; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose table { border-collapse: collapse; width: 100%; margin-block: 1rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: start; }
.prose blockquote { margin: 1rem 0; padding: .5rem 1rem; border-inline-start: 4px solid var(--gold); background: var(--cream); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r); background: var(--white); }
table.data { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
table.data th, table.data td { padding: .75rem 1rem; text-align: start; border-block-end: 1px solid var(--border); }
table.data th { font-size: .8rem; color: var(--muted); font-weight: 700; background: var(--sky); }
table.data td.num, table.data th.num { text-align: end; font-variant-numeric: tabular-nums; }
.empty {
  border: 2px dashed var(--cream-deep); border-radius: var(--r); padding: 2rem 1.5rem; text-align: center; color: var(--ink-soft);
  background: var(--white);
}

/* ------------------------------------------------------------------ trust strip */
.trust { background: var(--white); color: var(--midnight); padding-block: 1.25rem; border-block-end: 1px solid var(--border); }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
@media (min-width: 860px) { .trust ul { grid-template-columns: repeat(4, auto); justify-content: space-between; } }
.trust li { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .92rem; }
.trust li::before { content: ""; width: 10px; height: 10px; background: var(--gold); flex-shrink: 0; transform: rotate(45deg); }

/* ------------------------------------------------------------------ app download */
.app-block { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .app-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.app-art { width: 100%; max-width: 440px; justify-self: center; }
.app-art .art-frame { margin: 0; }
.store-soon { display: inline-flex; align-items: center; gap: .6rem; margin-block-start: 1.25rem; padding: .7rem 1rem;
              border: 1.5px dashed var(--navy); border-radius: var(--r); font-weight: 700; color: var(--midnight); font-size: .95rem; }
.store-soon::before { content: ""; width: 8px; height: 8px; background: var(--gold); flex-shrink: 0; }
.store-badges { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: 1.25rem; }

/* ------------------------------------------------------------------ principles (about) */
.principles { display: grid; gap: 1rem; counter-reset: pr; margin-block-start: 2rem; }
@media (min-width: 860px) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.principle { background: var(--white); border-radius: var(--r); padding: 1.6rem; border-block-start: 4px solid var(--gold); counter-increment: pr; }
.principle h3 { font-size: 1.2rem; }
.principle h3::before { content: counter(pr); display: block; font-size: 2.5rem; line-height: 1; color: var(--navy); margin-block-end: .6rem; font-weight: 700; }
.principle p { margin: 0; color: var(--ink-soft); }
.about-block { display: grid; gap: .5rem; max-width: 44em; }
.about-block + .about-block { margin-block-start: 2.75rem; }
.about-block p { font-size: 1.1rem; color: var(--ink-soft); }

/* ------------------------------------------------------------------ FAQ */
.faq { display: grid; gap: .6rem; }
.faq details { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); transition: border-color .2s; }
.faq details[open] { border-color: var(--navy); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.25rem; font-weight: 700; color: var(--midnight);
  display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: var(--touch);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--navy); flex-shrink: 0; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 1.25rem 1.1rem; color: var(--ink-soft); }
.faq .answer p:last-child { margin: 0; }
.faq-layout { display: grid; gap: 2rem; }
@media (min-width: 980px) { .faq-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; } }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: 1.1rem; }
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.field { display: grid; gap: .35rem; }
.field label, .field .label { font-weight: 700; font-size: .92rem; color: var(--midnight); }
.field .hint { font-size: .84rem; color: var(--muted); }
.field .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea, select {
  width: 100%; min-height: 48px; padding: .65rem .85rem; font: inherit; color: var(--ink);
  background: var(--white); border: 1.5px solid #C4CDD9; border-radius: var(--r); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .86rem; font-weight: 600; }
input[type="tel"], .ltr { direction: ltr; }
/* Phone numbers, handles, CR numbers, references and document numbers inside running (Arabic) text: read left to
 * right and keep their "+" and "@" where they belong. */
.ltr { unicode-bidi: isolate; }
.doc-num { white-space: nowrap; }
.btn-doc { flex-wrap: wrap; column-gap: .35em; row-gap: 0; text-align: center; }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input.ltr { text-align: end; }
.check { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; font-weight: 600; }
.check input { width: 1.35rem; height: 1.35rem; margin-block-start: .15rem; accent-color: var(--navy); flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .95rem; border-radius: var(--r);
  border: 1.5px solid #C4CDD9; background: var(--white); cursor: pointer; font-weight: 600; font-size: .92rem;
}
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.radio-card {
  display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1.5px solid var(--border);
  border-radius: var(--r); background: var(--white); cursor: pointer;
}
.radio-card:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.radio-card input { width: 1.2rem; height: 1.2rem; margin-block-start: .2rem; accent-color: var(--navy); flex-shrink: 0; }
.radio-card strong { display: block; }
.radio-list { display: grid; gap: .6rem; }
input[type="range"] { width: 100%; accent-color: var(--navy); min-height: var(--touch); }
.range-row { display: grid; grid-template-columns: 1fr 6.5rem; gap: 1rem; align-items: center; }
.input-suffix { position: relative; }
.input-suffix input { padding-inline-end: 2rem; }
.input-suffix span { position: absolute; inset-inline-end: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.notice { border-radius: var(--r); padding: 1rem 1.15rem; background: var(--sky); color: var(--midnight); border-inline-start: 4px solid var(--navy); }
.notice p:last-child { margin: 0; }
.notice-ok { background: var(--success-bg); color: #1E4D39; border-inline-start-color: var(--success); }
.notice-error { background: var(--error-bg); color: var(--error); font-weight: 600; border-inline-start-color: var(--error); }
.notice-warn { background: var(--gold-soft); color: #5A4200; border-inline-start-color: var(--gold); }
.form-status { min-height: 1.4em; font-size: .92rem; }
.form-status.error { color: var(--error); font-weight: 600; }
.form-status.ok { color: var(--success); font-weight: 600; }

/* ------------------------------------------------------------------ application (apply.html, apply-status.html) */
.apply-root { padding-block: 2rem 4rem; }
.apply-shell { display: grid; gap: 2rem; padding-block: .5rem 0; }
.apply-shell > * { min-width: 0; }
@media (min-width: 980px) { .apply-shell { grid-template-columns: 260px 1fr; align-items: start; } }
/* position: relative makes the stepper the containing block of the visually-hidden ".sr" labels inside its buttons.
 * Without it those absolutely positioned spans escape the stepper's overflow clipping and, sitting at the
 * off-screen end of the scrolled row, widened the whole page on phones once steps were marked complete. */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; position: relative; }
.stepper::-webkit-scrollbar { display: none; }
.stepper button {
  display: flex; align-items: center; gap: .55rem; min-height: var(--touch); padding: .4rem .85rem .4rem .45rem;
  padding-inline: .45rem .85rem; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--white);
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.stepper .dot {
  width: 1.75rem; height: 1.75rem; border-radius: 2px; display: grid; place-items: center; background: #EEF1F5;
  color: var(--ink-soft); font-size: .8rem; font-weight: 800; flex-shrink: 0;
}
.stepper .done .dot { background: var(--success); color: var(--white); }
.stepper [aria-current="step"] { border-color: var(--navy); color: var(--midnight); }
.stepper [aria-current="step"] .dot { background: var(--gold); color: var(--midnight); }
@media (min-width: 980px) {
  .stepper { flex-direction: column; position: sticky; top: 96px; overflow: visible; border-inline-start: 2px solid var(--border); padding-inline-start: .5rem; }
  .stepper button { width: 100%; border-color: transparent; background: transparent; }
  .stepper [aria-current="step"] { background: var(--white); border-color: var(--border); box-shadow: var(--shadow-sm); }
}
.panel { background: var(--white); border: 1px solid var(--border); border-block-start: 4px solid var(--navy); border-radius: var(--r);
         padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: var(--shadow-sm); }
.panel h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.panel-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center;
                 margin-block-start: 1.75rem; padding-block-start: 1.25rem; border-block-start: 1px solid var(--border); }
.save-state { font-size: .85rem; color: var(--muted); }
.terms-box { border: 1px solid var(--border); border-radius: var(--r); background: var(--sky); }
.terms-box summary { cursor: pointer; padding: 1rem 1.15rem; font-weight: 700; color: var(--navy); min-height: var(--touch); }
.terms-box .prose { padding: 0 1.15rem 1.15rem; max-height: 60vh; overflow-y: auto; }
.review-list { display: grid; gap: 0; margin: 0; }
.review-list div { display: grid; gap: .15rem; padding-block: .7rem; border-block-end: 1px solid var(--border); }
@media (min-width: 640px) { .review-list div { grid-template-columns: 12rem 1fr; gap: 1rem; } }
.review-list dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.review-list dd { margin: 0; overflow-wrap: anywhere; }
.review-group { margin-block-end: 1.75rem; }
.review-group h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.missing { margin: .5rem 0 0; padding-inline-start: 1.25rem; }
.fee-amount { font-family: var(--font-display); font-size: clamp(2.2rem, 8vw, 3.2rem); font-weight: 700; color: var(--midnight); font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--cream-deep); }
.timeline li { position: relative; padding: 0 0 1.2rem 1.25rem; padding-inline: 1.25rem 0; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: -7px; top: .4rem; width: 12px; height: 12px;
  background: var(--gold); border: 2px solid var(--white); transform: rotate(45deg);
}
.timeline time { display: block; font-size: .85rem; color: var(--muted); }
.status-hero { display: grid; gap: .75rem; }
.status-hero .badge { justify-self: start; font-size: .85rem; }
.code-hint { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--gold-soft); padding: .1rem .4rem; border-radius: 2px; }
.otp-input { letter-spacing: .4em; font-size: 1.35rem !important; text-align: center; direction: ltr; }
.spinner {
  width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent;
  display: inline-block; animation: spin .7s linear infinite; vertical-align: -.2em;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; gap: .75rem; align-items: center; color: var(--muted); padding: 2rem 0; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-block-end: 1.75rem; }
.tabs [role="tab"] {
  min-height: var(--touch); padding: .5rem 1.1rem; border-radius: var(--r); border: 1.5px solid var(--border);
  background: var(--white); font: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ------------------------------------------------------------------ CTA band, contact */
.cta-band { background: var(--navy); color: var(--white); border-radius: var(--r); padding: clamp(1.75rem, 5vw, 3rem);
            display: grid; gap: 1.25rem; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0; width: 90px; height: 90px;
                   background: var(--gold); clip-path: polygon(100% 0, 0 0, 100% 100%); }
html[dir="rtl"] .cta-band::after { clip-path: polygon(0 0, 100% 0, 0 100%); }
.cta-band h2 { color: var(--white); margin: 0; }
.cta-band p { color: #D6E0EE; margin: 0; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; padding-inline-end: 7rem; } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.contact-list li { display: grid; gap: .1rem; }
.contact-list .k { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
html[dir="rtl"] .contact-list .k { letter-spacing: 0; font-size: .9rem; }
.contact-list a { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--midnight); color: #C9D5E6; padding-block: 3.5rem 2rem; margin-block-start: 0; border-block-start: 6px solid var(--gold); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; gap: 1.25rem; padding-block-end: 2.25rem; margin-block-end: 2.25rem; border-block-end: 1px solid rgba(255, 255, 255, .15); }
@media (min-width: 760px) { .footer-top { grid-template-columns: 1fr auto; align-items: center; } }
.footer-brand img { height: 40px; width: auto; background: var(--white); border-radius: var(--r); padding: 6px 10px; }
.footer-brand p { margin: .9rem 0 0; }
.footer-soon { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border: 1px dashed rgba(255, 255, 255, .45);
               border-radius: var(--r); font-size: .88rem; color: var(--white); }
.footer-soon::before { content: ""; width: 8px; height: 8px; background: var(--gold); flex-shrink: 0; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-grid h2 { font-family: var(--font-body); font-size: .78rem; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; margin-block-end: .9rem; }
html[dir="rtl"] .footer-grid h2 { letter-spacing: 0; font-size: .98rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid li { overflow-wrap: anywhere; }
.footer-bottom { margin-block-start: 2.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid rgba(255, 255, 255, .15);
                 font-size: .85rem; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; }

/* Painted pictures beside a section's text (home: for shops, for charities, the pledge, the app; about; and the
 * crop-*.webp pictures in the inner pages' heroes and split sections). */
.art-frame { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-md); background: var(--cream); }
.art-frame img { width: 100%; height: auto; transition: scale .8s var(--ease); }
.art-frame:hover img { scale: 1.03; }
.art-frame::after { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 64px; height: 6px; background: var(--gold); }
/* Crops of the story scenes are mirrored in Arabic, as the story itself is, so the same scene reads the same way on
 * every page; the spot crops (shop owner, coins, the app, the pledge) are not, like their parents on the home page.
 * The `transform` property is free: the frame's hover uses `scale`. */
html[dir="rtl"] .mirror-rtl { transform: scaleX(-1); }
.shops-layout { display: grid; gap: 2rem; }
.shops-layout > * { min-width: 0; }
.shops-art { max-width: 420px; order: -1; }
@media (min-width: 1000px) {
  .shops-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 2.5rem; align-items: start; }
  .shops-art { order: 0; position: sticky; top: 100px; max-width: none; }
}
.charity-art { max-width: 440px; }
.pledge-art { background: var(--navy); }
.allocation-art { background: var(--midnight); }   /* the square allocation spot is painted on navy */
/* about.html: the night view of Manama as a wide banner under the heading. */
.about-banner { margin-block-start: clamp(1.5rem, 4vw, 2.5rem); aspect-ratio: 4 / 3; }
.about-banner img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.about-banner:hover img { scale: none; }
@media (min-width: 700px) { .about-banner { aspect-ratio: 2 / 1; } }

/* Section reveals: added by site.js only when motion is allowed, so without JavaScript nothing is hidden. */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-on .reveal.in { opacity: 1; transform: none; }
.reveal-on [data-stagger] > .reveal { transition-delay: calc(var(--i, 0) * 110ms); }
.reveal-on [data-stagger] > .reveal.in:hover { transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal-on .reveal { opacity: 1; transform: none; }
  .story-reveal .panel .layer > img { opacity: 1; translate: none; scale: none; }
}
@media print {
  .site-header, .site-footer, .stepper, .panel-actions, .story-dots { display: none; }
}

/* ------------------------------------------------------------------ small utilities */
.mt-1 { margin-block-start: 1.25rem; }
.mt-2 { margin-block-start: 2rem; }
.mb-1 { margin-block-end: 1rem; }
.save-state.error { color: var(--error); font-weight: 600; }
.save-state.ok { color: var(--success); }
.account-bar { margin-block-start: 1.5rem; }
