/* ==========================================================================
   Investigation Station — global stylesheet
   Palette is taken from the organisation's own logo (#210B4A) and the gold
   accent the previous site used (#E7AE01).
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Jakarta';
  src: url('/fonts/plus-jakarta-sans-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
/* Fallback metrics tuned to Plus Jakarta Sans so swapping causes no shift */
@font-face {
  font-family: 'Jakarta Fallback';
  src: local('Helvetica Neue'), local('Arial');
  size-adjust: 103%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --brand: #210b4a;
  --brand-800: #1a0839;
  --brand-700: #341562;
  --brand-600: #45217a;
  --brand-500: #5c33a0;
  --brand-300: #9d80d4;
  --brand-100: #e5dcf6;
  --brand-50: #f5f1fc;

  --gold: #e7ae01;
  --gold-600: #bd8c00;
  --gold-100: #fdf1cf;
  --gold-50: #fdf8ea;

  --paper: #ffffff;
  --bg: #faf8fd;
  --text: #221b33;
  --muted: #5d5473;
  --line: rgba(33, 11, 74, 0.12);
  --line-soft: rgba(33, 11, 74, 0.07);

  --font: 'Jakarta', 'Jakarta Fallback', 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1160px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(26, 8, 57, 0.06), 0 2px 8px rgba(26, 8, 57, 0.05);
  --shadow: 0 4px 12px rgba(26, 8, 57, 0.07), 0 14px 34px rgba(26, 8, 57, 0.09);
  --shadow-lg: 0 10px 24px rgba(26, 8, 57, 0.1), 0 30px 60px rgba(26, 8, 57, 0.14);

  --nav-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-500); }
h1, h2, h3, h4, h5 { margin: 0 0 .6em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; color: var(--brand-800); }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
blockquote { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.wrap-narrow { max-width: 760px; }
.section { padding: clamp(3.25rem, 7vw, 6rem) 0; }
.section-tight { padding: clamp(2.25rem, 4.5vw, 3.5rem) 0; }
.section-alt { background: var(--paper); }
.section-brand { background: var(--brand); color: #efeaf8; }
.section-brand h2, .section-brand h3 { color: #fff; }
.section-brand a:not(.btn) { color: var(--gold); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-600); margin-bottom: .85rem;
}
.section-brand .eyebrow { color: var(--gold); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
.section-brand .lede { color: #cfc4e6; }
.center { text-align: center; }
.center .lede { margin-inline: auto; max-width: 66ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1;
  padding: .95rem 1.6rem; border-radius: var(--radius-pill); border: 2px solid transparent;
  cursor: pointer; text-align: center; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-gold { background: var(--gold); color: #2b1c00; box-shadow: 0 6px 18px rgba(231, 174, 1, .32); }
.btn-gold:hover { background: #f5bc12; color: #2b1c00; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }
.center .btn-row { justify-content: center; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
/* The frosted background lives on a pseudo-element, NOT on the header.
   backdrop-filter makes its element the containing block for position:fixed
   descendants, and the header is sticky, so a fixed mobile menu inside it was
   positioned against the header's in-flow document position rather than the
   viewport: at scroll 0 that coincides, but 2400px down the menu rendered
   2400px above the screen while the page was scroll-locked. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(26, 8, 57, .92);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
}
.nav { display: flex; align-items: center; gap: 1rem; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; color: #fff; }
.brand:hover { color: #fff; }
.brand img { width: 44px; height: 34px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.06rem; letter-spacing: -.02em; line-height: 1.1; }
.brand-tag { display: block; font-weight: 500; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .55rem .85rem; border-radius: var(--radius-pill);
  color: #e3daf5; font-weight: 600; font-size: .95rem; transition: background-color .15s ease, color .15s ease;
}
.nav-links a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .13); }
.nav-cta { margin-left: .6rem; padding: .7rem 1.25rem; font-size: .95rem; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  /* Full-height panel positioned against the VIEWPORT. This only works
     because .site-header carries no backdrop-filter/transform/filter of its
     own (see the note on .site-header::before). */
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--brand-800); padding: 1rem 1.25rem 2rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .9rem 1rem; font-size: 1.05rem; border-radius: 12px; }
  .nav-cta { margin: 1rem 0 0; border-radius: var(--radius-pill); }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(26, 8, 57, .96) 0%, rgba(33, 11, 74, .88) 42%, rgba(33, 11, 74, .55) 100%);
}
.hero-inner { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem); max-width: 720px; }
.hero h1 { color: #fff; min-height: 4rem; }
.hero p { color: #d8cdee; font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 56ch; }
.hero .btn-row { margin-top: 1.9rem; }
.hero-eyebrow { color: var(--gold); }
@media (max-width: 768px) {
  .hero h1 { min-height: 5.2rem; }
  .hero::after { background: linear-gradient(170deg, rgba(26, 8, 57, .95) 0%, rgba(33, 11, 74, .9) 60%, rgba(33, 11, 74, .8) 100%); }
}

/* Compact hero for interior pages */
.hero-sm .hero-inner { padding: clamp(2.75rem, 6vw, 4.5rem) 0; max-width: 780px; }
.hero-sm h1 { min-height: 0; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); }

.card-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600); margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }

/* Split feature row (image + text) */
.split { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-reverse .split-media { order: 2; }
}
.split-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.figure-note { font-size: .9rem; color: var(--muted); margin-top: .9rem; line-height: 1.55; }
.section-brand .figure-note { color: #b9abd8; }

/* ---------- Exhibit gallery ---------- */
.exhibit + .exhibit { margin-top: clamp(3rem, 6vw, 5rem); }
.exhibit-head { max-width: 62ch; margin-bottom: 1.75rem; }
.exhibit-head p { color: var(--muted); }

.gallery {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.gallery button {
  padding: 0; border: 0; background: var(--brand-100); cursor: zoom-in; border-radius: 12px;
  overflow: hidden; aspect-ratio: 4 / 3; display: block; width: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery button[hidden] { display: none; }
.gallery button:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-more {
  display: block; margin: 1.25rem auto 0;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(15, 5, 33, .94); padding: clamp(.75rem, 3vw, 2.5rem);
  align-items: center; justify-content: center;
}
.lightbox[open], .lightbox.open { display: flex; }
.lightbox { touch-action: pan-y; }
.lightbox img {
  max-width: 100%; max-height: 82vh; width: auto; border-radius: 10px; -webkit-user-drag: none; user-select: none;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox-count {
  position: absolute; bottom: 1.1rem; left: 50%; transform: translateX(-50%);
  color: #cbbde6; font-size: .9rem; font-variant-numeric: tabular-nums;
}
.lb-btn {
  position: absolute; border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .12); border-radius: 50%;
  width: 48px; height: 48px; display: grid; place-items: center;
  transition: background-color .15s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: max(1rem, 2vw); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(1rem, 2vw); top: 50%; transform: translateY(-50%); }
@media (max-width: 620px) {
  .lb-prev { left: .6rem; }
  .lb-next { right: .6rem; }
  .lb-btn { width: 42px; height: 42px; }
}

/* ---------- Board of directors ---------- */
.board { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.board figure { flex: 0 1 200px; }
.board figure { margin: 0; text-align: center; }
.board img {
  width: 100%; aspect-ratio: 7 / 8; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); background: var(--brand-100);
}
.board figcaption { margin-top: .9rem; font-weight: 700; color: var(--brand-800); }

/* ---------- Donate ---------- */
.donate-panel {
  background: linear-gradient(140deg, var(--brand-700), var(--brand-800));
  border-radius: var(--radius-lg); color: #ece5f9;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
}
.donate-panel h2, .donate-panel h3 { color: #fff; }
.donate-panel a { color: var(--gold); }
.paypal-btn { display: inline-block; border-radius: 12px; overflow: hidden; background: #fff; padding: .55rem .9rem; transition: transform .15s ease, box-shadow .15s ease; }
.paypal-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.paypal-btn img { width: 160px; height: auto; }

/* Credit / sponsor blocks */
.credits { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.credit-card {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 1.4rem;
}
.credit-card h3 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.credit-card p { color: #d5cbea; font-size: .96rem; margin: 0; }

/* ---------- Video ---------- */
.video-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--brand-800); box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 1.5rem;
  cursor: pointer; color: #cfc4e6; font: inherit; font-size: .95rem; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: radial-gradient(120% 120% at 50% 0%, var(--brand-600), var(--brand-800));
  transition: color .15s ease;
}
.video-facade:hover { color: #fff; }
/* Poster frame behind the play button; the label sits on a scrim so it stays legible */
.video-facade { isolation: isolate; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.video-facade .video-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .6s cubic-bezier(.22,.7,.3,1);
}
.video-facade::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(26,8,57,.85) 0%, rgba(26,8,57,.25) 45%, rgba(26,8,57,.15) 100%);
}
.video-facade:hover .video-poster { transform: scale(1.04); }
.video-facade > span:not(.play) { position: relative; z-index: 1; }
.video-facade .play { position: relative; z-index: 1; }
.video-facade .play {
  width: 76px; height: 76px; border-radius: 50%; background: var(--gold);
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: transform .18s ease;
}
.video-facade:hover .play { transform: scale(1.08); }
.video-facade .play svg { width: 30px; height: 30px; color: #2b1c00; margin-left: 4px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 380px 1fr; } }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list .card-icon { width: 42px; height: 42px; border-radius: 12px; margin: 0; flex: none; }
.contact-list .card-icon svg { width: 20px; height: 20px; }
.contact-list li > span:last-child { min-width: 0; }
.contact-label { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-value { display: block; font-weight: 600; color: var(--brand-800); overflow-wrap: anywhere; }
.contact-value a { color: var(--brand-800); }
.contact-value a:hover { color: var(--brand-500); }

.social-row { display: flex; gap: .6rem; margin-top: 1.5rem; }
.social-row a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--line-soft);
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.social-row a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.social-row svg { width: 20px; height: 20px; }

/* ---------- Forms ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .4rem; color: var(--brand-800); }
.field .req { color: #b3261e; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(92, 51, 160, .14);
}
.form-note { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 12px; font-weight: 600; display: none; }
.form-status.show { display: block; }
.form-status.error { background: #fdeceb; color: #8c1d18; border: 1px solid #f4c7c3; }
.form-status.ok { background: #e9f7ee; color: #17603a; border: 1px solid #bfe5cd; }

/* ---------- Blog ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-btn {
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  padding: .55rem 1.1rem; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--muted);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.filter-btn:hover { border-color: var(--brand-300); color: var(--brand-600); }
.filter-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.blog-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.post-card-thumb { aspect-ratio: 16 / 9; background: var(--brand-100); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.post-card-cat {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-50); padding: .3rem .75rem; border-radius: var(--radius-pill); margin-bottom: .85rem;
}
.post-card-title { font-weight: 800; font-size: 1.2rem; line-height: 1.3; color: var(--brand-800); letter-spacing: -.015em; }
.post-card-desc { color: var(--muted); font-size: .96rem; margin: .6rem 0 0; }
.post-card-meta { margin-top: auto; padding-top: 1.1rem; font-size: .86rem; color: var(--muted); }

.blog-post-hero { position: relative; color: #fff; isolation: isolate; background: var(--brand-800); }
.blog-post-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.blog-post-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(26, 8, 57, .8), rgba(26, 8, 57, .94));
}
.blog-post-hero-content {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding: clamp(3rem, 7vw, 5rem) 1.25rem clamp(2.5rem, 5vw, 3.5rem);
}
.blog-post-hero-content h1 { color: #fff; max-width: 20ch; }
.blog-post-cat {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-800); background: var(--gold); padding: .34rem .85rem; border-radius: var(--radius-pill); margin-bottom: 1.1rem;
}
.post-meta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; font-size: .95rem; color: #cabde3; }
.post-meta-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; }

.blog-post-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 4vw, 3.5rem);
  max-width: var(--wrap); margin-inline: auto; padding: clamp(2.5rem, 5vw, 4rem) 1.25rem;
}
@media (max-width: 940px) { .blog-post-wrap { grid-template-columns: 1fr; } }
.blog-article { font-size: 1.075rem; line-height: 1.75; }
.blog-article > :first-child { margin-top: 0; }
.blog-article h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.4rem 0 .9rem; }
.blog-article h3 { font-size: 1.25rem; margin: 2rem 0 .7rem; }
.blog-article img { border-radius: var(--radius); margin: 1.75rem 0; box-shadow: var(--shadow-sm); }
.blog-article figure { margin: 1.75rem 0; }
.blog-article figcaption { font-size: .9rem; color: var(--muted); margin-top: .7rem; }
.blog-article hr { margin: 2.25rem 0; }

.blog-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.sidebar-head { font-weight: 800; color: var(--brand-800); margin-bottom: .6rem; }
.sidebar-body { display: flex; flex-direction: column; }
.sidebar-link { display: block; padding: .6rem 0; font-size: .95rem; border-bottom: 1px solid var(--line-soft); font-weight: 600; }
.sidebar-link:last-child { border-bottom: 0; }
.sidebar-cta {
  background: linear-gradient(140deg, var(--brand-700), var(--brand-800));
  border-radius: var(--radius); padding: 1.5rem; color: #ded4f2; text-align: center;
}
.sidebar-cta-title { font-weight: 800; font-size: 1.1rem; color: #fff; margin-bottom: .5rem; }
.sidebar-cta p { font-size: .95rem; }
.sidebar-cta .btn { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-800); color: #b9abd8; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-grid { display: grid; gap: 2.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #cfc4e6; }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .96rem; overflow-wrap: anywhere; }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; color: #fff; }
.footer-brand img { width: 50px; height: 38px; }
.footer-brand span { font-weight: 800; font-size: 1.05rem; color: #fff; }
.footer-about { font-size: .96rem; line-height: 1.65; }
.site-footer .social-row a { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .16); color: #fff; }
.site-footer .social-row a:hover { background: var(--gold); color: var(--brand-800); }
.footer-bottom {
  margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .88rem; color: #9c8dc0;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.no-scroll, html:has(body.no-scroll) { overflow: hidden; }

/* ==========================================================================
   Homepage flourishes
   Texture and motion drawn from what the organisation actually is: the stars
   in their own logo, and the rock strata of the Florida Rocks! timeline.
   Everything here is transform/opacity only, and every animation is disabled
   under prefers-reduced-motion.
   ========================================================================== */

/* ---------- Starfield ----------
   Echoes the constellation above the two figures in their logo. */
.stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stars::before, .stars::after {
  content: ''; position: absolute; inset: -10%;
  background-repeat: repeat;
  animation: twinkle 7s ease-in-out infinite;
}
.stars::before {
  background-image:
    radial-gradient(1.6px 1.6px at 22% 18%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 68% 12%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(2px 2px at 84% 42%, rgba(231,174,1,.85), transparent 60%),
    radial-gradient(1.3px 1.3px at 12% 62%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1.1px 1.1px at 46% 78%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.7px 1.7px at 92% 82%, rgba(255,255,255,.7), transparent 60%);
  background-size: 460px 340px;
  opacity: .75;
}
.stars::after {
  background-image:
    radial-gradient(1.1px 1.1px at 8% 34%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 54%, rgba(231,174,1,.6), transparent 60%),
    radial-gradient(1px 1px at 34% 8%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 78% 68%, rgba(255,255,255,.55), transparent 60%);
  background-size: 300px 260px;
  animation-delay: -3.5s; animation-duration: 9s;
  opacity: .6;
}
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

/* ---------- Geologic strata ----------
   Layered sediment bands for the Florida Rocks! section. */
.strata { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.strata::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    177deg,
    rgba(255,255,255,.055) 0 7px,
    rgba(255,255,255,0)    7px 26px,
    rgba(231,174,1,.05)   26px 31px,
    rgba(255,255,255,0)   31px 62px,
    rgba(255,255,255,.035) 62px 74px,
    rgba(255,255,255,0)   74px 118px
  );
}

/* ---------- Film grain ----------
   Uses ::before deliberately: .hero::after is the gradient scrim that keeps the
   hero text readable, and a second ::after rule would overwrite its background. */
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .05; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-brand, .hero, .donate-panel { position: relative; }
.section-brand > .wrap, .donate-panel > *, .hero > .wrap { position: relative; z-index: 1; }
.hero .stars, .section-brand .stars, .section-brand .strata { z-index: 0; }

/* ---------- Scroll reveal ----------
   The hidden state is scoped to html.js, which an inline <head> script sets
   before first paint. Without JS (or if components.js fails to load) the
   content simply renders — it is never left permanently invisible. */
.js .reveal { opacity: 0; transform: translateY(22px); }
.reveal-ready { transition: opacity .75s cubic-bezier(.22,.7,.3,1), transform .75s cubic-bezier(.22,.7,.3,1); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media print { .js .reveal { opacity: 1; transform: none; } }

/* ---------- Section heading accent ---------- */
.rule { display: block; width: 0; height: 3px; border-radius: 2px; background: var(--gold); margin: 1.1rem 0 0; transition: width .8s cubic-bezier(.22,.7,.3,1) .15s; }
.center .rule { margin-inline: auto; }
.in .rule, .reveal.in .rule { width: 68px; }

/* ---------- Hero ---------- */
.hero-media img { will-change: transform; }
.hero-inner > * { opacity: 0; transform: translateY(20px); animation: riseIn .85s cubic-bezier(.22,.7,.3,1) forwards; }
.hero-inner > *:nth-child(1) { animation-delay: .05s; }
.hero-inner > *:nth-child(2) { animation-delay: .16s; }
.hero-inner > *:nth-child(3) { animation-delay: .27s; }
.hero-inner > *:nth-child(4) { animation-delay: .38s; }
@keyframes riseIn { to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  display: grid; place-items: center; gap: .45rem; z-index: 2;
  color: rgba(255,255,255,.72); font-size: .7rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.scroll-cue span { display: block; width: 1px; height: 34px; background: linear-gradient(rgba(255,255,255,.7), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(.4); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); transform-origin: top; opacity: 1; } }
@media (max-width: 900px) { .scroll-cue { display: none; } }

/* ---------- Photo exhibit cards ---------- */
.photo-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.photo-card {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); aspect-ratio: 4 / 5; color: #fff;
  background: var(--brand-800); box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.22,.7,.3,1), box-shadow .35s ease;
}
.photo-card:hover, .photo-card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: #fff; }
.photo-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .7s cubic-bezier(.22,.7,.3,1);
}
.photo-card:hover img, .photo-card:focus-visible img { transform: scale(1.07); }
.photo-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(20,6,44,.97) 4%, rgba(20,6,44,.9) 26%, rgba(20,6,44,.55) 52%, rgba(20,6,44,.12) 78%, rgba(20,6,44,.3) 100%);
  transition: opacity .35s ease;
}
.photo-card-body { position: absolute; inset: auto 0 0 0; padding: 1.5rem 1.4rem 1.6rem; }
.photo-card h3 { color: #fff; font-size: 1.28rem; margin-bottom: .45rem; }
.photo-card p { color: #cfc2e8; font-size: .93rem; line-height: 1.55; margin: 0; }
.photo-card-chip {
  position: absolute; top: 1.1rem; left: 1.1rem;
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--gold); color: #2b1c00;
  transition: transform .35s cubic-bezier(.22,.7,.3,1);
}
.photo-card:hover .photo-card-chip { transform: rotate(-8deg) scale(1.08); }
.photo-card-chip svg { width: 22px; height: 22px; }
.photo-card-more {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem;
  font-weight: 700; font-size: .88rem; color: var(--gold);
  opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease;
}
.photo-card:hover .photo-card-more, .photo-card:focus-visible .photo-card-more { opacity: 1; transform: none; }
.photo-card-more svg { width: 15px; height: 15px; }

/* ---------- Mission collage ---------- */
.collage { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1rem; align-items: start; }
.collage img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.collage-tall { grid-row: span 2; }
.collage-right { display: grid; gap: 1rem; padding-top: 2.2rem; }
.collage figure { margin: 0; overflow: hidden; border-radius: var(--radius); }
.collage figure img { transition: transform .8s cubic-bezier(.22,.7,.3,1); }
.collage figure:hover img { transform: scale(1.05); }
@media (max-width: 600px) { .collage-right { padding-top: 0; } }

/* ---------- Full-bleed photo strip ---------- */
.strip { position: relative; overflow: hidden; padding: 1.1rem 0; background: var(--brand-800); }
.strip::before, .strip::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 9%; min-width: 60px; z-index: 3; pointer-events: none;
}
.strip::before { left: 0; background: linear-gradient(90deg, var(--brand-800), transparent); }
.strip::after { right: 0; background: linear-gradient(270deg, var(--brand-800), transparent); }
/* Driven by components.js (drag / swipe / momentum / idle drift), not a CSS
   animation. touch-action: pan-y keeps vertical page scrolling native while
   horizontal moves belong to the strip. */
.strip-track {
  display: flex; gap: .8rem; width: max-content; will-change: transform;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.strip-track.is-dragging { cursor: grabbing; }
.strip-item {
  flex: none; padding: 0; border: 0; background: none; border-radius: 12px;
  cursor: inherit; -webkit-tap-highlight-color: transparent;
}
.strip-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.strip-track img {
  width: 230px; height: 173px; object-fit: cover; border-radius: 12px; display: block;
  filter: saturate(1.05); transition: transform .4s ease; pointer-events: none;
  -webkit-user-drag: none;
}
.strip-item:hover img { transform: scale(1.05); }
.strip-track.is-dragging img { transition: none; transform: none; }
@media (max-width: 700px) { .strip-track img { width: 168px; height: 126px; } }

/* Collage photos open the same gallery */
.collage button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.collage button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  .stars::before, .stars::after, .scroll-cue span { animation: none; opacity: .55; }
  .hero-inner > * { animation: none; opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
  .rule { width: 68px; transition: none; }
  .photo-card:hover img { transform: none; }
}
