/* ============================================================
   StillThere — A Private Family Archive
   Masterpiece Design System & Archival Theme
   ============================================================ */

:root {
  /* Surface & Canvas */
  --cream:            #fbf9f5;
  --cream-soft:       #f5f0e6;
  --surface:          #ffffff;
  --elevated:         #fcfbf8;
  --divider:          #e6dfd5;
  --divider-subtle:   #f0ebe2;
  --glass-bg:         rgba(255, 255, 255, 0.82);
  --glass-border:     rgba(230, 223, 213, 0.7);

  /* Ink & Typography */
  --ink:              #1f1c19;
  --ink-secondary:    #38332e;
  --muted:            #6b635b;
  --disabled:         #b8b0a5;

  /* Archival Heritage Accents */
  --forest:           #2e4934;
  --forest-dark:      #213626;
  --forest-soft:      #416349;
  --forest-tint:      rgba(46, 73, 52, 0.08);
  
  --gold:             #b08638;
  --gold-dark:        #8e6924;
  --gold-soft:        #cf9f4c;
  --gold-tint:        rgba(176, 134, 56, 0.10);
  
  --terracotta:       #b85d38;
  --terracotta-dark:  #944525;
  --terracotta-soft:  #d1724d;
  --terracotta-tint:  rgba(184, 93, 56, 0.09);

  --blue:             #53738a;
  --blue-tint:        rgba(83, 115, 138, 0.09);
  
  --lavender:         #8377a8;
  --lavender-tint:    rgba(131, 119, 168, 0.10);

  /* Contrast-audited text variants on cream (WCAG AA) */
  --gold-text:        #85611e;
  --terracotta-text:  #9e4926;

  /* Typography */
  --serif:            "Newsreader", Georgia, "Times New Roman", serif;
  --sans:             "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw:             780px;
  --maxw-wide:        1220px;

  /* Shadows */
  --shadow-sm:        0 2px 6px rgba(31, 28, 25, 0.04);
  --shadow-md:        0 8px 24px -4px rgba(31, 28, 25, 0.08), 0 2px 6px -1px rgba(31, 28, 25, 0.04);
  --shadow-lg:        0 20px 48px -10px rgba(31, 28, 25, 0.12), 0 4px 12px -2px rgba(31, 28, 25, 0.06);
  --shadow-phone:     0 32px 64px -16px rgba(33, 54, 38, 0.22), 0 12px 24px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(46, 73, 52, 0.08);

  /* Motion & Easings */
  --ease-emph:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:      cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Universal Scrollbar Suppression & Clean Reset
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Hide scrollbars universally for horizontal scrollers while preserving scrolling */
.no-scrollbar,
.walkthrough,
.walkthrough-track,
.screen-pills-wrap,
.person-chips,
.person-recent,
.reactions-track {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.no-scrollbar::-webkit-scrollbar,
.walkthrough::-webkit-scrollbar,
.walkthrough-track::-webkit-scrollbar,
.screen-pills-wrap::-webkit-scrollbar,
.person-chips::-webkit-scrollbar,
.person-recent::-webkit-scrollbar,
.reactions-track::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Base Document */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--terracotta), var(--forest));
  z-index: 1000;
  transition: width 120ms var(--ease-smooth);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 24px; }

img, svg { display: block; max-width: 100%; }
a { color: var(--terracotta); text-decoration: none; transition: color 180ms var(--ease-smooth); }
a:hover { color: var(--forest); }

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 240ms var(--ease-smooth), background-color 240ms var(--ease-smooth);
}
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(31, 28, 25, 0.06);
}

.site-header .wrap,
.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: transform 200ms var(--ease-emph);
}
.brand:hover { transform: scale(1.02); }
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(46, 73, 52, 0.18);
}
.brand span {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: -0.015em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 4px;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: var(--forest);
  border-radius: 2px;
  transition: transform 200ms var(--ease-emph);
}
.nav a:hover {
  color: var(--forest);
}
.nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-cta-btn {
  background: var(--forest);
  color: #fff !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(46, 73, 52, 0.2);
  transition: background 200ms var(--ease-emph), transform 200ms var(--ease-emph) !important;
}
.nav-cta-btn:hover {
  background: var(--forest-dark) !important;
  transform: translateY(-1px);
}
.nav-cta-btn::after { display: none !important; }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.menu-toggle svg { width: 20px; height: 20px; }

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(31, 28, 25, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease-smooth);
}
.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: var(--cream);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 300ms var(--ease-emph);
}
.mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}
.mobile-drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}
.mobile-drawer a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  padding: 8px 0;
  border-bottom: 1px solid var(--divider-subtle);
}
.mobile-drawer a:hover { color: var(--forest); }

/* ============================================================
   Typography Primitives & Legal / Generic Pages
   ============================================================ */
main { padding: 56px 0 80px; }
.landing main { padding: 0; }

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 42px;
  line-height: 1.14;
  letter-spacing: -0.018em;
  margin: 0 0 12px;
  color: var(--ink);
}
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
  margin: 44px 0 14px;
  color: var(--forest);
}
h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--ink);
}
p, li { color: var(--ink-secondary); }
.updated { color: var(--muted); font-size: 15px; margin: 0 0 10px; }
.lede { font-size: 19px; color: var(--muted); line-height: 1.55; margin: 10px 0 0; }
ul, ol { padding-left: 22px; }
li { margin: 8px 0; }
hr { border: none; border-top: 1px solid var(--divider); margin: 48px 0; }

.callout {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 4px solid var(--terracotta);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}
.callout.forest { border-left-color: var(--forest); }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li {
  position: relative;
  padding: 6px 0 6px 48px;
  margin: 14px 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 3px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(46, 73, 52, 0.24);
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: border-color 220ms var(--ease-smooth), transform 220ms var(--ease-smooth), box-shadow 220ms var(--ease-smooth);
}
.card:hover { border-color: var(--forest); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin: 0 0 6px; color: var(--forest); font-family: var(--serif); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--forest);
  color: #ffffff !important;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--forest);
  box-shadow: 0 3px 10px rgba(46, 73, 52, 0.22);
  cursor: pointer;
  transition: transform 200ms var(--ease-emph), background-color 200ms var(--ease-emph), box-shadow 200ms var(--ease-emph);
}
.btn:hover {
  background: var(--forest-dark);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(46, 73, 52, 0.28);
}
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink) !important;
  border-color: var(--divider);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: #ffffff;
  border-color: var(--forest);
  color: var(--forest) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-terracotta {
  background: var(--terracotta);
  border-color: var(--terracotta);
  box-shadow: 0 3px 10px rgba(184, 93, 56, 0.24);
}
.btn-terracotta:hover {
  background: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
}

/* App Store & Google Play Badges */
.store-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1c1917;
  color: #ffffff !important;
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.18);
  transition: transform 200ms var(--ease-emph), background-color 200ms var(--ease-emph), box-shadow 200ms var(--ease-emph);
  text-align: left;
}
.btn-store:hover {
  background: var(--forest);
  border-color: var(--forest);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(46, 73, 52, 0.28);
  color: #ffffff !important;
}
.btn-store:active { transform: translateY(0); }
.btn-store svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}
.btn-store-text {
  display: flex;
  flex-direction: column;
}
.btn-store-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.82;
  line-height: 1.1;
  font-family: var(--sans);
}
.btn-store-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  font-family: var(--sans);
  color: #ffffff;
}

.walkthrough-store-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   LANDING PAGE MASTERPIECE STYLING
   ============================================================ */

/* Atmospheric Paper Grain & Lighting */
.landing body,
body.landing {
  background-color: var(--cream);
  background-image:
    radial-gradient(1200px 700px at 85% -5%, rgba(176, 134, 56, 0.08), transparent 70%),
    radial-gradient(1000px 600px at -5% 105%, rgba(46, 73, 52, 0.08), transparent 65%),
    radial-gradient(900px 500px at 50% 45%, rgba(131, 119, 168, 0.04), transparent 60%),
    url("noise.svg");
  background-attachment: fixed, fixed, fixed, fixed;
}

/* Eyebrow / Kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 108px 0 88px;
  text-align: center;
  overflow: hidden;
}

/* Radiant Ambient Light Orbs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.45;
  animation: hero-orb-float 14s ease-in-out infinite alternate;
}
.hero::before {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(131, 119, 168, 0.35) 0%, rgba(131, 119, 168, 0) 70%);
  top: -100px;
  left: -140px;
}
.hero::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(176, 134, 56, 0.3) 0%, rgba(184, 93, 56, 0) 70%);
  bottom: -100px;
  right: -100px;
  animation-duration: 18s;
  animation-delay: -5s;
}

@keyframes hero-orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 25px) scale(0.95); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.hero-mark {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-mark::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 30px;
  background: radial-gradient(circle, rgba(176, 134, 56, 0.25), transparent 70%);
  z-index: -1;
  animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

.hero-mark img {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  display: block;
  box-shadow: 0 12px 32px rgba(46, 73, 52, 0.22);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 6.8vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0 0 20px;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--forest);
  font-weight: 400;
}
.hero h1 .accent {
  color: var(--terracotta-text);
  font-style: italic;
  font-weight: 400;
}

.hero-lede {
  font-family: var(--serif);
  font-size: clamp(19px, 2.3vw, 23px);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 auto 36px;
  max-width: 680px;
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.hero-meta {
  margin-top: 48px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid var(--divider-subtle);
  backdrop-filter: blur(8px);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* ============================================================
   Editorial Pull-quote Section
   ============================================================ */
.pullquote {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  position: relative;
  overflow: hidden;
}
.pullquote::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(176, 134, 56, 0.05), transparent 70%);
  pointer-events: none;
}
.pullquote-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.pullquote-mark {
  font-family: var(--serif);
  font-size: 130px;
  line-height: 0.55;
  color: var(--gold);
  opacity: 0.35;
  margin-bottom: 20px;
  display: block;
}
.pullquote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(25px, 3.6vw, 40px);
  line-height: 1.36;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-weight: 400;
  font-style: italic;
}
.pullquote cite {
  display: block;
  margin-top: 32px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.pullquote cite strong { color: var(--forest); font-weight: 600; }

/* ============================================================
   Section Layouts
   ============================================================ */
.section {
  padding: 104px 0;
  position: relative;
}
.section.tight { padding: 72px 0; }
.section.cream { background: var(--cream); }
.section.surface { background: var(--surface); }

.section-head {
  max-width: 760px;
  margin: 0 auto 60px;
  text-align: center;
}
.section-head .kicker { margin-bottom: 18px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 16px;
}
.section-head h2 em { font-style: italic; color: var(--forest); font-weight: 400; }
.section-head p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   Interactive Person Archive Section ("Margaret Ann Johnson")
   ============================================================ */
.person-stage {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
.person-copy h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 14px 0 20px;
}
.person-copy p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.58;
  color: var(--muted);
  margin: 0 0 16px;
}
.person-copy ul {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.person-copy li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  margin: 14px 0;
  padding: 0;
}
.person-copy li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 134, 56, 0.2);
}

/* Masterpiece Person Card */
.person-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transition: transform 380ms var(--ease-emph), box-shadow 380ms var(--ease-emph);
}
.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 56px -12px rgba(31, 28, 25, 0.16);
}

.person-cover {
  position: relative;
  aspect-ratio: 4 / 3.8;
  background: linear-gradient(180deg, #dfd0b6 0%, #ba9f7b 55%, #8c6e4e 100%);
  overflow: hidden;
}
.person-cover .seal {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--forest);
  border: 1px solid rgba(46, 73, 52, 0.2);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
}

.person-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  transition: transform 600ms var(--ease-smooth);
}
.person-card:hover .person-portrait {
  transform: scale(1.03);
}

.person-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(31, 28, 25, 0.2) 0%, transparent 20%),
    linear-gradient(0deg, rgba(31, 28, 25, 0.35) 0%, transparent 40%);
  z-index: 1;
}

/* Audio Story Player Overlay inside Person Cover */
.cover-audio-player {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.audio-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--terracotta);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 93, 56, 0.35);
  transition: transform 200ms var(--ease-emph), background 200ms var(--ease-emph);
}
.audio-play-btn:hover {
  transform: scale(1.08);
  background: var(--terracotta-dark);
}
.audio-play-btn svg { width: 16px; height: 16px; fill: currentColor; }

.audio-info { flex: 1; min-width: 0; }
.audio-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.audio-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}
.audio-waves span {
  width: 3px;
  background: var(--terracotta);
  border-radius: 2px;
  height: 4px;
  transition: height 150ms ease;
}
.is-playing .audio-waves span:nth-child(1) { animation: wave 0.8s ease-in-out infinite alternate; }
.is-playing .audio-waves span:nth-child(2) { animation: wave 0.6s ease-in-out infinite alternate 0.2s; }
.is-playing .audio-waves span:nth-child(3) { animation: wave 0.9s ease-in-out infinite alternate 0.1s; }
.is-playing .audio-waves span:nth-child(4) { animation: wave 0.7s ease-in-out infinite alternate 0.3s; }
.is-playing .audio-waves span:nth-child(5) { animation: wave 0.85s ease-in-out infinite alternate 0.15s; }
@keyframes wave {
  0% { height: 3px; }
  100% { height: 14px; }
}

.audio-time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.person-meta { padding: 26px 28px 28px; }
.person-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.person-dates {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 4px 0 16px;
}

/* Interactive Person Archive Tabs */
.person-tab-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--divider-subtle);
  margin-bottom: 18px;
}
.person-tab-btn {
  background: var(--cream);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 180ms var(--ease-smooth);
}
.person-tab-btn:hover {
  background: var(--surface);
  color: var(--forest);
  border-color: var(--forest);
}
.person-tab-btn.is-active {
  background: var(--forest-tint);
  color: var(--forest);
  border-color: var(--forest);
  font-weight: 600;
}

/* Dynamic Tab Content Box */
.person-tab-content {
  min-height: 90px;
  margin-bottom: 20px;
}
.person-tab-pane {
  display: none;
  animation: tab-fade 240ms var(--ease-smooth);
}
.person-tab-pane.is-active { display: block; }
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.person-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  border-left: 2.5px solid var(--gold);
  padding: 2px 0 2px 14px;
  margin: 0;
}
.person-quote .quote-by {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.tab-pane-text {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin: 0;
}

/* Recently Added Memories Thumbnails */
.person-recent-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.person-recent {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.recent-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, #d9c8a8 0%, #b89c75 100%);
  border: 1px solid var(--divider);
  text-decoration: none;
  cursor: pointer;
  transition: transform 220ms var(--ease-emph), border-color 220ms var(--ease-emph), box-shadow 220ms var(--ease-emph);
}
.recent-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--forest);
  box-shadow: var(--shadow-sm);
}
.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recent-glyph {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.recent-voice {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.4), transparent 60%),
    linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
}
.recent-voice .recent-glyph {
  position: static;
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.person-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
}
.person-stats div { text-align: center; }
.person-stats strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.1;
}
.person-stats span {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ============================================================
/* ============================================================
   FIVE KINDS OF MEMORY — REVERSE DIRECTION INTERACTIVE CAROUSEL
   ============================================================ */
.features-section {
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.features-walkthrough {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 0 16px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  user-select: none;
  cursor: grab;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
}
.features-walkthrough::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.features-walkthrough.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.features-track {
  display: flex;
  width: max-content;
  align-items: stretch;
  padding: 0 16px;
}

/* REVERSE DIRECTION ANIMATION (Left-to-Right drift) */
.features-walkthrough.is-marquee .features-track {
  animation: features-marquee-reverse 30s linear infinite;
  will-change: transform;
}
.features-walkthrough.is-marquee:hover .features-track,
.features-walkthrough.is-marquee:focus-within .features-track {
  animation-play-state: paused;
}

@keyframes features-marquee-reverse {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

.feature-slide {
  flex: 0 0 auto;
  width: 290px;
  margin: 0 22px 0 0;
  scroll-snap-align: center;
  background: var(--cream);
  border: 1px solid var(--divider);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 300ms var(--ease-emph), border-color 300ms var(--ease-emph), box-shadow 300ms var(--ease-emph);
}
.feature-slide:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--forest);
  box-shadow: var(--shadow-md);
}

.feature-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  width: fit-content;
}
.feature-slide-badge.forest { background: var(--forest-tint); color: var(--forest); }
.feature-slide-badge.gold { background: var(--gold-tint); color: var(--gold-text); }
.feature-slide-badge.terracotta { background: var(--terracotta-tint); color: var(--terracotta-text); }
.feature-slide-badge.blue { background: var(--blue-tint); color: var(--blue); }
.feature-slide-badge.lavender { background: var(--lavender-tint); color: #6a5e98; }

.feature-slide-media {
  position: relative;
  aspect-ratio: 1242 / 2100;
  background: var(--surface);
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
}
.feature-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 400ms var(--ease-smooth);
}
.feature-slide:hover .feature-slide-media img {
  transform: scale(1.04);
}

.feature-slide-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--surface);
}
.feature-slide-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 8px;
}
.feature-slide-body p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   MASTERPIECE APP WALKTHROUGH & INTERACTIVE CAROUSEL
   ============================================================ */
.walkthrough-section {
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

/* Carousel Control Toolbar */
.carousel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

/* Screen Selector Pills */
.screen-pills-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  max-width: 100%;
}
.screen-pill {
  background: var(--cream);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 200ms var(--ease-smooth);
}
.screen-pill:hover {
  background: #ffffff;
  color: var(--forest);
  border-color: var(--forest);
}
.screen-pill.is-active {
  background: var(--forest);
  color: #ffffff;
  border-color: var(--forest);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(46, 73, 52, 0.25);
}
.screen-pill-num {
  font-family: var(--serif);
  font-style: italic;
  opacity: 0.85;
}

/* Carousel Navigation Arrows & Mode Toggle */
.carousel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.carousel-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--divider);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--ease-emph);
  box-shadow: var(--shadow-sm);
}
.carousel-nav-btn:hover {
  background: var(--forest);
  color: #ffffff;
  border-color: var(--forest);
  transform: scale(1.06);
}
.carousel-nav-btn svg { width: 18px; height: 18px; }

.mode-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--cream);
  border: 1px solid var(--divider);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 200ms var(--ease-smooth);
}
.mode-toggle-btn:hover { color: var(--forest); border-color: var(--forest); }
.mode-toggle-btn.is-active {
  background: var(--gold-tint);
  color: var(--gold-text);
  border-color: var(--gold);
  font-weight: 600;
}
.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Walkthrough Container */
.walkthrough {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px 0 16px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  user-select: none;
  cursor: grab;
  /* Cinematic edge fade */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
}
.walkthrough.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.walkthrough-track {
  display: flex;
  width: max-content;
  align-items: center;
  padding: 0 16px;
}

/* When in auto-marquee mode */
.walkthrough.is-marquee .walkthrough-track {
  animation: walkthrough-marquee 32s linear infinite;
  will-change: transform;
}
.walkthrough.is-marquee:hover .walkthrough-track,
.walkthrough.is-marquee:focus-within .walkthrough-track {
  animation-play-state: paused;
}

@keyframes walkthrough-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* High-Fidelity Phone Frames */
.walkthrough-shot {
  flex: 0 0 auto;
  width: 250px;
  margin: 0 20px 0 0;
  scroll-snap-align: center;
  transition: transform 340ms var(--ease-emph), opacity 340ms var(--ease-emph);
  position: relative;
}

.phone-mockup {
  position: relative;
  border-radius: 40px;
  padding: 8px;
  background: linear-gradient(145deg, #3c3834 0%, #1f1c19 100%);
  box-shadow: var(--shadow-phone);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transition: transform 300ms var(--ease-emph), box-shadow 300ms var(--ease-emph);
}

/* Subtle Titanium Sheen & Screen Glare */
.phone-mockup::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 55%
  );
  pointer-events: none;
  z-index: 5;
}

.phone-screen {
  border-radius: 32px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
}

.walkthrough-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.walkthrough-shot:hover .phone-mockup {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 38px 72px -16px rgba(33, 54, 38, 0.3), 0 16px 32px -8px rgba(0, 0, 0, 0.16);
}

.walkthrough-shot figcaption {
  margin-top: 16px;
  padding: 0 6px;
  text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  font-style: italic;
}
.walkthrough-shot figcaption em {
  font-style: italic;
  color: var(--gold-text);
  font-weight: 600;
}

.walkthrough-hint {
  margin-top: 24px;
  text-align: center;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ============================================================
   Interactive Tribute Reactions Section
   ============================================================ */
.reactions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.reaction {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  position: relative;
  user-select: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 220ms var(--ease-emph), transform 220ms var(--ease-emph), box-shadow 220ms var(--ease-emph);
}
.reaction:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.reaction:active {
  transform: scale(0.96);
}
.reaction .glyph {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
  transition: transform 220ms var(--ease-spring);
}
.reaction:hover .glyph {
  transform: scale(1.2) rotate(-6deg);
}
.reaction strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.reaction span {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  display: block;
}
.reaction-count {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  background: var(--forest-tint);
  padding: 3px 10px;
  border-radius: 12px;
}

/* Floating Particle Celebration */
.tribute-particle {
  position: fixed;
  pointer-events: none;
  font-size: 26px;
  z-index: 10000;
  animation: float-and-fade 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes float-and-fade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 0.9; transform: translate(-50%, -120px) scale(1.4); }
  100% { opacity: 0; transform: translate(-50%, -180px) scale(1); }
}

/* ============================================================
   How It Works Section
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: step;
  margin-top: 36px;
}
.how-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 36px 28px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease-smooth), border-color 220ms var(--ease-smooth);
}
.how-step:hover {
  transform: translateY(-3px);
  border-color: var(--forest);
}
.how-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--serif);
  font-size: 40px;
  color: var(--divider);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}
.how-step h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  color: var(--ink);
  margin: 0 0 10px;
}
.how-step p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   Privacy & Trust Section
   ============================================================ */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 44px;
}
.trust-item {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 4px solid var(--forest);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-smooth), box-shadow 200ms var(--ease-smooth);
}
.trust-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.trust-item.terracotta { border-left-color: var(--terracotta); }
.trust-item.gold { border-left-color: var(--gold); }
.trust-item.blue { border-left-color: var(--blue); }
.trust-item h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
}
.trust-item p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   Final Call To Action
   ============================================================ */
.final-cta {
  background:
    radial-gradient(900px 450px at 80% 20%, rgba(176, 134, 56, 0.12), transparent 65%),
    radial-gradient(800px 450px at 10% 80%, rgba(46, 73, 52, 0.14), transparent 65%),
    var(--surface);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 108px 0;
  text-align: center;
  position: relative;
}
.final-cta-inner { max-width: 760px; margin: 0 auto; }
.final-cta h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 18px 0;
}
.final-cta p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 36px;
}
.final-cta .cta-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ============================================================
   Memory Inspection Modal / Lightbox
   ============================================================ */
.memory-modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 28, 25, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease-smooth);
}
.memory-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.memory-modal-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 300ms var(--ease-emph);
}
.memory-modal.is-open .memory-modal-card {
  transform: scale(1);
}
.memory-modal-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
}
.memory-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.memory-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.memory-modal-body { padding: 24px 28px 28px; }
.memory-modal-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 8px;
}
.memory-modal-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 10px;
}
.memory-modal-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Floating Back-to-Top Pill */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--divider);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 240ms var(--ease-emph);
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--forest);
  color: #ffffff;
  border-color: var(--forest);
  transform: translateY(-3px);
}

/* Footer (Shared) */
.site-footer {
  border-top: 1px solid var(--divider);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap,
.site-footer .wrap-wide {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 32px 24px;
}
.site-footer a { color: var(--muted); text-decoration: none; margin-right: 20px; }
.site-footer a:last-child { margin-right: 0; }
.site-footer a:hover { color: var(--forest); }

/* ============================================================
   Scroll Reveal System (Robust, No-Flicker)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-emph), transform 600ms var(--ease-emph);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero elements stagger smoothly on first render */
.hero-stagger-1 { animation: hero-fade-in 700ms var(--ease-emph) 100ms both; }
.hero-stagger-2 { animation: hero-fade-in 700ms var(--ease-emph) 220ms both; }
.hero-stagger-3 { animation: hero-fade-in 700ms var(--ease-emph) 340ms both; }
.hero-stagger-4 { animation: hero-fade-in 700ms var(--ease-emph) 460ms both; }
.hero-stagger-5 { animation: hero-fade-in 700ms var(--ease-emph) 580ms both; }

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Responsive Layout & Breakpoints
   ============================================================ */
@media (max-width: 960px) {
  .person-stage { grid-template-columns: 1fr; gap: 40px; }
  .person-card { max-width: 460px; margin: 0 auto; }
  .nav { display: none; }
  .menu-toggle { display: block; }
}

@media (max-width: 768px) {
  .hero { padding: 72px 0 60px; }
  .pullquote { padding: 72px 0; }
  .section { padding: 72px 0; }
  .final-cta { padding: 72px 0; }
  .carousel-toolbar { flex-direction: column; align-items: flex-start; }
  .carousel-actions { width: 100%; justify-content: space-between; }
  .walkthrough-shot { width: 220px; }
}

@media (max-width: 560px) {
  h1 { font-size: 34px; }
  .hero h1 { font-size: 38px; }
  .pullquote blockquote { font-size: 22px; }
  .pullquote-mark { font-size: 80px; }
  .section-head h2 { font-size: 28px; }
  .person-name { font-size: 24px; }
  .person-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .person-recent { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .reactions { grid-template-columns: repeat(2, 1fr); }
  .hero-meta { font-size: 13px; gap: 6px 12px; }
  .walkthrough-shot { width: 200px; }
}