/*
 * GLOBALS & DESIGN TOKENS
 * The Anti-Gravity aesthetic foundation.
 */

:root {

  /* ═══════════════════════════════════════════════════════════════
     BRAND MASTERS — the 4 roots of the entire colour system.
     Change these → everything else shifts.
     NOTE: Variable names reflect original palette; values tuned via styleguide.
     --accent-vivid-pink is actually BLUE, --accent-deep-purple is actually RED.
     Renaming would break styleguide data-var bindings — keep names, trust values.
     ═══════════════════════════════════════════════════════════════ */
  --accent-vivid-pink: #2a7c7c;
  --accent-deep-purple: #A1484C;
  --accent-warm: #daa520;
  --accent-teal: #2a7c7c;

  /* ─── Derived from Blue ─── */
  --accent-ocean: color-mix(in srgb, var(--accent-vivid-pink) 55%, #001a2e);
  --navy-base: #0d1b2a;
  --abyss-base: color-mix(in srgb, var(--accent-vivid-pink) 8%, #000000);
  --accent-navy: var(--navy-base);
  --accent-abyss: var(--abyss-base);
  --bg-dark: color-mix(in srgb, var(--accent-vivid-pink) 5%, #0d1b2a);
  --bg-dark-card: color-mix(in srgb, var(--accent-vivid-pink) 8%, #0d1b2a);

  /* ─── Derived from Warm ─── */
  --accent-warm-pale: color-mix(in srgb, var(--accent-warm) 15%, #ffffff);

  /* ─── Warm axis palette: Warm → Red (waves, footers) ─── */
  --palette-1: var(--accent-warm);
  --palette-2: color-mix(in srgb, var(--accent-warm) 70%, var(--accent-deep-purple));
  --palette-3: color-mix(in srgb, var(--accent-warm) 45%, var(--accent-deep-purple));
  --palette-4: color-mix(in srgb, var(--accent-warm) 20%, var(--accent-deep-purple));
  --palette-5: color-mix(in srgb, var(--accent-deep-purple) 85%, #000000);

  /* ─── Cool axis palette: Teal → Deep Navy (waves, footers) ─── */
  --palette-6: var(--accent-vivid-pink);
  --palette-7: color-mix(in srgb, var(--accent-vivid-pink) 75%, #132d47);
  --palette-8: color-mix(in srgb, var(--accent-vivid-pink) 50%, #132d47);
  --palette-9: color-mix(in srgb, var(--accent-vivid-pink) 25%, #132d47);
  --palette-10: #132d47;

  /* ─── Brand-tinted neutral scale — derived from Blue ─── */
  --tone-50:  color-mix(in srgb, var(--accent-vivid-pink) 2%, #ffffff);
  --tone-100: color-mix(in srgb, var(--accent-vivid-pink) 3%, #f3f3f3);
  --tone-200: color-mix(in srgb, var(--accent-vivid-pink) 5%, #e4e4e4);
  --tone-300: color-mix(in srgb, var(--accent-vivid-pink) 6%, #d0d0d0);
  --tone-500: color-mix(in srgb, var(--accent-vivid-pink) 8%, #888888);
  --tone-700: color-mix(in srgb, var(--accent-vivid-pink) 10%, #555555);

  /* ─── Gradients (composed from masters) ─── */
  --gradient-primary: linear-gradient(135deg, var(--accent-vivid-pink) 0%, var(--accent-deep-purple) 100%);
  --gradient-full: linear-gradient(135deg, var(--accent-vivid-pink) 0%, var(--accent-deep-purple) 60%, var(--accent-warm) 100%);

  /* ─── Mesh tokens (kept for backward compat) ─── */
  --bg-mesh-base: color-mix(in srgb, var(--accent-warm) 8%, var(--bg-primary));

  /* ═══════════════════════════════════════════════════════════════
     STRUCTURAL COLORS — independent of brand
     ═══════════════════════════════════════════════════════════════ */
  --bg-primary: #FFFFFF;
  --bg-secondary: #FAFAFA;
  --text-primary: #111111;
  --text-secondary: #555555;
  --border-color: #EAEAEA;

  /* Dark surface text & borders (opacity-based, universal) */
  --text-on-dark: #FFFFFF;
  --text-on-dark-strong: rgba(255, 255, 255, 0.9);
  --text-on-dark-soft: rgba(255, 255, 255, 0.85);
  --text-on-dark-secondary: rgba(255, 255, 255, 0.7);
  --text-on-dark-muted: rgba(255, 255, 255, 0.65);
  --border-on-dark: rgba(255, 255, 255, 0.1);
  --surface-on-dark: rgba(255, 255, 255, 0.06);
  --surface-on-dark-hover: rgba(255, 255, 255, 0.12);

  /* Overlays */
  --overlay-backdrop: rgba(0, 0, 0, 0.6);

  /* ═══════════════════════════════════════════════════════════════
     WAVE & FOOTER ASSIGNMENTS (per-page overrides below)
     ═══════════════════════════════════════════════════════════════ */
  --wave-1: var(--palette-6);
  --wave-2: var(--palette-7);
  --wave-3: var(--palette-8);
  --wave-4: var(--palette-9);
  --wave-5: var(--palette-10);
  --footer-bg-top: #132d47;
  --footer-bg-bottom: #0d1b2a;

  /* ═══════════════════════════════════════════════════════════════
     SHADOWS & EFFECTS
     ═══════════════════════════════════════════════════════════════ */
  --shadow-card-blur: 16px;
  --shadow-card-opacity: 0.15;
  --shadow-card-y: 9px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 var(--shadow-card-y) var(--shadow-card-blur) rgba(0, 0, 0, var(--shadow-card-opacity));
  --shadow-lg: 0 var(--shadow-card-y) calc(var(--shadow-card-blur) * 2) rgba(0, 0, 0, calc(var(--shadow-card-opacity) * 1.25));
  --shadow-hover-warm: 0 8px 24px rgba(218, 165, 32, 0.15), 0 4px 12px rgba(0, 0, 0, 0.06);

  /* Page elevation — stroke + ambient shadow */
  --elev-stroke-y: 0.3125rem;
  --elev-stroke-spread: 0rem;
  --elev-stroke-opacity: 0.05;
  --elev-shadow-y: 0.625rem;
  --elev-shadow-blur: 0.5rem;
  --elev-shadow-opacity: 0.12;


  /* ═══════════════════════════════════════════════════════════════
     HERO OVERLAY (independent creative controls)
     ═══════════════════════════════════════════════════════════════ */
  --hero-tone-color-1: #A1484C;
  --hero-tone-color-2: #060d16;
  --hero-tone-angle: 200deg;
  --hero-tone-opacity-1: 0.6;
  --hero-tone-opacity-2: 0.8;
  --hero-img-opacity: 0.7;
  --hero-vignette-opacity: 0.7;

  /* Hero Title */
  --hero-title-color-1: #ffffff;
  --hero-title-color-2: #daa520;
  --hero-title-shadow-x: -0.25rem;
  --hero-title-shadow-y: 0.55rem;
  --hero-title-shadow-blur: 0rem;
  --hero-title-shadow-opacity: 0.25;
  --hero-title-shadow-color: #000000;

  /* Hero Grain */
  --hero-grain-opacity: 0.15;
  --hero-grain-size: 1.5;
  --hero-grain-blend: color-dodge;

  /* Font Families */
  --font-family-base: 'Montserrat', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid Typography Scales */
  --font-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-xxl: clamp(2rem, 1.6rem + 2vw, 3rem);
  --font-hero: clamp(2.5rem, 2rem + 4vw, 5rem);

  /* Fluid Spacing Scales */
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
  --space-md: clamp(1rem, 0.8rem + 1vw, 2rem);
  --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 3rem);
  --space-xl: clamp(3rem, 2.4rem + 3vw, 6rem);
  --space-2xl: clamp(3rem, 2.5rem + 2vw, 5rem);

  /* Border Radius */
  --radius-sm: 0.25rem;
  /* 4px */
  --radius-md: 0.5rem;
  /* 8px */
  --radius-lg: 1rem;
  /* 16px */
  --radius-full: 62.5rem;
  /* Large rem value creates pill shape while staying in rem units */

  /* Easing & Animation */
  --ease-expensive: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-speed: 0.6s;

  /* Section padding multipliers (tuneable via styleguide) */
  --section-pad-top: 1.5;
  --section-pad-bottom: 1.5;
  --section-pad-closing-top: 3;
  --section-pad-closing-bottom: 4;
}

/* ================================================
   PER-PAGE WAVE PALETTES
   Each page assigns palette colours to wave layers.
   Edit palettes in styleguide → all pages update.
   Edit assignments via Per-Page Wave Designer.
   ================================================ */


[data-page="index"] main {
  opacity: 1;
}


/* Legal pages (privacy, terms) */
.legal-body h2 {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}
.legal-body h2:first-child {
  margin-top: 0;
}
.legal-body p {
  font-size: var(--font-base);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.legal-body a {
  color: var(--accent-vivid-pink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.legal-body a:hover {
  color: var(--accent-ocean);
}
.legal-updated {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* Dark variant for legal pages */
.legal-body--dark h2 {
  color: var(--accent-teal);
}
.legal-body--dark p {
  color: rgba(255, 255, 255, 0.75);
}
.legal-body--dark a {
  color: var(--accent-warm);
}
.legal-body--dark a:hover {
  color: #fff;
}
.legal-body--dark .legal-updated {
  color: rgba(255, 255, 255, 0.4);
}

/* Reset */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--abyss-base);
}

/* Two-tone overscroll: top half = page colour, bottom half = footer colour */
html::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background-color: var(--bg-primary);
  z-index: -1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent drag-out on interactive elements and images */
a, button, img {
  -webkit-user-drag: none;
  user-drag: none;
}

img {
  -webkit-user-select: none;
  user-select: none;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

/* Homepage: top half overscroll = warm hero tone, bottom half = navy footer */
html:has(body[data-page="index"])::before,
html.page-index::before {
  background-color: #1a0f08;
}

/* Page loading state — content hidden until JS hydration completes */
main {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-loaded main {
  opacity: 1;
}

.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  background: var(--bg-primary);
  transition: opacity 0.3s ease;
}

.page-loaded .page-loader {
  opacity: 0;
  pointer-events: none;
}

.page-loader__spinner {
  width: 2rem;
  height: 2rem;
  border: 0.1875rem solid var(--border-color);
  border-top-color: var(--accent-deep-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader__spinner {
    animation: none;
    border-top-color: var(--accent-deep-purple);
    opacity: 0.6;
  }
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--accent-vivid-pink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip-to-Content Link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 9999;
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-deep-purple);
  color: #fff;
  font-weight: 700;
  font-size: var(--font-sm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-hero {
  font-size: var(--font-hero);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
}

.text-xxl {
  font-size: var(--font-xxl);
}

.text-xl {
  font-size: var(--font-xl);
}

.text-lg {
  font-size: var(--font-lg);
}

.text-base {
  font-size: var(--font-base);
}

.text-sm {
  font-size: var(--font-sm);
}

.text-xs {
  font-size: var(--font-xs);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-gradient {
  color: var(--accent-vivid-pink);
  -webkit-text-fill-color: var(--accent-vivid-pink);
  display: inline-block;
}

/* Global Layout Utilities */
.container {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.flex {
  display: flex;
  gap: var(--space-md);
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.text-center {
  text-align: center;
}
@media (max-width: 640px) {
  .text-center p,
  .text-center .prose,
  .text-center .text-secondary,
  .text-center .text-base,
  .text-center .text-lg {
    text-align: left;
  }
}

/* Spacing Utilities */
.mt-xs {
  margin-top: var(--space-xs);
}

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

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

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-xs {
  margin-bottom: var(--space-xs);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

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

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.gap-xs {
  gap: var(--space-xs);
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

/* Spacer blocks — empty divs that add vertical breathing room */
.spacer-sm  { height: var(--space-md); }
.spacer-lg  { height: calc(var(--space-xl) * 2); }

.font-weight-bold {
  font-weight: 700;
}

.font-weight-medium {
  font-weight: 500;
}

/* ================================================
   TEXT COLOUR UTILITIES
   ================================================ */
.text-on-dark { color: var(--text-on-dark); }
.text-on-dark-muted { color: var(--text-on-dark-muted); }
.text-warm { color: var(--accent-warm); }
.text-light { color: var(--text-on-dark-soft); }
.text-white { color: #fff; }

/* ================================================
   LAYOUT & TYPOGRAPHY UTILITIES
   ================================================ */
.text-left { text-align: left; }
/* Long-form paragraph master class — change alignment here to update all body prose site-wide */
.prose-body { text-align: left; }
.lead { line-height: 1.6; font-weight: 500; }
.prose-dimmed { opacity: 0.7; }
.mx-auto { margin-left: auto; margin-right: auto; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.z-1 { position: relative; z-index: 1; }
.flex-col-gap-sm { display: flex; flex-direction: column; gap: var(--space-sm); }
.form-stack { display: flex; flex-direction: column; gap: var(--space-md); }
.pad-lg { padding: var(--space-lg); }
.align-self-start { align-self: flex-start; }
.letter-space-wide { letter-spacing: 0.1em; }

/* ================================================
   BACKGROUND UTILITIES
   ================================================ */
.bg-consulting-gradient {
  background-color: var(--accent-navy);
  color: var(--text-on-dark);
}

/* Surface background utilities */
.bg-primary  { background-color: var(--bg-primary); }

/* Tonal surface utilities — brand-tinted neutrals */
.bg-tone-50  { background-color: var(--tone-50); }
.bg-tone-100 { background-color: var(--tone-100); }
.bg-tone-200 { background-color: var(--tone-200); }

/* Tonal border utilities */
.border-tone-200 { border-color: var(--tone-200); }
.border-tone-300 { border-color: var(--tone-300); }

/* Tonal text utilities */
.text-tone-500 { color: var(--tone-500); }
.text-tone-700 { color: var(--tone-700); }

/* ================================================
   APPROACH PAGE — Semantic Classes
   (Extracted from inline styles to CSS)
   ================================================ */
.vision-statement-text {
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.vision-label {
  letter-spacing: 0.12em;
  opacity: 0.4;
  margin-bottom: var(--space-md);
}
.vision-text {
  line-height: 1.6;
  font-weight: 600;
  color: var(--text-on-dark);
  text-align: left;
}
.commitments-subtitle {
  margin-top: var(--space-md);
  color: var(--accent-warm);
  font-style: italic;
  opacity: 0.85;
}

/* Section hero badge — uppercase label above page titles */
.hero-badge {
  display: block;
  letter-spacing: 0.15em;
  color: var(--accent-warm);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}
.text-hero {
  margin-top: 0;
}

/* ============================================
   Project Card — two-column editorial layout
   ============================================ */
.project-card {
  background-color: var(--bg-primary);
  border: 0.0625rem solid var(--tone-200);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 0;
  text-align: left;
  color: var(--text-secondary);
  text-decoration: none;
  display: grid;
  grid-template-columns: 40% 1fr;
  width: 100%;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease-expensive),
              box-shadow 0.25s var(--ease-expensive),
              border-color 0.15s var(--ease-expensive);
}

#projects-grid {
  width: 100%;
}

.projects-group__heading {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  margin-top: var(--space-xl);
  letter-spacing: -0.02em;
  text-align: center;
}

.projects-group__heading:first-child {
  margin-top: 0;
}

.projects-group__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  position: relative;
}

.projects-group__grid .project-card {
  min-height: 18rem;
}

@media (min-width: 768px) {
  .projects-group__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* LEFT column cards: image on right (centre-ward), text on left (outer) */
  .projects-group__grid .project-card:nth-child(odd) {
    grid-template-columns: 1fr 40%;
  }
  .projects-group__grid .project-card:nth-child(odd) .project-card__image {
    order: 2;
  }

  /* RIGHT column cards: default — image on left (centre-ward), text on right (outer) */
}
.project-card:hover {
  transform: translateY(-0.25rem);
  box-shadow:
    0 0 0 2px var(--accent-teal),
    0 12px 32px color-mix(in srgb, var(--accent-teal) 28%, transparent),
    0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-teal);
}

/* Left: image fills card edge-to-edge (top, bottom, left) */
.project-card__image {
  position: relative;
  overflow: hidden;
}

.project-card__image__inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-card__image img:not(.project-card__npc-badge) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-card__image--placeholder {
  color: var(--tone-300);
}
.project-card__image--placeholder .project-card__image__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card__image--placeholder svg {
  width: 3rem;
  height: 3rem;
}

/* NPC Initiative badge — overlay on project card image + project page hero */
.project-card__npc-badge {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.375rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 2;
}
.project-page__hero-image {
  position: relative;
}
.project-page__npc-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 4.5rem;
  height: 4.5rem;
  padding: 0.75rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 2;
}
@media (max-width: 640px) {
  .project-page__npc-badge {
    width: 3rem;
    height: 3rem;
    padding: 0.5rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }
}

/* Right: content */
.project-card__body {
  min-width: 0;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.project-card__partner {
  font-size: var(--font-xs);
  color: var(--accent-warm);
  margin-top: auto;
  font-weight: 600;
}

.project-card__title {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
}

.project-card .prose {
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: var(--space-md);
}

.project-page .project-card__tags {
  justify-content: center;
  margin-top: 0;
}
.project-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--tone-100);
  border: 0.0625rem solid var(--tone-200);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-card__image {
    aspect-ratio: 1 / 1;
  }
  .project-card__body {
    padding: var(--space-md);
  }
  .project-card__title {
    font-size: var(--font-lg);
  }
  .projects-group__grid .project-card {
    min-height: auto;
  }
}

/* ============================================
   Blog Card — listing page (dark bg)
   ============================================ */
/* Blog card — CSS Grid for deterministic track sizing */
.blog-card {
  display: grid;
  grid-template-columns: min(24rem, 40%) 1fr;
  grid-template-rows: 25rem;
  background: var(--tone-50);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  position: relative;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--tone-200);
  transition: transform 0.4s var(--ease-expensive),
              box-shadow 0.4s var(--ease-expensive);
}
.blog-card:hover {
  transform: translateY(-0.25rem) scale(1.015);
  box-shadow: var(--shadow-hover-warm);
}

.blog-card--muted {
  opacity: 0.25;
  filter: grayscale(100%);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.4s var(--ease-expensive),
              box-shadow 0.4s var(--ease-expensive);
}

.blog-card--muted.is-visible {
  opacity: 1;
  filter: grayscale(0%);
}

.blog-card__image {
  position: relative;
  overflow: hidden;
  background: var(--text-primary);
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-lg);
  transition: border-color 0.4s var(--ease-expensive);
}

.blog-card:hover .blog-card__image {
  border-color: var(--accent-warm);
}

.blog-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-expensive);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.04);
}

.blog-card__body {
  min-width: 0;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.blog-card__date {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  color: var(--accent-warm);
  font-weight: 600;
  font-size: var(--font-xs);
  margin-bottom: var(--space-md);
  text-align: right;
}
.blog-card__author {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.blog-card__author::before {
  content: 'Author: ';
  font-weight: 400;
}

.blog-card__title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}
.blog-card:hover .blog-card__title {
  color: var(--accent-warm);
}

.blog-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.blog-card__cat {
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--tone-100);
  border: 0.0625rem solid var(--tone-200);
  color: var(--text-secondary);
  text-transform: capitalize;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .blog-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .blog-card__image {
    aspect-ratio: 1 / 1;
  }
  .blog-card__body {
    padding: var(--space-md);
  }
  .blog-card__title {
    font-size: var(--font-lg);
  }
}

/* ============================================
   Blog Article — clean reading layout
   ============================================ */
.blog-article {
  padding-top: calc(4vh + 6rem); /* clear fixed nav */
  padding-bottom: var(--space-xl);
}

.blog-article__badge {
  display: inline-block;
  font-size: var(--font-xs);
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
  margin-bottom: var(--space-sm);
}

.blog-article__title {
  font-size: var(--font-xxl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.blog-article__author {
  font-weight: 600;
  color: var(--text-primary);
}
.blog-article__meta time {
  font-family: 'JetBrains Mono', monospace;
}

.blog-article__divider {
  border: none;
  border-top: 0.0625rem solid var(--tone-200);
  margin: var(--space-lg) 0;
}

.blog-post__featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}
.blog-post__featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post__heading {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ============================================
   Project Page (individual) — single dense editorial flow
   ============================================ */
.col-wide {
  width: min(92vw, 88rem);
  max-width: min(92vw, 88rem);
  margin-inline: auto;
}

.projects-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

[data-page="projects"] .hero-section,
[data-page="team"] .hero-section,
[data-page="resources"] .hero-section,
[data-page="privacy"] .hero-section,
[data-page="terms"] .hero-section,
[data-page="contact"] .hero-section,
[data-page="about"] .hero-section {
  min-height: auto;
  padding-top: calc(4vh + 5rem);
  padding-bottom: var(--space-xl);
  justify-content: flex-start;
}


.projects-grid-section .projects-group__heading {
  color: #fff;
}

/* Scroll-linked guide line — runs down the centre of the projects grid
   on desktop. Very subtle track with bright progress overlay. */
.projects-scroll-line {
  display: none;
}
@media (min-width: 900px) {
  .projects-scroll-line {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Very subtle always-visible track */
    background: color-mix(in srgb, var(--accent-teal) 15%, transparent);
  }
  .projects-scroll-line__progress {
    position: absolute;
    top: 0;
    left: -1px;
    width: 3px;
    height: 0;
    background: var(--accent-teal);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent-teal) 60%, transparent);
    will-change: height;
    border-radius: 2px;
  }
  /* Leading "head" dot — sits at the bottom of the progress bar, travels
     with scroll. Hands off between grids visually (each line has its own). */
  .projects-scroll-line__dot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--accent-teal);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent-teal) 20%, transparent),
      0 0 14px color-mix(in srgb, var(--accent-teal) 65%, transparent);
    opacity: 0;
    transition: opacity 0.25s var(--ease-expensive);
    will-change: top;
    z-index: 2;
  }
  .projects-scroll-line__dot.is-active {
    opacity: 1;
  }
}

.project-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.project-page__header {
  margin-bottom: var(--space-lg);
}

.project-page__header .text-hero {
  font-size: clamp(1.75rem, 1.5rem + 2vw, 2.75rem);
  margin-bottom: var(--space-sm);
}

.project-page__header .text-lg {
  margin-bottom: 0;
}

.project-page__tags-block {
  margin-top: var(--space-md);
}

.project-page__partner-row {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.project-page__partner-row .project-tag--partner {
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
}

.project-tag--partner {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
}



.project-page__hero-image {
  overflow: hidden;
  margin: 0 auto var(--space-md);
  width: 100%;
  max-width: 28rem;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: var(--radius-lg);
}
.project-page__hero-image img:not(.project-page__npc-badge) {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-page__subtitle {
  font-size: var(--font-lg);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project-page__section-heading {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-top: var(--space-lg);
  border-top: 0.0625rem solid var(--tone-200);
}
.project-page__section-heading:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ============================================
   Project page — embedded video block
   Sits between the last content section and the PDF link.
   ============================================ */
.project-page__video {
  margin: var(--space-xl) 0 var(--space-lg);
}
.project-page__video .video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-dark-card, #0d1b2a);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent-teal) 18%, transparent),
    0 12px 28px -8px rgba(0, 0, 0, 0.25);
}
.project-page__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.project-page__video-caption {
  margin-top: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}

/* ============================================
   Project Navigation — strip + prev/next
   ============================================ */
.project-nav {
  padding: var(--space-xl) 0 var(--space-2xl);
}

/* More Projects strip */
.project-nav__strip {
  border-top: 0.0625rem solid var(--tone-200);
  padding-top: var(--space-xl);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.project-nav__strip-heading {
  font-size: var(--font-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.project-nav__strip-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
}

.project-nav__strip-link {
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.3em 0.7em;
  border-radius: var(--radius-full);
  transition: color 0.3s ease, background 0.3s ease;
}

.project-nav__strip-link:hover {
  color: var(--text-primary);
  background: var(--tone-100);
}

.project-nav__strip-link.is-current {
  color: var(--accent-warm);
  font-weight: 700;
  background: var(--tone-100);
  pointer-events: none;
}

/* Prev/Next cards */
.project-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.project-nav__card {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  border: 0.0625rem solid var(--tone-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-secondary);
  transition: transform 0.3s var(--ease-expensive),
              border-color 0.3s var(--ease-expensive),
              box-shadow 0.3s var(--ease-expensive);
}

.project-nav__card:hover {
  transform: translateY(-0.125rem);
  border-color: var(--accent-warm);
  box-shadow: 0 4px 16px rgba(218, 165, 32, 0.1);
}

.project-nav__card--next {
  text-align: right;
}

.project-nav__label {
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-warm);
  margin-bottom: var(--space-xs);
}

.project-nav__card-title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-xs);
}

.project-nav__card-partner {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

/* All Projects button */
.project-nav__all {
  text-align: center;
}

@media (max-width: 640px) {
  .project-nav__grid {
    grid-template-columns: 1fr;
  }
  .project-nav__card--next {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .project-page__title {
    font-size: var(--font-xl);
  }
  .project-page__section-heading {
    font-size: var(--font-lg);
  }
}


/* ============================================
   Blog Post Navigation — prev/next + view all
   ============================================ */
.blog-nav {
  padding: var(--space-xl) 0 calc(var(--space-xl) * 2);
  border-top: 0.0625rem solid var(--tone-200);
  margin-top: var(--space-xl);
}

.blog-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.blog-nav__card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-secondary);
  transition: transform var(--transition-speed) var(--ease-expensive),
              box-shadow var(--transition-speed) var(--ease-expensive),
              border-color 0.3s ease;
}
.blog-nav__card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-lg);
  border-color: var(--tone-300);
}

.blog-nav__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--tone-50);
}
.blog-nav__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-expensive);
}
.blog-nav__card:hover .blog-nav__image img {
  transform: scale(1.04);
}

.blog-nav__card-body {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.blog-nav__label {
  font-size: var(--font-xs);
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
}

.blog-nav__card-title {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-nav__card-date {
  font-size: var(--font-xs);
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.blog-nav__card--next {
  text-align: right;
}
.blog-nav__card--next .blog-nav__card-body {
  align-items: flex-end;
}

.blog-nav__all {
  text-align: center;
  margin-top: var(--space-xl);
}

@media (max-width: 640px) {
  .blog-nav__grid {
    grid-template-columns: 1fr;
  }
  .blog-nav__card--next {
    text-align: left;
  }
  .blog-nav__card--next .blog-nav__card-body {
    align-items: flex-start;
  }
  .blog-article__title {
    font-size: var(--font-xl);
  }
}


.uppercase {
  text-transform: uppercase;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
}

.display-block {
  display: block;
}

/* Advanced Editorial Layouts */
.full-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: max(var(--space-md), calc(50vw - 720px));
  padding-right: max(var(--space-md), calc(50vw - 720px));
}

/* Background Systems & Surfaces */
.bg-solid-white {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}


.parallax-bg {
  position: absolute;
  inset: -20% 0;
  background: center / cover no-repeat;
  will-change: transform;
}

.parallax-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.surface-floating {
  background-color: var(--bg-primary);
  border: 1px solid var(--tone-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  padding: var(--space-xl);
  position: relative;
  z-index: 2;
}

/* Hero Section — base layout for all non-homepage pages */
/* Content anchors at a fixed distance below the nav on all screens. */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(6vh + 5rem);
  padding-bottom: var(--space-xl);
  position: relative;
}


/* Section elevation — stroke line + ambient shadow.
   Stroke = border-bottom (sharp, like a page edge under light).
   Shadow = soft box-shadow (ambient depth separation). */
/* Navy gradient backgrounds */
.bg-navy-gradient {
  background: linear-gradient(180deg, #0d1b2a 0%, #060d16 100%);
}
.bg-navy-gradient-light {
  background: linear-gradient(180deg, #132d47 0%, #0d1b2a 100%);
}

/* Teal divider bar — on hero bottom edge so it doesn't peek on scroll */
.section-divider-teal {
  border-bottom: 0.5rem solid var(--accent-teal);
}


.section-elevated {
  position: relative;
  z-index: 2;
  box-shadow:
    0 var(--elev-stroke-y) 0 var(--elev-stroke-spread) rgba(0, 0, 0, var(--elev-stroke-opacity)),
    0 var(--elev-shadow-y) var(--elev-shadow-blur) 0rem rgba(0, 0, 0, var(--elev-shadow-opacity));
}

/* Hero elevation — all heroes get the page shadow.
   Non-cinematic heroes break out to full viewport width (they use .container).
   Cinematic hero is already full-bleed.
   Paper texture ::after layer breaks out of .container on hero sections;
   ::before gradient fades the texture at top/bottom edges. */
.hero-section:not(.hero-cinematic) {
  position: relative;
  z-index: 2;
  max-width: 100%;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  box-shadow:
    0 var(--elev-stroke-y) 0 var(--elev-stroke-spread) rgba(0, 0, 0, var(--elev-stroke-opacity)),
    0 var(--elev-shadow-y) var(--elev-shadow-blur) 0rem rgba(0, 0, 0, var(--elev-shadow-opacity));
  clip-path: inset(0.125rem 0rem -10rem 0rem);
  isolation: isolate;
}

.paper-bg {
  background-color: var(--bg-primary);
}

/* Texture layer — breaks out of .container on hero sections */
.hero-section:not(.hero-cinematic)::after {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: url("images/paper-texture.jpg") repeat center / 32rem;
  background-attachment: fixed;
  pointer-events: none;
  z-index: -1;
}
@media (hover: none) {
  .hero-section:not(.hero-cinematic)::after {
    background-attachment: scroll;
  }
}

/* Gradient fade — sits above texture, below content */
.hero-section:not(.hero-cinematic)::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: linear-gradient(to bottom,
    var(--bg-primary) 0%,
    transparent 15%,
    transparent 85%,
    var(--bg-primary) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-section:not(.hero-cinematic) > * {
  position: relative;
  z-index: 1;
}

/* ─── Homepage cinematic hero ─── independent layout system ─── */
.hero-cinematic {
  justify-content: center;
  background: var(--accent-abyss);
  overflow: hidden;
  padding-top: calc(8vh + 8rem);
  box-shadow:
    0 var(--elev-stroke-y) 0 var(--elev-stroke-spread) rgba(0, 0, 0, var(--elev-stroke-opacity)),
    0 var(--elev-shadow-y) var(--elev-shadow-blur) 0rem rgba(0, 0, 0, var(--elev-shadow-opacity));
}
.hero-grain {
  position: absolute;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: var(--hero-grain-opacity);
  mix-blend-mode: var(--hero-grain-blend);
  background-size: 16rem 16rem;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Inline section nav — sits at the bottom of each section */
.section-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 3rem auto 0;
  cursor: pointer;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0;
  animation: chevronBob 2.8s ease-in-out infinite;
}
.section-nav::after {
  content: '';
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.25rem;
}
.section-nav:hover {
  animation-play-state: paused;
}
/* White chevron on dark/gradient sections — auto-inherited via CSS ancestry */
.bg-dark .section-nav,
.bg-navy .section-nav,
.bg-consulting-gradient .section-nav,
.section-dark-extended .section-nav,
.section-dark .section-nav,
.team-core-section .section-nav {
  color: #fff;
}
@keyframes chevronBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(0.375rem); }
}

/* Micro-Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
  transition: opacity 0.8s var(--ease-expensive), transform 0.8s var(--ease-expensive);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-only reveal — visible at low opacity, fades to full on scroll */
.reveal-fade {
  opacity: 0.1;
  transition: opacity 0.8s var(--ease-expensive);
}
.reveal-fade.is-visible {
  opacity: 1;
}

/* Staggered reveal delays */
.reveal-up.delay-1 {
  transition-delay: 0.1s;
}

.reveal-up.delay-2 {
  transition-delay: 0.2s;
}

.reveal-up.delay-3 {
  transition-delay: 0.3s;
}

.reveal-up.delay-4 {
  transition-delay: 0.4s;
}

.reveal-up.delay-5 {
  transition-delay: 0.5s;
}

/* Hero CTA — self-contained reveal, triggered by JS timeout (not observer) */
.reveal-hero-cta {
  opacity: 0;
  transform: translateY(1.25rem);
  will-change: opacity, transform;
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-hero-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Remove will-change and stagger delay after animation settles (set via JS) */
.reveal-up.is-settled {
  will-change: auto;
  transition-delay: 0s;
}

/* 
 * PREMIUM MICRO-COMPONENTS
 * Status dots, Loaders, and Pills
 */


/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition-speed) var(--ease-expensive), opacity var(--transition-speed) var(--ease-expensive), box-shadow var(--transition-speed) var(--ease-expensive), background-color var(--transition-speed) var(--ease-expensive);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  opacity: 0.85;
}

/* Touch devices: disable hover lift */
@media (hover: none) {
  .btn:hover {
    transform: none;
  }
}

/* Primary Button: White with Gradient Shadow */
.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md);
}

/* Secondary Button: Dark with Gradient Shadow */
.btn-secondary {
  background-color: var(--tone-50);
  color: var(--text-primary);
  border: 1px solid var(--tone-200);
}

.btn-secondary:hover {
  background-color: var(--tone-100);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--tone-200);
}

.btn-outline:hover {
  border-color: var(--text-primary);
}

/* Large button variant */
.btn-lg {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-sm);
  font-weight: 600;
}

/* Ghost button on dark backgrounds — transparent with white border */
.btn-ghost-dark {
  background-color: transparent;
  color: var(--text-on-dark-soft);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-ghost-dark:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  transform: none;
}
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  transition:
    color var(--transition-speed) var(--ease-expensive),
    background-color var(--transition-speed) var(--ease-expensive);
}

.btn-ghost:hover {
  color: var(--accent-warm);
  transform: none;
  background-color: transparent;
  background-image: none;
  -webkit-text-fill-color: var(--accent-warm);
  background-clip: unset;
}

/* Card Hover Effects */
.card-interactive {
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

/* Advanced Card Ecosystem (Variant Skins) */
.card-base {
  background-color: var(--bg-primary);
  border: 1px solid var(--tone-200);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  /* Sharp structural shadow on load */
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed) var(--ease-expensive),
    border-color var(--transition-speed) var(--ease-expensive);
  will-change: transform;
  display: flex;
  flex-direction: column;
  position: relative;
  /* Setup for mesh-shadow */
}

/* Base Interaction Default */
.card-base:hover {
  transform: translateY(-6px);
  border-color: transparent;
}

/* Card Composition Utilities */
.card-image-wrapper {
  margin: calc(var(--space-xl) * -1) calc(var(--space-xl) * -1) var(--space-lg) calc(var(--space-xl) * -1);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  height: 12.5rem;
  position: relative;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-expensive);
}

.card-interactive:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  transition: transform var(--transition-speed) var(--ease-expensive), background var(--transition-speed) var(--ease-expensive), color var(--transition-speed) var(--ease-expensive);
}

.icon-solid {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.card-interactive:hover .icon-solid {
  transform: scale(1.1);
}

.card-header {
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  font-size: var(--font-xs);
  text-transform: uppercase;
  font-family: 'Readex Pro', sans-serif;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--accent-vivid-pink);
  display: block;
}


/*
 * LOGO SYSTEM
 * Readex Pro wordmark with consistent styling across nav and footer.
 */
.logo {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

/* Size variants */
.logo-sm {
  font-size: var(--font-sm);
  letter-spacing: 0.12em;
}

.logo-md {
  font-size: var(--font-lg);
  letter-spacing: 0.15em;
}

.logo-lg {
  font-size: var(--font-xl);
  letter-spacing: 0.2em;
}

.logo-hero {
  font-size: var(--font-hero);
  letter-spacing: clamp(0.08em, 0.5vw + 0.05em, 0.3em);
  text-indent: clamp(0.08em, 0.5vw + 0.05em, 0.3em);
}

.logo-nav {
  font-size: var(--font-lg);
  letter-spacing: 0.15em;
}

/* Skin variants */
.logo-gradient {
  color: var(--accent-vivid-pink);
  -webkit-text-fill-color: var(--accent-vivid-pink);
}

.logo-gradient-full {
  color: var(--accent-vivid-pink);
}

.logo-on-dark {
  color: var(--text-on-dark);
  -webkit-text-fill-color: var(--text-on-dark);
}

.logo-muted {
  opacity: 0.25;
}

/*
 * BOLD FOOTER
 * Self-contained footer region: wave shapes at top, gradient body below.
 * The footer owns the wave transition — sections above remain independent.
 */
.site-footer-bold {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* Footer overlaps the section above so the wave SVG sits within the
     section's background. Larger overlap = more of the wave's transparent
     top area is covered by the section bg, eliminating the white peek
     that shows through on navy-bg pages. footer-clearance below must be
     at least this value so content isn't hidden beneath the wave. */
  margin-top: -13.5rem;
  overflow: hidden;
  pointer-events: none;
}

.footer-wave-area {
  position: relative;
  z-index: 2;
  background: transparent;
  line-height: 0;
  font-size: 0;
  pointer-events: none;
}

.footer-body {
  pointer-events: auto;
  background: linear-gradient(180deg, var(--footer-bg-top) 0%, var(--footer-bg-bottom) 100%);
  color: var(--text-on-dark);
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  text-align: center;
  margin-top: -1px;
}

.site-footer-bold .footer-wordmark {
  margin-bottom: var(--space-lg);
}

.site-footer-bold .footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.site-footer-bold .footer-nav a {
  color: var(--text-on-dark-soft);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 500;
  padding: var(--space-xs) 0;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  transition: opacity var(--transition-speed) var(--ease-expensive);
}

.site-footer-bold .footer-nav a:hover {
  opacity: 1;
  color: var(--text-on-dark);
}

.site-footer-bold .footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.site-footer-bold .footer-legal a {
  color: var(--text-on-dark-secondary);
  text-decoration: none;
  font-size: var(--font-xs);
  transition: opacity var(--transition-speed) var(--ease-expensive);
}

.site-footer-bold .footer-legal a:hover {
  color: var(--text-on-dark-strong);
}

.site-footer-bold .footer-copyright {
  color: var(--text-on-dark-muted);
  font-size: var(--font-xs);
}

/*
 * DARK INVERTED SECTION
 * High-contrast dark background for editorial juxtaposition.
 */
.bg-dark {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

/* ============================================================
   BRAND SECTION BACKGROUNDS — Systems-first colour sections
   Each brand colour has 3 variants: solid, dark, light (off-white)
   Text contrast is handled per variant for WCAG compliance.
   ============================================================ */

/* --- TEAL --- */
.bg-teal {
  background-color: var(--accent-vivid-pink);
  color: #fff;
}
.bg-teal h2, .bg-teal h3, .bg-teal .team-row__name { color: #fff; }
.bg-teal .text-secondary, .bg-teal .team-row__bio { color: rgba(255, 255, 255, 0.8); }
.bg-teal .team-row__role { color: var(--accent-warm); }


/* Team core — teal to dark teal gradient */
.team-core-section {
  background: linear-gradient(180deg, var(--accent-teal) 0%, color-mix(in srgb, var(--accent-teal) 35%, #0d1b2a) 100%);
  color: #fff;
}
.team-core-section .team-row__name { color: #fff; }
.team-core-section .team-row__bio { color: rgba(255, 255, 255, 0.8); }
.team-core-section .team-row__role { color: var(--navy-base); }
.team-core-section .team-row__cta { color: var(--navy-base); }

.bg-teal-light {
  background-color: color-mix(in srgb, var(--accent-vivid-pink) 8%, #fff);
  color: var(--text-primary);
}
.bg-teal-light h2, .bg-teal-light h3 { color: var(--text-primary); }
.bg-teal-light .text-secondary { color: var(--text-secondary); }


/* --- NAVY (already exists as bg-dark, adding variants) --- */
.bg-navy {
  background-color: var(--accent-navy);
  color: rgba(255, 255, 255, 0.85);
}
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy .text-secondary { color: rgba(255, 255, 255, 0.65); }
.bg-navy .team-row__name { color: #fff; }
.bg-navy .team-row__role { color: var(--accent-vivid-pink); }
.bg-navy .team-row__bio { color: rgba(255, 255, 255, 0.7); }
.bg-navy .team-row__cta { color: var(--accent-vivid-pink); }


.bg-dark .text-secondary {
  color: rgba(255, 255, 255, 0.6);
}

.bg-dark .text-gradient {
  opacity: 1;
}

.bg-dark .surface-floating {
  background-color: var(--surface-on-dark);
  border-color: var(--border-on-dark);
  color: var(--bg-primary);
}

.bg-dark .surface-floating .text-secondary,
.bg-dark .surface-floating p {
  color: var(--text-on-dark-secondary);
}


/*
 * SHARED SURFACE STYLES
 * Floating cards used on dark and gradient sections across pages.
 */
.dark-surface {
  background-color: var(--surface-on-dark);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: var(--text-on-dark-soft);
}

.dark-surface-frosted {
  background-color: var(--accent-navy);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: #fff;
}

.light-surface {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) {
  .dark-surface-frosted,
  .light-surface,
  .dark-surface {
    border-radius: 0;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    border: none;
  }
}


/* Structure & Evolution — Centered Fork Layout */
.structure-divider {
  width: 1px;
  height: 4rem;
  margin: var(--space-xl) auto;
  background: linear-gradient(180deg, transparent, var(--accent-vivid-pink), transparent);
}

/* Left-align the two body paragraphs (origin + bridge) in the
   Structure & Evolution section. Direct-child selector keeps the
   fork cards underneath unaffected. */
#structure-content > p,
#structure-content > .structure-bridge {
  text-align: left;
}

.structure-bridge {
  font-size: var(--font-lg);
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-primary);
  text-align: center;
}

.structure-bridge strong {
  font-weight: 700;
  color: var(--accent-vivid-pink);
}

/* Structure section on navy background — white text */
.bg-navy .structure-bridge {
  color: rgba(255, 255, 255, 0.9);
}
.bg-navy #structure-content > p {
  color: rgba(255, 255, 255, 0.85);
}

.structure-fork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.structure-fork.reveal-up {
  transform: translateY(10px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.structure-fork.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fork-card {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + 0.25rem);
  text-align: left;
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark-soft);
  /* Cards render as <a> tags so they're clickable scroll anchors. */
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-speed) var(--ease-expensive),
    box-shadow var(--transition-speed) var(--ease-expensive);
}

.fork-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
/* Card has overflow: hidden, so the global :focus-visible 2px outline
   would be clipped at the rounded corners. Inset offset keeps the focus
   ring inside the card edge where it stays visible. */
.fork-card:focus-visible {
  outline-offset: -2px;
}

.fork-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
}

.fork-card--consulting::before {
  background: var(--accent-vivid-pink);
}

.fork-card--npc::before {
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-warm-pale));
}

.fork-card__badge {
  display: inline-block;
  font-size: var(--font-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.fork-card--consulting .fork-card__badge {
  color: var(--accent-vivid-pink);
}

.fork-card--npc .fork-card__badge {
  color: var(--accent-warm);
}

.fork-card__teaser {
  font-size: var(--font-lg);
  line-height: 1.7;
  color: var(--text-on-dark-muted);
}

@media (max-width: 640px) {
  .hero-section {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: var(--space-lg);
  }

  .hero-cinematic {
    min-height: 100vh;
    padding-top: 5rem;
  }

  .structure-fork {
    grid-template-columns: 1fr;
  }

  .footer-body {
    padding: var(--space-xl) var(--space-md) var(--space-xl);
  }

  .site-footer-bold {
    margin-top: -6rem;
  }

  .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-base);
  }

  .form-input,
  .form-textarea {
    padding: var(--space-md);
    font-size: var(--font-base);
  }

  .service-card__icon {
    display: none;
  }
}

/* Entity label badge (Consulting / Non-Profit) */
.entity-badge {
  display: inline-block;
  text-transform: uppercase;
  font-family: 'Readex Pro', sans-serif;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: var(--font-xs);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.entity-badge--consulting {
  background: #fff;
  color: var(--accent-vivid-pink);
}

.entity-badge--npc {
  background: var(--text-primary);
  color: var(--accent-warm);
}

/*
 * SECTION LAYOUT UTILITIES
 * Common section padding and centering patterns.
 */
.section-pad {
  padding-top: calc(var(--space-xl) * var(--section-pad-top));
  padding-bottom: calc(var(--space-xl) * var(--section-pad-bottom));
}

.section-pad-xl {
  padding-top: calc(var(--space-xl) * 2);
  padding-bottom: calc(var(--space-xl) * 3);
}

/* Footer clearance — consistent bottom padding to clear wave SVG overlap.
   Must come after section-pad so it wins the cascade. Min must be >=
   the footer's negative margin-top (-15rem) so content stays above the
   wave on small viewports. */
.footer-clearance {
  padding-bottom: clamp(13.5rem, 15vw + 5rem, 28rem);
}

.section-pad-closing {
  padding-top: calc(var(--space-xl) * var(--section-pad-closing-top));
  padding-bottom: calc(var(--space-xl) * var(--section-pad-closing-bottom));
}

.section-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Common text rhythm */
.prose {
  line-height: 1.7;
}

.heading-tight {
  letter-spacing: -0.04em;
}

/*
 * EDITORIAL CENTER COLUMN
 * Constrains content to a readable center column like Gamma.
 */
.col-narrow {
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Home gallery — bento wall, deterministic 6×3 tile
   7 cells with explicit placements that fill the 6×3 grid
   exactly (18 grid units total). Container locks to 16:9 so
   the wall sits within ~100vh. Rotation cycles all photos
   through the 7 fixed cells.
   ============================================ */
.gallery-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.5rem;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
}
.gallery-bento__item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease-expensive),
              box-shadow 0.4s var(--ease-expensive);
}
.gallery-bento__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Bias the crop toward the upper third — faces in editorial photos
     usually sit there, so default centre crop tends to clip foreheads. */
  object-position: center 35%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.gallery-bento__item img.is-active { opacity: 1; }
.gallery-bento__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

/* Explicit bento layout: 2 square features + 5 wide-medium tiles.
   No 3×1 ultra-wide cells (those crop faces too heavily); all cells
   stay between ~0.89:1 and ~1.78:1 aspect for face-friendly crops. */
.gallery-bento__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }  /* 2×2 square feature */
.gallery-bento__item:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 2; }  /* 2×1 wide */
.gallery-bento__item:nth-child(3) { grid-column: 5 / 7; grid-row: 1 / 3; }  /* 2×2 square feature */
.gallery-bento__item:nth-child(4) { grid-column: 3 / 5; grid-row: 2 / 3; }  /* 2×1 wide */
.gallery-bento__item:nth-child(5) { grid-column: 1 / 3; grid-row: 3 / 4; }  /* 2×1 wide */
.gallery-bento__item:nth-child(6) { grid-column: 3 / 5; grid-row: 3 / 4; }  /* 2×1 wide */
.gallery-bento__item:nth-child(7) { grid-column: 5 / 7; grid-row: 3 / 4; }  /* 2×1 wide */

/* Tablet: simpler 4×3 layout */
@media (max-width: 1024px) {
  .gallery-bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 4 / 3;
  }
  .gallery-bento__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
  .gallery-bento__item:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 2; }
  .gallery-bento__item:nth-child(3) { grid-column: 3 / 5; grid-row: 2 / 3; }
  .gallery-bento__item:nth-child(4) { grid-column: 1 / 3; grid-row: 3 / 4; }
  .gallery-bento__item:nth-child(5) { grid-column: 3 / 5; grid-row: 3 / 4; }
  .gallery-bento__item:nth-child(6),
  .gallery-bento__item:nth-child(7) { display: none; }
}

/* Mobile: 2×3 stack, 6 cells uniform */
@media (max-width: 640px) {
  .gallery-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 2 / 3;
    gap: 0.5rem;
  }
  .gallery-bento__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
  .gallery-bento__item:nth-child(2) { grid-column: 1 / 2; grid-row: 2 / 3; }
  .gallery-bento__item:nth-child(3) { grid-column: 2 / 3; grid-row: 2 / 3; }
  .gallery-bento__item:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 4; }
  .gallery-bento__item:nth-child(5) { grid-column: 2 / 3; grid-row: 3 / 4; }
  .gallery-bento__item:nth-child(6),
  .gallery-bento__item:nth-child(7) { display: none; }
}

/* Lightbox — fullscreen image viewer triggered from gallery clicks */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-lg);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s var(--ease-expensive);
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox__image {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Wider readable column for wall-of-text sections (matches the projects
   pages outer width). Used on Who We Are, What We Do, Our Mission, etc.
   Body text is left-aligned regardless of any centered parent (typical
   for these sections inside .container.text-center). */
.col-readable {
  width: min(92vw, 76rem);
  max-width: 76rem;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

/* Lead-in paragraph that introduces a section / cards block.
   Visually distinct so it reads as a transitional statement, not
   body text. Reusable wherever a section needs a teal centered intro. */
.section-lead-in {
  font-size: var(--font-lg);
  font-weight: 500;
  color: var(--accent-teal);
  line-height: 1.5;
  text-align: center;
  max-width: 50rem;
  margin-inline: auto;
}

/* =============================================
 * FLOATING PILL NAVIGATION
 * Two-state header: flat (default) → pill (scrolled)
 * ============================================= */
header.container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 100%;
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
  transition:
    max-width 0.45s var(--ease-expensive),
    padding 0.45s var(--ease-expensive),
    background-color 0.45s var(--ease-expensive),
    box-shadow 0.45s var(--ease-expensive),
    border-radius 0.45s var(--ease-expensive),
    top 0.45s var(--ease-expensive);
}

header.container.nav-scrolled {
  top: var(--space-sm);
  max-width: min(90vw, 72rem);
  padding: var(--space-xs) var(--space-lg);
  background-color: var(--bg-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Default: dark text (for white pages) */
header.container .logo {
  color: var(--text-primary);
  transition: font-size 0.45s var(--ease-expensive),
    color 0.45s var(--ease-expensive);
}

header.container .btn-ghost {
  color: var(--text-primary);
  white-space: nowrap;
  transition: color 0.45s var(--ease-expensive),
    padding 0.45s var(--ease-expensive),
    font-size 0.45s var(--ease-expensive);
}

/* White text over hero — only on pages with .nav-transparent on body */
.nav-transparent header.container .logo {
  color: #fff;
}

.nav-transparent header.container .btn-ghost {
  color: var(--text-on-dark-soft);
}

.nav-transparent header.container .btn-ghost:hover {
  color: var(--accent-warm);
  -webkit-text-fill-color: var(--accent-warm);
  background-image: none;
  background-clip: unset;
}

/* Scrolled pill state */
header.container.nav-scrolled .logo {
  font-size: var(--font-sm);
  color: var(--text-primary);
}

header.container.nav-scrolled .btn-ghost {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-xs);
  color: var(--text-primary);
}

header.container.nav-scrolled .btn-ghost:hover {
  color: var(--accent-warm);
  -webkit-text-fill-color: var(--accent-warm);
  background-image: none;
  background-clip: unset;
}

/* Nav links tighten in pill state */
header.container #nav-links {
  gap: clamp(0.25rem, 1vw, var(--space-sm));
  transition: gap 0.45s var(--ease-expensive);
  flex-wrap: nowrap;
}

header.container.nav-scrolled #nav-links {
  gap: clamp(0.125rem, 0.5vw, 0.5rem);
}

/* Active nav link */
#nav-links .btn-ghost.is-active {
  color: var(--accent-warm);
  -webkit-text-fill-color: var(--accent-warm);
  background-image: none;
  background-clip: unset;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.375rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 0.15rem;
  background: var(--text-primary);
  border-radius: 0.125rem;
  transition: transform 0.3s var(--ease-expensive), opacity 0.3s var(--ease-expensive);
}

.nav-transparent .nav-toggle__bar {
  background: #fff;
}

header.container.nav-scrolled .nav-toggle__bar {
  background: var(--text-primary);
}

/* Hamburger → X animation when open */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(0.525rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-0.525rem) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-home {
  display: none;
}

@media (max-width: 900px) {
  header.container {
    width: calc(100% - var(--space-lg) * 2);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-home {
    display: block;
  }

  #nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-expensive);
  }

  #nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-home,
  header.container.nav-scrolled .nav-home {
    font-size: var(--font-xxl);
    color: var(--accent-warm);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-indent: 0.15em;
  }

  .nav-home.is-active {
    color: var(--accent-warm);
  }

  #nav-links .btn-ghost {
    font-size: var(--font-lg);
    color: var(--text-on-dark);
    padding: var(--space-xs) var(--space-md);
  }

  #nav-links .btn-ghost:hover {
    -webkit-text-fill-color: unset;
    background-image: none;
    background-clip: unset;
    color: var(--accent-warm);
  }

  #nav-links .btn-ghost.is-active {
    -webkit-text-fill-color: unset;
    background-image: none;
    background-clip: unset;
    color: var(--accent-warm);
  }

  /* When nav is open: remove header transform so fixed overlay covers full viewport */
  header.container.nav-open,
  header.container.nav-scrolled.nav-open {
    transform: none;
    left: 0;
    width: 100%;
    max-width: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  header.container.nav-open .logo {
    color: #fff;
  }

  /* Keep hamburger above the overlay */
  .nav-toggle {
    z-index: 1001;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar {
    background: #fff;
  }

  /* Override pill state gap for mobile overlay */
  header.container #nav-links,
  header.container.nav-scrolled #nav-links {
    gap: var(--space-lg);
  }
}

/* Media Queries (Min-width scaling) */
@media (min-width: 640px) {
  .grid-cols-2-sm {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .grid-cols-3-md {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* Landscape mobile — reduce header and hero height */
@media (max-height: 500px) and (orientation: landscape) {
  header.container {
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  .hero-section {
    min-height: auto;
    padding-top: calc(4vh + 3.75rem);
    padding-bottom: var(--space-md);
  }
}

/* Page exit transition — triggered by JS before navigation */
@keyframes page-exit {
  to {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

body.page-exit main,
body.page-exit .site-footer-bold {
  animation: page-exit 0.25s var(--ease-expensive) forwards;
}

/* Accessibility — respect user motion preferences */
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ================================================
   COMPONENT: Carousel — Reusable horizontal slider
   ================================================ */

.carousel {
  position: relative;
  width: 100%;
  /* `overflow-x: clip` (NOT `hidden`) — the `hidden` value creates a
     scroll container, which forces `overflow-y: visible` to compute as
     `auto` per CSS Overflow Module L3. That coercion turned the carousel
     into a focusable scroll container (because initCarousel sets
     tabindex="0") and produced a phantom vertical scrollbar after
     initInlineNav injected the section-nav button into the carousel
     via the `data-scroll-anchor` attribute. `clip` clips overflow
     without creating a scroll container — no spec coercion, no
     scrollbar. Browser support: Chrome 90+, Safari 16+, Firefox 81+. */
  overflow-x: clip;
  overflow-y: visible;
}

/* Scrollable track */
.carousel__track {
  --_card-w: min(32rem, 92vw);
  --_edge-pad: max(var(--space-lg), calc(50% - var(--_card-w) / 2));
  display: flex;
  gap: var(--space-xl);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: var(--space-sm) var(--_edge-pad);
  scrollbar-width: none;            /* Firefox */
  /* Soft fade at edges — cards dissolve in/out */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}
.carousel__track::-webkit-scrollbar { display: none; }  /* WebKit */

/* Cards inside carousel */
.carousel__track > * {
  flex: 0 0 auto;
  width: var(--_card-w);
  scroll-snap-align: center;
}

/* Side-mounted arrow buttons */
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.3s var(--ease-expensive);
  z-index: 2;
}
.carousel__arrow--prev { left: var(--space-md); }
.carousel__arrow--next { right: var(--space-md); }
.carousel__arrow:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}
.carousel__arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

/* CSS-drawn chevron icons — large */
.carousel__arrow-icon {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  border-bottom: 0.15rem solid rgba(255, 255, 255, 0.85);
  border-right: 0.15rem solid rgba(255, 255, 255, 0.85);
  transform: rotate(-45deg);
  margin-left: -0.125rem;
}
.carousel__arrow--prev .carousel__arrow-icon {
  transform: rotate(135deg);
  margin-left: 0.125rem;
}

/* Focus states */
.carousel__arrow:focus-visible {
  outline: 0.125rem solid var(--accent-warm);
  outline-offset: 0.125rem;
}

/* Mobile: stack cards vertically, hide carousel controls */
@media (max-width: 640px) {
  .carousel {
    overflow-x: visible;
  }
  .carousel__track {
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    overflow-y: visible;
    gap: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    scroll-snap-type: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .carousel__track > * {
    width: 100%;
  }
  .carousel__arrow {
    display: none;
  }
  .carousel__dots {
    display: none;
  }
}
@media (min-width: 641px) and (max-width: 48rem) {
  .carousel__arrow {
    display: none;
  }
}

/* Dot indicators */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.carousel__dot {
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.carousel__dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}
.carousel__dot.is-active::before {
  background: var(--accent-warm);
  transform: translate(-50%, -50%) scale(1.3);
}
/* Hide dots on desktop where arrows are visible */
@media (min-width: 48.01rem) {
  .carousel__dots {
    display: none;
  }
}
/* Hide dots on mobile where cards are stacked */
@media (max-width: 640px) {
  .carousel__dots {
    display: none;
  }
}

/* Responsive card widths */
@media (min-width: 48rem) {
  .carousel__track { --_card-w: min(50rem, 75vw); }
}
@media (min-width: 75rem) {
  .carousel__track { --_card-w: 60rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel__track { scroll-behavior: auto; }
}




/* ================================================
   PAGE-SPECIFIC: index.html — Homepage
   ================================================ */

/* Hero image + overlays */
.hero-bg {
  position: absolute;
  inset: -20% 0;
  background: url(images/photography-004.webp) center / cover no-repeat;
  opacity: var(--hero-img-opacity);
  will-change: transform;
  overflow: hidden;
}
.hero-tone {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--hero-tone-angle),
      var(--hero-tone-color-1) 0%,
      var(--hero-tone-color-2) 70%);
  mix-blend-mode: multiply;
  opacity: 0.85;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(0, 12, 31, var(--hero-vignette-opacity)) 100%);
}

/* ─── Cinematic hero lockup (homepage only) ─── */
.hero-cinematic .hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  margin-top: 0;
}

.hero-title {
  font-size: clamp(3.5rem, 2.5rem + 4vw, 7rem);
  letter-spacing: clamp(0.02em, 0.5vw, 0.15em);
  line-height: 1;
  color: var(--hero-title-color-1);
  text-shadow: var(--hero-title-shadow-x) var(--hero-title-shadow-y) var(--hero-title-shadow-blur) color-mix(in srgb, var(--hero-title-shadow-color) calc(var(--hero-title-shadow-opacity) * 100%), transparent);
}
.hero-title span {
  font-size: clamp(2.4rem, 1.8rem + 3.2vw, 6.16rem);
  letter-spacing: clamp(0.04em, 0.6vw, 0.22em);
  color: var(--hero-title-color-2);
}
.hero-subtitle {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 0.6rem clamp(1rem, 5vw, 5rem);
  font-size: clamp(0.875rem, 0.75rem + 0.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-base);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0.95) 80%, transparent 100%);
}
.hero-description {
  margin-top: var(--space-md);
  font-size: var(--font-base);
  font-weight: 500;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.4);
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-cinematic .hero-cta {
  margin-top: var(--space-xl);
}


/* Partners section — tall centred layout */
.partners-section {
  min-height: 110vh;
  display: flex;
  align-items: center;
  padding: calc(var(--space-2xl) * 1.5) 0 var(--space-2xl);
  scroll-margin-top: 0;
}
@media (max-width: 768px) {
  .partners-section {
    min-height: auto;
    padding: var(--space-xl) 0;
  }
}

/* Partner logo grid — white logos on navy, centred flex wrap */
#partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  justify-items: center;
  gap: var(--space-xl) var(--space-lg);
  padding: var(--space-xl) var(--space-xl);
}
@media (max-width: 768px) {
  #partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs);
}

.partner-logo img {
  max-width: 100%;
  max-height: 5rem;
  object-fit: contain;
}

/* Who We Are card — navy with white text */
.wwa-card {
  background-color: var(--accent-navy);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  color: rgba(255, 255, 255, 0.85);
}
.wwa-card p {
  color: rgba(255, 255, 255, 0.85);
}

.wwd-surface {
  padding: var(--space-xl) 0;
  color: var(--text-on-dark);
}

.wwd-surface h2,
.wwd-surface h3 {
  color: #fff;
}

.wwd-surface p {
  color: rgba(255, 255, 255, 0.85);
}

/* What We Do — fixed background + overlay */
.wwd-section {
  padding-top: clamp(3rem, 2.5rem + 2vw, 5rem);
  background: url('images/doodle-picture.webp') center/cover no-repeat fixed var(--navy-base);
}
@media (hover: none) {
  .wwd-section {
    background-attachment: scroll;
  }
}
.wwd-tone {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0d1b2a 0%, #060d16 100%);
  mix-blend-mode: multiply;
  opacity: 0.9;
}
.wwd-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(0, 12, 31, 0.7) 100%);
}
.wwd-tone::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  opacity: 0.03;
  pointer-events: none;
}

/* Services page — Areas of Focus editorial list
   Large typographic list with teal arrow markers and thin dividers.
   Reads like a magazine table of contents, clearly non-interactive. */
.focus-wall {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 48rem;
  text-align: left;
  border-top: 1px solid color-mix(in srgb, var(--accent-teal) 25%, transparent);
}
.focus-tag {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: var(--space-sm) 0;
  font-size: var(--font-base);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  border-bottom: 1px solid color-mix(in srgb, var(--accent-teal) 25%, transparent);
  cursor: default;
  user-select: none;
  transition: gap 0.4s var(--ease-expensive), color 0.4s ease;
}
.focus-tag::before {
  content: '→';
  color: var(--accent-teal);
  font-weight: 400;
  font-size: 1em;
  transition: transform 0.4s var(--ease-expensive);
}
.focus-tag:hover {
  gap: 1.5rem;
  color: var(--accent-teal);
}
.focus-tag:hover::before {
  transform: translateX(0.25rem);
}

@media (max-width: 640px) {
  .focus-tag {
    font-size: var(--font-base);
    padding: var(--space-sm) 0;
  }
}

/* Focus area items — clickable, open service card modals */
.focus-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--accent-teal);
  margin-bottom: var(--space-xs);
  color: rgba(255, 255, 255, 0.8);
  transition: border-color var(--transition-speed) var(--ease-expensive),
              padding-left var(--transition-speed) var(--ease-expensive);
}
.focus-item:hover {
  padding-left: var(--space-lg);
  border-color: var(--accent-warm);
  color: #fff;
}
.focus-item:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

/* Focus Area Modal — opens on focus-item click, shows matching service card */
.focus-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  padding: var(--space-lg);
  background: rgba(6, 13, 22, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.focus-modal.is-visible {
  opacity: 1;
}
.focus-modal__inner {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: var(--space-lg);
  max-width: min(60rem, 92vw);
  width: 100%;
  height: 100%;
  transform: translateY(1rem);
  transition: transform 0.4s var(--ease-expensive);
}
.focus-modal.is-visible .focus-modal__inner {
  transform: translateY(0);
}
.focus-modal__card {
  grid-row: 2;
  width: 100%;
  max-height: 75vh;
  overflow-y: auto;
  opacity: 1 !important;
}
.focus-modal__close {
  grid-row: 3;
  align-self: start;
}
.focus-modal__close {
  background: linear-gradient(180deg, #0d1b2a 0%, #060d16 100%);
  border: 1px solid var(--accent-warm);
  border-radius: 999px;
  padding: var(--space-sm) var(--space-2xl);
  color: var(--accent-warm);
  font-family: 'Readex Pro', sans-serif;
  font-size: var(--font-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(218, 165, 32, 0.1),
    0 1px 3px -1px rgba(0, 0, 0, 0.3),
    0 6px 16px -4px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-expensive), box-shadow 0.3s ease;
}
.focus-modal__close:hover {
  background: var(--accent-warm);
  color: var(--navy-base);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(218, 165, 32, 0.3),
    0 4px 12px -2px rgba(0, 0, 0, 0.5),
    0 16px 32px -8px rgba(0, 0, 0, 0.4);
}
.focus-modal__close:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}


/* ================================================
   PAGE-SPECIFIC: approach.html — Commitments & Pathways
   ================================================ */

/* Full-screen entity section — extra VH so content fills viewport on scroll */
.section-entity {
  min-height: calc(100vh + 10rem);
  padding-top: calc(var(--space-xl) * 2);
  padding-bottom: calc(var(--space-xl) * 3);
}

/* Dark section with extra VH — pushes diagonals out of chevron scroll range */
.section-dark-extended {
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark);
  min-height: 130vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 var(--space-xl);
}

.section-dark-extended::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 15%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 0;
}



/* Commitment stack cards */
.stack-card {
  background-color: var(--surface-on-dark);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: var(--text-on-dark-soft);
  position: relative;
  overflow: hidden;
}
.stack-card > * { position: relative; z-index: 1; }
.stack-card::before {
  content: attr(data-number);
  position: absolute;
  top: -0.15em;
  right: -0.05em;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(14rem, 10rem + 16vw, 28rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent-vivid-pink);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.stack-card__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}
.stack-card__number {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--accent-warm);
  line-height: 1;
}
.stack-card__title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-on-dark);
  margin: 0;
  letter-spacing: -0.03em;
  position: relative;
}
.stack-card__divider {
  border: none;
  border-top: 1px solid var(--surface-on-dark-hover);
  margin: var(--space-md) 0;
}
.stack-card__footnote {
  position: relative;
  z-index: 1;
  font-size: var(--font-sm);
  font-style: italic;
  line-height: 1.6;
  color: var(--accent-warm);
  padding-bottom: var(--space-sm);
}

/* Stack card accordion */
.stack-card__toggle {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--text-on-dark-secondary);
  background: none;
  border: none;
  padding: 0;
  z-index: 2;
  transition: transform 0.4s var(--ease-expensive), color 0.3s ease;
}
.stack-card__toggle::after {
  content: '';
  display: block;
  width: 0.75rem;
  height: 0.75rem;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.25rem;
}
.stack-card__toggle:hover {
  color: #fff;
  transform: translateY(0.25rem);
}
.stack-card.is-expanded .stack-card__toggle {
  transform: rotate(180deg);
}
.stack-card.is-expanded .stack-card__toggle:hover {
  transform: rotate(180deg) translateY(0.25rem);
}
.stack-card__body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows 0.6s var(--ease-expensive), opacity 0.5s var(--ease-expensive), margin 0.6s var(--ease-expensive), padding 0.6s var(--ease-expensive);
  position: relative;
  z-index: 1;
}
.stack-card__body > .stack-card__inner {
  overflow: hidden;
}
.stack-card.is-expanded .stack-card__body {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-on-dark);
}
.stack-card__columns {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-md);
  align-items: center;
}
.stack-card__image {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 0.1875rem solid rgba(255, 255, 255, 0.8);
  max-width: 22rem;
  margin: 0 auto;
}
.stack-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 768px) {
  .stack-card { padding: var(--space-md); }
  .stack-card__toggle {
    top: var(--space-md);
    right: var(--space-md);
  }
}
@media (max-width: 640px) {
  .stack-card__columns {
    grid-template-columns: 1fr;
  }
  .stack-card__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
  }
  .stack-card__title {
    font-size: var(--font-lg);
    padding-right: 0;
  }
  .stack-card__number {
    font-size: var(--font-lg);
  }
  .stack-card__toggle {
    position: static;
    margin: var(--space-sm) auto 0;
  }
}

/* Pathway cards */
/* Resource items */
.resource-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--tone-200);
  text-decoration: none;
  color: var(--text-primary);
  transition: background-color 0.3s ease;
}

.resource-item:first-child {
  border-top: 1px solid var(--tone-200);
}

.resource-item:hover {
  background-color: var(--tone-50);
}

.resource-item__title {
  font-size: var(--font-base);
  font-weight: 600;
}

.resource-item__format {
  font-size: var(--font-xs);
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bg-navy .resource-item {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}
.bg-navy .resource-item:first-child {
  border-top-color: rgba(255, 255, 255, 0.15);
}
.bg-navy .resource-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
.bg-navy .resource-item__format {
  color: rgba(255, 255, 255, 0.5);
}

/* Section connector — vertical line between sub-sections */
.section-connector {
  width: 1px;
  height: 4rem;
  background: linear-gradient(180deg, transparent, var(--accent-vivid-pink), transparent);
  margin: var(--space-xl) auto;
}

/* Pathway cards — premium navy objects with considered depth */
.pathway-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 40%),
    linear-gradient(180deg, #112338 0%, #0d1b2a 55%, #0a1622 100%);
  border: 1px solid rgba(42, 124, 124, 0.55);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
  /* Layered shadow (Cal.com style): soft teal ring + sharp contact + mid + diffused */
  box-shadow:
    0 0 0 1px rgba(42, 124, 124, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 3px 8px -2px rgba(0, 0, 0, 0.28),
    0 12px 28px -8px rgba(0, 0, 0, 0.38);
  transition: transform 0.4s var(--ease-expensive),
              box-shadow 0.4s var(--ease-expensive),
              border-color 0.4s var(--ease-expensive);
}

/* Subtle inner top highlight — 3D edge catch */
.pathway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 8%, rgba(42, 124, 124, 0.45) 50%, transparent 92%);
  pointer-events: none;
}

.pathway-card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 124, 124, 0.95);
  box-shadow:
    0 0 0 1px rgba(42, 124, 124, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 6px 14px -2px rgba(0, 0, 0, 0.35),
    0 22px 44px -12px rgba(0, 0, 0, 0.45);
}

.pathway-card__number {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--font-xxl);
  font-weight: 700;
  color: var(--accent-warm);
  line-height: 1;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.pathway-card__title {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  color: var(--accent-vivid-pink);
}

.pathway-card__intro {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, 0.72);
  font-style: italic;
  margin-bottom: var(--space-md);
  line-height: 1.65;
}

.pathway-tag-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.pathway-tag {
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(10, 22, 34, 0.6);
  border: 1px solid rgba(42, 124, 124, 0.3);
  color: var(--accent-vivid-pink);
  white-space: nowrap;
}

/* Commitments card list */
.commitments-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Vision callout cards */
.vision-card {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-dark-card);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-vivid-pink);
  box-shadow: inset 0 0 30px color-mix(in srgb, var(--accent-deep-purple) 8%, transparent), 0 2px 12px rgba(0, 0, 0, 0.15);
}


/* ================================================
   PAGE-SPECIFIC: services.html — Service Cards
   ================================================ */

/* Service cards — deep navy gradient with teal accents */
.service-card {
  background: linear-gradient(180deg, #0d1b2a 0%, #060d16 100%);
  border: 1px solid var(--accent-vivid-pink);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: left;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(42, 124, 124, 0.1),
    0 1px 3px -1px rgba(0, 0, 0, 0.3),
    0 6px 16px -4px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s ease-in-out,
              box-shadow 0.6s ease-in-out,
              border-color 0.6s ease-in-out,
              opacity 0.6s ease-in-out;
}

/* Top edge highlight */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(42, 124, 124, 0.3) 50%, transparent 90%);
}


@media (min-width: 641px) {
  .service-card { opacity: 0.4; }
  .service-card.is-active {
    opacity: 1;
    transform: translateY(-2px);
    border-color: var(--accent-vivid-pink);
    box-shadow:
      0 0 0 1px rgba(42, 124, 124, 0.3),
      0 2px 6px -1px rgba(0, 0, 0, 0.5),
      0 12px 28px -6px rgba(0, 0, 0, 0.4);
  }
}
.service-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  min-height: auto;
}
.service-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.service-card__title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.service-card > .prose {
  font-size: var(--font-sm);
  line-height: 1.5;
  color: var(--accent-vivid-pink);
}
.service-card__activities {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
  border-top: 0.0625rem solid var(--border-on-dark);
  padding-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.service-card__activities li {
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
  padding-left: 1rem;
  position: relative;
}
.service-card__activities li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: #fff;
  opacity: 1;
}


/* ================================================
   PAGE-SPECIFIC: contact.html — Form Fields
   ================================================ */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-label {
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.form-input,
.form-textarea {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--tone-200);
  background: var(--tone-50);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-base);
  transition: border-color var(--transition-speed) ease;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-deep-purple);
}
.form-textarea {
  resize: vertical;
  min-height: 6.25rem;
}

/* Contact form submission state messages */
.form-status {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-base);
  line-height: 1.5;
}
.form-status--success {
  background: color-mix(in srgb, var(--accent-teal) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-teal) 35%, transparent);
  color: var(--accent-teal);
}
.form-status--error {
  background: color-mix(in srgb, var(--accent-deep-purple) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-deep-purple) 35%, transparent);
  color: var(--accent-deep-purple);
}
.form-status a {
  color: inherit;
  text-decoration: underline;
}
/* Honeypot field visually hidden but accessible to bots */
.form-honeypot { display: none; }

/* Contact address block — inside "Where We Are" info card on dark section */
.contact-address {
  font-style: normal;
  font-size: var(--font-base);
  line-height: 1.6;
  margin: 0 0 var(--space-md);
}
.contact-address a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-teal) 60%, transparent);
  padding-bottom: 0.1em;
  transition: border-color var(--transition-speed) var(--ease-expensive),
              color var(--transition-speed) var(--ease-expensive);
}
.contact-address a:hover {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
}


/* ================================================
   PAGE-SPECIFIC: team.html — Team Rows & Modals
   ================================================ */

/* Team member row */
.team-row {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--tone-200);
  cursor: pointer;
  transition: opacity var(--transition-speed) ease;
}
.team-row:first-child { padding-top: 0; }
.team-row:last-child { border-bottom: none; padding-bottom: 0; }
.team-row:hover { opacity: 0.85; }
.team-row:active { opacity: 0.75; }
.bg-dark .team-row { border-bottom-color: var(--border-on-dark); }

/* Portrait */
.team-row__portrait {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: var(--tone-200);
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid var(--bg-primary);
  box-shadow: var(--shadow-md);
  align-self: center;
}
.bg-dark .team-row__portrait {
  background: rgba(255, 255, 255, 0.1);
}
.team-row__portrait img,
.team-row__portrait svg { width: 100%; height: 100%; object-fit: cover; }
.team-row__portrait img {
  filter: grayscale(100%) sepia(20%) hue-rotate(180deg) saturate(150%);
  mix-blend-mode: luminosity;
  transition: filter 0.6s ease, mix-blend-mode 0.6s ease;
}
.team-row:hover .team-row__portrait img {
  mix-blend-mode: normal;
  filter: grayscale(0%) brightness(1) sepia(0%) hue-rotate(0deg) saturate(100%);
}
.bg-dark .team-row__portrait svg circle,
.bg-dark .team-row__portrait svg ellipse { fill: rgba(255, 255, 255, 0.15); }

/* Text content */
.team-row__body { flex: 1; min-width: 0; }
.team-row__name {
  font-size: var(--font-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.125rem;
  color: var(--text-primary);
}
.bg-dark .team-row__name { color: var(--text-on-dark); }

.team-row__role {
  font-size: var(--font-xs);
  text-transform: uppercase;
  font-family: 'Readex Pro', sans-serif;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.team-row__role--core {
  color: var(--accent-vivid-pink);
}
.team-row__role--consultant { color: var(--accent-deep-purple); }
.bg-dark .team-row__role--consultant { color: var(--accent-vivid-pink); }
.team-row__role--npc { color: var(--accent-warm); }

.team-row__bio {
  font-size: var(--font-base);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.bg-dark .team-row__bio { color: var(--text-on-dark-muted); }

.team-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  font-family: 'Readex Pro', sans-serif;
  letter-spacing: 0.08em;
  transition: gap var(--transition-speed) var(--ease-expensive);
}
.team-row__cta--gradient {
  color: var(--accent-vivid-pink);
}
.bg-dark .team-row__cta--gradient {
  color: var(--accent-warm);
}
.team-row__cta--npc { color: var(--accent-warm); }
.team-row:hover .team-row__cta { gap: 0.625rem; }

@media (max-width: 640px) {
  .team-row {
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: var(--space-md);
  }
  #team-core-heading,
  #team-consultants-heading,
  #team-npc-heading {
    text-align: center;
  }
  .team-row__portrait { width: 13.75rem; height: 13.75rem; }
}

/* Modal — Full bio overlay */
/* ---- Modal overlay ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.is-active { opacity: 1; pointer-events: auto; }

/* ---- Modal container — editorial spread ---- */
.modal-container {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  max-width: 80%;
  width: 100%;
  max-height: 70%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: row;
  transform: translateY(1.25rem) scale(0.97);
  transition: transform 0.4s var(--ease-expensive);
  box-shadow:
    0 1.5rem 4rem rgba(0, 0, 0, 0.45),
    0 0 0 0.0625rem rgba(255, 255, 255, 0.05),
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.06);
}
.modal-overlay.is-active .modal-container { transform: translateY(0) scale(1); }

/* ---- Left: editorial portrait panel ---- */
.modal-portrait {
  position: relative;
  width: clamp(16rem, 35%, 26rem);
  flex-shrink: 0;
  background: var(--bg-dark);
  overflow: hidden;
  box-shadow: inset -0.0625rem 0 0 rgba(255, 255, 255, 0.06);
}
.modal-portrait__image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-portrait__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Placeholder SVG — subtle silhouette */
.modal-portrait__image svg {
  width: 55%;
  height: 55%;
  opacity: 0.18;
}

/* Scrim: bottom gradient for text legibility */
.modal-portrait__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 20%,
    transparent 40%
  );
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}
.modal-header__pronouns {
  font-size: var(--font-base);
  font-weight: 300;
  color: var(--tone-300);
  margin-left: var(--space-md);
}

/* ---- Close button ---- */
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 0.0625rem solid var(--tone-200);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}
.modal-close:hover {
  background: var(--tone-100);
  color: var(--text-primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}
.modal-close:focus-visible {
  outline: 2px solid var(--accent-deep-purple);
  outline-offset: 2px;
}

/* ---- Right: scrollable content ---- */
.modal-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  background: var(--bg-primary);
  border-left: 0.0625rem solid var(--tone-200);
  display: flex;
  flex-direction: column;
}
.modal-content::-webkit-scrollbar { width: 0.375rem; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb {
  background: var(--tone-200);
  border-radius: var(--radius-full);
}
.modal-content::-webkit-scrollbar-thumb:hover { background: var(--tone-300); }
.modal-content { scrollbar-width: thin; scrollbar-color: var(--tone-200) transparent; }
.modal-content :focus-visible {
  outline-color: var(--accent-deep-purple);
}
.modal-content p {
  font-size: var(--font-base);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* Lead "page" — fills exactly one visible screen of the scroll area */
.modal-page {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: var(--space-xl);
  box-sizing: border-box;
}
.modal-page .modal-scroll-cue {
  margin-top: var(--space-sm);
  align-self: center;
}

/* Header — name & role above lead paragraph */
.modal-header {
  margin-bottom: var(--space-md);
}
.modal-header__role {
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
  margin-bottom: 0.25rem;
}
.modal-header__name {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0;
}

/* Lead paragraph — bold statement */
.modal-lead {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Long-form body */
.modal-body {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.5s var(--ease-expensive), transform 0.5s var(--ease-expensive);
}
.modal-body.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.modal-body p { margin-bottom: var(--space-md); line-height: 1.7; }
.modal-body p:last-of-type { margin-bottom: 0; }

/* Section dividers */
.modal-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 0.0625rem solid var(--tone-200);
}
.modal-section__title {
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  font-family: 'Readex Pro', sans-serif;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

/* Publication items */
.modal-item {
  padding: var(--space-md);
  background: var(--tone-50);
  border-radius: var(--radius-md);
  border: 0.0625rem solid var(--tone-200);
  margin-bottom: var(--space-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.modal-item:hover {
  background: var(--tone-100);
  border-color: var(--tone-300);
}
.modal-item__title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.modal-item__desc {
  font-size: var(--font-xs);
  line-height: 1.6;
  color: var(--text-secondary);
}
.modal-item__desc a {
  color: var(--accent-deep-purple);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

/* ---- Modal scroll cue ---- */
.modal-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: var(--space-lg) auto 0;
  cursor: pointer;
  color: var(--tone-300);
  background: none;
  border: none;
  padding: 0;
  animation: chevronBob 2.8s ease-in-out infinite;
  transition: color 0.2s ease, opacity 0.4s ease;
  opacity: 1;
}
.modal-scroll-label {
  display: block;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--font-xs);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--tone-300);
  margin-top: 0.125rem;
}
.modal-scroll-cue::after {
  content: '';
  display: block;
  width: 0.625rem;
  height: 0.625rem;
  border-bottom: 0.125rem solid currentColor;
  border-right: 0.125rem solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.1875rem;
}
.modal-scroll-cue:hover {
  color: var(--text-primary);
  animation-play-state: paused;
}
.modal-scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-scroll-cue.is-hidden + .modal-scroll-label {
  opacity: 0;
}

/* ---- Modal mobile: stacked, scrollable ---- */
@media (max-width: 56.25rem) {
  .modal-overlay {
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
  }
  .modal-container {
    flex-direction: column;
    max-width: 100%;
    max-height: none;
    height: auto;
    min-height: 100%;
    border-radius: 0;
    border: none;
    overflow-y: visible;
  }
  .modal-portrait {
    width: 100%;
    height: 50vh;
    flex-shrink: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .modal-portrait__image {
    width: 100%;
    height: 100%;
  }
  .modal-portrait__scrim { padding: var(--space-sm); }
  .modal-content {
    border-left: none;
    border-top: none;
    overflow-y: visible;
    flex: none;
  }
  .modal-page {
    flex: none;
    padding: var(--space-lg);
    justify-content: flex-start;
  }
  .modal-body {
    padding: var(--space-lg);
    opacity: 1;
    transform: none;
  }
  .modal-section { margin-top: var(--space-lg); padding-top: var(--space-lg); }
  .modal-item { margin-bottom: var(--space-md); }
  .modal-scroll-cue { display: none; }
  .modal-scroll-label { display: none; }
  .modal-close {
    top: var(--space-md);
    right: var(--space-md);
    width: 3rem;
    height: 3rem;
  }
}

/* ================================================
   Cookie Consent — side tab
   ================================================ */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 70%);
  z-index: 800;
  max-width: 28rem;
  width: calc(100% - var(--space-lg) * 2);
  background: var(--navy-base);
  border: 1px solid var(--accent-deep-purple);
  border-radius: 0.75rem 0.75rem 0 0;
  border-bottom: none;
  padding: var(--space-md) var(--space-lg);
  box-shadow:
    0 0 0 1px rgba(161, 72, 76, 0.15),
    0 -4px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.cookie-consent.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.cookie-consent.is-leaving {
  transform: translate(-50%, 110%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.84, 0),
              opacity 0.4s ease-out;
}

.cookie-consent__text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 var(--space-sm);
}

.cookie-consent__text a {
  color: var(--accent-deep-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__text a:hover {
  color: #fff;
}

.cookie-consent__actions {
  display: flex;
  gap: var(--space-xs);
}

.cookie-consent__btn {
  flex: 1;
  padding: 0.75rem 1rem;
  min-height: 2.75rem;
  border: none;
  border-radius: 0.375rem;
  font-family: var(--font-family-base);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.cookie-consent__btn--accept {
  background: var(--accent-deep-purple);
  color: #fff;
}

.cookie-consent__btn--accept:hover {
  background: #fff;
  color: var(--navy-base);
}

.cookie-consent__btn--decline {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

.cookie-consent__btn--decline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
  .cookie-consent {
    width: 100%;
    max-width: none;
    border-radius: 0.75rem 0.75rem 0 0;
  }
}