/* =========================================================
   حزب القوات المواطنة — Design System v2
   Concept: «الدار» — بيت يتّسع للجميع
   Tokens: primitive → semantic → component
   ========================================================= */

/* ---------- 1. Primitive tokens ---------- */
:root {
  --navy-950: #071328;
  --navy-900: #0A1A33;
  --navy-800: #102849;
  --blue-700: #0E3E86;
  --blue-600: #1550A8;
  --blue-500: #2465C4;
  --blue-100: #E6EEFA;
  --sky-400: #6DB3EC;
  --sand-50: #FBF9F4;
  --sand-100: #F5F1E8;
  --sand-200: #EBE4D4;
  --sand-300: #DDD3BD;
  --gold-500: #C29A45;
  --gold-700: #8A6420;
  --ink-600: #45526A;
  --white: #FFFFFF;

  --space-1: 4px;  --space-2: 8px;  --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 96px; --space-9: 128px;

  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.15rem, 1rem + .5vw, 1.35rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --fs-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  --fs-3xl: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-micro: 180ms;
  --dur-reveal: 640ms;

  /* ---------- 2. Semantic tokens ---------- */
  --surface-page: var(--sand-100);
  --surface-raised: var(--white);
  --surface-sunken: var(--sand-200);
  --surface-inverse: var(--navy-900);
  --text-strong: var(--navy-900);
  --text-body: #26324A;
  --text-muted: var(--ink-600);
  --text-inverse: #F2F5FA;
  --text-inverse-muted: #B5C2D6;
  --accent-interactive: var(--blue-600);
  --accent-interactive-hover: var(--blue-700);
  --accent-warm: var(--gold-700);
  --border-subtle: var(--sand-300);
  --focus-ring: 0 0 0 3px var(--white), 0 0 0 6px var(--blue-500);

  /* ---------- 3. Component tokens ---------- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --card-radius: var(--radius-lg);
  --btn-radius: 999px;
  --header-h: 76px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow-soft: 0 1px 2px rgba(10, 26, 51, .06), 0 8px 24px -12px rgba(10, 26, 51, .18);
  --shadow-lift: 0 2px 4px rgba(10, 26, 51, .06), 0 24px 48px -20px rgba(10, 26, 51, .32);
  /* الشكل التوقيعي: سقف الدار */
  --roof: polygon(50% 0, 100% 22%, 100% 100%, 0 100%, 0 22%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--text-body);
  background: var(--surface-page);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.35;
  margin: 0 0 var(--space-3);
  font-weight: 800;
  letter-spacing: 0;
}
p { margin: 0 0 var(--space-3); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-interactive); text-underline-offset: .25em; }
a:hover { color: var(--accent-interactive-hover); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
ul, ol { padding-inline-start: 1.2em; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.latin { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; direction: ltr; unicode-bidi: isolate; }

.skip-link {
  position: absolute; inset-inline-start: 16px; inset-block-start: -100px; z-index: 2000;
  background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { inset-block-start: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent-interactive);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 1.6em;
  border-radius: var(--btn-radius);
  border: 1.5px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 var(--fs-sm)/1 var(--font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), color var(--dur-micro);
}
.btn:hover { --btn-bg: var(--accent-interactive-hover); color: var(--btn-fg); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(21, 80, 168, .6); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; transform: none; }
.btn .icon { transition: transform var(--dur-micro) var(--ease-out); }
.btn:hover .icon--arrow { transform: translateX(-4px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text-strong); --btn-border: var(--sand-300); }
.btn--ghost:hover { --btn-bg: var(--surface-raised); --btn-fg: var(--text-strong); box-shadow: var(--shadow-soft); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--navy-900); }
.btn--light:hover { --btn-bg: var(--sand-100); --btn-fg: var(--navy-900); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-border: rgba(255, 255, 255, .4); }
.btn--outline-light:hover { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: #fff; }
.btn--sm { min-height: 44px; padding: 0 1.2em; }

.text-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; }
.text-link:hover .icon { transform: translateX(-4px); }
.text-link .icon { transition: transform var(--dur-micro) var(--ease-out); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 1000;
  background: rgba(245, 241, 232, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-block-end: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-block-end-color: var(--border-subtle); background: rgba(251, 249, 244, .94); }
.header-inner { display: flex; align-items: center; gap: var(--space-4); min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-strong); margin-inline-end: auto; }
.brand img { width: 50px; height: 49px; }
.brand-name { display: block; font: 800 1rem/1.3 var(--font-display); }
.brand-sub { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.brand-sub:lang(ar) { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: .78rem; }

/* Language list: compact codes in the desktop bar, full names in the mobile menu */
.nav-lang { display: flex; gap: 4px; list-style: none; margin: 0 0 0 0; margin-inline-start: 8px; padding: 0; }
.nav-lang a {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px;
  border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--surface-raised);
  color: var(--text-strong); font: 700 var(--fs-sm)/1 var(--font-body); text-decoration: none;
  transition: border-color var(--dur-micro), color var(--dur-micro);
}
.nav-lang a:lang(ar) { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 1.05rem; }
.nav-lang a:hover { border-color: var(--accent-interactive); color: var(--accent-interactive); }
.nav-lang .lang-full { display: none; }
@media (max-width: 1200px) {
  .nav-lang { margin: var(--space-4) 0 0; gap: 8px; }
  .nav-lang li { flex: 1; }
  .nav-lang a { width: 100%; height: 52px; }
  .nav-lang .lang-short { display: none; }
  .nav-lang .lang-full { display: inline; }
}

.site-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  color: var(--text-strong); font: 600 var(--fs-sm)/1 var(--font-body);
  text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: background var(--dur-micro), color var(--dur-micro);
}
.nav-link:hover { background: rgba(10, 26, 51, .06); color: var(--text-strong); }
.nav-link[aria-current="page"], .nav-link.is-current { color: var(--accent-interactive); }
.nav-link[aria-current="page"]::after, .nav-link.is-current::after {
  content: ""; position: absolute; inset-inline: 14px; inset-block-end: 4px; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-link .icon { width: 14px; height: 14px; transition: transform var(--dur-micro); }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.submenu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0;
  min-width: 260px; padding: 8px; margin: 0; list-style: none;
  background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur-micro), transform var(--dur-micro) var(--ease-out), visibility 0s linear var(--dur-micro);
}
.submenu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.submenu a {
  display: flex; flex-direction: column; padding: 10px 14px; border-radius: 10px;
  color: var(--text-strong); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); line-height: 1.5;
}
.submenu a small { font-weight: 400; color: var(--text-muted); font-size: var(--fs-xs); }
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--sand-100); color: var(--accent-interactive); }
.nav-cta { margin-inline-start: var(--space-2); }
.menu-toggle { display: none; }

@media (max-width: 1200px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
    border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--surface-raised); color: var(--text-strong); cursor: pointer;
  }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }
  .menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
  .site-nav {
    /* header's backdrop-filter makes it the containing block, so size explicitly */
    display: block;
    position: fixed; inset: var(--header-h) 0 auto 0; height: calc(100dvh - var(--header-h)); background: var(--sand-50);
    padding: var(--space-4) var(--gutter) var(--space-7); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease-out), visibility 0s linear .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { width: 100%; justify-content: space-between; min-height: 56px; font-size: 1.1rem; border-block-end: 1px solid var(--border-subtle); border-radius: 0; }
  .nav-link[aria-current="page"]::after, .nav-link.is-current::after { display: none; }
  .submenu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 12px 8px; display: none; opacity: 1; visibility: visible; transform: none; }
  .submenu.is-open { display: block; }
  .nav-cta { margin: var(--space-4) 0 0; }
  .nav-cta .btn { width: 100%; min-height: 56px; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 420px) { .brand-sub { display: none; } .brand img { width: 42px; height: 41px; } }

/* ---------- Section primitives ---------- */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--sunken { background: var(--surface-sunken); }
.section--raised { background: var(--sand-50); }
.section--inverse { background: var(--surface-inverse); color: var(--text-inverse); }
.section--inverse h2, .section--inverse h3 { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 var(--fs-xs)/1.4 var(--font-body); color: var(--accent-warm);
  margin-block-end: var(--space-3);
}
.eyebrow::before { content: ""; width: 14px; height: 12px; background: currentColor; clip-path: var(--roof); }
.section--inverse .eyebrow, .on-dark .eyebrow { color: var(--gold-500); }
.section-head { display: grid; gap: var(--space-3); margin-block-end: clamp(32px, 5vw, 64px); }
.section-head--split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.2fr 1fr; gap: var(--space-6); } }
.section-title { font-size: var(--fs-2xl); margin: 0; }
.lede { font-size: var(--fs-lg); color: var(--text-muted); line-height: 1.85; margin: 0; max-width: 62ch; }
.section--inverse .lede { color: var(--text-inverse-muted); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; padding-block: clamp(40px, 6vw, 88px) clamp(56px, 8vw, 112px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset-block-start: -10%; inset-inline-end: -12%; width: 60vw; aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(36, 101, 196, .14), transparent 62%); pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 6px 14px;
  border: 1px solid var(--border-subtle); border-radius: 999px; background: var(--surface-raised);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); margin-block-end: var(--space-4);
}
.hero-kicker b { background: var(--navy-900); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.hero-title { font-size: var(--fs-3xl); font-weight: 900; line-height: 1.25; margin-block-end: var(--space-4); }
/* highlighter sits behind the text and follows line wraps */
.hero-title .accent {
  color: var(--accent-interactive);
  background: linear-gradient(rgba(194, 154, 69, .5), rgba(194, 154, 69, .5)) no-repeat 0 78% / 100% .14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-lede { font-size: var(--fs-lg); color: var(--text-muted); max-width: 54ch; margin-block-end: var(--space-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-block-start: var(--space-5); font-size: var(--fs-xs); color: var(--text-muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon { color: var(--accent-warm); }

.house-frame { position: relative; max-width: 460px; margin-inline: auto; width: 100%; }
.house-frame__img {
  clip-path: var(--roof); aspect-ratio: 4 / 4.6; overflow: hidden; background: var(--navy-900);
}
.house-frame__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.house-frame::before {
  content: ""; position: absolute; inset: -14px; clip-path: var(--roof);
  background: linear-gradient(160deg, var(--blue-600), var(--navy-900)); z-index: -1; opacity: .12;
}
.house-frame__caption {
  position: absolute; inset-block-end: 20px; inset-inline-start: -12px; max-width: 78%;
  background: var(--surface-raised); border-radius: var(--radius-md); padding: 14px 18px;
  box-shadow: var(--shadow-lift); border-inline-start: 4px solid var(--accent-interactive);
}
.house-frame__caption strong { display: block; font: 800 var(--fs-sm)/1.4 var(--font-display); color: var(--text-strong); }
.house-frame__caption span { font-size: var(--fs-xs); color: var(--text-muted); }
@media (max-width: 520px) { .house-frame__caption { inset-inline-start: 8px; } }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-radius: var(--radius-lg); overflow: hidden; background: var(--navy-900); color: #fff; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: clamp(20px, 3vw, 36px); border-inline-start: 1px solid rgba(255, 255, 255, .08); border-block-start: 1px solid rgba(255, 255, 255, .08); }
.stat__num { display: block; font: 900 clamp(2rem, 1.4rem + 2vw, 3rem)/1.1 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.stat__label { display: block; margin-block-start: 8px; font-size: var(--fs-sm); color: var(--text-inverse-muted); }
.stat__num small { font-size: .5em; color: var(--sky-400); margin-inline-start: 4px; }

/* ---------- Pillars / bento ---------- */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(6, 1fr); } }
.tile {
  position: relative; background: var(--surface-raised); border-radius: var(--card-radius);
  padding: clamp(24px, 3vw, 36px); border: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
}
a.tile { text-decoration: none; color: inherit; }
a.tile:hover, .tile--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
.tile h3 { font-size: var(--fs-lg); margin: 0; }
.tile p { margin: 0; color: var(--text-muted); }
.tile__icon {
  width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent-interactive);
  background: var(--blue-100); clip-path: var(--roof); padding-block-start: 6px;
}
.tile__icon .icon { width: 24px; height: 24px; }
.tile__num { font: 900 var(--fs-xl)/1 var(--font-display); color: var(--sand-300); }
.tile--dark { background: var(--navy-900); border-color: var(--navy-900); color: var(--text-inverse-muted); }
.tile--dark h3 { color: #fff; }
.tile--dark p { color: var(--text-inverse-muted); }
.tile--dark .tile__icon { background: rgba(109, 179, 236, .14); color: var(--sky-400); }
.tile--blue { background: var(--blue-600); border-color: var(--blue-600); }
.tile--blue h3, .tile--blue p, .tile--blue .text-link { color: #fff; }
.tile--blue .tile__icon { background: rgba(255, 255, 255, .16); color: #fff; }
.tile .text-link { margin-block-start: auto; padding-block-start: 8px; }
.tile .chip { align-self: flex-start; }
@media (min-width: 760px) {
  .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
  .row-2 { grid-row: span 2; }
}
.tile__badge { align-self: flex-start; font-size: var(--fs-xs); font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--sand-100); color: var(--text-muted); }
.tile__badge--live { background: #E5F4EA; color: #1E6B3A; }

/* ---------- Editorial split ---------- */
.split { display: grid; gap: clamp(32px, 5vw, 80px); align-items: start; }
/* long <select> options must not widen grid tracks */
.split > *, .form-grid > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } .split--even { grid-template-columns: 1fr 1fr; } .split--rev { grid-template-columns: 7fr 5fr; } }
.sticky { position: sticky; inset-block-start: calc(var(--header-h) + 32px); }

/* ---------- Quote ---------- */
.quote { position: relative; margin: 0; }
.quote__mark { width: 56px; height: 56px; color: var(--gold-500); margin-block-end: var(--space-3); }
.quote blockquote { margin: 0; font: 700 var(--fs-xl)/1.7 var(--font-display); color: #fff; }
.quote figcaption { display: flex; align-items: center; gap: 16px; margin-block-start: var(--space-5); }
.quote figcaption img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; border: 2px solid rgba(255, 255, 255, .2); }
.quote figcaption img.quote__logo { object-fit: contain; background: #fff; padding: 6px; }
.quote figcaption strong { display: block; color: #fff; font-family: var(--font-display); }
.quote figcaption span { color: var(--text-inverse-muted); font-size: var(--fs-sm); }

/* ---------- News cards ---------- */
.news-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .news-grid { grid-template-columns: 1.4fr 1fr; } }
.news-card { display: flex; flex-direction: column; background: var(--surface-raised); border-radius: var(--card-radius); overflow: hidden; border: 1px solid var(--border-subtle); text-decoration: none; color: inherit; transition: transform .3s var(--ease-out), box-shadow .3s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); color: inherit; }
.news-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand-200); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card__media--statement { display: grid; place-items: center; background: var(--navy-900); color: #fff; padding: 32px; text-align: center; }
.news-card__media--statement span { font: 900 var(--fs-xl)/1.3 var(--font-display); }
.news-card__body { padding: clamp(20px, 2.5vw, 32px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card__body h3 { font-size: var(--fs-lg); margin: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--fs-xs); color: var(--text-muted); }
.meta .icon { width: 16px; height: 16px; }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: var(--blue-100); color: var(--blue-700); }
.chip--warm { background: #F6ECD8; color: var(--gold-700); }
.chip--draft { background: #FDECEA; color: #8F1D14; border: 1px dashed #8F1D14; }

/* ---------- Regions ---------- */
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.region {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface-raised);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.region__n { font: 800 var(--fs-sm)/1 var(--font-display); color: var(--accent-interactive); min-width: 2ch; font-variant-numeric: tabular-nums; }
.region strong { display: block; font-size: var(--fs-sm); color: var(--text-strong); line-height: 1.5; }
.region__status { font-size: var(--fs-xs); color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.region__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2E9E5B; }
.section--inverse .region { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
.section--inverse .region strong { color: #fff; }
.values-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.values-list .region { flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; }
.values-list strong { font-size: var(--fs-md); }
.values-list p { margin: 0; color: var(--text-inverse-muted); font-size: var(--fs-sm); }
.section--inverse .region__status { color: var(--text-inverse-muted); }
.section--inverse .region__n { color: var(--sky-400); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: clamp(24px, 3vw, 40px);
  background: linear-gradient(135deg, var(--blue-600), var(--navy-900) 75%);
  color: #fff; padding: clamp(40px, 6vw, 88px);
  display: grid; gap: var(--space-5); align-items: center;
}
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr 1fr; } }
.cta-band::after {
  content: ""; position: absolute; inset-block-end: -30%; inset-inline-end: -6%; width: min(46vw, 460px); aspect-ratio: 1 / 1.05;
  clip-path: var(--roof); background: rgba(255, 255, 255, .06); pointer-events: none;
}
.cta-band h2 { color: #fff; font-size: var(--fs-2xl); margin-block-end: var(--space-3); }
.cta-band p { color: var(--text-inverse-muted); font-size: var(--fs-lg); margin: 0; max-width: 52ch; }
.cta-band .actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .cta-band .actions { justify-content: flex-end; } }
.cta-band .eyebrow { color: var(--gold-500); }

/* ---------- Page hero (inner) ---------- */
.page-hero { position: relative; padding-block: clamp(40px, 6vw, 80px) clamp(40px, 5vw, 72px); border-block-end: 1px solid var(--border-subtle); background: var(--sand-50); overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; inset-block-end: -60px; inset-inline-end: 4%; width: 280px; height: 260px;
  clip-path: var(--roof); background: var(--sand-200); opacity: .7; pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: var(--fs-2xl); font-weight: 900; margin-block-end: var(--space-3); max-width: 22ch; }
.page-hero .lede { max-width: 60ch; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 var(--space-4); padding: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 6px; opacity: .6; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-interactive); text-decoration: underline; }

/* ---------- Prose ---------- */
.prose { font-size: var(--fs-md); max-width: 70ch; }
.prose p { margin-block-end: 1.3em; }
.prose h2 { font-size: var(--fs-xl); margin-block: 1.6em .6em; }
.prose--lead > p:first-of-type { font-size: var(--fs-lg); color: var(--text-strong); font-weight: 500; }

/* ---------- Fact list ---------- */
.facts { display: grid; gap: 0; margin: 0; background: var(--surface-raised); border-radius: var(--card-radius); border: 1px solid var(--border-subtle); overflow: hidden; }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 16px 24px; border-block-end: 1px solid var(--border-subtle); }
.facts div:last-child { border-block-end: 0; }
.facts dt { color: var(--text-muted); font-size: var(--fs-sm); }
.facts dd { margin: 0; color: var(--text-strong); font-weight: 700; }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 11px; width: 2px; background: var(--sand-300); }
.timeline li { position: relative; padding-inline-start: 48px; padding-block-end: var(--space-6); }
.timeline li:last-child { padding-block-end: 0; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 6px; width: 24px; height: 22px;
  background: var(--accent-interactive); clip-path: var(--roof);
}
.timeline time, .timeline .tl-label { display: block; font: 800 var(--fs-sm)/1.4 var(--font-display); color: var(--accent-warm); margin-block-end: 6px; }
.timeline h3 { font-size: var(--fs-lg); margin-block-end: 8px; }
.timeline p { color: var(--text-muted); margin: 0; }

/* ---------- People ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.person { background: var(--surface-raised); border-radius: var(--card-radius); border: 1px solid var(--border-subtle); overflow: hidden; transition: transform .3s var(--ease-out), box-shadow .3s; }
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.person__img { aspect-ratio: 1; background: var(--sand-200); overflow: hidden; }
.person__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(.92); }
.person__body { padding: 16px 18px 20px; }
.person__body h3 { font-size: var(--fs-md); margin: 0 0 2px; }
.person__body p { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.person--lead { display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) { .person--lead { grid-template-columns: 340px 1fr; } }
.person--lead .person__img { aspect-ratio: 4 / 3.4; }
.person--lead .person__body { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.person--lead h2 { font-size: var(--fs-xl); margin: 0; }

/* ---------- Feature list ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--accent-interactive); margin-block-start: 5px; }
.section--inverse .checklist .icon { color: var(--sky-400); }

/* ---------- Program axis ---------- */
.axis { display: grid; gap: clamp(24px, 4vw, 56px); padding-block: clamp(40px, 6vw, 72px); border-block-start: 1px solid var(--border-subtle); }
.axis:first-of-type { border-block-start: 0; padding-block-start: 0; }
@media (min-width: 900px) { .axis { grid-template-columns: 4fr 8fr; } }
.axis__head .tile__num { font-size: var(--fs-3xl); color: var(--blue-100); -webkit-text-stroke: 1.5px var(--blue-600); display: block; margin-block-end: 8px; }
.axis__head h2 { font-size: var(--fs-xl); }
.axis__grid { display: grid; gap: 16px; }
@media (min-width: 600px) { .axis__grid { grid-template-columns: 1fr 1fr; } }
.axis-item { background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 22px 24px; }
.axis-item h3 { font-size: var(--fs-md); margin-block-end: 6px; display: flex; gap: 10px; align-items: center; }
.axis-item h3 .icon { color: var(--accent-interactive); }
.axis-item p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.axis-item .figure { color: var(--accent-interactive); font-weight: 800; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: var(--space-5) 0 0; }
.toc a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--surface-raised); color: var(--text-strong); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.toc a:hover { border-color: var(--accent-interactive); color: var(--accent-interactive); }

/* ---------- Article ---------- */
.article { max-width: 760px; margin-inline: auto; }
.article + .article { margin-block-start: var(--space-8); padding-block-start: var(--space-8); border-block-start: 1px solid var(--border-subtle); }
.article h2 { font-size: var(--fs-xl); margin-block: 12px 16px; }
.article figure { margin: var(--space-5) 0; }
.article figure img { border-radius: var(--radius-md); width: 100%; }
.article figcaption { font-size: var(--fs-xs); color: var(--text-muted); margin-block-start: 8px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: var(--space-5) 0; }
.gallery img { border-radius: var(--radius-md); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: var(--space-5); padding-block-start: var(--space-4); border-block-start: 1px solid var(--border-subtle); font-size: var(--fs-sm); color: var(--text-muted); }
.share a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-subtle); background: var(--surface-raised); color: var(--text-strong); }
.share a:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.prose h3 { font-size: var(--fs-lg); margin-block: 2em .8em; }
.document { margin: 0 0 var(--space-4); }
.document img { max-width: 560px; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-soft); }
.transcript { background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 0 20px; }
.transcript summary { min-height: 52px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent-interactive); cursor: pointer; }
.transcript[open] { padding-block-end: 8px; }
.transcript[open] summary { border-block-end: 1px solid var(--border-subtle); margin-block-end: 16px; }
.statement { background: var(--surface-raised); border: 1px solid var(--border-subtle); border-inline-start: 5px solid var(--accent-interactive); border-radius: var(--radius-md); padding: clamp(24px, 4vw, 40px); }

/* ---------- Letter (SG word) ---------- */
.letter { background: var(--surface-raised); border-radius: var(--card-radius); border: 1px solid var(--border-subtle); padding: clamp(28px, 6vw, 72px); max-width: 820px; margin-inline: auto; position: relative; }
.letter::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline: clamp(28px, 6vw, 72px); height: 4px; background: linear-gradient(90deg, var(--gold-500), var(--blue-600)); border-radius: 0 0 4px 4px; }
.letter p { font-size: var(--fs-md); line-height: 2; }
.letter .salutation { font: 700 var(--fs-lg)/1.8 var(--font-display); color: var(--text-strong); }
.signature { display: flex; align-items: center; gap: 16px; margin-block-start: var(--space-6); padding-block-start: var(--space-4); border-block-start: 1px dashed var(--sand-300); }
.signature img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.signature strong { display: block; font-family: var(--font-display); color: var(--text-strong); }
.signature span { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- Forms ---------- */
.form-card { background: var(--surface-raised); border-radius: var(--card-radius); border: 1px solid var(--border-subtle); padding: clamp(24px, 4vw, 48px); }
.form-section { border: 0; margin: 0 0 var(--space-6); padding: 0; min-width: 0; }
.form-section legend { font: 800 var(--fs-lg)/1.4 var(--font-display); color: var(--text-strong); margin-block-end: var(--space-4); display: flex; align-items: center; gap: 12px; padding: 0; }
.form-section legend .step { display: inline-grid; place-items: center; width: 32px; height: 30px; background: var(--accent-interactive); color: #fff; font-size: var(--fs-sm); clip-path: var(--roof); padding-block-start: 4px; }
.form-grid { display: grid; gap: 18px 20px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: var(--fs-sm); color: var(--text-strong); }
.field .req { color: #B42318; }
.field .hint { font-size: var(--fs-xs); color: var(--text-muted); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px;
  border: 1.5px solid var(--sand-300); background: var(--sand-50); color: var(--text-strong);
  font: 500 var(--fs-md)/1.5 var(--font-body);
  transition: border-color var(--dur-micro), box-shadow var(--dur-micro), background var(--dur-micro);
}
.textarea { min-height: 160px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: #C6B996; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-interactive); background: #fff; box-shadow: 0 0 0 4px rgba(36, 101, 196, .16); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #B42318; }
.field .error { display: none; color: #B42318; font-size: var(--fs-xs); font-weight: 600; }
.field.has-error .error { display: block; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2345526A' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 16px center; padding-inline-end: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--sand-300); background: var(--sand-50); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: all var(--dur-micro); }
.chips input:checked + span { background: var(--blue-100); border-color: var(--accent-interactive); color: var(--blue-700); }
.chips input:focus-visible + span { box-shadow: var(--focus-ring); }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border-radius: var(--radius-md); background: var(--sand-100); font-size: var(--fs-sm); }
.consent input { width: 22px; height: 22px; margin-block-start: 4px; accent-color: var(--accent-interactive); flex-shrink: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block-start: var(--space-5); }
.form-status { margin-block-start: var(--space-4); padding: 16px 20px; border-radius: var(--radius-md); font-weight: 600; display: none; }
.form-status.is-success { display: block; background: #E5F4EA; color: #1E6B3A; }
.form-status.is-error { display: block; background: #FDECEA; color: #8F1D14; }
.hp { position: absolute; inset-inline-start: -9999px; }
.print-only { display: none; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.contact-item .tile__icon { width: 44px; height: 44px; }
.contact-item strong { display: block; color: var(--text-strong); font-size: var(--fs-sm); }
.contact-item span { font-size: var(--fs-xs); color: var(--text-muted); display: block; }
.contact-item a { font-weight: 700; word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--text-inverse-muted); padding-block: clamp(56px, 7vw, 96px) 24px; margin-block-start: 0; }
.site-footer a { color: var(--text-inverse-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-block-end: 16px; }
.footer-brand img { width: 56px; height: 55px; background: #fff; border-radius: 12px; padding: 4px; }
.footer-brand strong { display: block; color: #fff; font: 800 1.05rem/1.4 var(--font-display); }
.footer-brand span span { font-size: var(--fs-xs); display: block; }
.footer-motto { font: 700 var(--fs-lg)/1.6 var(--font-display); color: #fff; margin-block-end: 20px; }
.site-footer h2 { font-size: var(--fs-sm); color: var(--gold-500); margin-block-end: 16px; font-family: var(--font-body); font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--fs-sm); }
.social { display: flex; gap: 8px; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff; }
.social a:hover { background: var(--blue-600); text-decoration: none; }
.footer-bottom { margin-block-start: 56px; padding-block-start: 24px; border-block-start: 1px solid rgba(255, 255, 255, .08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); }

/* ---------- Latin script / LTR (French, English) ----------
   Layout already uses logical properties; only glyph direction,
   fonts and rhythm need overrides. */
:root[dir="ltr"] {
  --font-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
:root[dir="ltr"] body { line-height: 1.65; }
:root[dir="ltr"] :is(h1, h2, h3, h4) { line-height: 1.15; letter-spacing: -.015em; }
:root[dir="ltr"] .hero-title { line-height: 1.04; letter-spacing: -.02em; word-spacing: .08em; }
:root[dir="ltr"] .section-title, :root[dir="ltr"] .page-hero h1 { letter-spacing: -.025em; }
:root[dir="ltr"] .page-hero h1 { max-width: 24ch; }
:root[dir="ltr"] .quote blockquote { line-height: 1.45; }
:root[dir="ltr"] .letter p { line-height: 1.8; }
:root[dir="ltr"] .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
:root[dir="ltr"] .icon--arrow { scale: -1 1; }
:root[dir="ltr"] .breadcrumb li + li::before { content: "›"; }
:root[dir="ltr"] .select { background-position: right 16px center; }

/* ---------- Reveal motion (JS-enhanced only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  /* hero starts partially visible so it still counts as an early LCP paint */
  .hero-anim > * { animation: rise-soft .7s var(--ease-out) both; }
  .hero-anim > *:nth-child(2) { animation-delay: .08s; }
  .hero-anim > *:nth-child(3) { animation-delay: .16s; }
  .hero-anim > *:nth-child(4) { animation-delay: .24s; }
  .hero-anim > *:nth-child(5) { animation-delay: .32s; }
  .hero .house-frame { animation: rise-soft .9s var(--ease-out) .15s both; }
}
@keyframes rise-soft { from { opacity: .3; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Print (join form) ---------- */
@media print {
  .site-header, .site-footer, .page-hero, .no-print, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .print-only { display: block; }
  .form-card { border: 0; padding: 0; }
  .input, .select { border: 0; border-block-end: 1px solid #999; border-radius: 0; background: none; min-height: 32px; }
  .section { padding: 0; }
  .form-section { break-inside: avoid; margin-block-end: 16px; }
}
