/* ============================================================
   Renewed Mind Leaders — site.css
   Page-level layout, motion and patterns on top of tokens.css
   and components.css (the design-system component library).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }

/* Anchor targets (footer links, in-page jumps) land clear of the sticky header */
main [id] { scroll-margin-top: calc(var(--nav-height) + var(--space-4)); }

/* Soften the hard cut between full page loads with a short, cheap entrance */
main { animation: pageIn 420ms var(--rml-ease-out) both; }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Theme toggle: crossfade colors instead of snapping, only while actively switching */
html.theme-transitioning, html.theme-transitioning * {
  transition: background-color 320ms var(--rml-ease-out), border-color 320ms var(--rml-ease-out), color 320ms var(--rml-ease-out), fill 320ms var(--rml-ease-out) !important;
}
a { color: inherit; }
::selection { background: var(--gold-500); color: var(--indigo-900); }

/* Custom scrollbar accent (webkit) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--indigo-300); border-radius: 8px; border: 3px solid var(--paper); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--indigo-700); border-color: var(--paper); }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--indigo-900); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; text-decoration: none; transition: top 200ms var(--rml-ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- Loading progress bar (top) ---------- */
.rml-pageload { position: fixed; top: 0; left: 0; height: 3px; background: var(--gold-500); z-index: 300; width: 0%; transition: width 300ms var(--rml-ease-out), opacity 300ms ease; }

/* ---------- Header shell ---------- */
.site-header { position: sticky; top: 0; z-index: 100; }
/* Appearance → RML Theme → Theme Controls: sticky header off. */
.site-header.site-header--static { position: static; }
/* ...but never while the mobile drawer is open, regardless of that setting —
   the drawer covers the whole page, so its own logo and close button (both
   living in the header) have to stay reachable, or a visitor scrolled down
   before opening it would have no way back up to close it. */
.site-header.site-header--static.is-menu-open { position: sticky; }
.site-header .rml-nav { transition: height 260ms var(--rml-ease-out), background-color 260ms ease, box-shadow 260ms ease; }
.site-header.is-scrolled .rml-nav { height: 64px; box-shadow: var(--shadow-sm); }
.site-header.is-scrolled .rml-nav-brand img { height: 34px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
  color: var(--ink); transition: transform 140ms var(--rml-ease-out), border-color 200ms ease;
  flex: none;
}
.theme-toggle:active { transform: scale(0.9) rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
.theme-toggle-label { display: none; }

/* Drawer copy (Appearance → RML Theme → Theme Controls): a labelled pill,
   since it sits among plain text link rows where a bare icon would read
   oddly out of place. Header and footer stay icon-only circles — aria-label
   still names the control for assistive tech either way. */
.theme-toggle--drawer {
  width: auto; height: auto; border-radius: var(--radius-pill); padding: 8px 14px; gap: 8px;
}
.theme-toggle--drawer .theme-toggle-label {
  display: inline; font-size: 13px; font-weight: 700;
}
.theme-toggle--footer {
  border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.06); color: var(--ink-on-band);
}
@media (hover: hover) and (pointer: fine) { .theme-toggle--footer:hover { background: rgba(255,255,255,0.12); } }
.mobile-sheet-toggle-row { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--line); }

/* Desktop copy lives in whichever of header/footer is configured; mobile
   always uses the drawer copy instead, never both at once on one screen. */
@media (max-width: 900px) { .theme-toggle--header, .theme-toggle--footer { display: none; } }
@media (min-width: 901px) { .theme-toggle--drawer { display: none; } }

/* Mobile menu */
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative; flex: none;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink);
  transition: transform 260ms var(--rml-ease-out), opacity 200ms ease, top 260ms var(--rml-ease-out);
}
.menu-btn span { left: 11px; right: 11px; top: 21px; }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-sheet {
  position: fixed; inset: 64px 0 0 0; z-index: 90; background: var(--surface);
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform 280ms var(--rml-ease-out), opacity 220ms ease;
  overflow-y: auto; padding: var(--space-6) var(--space-4) var(--space-8);
}
.mobile-sheet.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-sheet a:not(.rml-btn) { display: block; padding: 16px 4px; font-size: 20px; font-weight: 700; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.mobile-sheet .rml-btn { margin-top: var(--space-5); width: 100%; }

@media (max-width: 900px) { .menu-btn { display: block; } }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--rml-ease-out), transform 700ms var(--rml-ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 650ms var(--rml-ease-out), transform 650ms var(--rml-ease-out); }
.reveal-scale.is-in { opacity: 1; transform: scale(1); }
[data-stagger] > * { transition-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; background: var(--band); color: var(--ink-on-band); overflow: hidden; isolation: isolate; }
.page-hero-inner { position: relative; z-index: 2; max-width: var(--container); margin: 0 auto; padding: var(--space-9) var(--space-6) var(--space-8); }
.page-hero .rml-stars { position: absolute; right: -100px; top: -60px; width: 560px; opacity: 0.85; z-index: 1; }
@media (max-width: 900px) { .page-hero .rml-stars { width: 320px; right: -90px; top: -30px; opacity: 0.55; } }
@media (max-width: 520px) { .page-hero .rml-stars { width: 240px; right: -70px; top: -10px; opacity: 0.45; } }
.page-hero h1 { margin: var(--space-3) 0 0; font-weight: 800; font-size: clamp(38px, 5.6vw, 64px); line-height: 1; letter-spacing: -0.03em; max-width: 820px; }
.page-hero h1 em { font-family: var(--font-serif); font-weight: 600; font-style: italic; color: var(--gold-500); letter-spacing: -0.01em; }
.page-hero p.lede { margin: var(--space-4) 0 0; font-size: 18px; line-height: 28px; color: var(--ink-on-band-muted); max-width: 640px; }
/* width:100% is required alongside left/right:0 — an SVG with no width/height
   attribute takes its intrinsic size from the viewBox (1440px here), and a
   browser honors that intrinsic size over left+right stretching for an
   absolutely-positioned replaced element, so without it this only happened
   to look right at exactly a 1440px viewport and fell short everywhere else. */
.page-hero-peak { position: absolute; z-index: 1; left: 0; right: 0; width: 100%; bottom: -1px; height: 64px; }
.page-hero-peak path { fill: var(--paper); }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-on-band-muted); margin: 0; }
.breadcrumb a { text-decoration: none; color: var(--ink-on-band-muted); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Section shell ---------- */
.section { max-width: var(--container); margin: 0 auto; padding: var(--space-9) var(--space-6); }
.section-tight { padding-top: var(--space-7); padding-bottom: var(--space-7); }
.section-sunk { background: var(--surface-sunken); }
.section-band { background: var(--band); color: var(--ink-on-band); }
@media (max-width: 900px) { .section { padding: var(--space-8) var(--space-4); } }

/* ---------- Pillars ---------- */
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); margin-top: var(--space-7); border-radius: var(--radius-lg); overflow: hidden; }
.pillar-cell { background: var(--paper); padding: var(--space-6) var(--space-5); display: grid; gap: var(--space-3); align-content: start; transition: background 220ms ease; }
.pillar-cell:hover { background: var(--surface-sunken); }
.pillar-cell .n { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--gold-text); }
.pillar-cell h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.015em; }
.pillar-cell p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.pillar-cell .plist { margin: var(--space-2) 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.pillar-cell .plist li { display: flex; gap: 8px; align-items: flex-start; }
.pillar-cell .plist svg { flex: none; margin-top: 3px; width: 12px; height: 12px; }
@media (max-width: 900px) { .pillars-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pillars-grid { grid-template-columns: 1fr; } }
/* Three-item variant (e.g. Vision/Mission/Motto): skip the uneven two-plus-one row and go straight to stacked. */
.pillars-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .pillars-grid-3 { grid-template-columns: 1fr; } }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-7); }
@media (max-width: 980px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.card-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .card-grid-2 { grid-template-columns: 1fr; } }

/* Pricing-tier cards carry a nowrap CTA button and amount, so their min-content is wider
   than a plain content card; collapse to two columns earlier to avoid overflow, and
   re-assert the single-column phone breakpoint so it isn't shadowed by the rule above. */
@media (max-width: 1080px) { .card-grid-tiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .card-grid-tiers { grid-template-columns: 1fr; } }

/* Ad hoc two-column split layouts (inline grid-template-columns) collapse to one column on narrow screens */
@media (max-width: 760px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="justify-content:flex-end"] { justify-content: flex-start !important; }
}

/* ---------- Filter tabs (Programmes) ---------- */
.filter-row { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.filter-chip {
  padding: 10px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 700; cursor: pointer; color: var(--ink-muted);
  transition: all 200ms var(--rml-ease-out);
}
.filter-chip:hover { border-color: var(--indigo-500); color: var(--ink); }
.filter-chip[aria-pressed="true"] { background: var(--indigo-900); border-color: var(--indigo-900); color: #fff; }
[data-theme="dark"] .filter-chip[aria-pressed="true"] { background: var(--gold-500); border-color: var(--gold-500); color: var(--indigo-900); }
.filterable { transition: opacity 320ms var(--rml-ease-out), transform 320ms var(--rml-ease-out); }
.filterable[hidden] { display: none; }
.filterable.filtering-out { opacity: 0; transform: scale(0.96); }

/* ---------- Counter stats ---------- */
[data-count-to] { font-variant-numeric: tabular-nums; }

/* ---------- Testimonial carousel ---------- */
.carousel { position: relative; overflow: hidden; }
.carousel-track { display: flex; transition: transform 560ms var(--rml-ease-in-out); }
.carousel-track > * { flex: 0 0 100%; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: var(--space-5); }
.carousel-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: all 220ms var(--rml-ease-out); }
.carousel-dots button[aria-current="true"] { background: var(--gold-500); width: 24px; border-radius: 4px; }

/* ---------- Timeline (About > Story) ---------- */
.timeline { position: relative; margin-top: var(--space-7); padding-left: var(--space-6); border-left: 2px solid var(--line); display: grid; gap: var(--space-7); }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: calc(-1 * var(--space-6) - 5px); top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 4px var(--paper); }
.timeline-item b { display: block; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--gold-text); text-transform: uppercase; margin-bottom: 6px; }
.timeline-item h4 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.timeline-item p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; max-width: 640px; }

/* ---------- Team / mentors ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-7); }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
/* Five-across team/mentor rows need an earlier step down than the default three-column grid. */
.team-grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .team-grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .team-grid-5 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .team-grid-5 { grid-template-columns: 1fr; } }
.team-card { text-align: left; }
.team-card figure { margin: 0; aspect-ratio: 4/5; overflow: hidden; border-radius: var(--radius-lg); background: var(--indigo-100); position: relative; }
/* .team-card figure img (not the bare class) to outrank Elementor's own
   ".elementor img { height: auto }", which otherwise wins the cascade (same
   specificity, loads later) and collapses the photo to its natural aspect ratio. */
.team-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--rml-ease-out); }
.team-card:hover img { transform: scale(1.05); }
.team-card figcaption { padding-top: var(--space-3); }
.team-card h3 { margin: 0; font-size: 17px; font-weight: 700; }
.team-card span { display: block; font-size: 13px; color: var(--gold-text); font-weight: 700; margin-top: 2px; }

.mentor-strip { display: flex; gap: var(--space-4); overflow-x: auto; padding: var(--space-2) 2px var(--space-4); margin-top: var(--space-6); scroll-snap-type: x mandatory; }
.mentor-strip figure { flex: 0 0 160px; margin: 0; scroll-snap-align: start; }
.mentor-strip figure img { width: 160px; height: 200px; object-fit: cover; border-radius: var(--radius-md); }
.mentor-names { margin-top: var(--space-5); columns: 2; gap: var(--space-6); list-style: none; padding: 0; }
@media (max-width: 640px) { .mentor-names { columns: 1; } }
.mentor-names li { padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.mentor-names li svg { flex: none; }
.mentor-names li svg path { fill: var(--gold-500); }

/* ---------- Photo gallery grid (programme detail pages) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-7); }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ---------- Office cards ---------- */
.office-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); margin-top: var(--space-7); }
@media (max-width: 900px) { .office-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .office-grid { grid-template-columns: 1fr; } }
.office-card { padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); display: grid; gap: 10px; transition: transform 220ms var(--rml-ease-out), box-shadow 220ms ease; }
.office-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.office-card .flag { font-size: 28px; line-height: 1; }
.office-card h3 { margin: 0; font-size: 16px; font-weight: 800; }
.office-card p { margin: 0; font-size: 14px; color: var(--ink-muted); line-height: 20px; }

/* ---------- Chapters ---------- */
.chapter-toolbar { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: var(--space-6); }
.chapter-search { position: relative; flex: 1; min-width: 240px; max-width: 420px; }
.chapter-search input { width: 100%; padding: 12px 14px 12px 40px; border-radius: var(--radius-sm); border: 1.5px solid var(--field-border); background: var(--surface); font: 400 15px/22px var(--font-sans); color: var(--ink); }
.chapter-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-muted); }
.chapter-list { margin-top: var(--space-6); border-top: 1px solid var(--line); }
/* Chapter groups (e.g. Cameroon / Beyond Cameroon) chunk a long, growing list under a real
   heading instead of one undifferentiated stream. */
.chapter-group { margin-top: var(--space-7); }
.chapter-group:first-child { margin-top: 0; }
.chapter-group > .rml-eyebrow { margin-bottom: var(--space-3); }
.chapter-row { display: grid; grid-template-columns: 1fr auto auto; gap: var(--space-4); align-items: center; padding: var(--space-4) 4px; border-bottom: 1px solid var(--line); transition: background 200ms ease; text-decoration: none; }
.chapter-row:hover { background: var(--surface-sunken); }
.chapter-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.chapter-row h3 { margin: 0; font-size: 17px; font-weight: 700; }
.chapter-row .sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.chapter-row .region { font-size: 13px; font-weight: 700; color: var(--gold-text); background: var(--gold-100); padding: 5px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
@media (max-width: 640px) { .chapter-row { grid-template-columns: 1fr; gap: 8px; } .chapter-row .region { justify-self: start; } }
.no-results { display: none; padding: var(--space-7) 0; text-align: center; color: var(--ink-muted); }
.no-results.is-visible { display: block; }

/* ---------- FAQ accordion ---------- */
.faq { margin-top: var(--space-6); border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: var(--space-5) 4px; display: flex; justify-content: space-between; gap: var(--space-4);
  align-items: center; font-weight: 700; font-size: 17px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex: none; width: 24px; height: 24px; position: relative; }
.faq-item summary .plus::before, .faq-item summary .plus::after {
  content: ""; position: absolute; background: var(--ink); border-radius: 2px; transition: transform 300ms var(--rml-ease-out);
}
.faq-item summary .plus::before { left: 3px; right: 3px; top: 11px; height: 2px; }
.faq-item summary .plus::after { top: 3px; bottom: 3px; left: 11px; width: 2px; }
.faq-item[open] summary .plus::after { transform: rotate(90deg); opacity: 0; }
.faq-item .faq-body { padding: 0 4px var(--space-5); color: var(--ink-muted); font-size: 15px; line-height: 26px; max-width: 720px; }
.faq-item .faq-body { animation: faqIn 320ms var(--rml-ease-out); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Gallery ---------- */
.gallery { columns: 3 220px; column-gap: var(--space-4); margin-top: var(--space-7); }
.gallery figure { margin: 0 0 var(--space-4); break-inside: avoid; border-radius: var(--radius-md); overflow: hidden; position: relative; cursor: zoom-in; }
.gallery img { width: 100%; display: block; transition: transform 500ms var(--rml-ease-out); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(to top, rgba(14,5,41,0.85), transparent); opacity: 0; transition: opacity 220ms ease;
}
.gallery figure:hover figcaption { opacity: 1; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(14,5,41,0.92); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity 260ms ease; padding: var(--space-6); }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(90vw, 1100px); max-height: 85vh; border-radius: var(--radius-md); transform: scale(0.96); transition: transform 260ms var(--rml-ease-out); }
.lightbox.is-open img { transform: scale(1); }
.lightbox-close { position: absolute; top: var(--space-5); right: var(--space-5); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); color: #fff; cursor: pointer; font-size: 20px; }

/* ---------- Numbered process (How to partner / Apply) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-7); counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: var(--space-6); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 40px; color: var(--gold-text); display: block; margin-bottom: var(--space-3); }
.step h4 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.step p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }

/* ---------- Logo marquee ---------- */
.marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: var(--space-9); width: max-content; animation: marquee 28s linear infinite; align-items: center; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 22px; color: var(--ink-muted); white-space: nowrap; opacity: 0.7; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; overflow-x: auto; } }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 80; width: 48px; height: 48px; border-radius: 50%;
  background: var(--indigo-900); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateY(12px) scale(0.9); pointer-events: none;
  transition: opacity 240ms var(--rml-ease-out), transform 240ms var(--rml-ease-out);
}
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:active { transform: scale(0.9); }
[data-theme="dark"] .back-to-top { background: var(--gold-500); color: var(--indigo-900); }

/* ---------- Forms: file-free contact/apply ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-7); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
textarea.rml-input { min-height: 120px; padding-top: 12px; resize: vertical; font-family: var(--font-sans); }
.radio-group { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-chip label {
  display: block; padding: 10px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--ink-muted); cursor: pointer; transition: all 200ms var(--rml-ease-out);
}
.radio-chip input:checked + label { background: var(--indigo-900); border-color: var(--indigo-900); color: #fff; }
.radio-chip input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-success { display: none; text-align: center; padding: var(--space-8) var(--space-5); }
.form-success.is-visible { display: block; }
/* Pre-existing gap: submitRmlForm() in site.js already toggled this class on
   a failed submit, but no rule anywhere made the element visible, so a
   failed contact/partner/programme submission showed nothing at all. */
.form-submit-error.is-visible { display: block; }
.form-success svg { width: 56px; height: 56px; margin: 0 auto var(--space-4); }
.check-circle { stroke-dasharray: 80; stroke-dashoffset: 80; animation: drawCheck 700ms var(--rml-ease-out) 200ms forwards; }
.check-mark { stroke-dasharray: 24; stroke-dashoffset: 24; animation: drawCheck 400ms var(--rml-ease-out) 700ms forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* ---------- Programme detail page ---------- */
.detail-hero { position: relative; }
.detail-meta-bar { display: flex; gap: var(--space-6); flex-wrap: wrap; padding: var(--space-5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: var(--space-7) 0; }
.detail-meta-bar div { display: grid; gap: 2px; }
.detail-meta-bar b { font-size: 22px; font-weight: 800; }
.detail-meta-bar span { font-size: 13px; color: var(--ink-muted); }
.prose { max-width: var(--measure); font-size: 16px; line-height: 28px; color: var(--ink); }
.prose h3 { font-size: 24px; margin-top: var(--space-7); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
/* Privacy/terms have no section header above their .prose block, so their subsections are
   the first heading level under h1 and use h2; same visual size as the shared .prose h3. */
body[data-page="privacy"] .prose h2, body[data-page="terms"] .prose h2 { font-size: 24px; margin-top: var(--space-7); }

/* ---------- Utility ---------- */
.center { text-align: center; margin-inline: auto; }
.mt-0 { margin-top: 0 !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
