/* ==========================================================================
   Design Tokens
   ========================================================================== */
@import url("image-protection.css");
@import url("video-sound.css");

:root {
    /* ==================================================================
       Global design system — see /design-system/bring-them-light-design-system.md
       Core hexes: #2C2C2C (primary dark), #BDAD7B (muted accent),
       #F4F0E3 (warm light). Accents are decorative only — never body text.
       ================================================================== */
    --color-primary-dark: #2C2C2C;
    --color-primary-dark-hover: #202020;
    --color-accent: #BDAD7B;
    --color-accent-on-light: var(--color-accent);
    --color-warm-light: #F4F0E3;

    --color-bg: var(--color-primary-dark);
    --color-bg-alt: var(--color-primary-dark);
    --color-surface: var(--color-primary-dark);
    --color-surface-light: var(--color-warm-light);

    --color-text: var(--color-warm-light);
    --color-text-on-light: var(--color-primary-dark);

    /* Header bar + dropdown / mobile menu surfaces (solid site chrome) */
    --color-header-bg: var(--color-primary-dark);

    --color-text-muted: rgba(244, 240, 227, 0.78);
    --color-text-dim: rgba(244, 240, 227, 0.55);
    --color-text-muted-on-light: rgba(44, 44, 44, 0.72);
    --color-text-dim-on-light: rgba(44, 44, 44, 0.52);

    --color-border: rgba(244, 240, 227, 0.12);
    --color-border-strong: rgba(244, 240, 227, 0.22);
    --color-border-on-light: rgba(44, 44, 44, 0.1);

    --color-accent-glow: rgba(189, 173, 123, 0.22);
    --color-scrim: rgba(44, 44, 44, 0.82);
    --color-scrim-panel: rgba(44, 44, 44, 0.96);

    /* Aliases — existing utilities keep working */
    --color-highlight: var(--color-accent-on-light);
    --color-highlight-glow: var(--color-accent-glow);
    --color-primary: var(--color-accent);
    --color-primary-soft: var(--color-accent);

    /* Buttons — editorial, memorial, understated */
    --button-radius: 0.45rem;
    --button-padding-y: 0.86rem;
    --button-padding-x: 1.35rem;
    --button-font-size: 0.8125rem;
    --button-font-weight: 500;
    --button-letter-spacing: 0.1em;
    --button-bg: var(--color-primary-dark);
    --button-bg-hover: var(--color-primary-dark-hover);
    --button-text: var(--color-warm-light);
    --button-border: var(--color-primary-dark);
    --button-shadow-hover: 0 12px 26px -22px rgba(44, 44, 44, 0.72);
    --button-outline-bg: transparent;
    --button-outline-text: var(--color-primary-dark);
    --button-outline-border: var(--color-primary-dark);

    /* Typography — Figtree everywhere for now; use --font-heading vs --font-body
       when you introduce a second family (no need to touch individual components). */
    --font-body: "Figtree", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: var(--font-body);
    --font-serif: var(--font-body);
    --font-sans: var(--font-body);

    /* Spacing scale — generous, memorial-like breathing room */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 5.5rem;

    /* Fluid rhythm tokens — single source of truth for section & container spacing */
    --section-py: clamp(1.4rem, 2.75vw, 2.5rem);       /* between sections */
    --section-py-compact: clamp(1.1rem, 2.5vw, 1.9rem); /* footer & tighter blocks */
    --container-px: clamp(1.25rem, 4vw, 2rem);      /* container inline padding */

    /* Internal section rhythm — consistent hierarchy across all blocks */
    --rhythm-eyebrow-gap: var(--space-sm);   /* eyebrow → title */
    --rhythm-title-gap: var(--space-lg);     /* title → body */
    --rhythm-block-gap: var(--space-lg);    /* body → grid/extras */
    --rhythm-paragraph-gap: var(--space-md); /* paragraph → paragraph */

    /* Header — fixed overlay, hero compensates via padding */
    --header-height: 5rem;
    --header-z: 100;
    --header-action-size: 2.5rem;     /* unified height of nav links, icon buttons, Donate */
    --header-nav-gap: clamp(1.25rem, 1.65vw, 1.85rem); /* gap between nav items */
    --header-side-gap: clamp(0.75rem, 1.5vw, 1.25rem); /* logo ↔ nav and nav ↔ actions */
    --tracking-nav: 0.12em;           /* refined letter-spacing for nav & Donate */

    --fs-xs: 0.75rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1.0625rem;
    --fs-md: 1.25rem;
    --fs-lg: 1.625rem;
    --fs-xl: 2.25rem;
    --fs-2xl: 3rem;
    --fs-3xl: 4.5rem;
    --fs-display: 10rem;

    /* Role-based typography — see docs/typography-guide.md */
    --fs-nav: 0.8125rem;
    --fs-eyebrow: 0.8125rem;
    --fs-caption: 0.8125rem;
    --fs-ui: 0.8125rem;
    --fs-prose-secondary: 1rem;
    --fs-prose-story: clamp(1.0625rem, 0.45vw + 1rem, 1.125rem);
    --fs-display-hero: clamp(2.35rem, 6vw, 3.85rem);
    --fs-h1: clamp(2rem, 4.5vw, 3rem);
    --fs-h2: clamp(1.45rem, 3.2vw, 2.15rem);
    --fs-h3: clamp(1.15rem, 2vw, 1.45rem);
    --fs-h4: clamp(1.05rem, 1.5vw, 1.2rem);

    --lh-tight: 1.05;
    --lh-snug: 1.25;
    --lh-base: 1.7;
    --lh-prose: 1.75;
    --lh-prose-relaxed: 1.85;

    --measure-prose: 65ch;
    --measure-prose-narrow: 42ch;
    --measure-prose-wide: 68ch;
    --measure-heading: min(38rem, 100%);

    --tracking-tight: -0.02em;
    --tracking-wide: 0.16em;
    --tracking-wider: 0.28em;
    --tracking-eyebrow: 0.2em;

    /* Layout */
    --max-width: 1200px;          /* main body sections */
    --max-width-header: 1360px;   /* header content — room for centred nav + side rails */
    --max-width-narrow: 760px;
    --max-width-prose: 640px;
    --radius-sm: 0.25rem;
    --radius: 0.5rem;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.35s;

    /* Memorial script — authentic Tahu only (self-hosted); generic cursive if load fails */
    --font-tahu: "Tahu", cursive;
}

/* Tahu! — Khurasan (free commercial use). Self-hosted from production asset. */
@font-face {
    font-family: "Tahu";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local("Tahu!"),
        local("Tahu"),
        url("../fonts/Tahu.woff2") format("woff2"),
        url("../fonts/Tahu.ttf") format("truetype");
}

/* ==========================================================================
   Reset
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

ul, ol {
    list-style: none;
}

::selection {
    background: var(--color-accent);
    color: var(--color-text-on-light);
}

/* ==========================================================================
   Base Typography
   ========================================================================== */
body {
    font-family: inherit;
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.5rem 0.85rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-primary-dark);
    background: var(--color-warm-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: var(--lh-tight);
    color: var(--color-text);
    letter-spacing: var(--tracking-tight);
}

/* ==========================================================================
   Global Buttons — quiet editorial CTAs
   ========================================================================== */
.btn,
.memorial__btn,
.memory-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 2.75rem;
    padding: var(--button-padding-y) var(--button-padding-x);
    font-family: var(--font-body);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    letter-spacing: var(--button-letter-spacing);
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--button-text);
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: var(--button-radius);
    box-shadow: none;
    cursor: pointer;
    transition:
        background-color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.btn:hover,
.btn:focus-visible,
.memorial__btn:hover,
.memorial__btn:focus-visible,
.memory-btn:hover,
.memory-btn:focus-visible {
    color: var(--button-text);
    background: var(--button-bg-hover);
    border-color: var(--button-bg-hover);
    box-shadow: var(--button-shadow-hover);
    transform: translateY(-1px);
}

.btn:focus-visible,
.memorial__btn:focus-visible,
.memory-btn:focus-visible {
    outline: 2px solid rgba(189, 173, 123, 0.55);
    outline-offset: 3px;
}

.btn--secondary {
    color: var(--button-outline-text);
    background: var(--button-outline-bg);
    border-color: var(--button-outline-border);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
    color: var(--button-text);
    background: var(--button-bg);
    border-color: var(--button-border);
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .memorial__btn,
    .memory-btn {
        transition: none;
    }

    .btn:hover,
    .btn:focus-visible,
    .memorial__btn:hover,
    .memorial__btn:focus-visible,
    .memory-btn:hover,
    .memory-btn:focus-visible {
        transform: none;
    }
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--container-px);
}

/* ==========================================================================
   Image Frame — responsive, CLS-safe, drop-in container
   ==========================================================================
   Usage:
     <div class="image-frame image-frame--portrait">
       <img src="..." alt="..." width="400" height="500" loading="lazy" decoding="async">
     </div>

   - Aspect-ratio reserves space before image decodes (prevents layout shift)
   - Image absolutely fills the frame with object-fit: cover
   - Low-brightness surface background shows while loading or if image fails
*/
.image-frame {
    position: relative;
    overflow: hidden;
    background-color: var(--color-surface);
    aspect-ratio: 16 / 10;  /* default; override with modifier */
    isolation: isolate;
}

.image-frame--portrait  { aspect-ratio: 4 / 5; }
.image-frame--square    { aspect-ratio: 1 / 1; }
.image-frame--landscape { aspect-ratio: 16 / 10; }
.image-frame--wide      { aspect-ratio: 21 / 9; }
.image-frame--video     { aspect-ratio: 16 / 9; }

.image-frame > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    /* Fade in on load for a subtle polish */
    transition: opacity 0.4s var(--ease);
}

/* Optional loading state — add class="is-loading" while image not yet cached */
.image-frame > img[loading]:not([src]),
.image-frame > img[src=""] {
    opacity: 0;
}

/* ==========================================================================
   Header — fixed bar (#2C2C2C) site-wide
   ========================================================================== */
/*
 * Sticky header: fixed bar, solid #2C2C2C site-wide. Optional .is-scrolled
 * state is reserved for subtle scroll feedback (JS toggles past ~20px).
 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--header-z);
    height: var(--header-height);
    background-color: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
    box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.35);
}

/* ---------- No-hero pages ----------
   Pages that don't render a full-bleed hero behind the header
   (e.g. future listing pages) opt in by adding `class="no-hero"` to
   <body>. Offsets content below the fixed header. */
body.no-hero {
    padding-top: var(--header-height);
}

body.no-hero .site-header {
    background-color: var(--color-header-bg);
}

/* ---------- Immersive hero (homepage, Lives Remembered landing, profiles) ----------
   JS sets --header-depth from 0 → 1 while scrolling (smoothstep over ~132px).

   Important: do NOT use backdrop-filter at the top of the page. Blur always reads
   as a separate frosted band over the hero/video — not “the hero flowing under
   the nav”. Instead: truly transparent bar + a soft top-only gradient scrim
   (fades out as the bar becomes solid). */
body.has-immersive-hero .site-header {
    --header-depth: 0;
    background-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, calc(0.48 * (1 - var(--header-depth)))) 0%,
        rgba(0, 0, 0, calc(0.18 * (1 - var(--header-depth)))) 55%,
        transparent 100%
    );
    background-color: rgba(44, 44, 44, calc(var(--header-depth)));
    /* No bottom border — a 1px hairline reads as a hard “cut” above the hero */
    border-bottom: none;
    box-shadow: 0 4px 24px -8px rgba(0, 0, 0, calc(0.35 * var(--header-depth)));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
}

body.has-immersive-hero .site-header .site-nav__link {
    /* 0.94 (hero) → 0.78 (--color-text-muted alpha) */
    color: rgba(244, 240, 227, calc(0.94 - var(--header-depth) * 0.16));
    text-shadow: 0 1px 3px rgba(0, 0, 0, calc(0.55 * (1 - var(--header-depth))));
    transition: none;
}

body.has-immersive-hero .site-header .site-nav__chevron {
    opacity: calc(0.82 + 0.18 * var(--header-depth));
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, calc(0.45 * (1 - var(--header-depth)))));
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

body.has-immersive-hero .site-header .site-action {
    color: rgba(244, 240, 227, calc(0.93 - var(--header-depth) * 0.15));
    text-shadow: 0 1px 2px rgba(0, 0, 0, calc(0.5 * (1 - var(--header-depth))));
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

body.has-immersive-hero .site-header .site-action--donate {
    color: var(--color-warm-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, calc(0.45 * (1 - var(--header-depth))));
    /* Light border on hero → site border-strong when solid */
    border-color: rgba(244, 240, 227, calc(0.42 - var(--header-depth) * 0.2));
    transition:
        color var(--dur) var(--ease),
        background-color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

body.has-immersive-hero .site-header .logo img {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, calc(0.5 * (1 - var(--header-depth)))));
}

body.has-immersive-hero .site-header .nav-toggle {
    color: rgba(244, 240, 227, calc(0.96 + var(--header-depth) * 0.04));
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, calc(0.5 * (1 - var(--header-depth)))));
}

/*
 * Header content uses a three-zone layout:
 *   [ logo (auto) ] [ nav (centred in 1fr) ] [ actions (auto) ]
 *
 * - Logo and actions size to their content; the middle track absorbs leftover width.
 * - Nav is centred inside that middle track so it sits optically between the logo
 *   and the wider actions cluster — not geometrically centred on the full bar
 *   (which reads as pushed right when the right group is heavier).
 * - Max width: var(--max-width-header) — prevents edge-to-edge stretching.
 */
.site-header__inner {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: var(--header-side-gap);
    width: 100%;
    max-width: var(--max-width-header);
    height: 100%;
    margin-inline: auto;
    padding-inline: var(--container-px);
}

/* ---------- Header logo (raster PNG image) ---------- */
.logo {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    z-index: 2;

    /* Anchored to the left column of the header grid */
    grid-column: 1;
    justify-self: start;

    /* Guarantee the left grid track never collapses below the logo's content
       width. Without this, the centered nav (which sits in an `auto` track)
       can eat the entire row on desktop and the flanking `1fr` tracks shrink
       to 0, which would make the image's `max-width: 100%` resolve to 0. */
    min-width: max-content;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    filter: none;
    /* Override the global `img { max-width: 100% }` reset. That rule sets the
       image's min-content to 0, which lets the grid track collapse and hides
       the logo on desktop layouts where the nav is wide. */
    max-width: none;
}

/* ---------- Footer text branding (kept for legacy footer mark + name) ---------- */
.site-logo__mark {
    color: var(--color-primary);
    font-size: 1.15em;
    line-height: 1;
}

.site-logo__text {
    line-height: 1;
}

/* ---------- Menu container (holds nav + actions) ----------
   On desktop, .site-menu uses `display: contents` so its children
   (<nav> and .site-actions) become direct grid items of the header.
   Nav sits in the middle track; actions anchor to the right.

   On mobile, this rule is overridden (see mobile media query) so
   .site-menu returns to a real flex container for the dropdown panel.

   Spacing hierarchy (desktop, tightest → widest):
     • icon cluster (search ↔ instagram)   — tightest (0.25rem)
     • items within the nav list           — var(--header-nav-gap)
     • icon cluster ↔ Donate button        — medium   (0.75rem)
     • logo / nav / actions columns        — var(--header-side-gap)
     • nav placement                       — centred in the middle grid track (desktop)
 */
.site-menu {
    display: contents;
}

/* ---------- Navigation (desktop) ---------- */
.site-nav {
    height: 100%;
    grid-column: 2;
    justify-self: center;
    align-self: center;
    min-width: 0;
    width: max-content;
    max-width: 100%;
    z-index: 1;
}

.site-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: var(--header-nav-gap);
    padding: 0;
    margin: 0;
    list-style: none;
    height: 100%;
}

.site-nav__item {
    display: flex;
    align-items: center;
    height: 100%;
}

.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: var(--header-action-size);
    font-size: var(--fs-nav);
    font-weight: 400;
    letter-spacing: var(--tracking-nav);
    text-transform: uppercase;
    color: var(--color-text-muted);
    line-height: 1;
    white-space: nowrap;
    background-color: transparent;
    transition: color var(--dur) var(--ease);
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.5rem;
    width: 0;
    height: 1px;
    background-color: var(--color-highlight);
    transform: translateX(-50%);
    transition: width var(--dur) var(--ease);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    color: var(--color-text);
    outline: none;
}

.site-nav__link:active {
    background-color: transparent;
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after {
    width: calc(100% - 0.25rem);
}

/* While the dropdown is open (hover or focus inside), match link emphasis to hover
   (underline + text color) without a background wash. */
.site-nav__item--has-dropdown:hover > .site-nav__link,
.site-nav__item--has-dropdown:focus-within > .site-nav__link {
    color: var(--color-text);
}

.site-nav__item--has-dropdown:hover > .site-nav__link::after,
.site-nav__item--has-dropdown:focus-within > .site-nav__link::after {
    width: calc(100% - 0.25rem);
}

/* Dropdown chevron indicator */
.site-nav__chevron {
    width: 0.65rem;
    height: 0.65rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.site-nav__item--has-dropdown > .site-nav__link:hover .site-nav__chevron,
.site-nav__item--has-dropdown > .site-nav__link:focus-visible .site-nav__chevron,
.site-nav__item--has-dropdown:hover > .site-nav__link .site-nav__chevron,
.site-nav__item--has-dropdown:focus-within > .site-nav__link .site-nav__chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* ---------- Dropdown panel (desktop) ----------
   Anchored beneath the parent nav item, revealed on hover or keyboard
   focus-within. Dark surface matching the header, soft border and
   subtle elevation so it reads as a layer above the page. */
.site-nav__item--has-dropdown {
    position: relative;
}

.site-nav__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -4px);
    min-width: 16rem;
    padding: var(--space-xs) 0;
    margin: 0;
    list-style: none;
    background-color: var(--color-header-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--dur) var(--ease),
                opacity var(--dur) var(--ease),
                visibility 0s linear var(--dur);
    z-index: var(--header-z);
}

.site-nav__item--has-dropdown:hover > .site-nav__dropdown,
.site-nav__item--has-dropdown:focus-within > .site-nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition: transform var(--dur) var(--ease),
                opacity var(--dur) var(--ease),
                visibility 0s linear 0s;
}

.site-nav__dropdown-link {
    position: relative;
    display: block;
    padding: 0.65rem var(--space-md);
    font-size: var(--fs-xs);
    font-weight: 400;
    letter-spacing: var(--tracking-nav);
    text-transform: uppercase;
    color: var(--color-text-muted);
    white-space: nowrap;
    transition: color var(--dur) var(--ease);
}

.site-nav__dropdown-link::after {
    content: "";
    position: absolute;
    left: var(--space-md);
    bottom: 0.4rem;
    width: 0;
    height: 1px;
    background-color: var(--color-highlight);
    transition: width var(--dur) var(--ease);
}

.site-nav__dropdown-link:hover,
.site-nav__dropdown-link:focus-visible {
    color: var(--color-text);
    outline: none;
}

.site-nav__dropdown-link:active {
    background-color: transparent;
}

.site-nav__dropdown-link:hover::after,
.site-nav__dropdown-link:focus-visible::after {
    width: calc(100% - 2 * var(--space-md));
}

/* Parent row + accordion toggle (toggle visible only in mobile breakpoint below) */
.site-nav__parent-trigger {
    display: contents;
}

.site-nav__submenu-toggle {
    display: none;
}

.site-nav__chevron--toggle {
    flex-shrink: 0;
    transition: transform var(--dur) var(--ease);
}

/* ---------- Right-side actions (search, Instagram, Donate) ----------
   Layout: [icon] [icon]  (tight cluster)   [Donate]  (wider gap)
*/
.site-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem; /* tight cluster between icon buttons */
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    /* Anchored to the right column of the header grid */
    grid-column: 3;
    justify-self: end;
}

.site-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--color-text-muted);
    transition: color var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.site-action--icon {
    width: var(--header-action-size);
    height: var(--header-action-size);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.site-action--icon svg {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
}

.site-action--icon:hover,
.site-action--icon:focus-visible {
    color: var(--color-highlight);
    background-color: rgba(244, 240, 227, 0.06);
}

.site-action--donate {
    height: var(--header-action-size); /* matches icon button and nav link for shared axis */
    padding-inline: 1.15rem;
    margin-left: 0.75rem;      /* clear separation from icon cluster */
    color: var(--color-warm-light);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--button-radius);
    font-size: var(--fs-xs);
    font-weight: var(--button-font-weight);
    letter-spacing: var(--tracking-nav);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.site-action--donate:hover,
.site-action--donate:focus-visible {
    color: var(--color-primary-dark);
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 10px 24px -20px rgba(189, 173, 123, 0.75);
    transform: translateY(-1px);
}

/* ---------- Hamburger toggle ---------- */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--color-text);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle__bars {
    position: relative;
    display: block;
    width: 22px;
    height: 14px;
}

.nav-toggle__bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: currentColor;
    transition: transform var(--dur) var(--ease),
                opacity calc(var(--dur) / 2) var(--ease),
                top var(--dur) var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars span:nth-child(3) { top: calc(100% - 1.5px); }

/* Hamburger → X */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* ---------- Mobile backdrop ---------- */
.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--header-z) - 1);
    background-color: rgba(44, 44, 44, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
}

.nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Prevent body scroll when mobile nav or site search is open */
body.nav-open,
body.site-search-open {
    overflow: hidden;
}

/* ==========================================================================
   Site search (header magnifier)
   ========================================================================== */
.site-search {
    position: fixed;
    inset: 0;
    z-index: calc(var(--header-z) + 50);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(4.5rem, 12vh, 7rem) var(--container-px) var(--space-xl);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease),
                visibility 0s linear var(--dur);
}

.site-search.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transition: opacity var(--dur) var(--ease),
                visibility 0s linear 0s;
}

.site-search__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 44, 44, 0.68);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-search__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 34rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    background: linear-gradient(
        165deg,
        rgba(52, 52, 52, 0.97) 0%,
        rgba(44, 44, 44, 0.94) 100%
    );
    border: 1px solid rgba(244, 240, 227, 0.14);
    border-radius: calc(var(--radius) + 0.15rem);
    box-shadow:
        0 28px 56px -12px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(189, 173, 123, 0.04) inset;
}

.site-search__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.site-search__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 400;
    color: var(--color-warm-light);
    letter-spacing: var(--tracking-tight);
    line-height: var(--lh-snug);
}

.site-search__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--color-text-muted);
    border: 1px solid rgba(244, 240, 227, 0.16);
    border-radius: 999px;
    transition: color var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.site-search__close:hover,
.site-search__close:focus-visible {
    color: var(--color-warm-light);
    background-color: rgba(244, 240, 227, 0.08);
    border-color: rgba(244, 240, 227, 0.24);
}

.site-search__close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.site-search__field {
    position: relative;
}

.site-search__input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    color: var(--color-text-dim);
    pointer-events: none;
}

.site-search__input-icon svg {
    width: 100%;
    height: 100%;
}

.site-search__input {
    width: 100%;
    padding: 0.875rem 1.05rem 0.875rem 2.65rem;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    color: var(--color-warm-light);
    background-color: rgba(244, 240, 227, 0.06);
    border: 1px solid rgba(244, 240, 227, 0.18);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.site-search__input::placeholder {
    color: var(--color-text-dim);
}

.site-search__input:focus {
    border-color: rgba(189, 173, 123, 0.55);
    background-color: rgba(244, 240, 227, 0.09);
    box-shadow: 0 0 0 3px rgba(189, 173, 123, 0.12);
}

.site-search__field:focus-within .site-search__input-icon {
    color: rgba(189, 173, 123, 0.75);
}

.site-search__recent {
    margin-top: var(--space-md);
}

.site-search__recent[hidden] {
    display: none;
}

.site-search__recent-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.55rem;
    font-family: var(--font-sans);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: rgba(244, 240, 227, 0.48);
}

.site-search__recent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.85rem;
    height: 0.85rem;
    color: rgba(189, 173, 123, 0.55);
}

.site-search__recent-icon svg {
    width: 100%;
    height: 100%;
}

.site-search__recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem 0.42rem;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

.site-search__recent-item {
    max-width: 100%;
}

.site-search__recent-link {
    display: inline-block;
    max-width: 100%;
    padding: 0.32em 0.72em;
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    font-weight: 400;
    line-height: var(--lh-snug);
    letter-spacing: 0.01em;
    color: rgba(244, 240, 227, 0.82);
    text-decoration: none;
    background-color: rgba(244, 240, 227, 0.05);
    border: 1px solid rgba(244, 240, 227, 0.1);
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.site-search__recent-link:hover,
.site-search__recent-link:focus-visible {
    color: var(--color-warm-light);
    background-color: rgba(244, 240, 227, 0.1);
    border-color: rgba(189, 173, 123, 0.28);
}

.site-search__recent-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.site-search__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem 0.42rem;
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
    padding: 0;
    overflow: visible;
}

.site-search__filter {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    padding: 0.28em 0.62em;
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    font-weight: 400;
    letter-spacing: 0.01em;
    color: rgba(244, 240, 227, 0.58);
    background-color: rgba(244, 240, 227, 0.04);
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.site-search__filter:hover {
    color: rgba(244, 240, 227, 0.82);
    background-color: rgba(244, 240, 227, 0.07);
}

.site-search__filter:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.site-search__filter.is-active {
    font-weight: 500;
    color: var(--color-primary-dark);
    background-color: var(--color-accent);
    box-shadow: none;
}

.site-search__filter.is-active:hover {
    color: var(--color-primary-dark);
    background-color: var(--color-accent);
}

.site-search__hint {
    margin: 0;
    min-height: 1.35em;
    padding: 0 0.15rem;
    font-size: var(--fs-xs);
    color: var(--color-text-dim);
    line-height: var(--lh-snug);
}

.site-search__results {
    list-style: none;
    margin: var(--space-md) 0 0;
    padding: var(--space-xs) 0.5rem 0 0;
    max-height: min(50vh, 24rem);
    overflow-y: auto;
    border-top: 1px solid rgba(244, 240, 227, 0.1);
    scrollbar-width: auto;
    scrollbar-color: rgba(189, 173, 123, 0.45) rgba(244, 240, 227, 0.08);
}

.site-search__results::-webkit-scrollbar {
    width: 10px;
}

.site-search__results::-webkit-scrollbar-track {
    background: rgba(244, 240, 227, 0.06);
    border-radius: 999px;
    margin-block: var(--space-xs);
}

.site-search__results::-webkit-scrollbar-thumb {
    background: rgba(189, 173, 123, 0.38);
    border: 2px solid rgba(44, 44, 44, 0.35);
    border-radius: 999px;
}

.site-search__results::-webkit-scrollbar-thumb:hover {
    background: rgba(189, 173, 123, 0.58);
}

.site-search__results[hidden] {
    display: none !important;
}

.site-search__results::-webkit-scrollbar-thumb:active {
    background: var(--color-accent);
}

.site-search__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    border-top: 1px solid rgba(244, 240, 227, 0.1);
}

.site-search__empty[hidden],
.site-search__empty[aria-hidden="true"] {
    display: none !important;
}

.site-search__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: rgba(244, 240, 227, 0.28);
}

.site-search__empty:not([hidden]) .site-search__empty-icon {
    display: inline-flex;
}

.site-search__empty[hidden] .site-search__empty-icon,
.site-search__empty[aria-hidden="true"] .site-search__empty-icon {
    display: none;
}

.site-search__empty-icon svg {
    width: 100%;
    height: 100%;
}

.site-search__empty-text {
    margin: 0;
    max-width: 18rem;
    font-size: var(--fs-sm);
    color: var(--color-text-dim);
    line-height: var(--lh-snug);
}

.site-search__item {
    border-bottom: 1px solid rgba(244, 240, 227, 0.07);
}

.site-search__item:last-child {
    border-bottom: none;
}

.site-search__link {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 0.72rem 0.55rem;
    margin-inline: -0.35rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    border-radius: calc(var(--radius-sm) + 0.05rem);
    transition: color var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.site-search__link:hover,
.site-search__link:focus-visible,
.site-search__link.is-active {
    color: var(--color-warm-light);
    background-color: rgba(244, 240, 227, 0.09);
    box-shadow: inset 3px 0 0 rgba(189, 173, 123, 0.55);
}

.site-search__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}

.site-search__link--static {
    cursor: default;
    opacity: 0.72;
}

.site-search__link--static:hover,
.site-search__link--static:focus-visible,
.site-search__link--static.is-active {
    color: var(--color-text-muted);
    background-color: transparent;
    box-shadow: none;
}

.site-search__link:hover .site-search__name,
.site-search__link:focus-visible .site-search__name,
.site-search__link.is-active .site-search__name {
    color: var(--color-warm-light);
}

.site-search__link:hover .site-search__category,
.site-search__link:focus-visible .site-search__category,
.site-search__link.is-active .site-search__category {
    color: rgba(244, 240, 227, 0.62);
}

.site-search__name {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0.12em;
    font-weight: 500;
    color: var(--color-warm-light);
    line-height: var(--lh-snug);
    overflow-wrap: break-word;
}

.site-search__category {
    flex: 0 1 auto;
    max-width: min(11.5rem, 46%);
    display: block;
    padding: 0.15em 0 0;
    font-size: var(--fs-xs);
    font-weight: 400;
    line-height: var(--lh-snug);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-align: right;
    text-wrap: balance;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
    color: rgba(244, 240, 227, 0.42);
    transition: color var(--dur) var(--ease);
}

@media (max-width: 640px) {
    .site-search {
        padding: clamp(3.75rem, 10vh, 5.5rem) var(--space-sm) var(--space-md);
    }

    .site-search__panel {
        max-width: none;
        width: calc(100% - 0.5rem);
        padding: var(--space-md) var(--space-sm) var(--space-sm);
    }

    .site-search__head {
        margin-bottom: var(--space-md);
    }

    .site-search__input {
        padding: 0.8rem 0.9rem 0.8rem 2.55rem;
        font-size: 1rem;
    }

    .site-search__input-icon {
        left: 0.85rem;
    }

    .site-search__recent {
        margin-top: var(--space-sm);
    }

    .site-search__recent-link {
        font-size: var(--fs-ui);
        max-width: min(100%, 16rem);
    }

    .site-search__filters {
        flex-wrap: nowrap;
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        margin-top: var(--space-sm);
        margin-bottom: var(--space-sm);
        margin-inline: 0;
        padding: 0.15rem 0 0.2rem;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-padding-inline: 0.75rem;
        scrollbar-width: none;
    }

    .site-search__filters::-webkit-scrollbar {
        display: none;
    }

    .site-search__filters::after {
        content: "";
        flex: 0 0 0.75rem;
    }

    .site-search__filter {
        padding: 0.3em 0.62em;
        font-size: var(--fs-xs);
    }

    .site-search__hint {
        margin-top: 0;
    }

    .site-search__results {
        margin-top: var(--space-sm);
        max-height: min(52vh, 20rem);
        padding-right: 0.35rem;
    }

    .site-search__results::-webkit-scrollbar {
        width: 8px;
    }

    .site-search__empty {
        padding: var(--space-lg) var(--space-sm);
    }

    .site-search__link {
        gap: var(--space-xs);
        padding: 0.68rem 0.45rem;
    }

    .site-search__category {
        max-width: min(9.25rem, 44%);
        padding-top: 0.12em;
        font-size: var(--fs-xs);
        letter-spacing: 0.08em;
        line-height: var(--lh-snug);
    }
}

/* ==========================================================================
   Hero — truly full-bleed Vimeo background video
   ========================================================================== */

/*
 * Full viewport band: min-height uses vh → svh → dvh so mobile browser
 * chrome doesn’t leave a strip of the next section visible.
 *
 * On immersive home/profile landings, memorial uses margin-top: -header-height
 * so its background meets the fixed nav; that would paint into the bottom
 * of the first screen unless the hero is exactly one header taller — see
 * body.has-immersive-hero .hero below.
 */
.hero {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
}

body.has-immersive-hero .hero {
    min-height: calc(100vh + var(--header-height));
    min-height: calc(100svh + var(--header-height));
    min-height: calc(100dvh + var(--header-height));
}

/*
 * Cover-fit the 16:9 Vimeo iframe on any viewport:
 *   • width: 100vw + min-width 16/9×height floor → always ≥ width
 *   • height: 56.25vw + min-height floor → always ≥ height
 * Clipped by .hero overflow; translate(-50%,-50%) centers (no letterboxing).
 * Immersive pages use the same +header floor as .hero so cover matches.
 */
.hero__video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 from viewport width */
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    min-width: calc(100vh * 16 / 9);
    min-width: calc(100svh * 16 / 9);
    min-width: calc(100dvh * 16 / 9);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

body.has-immersive-hero .hero .hero__video {
    min-height: calc(100vh + var(--header-height));
    min-height: calc(100svh + var(--header-height));
    min-height: calc(100dvh + var(--header-height));
    min-width: calc((100vh + var(--header-height)) * 16 / 9);
    min-width: calc((100svh + var(--header-height)) * 16 / 9);
    min-width: calc((100dvh + var(--header-height)) * 16 / 9);
}

.hero__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Responsive video swap: show the desktop cut by default, switch to the
   portrait-friendly mobile cut below 768px. Only one iframe is rendered to
   the viewer at a time, but note that both iframes still load their Vimeo
   players in the background — the hidden one is paused by display: none. */
.hero__video--desktop {
    display: block;
}

.hero__video--mobile {
    display: none;
}

@media (max-width: 768px) {
    .hero__video--desktop {
        display: none;
    }

    .hero__video--mobile {
        display: block;
    }
}

/* Homepage only (profiles use .profile-hero, not .hero): gentle top vignette on
   the video so the fixed immersive nav stays legible on bright frames — same idea
   as .profile-hero__overlay, without affecting Nova or other pages. */
body.has-immersive-hero .hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(44, 44, 44, 0.5) 0%,
        rgba(44, 44, 44, 0.22) 18%,
        rgba(44, 44, 44, 0.08) 32%,
        transparent 52%
    );
}

/* ==========================================================================
   Split — two-column (text + image) section directly below the hero.
   Stacks to a single column on narrow viewports.
   ========================================================================== */
.split {
    padding-block: clamp(1.65rem, 3.5vw, 2.75rem);
    padding-inline: var(--container-px);
    background: var(--color-bg);
}

.split__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.split__text {
    color: var(--color-text-muted);
    font-size: 22px;
    line-height: 1.8;
    max-width: 500px;
}

.split__image {
    position: relative;
}

.split__image::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to right, var(--color-bg), transparent);
}

.split__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .split__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .split__text {
        text-align: center;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Memorial — full-width section with a background image, dark overlay,
   and centered heading + subtitle.
   ========================================================================== */
.memorial {
    position: relative;
    width: 100%;
    min-height: max(32rem, 85vh);
    padding-block: clamp(2.25rem, 5vw, 3.75rem);
    padding-inline: var(--container-px);
    background:
        url("../images/memorial-bg.png") center 40% / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.memorial__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(34, 34, 34, 0.55) 0%,
        rgba(34, 34, 34, 0.62) 50%,
        rgba(28, 28, 28, 0.7) 100%
    );
    pointer-events: none;
}

/* Homepage immersive: memorial image meets the fixed nav — feather the overlay
   top toward header chrome (#2C2C2C) so there is no harsh horizontal seam. */
body.has-immersive-hero .memorial__overlay {
    background: linear-gradient(
        180deg,
        rgba(44, 44, 44, 0.92) 0%,
        rgba(44, 44, 44, 0.55) 14%,
        rgba(34, 34, 34, 0.55) 32%,
        rgba(34, 34, 34, 0.62) 52%,
        rgba(28, 28, 28, 0.7) 100%
    );
}

/* Pull memorial up under the fixed header so the photo continues behind the nav
   (content stays padded down). Cancels the “black bar then image” band. */
body.has-immersive-hero .memorial {
    margin-top: calc(-1 * var(--header-height));
    padding-top: calc(var(--header-height) + clamp(2.25rem, 5vw, 3.75rem));
    padding-bottom: clamp(2.25rem, 5vw, 3.75rem);
}

.memorial__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: var(--color-text);
}

.memorial h1,
.memorial h2 {
    font-size: clamp(1.625rem, 4.2vw, 2.75rem);
    line-height: 1.35;
    margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-warm-light);
    letter-spacing: 0.17rem;
    text-wrap: balance;
}

/* No yellow accent when selecting title copy (esp. date line) */
.memorial h2::selection {
    background: rgba(255, 255, 255, 0.35);
    color: var(--color-warm-light);
}

.memorial__h2-date {
    color: var(--color-warm-light);
    letter-spacing: inherit;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.memorial__script-light {
    font-family: var(--font-tahu);
    /* Script faces are usually single-weight; 100 synthesizes badly */
    font-weight: 400;
    font-style: normal;
    color: #E7DA58;
    font-size: clamp(3.25rem, 11vw, 8rem);
    line-height: 1.05;
    letter-spacing: 0.1em;
    text-transform: none;
    font-feature-settings: "kern" 1;
    display: inline-block;
    vertical-align: baseline;
    position: relative;
    top: 0.08em;
    padding-inline: 0.04em 0.2em;
    padding-block: clamp(0.35rem, 1.25vw, 0.65rem);
    margin-top: clamp(1.25rem, 4.5vw, 2.85rem);
    margin-bottom: clamp(1.25rem, 4.5vw, 2.85rem);
    white-space: nowrap;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    /* Bright gold fill + warm glow + dark separation for photo legibility */
    text-shadow:
        0 0 28px rgba(231, 218, 88, 0.58),
        0 0 56px rgba(231, 218, 88, 0.34),
        0 0 96px rgba(231, 218, 88, 0.16),
        0 3px 18px rgba(0, 0, 0, 0.62),
        0 1px 3px rgba(0, 0, 0, 0.48);
    filter: drop-shadow(0 0 20px rgba(231, 218, 88, 0.32));
}

.memorial__lead {
    font-size: clamp(0.9375rem, 2.1vw, 1.125rem);
    line-height: 1.75;
    font-weight: 300;
    color: var(--color-warm-light);
    max-width: 38rem;
    margin-inline: auto;
    margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

/* Hero CTA — stronger presence on photographic background */
.memorial .memorial__btn {
    min-height: 3.25rem;
    padding: 0.95rem 2.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    background: rgba(44, 44, 44, 0.94);
    border: 1px solid rgba(244, 240, 227, 0.22);
    box-shadow:
        0 1px 0 rgba(244, 240, 227, 0.1) inset,
        0 14px 36px -10px rgba(0, 0, 0, 0.55);
}

.memorial .memorial__btn:hover,
.memorial .memorial__btn:focus-visible {
    background: var(--color-primary-dark-hover);
    border-color: rgba(244, 240, 227, 0.28);
    box-shadow:
        0 1px 0 rgba(244, 240, 227, 0.12) inset,
        0 18px 42px -12px rgba(0, 0, 0, 0.58);
}

.memorial__highlight {
    color: var(--color-accent);
    font-weight: 600;
}

@media (max-width: 768px) {
    .memorial {
        padding-block: clamp(2rem, 6vw, 3.25rem);
        padding-inline: var(--container-px);
        min-height: max(28rem, 85svh);
        background-position: center 38%;
    }

    body.has-immersive-hero .memorial {
        margin-top: calc(-1 * var(--header-height));
        padding-top: calc(var(--header-height) + clamp(2rem, 6vw, 3.25rem));
        padding-bottom: clamp(2rem, 6vw, 3.25rem);
    }

    .memorial h1,
.memorial h2 {
        font-size: clamp(1.375rem, 5.5vw, 1.75rem);
        line-height: 1.38;
        margin-bottom: clamp(1.35rem, 4vw, 2rem);
    }

    .memorial__script-light {
        font-size: clamp(2.85rem, 14vw, 8rem);
        line-height: 1.05;
        letter-spacing: 0.1em;
        font-weight: 400;
        top: 0.06em;
        padding-inline: 0.03em 0.16em;
        padding-block: clamp(0.25rem, 1.2vw, 0.55rem);
        margin-top: clamp(1rem, 5vw, 2.15rem);
        margin-bottom: clamp(1rem, 5vw, 2.15rem);
        text-shadow:
            0 0 22px rgba(231, 218, 88, 0.54),
            0 0 46px rgba(231, 218, 88, 0.3),
            0 0 78px rgba(231, 218, 88, 0.14),
            0 2px 16px rgba(0, 0, 0, 0.58),
            0 1px 2px rgba(0, 0, 0, 0.44);
        filter: drop-shadow(0 0 16px rgba(231, 218, 88, 0.28));
    }

    .memorial__lead {
        font-size: 0.9375rem;
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }
}

/* ==========================================================================
   Where Memory Meets Meaning — two-column media + text (live-site layout)
   ========================================================================== */
.memory-section {
    background: var(--color-warm-light);
    padding: 0;
    width: 100%;
}

.memory-inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 86vh;
}

.memory-left {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0;
    box-sizing: border-box;
    align-self: stretch;
    display: flex;
    align-items: stretch;
    min-height: 86vh;
}

.memory-video-card {
    width: 100%;
    position: relative;
    flex: 1;
    display: flex;
    background-color: #000000;
    isolation: isolate;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.memory-video-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 86vh;
    overflow: hidden;
    background-color: #000000;
}

.memory-video__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border: none;
    pointer-events: none;
}

.memory-right {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 3% clamp(1.75rem, 4vw, 4rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.memory-heading {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--color-primary-dark);
    text-transform: uppercase;
    margin: 0 0 24px 0;
    letter-spacing: -0.5px;
    text-align: start;
}

.memory-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-muted-on-light);
    margin: 0 0 32px 0;
    text-align: start;
}

@media (max-width: 1024px) and (min-width: 768px) {
    .memory-right {
        padding: 3% clamp(1.25rem, 3vw, 2.5rem);
    }

    .memory-heading {
        font-size: clamp(2rem, 4.2vw, 2.75rem);
    }
}

/* Desktop — premium inset video card + balanced text column (mobile rules unchanged below) */
@media (min-width: 900px) {
    .memory-inner {
        align-items: center;
        min-height: 600px;
    }

    .memory-left {
        align-self: center;
        align-items: center;
        min-height: 0;
        padding: clamp(0.75rem, 1.5vw, 1.25rem);
    }

    .memory-video-card {
        flex: none;
        width: 100%;
        border-radius: 12px;
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.2),
            0 6px 20px rgba(0, 0, 0, 0.12);
    }

    .memory-video-wrapper {
        flex: none;
        min-height: 0;
        width: 100%;
        height: auto;
        padding-top: 110%;
        border-radius: 12px;
    }

    .memory-video__media {
        object-fit: cover;
        object-position: center 44%;
        /* Subtle vertical stretch — crops top letterboxing without aggressive face crop */
        width: 100%;
        height: 104%;
        top: -2%;
        left: 0;
        right: 0;
        bottom: auto;
    }

    .memory-right {
        align-self: center;
        padding: clamp(3rem, 4vw, 3.75rem) clamp(2.5rem, 4vw, 4rem);
    }

    .memory-heading {
        font-size: 48px;
    }
}

@media (min-width: 1400px) {
    .memory-video__media {
        height: 106%;
        top: -3%;
        object-position: center 45%;
    }
}

@media (max-width: 767px) {
    .memory-inner {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }

    .memory-left,
    .memory-right {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        min-height: 0;
    }

    .memory-left {
        padding: 1.25rem 1.25rem 0;
        box-sizing: border-box;
    }

    .memory-video-card {
        border-radius: 12px;
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.18),
            0 6px 20px rgba(0, 0, 0, 0.1);
        min-height: 44vh;
    }

    .memory-video-wrapper {
        min-height: 44vh;
        border-radius: 12px;
    }

    .memory-video__media {
        object-fit: cover;
        object-position: center center;
    }

    .memory-right {
        padding: 20px;
        align-items: center;
        text-align: center;
    }

    .memory-heading {
        font-size: 32px;
        text-align: center;
        width: 100%;
    }

    .memory-body {
        text-align: center;
        font-size: 1rem;
        line-height: 1.75;
    }

    /* Mobile: memorial + memory CTAs share one scale system (≤768px, matches hero/memory JS breakpoint). */
    .memorial .memorial__btn,
    .memorial__btn,
    .memory-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: min(100%, 22rem);
        min-height: 3.35rem;
        padding: 1rem 1.75rem;
        margin-inline: auto;
        line-height: 1.2;
        font-size: 0.8125rem;
    }

    .memorial__btn:hover,
    .memorial__btn:focus-visible,
    .memory-btn:hover,
    .memory-btn:focus-visible {
        transform: translateY(-1px);
    }
}

/* ==========================================================================
   Lives remembered — editorial gallery (“living memorial archive”)
   ========================================================================== */
.remembered {
    --remembered-bg: var(--color-warm-light);
    --remembered-ink: var(--color-primary-dark);
    --remembered-muted: var(--color-text-dim-on-light);
    --remembered-radius: clamp(1.45rem, 2.35vw, 2.125rem);
    --remembered-ease-long: cubic-bezier(0.25, 0.46, 0.32, 0.98);
    --remembered-dur-card: 0.85s;
    --remembered-dur-media: 1.15s;
    font-family: var(--font-body);
    background-color: var(--remembered-bg);
    position: relative;
    overflow: hidden;
}

.remembered::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse 130% 90% at 48% -15%,
            rgba(189, 173, 123, 0.12),
            transparent 58%
        ),
        radial-gradient(
            ellipse 100% 60% at 100% 100%,
            rgba(244, 240, 227, 0.5),
            transparent 52%
        );
}

.remembered__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1380px;
    margin-inline: auto;
    padding-inline: var(--container-px);
    padding-block: clamp(3.85rem, 9.5vw, 7rem);
    box-sizing: border-box;
}

.remembered__intro {
    text-align: center;
    max-width: 44rem;
    margin-inline: auto;
    margin-bottom: clamp(2.85rem, 5.5vw, 4.75rem);
}

.remembered__eyebrow {
    margin: 0 0 clamp(1rem, 2.2vw, 1.35rem);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--remembered-ink);
    opacity: 0.55;
}

.remembered__title {
    margin: 0 0 clamp(1.35rem, 3.2vw, 2rem);
    font-family: var(--font-heading);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(2.25rem, 5.35vw, 3.35rem);
    line-height: 1.07;
    letter-spacing: var(--tracking-tight);
    color: var(--remembered-ink);
}

.remembered__lead {
    margin: 0 auto;
    max-width: 38rem;
    font-size: clamp(1.035rem, 0.95vw + 0.94rem, 1.1375rem);
    line-height: 1.82;
    letter-spacing: 0.01em;
    color: var(--remembered-muted);
}

.remembered__gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3.8vw, 2.5rem);
}

.remembered__item {
    min-width: 0;
}

.remembered__card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: clamp(18.5rem, 60vw, 24rem);
    border-radius: var(--remembered-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    isolation: isolate;
    background-image: linear-gradient(
        158deg,
        rgba(54, 48, 44, 0.22) 0%,
        rgba(34, 30, 27, 0.38) 48%,
        rgba(26, 23, 21, 0.45) 100%
    );
    background-color: rgba(42, 38, 35, 0.35);
    box-shadow:
        0 22px 50px -18px rgba(38, 32, 28, 0.22),
        0 10px 28px rgba(38, 32, 28, 0.1),
        inset 0 1px 0 rgba(244, 240, 227, 0.14),
        0 0 0 1px rgba(244, 240, 227, 0.06);
    transition:
        transform var(--remembered-dur-card) var(--remembered-ease-long),
        box-shadow var(--remembered-dur-card) var(--remembered-ease-long),
        filter var(--remembered-dur-card) var(--remembered-ease-long);
}

.remembered__card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    opacity: 0.055;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
}

.remembered__media {
    position: relative;
    flex: 1;
    min-height: clamp(17rem, 54vw, 21rem);
    overflow: hidden;
    z-index: 0;
}

.remembered__media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 1px rgba(244, 240, 227, 0.06),
        inset 0 -24px 48px rgba(26, 22, 18, 0.18),
        inset 0 28px 64px rgba(0, 0, 0, 0.12);
    transition: opacity var(--remembered-dur-card) var(--remembered-ease-long);
}

.remembered__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1);
    filter: saturate(1.03) brightness(1.02);
    transition:
        transform var(--remembered-dur-media) var(--remembered-ease-long),
        filter var(--remembered-dur-media) var(--remembered-ease-long);
}

/* Memory card ratios — container matches each image proportion; cover fills without gaps */
.remembered__item--soldiers { --memory-card-ratio: 752 / 1024; }
.remembered__item--nova { --memory-card-ratio: 1024 / 651; }
.remembered__item--beeri { --memory-card-ratio: 780 / 1024; }
.remembered__item--ribbon { --memory-card-ratio: 1080 / 1350; }
.remembered__item--short { --memory-card-ratio: 520 / 700; }
.remembered__item--hostages { --memory-card-ratio: 1024 / 323; }

.remembered__card.memory-card--wide,
.remembered__card.memory-card--portrait,
.remembered__card.memory-card--tall,
.remembered__card.memory-card--square {
    min-height: 0;
    height: auto;
    aspect-ratio: var(--memory-card-ratio);
}

.remembered__card.memory-card--wide .remembered__media,
.remembered__card.memory-card--portrait .remembered__media,
.remembered__card.memory-card--tall .remembered__media,
.remembered__card.memory-card--square .remembered__media {
    flex: 1;
    min-height: 0;
}

.remembered__item--collage .remembered__media img {
    filter: saturate(0.96) brightness(0.98);
}

.remembered__item--collage .remembered__scrim {
    opacity: 0.96;
    background:
        radial-gradient(
            ellipse 120% 85% at 50% 100%,
            rgba(32, 28, 26, 0.72),
            transparent 55%
        ),
        linear-gradient(
            to top,
            rgba(28, 24, 22, 0.94) 0%,
            rgba(40, 36, 32, 0.52) 42%,
            rgba(245, 241, 234, 0.04) 78%,
            transparent 100%
        );
}

.remembered__item--collage .remembered__media::before {
    box-shadow:
        inset 0 0 0 1px rgba(244, 240, 227, 0.06),
        inset 0 -28px 56px rgba(20, 18, 16, 0.28),
        inset 0 0 80px rgba(20, 18, 16, 0.18);
}

.remembered__item--hostages .remembered__media img {
    filter: saturate(1.02) brightness(1.01);
}

.remembered__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(
            ellipse 140% 90% at 50% 100%,
            rgba(52, 44, 38, 0.55),
            transparent 58%
        ),
        linear-gradient(
            to top,
            rgba(32, 28, 26, 0.88) 0%,
            rgba(48, 42, 36, 0.42) 38%,
            rgba(245, 241, 234, 0.03) 75%,
            transparent 100%
        );
    opacity: 0.92;
    transition:
        opacity var(--remembered-dur-card) var(--remembered-ease-long),
        background var(--remembered-dur-card) var(--remembered-ease-long);
    pointer-events: none;
}

.remembered__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(1.35rem, 3.2vw, 2rem);
    padding-top: clamp(3rem, 7.5vw, 4.25rem);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    z-index: 3;
}

.remembered__tag {
    display: inline-block;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-family: var(--font-body);
    background: rgba(244, 240, 227, 0.12);
    color: rgba(244, 240, 227, 0.93);
    border: 1px solid rgba(244, 240, 227, 0.14);
}

.remembered__name {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: clamp(1.29rem, 2.55vw, 1.78rem);
    line-height: 1.14;
    letter-spacing: var(--tracking-tight);
    color: rgba(244, 240, 227, 0.98);
    text-shadow:
        0 2px 24px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 1px 2px rgba(0, 0, 0, 0.35);
}

.remembered__card:hover .remembered__media img,
.remembered__card:focus-visible .remembered__media img {
    transform: scale(1.06);
    filter: saturate(1.06) brightness(1.03);
}

.remembered__item--collage .remembered__card:hover .remembered__media img,
.remembered__item--collage .remembered__card:focus-visible .remembered__media img {
    filter: saturate(1.02) brightness(1.02);
}

.remembered__card:hover .remembered__scrim,
.remembered__card:focus-visible .remembered__scrim {
    opacity: 0.98;
    background:
        radial-gradient(
            ellipse 130% 85% at 50% 100%,
            rgba(189, 173, 123, 0.14),
            transparent 55%
        ),
        radial-gradient(
            ellipse 140% 90% at 50% 100%,
            rgba(42, 36, 32, 0.6),
            transparent 56%
        ),
        linear-gradient(
            to top,
            rgba(24, 20, 18, 0.94) 0%,
            rgba(52, 44, 38, 0.45) 44%,
            rgba(245, 241, 234, 0.02) 78%,
            transparent 100%
        );
}

.remembered__card:hover,
.remembered__card:focus-visible {
    transform: translateY(-11px);
    box-shadow:
        0 32px 64px -22px rgba(38, 32, 26, 0.35),
        0 16px 40px rgba(38, 32, 26, 0.14),
        0 0 48px -8px rgba(189, 173, 123, 0.2),
        inset 0 1px 0 rgba(244, 240, 227, 0.18),
        0 0 0 1px rgba(189, 173, 123, 0.15);
}

.remembered__card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 5px;
}

@media (min-width: 881px) {
    .remembered__gallery {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-auto-rows: minmax(0, auto);
        gap: clamp(1.65rem, 3.2vw, 2.6rem);
        align-items: start;
    }

    .remembered__gallery > .remembered__item {
        align-self: start;
    }

    .remembered__item--tall.remembered__item--left {
        grid-column: 1 / span 5;
        grid-row: 1 / span 3;
    }

    .remembered__item--landscape.remembered__item--top {
        grid-column: 6 / span 7;
        grid-row: 1 / span 1;
    }

    .remembered__item--portrait.remembered__item--mid {
        grid-column: 6 / span 3;
        grid-row: 2 / span 2;
    }

    .remembered__item--landscape.remembered__item--ribbon {
        grid-column: 9 / span 4;
        grid-row: 2 / span 1;
    }

    .remembered__item--portrait.remembered__item--short {
        grid-column: 9 / span 4;
        grid-row: 3 / span 1;
    }

    .remembered__item--hero.remembered__item--accent {
        grid-column: 1 / span 12;
        grid-row: 4 / span 1;
    }

    .remembered__intro {
        margin-bottom: clamp(3.25rem, 5.75vw, 5rem);
    }

    .remembered__card[class*="memory-card--"] .remembered__media {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .remembered__card,
    .remembered__media img,
    .remembered__scrim {
        transition-duration: 0.01ms;
    }

    .remembered__card:hover,
    .remembered__card:focus-visible {
        transform: none;
    }

    .remembered__card:hover .remembered__media img,
    .remembered__card:focus-visible .remembered__media img {
        transform: none;
        filter: saturate(1.03) brightness(1.02);
    }
}

/* ==========================================================================
   Homepage closing — after Lives remembered gallery
   ========================================================================== */
.home-coda {
    position: relative;
    background-color: var(--color-warm-light);
    font-family: var(--font-body);
    padding-block: clamp(3rem, 8.5vw, 6rem);
}

.home-coda::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(44, 44, 44, 0.08) 20%,
        rgba(44, 44, 44, 0.08) 80%,
        transparent 100%
    );
}

.home-coda__inner {
    box-sizing: border-box;
    max-width: 40rem;
    margin-inline: auto;
    padding-inline: var(--container-px);
    text-align: center;
}

.home-coda__line {
    margin: 0;
    font-size: clamp(0.8125rem, 1.05vw, 0.9375rem);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.065em;
    line-height: 1.92;
    color: rgba(30, 28, 24, 0.43);
}

@media (max-width: 560px) {
    .home-coda {
        padding-block: clamp(2.65rem, 11vw, 4.25rem);
    }

    .home-coda__line {
        max-width: 22rem;
        margin-inline: auto;
    }

    /* Softer cadence when the line wraps across two-ish lines */
    .home-coda__sep {
        display: block;
        height: 0.4rem;
    }
}

/* ==========================================================================
   Mission
   ========================================================================== */
.mission {
    padding-block: var(--section-py);
    background-color: var(--color-bg);
    text-align: center;
}

.mission__inner {
    max-width: var(--max-width-prose);
    margin-inline: auto;
}

.mission__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, var(--fs-2xl));
    font-style: italic;
    font-weight: 400;
    margin-bottom: var(--rhythm-title-gap);
    color: var(--color-text);
    scroll-margin-top: calc(var(--header-height) + 0.75rem);
}

.mission__body p {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: var(--lh-base);
    max-width: 60ch;
    margin-inline: auto;
}

.mission__body p + p {
    margin-top: var(--rhythm-paragraph-gap);
}

/* ==========================================================================
   Lives Remembered
   ========================================================================== */
.lives {
    padding-block: var(--section-py);
    background-color: var(--color-bg-alt);
}

.lives__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, var(--fs-2xl));
    font-style: italic;
    font-weight: 400;
    text-align: center;
    margin-bottom: var(--rhythm-block-gap);
    text-transform: lowercase;
    scroll-margin-top: calc(var(--header-height) + 0.75rem);
}

/* Editorial collage — 4-column grid where the 2nd and 4th cards span two
   columns. This breaks the uniform 3-up grid into an asymmetric rhythm
   while keeping the layout balanced (each row sums to 4: 1+2+1 then 2+1+1).
   Both rows share the same card height because a 1-col portrait at 4/5
   aspect and a 2-col landscape at 8/5 aspect both resolve to `col × 1.25`. */
.tribute-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0;
    margin: 0;
}

.tribute-card {
    position: relative;
}

/* Wide "feature" cards — alternate between rows so each row has exactly one
   2-col spread, producing the asymmetric-but-balanced editorial feel:
       Row 1:  [portrait] [ wide feature ] [portrait]
       Row 2:  [ wide feature ] [portrait] [portrait]              */
.tribute-card:nth-child(2),
.tribute-card:nth-child(4) {
    grid-column: span 2;
}

/* Landscape (8/5) aspect on the wide cards keeps their height identical to
   the 4/5 portrait cards in the same row (both resolve to col × 1.25). */
.tribute-card:nth-child(2) .tribute-card__figure,
.tribute-card:nth-child(4) .tribute-card__figure {
    aspect-ratio: 8 / 5;
}

/* Landscape crops usually read better centered vertically — portraits stay
   `center top` so faces don't get cropped at the chin. */
.tribute-card:nth-child(2) .tribute-card__image,
.tribute-card:nth-child(4) .tribute-card__image {
    object-position: center;
}

.tribute-card__link {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-sm);
    flex: 1 1 auto;
    width: 100%;
    min-height: 100%;
    padding: var(--space-xl);
    text-decoration: none;
    color: inherit;
    outline: none;
}

.tribute-card__link:focus-visible {
    outline: 2px solid var(--color-highlight);
    outline-offset: -6px;
    border-radius: 4px;
}

.tribute-card__figure {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--color-surface);
    border-radius: 6px;
    isolation: isolate;
}

.tribute-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
    filter: grayscale(15%) brightness(0.92);
}

/* Fallback visual when image is missing (src empty or broken) */
.tribute-card__figure::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(44, 44, 44, 0.2) 0%, rgba(44, 44, 44, 0.75) 100%),
        linear-gradient(135deg, #2C2C2C 0%, #2C2C2C 100%);
    z-index: 0;
}

.tribute-card__image[src=""],
.tribute-card__image:not([src]) {
    opacity: 0;
}

.tribute-card:hover .tribute-card__image,
.tribute-card:has(.tribute-card__link:focus-visible) .tribute-card__image {
    transform: scale(1.04);
    filter: grayscale(0%) brightness(1);
}

.tribute-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    background:
        linear-gradient(
            180deg,
            rgba(44, 44, 44, 0) 0%,
            rgba(44, 44, 44, 0.2) 40%,
            rgba(44, 44, 44, 0.9) 100%
        );
    color: var(--color-text);
    transition: background var(--dur) var(--ease);
}

.tribute-card:hover .tribute-card__overlay,
.tribute-card:has(.tribute-card__link:hover) .tribute-card__overlay,
.tribute-card:has(.tribute-card__link:focus-visible) .tribute-card__overlay {
    background:
        linear-gradient(
            180deg,
            rgba(44, 44, 44, 0.5) 0%,
            rgba(44, 44, 44, 0.85) 60%,
            rgba(44, 44, 44, 0.95) 100%
        );
}

.tribute-card__name {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 500;
    line-height: var(--lh-tight);
    margin: 0;
    color: var(--color-text);
    letter-spacing: 0;
}

.tribute-card__story {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 300;
    line-height: var(--lh-snug);
    color: var(--color-text-muted);
    max-width: none;
    margin: 0;

    /* Hidden by default, revealed on hover */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(8px);
    transition: max-height 0.5s var(--ease),
                opacity 0.4s var(--ease),
                transform 0.4s var(--ease);
}

.tribute-card:hover .tribute-card__story,
.tribute-card__link:hover .tribute-card__story,
.tribute-card__link:focus-visible .tribute-card__story {
    max-height: 14rem;
    opacity: 1;
    transform: translateY(0);
}

.tribute-card__cta {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-highlight);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(8px);
    transition: max-height 0.4s var(--ease),
                opacity 0.3s var(--ease) 0.1s,
                transform 0.4s var(--ease);
}

.tribute-card:hover .tribute-card__cta,
.tribute-card__link:hover .tribute-card__cta,
.tribute-card__link:focus-visible .tribute-card__cta {
    max-height: 2rem;
    opacity: 1;
    transform: translateY(0);
}

/* Hide story/CTA completely on template cards with no text content */
.tribute-card__name:empty,
.tribute-card__story:empty {
    display: none;
}

@media (hover: none) {
    /* Touch devices: always show name + story */
    .tribute-card__story {
        max-height: 14rem;
        opacity: 1;
        transform: none;
    }
    .tribute-card__cta {
        max-height: 2rem;
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   What Sets Us Apart — bridge from memory to lives remembered
   ========================================================================== */
.apart {
    --apart-text: rgba(244, 240, 227, 0.94);
    --apart-text-soft: rgba(244, 240, 227, 0.68);
    position: relative;
    padding-block: clamp(4rem, 10vw, 7.5rem);
    font-family: var(--font-body);
    color: var(--apart-text);
    isolation: isolate;
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.apart__ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(
            180deg,
            rgba(244, 240, 227, 0.06) 0%,
            transparent 12%
        ),
        radial-gradient(
            ellipse 85% 65% at 14% 22%,
            rgba(189, 173, 123, 0.08),
            transparent 54%
        ),
        radial-gradient(
            ellipse 70% 50% at 88% 88%,
            rgba(244, 240, 227, 0.03),
            transparent 48%
        ),
        linear-gradient(
            168deg,
            var(--color-primary-dark) 0%,
            #262626 52%,
            var(--color-primary-dark) 100%
        );
}

.apart__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1340px;
    margin-inline: auto;
    padding-inline: var(--container-px);
    box-sizing: border-box;
}

.apart__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    gap: clamp(2.75rem, 6.5vw, 6rem);
    align-items: center;
}

.apart__story {
    max-width: 37rem;
}

.apart__eyebrow {
    margin: 0 0 clamp(1rem, 2vw, 1.35rem);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.9;
}

.apart__title {
    margin: 0 0 clamp(1.25rem, 2.8vw, 1.75rem);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1.85rem, 3.8vw, 2.75rem);
    line-height: 1.14;
    letter-spacing: -0.025em;
    color: var(--apart-text);
    text-wrap: balance;
}

.apart__lead {
    margin: 0 0 clamp(1.75rem, 3.5vw, 2.35rem);
    font-size: clamp(1rem, 0.85vw + 0.92rem, 1.12rem);
    line-height: 1.82;
    color: var(--apart-text-soft);
}

.apart__values {
    display: grid;
    gap: clamp(0.85rem, 2vw, 1.1rem);
    margin: 0 0 clamp(1.85rem, 3.8vw, 2.5rem);
    padding: 0;
    list-style: none;
}

.apart__value {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.apart__value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(189, 173, 123, 0.1);
    color: var(--color-accent);
}

.apart__value-icon svg {
    width: 1rem;
    height: 1rem;
}

.apart__value-text {
    margin: 0.15rem 0 0;
    font-size: var(--fs-sm);
    line-height: 1.65;
    color: var(--apart-text-soft);
}

.apart__features {
    display: flex;
    flex-direction: column;
    gap: clamp(1.35rem, 2.8vw, 1.85rem);
    margin-bottom: clamp(2rem, 4vw, 2.65rem);
    padding-top: clamp(1.25rem, 2.5vw, 1.65rem);
    border-top: 1px solid rgba(244, 240, 227, 0.1);
}

.apart__feature {
    padding-inline-start: clamp(0.85rem, 1.8vw, 1.15rem);
    border-inline-start: 2px solid rgba(189, 173, 123, 0.35);
}

.apart__feature-title {
    margin: 0 0 0.5rem;
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 0.9vw + 0.95rem, 1.2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--apart-text);
}

.apart__feature-text {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.78;
    color: var(--apart-text-soft);
    max-width: 34rem;
}

.apart__actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: center;
}

.apart__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-accent);
    border-bottom: 1px solid rgba(189, 173, 123, 0.32);
    transition:
        color 0.35s ease,
        border-color 0.35s ease;
}

.apart__cta--secondary {
    color: rgba(244, 240, 227, 0.82);
    border-bottom-color: rgba(244, 240, 227, 0.22);
}

.apart__cta:hover,
.apart__cta:focus-visible {
    color: rgba(244, 240, 227, 0.98);
    border-color: rgba(189, 173, 123, 0.58);
}

.apart__cta--secondary:hover,
.apart__cta--secondary:focus-visible {
    color: var(--color-accent);
    border-color: rgba(189, 173, 123, 0.45);
}

.apart__cta:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.apart__visual {
    display: flex;
    flex-direction: column;
    gap: clamp(1.35rem, 3.2vw, 2.15rem);
    padding-top: clamp(0.25rem, 1.5vw, 1.25rem);
}

.apart__figure {
    margin: 0;
}

.apart__figure--primary {
    position: relative;
    width: 100%;
    max-width: min(100%, 580px);
    margin-inline-start: auto;
    margin-inline-end: clamp(0rem, 2vw, 1.25rem);
}

.apart__figure-frame {
    position: relative;
    overflow: hidden;
    border-radius: clamp(0.85rem, 1.8vw, 1.35rem);
    box-shadow:
        0 28px 60px -28px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(244, 240, 227, 0.06);
}

.apart__figure--primary .apart__figure-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        linear-gradient(
            210deg,
            rgba(189, 173, 123, 0.06) 0%,
            transparent 42%
        ),
        linear-gradient(180deg, transparent 58%, rgba(44, 44, 44, 0.45) 100%);
}

.apart__img {
    display: block;
    width: 100%;
    height: auto;
}

.apart__img--primary {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: 72% 72%;
}

.apart__figure-cap {
    margin: 0.7rem 0 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--apart-text-soft);
    text-align: right;
}

.apart__visual-base {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr);
    gap: clamp(1.05rem, 2.8vw, 1.9rem);
    align-items: stretch;
    width: 100%;
    max-width: 620px;
    margin-inline-start: clamp(0rem, 3vw, 2.75rem);
    margin-inline-end: auto;
}

.apart__figure--secondary .apart__figure-frame {
    height: 100%;
    min-height: 11.5rem;
    border-radius: clamp(0.75rem, 1.4vw, 1.15rem);
    box-shadow:
        0 20px 44px -22px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(244, 240, 227, 0.05);
}

.apart__figure--secondary {
    align-self: end;
}

.apart__img--secondary {
    width: 100%;
    height: 100%;
    min-height: 11.5rem;
    object-fit: cover;
    object-position: center 42%;
}

.apart__quote {
    margin: 0;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: clamp(0.98rem, 0.9vw + 0.88rem, 1.1rem);
    line-height: 1.7;
    color: var(--apart-text);
    background: rgba(244, 240, 227, 0.04);
    border-radius: clamp(0.75rem, 1.4vw, 1.15rem);
    border: 1px solid rgba(244, 240, 227, 0.1);
}

.apart__quote p {
    margin: 0;
}

@keyframes apart-fade-up {
    from {
        opacity: 0;
        transform: translateY(1.15rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    @supports not (animation-timeline: view()) {
        .apart__story > * {
            opacity: 0;
            animation: apart-fade-up 1s cubic-bezier(0.25, 0.46, 0.32, 1) forwards;
        }

        .apart__eyebrow {
            animation-delay: 0.06s;
        }

        .apart__title {
            animation-delay: 0.14s;
        }

        .apart__lead {
            animation-delay: 0.24s;
        }

        .apart__features {
            animation-delay: 0.32s;
        }

        .apart__actions {
            animation-delay: 0.42s;
        }

        .apart__visual > * {
            opacity: 0;
            animation: apart-fade-up 1.05s cubic-bezier(0.25, 0.46, 0.32, 1) forwards;
        }

        .apart__figure--primary {
            animation-delay: 0.18s;
        }

        .apart__visual-base {
            animation-delay: 0.36s;
        }
    }

    @supports (animation-timeline: view()) {
        .apart__story > *,
        .apart__visual > * {
            opacity: 0;
            animation: apart-fade-up linear forwards;
            animation-timeline: view(block);
            animation-range: entry 5% cover 38%;
            animation-duration: auto;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .apart__story > *,
    .apart__visual > * {
        opacity: 1;
        animation: none;
    }
}

@media (max-width: 880px) {
    .apart__grid {
        grid-template-columns: 1fr;
        gap: clamp(2.75rem, 7vw, 4rem);
    }

    .apart__story {
        max-width: none;
    }

    .apart__actions {
        justify-content: flex-start;
    }

    .apart__figure--primary {
        max-width: none;
        margin-inline: 0;
    }

    .apart__figure-cap {
        text-align: left;
    }

    .apart__visual-base {
        grid-template-columns: 1fr;
        max-width: none;
        margin-inline: 0;
    }

    .apart__figure--secondary {
        display: none;
    }

    .apart__figure--secondary .apart__figure-frame {
        min-height: 14rem;
    }

    .apart__img--secondary {
        min-height: 14rem;
    }
}

@media (max-width: 560px) {
    .apart {
        padding-block: clamp(3.25rem, 10vw, 5.5rem);
    }

    .apart__features {
        gap: clamp(1.35rem, 5vw, 1.85rem);
    }

    .apart__actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }
}


/* ==========================================================================
   Times Square
   ========================================================================== */
.times-square {
    position: relative;
    padding-block: var(--section-py);
    background: linear-gradient(
            180deg,
            rgba(44, 44, 44, 0.88) 0%,
            rgba(44, 44, 44, 0.94) 100%
        ),
        var(--color-bg);
    overflow: hidden;
    text-align: center;
}

/* Times Square background image — sits beneath the gradient overlay */
.times-square__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
    opacity: 0.45;
    filter: grayscale(20%) brightness(0.7);
    pointer-events: none;
}

.times-square__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(44, 44, 44, 0.5) 0%, rgba(44, 44, 44, 0.72) 100%),
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(189, 173, 123, 0.12), transparent 70%);
    pointer-events: none;
}

.times-square__content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width-narrow);
    margin-inline: auto;
}

.times-square__eyebrow {
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-primary);
    margin-bottom: var(--rhythm-eyebrow-gap);
    font-weight: 500;
}

.times-square__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: var(--lh-tight);
    margin-bottom: var(--rhythm-title-gap);
}

.times-square__text {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: var(--lh-snug);
    max-width: 38rem;
    margin-inline: auto;
}

/* ==========================================================================
   Closing
   ========================================================================== */
.closing {
    padding-block: var(--section-py);
    background-color: var(--color-bg);
    text-align: center;
}

.closing__inner {
    max-width: var(--max-width-prose);
    margin-inline: auto;
}

.closing__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, var(--fs-2xl));
    font-style: italic;
    font-weight: 400;
    margin-bottom: var(--rhythm-title-gap);
    color: var(--color-text);
    scroll-margin-top: calc(var(--header-height) + 0.75rem);
}

.closing__text {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: var(--lh-base);
    max-width: 60ch;
    margin-inline: auto;
}

.closing__text + .closing__text {
    margin-top: var(--rhythm-paragraph-gap);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding-block: clamp(2.4rem, 5vw, 3.35rem);
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 500;
}

.site-footer__nav ul {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.site-footer__nav a {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.site-footer__nav a:hover {
    color: var(--color-highlight);
}

.site-footer__copy {
    font-size: var(--fs-xs);
    color: var(--color-text-dim);
    letter-spacing: 0.04em;
    padding-top: var(--space-lg);
    margin-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
    width: 100%;
    max-width: var(--max-width);
    line-height: var(--lh-snug);
}

/* Footer — support & remembrance links */
.site-footer__support {
    width: 100%;
    max-width: var(--max-width);
    padding-top: var(--space-md);
    margin-top: var(--space-xs);
    border-top: 1px solid var(--color-border);
}

.site-footer__support-label {
    margin: 0 0 var(--space-sm);
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--color-accent-on-light);
}

.site-footer__support-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg) var(--space-xl);
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer__support-list a {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.site-footer__support-list a:hover,
.site-footer__support-list a:focus-visible {
    color: var(--color-highlight);
}

/* Memorial profile — gentle preserve-stories CTA */
.profile-preserve-cta {
    background-color: var(--color-surface-light);
    color: var(--color-text-on-light);
    padding-block: clamp(2.75rem, 6vw, 4.25rem);
    text-align: center;
    border-top: 1px solid var(--color-border-on-light);
}

.profile-preserve-cta .profile-container--prose {
    max-width: min(36rem, 100%);
}

.profile-preserve-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 var(--space-md);
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-accent-on-light);
}

.profile-preserve-cta__eyebrow::before {
    content: "";
    display: inline-block;
    width: 2.25rem;
    height: 1px;
    background-color: var(--color-accent-on-light);
    opacity: 0.85;
}

.profile-preserve-cta__title {
    margin: 0 0 var(--space-lg);
    font-family: var(--font-heading);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.25;
    color: var(--color-text-on-light);
    text-wrap: balance;
}

.profile-preserve-cta__text {
    margin: 0 auto var(--space-xl);
    max-width: 38ch;
    font-family: var(--font-sans);
    font-size: clamp(0.98rem, 1.8vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-text-muted-on-light);
}

.profile-preserve-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 1rem;
}

.profile-preserve-cta__btn {
    margin-inline: 0;
}

@media (max-width: 720px) {
    .profile-preserve-cta__eyebrow {
        justify-content: center;
    }

    .profile-preserve-cta__actions {
        flex-direction: column;
        align-items: center;
    }
}

/* ==========================================================================
   Responsive
   Section padding scales fluidly via --section-py clamp(),
   so these breakpoints only adjust grid columns and navigation.
   ========================================================================== */
/* ---------- Header mobile breakpoint (sync with HEADER_MOBILE_MAX_PX in js/script.js) ---------- */
@media (min-width: 1081px) and (max-width: 1280px) {
    .site-header__inner {
        --header-nav-gap: clamp(0.85rem, 1.2vw, 1.15rem);
        --header-side-gap: clamp(0.65rem, 1.1vw, 0.85rem);
    }
}

@media (min-width: 1440px) {
    .site-header__inner {
        --header-nav-gap: clamp(1.35rem, 1.5vw, 1.85rem);
        --header-side-gap: clamp(0.85rem, 1.35vw, 1.35rem);
    }
}

@media (max-width: 1080px) {
    .site-header__inner {
        grid-template-columns: 1fr auto;
        column-gap: var(--space-md);
    }

    .logo {
        grid-column: 1;
    }

    /* Show hamburger, pinned to the right column of the header grid */
    .nav-toggle {
        display: inline-flex;
        grid-column: 2;
        justify-self: end;
        position: relative;
        z-index: calc(var(--header-z) + 2);
        color: var(--color-text);
    }

    body.nav-open .nav-toggle {
        color: var(--color-highlight);
        background-color: rgba(189, 173, 123, 0.12);
        border-radius: var(--radius-sm);
    }

    /* Full-viewport panel (below fixed header): slides in from the right — 100% width,
       no sideways clipping (fixes submenu text cut-off). Dropdown stacks below parent
       (flex-direction: column on .site-nav__item). */
    .site-menu {
        display: block;
        box-sizing: border-box;
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100vw;
        z-index: calc(var(--header-z) + 1);
        background-color: var(--color-primary-dark-hover);
        border-bottom: none;
        box-shadow: -12px 0 48px rgba(0, 0, 0, 0.45);
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
        overflow-y: auto;
        padding-block: 0;
        padding-bottom: max(env(safe-area-inset-bottom, 0px), var(--space-md));

        transform: translate3d(100%, 0, 0);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform var(--dur) var(--ease),
                    opacity var(--dur) var(--ease),
                    visibility 0s linear var(--dur);
    }

    .site-menu.is-open {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: transform var(--dur) var(--ease),
                    opacity var(--dur) var(--ease),
                    visibility 0s linear 0s;
    }

    .site-nav {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        grid-column: auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        z-index: auto;
        pointer-events: auto;
        box-sizing: border-box;
    }

    .site-nav__list {
        pointer-events: auto;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .site-nav__item {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: auto;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-nav__item:last-child {
        border-bottom: none;
    }

    .site-nav__parent-trigger {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        min-height: unset;
        flex-shrink: 0;
    }

    .site-nav__parent-trigger .site-nav__link {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-nav__item--has-dropdown .site-nav__link .site-nav__chevron {
        display: none;
    }

    .site-nav__submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 52px;
        min-width: 52px;
        margin: 0;
        padding: 0;
        border: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
        color: var(--color-text);
        cursor: pointer;
        transition: color var(--dur) var(--ease),
                    background-color var(--dur) var(--ease);
    }

    .site-nav__submenu-toggle:hover,
    .site-nav__submenu-toggle:focus-visible {
        outline: none;
        color: var(--color-highlight);
        background-color: rgba(244, 240, 227, 0.04);
    }

    .site-nav__submenu-toggle:focus-visible {
        outline: 2px solid var(--color-highlight);
        outline-offset: -2px;
    }

    .site-nav__submenu-toggle .site-nav__chevron--toggle {
        transition: transform var(--dur) var(--ease);
    }

    .site-nav__submenu-toggle[aria-expanded="true"] .site-nav__chevron--toggle {
        transform: rotate(180deg);
    }

    .site-nav__item--has-dropdown:not(.is-submenu-open) .site-nav__dropdown {
        display: none !important;
    }

    .site-nav__item--has-dropdown.is-submenu-open .site-nav__dropdown {
        display: flex !important;
        flex-direction: column;
        gap: 0;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    .site-nav__link {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        height: auto;
        min-height: unset;
        padding: 18px 32px;
        font-size: var(--fs-sm);
        font-weight: 500;
        letter-spacing: var(--tracking-nav);
        text-transform: uppercase;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        hyphens: auto;
        color: rgba(244, 240, 227, 0.95);
        line-height: var(--lh-snug);
        flex: 1 1 auto;
        transition: color var(--dur) var(--ease);
    }

    .site-nav__link:hover,
    .site-nav__link:focus-visible,
    .site-nav__item--has-dropdown:hover > .site-nav__parent-trigger .site-nav__link,
    .site-nav__item--has-dropdown:focus-within > .site-nav__parent-trigger .site-nav__link {
        color: var(--color-highlight);
        outline: none;
    }

    .site-nav__link::after {
        display: none;
    }

    .site-nav__chevron {
        width: 0.875rem;
        height: 0.875rem;
        opacity: 1;
        flex-shrink: 0;
    }

    /* Submenu: full-width rows stacked under parent, indented — no horizontal overflow */
    .site-nav__dropdown {
        position: static;
        inset: auto;
        top: auto;
        left: auto;
        transform: none;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background-color: rgba(0, 0, 0, 0.25);
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        margin: 0;
        list-style: none;
        transition: none;
        box-sizing: border-box;
    }

    .site-nav__dropdown > li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .site-nav__dropdown > li:last-child {
        border-bottom: none;
    }

    .site-nav__dropdown-link {
        box-sizing: border-box;
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 14px 32px 14px 48px;
        margin: 0;
        font-size: 0.8125rem;
        font-weight: 400;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        hyphens: auto;
        line-height: var(--lh-snug);
        color: rgba(244, 240, 227, 0.85);
        background-color: transparent;
        transition: color var(--dur) var(--ease),
                    background-color var(--dur) var(--ease);
    }

    .site-nav__dropdown-link::after {
        display: none;
    }

    .site-nav__dropdown-link:hover,
    .site-nav__dropdown-link:focus-visible {
        color: var(--color-highlight);
        background-color: rgba(189, 173, 123, 0.08);
        outline: none;
    }

    .site-nav__dropdown-link:active {
        color: var(--color-highlight);
    }

    /* Mobile actions — in document flow below nav (scroll with links; no flex “pin to bottom”). */
    .site-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: var(--space-md);
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        margin-top: 32px;
        margin-bottom: 0;
        padding: var(--space-md) 32px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-action {
        color: rgba(244, 240, 227, 0.88);
    }

    .site-action--icon {
        flex: 0 0 auto;
    }

    .site-action--icon:hover,
    .site-action--icon:focus-visible {
        color: var(--color-highlight);
    }

    .site-action--donate {
        flex: 1 0 100%;
        order: 10;
        margin-left: 0;
        margin-top: var(--space-sm);
        padding: 14px var(--space-lg);
        text-align: center;
        justify-content: center;
        border-color: rgba(255, 255, 255, 0.15);
        color: var(--color-highlight);
    }

    .site-action--donate:hover,
    .site-action--donate:focus-visible {
        color: var(--color-primary-dark);
        background-color: var(--color-highlight);
        border-color: var(--color-highlight);
    }

    /* Immersive-hero pages: header link colors are toned for transparency over video;
       inside the opaque mobile panel, restore solid menu typography and accent. */
    body.has-immersive-hero .site-header .site-menu .site-nav__link {
        color: rgba(244, 240, 227, 0.95);
        text-shadow: none;
    }

    body.has-immersive-hero .site-header .site-menu .site-nav__link:hover,
    body.has-immersive-hero .site-header .site-menu .site-nav__link:focus-visible,
    body.has-immersive-hero .site-header .site-menu .site-nav__item--has-dropdown:hover > .site-nav__parent-trigger .site-nav__link,
    body.has-immersive-hero .site-header .site-menu .site-nav__item--has-dropdown:focus-within > .site-nav__parent-trigger .site-nav__link {
        color: var(--color-highlight);
    }

    body.has-immersive-hero .site-header .site-menu .site-nav__dropdown-link {
        color: rgba(244, 240, 227, 0.85);
        text-shadow: none;
    }

    body.has-immersive-hero .site-header .site-menu .site-nav__dropdown-link:hover,
    body.has-immersive-hero .site-header .site-menu .site-nav__dropdown-link:focus-visible {
        color: var(--color-highlight);
    }

    body.has-immersive-hero .site-header .site-menu .site-action {
        color: rgba(244, 240, 227, 0.88);
        text-shadow: none;
    }

    body.has-immersive-hero .site-header .site-menu .site-action--icon:hover,
    body.has-immersive-hero .site-header .site-menu .site-action--icon:focus-visible {
        color: var(--color-highlight);
    }

    body.has-immersive-hero.nav-open .site-header .nav-toggle {
        color: var(--color-highlight);
        filter: none;
    }

    body.has-immersive-hero .site-header .site-menu .site-action--donate {
        color: var(--color-highlight);
        border-color: rgba(255, 255, 255, 0.15);
    }

    body.has-immersive-hero .site-header .site-menu .site-action--donate:hover,
    body.has-immersive-hero .site-header .site-menu .site-action--donate:focus-visible {
        color: var(--color-primary-dark);
        background-color: var(--color-highlight);
        border-color: var(--color-highlight);
    }
}

/* ---------- General responsive ---------- */
@media (max-width: 860px) {
    /* Tablet: collapse the 4-col collage into a clean 2-col grid of
       consistent portrait crops — the wide feature cards return to a
       single column and their 8/5 landscape aspect reverts to 4/5. */
    .tribute-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .tribute-card:nth-child(2),
    .tribute-card:nth-child(4) {
        grid-column: span 1;
    }

    .tribute-card:nth-child(2) .tribute-card__figure,
    .tribute-card:nth-child(4) .tribute-card__figure {
        aspect-ratio: 4 / 5;
    }

    .tribute-card:nth-child(2) .tribute-card__image,
    .tribute-card:nth-child(4) .tribute-card__image {
        object-position: center top;
    }

    .tribute-card__link {
        padding: var(--space-lg);
    }
}

@media (max-width: 560px) {
    /* Mobile: single-column stack. Everything already collapses via the
       tablet overrides above; just drop to one column. */
    .tribute-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
