/* chummarsons.com — design tokens, reset, layout, type, components, responsive rules
   Spec: docs/superpowers/specs/2026-08-30-memorial-site-redesign-design.md §3, §10
   v2 "Candlelit Cathedral" — cinematic memorial redesign */

:root {
  --color-bg: #141210;
  --color-bg-2: #1a1815;
  --color-bg-raised: #211e1a;
  --color-bg-card: #232019;
  --color-fg: #f5f0e8;
  --color-fg-muted: #b5ad9c;
  --color-accent: #c9963a;
  --color-accent-bright: #e8b95c;
  --color-accent-soft: rgba(201, 150, 58, 0.35);
  --color-accent-2: #8a5a4a;
  --color-border: #3a352c;
  --color-border-soft: rgba(201, 150, 58, 0.18);

  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ml: "Noto Sans Malayalam", var(--font-body);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4.5rem;
  --space-6: 7.5rem;

  --content-max: 1000px;
  --radius: 6px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);   /* power2.out */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);      /* expo.out */

  --shadow-deep: 0 24px 60px -18px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 60px -12px rgba(201, 150, 58, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--color-bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}
html.reduce-motion { scroll-behavior: auto; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 50% -200px, rgba(201, 150, 58, 0.07), transparent 70%),
    linear-gradient(180deg, #1b1815 0%, var(--color-bg) 340px);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* Horizontal-overflow clipping without creating scroll containers: overflow-x:
   hidden computes overflow-y:auto (a scroll container on the body) — on iOS
   that combination can produce nested-scroll oddities. `clip` clips without
   becoming scrollable; older engines fall back to hidden. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
body.no-scroll { overflow: hidden; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Author display rules (e.g. img { display:block }) would otherwise override
   the UA stylesheet's [hidden] rule — keep hidden truly hidden (candle fallback) */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--color-fg);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 4.5vw + 1rem, 4.2rem); }
h2 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1vw + 0.9rem, 1.5rem); }

p { margin: 0 0 var(--space-2); }

a { color: var(--color-accent); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover, a:focus-visible { color: var(--color-accent-bright); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--color-accent); color: #1a1815; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a4234, #3a352c);
  border-radius: 8px;
  border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-soft); }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { padding: var(--space-6) 0; position: relative; }

/* Typography helpers */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent));
  flex: none;
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: "";
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  flex: none;
}
.text-muted { color: var(--color-fg-muted); }
.center { text-align: center; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--color-bg-card), var(--color-bg-raised));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-soft);
  box-shadow: var(--shadow-deep);
}

/* Ornamental divider — thin gold rules with a small cross */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin: var(--space-4) auto;
  max-width: 420px;
}
.ornament span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-soft));
}
.ornament span:last-child { background: linear-gradient(90deg, var(--color-accent-soft), transparent); }
.ornament svg { flex: none; opacity: 0.9; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  z-index: 200;
  background: linear-gradient(90deg, #8a5a2a, var(--color-accent), var(--color-accent-bright));
  transform-origin: 0 50%;
  transform: scaleX(0);
  box-shadow: 0 0 12px rgba(201, 150, 58, 0.55);
  pointer-events: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 300;
  background: var(--color-accent);
  color: #1a1815;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; color: #1a1815; }

/* Back to top — fixed + backdrop-filter triggers a WebKit bug on iOS where the
   scrollable area grows unboundedly (endless blank scroll past the footer), so
   no blur here: an opaque background reads identically at this size. */
.to-top {
  position: fixed;
  right: 1.4rem;
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--color-accent-soft);
  background: rgba(26, 24, 21, 0.93);
  color: var(--color-accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--color-accent); background: rgba(201, 150, 58, 0.12); }
.to-top svg { width: 18px; height: 18px; }

/* [data-lang] toggle targets: default show EN, hide ML, swapped by i18n.js */
[data-ml] { display: none; }
html[lang="ml"] [data-ml] { display: revert; font-family: var(--font-ml); }
html[lang="ml"] [data-en] { display: none; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(20, 18, 16, 0.88);
  border-bottom-color: var(--color-border-soft);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  max-width: var(--content-max);
  margin: 0 auto;
  transition: padding 0.4s var(--ease);
}
.site-header.is-scrolled .nav { padding-top: 0.7rem; padding-bottom: 0.7rem; }

.nav-brand {
  font-family: var(--font-display);
  color: var(--color-fg);
  font-size: 1.12rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.02em;
}
.nav-brand:hover { color: var(--color-accent-bright); text-decoration: none; }
.nav-brand .brand-flame {
  width: 9px; height: 9px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 35% 35%, #ffe9b0, var(--color-accent-bright) 45%, #b57018 90%);
  box-shadow: 0 0 10px 2px rgba(232, 168, 74, 0.55);
  animation: brand-flicker 2.6s ease-in-out infinite;
}
@keyframes brand-flicker {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(232, 168, 74, 0.4); }
  40% { box-shadow: 0 0 14px 4px rgba(232, 168, 74, 0.65); }
  70% { box-shadow: 0 0 6px 1px rgba(232, 168, 74, 0.35); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  color: var(--color-fg-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-bright));
  transition: right 0.35s var(--ease-expo);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-accent-bright); text-decoration: none; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-fg);
  border-radius: var(--radius);
  padding: 0 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--color-fg);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 719px) {
  /* backdrop-filter on sticky/fixed chrome is implicated in an iOS Safari bug
     where the page scroll area grows without bound (blank scroll below the
     footer) — use an opaque tint on small screens, keep the blur on desktop */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(20, 18, 16, 0.92);
  }
  .site-header.is-scrolled { background: rgba(20, 18, 16, 0.96); }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    background:
      radial-gradient(900px 500px at 50% 0%, rgba(201, 150, 58, 0.1), transparent 65%),
      rgba(20, 18, 16, 0.98);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; }
  .nav-links a { font-size: 1.25rem; letter-spacing: 0.18em; }
  .nav-links li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  }
  .nav-links.is-open li { opacity: 1; transform: none; }
  .nav-links.is-open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.is-open li:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.is-open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.is-open li:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.is-open li:nth-child(5) { transition-delay: 0.25s; }
  .nav-links.is-open li:nth-child(6) { transition-delay: 0.3s; }
}

/* Responsive images: no fixed pixel widths anywhere (spec §10) */
figure { margin: 0; }
figcaption { font-size: 0.85rem; color: var(--color-fg-muted); margin-top: var(--space-1); }

/* Cinematic hero (home) */
.hero {
  min-height: 100svh;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 46% at 50% 34%, rgba(201, 150, 58, 0.13), transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(138, 90, 74, 0.1), transparent 65%);
  pointer-events: none;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 44%, rgba(10, 9, 7, 0.66) 100%);
}
.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-scene canvas { display: block; width: 100% !important; height: 100% !important; }
.candle-fallback {
  position: absolute;
  left: 50%; top: 34%;
  transform: translate(-50%, -50%);
  width: min(300px, 62vw);
  opacity: 0.9;
  filter: drop-shadow(0 0 40px rgba(201, 150, 58, 0.35));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 16vh;
  padding-top: 44vh;
  max-width: 880px;
  margin: 0 auto;
}
/* Dark scrim so the title stays readable over the candle glow */
.hero-content::before {
  content: "";
  position: absolute;
  inset: -14vh -14vw -12vh;
  z-index: -1;
  background: radial-gradient(ellipse 64% 58% at 50% 52%,
    rgba(10, 9, 7, 0.68), rgba(10, 9, 7, 0.3) 55%, transparent 78%);
  pointer-events: none;
}
.hero-title .line-mask > span { filter: drop-shadow(0 3px 16px rgba(10, 9, 7, 0.85)); }
.hero-verse, .hero-names, .hero-content .eyebrow {
  text-shadow: 0 1px 12px rgba(10, 9, 7, 0.9), 0 0 36px rgba(10, 9, 7, 0.55);
}
.hero-title {
  font-size: clamp(2.9rem, 7vw + 0.5rem, 5.6rem);
  font-weight: 480;
  letter-spacing: 0.015em;
  line-height: 1.04;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}
.hero-title .gold {
  font-style: italic;
  background: linear-gradient(100deg, #a87c2e, var(--color-accent-bright) 55%, #f4d488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}
.hero-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw + 0.4rem, 1.3rem);
  color: var(--color-fg-muted);
  max-width: 560px;
  margin: 0 auto var(--space-3);
}
.hero-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.9rem 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}
.hero-names em {
  font-style: normal;
  color: var(--color-accent);
  letter-spacing: 0.1em;
}
.hero-names .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  align-self: center;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-fg-muted);
  font-size: 0.65rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(10, 9, 7, 0.85);
}
.scroll-cue:hover { color: var(--color-accent); text-decoration: none; }
.scroll-cue .mouse {
  width: 22px; height: 36px;
  border: 1.5px solid var(--color-accent-soft);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-cue .mouse span {
  width: 3px; height: 7px;
  border-radius: 3px;
  background: var(--color-accent);
  animation: cue-drop 1.8s var(--ease) infinite;
}
@keyframes cue-drop {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Sub-page hero */
.page-hero {
  padding: calc(var(--space-6) + 1rem) 0 var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 70% at 50% 0%, rgba(201, 150, 58, 0.1), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { margin-bottom: var(--space-2); }
.page-hero .lead {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-fg-muted);
  font-size: clamp(1.05rem, 1.2vw + 0.6rem, 1.35rem);
  max-width: 640px;
  margin: 0 auto;
}

/* Memorial panels (home) */
.memorial { padding: var(--space-5) 0; }
.memorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.memorial-grid.reverse .portrait-col,
.memorial-grid.reverse .memorial-body { order: 0; }
@media (min-width: 720px) {
  .memorial-grid.reverse .portrait-col { order: 2; }
  .memorial-grid.reverse .memorial-body { order: 1; }
}
/* Mobile: the two-column memorial panel would leave each column ~160px wide —
   stack portrait above text, keep the portrait an elegant centered card */
@media (max-width: 719px) {
  section { padding: var(--space-5) 0; }
  .memorial-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .memorial-grid.reverse .portrait-col { order: 0; }
  .memorial-grid.reverse .memorial-body { order: 1; }
  .portrait-col { width: 100%; max-width: 340px; margin: 0 auto; }
  .memorial-body .memorial-text { max-width: none; }
}

.portrait-col { position: relative; }
.portrait-frame {
  position: relative;
  background: linear-gradient(180deg, var(--color-bg-card), var(--color-bg-raised));
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-deep);
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--color-border-soft);
  border-radius: calc(var(--radius-lg) - 5px);
  pointer-events: none;
  z-index: 1;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 46px rgba(201, 150, 58, 0.09);
  pointer-events: none;
}
.portrait-frame img {
  border-radius: calc(var(--radius-lg) - 7px);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.portrait-dates {
  text-align: center;
  font-family: var(--font-display);
  color: var(--color-accent);
  letter-spacing: 0.22em;
  font-size: 0.95rem;
  padding: 0.8rem 0 0.25rem;
  margin: 0;
}

.memorial-body h2 { font-size: clamp(1.9rem, 2.6vw + 0.8rem, 2.9rem); }
.memorial-body .memorial-text {
  color: var(--color-fg-muted);
  max-width: 46ch;
  font-size: 1.02rem;
}

.memory-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.9rem;
  margin-top: var(--space-3);
}
.memory-strip figure {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.memory-strip figure:hover {
  transform: translateY(-5px);
  border-color: var(--color-border-soft);
  box-shadow: var(--shadow-deep);
}
.memory-strip img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.memory-strip figcaption {
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

/* Click-to-zoom photos (GLightbox on home): the <a class="glightbox"> wraps
   thumbnail images; without the lib it degrades to a plain image link. */
a.glightbox { display: block; cursor: zoom-in; }
.memory-strip a.glightbox img,
.feature-details a.glightbox img {
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.memory-strip a.glightbox:hover img,
.memory-strip a.glightbox:focus-visible img,
.feature-details a.glightbox:hover img,
.feature-details a.glightbox:focus-visible img {
  transform: scale(1.05);
  filter: brightness(1.08);
}
.feature-frame a.glightbox img,
.portrait-frame a.glightbox img { transition: filter 0.45s var(--ease); }
.feature-frame a.glightbox:hover img,
.feature-frame a.glightbox:focus-visible img,
.portrait-frame a.glightbox:hover img,
.portrait-frame a.glightbox:focus-visible img { filter: brightness(1.06); }

/* Full-bleed feature sections (church / tomb) */
.feature {
  padding: var(--space-6) 0;
  position: relative;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(201, 150, 58, 0.06), transparent 70%);
  pointer-events: none;
}
.feature .container { position: relative; }
.feature-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-deep);
  margin-top: var(--space-3);
}
.feature-frame img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.feature-frame figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.5rem 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(12, 10, 8, 0.85));
  font-size: 0.85rem;
  color: var(--color-fg);
  margin: 0;
}
.feature-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: var(--space-3);
}
.feature-details figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}
.feature-details figure:hover { transform: translateY(-4px); border-color: var(--color-border-soft); }
.feature-details img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.feature-note {
  text-align: center;
  color: var(--color-fg-muted);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: var(--space-3);
}

/* Remembrance 2026 banner (home) — a text-heavy remembrance poster, so the
   artwork is never cropped or scaled inside its frame. The img box is
   hard-pinned to the poster's own 950/672 ratio — deliberately WITHOUT the
   `auto` keyword, which would let the box follow whatever file is loaded and
   let a stale cached copy of the old wider export stretch the frame. Combined
   with object-fit: contain, cropping is impossible for any file at any width:
   a matching file fills the box exactly, a mismatched one letterboxes into the
   dark frame background. The caption sits below the artwork instead of
   overlaying its bottom band. Motion: scroll-linked brightness settle +
   candlelit glow (reveal.js [data-scroll-cinema]) + frame parallax.
   index.html busts caches with ?v= params on the CSS/JS and the image URL —
   both were replaced in place across rounds, so bare URLs kept serving stale
   copies (this rule itself was invisible to browsers holding round-1 CSS). */
.remembrance-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 950 / 672;
  object-fit: contain;
  background: #0d0b09;
  will-change: filter;
}
/* filter is rewritten every scroll frame — a hover transition would lag behind it */
.remembrance-frame a.glightbox img { transition: none; }
.remembrance-frame figcaption {
  position: static;
  background: none;
  padding: 0.85rem 0.25rem 0;
  text-align: center;
  color: var(--color-fg-muted);
}
.remembrance-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(201, 150, 58, 0.18);
  opacity: var(--cinema, 1);
}

/* Closing verse */
.closing {
  text-align: center;
  padding: var(--space-6) 0;
  position: relative;
  overflow: hidden;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 45% 60% at 50% 55%, rgba(201, 150, 58, 0.09), transparent 70%);
  pointer-events: none;
}
.closing blockquote {
  margin: 0 auto;
  max-width: 700px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 1.8vw + 0.6rem, 1.8rem);
  line-height: 1.5;
  color: var(--color-fg);
}
.closing cite {
  display: block;
  margin-top: var(--space-2);
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* About — story + family tree */
.story { max-width: 720px; margin: 0 auto; }
.story p { color: var(--color-fg-muted); font-size: 1.03rem; }
.story p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding: 0.08em 0.14em 0 0;
  color: var(--color-accent);
}
.story .gratitude {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-fg);
  font-size: 1.15rem;
  border-left: 2px solid var(--color-accent-soft);
  padding-left: 1.2rem;
}

.tree-section h2 { text-align: center; }
.tree-root {
  max-width: 640px;
  margin: var(--space-3) auto var(--space-4);
  display: block;
  width: 100%;
  height: 26px;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.4rem;
}
.branch-card {
  position: relative;
  background: linear-gradient(180deg, var(--color-bg-card), var(--color-bg-raised));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.branch-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-soft);
  box-shadow: var(--shadow-deep);
}
.branch-card .finger-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.9rem;
}
.branch-card .finger-tag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
}
.branch-card h3 { margin-bottom: var(--space-2); }
.branch-couple {
  display: flex;
  gap: 1rem;
  margin-bottom: var(--space-2);
}
.branch-couple figure {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
}
.branch-couple img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.branch-couple figcaption,
.branch-children figcaption {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 0.3rem;
  color: var(--color-fg-muted);
}
.branch-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 0.7rem;
  border-top: 1px dashed var(--color-border);
  padding-top: var(--space-2);
}
.branch-children figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
}
.branch-children img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }

/* Messages — tribute letters */
.letter-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  position: relative;
  overflow: hidden;
}
.letter-card::before {
  content: "\201C";
  position: absolute;
  top: -1.4rem;
  right: 0.6rem;
  font-family: var(--font-display);
  font-size: 9rem;
  line-height: 1;
  color: rgba(201, 150, 58, 0.1);
  pointer-events: none;
}
.letter-card figure { width: 120px; }
.letter-card figure img {
  border-radius: 50%;
  border: 2px solid var(--color-border-soft);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.letter-card blockquote {
  margin: 0;
  white-space: pre-line;
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--color-fg);
}
.letter-card cite {
  display: block;
  margin-top: var(--space-2);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--color-accent);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
}
@media (min-width: 640px) {
  .letter-card { grid-template-columns: 120px 1fr; }
}

/* Gallery */
.gallery-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: var(--space-3) 0 var(--space-4);
  justify-content: center;
}
.gallery-tabs button {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-fg-muted);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.gallery-tabs button:hover { border-color: var(--color-accent-soft); color: var(--color-fg); }
.gallery-tabs button[aria-selected="true"] {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
  background: rgba(201, 150, 58, 0.1);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}
.gallery-grid a {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
}
.gallery-grid img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}
.gallery-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 10, 8, 0.75));
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.gallery-grid a:hover img, .gallery-grid a:focus-visible img { transform: scale(1.06); }
.gallery-grid a:hover::after, .gallery-grid a:focus-visible::after { opacity: 1; }
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-note {
  margin-top: var(--space-2);
  color: var(--color-fg-muted);
  font-size: 0.85rem;
  text-align: center;
}
.gallery-section { padding-top: 0; }
.contact-avatar {
  width: 88px;
  margin-bottom: var(--space-2);
}
.contact-avatar img {
  border-radius: 50%;
  border: 2px solid var(--color-border-soft);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Updates — timeline */
.timeline {
  position: relative;
  max-width: 720px;
  margin: var(--space-4) auto 0;
  padding-left: 2.2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--color-accent), rgba(201, 150, 58, 0.08));
}
.update-entry {
  position: relative;
  margin-bottom: var(--space-3);
}
.update-entry::before {
  content: "";
  position: absolute;
  left: calc(-2.2rem + 2px);
  top: 1.9rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 4px rgba(201, 150, 58, 0.12);
}
.update-entry .update-date {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* Contacts */
.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}
.contact-card dl { margin: 0; }
.contact-card dt {
  color: var(--color-accent);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.contact-card dt svg { width: 15px; height: 15px; flex: none; opacity: 0.9; }
.contact-card dd { margin: 0.3rem 0 0; font-size: 1.05rem; line-height: 1.55; }
.map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  filter: grayscale(0.4) contrast(1.05) brightness(0.9);
}
@media (min-width: 700px) {
  .contact-info { grid-template-columns: 1fr 1fr; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-5);
  background: linear-gradient(180deg, transparent, rgba(201, 150, 58, 0.04));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3);
}
.footer-brand {
  font-family: var(--font-display);
  color: var(--color-fg);
  font-size: 1.15rem;
  margin-bottom: var(--space-1);
}
.footer-verse {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-fg-muted);
  font-size: 0.92rem;
}
.footer-head {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid li a {
  color: var(--color-fg-muted);
  font-size: 0.92rem;
}
.footer-grid li a:hover { color: var(--color-accent-bright); }
.footer-note { color: var(--color-fg-muted); font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  color: var(--color-fg-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.footer-bottom p { margin: 0; }
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
