/* =====================================================================
   AI GEN ACADEMY — brand system
   Purpose-built stylesheet for the rebuilt home page. Every directional
   value uses a CSS logical property, so the whole layout mirrors itself
   when <html dir="rtl"> without a single direction override.

   Pages are generated by src/build.py; page content lives in src/pages/.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens — sampled from the official logo artwork and the approved
   homepage mockup, not invented.
   --------------------------------------------------------------------- */
:root {
  /* Navy */
  --navy-900: #001126; /* footer, deepest band          */
  --navy-800: #001937; /* hero + feature bands (mockup) */
  --navy-700: #04184b; /* logo navy                     */
  --navy-600: #0b1f4a; /* brief navy, raised surfaces   */

  /* Gold — accent only, never a full-page background */
  --gold-600: #d69a17; /* hover / pressed  (brief)      */
  --gold-500: #eaaf36; /* CTAs, rules      (mockup)     */
  --gold-400: #fbb519; /* highlights       (logo)       */
  --gold-50:  #fdf6e4; /* tinted panels, step circles   */

  /* Neutrals */
  --paper:    #ffffff;
  --paper-2:  #f7f9fc; /* alternating light section     */
  --line:     #e3e9f2;
  --ink:      #0b1f3a;
  --ink-muted:#5a6b85;
  --on-navy:        #ffffff;
  --on-navy-muted:  #b9c6db;

  /* Space — a single 4px-based scale */
  --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 2.5rem;  --s-8: 3rem;
  --s-9: 4rem;    --s-10: 5rem;   --s-11: 6rem;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(11, 31, 58, .04),
                 0 8px 24px rgba(11, 31, 58, .07);
  --shadow-lift: 0 4px 10px rgba(11, 31, 58, .08),
                 0 18px 40px rgba(11, 31, 58, .14);
  --shadow-head: 0 1px 0 var(--line), 0 6px 24px rgba(11, 31, 58, .06);

  --header-h: 76px;
  --wrap: 1240px;

  --font-en: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-ar: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ---------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* The header is fixed; anchored sections must clear it. */
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-ar); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}
/* Arabic script reads poorly with tight tracking or forced caps. */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 { letter-spacing: normal; line-height: 1.4; }
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .btn { letter-spacing: normal; text-transform: none; }

p { margin: 0; }

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

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--s-4);
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { inset-block-start: 0; }

/* ---------------------------------------------------------------------
   3. Language visibility
   Each string is authored twice. brand.js sets dir on <html>; CSS picks.
   --------------------------------------------------------------------- */
html:not([dir="rtl"]) .lang-ar { display: none !important; }
html[dir="rtl"]       .lang-en { display: none !important; }

/* An element forced to read left-to-right inside an RTL page (the logo
   lockup, latin acronyms in Arabic copy). */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Arrow glyphs point along the reading direction. This is the one thing
   logical properties cannot express, so it is the only dir override. */
html[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ---------------------------------------------------------------------
   4. Layout primitives
   --------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (min-width: 900px) { .wrap { padding-inline: var(--s-8); } }

.section { padding-block: var(--s-10); }
@media (min-width: 900px) { .section { padding-block: var(--s-11); } }

.section--tint  { background: var(--paper-2); }
.section--navy  { background: var(--navy-800); color: var(--on-navy); }
.section--navy-deep { background: var(--navy-900); color: var(--on-navy); }
.section--navy h2, .section--navy-deep h2,
.section--navy h3, .section--navy-deep h3 { color: var(--on-navy); }

.grid { display: grid; gap: var(--s-5); }

/* ---------------------------------------------------------------------
   5. Typography helpers
   --------------------------------------------------------------------- */
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-block-end: var(--s-4);
  color: var(--gold-500);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 4px; height: 4px; flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
}

.display {
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.9rem);
  font-weight: 800;
}
.display .accent { color: var(--gold-500); }

.h-sec {
  font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem);
  color: var(--ink);
}

.lede {
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 1.05rem;
}
.section--navy .lede,
.section--navy-deep .lede,
.hero .lede { color: var(--on-navy-muted); }

/* Section header: title on the start edge, supporting line on the end
   edge — stacking on narrow screens. */
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-block-end: var(--s-8);
}
.sec-head .lede { text-align: end; }
@media (max-width: 720px) { .sec-head .lede { text-align: start; } }

.rule-gold {
  width: 56px; height: 4px;
  margin-block: var(--s-4) 0;
  border-radius: 2px;
  background: var(--gold-500);
}

/* ---------------------------------------------------------------------
   6. Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s,
              transform .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 6px 18px rgba(234, 175, 54, .32);
}
.btn--gold:hover { background: var(--gold-400); }

/* On navy */
.btn--ghost {
  border-color: rgba(255, 255, 255, .45);
  color: var(--on-navy);
}
.btn--ghost:hover {
  border-color: var(--gold-500);
  background: rgba(255, 255, 255, .06);
}

/* On light */
.btn--outline {
  border-color: var(--navy-800);
  color: var(--navy-800);
}
.btn--outline:hover { background: var(--navy-800); color: var(--on-navy); }

.btn--solid-navy {
  background: var(--navy-700);
  border-color: rgba(255, 255, 255, .22);
  color: var(--on-navy);
}
.btn--solid-navy:hover { background: var(--navy-600); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------------------------------------------------------------------
   7. Header
   --------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-head);
}
.header-bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--header-h);
}
.brand { flex: none; }
.brand img { height: 46px; width: auto; }
@media (max-width: 520px) { .brand img { height: 38px; } }

.main-nav {
  display: none;
  align-items: center;
  gap: var(--s-1);
  margin-inline: auto;
}
@media (min-width: 1160px) { .main-nav { display: flex; } }

.nav-link {
  position: relative;
  display: inline-flex;
  border: 0;
  background: none;
  cursor: pointer;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color .18s, background-color .18s;
}
.nav-link:hover { color: var(--navy-700); background: var(--paper-2); }
.nav-link[aria-current="page"] { color: var(--navy-800); font-weight: 800; }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-block-end: 2px;
  inset-inline: var(--s-3);
  height: 3px;
  border-radius: 2px;
  background: var(--navy-800);
}
.nav-link .chev { width: 14px; height: 14px; flex: none; transition: transform .18s; }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Dropdown */
.has-menu { position: relative; }
.menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: 10;
  min-width: 260px;
  padding: var(--s-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.menu::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 100%;
  height: 10px;
}
.menu[hidden] { display: none; }
.menu a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: background-color .15s, color .15s;
}
.menu a:hover { background: var(--paper-2); color: var(--navy-700); }
.menu a .bullet {
  width: 6px; height: 6px; flex: none;
  border-radius: 50%;
  background: var(--gold-500);
}

/* Language switch — EN | AR, the active one solid */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-inline-start: auto;
  font-size: .85rem;
  font-weight: 800;
}
@media (min-width: 1160px) { .lang-switch { margin-inline-start: 0; } }
.lang-switch .sep { color: var(--line); }
.lang-btn {
  padding: var(--s-1) var(--s-2);
  border: 0;
  background: none;
  border-radius: 6px;
  color: var(--gold-600);
  cursor: pointer;
  transition: color .15s, background-color .15s;
}
.lang-btn:hover { background: var(--paper-2); }
.lang-btn[aria-pressed="true"] { color: var(--navy-800); }

.header-cta { display: none; }
@media (min-width: 780px) { .header-cta { display: inline-flex; flex: none; } }

/* Eight nav items, a language switch and a CTA have to share the same
   1240px container at every desktop width, so the desktop nav is compact by
   default rather than being squeezed by flexbox. */
@media (min-width: 1160px) {
  .nav-link { padding-inline: var(--s-2); font-size: .875rem; }
  .header-cta { padding-inline: var(--s-4); font-size: .875rem; }
  .main-nav { gap: 0; }
}

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
}
@media (min-width: 1160px) { .burger { display: none; } }
.burger svg { width: 22px; height: 22px; }

/* Mobile drawer */
.mobile-nav {
  display: grid;
  gap: var(--s-1);
  max-height: 0;
  overflow: hidden;
  border-block-start: 1px solid transparent;
  opacity: 0;
  transition: max-height .28s ease, opacity .2s ease, padding .28s ease;
  padding-block: 0;
}
.mobile-nav.open {
  max-height: 80vh;
  overflow-y: auto;
  padding-block: var(--s-4);
  border-block-start-color: var(--line);
  opacity: 1;
}
.mobile-nav a {
  padding: var(--s-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.mobile-nav a:hover { background: var(--paper-2); }
.mobile-nav .sub { padding-inline-start: var(--s-6); font-weight: 600; font-size: .92rem; }

/* ---------------------------------------------------------------------
   8. Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  margin-block-start: var(--header-h);
  background: var(--navy-800);
  color: var(--on-navy);
  overflow: hidden;
}
.hero-media {
  position: relative;
  min-height: 260px;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
/* A scrim so the headline stays legible where it meets the photograph.
   Mirrors with the page: it always fades from the text side. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
              rgba(0, 25, 55, .78) 0%,
              rgba(0, 25, 55, .35) 55%,
              rgba(0, 25, 55, .55) 100%);
}
.hero-body {
  position: relative;
  z-index: 1;
  padding-block: var(--s-8) var(--s-9);
}
.hero .display { color: var(--on-navy); }
.hero .lede { margin-block-start: var(--s-5); }
.hero .btn-row { margin-block-start: var(--s-7); }

.tagline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-block-start: var(--s-8);
  color: var(--gold-500);
  font-weight: 800;
}
.tagline::before, .tagline::after {
  content: "";
  height: 2px;
  background: var(--gold-500);
  opacity: .55;
}
.tagline::before { width: 42px; flex: none; }
.tagline::after  { flex: 1; }

@media (min-width: 980px) {
  .hero-media {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 50%;
    min-height: 0;
  }
  .hero-media::after {
    background: linear-gradient(to var(--fade-to, right),
                rgba(0, 25, 55, 1) 0%,
                rgba(0, 25, 55, .6) 24%,
                rgba(0, 25, 55, .12) 60%,
                rgba(0, 25, 55, .3) 100%);
  }
  .hero-body { padding-block: var(--s-11); }
  .hero-inner { max-width: 560px; }
}
/* The photo sits on the inline-end edge, so the fade must reverse in RTL. */
html[dir="rtl"] .hero-media::after { --fade-to: left; }

/* ---------------------------------------------------------------------
   9. Numbers band
   --------------------------------------------------------------------- */
.stats {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .stats { grid-template-columns: repeat(4, 1fr) 1.15fr; } }

.stat { display: flex; align-items: flex-start; gap: var(--s-4); }
.stat svg { width: 34px; height: 34px; flex: none; color: var(--gold-500); }
.stat .num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--on-navy);
}
.stat .label { display: block; font-size: .95rem; font-weight: 700; color: var(--on-navy); }
.stat .sub { display: block; font-size: .82rem; color: var(--on-navy-muted); }

.stats-quote {
  padding-inline-start: var(--s-5);
  border-inline-start: 2px solid rgba(255, 255, 255, .18);
  font-weight: 800;
  line-height: 1.5;
}
.stats-quote .en { color: var(--on-navy); }
.stats-quote .ar { color: var(--gold-500); }
@media (max-width: 1039px) {
  .stats-quote {
    padding-inline-start: 0;
    border-inline-start: 0;
    padding-block-start: var(--s-5);
    border-block-start: 2px solid rgba(255, 255, 255, .18);
  }
}

/* ---------------------------------------------------------------------
   10. Cards
   --------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 175, 54, .5);
  box-shadow: var(--shadow-lift);
}
.card-media { aspect-ratio: 4 / 3; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: var(--s-5); }
.card-body h3 { font-size: 1.12rem; color: var(--navy-800); }
.card-body .ar-sub {
  display: block;
  margin-block-start: var(--s-1);
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold-600);
}
.card-body p {
  margin-block-start: var(--s-3);
  font-size: .92rem;
  color: var(--ink-muted);
}

.cards-7 { grid-template-columns: 1fr; }
@media (min-width: 620px)  { .cards-7 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .cards-7 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .cards-7 { grid-template-columns: repeat(4, 1fr); } }

/* Audience cards are quieter: smaller photo, no paragraph. */
.card--audience .card-media { aspect-ratio: 3 / 2; }
.card--audience .card-body { padding: var(--s-4); }
.card--audience h3 { font-size: 1rem; }
.card--audience .note {
  display: block;
  margin-block-start: var(--s-2);
  font-size: .8rem;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------------
   11. Approach steps
   --------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px)  { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(6, 1fr); } }

.step { position: relative; text-align: center; }
.step .disc {
  display: grid;
  place-items: center;
  width: 74px; height: 74px;
  margin-inline: auto;
  border: 2px solid rgba(234, 175, 54, .45);
  border-radius: 50%;
  background: var(--gold-50);
}
.step .disc svg { width: 32px; height: 32px; color: var(--navy-800); }
.step .n {
  display: block;
  margin-block-start: var(--s-4);
  font-size: .78rem;
  font-weight: 800;
  color: var(--gold-600);
  letter-spacing: .1em;
}
.step h3 {
  margin-block-start: var(--s-1);
  font-size: 1.02rem;
  color: var(--navy-800);
}
.step p {
  margin-block-start: var(--s-2);
  font-size: .85rem;
  color: var(--ink-muted);
}
/* Connector between discs — drawn on the inline-start edge of each step
   except the first in its row, so it mirrors and wraps correctly. */
.step::before {
  content: "";
  position: absolute;
  inset-block-start: 36px;
  inset-inline-end: calc(100% - var(--s-1));
  width: var(--s-5);
  height: 2px;
  background: var(--line);
}
.step:first-child::before { display: none; }
@media (max-width: 1099px) {
  .step:nth-child(3n + 1)::before { display: none; }
}
@media (max-width: 719px) {
  .step::before { display: none; }
  .step:nth-child(odd)::before { display: none; }
}

.claim {
  align-self: center;
  padding: var(--s-6);
  background: var(--gold-50);
  border: 2px solid rgba(234, 175, 54, .55);
  border-radius: var(--radius);
}
.claim .en { font-size: 1.3rem; font-weight: 800; color: var(--navy-800); }
.claim .ar {
  display: block;
  margin-block-start: var(--s-3);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-700);
}

.approach-layout { display: grid; gap: var(--s-8); }
@media (min-width: 1240px) {
  .approach-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}

/* ---------------------------------------------------------------------
   12. Offers (navy), chain rows, ecosystem tiles, reasons
   --------------------------------------------------------------------- */
.offers { grid-template-columns: 1fr; }
@media (min-width: 900px) { .offers { grid-template-columns: repeat(3, 1fr); } }

.offer {
  padding: var(--s-6);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
}
.offer h3 { font-size: 1.15rem; color: var(--gold-500); }
.offer .ar-sub {
  display: block;
  margin-block-start: var(--s-1);
  font-size: .95rem;
  font-weight: 700;
  color: var(--on-navy);
}
.offer ul {
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-2);
}
.offer li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: .92rem;
  color: var(--on-navy-muted);
}
.offer li svg { width: 17px; height: 17px; flex: none; margin-block-start: 4px; color: var(--gold-500); }

/* Assess → Train → … chain */
.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-block-start: var(--s-4);
}
.chain .link {
  padding: var(--s-2) var(--s-3);
  background: rgba(234, 175, 54, .14);
  border: 1px solid rgba(234, 175, 54, .4);
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 800;
  color: var(--gold-500);
  white-space: nowrap;
}
.chain .arrow { width: 14px; height: 14px; flex: none; color: var(--on-navy-muted); }

.chain--light .link {
  background: var(--gold-50);
  border-color: rgba(234, 175, 54, .5);
  color: var(--navy-700);
}
.chain--light .arrow { color: var(--ink-muted); }

/* Learning-philosophy split bar */
.mix {
  display: flex;
  height: 54px;
  margin-block: var(--s-6) var(--s-4);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.mix span {
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 800;
  color: var(--navy-900);
}
.mix .m1 { flex: 20; background: rgba(234, 175, 54, .22); }
.mix .m2 { flex: 25; background: rgba(234, 175, 54, .42); }
.mix .m3 { flex: 40; background: var(--gold-500); }
.mix .m4 { flex: 10; background: rgba(4, 24, 75, .82); color: var(--on-navy); }
.mix .m5 { flex: 5;  background: var(--navy-800); color: var(--on-navy); }

.mix-key {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  font-size: .85rem;
  color: var(--ink-muted);
}
.mix-key b { color: var(--navy-800); }

/* Ecosystem tiles */
.tiles { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px)  { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(6, 1fr); } }

.tile {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 175, 54, .6);
  background: rgba(255, 255, 255, .08);
}
.tile svg { width: 30px; height: 30px; margin-inline: auto; color: var(--gold-500); }
.tile b { font-size: .92rem; color: var(--on-navy); }
.tile span { font-size: .82rem; color: var(--on-navy-muted); }

/* Why-us reasons */
.reasons { grid-template-columns: 1fr; }
@media (min-width: 680px)  { .reasons { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .reasons { grid-template-columns: repeat(3, 1fr); } }

.reason { display: flex; align-items: flex-start; gap: var(--s-4); }

/* Shared icon box — used by .reason, .panel and anything else that needs
   a framed glyph. Defined once so an unstyled icon can never render at its
   natural size. */
.ico {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--gold-50);
  border: 1px solid rgba(234, 175, 54, .4);
}
.ico svg { width: 22px; height: 22px; color: var(--navy-800); }
.section--navy .ico {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .18);
}
.section--navy .ico svg { color: var(--gold-500); }
.reason h3 { font-size: 1rem; color: var(--navy-800); }
.reason p { margin-block-start: var(--s-1); font-size: .88rem; color: var(--ink-muted); }

/* Locations */
.locations { grid-template-columns: 1fr; }
@media (min-width: 760px) { .locations { grid-template-columns: repeat(3, 1fr); } }
.place {
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.place .flagline svg { width: 16px; height: 16px; flex: none; }
.place .flagline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--gold-600);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.place h3 { margin-block-start: var(--s-3); font-size: 1.3rem; color: var(--navy-800); }
.place p { margin-block-start: var(--s-2); font-size: .9rem; color: var(--ink-muted); }

/* ---------------------------------------------------------------------
   13. Closing CTA
   --------------------------------------------------------------------- */
.closing {
  position: relative;
  isolation: isolate;
  color: var(--on-navy);
  overflow: hidden;
}
.closing > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
              rgba(0, 17, 38, .9), rgba(0, 25, 55, .78));
}
.closing-grid { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 900px) {
  .closing-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-9); }
  .closing-copy {
    padding-inline-start: var(--s-7);
    border-inline-start: 2px solid rgba(255, 255, 255, .28);
  }
}
.closing h2 { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.7rem); color: var(--gold-500); }

/* ---------------------------------------------------------------------
   14. Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--on-navy-muted);
  padding-block: var(--s-9) var(--s-6);
}
.footer-grid { display: grid; gap: var(--s-7); }
@media (min-width: 820px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-8); }
}
.site-footer img { height: 62px; width: auto; }
.site-footer h4 {
  margin-block-end: var(--s-4);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-500);
}
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.site-footer a { font-size: .9rem; transition: color .15s; }
.site-footer a:hover { color: var(--gold-500); }
.footer-blurb { margin-block-start: var(--s-4); font-size: .92rem; max-width: 40ch; }
.footer-motto { margin-block-start: var(--s-4); color: var(--gold-500); font-weight: 800; }
.footer-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-block-start: var(--s-8);
  padding-block-start: var(--s-5);
  border-block-start: 1px solid rgba(255, 255, 255, .12);
  font-size: .82rem;
}

/* ---------------------------------------------------------------------
   15. Inner-page components
   Everything below is shared by the pages generated from src/build.py.
   --------------------------------------------------------------------- */

/* Page hero — the shorter navy band every inner page opens with. */
.page-hero {
  position: relative;
  margin-block-start: var(--header-h);
  padding-block: var(--s-9);
  background: var(--navy-800);
  color: var(--on-navy);
  overflow: hidden;
}
.page-hero::after {
  /* A soft gold bloom on the inline-end edge; purely decorative. */
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-end: -10%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 175, 54, .16), transparent 68%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 {
  max-width: 20ch;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem);
  color: var(--on-navy);
}
.page-hero .lede { margin-block-start: var(--s-5); }
.page-hero .btn-row { margin-block-start: var(--s-7); }

/* Page hero with a photo — same treatment as the home hero: a strip under
   the copy on small screens, the inline-end half of the band on desktop. */
.page-hero--media::after { display: none; }
.page-hero-media {
  position: relative;
  height: 240px;
  margin-block: var(--s-7) calc(-1 * var(--s-9));
}
.page-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 25, 55, .7) 0%, rgba(0, 25, 55, .1) 45%);
}
@media (min-width: 980px) {
  .page-hero--media { padding-block: var(--s-10); }
  .page-hero--media .wrap > * { max-width: 560px; }
  .page-hero-media {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 50%;
    height: auto;
    margin: 0;
  }
  .page-hero-media::after {
    background: linear-gradient(to var(--fade-to, right),
                rgba(0, 25, 55, 1) 0%,
                rgba(0, 25, 55, .6) 24%,
                rgba(0, 25, 55, .12) 60%,
                rgba(0, 25, 55, .3) 100%);
  }
}
html[dir="rtl"] .page-hero-media::after { --fade-to: left; }

.crumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-block-end: var(--s-4);
  font-size: .8rem;
  font-weight: 700;
  color: var(--on-navy-muted);
}
.crumb a:hover { color: var(--gold-500); }
.crumb .sep { opacity: .5; }

/* Text beside an image. */
.split { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-9); }
  /* Put the picture first in the reading order for alternating sections. */
  .split--flip .split-media { order: -1; }
}
.split-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

/* Ticked list, used on light and navy alike. */
.list-check { margin: var(--s-5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.list-check li { display: flex; align-items: flex-start; gap: var(--s-3); font-size: .95rem; color: var(--ink-muted); }
.list-check svg { width: 18px; height: 18px; flex: none; margin-block-start: 5px; color: var(--gold-600); }
.section--navy .list-check li,
.page-hero .list-check li { color: var(--on-navy-muted); }
.section--navy .list-check svg,
.page-hero .list-check svg { color: var(--gold-500); }

/* A numbered pathway / stage card. */
.pathway {
  position: relative;
  padding: var(--s-6);
  padding-inline-start: var(--s-8);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.pathway::before {
  content: "";
  position: absolute;
  inset-block: var(--s-5);
  inset-inline-start: 0;
  width: 4px;
  border-radius: 0 2px 2px 0;
  background: var(--gold-500);
}
.pathway .age {
  display: inline-block;
  padding: 2px var(--s-3);
  margin-block-end: var(--s-3);
  background: var(--gold-50);
  border: 1px solid rgba(234, 175, 54, .5);
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 800;
  color: var(--navy-700);
}
.pathway h3 { font-size: 1.15rem; color: var(--navy-800); }
.pathway p { margin-block-start: var(--s-2); font-size: .92rem; color: var(--ink-muted); }

.cols-3 { grid-template-columns: 1fr; }
@media (min-width: 680px)  { .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* Plain bordered panel — used for facts, notes and summaries. */
.panel {
  padding: var(--s-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section--tint .panel { background: var(--paper); }
.section--navy .panel {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12);
}
.panel h3 { font-size: 1.08rem; color: var(--navy-800); }
.section--navy .panel h3 { color: var(--gold-500); }
.panel p { margin-block-start: var(--s-3); font-size: .93rem; color: var(--ink-muted); }
.section--navy .panel p { color: var(--on-navy-muted); }

/* Frequently asked questions. */
details.faq {
  padding: var(--s-4) var(--s-5);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
details.faq + details.faq { margin-block-start: var(--s-3); }
details.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  font-weight: 800;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--gold-600);
}
details.faq[open] summary::after { content: "−"; }
details.faq p { margin-block-start: var(--s-3); font-size: .93rem; color: var(--ink-muted); }

/* Contact form. There is no backend; brand.js hands the message to the
   visitor's own mail client or WhatsApp. */
.form-grid { display: grid; gap: var(--s-4); }
@media (min-width: 680px) { .form-grid.two { grid-template-columns: repeat(2, 1fr); } }
.field { display: grid; gap: var(--s-2); }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 700; color: var(--navy-800); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--s-3);
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(234, 175, 54, .22);
}
.form-note { margin-block-start: var(--s-4); font-size: .88rem; color: var(--ink-muted); }
.form-note.ok { color: var(--gold-600); font-weight: 700; }

/* Contact / location detail block. */
.detail { display: flex; align-items: flex-start; gap: var(--s-4); }
.detail svg { width: 22px; height: 22px; flex: none; margin-block-start: 3px; color: var(--gold-600); }
.detail b { display: block; font-size: .95rem; color: var(--navy-800); }
.detail span { font-size: .9rem; color: var(--ink-muted); }
.detail a:hover { color: var(--gold-600); }

/* Long-form legal copy. */
.prose { max-width: 72ch; }
.prose h2 { margin-block: var(--s-8) var(--s-3); font-size: 1.25rem; color: var(--navy-800); }
.prose h2:first-child { margin-block-start: 0; }
.prose p { margin-block-start: var(--s-3); color: var(--ink-muted); }
.prose ul { margin-block-start: var(--s-3); padding-inline-start: var(--s-5); color: var(--ink-muted); }
.prose li { margin-block-start: var(--s-2); }
.prose .updated {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  margin-block-end: var(--s-6);
  background: var(--gold-50);
  border: 1px solid rgba(234, 175, 54, .5);
  border-radius: var(--radius-pill);
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy-700);
}

/* ---------------------------------------------------------------------
   Utilities — one-property helpers that replace inline style=""
   attributes in the generated pages. !important gives them the same
   precedence over component rules that the inline style had.
   --------------------------------------------------------------------- */
.u-mt-5 { margin-block-start: var(--s-5) !important; }
.u-mt-6 { margin-block-start: var(--s-6) !important; }
.u-mt-7 { margin-block-start: var(--s-7) !important; }
.u-mb-4 { margin-block-end: var(--s-4) !important; }
.u-mb-6 { margin-block-end: var(--s-6) !important; }
.u-py-8 { padding-block: var(--s-8) !important; }
.u-items-start { align-items: start !important; }
.u-on-navy { color: var(--on-navy) !important; }
