/* ============================================================================
   theme.css — single styling source of truth for the entire site.

   To REBRAND: edit site-config.php → 'theme' (primary, accent, optional
   neutral and bg). bootstrap.php injects those as --brand-* custom props
   into <head>; everything else in this file derives from them via color-mix.
   To restyle a section, edit the section blocks below.
   ============================================================================ */

:root {
  /* Site supports both schemes — seeds flip via the dark @media block below +
     the paired dark seeds bootstrap.php injects from site-config 'theme_dark'.
     For a light-only site, change this to `color-scheme: light` and drop the
     'theme_dark' map (see HTML-builder skill 3 — dark-mode contract). */
  color-scheme: light;  /* ICP is intentionally light-only (dark-flip block below neutralized) */

  /* Brand seeds — DEFAULTS only. bootstrap.php overrides these from config.
     Don't edit values here for a single client; edit site-config.php → 'theme'. */
  --brand-primary:    #f4842b;
  --brand-accent:     #e36c0d;
  --brand-neutral:    #23262d;
  --brand-bg:         #ffffff;
  --brand-on-primary: #ffffff;  /* text color that reads on top of --brand-primary */

  /* Brand — derived (do not hardcode brand colors below this line)

     WCAG 2.1 AA. The seeds are the icplit.org oranges and cannot carry text on white:
       --brand-primary #f4842b = 2.57:1, --brand-accent #e36c0d = 3.27:1.
     Text, and any surface under a white label, uses the deepened variants below.
     The raw seeds stay on decoration only (fills, rules, dots, tints, icon strokes). */
  --color-primary:        #bc580a;  /* 4.63:1 on white - text + white-label surfaces */
  --color-primary-hover:  color-mix(in oklch, var(--color-primary) 85%, black);
  --color-primary-soft:   color-mix(in oklch, var(--brand-primary) 12%, transparent);
  --color-primary-ring:   color-mix(in oklch, var(--brand-primary) 35%, transparent);
  --color-accent:         var(--brand-accent);   /* NON-TEXT only */
  --color-accent-deep:    #bb590b;  /* 4.62:1 on white - accent as text, or a surface under white */
  --color-accent-soft:    color-mix(in oklch, var(--brand-accent) 12%, transparent);

  /* Neutrals — derived from --brand-neutral + --brand-bg */
  --color-text:        var(--brand-neutral);
  --color-text-muted:  color-mix(in oklch, var(--brand-neutral) 60%, var(--brand-bg));
  --color-bg:          var(--brand-bg);
  --color-bg-alt:      color-mix(in oklch, var(--brand-neutral) 4%, var(--brand-bg));
  --color-bg-elev:     var(--brand-bg);
  --color-border:      color-mix(in oklch, var(--brand-neutral) 10%, var(--brand-bg));

  /* Status */
  --color-success: #0e9c6d;
  --color-error: #e0413a;

  /* Typography — system stack: zero load time, ages perfectly */
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  --fs-display: clamp(2.75rem, 5vw + 1rem, 4.75rem);
  --fs-h1: clamp(2.25rem, 4vw + 1rem, 3.5rem);
  --fs-h2: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
  --fs-h3: clamp(1.375rem, 1.5vw + 1rem, 1.625rem);
  --fs-h4: 1.0625rem;
  --fs-body: 1rem;
  --fs-lead: 1.1875rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8125rem;

  --lh-tight: 1.08;
  --lh-snug: 1.3;
  --lh-normal: 1.65;

  /* Spacing scale. Every step is N * 0.25rem, so a token can be read straight off
     its number. Keep the odd steps (7, 9, 14) defined - an undefined var() makes the
     whole declaration invalid at computed-value time, which silently drops a padding
     shorthand to 0 rather than falling back to the previous value. */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-7: 1.75rem;  --sp-8: 2rem;    --sp-9: 2.25rem;
  --sp-10: 2.5rem;  --sp-12: 3rem;   --sp-14: 3.5rem;
  --sp-16: 4rem;    --sp-20: 5rem;   --sp-24: 6rem;
  --sp-32: 8rem;

  /* Layout */
  --content-max: 72rem;
  --reading-max: 42rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Header */
  --nav-height: 72px;
  --nav-bg:     color-mix(in oklch, var(--brand-bg) 78%, transparent);
  --nav-blur:   16px;
  --nav-border: color-mix(in oklch, var(--brand-neutral) 8%, transparent);

  /* Shadows — tinted with the brand neutral so they match cool/warm palettes */
  --shadow-sm: 0 1px 2px  color-mix(in oklch, var(--brand-neutral) 4%, transparent);
  --shadow-md: 0 4px 16px color-mix(in oklch, var(--brand-neutral) 6%, transparent),
               0 1px 3px  color-mix(in oklch, var(--brand-neutral) 4%, transparent);
  --shadow-lg: 0 24px 48px -12px color-mix(in oklch, var(--brand-neutral) 18%, transparent);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 500ms;
}

/* ICP is a light-only site: the dark-mode seed flip is intentionally disabled
   so the wireframe renders identically regardless of the viewer's OS theme.
   To re-enable dark mode later, restore color-scheme: light dark above and add
   a 'theme_dark' map in site-config.php (see HTML-builder skill 3). */

/* ============================================================================
   Reset + base
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-height) + 1rem); }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

/* Lock background scroll while the mobile drawer is open (set by footer.php JS). */
body.is-locked { overflow: hidden; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--color-primary); color: var(--brand-on-primary);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

/* ============================================================================
   Typography
   ============================================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  font-weight: 750;
  color: var(--color-text);
}
h1 { font-size: var(--fs-h1); margin-block: var(--sp-6) var(--sp-4); }
h2 { font-size: var(--fs-h2); margin-block: var(--sp-12) var(--sp-5); letter-spacing: -0.022em; }
h3 { font-size: var(--fs-h3); margin-block: var(--sp-8) var(--sp-3); letter-spacing: -0.018em; }
h4 { font-size: var(--fs-h4); margin-block: var(--sp-5) var(--sp-2); letter-spacing: -0.005em; font-weight: 700; }

p { margin-block: 0 var(--sp-4); max-width: 70ch; }

a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--color-primary); color: var(--brand-on-primary); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

/* ============================================================================
   Layout
   ============================================================================ */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

main { display: block; min-height: 60vh; }
section + section { margin-top: var(--sp-12); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--sp-3);
}

/* ============================================================================
   Header / nav
   ============================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: -0.025em;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.brand:hover { text-decoration: none; color: var(--color-primary); }
.brand__mark { display: inline-flex; flex-shrink: 0; }
.brand__mark svg { width: 32px; height: 32px; border-radius: 9px; }
.brand__logo { display: block; height: 56px; width: auto; }
.brand__logo--footer { height: 72px; }

.nav-desktop { display: none; }
@media (min-width: 880px) {
  .nav-desktop { display: flex; align-items: center; gap: var(--sp-2); }
}
.nav-desktop ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: center; gap: var(--sp-1);
}
.nav-desktop a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-desktop a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  text-decoration: none;
}
.nav-desktop a[aria-current="page"] { color: var(--color-primary); }
.nav-desktop a.cta {
  background: var(--color-primary);
  color: var(--brand-on-primary);
  margin-left: var(--sp-3);
  box-shadow: 0 1px 2px color-mix(in oklch, var(--brand-primary) 30%, transparent);
}
.nav-desktop a.cta:hover {
  background: var(--color-primary-hover);
  color: var(--brand-on-primary);
  box-shadow: 0 4px 12px color-mix(in oklch, var(--brand-primary) 35%, transparent);
  transform: translateY(-1px);
}

/* Desktop dropdowns */
.has-dropdown { position: relative; }
.has-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-left: 0.4em;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.55;
  vertical-align: middle;
}
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  list-style: none !important;
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease-out),
    visibility 0s linear var(--dur-base);
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.dropdown a { display: block; padding: var(--sp-2) var(--sp-3); font-size: 0.9375rem; }

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--color-border);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}
.nav-toggle:hover { background: var(--color-bg-alt); }
@media (min-width: 880px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 22px; height: 22px; }

/* Mobile drawer — Popover API. A popover toggles display:none<->block, which
   snaps unless we transition `display`/`overlay` with allow-discrete and give
   an @starting-style for the entry. Closed state = slid off-canvas + faded;
   :popover-open = on-screen. Reduced-motion users get the instant version via
   the global prefers-reduced-motion block below. */
.nav-mobile {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, 90vw);
  height: 100vh;          /* fallback for browsers without dvh */
  height: 100dvh;         /* matches the real mobile viewport (no chrome jump) */
  margin: 0;
  border: none;
  /* sp-16 top so the first menu item clears the absolutely-positioned
     close button (top sp-3 + 40px tall); sp-12 was too tight and overlapped. */
  padding: var(--sp-16) var(--sp-6) var(--sp-6);
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform var(--dur-base) var(--ease-out),
    opacity   var(--dur-base) var(--ease-out),
    overlay   var(--dur-base) var(--ease-out) allow-discrete,
    display   var(--dur-base) var(--ease-out) allow-discrete;
}
.nav-mobile:popover-open {
  transform: translateX(0);
  opacity: 1;
}
@starting-style {
  .nav-mobile:popover-open {
    transform: translateX(100%);
    opacity: 0;
  }
}
.nav-mobile::backdrop {
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0);
  transition:
    background       var(--dur-base) var(--ease),
    backdrop-filter  var(--dur-base) var(--ease),
    overlay          var(--dur-base) var(--ease) allow-discrete,
    display          var(--dur-base) var(--ease) allow-discrete;
}
.nav-mobile:popover-open::backdrop {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
@starting-style {
  .nav-mobile:popover-open::backdrop {
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0);
  }
}
.nav-mobile__close {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--color-text);
}
.nav-mobile__close:hover { background: var(--color-bg-alt); }
.nav-mobile ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.nav-mobile a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 500;
  font-size: 1rem;
}
.nav-mobile a:hover { background: var(--color-bg-alt); text-decoration: none; }
.nav-mobile a[aria-current="page"] { color: var(--color-primary); background: var(--color-bg-alt); }
.nav-mobile details summary {
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-mobile details summary::-webkit-details-marker { display: none; }
.nav-mobile details summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform var(--dur-base) var(--ease);
}
.nav-mobile details[open] summary::after { transform: rotate(45deg); }
.nav-mobile details[open] summary { color: var(--color-primary); }
.nav-mobile details ul { padding-left: var(--sp-4); margin-top: var(--sp-1); margin-bottom: var(--sp-3); }

/* ============================================================================
   Footer
   ============================================================================ */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-block: var(--sp-20) var(--sp-8);
  margin-top: var(--sp-32);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-12);
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer__tagline { margin-top: var(--sp-3); color: var(--color-text-muted); }
.site-footer__address {
  font-style: normal;
  margin-top: var(--sp-4);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.site-footer h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin: 0 0 var(--sp-4);
  font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.site-footer a { color: var(--color-text); font-size: 0.9375rem; }
.site-footer a:hover { color: var(--color-primary); }
.site-footer__bottom {
  max-width: var(--content-max);
  margin: var(--sp-16) auto 0;
  padding: var(--sp-6) var(--sp-6) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}
/* "Powered by Spark" credit — mandatory, do not remove. The Spark mark keeps its
   fixed brand orange (#f15924) on any footer background. display:inline-block is
   required: the global reset sets `svg { display: block }`, which would drop the
   mark onto its own line. */
.spark-mark {
  display: inline-block;
  width: 1.6em;
  height: 1.6em;
  margin-left: 0.15em;
  vertical-align: -0.5em;
}

/* ============================================================================
   Consent banner (includes/consent-banner.php) — fixed bottom, JS-toggled
   ============================================================================ */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: var(--sp-4);
  transform: translate(-50%, calc(100% + var(--sp-8)));
  z-index: 90;
  width: min(640px, calc(100vw - var(--sp-8)));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.consent-banner.is-visible { transform: translate(-50%, 0); opacity: 1; }
.consent-banner[hidden] { display: none; }
.consent-banner__text {
  flex: 1 1 16rem;
  margin: 0;
  max-width: none;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--color-text-muted);
}
.consent-banner__text a { font-weight: 600; }
.consent-banner__actions { display: flex; gap: var(--sp-3); flex-shrink: 0; }
.consent-banner__actions .btn { padding: var(--sp-2) var(--sp-5); font-size: 0.875rem; }
@media (max-width: 520px) {
  .consent-banner { bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100vw; }
  .consent-banner__actions { width: 100%; }
  .consent-banner__actions .btn { flex: 1; }
}

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: var(--brand-on-primary);
  box-shadow: 0 1px 2px color-mix(in oklch, var(--brand-primary) 30%, transparent);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--brand-on-primary);
  box-shadow: 0 8px 16px color-mix(in oklch, var(--brand-primary) 25%, transparent);
}
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-bg-alt); }

.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: 1rem; }

/* ============================================================================
   Forms
   ============================================================================ */
.form { display: grid; gap: var(--sp-5); max-width: 36rem; }
.form-row { display: grid; gap: var(--sp-2); }
.form label { font-weight: 500; font-size: 0.9375rem; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand-primary) 18%, transparent);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -10000px; opacity: 0; pointer-events: none; }
.form-help { font-size: var(--fs-small); color: var(--color-text-muted); }
.form-status { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm); display: none; font-size: 0.9375rem; }
.form-status[data-state="ok"]    { display: block; background: color-mix(in oklch, var(--color-success) 12%, transparent); color: var(--color-success); border: 1px solid color-mix(in oklch, var(--color-success) 30%, transparent); }
.form-status[data-state="error"] { display: block; background: color-mix(in oklch, var(--color-error) 12%, transparent);   color: var(--color-error);   border: 1px solid color-mix(in oklch, var(--color-error) 30%, transparent); }

/* ============================================================================
   Hero — the "beautiful" landing section
   ============================================================================ */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: var(--sp-24) var(--sp-20);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: -2;
  background:
    radial-gradient(45% 55% at 18% 20%,  color-mix(in oklch, var(--brand-primary) 20%, transparent), transparent 70%),
    radial-gradient(40% 50% at 85% 25%,  color-mix(in oklch, var(--brand-accent) 16%, transparent),  transparent 70%),
    radial-gradient(50% 50% at 50% 110%, color-mix(in oklch, var(--brand-primary) 12%, transparent), transparent 70%);
  filter: blur(2px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right,  color-mix(in oklch, var(--brand-neutral) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--brand-neutral) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
          mask-image: radial-gradient(ellipse at center, black, transparent 70%);
}
.hero h1 {
  font-size: var(--fs-display);
  letter-spacing: -0.035em;
  line-height: 1.04;
  font-weight: 800;
  margin-block: 0 var(--sp-6);
  max-width: 18ch;
  margin-inline: auto;
}
.hero p.lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
  line-height: 1.55;
}
.hero__actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

.hero__highlight {
  /* gradient TEXT - both stops must clear the text bar, so the deep accent */
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-accent-deep) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

/* ============================================================================
   Cards / sections
   ============================================================================ */
.section-title {
  text-align: center;
  margin-bottom: var(--sp-10);
}
.section-title h2 { margin-top: 0; }
.section-title p { margin-inline: auto; color: var(--color-text-muted); font-size: var(--fs-lead); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
}
.card {
  position: relative;
  padding: var(--sp-8) var(--sp-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elev);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card h3 { margin-top: var(--sp-3); margin-bottom: var(--sp-2); }
.card p { color: var(--color-text-muted); margin-bottom: 0; }
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-accent-soft));
  color: var(--color-primary);
}
.card__icon svg { width: 22px; height: 22px; }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-8) 0;
  padding: var(--sp-12) var(--sp-8);
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in oklch, var(--brand-primary) 22%, var(--brand-bg));
  text-align: center;
  color: var(--color-text);
  background: color-mix(in oklch, var(--brand-primary) 7%, var(--brand-bg));
}
.stats > * {
  padding-inline: var(--sp-6);
  border-left: 1px solid color-mix(in oklch, var(--brand-primary) 22%, var(--brand-bg));
}
.stats > :first-child { border-left: 0; }
.stats__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3vw + 1rem, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.stats__label {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 640px) {
  .stats > * { border-left: 0; }
  .stats { padding: var(--sp-10) var(--sp-6); }
}

/* CTA section */
.cta-band {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  /* SURFACE under a white label - both ends of the gradient owe 4.5:1 to white */
  background: linear-gradient(135deg, var(--color-primary), color-mix(in oklch, var(--color-primary) 70%, var(--color-accent-deep)));
  color: var(--brand-on-primary);
  border-radius: var(--radius-xl);
  margin-block: var(--sp-16);
}
.cta-band h2 { color: var(--brand-on-primary); margin-top: 0; }
.cta-band p { color: color-mix(in oklch, var(--brand-on-primary) 85%, transparent); margin-inline: auto; max-width: 50ch; font-size: var(--fs-lead); }
.cta-band .btn-primary { background: var(--brand-on-primary); color: var(--color-primary); margin-top: var(--sp-6); }
.cta-band .btn-primary:hover { background: color-mix(in oklch, var(--brand-on-primary) 90%, var(--brand-neutral)); color: var(--color-primary-hover); }

/* Reading content (about/service body) */
.prose { max-width: var(--reading-max); margin-inline: auto; }
.prose h2:first-child, .prose h1:first-child { margin-top: 0; }

/* Anchor offset for sticky header */
:target { scroll-margin-top: calc(var(--nav-height) + var(--sp-6)); }

/* ============================================================================
   Breadcrumbs
   ============================================================================ */
.breadcrumbs {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: var(--sp-12);
  margin-bottom: 0;
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: var(--color-text-muted);
  opacity: 0.55;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs [aria-current="page"] { color: var(--color-text); font-weight: 500; }

/* ============================================================================
   Accessibility & motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================================
   ICP custom sections (extends the native theme — International Christian
   Publishing wireframe). All values derive from the brand tokens above.
   ============================================================================ */

/* Reusable vertical rhythm for custom sections */
.icp-section { padding-block: var(--sp-16); }
.icp-section--tight { padding-block: var(--sp-12); }
.icp-section--alt { background: var(--color-bg-alt); border-block: 1px solid var(--color-border); }

/* Eyebrow + heading lockup used at the top of most sections */
.icp-lede { max-width: 60ch; }
.icp-lede.center { margin-inline: auto; text-align: center; }
.icp-lede p { color: var(--color-text-muted); font-size: var(--fs-lead); }
.icp-lede--tight .eyebrow { color: var(--color-primary); font-size: var(--fs-eyebrow); margin-bottom: var(--sp-2); }
.icp-lede--tight h2 { margin-top: 0; }

/* Secondary-page banner (smaller than the home hero) */
.icp-banner {
  position: relative;
  isolation: isolate;
  padding-block: var(--sp-20) var(--sp-12);
  overflow: hidden;
}
.icp-banner::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 140%; z-index: -2;
  background:
    radial-gradient(40% 60% at 15% 10%, color-mix(in oklch, var(--brand-primary) 16%, transparent), transparent 70%),
    radial-gradient(40% 60% at 90% 0%, color-mix(in oklch, var(--brand-accent) 14%, transparent), transparent 70%);
}
.icp-banner .eyebrow { margin-bottom: var(--sp-2); }
.icp-banner h1 { max-width: 20ch; }
.icp-banner p { color: var(--color-text-muted); font-size: var(--fs-lead); max-width: 56ch; }

/* Split: image + story, alternating sides */
.icp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}
.icp-split--reverse .icp-split__media { order: 2; }
@media (max-width: 800px) { .icp-split { grid-template-columns: 1fr; gap: var(--sp-8); }
  .icp-split--reverse .icp-split__media { order: 0; } }
.icp-split__body h2 { margin-top: 0; }
.icp-split__body p { color: var(--color-text-muted); }

/* Media slot. As a <div> it is the labelled wireframe stand-in; as an <img> it is
   the real photo. Both share the box so every aspect-ratio, radius, shadow and
   context override below applies either way — see img.icp-media at the end of
   this block for the swap. */
.icp-media {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px dashed color-mix(in oklch, var(--brand-neutral) 22%, var(--brand-bg));
  /* background-color is hidden under the opaque stripes, so it costs nothing
     visually - but it is what a contrast checker resolves for the label text.
     Without it the hero's placeholder tiles read as label-on-charcoal. */
  background-color: var(--brand-bg);
  background-image:
    repeating-linear-gradient(135deg,
      color-mix(in oklch, var(--brand-neutral) 4%, var(--brand-bg)) 0 18px,
      color-mix(in oklch, var(--brand-neutral) 7%, var(--brand-bg)) 18px 36px);
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  padding: var(--sp-6);
}
.icp-media--wide { aspect-ratio: 16 / 9; }
.icp-media--square { aspect-ratio: 1 / 1; }
.icp-media--tall { aspect-ratio: 3 / 4; }
.icp-media__label { display: inline-flex; flex-direction: column; gap: var(--sp-1); }
.icp-media__label strong { color: var(--color-text); font-weight: 600; }

/* A real photo in a media slot. Drops the dashed border, the stripe pattern and
   the flex centring, then fills the box it inherited. The aspect-ratio, radius
   and shadow rules above still apply, so an <img class="icp-media"> lands in
   exactly the frame its placeholder occupied. */
img.icp-media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 0;
  padding: 0;
  background-image: none;
  background-color: color-mix(in oklch, var(--brand-neutral) 6%, var(--brand-bg));
}
/* The feature tile's photo is a background layer under white copy. At its shipped
   0.26 opacity the photo's brightest pixels (the white pages of the open book) lift
   the blended background to #C57B55, which is only 2.96:1 under the body text - a
   real 1.4.3 failure that an automated scan can only report as "needs review",
   because it cannot resolve a background made of a photo. Halving the photo's
   brightness first pins the worst case at #A45A34 (5.13:1) while leaving the image
   perfectly legible as texture. The body copy also goes fully opaque here; at 90%
   it was spending contrast it did not have. */
.icp-bento__tile--feature img.icp-media { height: 100%; filter: brightness(0.5); }
.icp-bento__tile--feature p { color: #fff; }
/* The hero inset is a small square overlapping the main photo. Its width lives on
   a single class (0,1,0), which img.icp-media (0,1,1) would otherwise beat, blowing
   the inset up to full width and burying the photo underneath it. Restate it here. */
img.icp-hero__photo--inset { width: 46%; }

/* Pillars — 3-up value blocks, set as editorial columns.
   These used to be rounded cards with a 3px orange rule across the top. That
   pattern (bordered box + coloured accent bar) is the single most templated card
   on the web and it read as filler. There is no box now: a hard charcoal rule
   above each column, the heading in the serif directly under it, and air. It reads
   like a printed page, which is the right register for a publisher. */
.icp-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-8) var(--sp-10);
}
/* Centered button row. The base stylesheet caps every <p> at a readable measure
   (~556px) and left-aligns it, so a <p style="text-align:center"> wrapping a button
   only centres the button inside that capped, left-sitting box - the button lands
   left of the page centre. This wrapper is a full-width flex row that actually
   centres, and it takes any number of buttons. */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-4);
  max-width: none;
  margin-top: var(--sp-8);
}

/* Warm tinted panel: no border, a soft brand-cream surface, and an orange icon
   tile at the top. The colour comes from the surface and the tile, not from a
   rule across the edge - which is the templated look we are getting away from. */
.icp-pillar {
  padding: var(--sp-10) var(--sp-9);
  border: 0;
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--brand-primary) 8%, var(--brand-bg));
}
@media (max-width: 560px) { .icp-pillar { padding: var(--sp-8) var(--sp-7); } }
.icp-pillar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: var(--sp-5);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
}
.icp-pillar__icon svg { width: 1.35rem; height: 1.35rem; }
.icp-pillar h3 { margin-top: 0; margin-bottom: var(--sp-3); }
.icp-pillar p { color: color-mix(in oklch, var(--brand-neutral) 68%, var(--brand-bg)); margin-bottom: 0; }
.icp-pillar p a { color: var(--color-primary); }
/* Sits inside a .icp-section--alt band, so the cream panel would vanish into the
   tinted section behind it. Lift the panel to white there for separation. */
.icp-section--alt .icp-pillar { background: var(--brand-bg); }

/* Numbered steps / process */
.icp-steps { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.icp-step { position: relative; padding: var(--sp-6); padding-top: var(--sp-12); border-radius: var(--radius-lg); background: var(--color-bg-alt); }
.icp-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: var(--sp-5); left: var(--sp-6);
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-primary); color: var(--brand-on-primary);
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
}
.icp-step h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-h4); }
.icp-step p { color: var(--color-text-muted); margin-bottom: 0; font-size: 0.95rem; }

/* Region cards (Global Ministry) */
.icp-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-6); }
.icp-region {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elev);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.icp-region:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.icp-region .icp-media { border: none; border-radius: 0; aspect-ratio: 16 / 10; }
.icp-region__body { padding: var(--sp-5) var(--sp-6) var(--sp-6); }
.icp-region__body h3 { margin: 0 0 var(--sp-2); }
.icp-region__body p { color: var(--color-text-muted); margin-bottom: 0; font-size: 0.95rem; }

/* Download / resource rows */
.icp-downloads { display: grid; gap: var(--sp-3); }
.icp-download {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-elev);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.icp-download:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.icp-download__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-primary); }
.icp-download__icon svg { width: 20px; height: 20px; }
.icp-download__meta { flex: 1; }
.icp-download__meta strong { display: block; font-weight: 600; }
.icp-download__meta span { font-size: var(--fs-small); color: var(--color-text-muted); }
.icp-download__type { font-size: var(--fs-small); color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* History timeline */
.icp-timeline { position: relative; display: grid; gap: var(--sp-8); padding-left: var(--sp-8); }
.icp-timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--color-border); }
.icp-timeline__item { position: relative; }
.icp-timeline__item::before { content: ""; position: absolute; left: calc(-1 * var(--sp-8) + 1px); top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 4px var(--color-primary-soft); }
.icp-timeline__year { font-family: var(--font-display); font-weight: 700; color: var(--color-primary); }
.icp-timeline__item h3 { margin: var(--sp-1) 0 var(--sp-2); font-size: var(--fs-h4); }
.icp-timeline__item p { color: var(--color-text-muted); margin-bottom: 0; }

/* Scripture / pull quote */
.icp-quote {
  text-align: center;
  max-width: 46rem; margin-inline: auto;
  padding: var(--sp-12) var(--sp-6);
}
.icp-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw + 1rem, 2rem);
  line-height: 1.35;
  font-weight: 600;
  color: var(--color-text);
}
.icp-quote cite { display: block; margin-top: var(--sp-4); font-style: normal; color: var(--color-primary); font-weight: 600; font-size: var(--fs-small); letter-spacing: 0.04em; text-transform: uppercase; }

/* Two-column info (contact details / list) */
.icp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); align-items: start; }
@media (max-width: 800px) { .icp-grid-2 { grid-template-columns: 1fr; gap: var(--sp-8); } }

/* Small detail list (contact, ways to give) */
.icp-detail { display: flex; gap: var(--sp-4); padding-block: var(--sp-4); border-bottom: 1px solid var(--color-border); }
.icp-detail:last-child { border-bottom: none; }
.icp-detail__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-primary); }
.icp-detail__icon svg { width: 20px; height: 20px; }
.icp-detail h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-h4); }
.icp-detail p { margin: 0; color: var(--color-text-muted); }

/* Inline tag / pill */
.icp-tag { display: inline-block; padding: var(--sp-1) var(--sp-3); border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary); font-size: var(--fs-small); font-weight: 600; }

/* News / article cards */
.icp-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-6); }
.icp-post { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-bg-elev); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.icp-post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.icp-post .icp-media { border: none; border-radius: 0; aspect-ratio: 16 / 9; }
.icp-post__body { padding: var(--sp-5) var(--sp-6) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.icp-post__date { font-size: var(--fs-small); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.icp-post__body h3 { margin: 0; font-size: var(--fs-h4); }
.icp-post__body p { color: var(--color-text-muted); margin: 0; font-size: 0.95rem; }

/* FAQ accordion - <details>/<summary>. Q and A content comes from
   site-config.php -> 'faq', which also feeds the FAQPage JSON-LD, so the
   visible copy and the structured data can never drift apart. */
.icp-faq { display: grid; gap: var(--sp-3); max-width: 52rem; margin-inline: auto; }
.icp-faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-elev);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease-out);
}
.icp-faq__item:hover { border-color: var(--color-primary); }
.icp-faq__item[open] { border-color: var(--color-primary); box-shadow: var(--shadow-md); }

.icp-faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  cursor: pointer;
  list-style: none;               /* hide the default disclosure marker */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  color: var(--color-text);
}
.icp-faq__q::-webkit-details-marker { display: none; }  /* Safari */
.icp-faq__q:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; border-radius: var(--radius-md); }
.icp-faq__item[open] .icp-faq__q { color: var(--color-primary); padding-bottom: var(--sp-3); }

/* Plus sign that rotates into an x when the item opens */
.icp-faq__q::after {
  content: "";
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.15em;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out);
  /* two crossed bars = a "+" */
  -webkit-mask-image:
    linear-gradient(#000, #000),
    linear-gradient(#000, #000);
          mask-image:
    linear-gradient(#000, #000),
    linear-gradient(#000, #000);
  -webkit-mask-size: 100% 2px, 2px 100%;
          mask-size: 100% 2px, 2px 100%;
  -webkit-mask-position: center, center;
          mask-position: center, center;
  -webkit-mask-repeat: no-repeat, no-repeat;
          mask-repeat: no-repeat, no-repeat;
}
.icp-faq__item[open] .icp-faq__q::after { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .icp-faq__q::after { transition: none; } }

.icp-faq__a { padding: 0 var(--sp-6) var(--sp-6); }
.icp-faq__a p { margin: 0; color: var(--color-text-muted); max-width: 62ch; }

/* Reveal-on-scroll workhorse (shared IntersectionObserver in footer) */
.icp-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.icp-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .icp-reveal { opacity: 1; transform: none; } }

/* Header brand lockup: compact "ICP" wordmark + full-name subtitle */
.brand__lockup { display: inline-flex; flex-direction: column; line-height: 1.04; }
.brand__name { font-size: 1.3rem; letter-spacing: 0.01em; }
.brand__sub { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-muted); margin-top: 1px; }
@media (max-width: 460px) { .brand__sub { display: none; } }
/* A touch more breathing room for the 8-item nav at mid widths */
@media (min-width: 880px) and (max-width: 1040px) {
  .nav-desktop a { padding-inline: var(--sp-3); font-size: 0.9rem; }
}

/* ============================================================================
   ICP HOME — bespoke signature sections (Global "Around the World" direction).
   These intentionally REPLACE the stock .hero / .cards / .cta-band on the
   homepage so the site does not read as a template build. Hero = diagonal
   two-tone split; Programs = asymmetric bento grid; Donate = warm dual-action
   band. All values derive from the brand tokens.
   ============================================================================ */

/* ---- Hero ------------------------------------------------------------- */
.icp-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: var(--sp-20) var(--sp-24);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: radial-gradient(90% 75% at 100% 0%, color-mix(in oklch, var(--brand-primary) 10%, var(--brand-bg)), var(--brand-bg) 62%);
  border-bottom: 1px solid var(--color-border);
}
.icp-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.icp-hero__bg svg {
  position: absolute; right: -7%; top: 50%; transform: translateY(-50%);
  width: min(48vw, 640px); height: auto; color: var(--brand-primary); opacity: 0.16;
}
.icp-hero__wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.icp-hero__copy { max-width: 34rem; }
.icp-hero__copy::before {
  content: ""; display: block; width: 72px; height: 4px; border-radius: 2px;
  background: var(--brand-primary); margin-bottom: var(--sp-5);
}
.icp-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display); line-height: 1.06; letter-spacing: -0.02em;
  font-weight: 800; margin-block: var(--sp-3) var(--sp-5); max-width: 16ch;
  color: var(--color-text);
}
.icp-hero h1 span { color: var(--color-primary); }
.icp-hero__lead {
  font-size: var(--fs-lead); line-height: 1.6; margin-bottom: var(--sp-8);
  color: var(--color-text-muted); max-width: 44ch;
}
.icp-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.icp-hero .btn-ghost { background: var(--color-bg); }
.icp-hero__media { position: relative; min-height: 340px; }
.icp-hero__media .icp-media { box-shadow: var(--shadow-lg); }
.icp-hero__photo--main { aspect-ratio: 4 / 3; }
.icp-hero__photo--inset {
  position: absolute; right: -3%; bottom: -9%; width: 46%; aspect-ratio: 1 / 1;
  border: 4px solid var(--color-bg);
}
@media (max-width: 900px) {
  .icp-hero { padding-block: var(--sp-14) var(--sp-16); }
  .icp-hero__wrap { grid-template-columns: 1fr; }
  .icp-hero__media { order: -1; max-width: 30rem; margin-inline: auto; min-height: 0; margin-bottom: var(--sp-6); }
  .icp-hero__bg svg { opacity: 0.1; }
}
@media (max-width: 480px) {
  .icp-hero__photo--inset { width: 42%; right: 0; bottom: -8%; }
}

/* ---- Home tiles ------------------------------------------------------- */
.icp-tiles {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--sp-8);
}
.icp-tile {
  display: flex; flex-direction: column;
  background: var(--color-bg); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.icp-tile:hover {
  text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklch, var(--brand-primary) 45%, var(--color-border));
}
.icp-tile__img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--color-bg-alt);
}
.icp-tile__img--contain {
  object-fit: contain; padding: var(--sp-4);
  background: color-mix(in oklch, var(--brand-primary) 8%, var(--brand-bg));
}
.icp-tile__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5) var(--sp-6) var(--sp-6); flex: 1; }
.icp-tile__title {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2);
  font-family: var(--font-display); font-weight: 750; font-size: var(--fs-h3);
  line-height: var(--lh-tight); letter-spacing: -0.02em; color: var(--color-text);
}
.icp-tile__arrow { font-family: var(--font-sans); color: var(--color-primary); transition: transform var(--dur-base) var(--ease-out); }
.icp-tile:hover .icp-tile__arrow { transform: translateX(4px); }
.icp-tile__text { color: var(--color-text-muted); font-size: 0.975rem; line-height: 1.55; }
@media (max-width: 880px) { .icp-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .icp-tiles { grid-template-columns: 1fr; } }
.icp-section--flush { padding-top: 0; }

/* ---- Programs: asymmetric bento grid ----------------------------------- */
.icp-bento {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(150px, auto);
  margin-top: var(--sp-10);
}
.icp-bento__tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-2);
  padding: var(--sp-6);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.icp-bento__tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.icp-bento__tile h3 { margin: 0; font-size: var(--fs-h3); font-family: var(--font-display); }
.icp-bento__tile p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }
.icp-bento__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-accent-soft));
  color: var(--color-primary); margin-bottom: var(--sp-2);
}
.icp-bento__icon svg { width: 22px; height: 22px; }
/* feature tile: brand-filled with a faint photo behind */
.icp-bento__tile--feature {
  grid-column: span 2; grid-row: span 2; color: #fff; border: 0;
  background: linear-gradient(150deg, var(--color-primary), var(--color-accent-deep));
}
.icp-bento__tile--feature .icp-media {
  position: absolute; inset: 0; z-index: 0; border: 0; border-radius: 0;
  aspect-ratio: auto; height: 100%; opacity: 0.26;
}
.icp-bento__tile--feature > :not(.icp-media) { position: relative; z-index: 1; }
.icp-bento__tile--feature h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: #fff; }
.icp-bento__tile--feature p { color: rgba(255, 255, 255, 0.9); max-width: 38ch; }
.icp-bento__tile--feature .icp-bento__icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.icp-bento__tag {
  align-self: flex-start; display: inline-block;
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: var(--sp-1) var(--sp-3); border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); margin-bottom: var(--sp-3);
}
/* full-width tile (VBS): icon beside copy */
.icp-bento__tile--full { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--sp-5); }
.icp-bento__tile--full .icp-bento__icon { margin-bottom: 0; flex-shrink: 0; }
.icp-bento__tile--full > div { display: flex; flex-direction: column; gap: var(--sp-1); }
@media (max-width: 820px) {
  .icp-bento { grid-template-columns: 1fr 1fr; }
  .icp-bento__tile--feature { grid-column: 1 / -1; grid-row: span 1; min-height: 240px; }
}
@media (max-width: 520px) {
  .icp-bento { grid-template-columns: 1fr; }
  .icp-bento__tile--feature, .icp-bento__tile--full { grid-column: auto; }
  .icp-bento__tile--full { flex-direction: column; align-items: flex-start; }
}

/* ---- Donate strip ----------------------------------------------------- */
.icp-cta {
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  background: color-mix(in oklch, var(--brand-primary) 8%, var(--brand-bg));
  border: 1px solid color-mix(in oklch, var(--brand-primary) 22%, var(--brand-bg));
  color: var(--color-text);
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-8); align-items: center;
}
.icp-cta .eyebrow { margin-bottom: var(--sp-2); }
.icp-cta h2 { margin: 0 0 var(--sp-3); font-family: var(--font-display); max-width: 30ch; font-size: clamp(1.5rem, 2vw + 0.8rem, 2.1rem); }
.icp-cta p { margin: 0; color: var(--color-text); max-width: 58ch; }
.icp-cta__actions { display: flex; flex-direction: column; gap: var(--sp-3); }
.icp-cta__actions .btn { white-space: nowrap; }
@media (max-width: 760px) {
  .icp-cta { grid-template-columns: 1fr; gap: var(--sp-6); }
  .icp-cta__actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---- Newsletter sign-up pop-up --------------------------------------- */
.signup-popup {
  margin: auto; inset: 0;
  width: min(440px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  padding: var(--sp-10) var(--sp-8) var(--sp-8);
  border: 0; border-top: 6px solid var(--brand-primary); border-radius: var(--radius-lg);
  background: var(--color-bg); color: var(--color-text);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
.signup-popup::backdrop { background: color-mix(in oklch, var(--brand-neutral) 55%, transparent); }
.signup-popup__close {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--color-text-muted); cursor: pointer;
}
.signup-popup__close:hover { background: var(--color-bg-alt); color: var(--color-text); }
.signup-popup__title { margin: 0 0 var(--sp-2); font-size: var(--fs-h3); }
.signup-popup__text { margin: 0 0 var(--sp-5); color: var(--color-text-muted); }
.signup-popup__form { display: flex; flex-direction: column; gap: var(--sp-3); }
.signup-popup__label { font-weight: 600; font-size: var(--fs-small); }
.signup-popup__form input[type="email"] {
  width: 100%; padding: var(--sp-3) var(--sp-4);
  border: 1px solid color-mix(in oklch, var(--brand-neutral) 30%, var(--brand-bg));
  border-radius: var(--radius-sm); background: var(--color-bg); font-size: 1rem;
}
.signup-popup__form input[type="email"]:focus-visible { outline: 3px solid var(--color-primary-ring); outline-offset: 1px; border-color: var(--color-primary); }
.signup-popup__form .btn { width: 100%; }
.signup-popup__status { margin: 0; font-size: var(--fs-small); min-height: 1.4em; }
.signup-popup__status[data-state="ok"] { color: #0b7a55; font-weight: 600; }
.signup-popup__status[data-state="error"] { color: #b3261e; }
.signup-popup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Doubled Powered-by-Spark footer badge - 2026-07-07 (LINGO-SPARK-BADGE-2X) */
.spark-mark { width: 3.2em; height: 3.2em; vertical-align: middle; margin-left: -0.63em; margin-top: -0.8em; margin-bottom: -0.8em; }

/* ============================================================================
   CONTENT-PHASE COMPONENTS (2026-07-14)
   Added when the wireframe took on real copy, photography, video and the live
   donation form. Everything below derives from the existing brand tokens.
   ============================================================================ */

/* --- Video facade -----------------------------------------------------------
   YouTube cannot hide its own title bar on an embed, and eleven iframes would
   drag a page to its knees, so each lesson is a poster image + play button. The
   iframe is created only when a visitor clicks (see the script on /curriculum),
   which is also why nothing third-party loads until they ask for it. */
.icp-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-6);
}
.icp-video {
  position: relative;
  /* flex column, not block: a <button> lays its children out in an anonymous box
     and will not reliably stack two block spans, which silently swallowed the
     title strip under the poster. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-elev);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.icp-video:hover,
.icp-video:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.icp-video__poster { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--color-bg-alt); }
.icp-video__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.icp-video__play {
  position: absolute; inset: 0; margin: auto;
  width: 4rem; height: 4rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: color-mix(in oklch, var(--brand-neutral) 72%, transparent);
  border: 2px solid rgba(255, 255, 255, 0.9);
  transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.icp-video:hover .icp-video__play { background: var(--color-primary); transform: scale(1.06); }
.icp-video__play svg { width: 1.5rem; height: 1.5rem; fill: #fff; margin-left: 3px; }
.icp-video__title {
  display: block;
  padding: var(--sp-4) var(--sp-5);
  font-weight: 600;
  color: var(--color-text);
}
.icp-video__title small {
  display: block;
  font-weight: 400;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}
.icp-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .icp-video, .icp-video__play { transition: none; }
  .icp-video:hover, .icp-video:focus-visible { transform: none; }
  .icp-video:hover .icp-video__play { transform: none; }
}

/* --- Statement of faith ------------------------------------------------------
   Fifteen numbered articles, each with its Scripture references. Numbered so the
   list reads as a document, not as marketing pillars. */
.icp-faith { display: grid; gap: var(--sp-5); counter-reset: faith; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .icp-faith { grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--sp-10); } }
.icp-faith li {
  counter-increment: faith;
  position: relative;
  padding-left: var(--sp-10);
  color: var(--color-text);
}
.icp-faith li::before {
  content: counter(faith);
  position: absolute; left: 0; top: 0.1em;
  width: 1.9rem; height: 1.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  font-size: var(--fs-small); font-weight: 700;
  color: #fff;
  background: var(--color-primary);
}
.icp-faith cite {
  display: block;
  margin-top: var(--sp-1);
  font-style: normal;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* --- Third-party embed frame (Zeffy donation form, Google map) --------------- */
.icp-embed {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elev);
}
.icp-embed iframe { display: block; width: 100%; border: 0; }
/* Tall enough for the Zeffy form's own content (measured on the live embed), but
   not so tall it leaves a dead band under it. Zeffy cannot resize its own frame
   cross-origin, so this is a fixed height by necessity. */
.icp-embed--donation iframe { min-height: 820px; }
.icp-embed--map iframe { height: 400px; }
.icp-embed__fallback {
  padding: var(--sp-6);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* --- Download rows: give the file type + size room --------------------------- */
.icp-download__meta { font-size: var(--fs-small); color: var(--color-text-muted); }

/* --- Region cards without photography ---------------------------------------
   The four "other countries" regions have no ICP photograph, and dressing them
   with stock imagery would imply a stock photo shows ICP's actual work there.
   These carry the language and the work instead. */
.icp-region--text { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-6); }
.icp-region--text .icp-region__lang {
  align-self: flex-start;
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-primary);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 999px;
  background: color-mix(in oklch, var(--brand-primary) 10%, var(--brand-bg));
}
.icp-region--text h3 { margin: var(--sp-1) 0 0; }

/* --- Links inside a tinted banner ------------------------------------------
   .icp-banner paints two decorative radial gradients (brand primary at 16%,
   brand accent at 14%) behind its copy. That tint darkens the background under
   any link sitting in the banner: --color-primary #b04d19, which is a clean
   5.35:1 on white, drops to 3.96:1 on the worst-case tint (#F1DAC2) and fails
   1.4.3. An automated scan can only mark this "needs review", because the
   background it has to resolve is a pseudo-element gradient.

   Deepen the link colour in this context only (5.47:1 on that same worst case),
   and underline it, so the link is not signalled by colour alone. The banner's
   own decoration is untouched; non-text owes 3:1 and already has it. */
.icp-banner a:not(.btn) {
  color: #8f3d12;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.icp-banner a:not(.btn):hover { color: var(--brand-neutral); }
