/* ==========================================================================
   VACO — MEMORIAL ETERNO
   Dual Color Palette System:
     1) Linen & Espresso: #F5F1EA | #D7C9B8 | #B2967D | #7D5A44 | #4A342A
     2) Otoño Dorado:     #F0862E | #BD734C | #A74216 | #6C2F1A | #391A15
   ========================================================================== */

:root,
[data-theme="linen"] {
  /* Core Swatches — Palette 1 */
  --p-1: #F5F1EA; /* Linen */
  --p-2: #D7C9B8; /* Khaki */
  --p-3: #B2967D; /* Camel */
  --p-4: #7D5A44; /* Cocoa */
  --p-5: #4A342A; /* Espresso */

  /* Semantic Tokens */
  --bg: #F5F1EA;
  --bg-alt: #EDE5D9;
  --bg-radial-1: rgba(215, 201, 184, 0.55);
  --bg-radial-2: rgba(178, 150, 125, 0.28);
  --surface: #FAF7F2;
  --surface-elevated: #FFFDF9;
  --surface-glass: rgba(245, 241, 234, 0.82);
  --surface-card: rgba(250, 247, 242, 0.9);
  --border: rgba(178, 150, 125, 0.36);
  --border-strong: rgba(125, 90, 68, 0.38);

  --text: #4A342A;
  --text-soft: #6C4F3E;
  --text-muted: #8C6D59;

  --accent: #7D5A44;
  --accent-strong: #4A342A;
  --accent-soft: #D7C9B8;
  --accent-warm: #B2967D;
  --accent-glow: rgba(178, 150, 125, 0.42);

  --btn-primary-bg: #4A342A;
  --btn-primary-hover: #634537;
  --btn-primary-text: #F5F1EA;

  --polaroid-bg: #FFFDF9;
  --polaroid-ink: #5A4033;
  --letter-bg: #FCF9F3;
  --shadow-sm: 0 8px 24px rgba(74, 52, 42, 0.08);
  --shadow-md: 0 18px 44px rgba(74, 52, 42, 0.13);
  --shadow-lg: 0 28px 70px rgba(74, 52, 42, 0.18);

  --candle-wax-top: #FAF4EA;
  --candle-wax-bot: #DDD0BF;
  --candle-glow: rgba(235, 165, 84, 0.42);

  --veil-bg: radial-gradient(circle at 50% 35%, #FAF6EF 0%, #EDE3D5 58%, #DCCEBC 100%);
  --grain-opacity: 0.035;
}

[data-theme="autumn"] {
  /* Core Swatches — Palette 2 (Exact sampled swatches from uploaded autumn image) */
  --p-1: #F0862E; /* Amber */
  --p-2: #BD734C; /* Cinnamon */
  --p-3: #A74216; /* Terracotta / Rust */
  --p-4: #6C2F1A; /* Chestnut */
  --p-5: #391A15; /* Deep Umber */

  /* Semantic Tokens */
  --bg: #391A15;
  --bg-alt: #4A2117;
  --bg-radial-1: rgba(240, 134, 46, 0.18);
  --bg-radial-2: rgba(167, 66, 22, 0.28);
  --surface: #4E2318;
  --surface-elevated: #5C291A;
  --surface-glass: rgba(57, 26, 21, 0.84);
  --surface-card: rgba(108, 47, 26, 0.46);
  --border: rgba(189, 115, 76, 0.34);
  --border-strong: rgba(240, 134, 46, 0.46);

  --text: #FAEEE2;
  --text-soft: #E5C2A8;
  --text-muted: #C99171;

  --accent: #F0862E;
  --accent-strong: #FF9F4D;
  --accent-soft: #6C2F1A;
  --accent-warm: #BD734C;
  --accent-glow: rgba(240, 134, 46, 0.45);

  --btn-primary-bg: linear-gradient(135deg, #F0862E 0%, #A74216 100%);
  --btn-primary-hover: linear-gradient(135deg, #FF9942 0%, #BD4F1F 100%);
  --btn-primary-text: #FFF8F1;

  --polaroid-bg: #F6E9DA;
  --polaroid-ink: #4A2117;
  --letter-bg: linear-gradient(160deg, #522317 0%, #3E1B15 100%);
  --shadow-sm: 0 10px 26px rgba(15, 5, 3, 0.36);
  --shadow-md: 0 20px 50px rgba(15, 5, 3, 0.48);
  --shadow-lg: 0 30px 76px rgba(10, 3, 2, 0.62);

  --candle-wax-top: #F7DFC4;
  --candle-wax-bot: #BD734C;
  --candle-glow: rgba(240, 134, 46, 0.56);

  --veil-bg: radial-gradient(circle at 50% 35%, #6C2F1A 0%, #4A2016 55%, #2B120E 100%);
  --grain-opacity: 0.05;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.65s ease, color 0.65s ease;
}

body.is-locked {
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  z-index: 2;
}

/* Ambient Canvas & Subtle Grain */
#ambientCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: var(--grain-opacity);
  background-image: radial-gradient(rgba(0, 0, 0, 0.45) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

/* Typography Helpers */
h1, h2, h3, .serif {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(2.8rem, 5vw, 4.2rem);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent-warm);
  opacity: 0.7;
}

.section-title {
  font-size: clamp(2.3rem, 4.8vw, 3.6rem);
  color: var(--text);
  margin-bottom: 0.85rem;
}

.section-lead {
  color: var(--text-soft);
  font-size: 1.03rem;
  font-weight: 300;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.94rem;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              background 0.35s ease,
              border-color 0.35s ease,
              color 0.35s ease;
}

.btn-primary {
  padding: 0.92rem 1.85rem;
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 12px 30px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--btn-primary-hover);
  box-shadow: 0 16px 36px var(--accent-glow);
}

.btn-glow {
  animation: gentlePulse 3.2s ease-in-out infinite;
}

.btn-secondary {
  padding: 0.88rem 1.7rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.86rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text);
}

.btn-outline-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   OPENING VEIL (KEEPSAKE ENTRANCE)
   ========================================================================== */
.opening-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--veil-bg);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.9s ease,
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.opening-veil.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

.veil-inner {
  text-align: center;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.veil-portrait-ring {
  position: relative;
  width: 146px;
  height: 146px;
  margin-bottom: 1.5rem;
}

.veil-halo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed var(--accent-warm);
  opacity: 0.7;
  animation: slowSpin 26s linear infinite;
}

.veil-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  border: 4px solid var(--surface-elevated);
  box-shadow: var(--shadow-lg);
}

.veil-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.veil-title {
  font-size: clamp(3.4rem, 9vw, 5.2rem);
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.veil-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.18rem, 2.5vw, 1.45rem);
  font-style: italic;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.veil-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.veil-song-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   TOP NAVIGATION & DUAL PALETTE SWITCH
   ========================================================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 0.9rem 0;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.top-nav.is-scrolled {
  padding: 0.6rem 0;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  width: min(1220px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text);
}

.brand-paw {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  transition: transform 0.35s ease, background 0.45s ease;
}

.brand-paw svg {
  width: 17px;
  height: 17px;
}

.nav-brand:hover .brand-paw {
  transform: rotate(-12deg) scale(1.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Tactile Dual Palette Switch --- */
.palette-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  backdrop-filter: blur(12px);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.palette-switch:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.switch-option {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.55;
  transition: opacity 0.35s ease, color 0.35s ease;
}

[data-theme="linen"] .switch-linen,
[data-theme="autumn"] .switch-autumn {
  opacity: 1;
  color: var(--text);
}

.swatch-dots {
  display: inline-flex;
  align-items: center;
}

.swatch-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.16);
  margin-left: -3px;
}

.swatch-dots i:first-child {
  margin-left: 0;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  transition: background 0.45s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.45s ease;
}

[data-theme="autumn"] .switch-thumb {
  transform: translateX(20px);
  background: #F0862E;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease;
}

.mobile-menu-btn.is-open span:first-child {
  transform: translateY(3.2px) rotate(45deg);
}

.mobile-menu-btn.is-open span:last-child {
  transform: translateY(-3.2px) rotate(-45deg);
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1.4rem 1.25rem;
  margin: 0.65rem 1rem 0;
  border-radius: 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.mobile-drawer.is-open {
  display: flex;
}

.mobile-drawer a {
  padding: 0.65rem 0.5rem;
  font-size: 0.96rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6.8rem 0 4.5rem;
  overflow: hidden;
  z-index: 2;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  transition: background 0.8s ease;
}

.hero-glow-1 {
  width: 560px;
  height: 560px;
  top: -120px;
  right: -80px;
  background: var(--bg-radial-1);
}

.hero-glow-2 {
  width: 480px;
  height: 480px;
  bottom: -140px;
  left: -120px;
  background: var(--bg-radial-2);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.35rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: dotPing 2.4s ease-out infinite;
}

.hero-title {
  font-size: clamp(3.1rem, 6.4vw, 5.2rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.3rem;
}

.title-italic {
  font-style: italic;
  color: var(--accent);
  font-weight: 600;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-soft);
  max-width: 540px;
  margin-bottom: 1.85rem;
  font-weight: 300;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0.85rem 1.55rem;
  border-radius: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  margin-bottom: 2.1rem;
  box-shadow: var(--shadow-sm);
}

.stat-pill {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-pill strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  color: var(--accent);
  font-weight: 700;
}

.stat-pill span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
}

/* Layered Arch Portrait */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-arch-wrapper {
  position: relative;
  width: min(410px, 86vw);
  aspect-ratio: 3 / 4;
  transition: transform 0.25s ease-out;
}

.arch-ornament {
  position: absolute;
  inset: -14px;
  border-radius: 230px 230px 28px 28px;
  border: 1px solid var(--border-strong);
  opacity: 0.7;
  pointer-events: none;
}

.hero-arch-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 220px 220px 22px 22px;
  overflow: hidden;
  border: 6px solid var(--surface-elevated);
  box-shadow: var(--shadow-lg);
  background: var(--bg-alt);
}

.hero-arch-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.15s ease, transform 6.5s ease-out;
}

.hero-arch-img.active {
  opacity: 1;
  transform: scale(1);
}

.floating-card {
  position: absolute;
  width: 138px;
  padding: 0.45rem 0.45rem 0.65rem;
  background: var(--polaroid-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease;
  z-index: 4;
}

.floating-card img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  border-radius: 6px;
}

.floating-card figcaption {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  color: var(--polaroid-ink);
  text-align: center;
  margin-top: 0.35rem;
  line-height: 1.1;
}

.floating-card-top {
  top: 7%;
  left: -14%;
  transform: rotate(-7deg);
  animation: floatSlow 6.5s ease-in-out infinite;
}

.floating-card-bottom {
  bottom: 8%;
  right: -12%;
  transform: rotate(6deg);
  animation: floatSlowReverse 7.5s ease-in-out infinite;
}

.hero-dots {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease;
}

.hero-dot.active {
  width: 28px;
  background: var(--accent);
}

.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDrop 2.2s ease-in-out infinite;
}

/* ==========================================================================
   LYRIC INTERLUDE BAND
   ========================================================================== */
.interlude-band {
  position: relative;
  z-index: 2;
  padding: 3.4rem 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.65s ease;
}

.lyric-quote {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.quote-mark {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 4rem;
  line-height: 0.5;
  color: var(--accent);
  opacity: 0.65;
  margin-bottom: 0.4rem;
}

.lyric-quote p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  font-style: italic;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.lyric-quote footer {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ==========================================================================
   STORY CHAPTERS
   ========================================================================== */
.chapters-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(3.8rem, 7vw, 6rem);
}

.chapter-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.chapter-reverse .chapter-media {
  order: 2;
}

.chapter-reverse .chapter-text {
  order: 1;
}

.chapter-collage {
  position: relative;
  padding-bottom: 12%;
}

.collage-photo {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  border: 5px solid var(--surface-elevated);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.collage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.collage-photo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.collage-photo:hover img {
  transform: scale(1.05);
}

.collage-a .main-photo {
  width: 82%;
  aspect-ratio: 4 / 3;
}

.collage-a .accent-photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48%;
  aspect-ratio: 4 / 3;
  transform: rotate(2.5deg);
}

.collage-b .main-photo {
  margin-left: auto;
  width: 82%;
  aspect-ratio: 4 / 3;
}

.collage-b .accent-photo {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46%;
  aspect-ratio: 1 / 1;
  transform: rotate(-2.5deg);
}

.chapter-num {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.chapter-text h3 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin-bottom: 1rem;
  color: var(--text);
}

.chapter-text p {
  color: var(--text-soft);
  font-size: 1.03rem;
  margin-bottom: 1.2rem;
}

.chapter-note {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-size: 1.45rem;
  color: var(--accent);
}

/* ==========================================================================
   INTERACTIVE POLAROID MEMORY TABLE
   ========================================================================== */
.polaroid-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.65s ease;
}

.polaroid-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
  padding: 1rem 0 2.4rem;
}

.polaroid-card {
  position: relative;
  background: var(--polaroid-bg);
  padding: 0.75rem 0.75rem 1.25rem;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease,
              opacity 0.45s ease;
  text-align: left;
}

.polaroid-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 66px;
  height: 20px;
  background: rgba(215, 201, 184, 0.55);
  backdrop-filter: blur(2px);
  border-radius: 2px;
  pointer-events: none;
}

.polaroid-card:hover {
  transform: translateY(-10px) rotate(0deg) scale(1.035);
  box-shadow: var(--shadow-lg);
  z-index: 6;
}

.polaroid-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  border-radius: 3px;
  background: #221815;
}

.polaroid-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
}

.polaroid-card:hover .polaroid-img-wrap img {
  transform: scale(1.06);
}

.polaroid-caption {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--polaroid-ink);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.2;
}

.polaroid-actions {
  text-align: center;
}

/* ==========================================================================
   COMPLETE MASONRY PHOTO GALLERY
   ========================================================================== */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-pill.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: transparent;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.pill-count {
  font-size: 0.75rem;
  opacity: 0.78;
}

/* CSS Columns Masonry for Natural Uncropped Ratios */
.masonry-gallery {
  column-count: 4;
  column-gap: 1.15rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.15rem;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.35s ease;
  animation: fadeScaleIn 0.55s ease both;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img {
  transform: scale(1.045);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(35, 18, 12, 0.82) 0%, rgba(35, 18, 12, 0.12) 48%, transparent 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: #FAF4EC;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.25;
}

.gallery-tag {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F0C9A4;
  margin-bottom: 0.2rem;
}

.gallery-footer {
  margin-top: 2.5rem;
  text-align: center;
}

/* ==========================================================================
   VIDEO CINEMA SECTION
   ========================================================================== */
.video-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.65s ease;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.video-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.video-frame {
  position: relative;
  background: #1B0F0C;
  aspect-ratio: 9 / 12;
  max-height: 460px;
  overflow: hidden;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-body {
  padding: 1.25rem 1.4rem 1.45rem;
}

.video-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.video-card-body h3 {
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.video-card-body p {
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ==========================================================================
   CANDLE TRIBUTE & MEMORY WALL
   ========================================================================== */
.tribute-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 2.2rem;
  align-items: start;
}

.candle-sanctuary {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.candle-stage {
  position: relative;
  height: 230px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.candle-aura {
  position: absolute;
  bottom: 92px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--candle-glow) 0%, transparent 68%);
  animation: auraBreath 2.8s ease-in-out infinite;
  pointer-events: none;
}

.candle-holder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle-flame-wrap {
  position: relative;
  width: 34px;
  height: 52px;
  margin-bottom: -4px;
  transform-origin: bottom center;
  animation: flameSway 2.3s ease-in-out infinite;
}

.candle-flame-wrap.flare {
  animation: flameFlare 0.85s ease-out;
}

.flame-outer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 46px;
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(circle at 50% 72%, #FFF7D6 0%, #FFB74D 45%, #F0862E 78%, rgba(167, 66, 22, 0.2) 100%);
  box-shadow: 0 0 28px rgba(240, 134, 46, 0.78), 0 0 60px rgba(240, 134, 46, 0.35);
}

.flame-inner {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 22px;
  border-radius: 50% 50% 50% 50% / 68% 68% 32% 32%;
  background: #FFFDF2;
}

.candle-wick {
  width: 3px;
  height: 12px;
  background: #3A261E;
  border-radius: 2px;
}

.candle-wax {
  position: relative;
  width: 78px;
  height: 112px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, var(--candle-wax-top) 0%, var(--candle-wax-bot) 100%);
  box-shadow: inset -10px 0 18px rgba(74, 52, 42, 0.14), 0 12px 24px rgba(0, 0, 0, 0.2);
  display: grid;
  place-items: center;
}

.wax-drip {
  position: absolute;
  top: 4px;
  right: 12px;
  width: 10px;
  height: 28px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
}

.wax-engraving {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #6E4F3D;
  opacity: 0.72;
}

.candle-plate {
  width: 128px;
  height: 14px;
  border-radius: 50%;
  margin-top: -4px;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent), var(--accent-warm));
  box-shadow: var(--shadow-sm);
}

.candle-counter {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 1.25rem;
}

.candle-counter strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  color: var(--accent);
}

.candle-toast {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--accent);
}

/* Memory Notes Panel */
.memory-wall-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.memory-form {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.memory-form h3 {
  font-size: 1.65rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.form-row {
  margin-bottom: 0.85rem;
}

.memory-form input,
.memory-form textarea {
  width: 100%;
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  resize: vertical;
}

.memory-form input::placeholder,
.memory-form textarea::placeholder {
  color: var(--text-muted);
}

.memory-form input:focus,
.memory-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.memory-list {
  display: grid;
  gap: 0.9rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.memory-note-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideUp 0.5s ease both;
}

.memory-note-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.22rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.45rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.memory-note-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FINAL LETTER SECTION
   ========================================================================== */
.letter-section {
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.letter-paper {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4.4rem);
  border-radius: 26px;
  background: var(--letter-bg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.letter-paper::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  pointer-events: none;
}

.letter-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.letter-date {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.letter-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
  color: var(--text);
}

.letter-body p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.24rem, 2.2vw, 1.42rem);
  line-height: 1.72;
  color: var(--text-soft);
  margin-bottom: 1.3rem;
}

.letter-body p:first-child {
  font-style: italic;
  color: var(--text);
  font-weight: 600;
}

.letter-footer {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.letter-signature {
  display: flex;
  flex-direction: column;
}

.letter-signature span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.letter-signature strong {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
}

.wax-seal {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent-warm) 0%, var(--accent) 55%, var(--accent-strong) 100%);
  color: #FFF7EE;
  display: grid;
  place-items: center;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.32), 0 10px 22px rgba(0, 0, 0, 0.24);
  transform: rotate(-8deg);
}

.wax-seal svg {
  width: 30px;
  height: 30px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 3.4rem 0 6.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  text-align: center;
}

.footer-constellation {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

.footer-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.footer-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.back-to-top {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: background 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
  background: var(--surface-elevated);
  transform: translateY(-2px);
}

/* ==========================================================================
   FLOATING VINYL MUSIC PLAYER
   ========================================================================== */
.music-player {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 95;
  width: min(350px, calc(100vw - 2rem));
  border-radius: 22px;
  background: var(--surface-glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  padding: 0.72rem 0.95rem;
  transition: background 0.5s ease, border-color 0.5s ease, transform 0.35s ease;
}

.player-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.vinyl-btn {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.vinyl-disc {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #1D1512 0 2px, #2B201C 2px 4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  animation: slowSpin 7s linear infinite;
  animation-play-state: paused;
}

.music-player.is-playing .vinyl-disc {
  animation-play-state: running;
}

.vinyl-label {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
}

.vinyl-hole {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1A1210;
}

.vinyl-play-badge {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.65rem;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

.player-meta {
  flex: 1;
  min-width: 0;
}

.player-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.song-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  opacity: 0.35;
}

.eq-bars i {
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.music-player.is-playing .eq-bars {
  opacity: 1;
}

.music-player.is-playing .eq-bars i:nth-child(1) {
  animation: eqBounce 0.75s ease-in-out infinite;
}
.music-player.is-playing .eq-bars i:nth-child(2) {
  animation: eqBounce 0.55s ease-in-out 0.15s infinite;
}
.music-player.is-playing .eq-bars i:nth-child(3) {
  animation: eqBounce 0.85s ease-in-out 0.3s infinite;
}

.player-progress-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.time-label {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.music-player input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  outline: none;
  cursor: pointer;
}

.music-player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface-elevated);
}

.player-expand-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.player-expand-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.player-expand-btn svg {
  width: 16px;
  height: 16px;
}

.player-volume-drawer {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.player-volume-drawer.is-open {
  display: flex;
}

.vol-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.mute-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

/* ==========================================================================
   CINEMATOGRAPHIC LIGHTBOX MODAL
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 12, 9, 0.92);
  backdrop-filter: blur(14px);
}

.lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  color: #FAF2E8;
}

.lightbox-counter {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.lightbox-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 240, 224, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #FAF2E8;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.lb-icon-btn:hover,
.lb-icon-btn.is-active {
  background: #F0862E;
  border-color: #F0862E;
  color: #24100C;
}

.lb-icon-btn svg {
  width: 15px;
  height: 15px;
}

.lb-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 224, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #FAF2E8;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lb-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 224, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #FAF2E8;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lb-nav:hover {
  background: rgba(240, 134, 46, 0.85);
  color: #24100C;
}

.lb-prev {
  left: 1.3rem;
}

.lb-next {
  right: 1.3rem;
}

.lightbox-stage {
  position: relative;
  z-index: 4;
  max-width: min(92vw, 1020px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.65);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lightbox-stage img.is-switching {
  opacity: 0;
  transform: scale(0.97);
}

.lightbox-stage figcaption {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  color: #F6E6D6;
  text-align: center;
  padding: 0 1rem;
}

.lightbox-slideshow-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  z-index: 6;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-slideshow-bar.is-visible {
  opacity: 1;
}

.slideshow-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F0862E, #FFD199);
}

/* ==========================================================================
   SCROLL REVEALS & KEYFRAMES
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Floating Candle Sparkles */
.floating-ember {
  position: fixed;
  pointer-events: none;
  z-index: 150;
  font-size: 1.15rem;
  animation: riseEmber 1.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 12px 30px var(--accent-glow); }
  50% { box-shadow: 0 14px 40px var(--accent-glow), 0 0 0 6px rgba(240, 134, 46, 0.12); }
}

@keyframes dotPing {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50% { transform: translateY(-9px) rotate(-5deg); }
}

@keyframes floatSlowReverse {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(9px) rotate(4deg); }
}

@keyframes scrollDrop {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0.3; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0.2); transform-origin: bottom; opacity: 0.2; }
}

@keyframes flameSway {
  0%, 100% { transform: scaleY(1) rotate(-2deg); }
  50% { transform: scaleY(1.07) rotate(2.5deg); }
}

@keyframes flameFlare {
  0% { transform: scale(1); }
  35% { transform: scale(1.42) translateY(-4px); }
  100% { transform: scale(1); }
}

@keyframes auraBreath {
  0%, 100% { transform: scale(0.94); opacity: 0.78; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 12px; }
}

@keyframes riseEmber {
  0% { opacity: 1; transform: translate(0, 0) scale(0.8); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -120px) scale(1.3); }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1080px) {
  .masonry-gallery {
    column-count: 3;
  }
  .polaroid-table {
    grid-template-columns: repeat(2, 1fr);
  }
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-grid,
  .chapter-row,
  .tribute-grid {
    grid-template-columns: 1fr;
  }
  .chapter-reverse .chapter-media,
  .chapter-reverse .chapter-text {
    order: initial;
  }
  .hero-section {
    padding-top: 6rem;
    text-align: center;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-arch-wrapper {
    margin-top: 1.5rem;
    margin-bottom: 2.2rem;
  }
  .floating-card-top {
    left: -5%;
    width: 112px;
  }
  .floating-card-bottom {
    right: -5%;
    width: 112px;
  }
  .scroll-cue {
    display: none;
  }
}

@media (max-width: 640px) {
  .switch-label {
    display: none;
  }
  .masonry-gallery {
    column-count: 2;
    column-gap: 0.8rem;
  }
  .gallery-item {
    margin-bottom: 0.8rem;
  }
  .polaroid-table,
  .video-grid {
    grid-template-columns: 1fr;
  }
  .music-player {
    left: 1rem;
    right: 1rem;
    bottom: 0.9rem;
    width: auto;
  }
  .lb-nav {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
