/* ================================================================
   MEMORIAL SITE — STYLESHEET
   Theme: Vibrant gold & purple — celebratory, joyful, warm
   ================================================================ */

/* ── 1. THEME VARIABLES ──────────────────────────────────────── */
/* Change these hex values to retheme the entire site at once    */
:root {
  /* Gold palette */
  --gold:       #FFD700;
  --gold-light: #FFF5B0;
  --gold-mid:   #F4A900;
  --gold-dark:  #C47D0A;

  /* Purple palette */
  --purple:     #7C3AED;
  --purple-l:   #A855F7;
  --purple-d:   #4C1D95;
  --purple-xd:  #2D0A5E;
  --bg:         #12001F;

  /* Text */
  --white:      #FFFFFF;
  --t1:         rgba(255,255,255,0.92);
  --t2:         rgba(255,255,255,0.58);

  /* Spacing & radius */
  --radius:     14px;
  --gap:        1rem;

  /* Transitions */
  --ease:       0.3s ease;
}


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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Dark fallback if photo hasn't loaded yet */
  background: var(--bg);
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--t1);
  overflow-x: hidden;
  line-height: 1.6;

  /*
   * FULL-PAGE BACKGROUND PHOTO
   * ──────────────────────────
   * The dark gradient sits on top of the photo to keep all
   * sections readable while the image shows through.
   * Change the url() path if you rename your photo.
   */
  background-color: var(--bg); /* fallback while image loads */
  background-image:
    linear-gradient(rgba(10, 0, 21, 0.62), rgba(10, 0, 21, 0.62)),
    url('photos/hero.jpg');
  background-attachment: fixed;  /* photo stays still as page scrolls */
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }


/* ── 3. SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--purple-xd); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 99px; }


/* ── 4. NAVIGATION ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 0, 31, 0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  transition: background var(--ease);
}

.nav.scrolled {
  background: rgba(18, 0, 31, 0.96);
  border-bottom-color: rgba(255, 215, 0, 0.25);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--t2);
  font-size: 0.8rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  transition: color var(--ease);
}

.nav-links a:hover { color: var(--gold); }

/* Mobile hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
}


/* ── 5. HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* Hero has its own .hero-bg element — body handles the rest */
  background: transparent;
  padding-top: 80px; /* clear fixed nav */
}

/* ── HERO BACKGROUND PHOTO ── */
/* Drop photos/hero.jpg to activate. Slow Ken Burns zoom adds depth. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../photos/hero.jpg');
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  transform-origin: center center;
  animation: kenburns 22s ease-out forwards;
  pointer-events: none;
}

/* Purple-gold gradient overlay — keeps text legible over any photo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to bottom,
      rgba(18, 0, 31, 0.50)  0%,   /* top — semi-transparent */
      rgba(60, 10, 100, 0.35) 30%,  /* mid — let the face show */
      rgba(18, 0, 31, 0.65)  65%,  /* lower — darken for text */
      rgba(10, 0, 21, 0.92)  100%  /* bottom — nearly solid */
    );
  pointer-events: none;
}

/* Particle canvas sits above the overlay, below the text */
#particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-star {
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  animation: float 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.7));
}

.hero-eyebrow {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--gold-light);
  letter-spacing: 2px;
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.1rem;
  background: linear-gradient(120deg, #fff 10%, #FFD700 45%, #fff 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
  filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.25));
}

.hero-dates {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 1.4rem;
  opacity: 0.95;
}

.hero-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--t2);
  max-width: 580px;
  line-height: 1.9;
  margin-bottom: 3rem;
}

/* Scroll hint arrow at the bottom of hero */
.scroll-hint {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--t2);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
  z-index: 2;
  transition: color var(--ease);
}

.scroll-hint { z-index: 3; } /* above overlay */
.scroll-hint:hover { color: var(--gold); }
.scroll-hint span { font-size: 1.3rem; color: var(--gold); }


/* ── 6. CANDLES ─────────────────────────────────────────────── */
.candles-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.8rem, 2.5vw, 1.8rem);
}

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

/* Soft glow around the flame */
.candle-glow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 50, 0.65) 0%, transparent 70%);
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  animation: glow-pulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

/* Flame container */
.candle-flame {
  position: relative;
  width: 14px;
  height: 26px;
  margin-bottom: -1px;
}

/* Outer flame layer */
.candle-flame::before {
  content: '';
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 26px;
  background: radial-gradient(ellipse at 50% 100%, #fff9d0 0%, #ffd700 28%, #ff8c00 62%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  animation: flicker 1.3s ease-in-out infinite;
  filter: blur(0.4px);
}

/* Inner bright core */
.candle-flame::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 10px;
  background: radial-gradient(ellipse at bottom, #fff 0%, #ffe590 100%);
  border-radius: 50% 50% 35% 35%;
  animation: flicker 1.3s ease-in-out infinite reverse;
}

/* Candle wax body — background set inline by JavaScript */
.candle-body {
  width: 16px;
  border-radius: 2px 2px 1px 1px;
  position: relative;
  overflow: hidden;
}

/* Shading stripe to give 3-D wax look */
.candle-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.18),
    transparent 30%,
    rgba(255,255,255,0.12) 50%,
    transparent 70%,
    rgba(0,0,0,0.18)
  );
}

.candle-base {
  width: 22px;
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
}

/* Smaller candles used in the footer */
.candle.small {
  transform: scale(0.6);
  transform-origin: bottom center;
}
.candle.medium {
  transform: scale(0.75);
  transform-origin: bottom center;
}

.footer-candles {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}


/* ── 7. LIFE STATS BAND ─────────────────────────────────────── */
.life-band {
  background: rgba(30, 5, 65, 0.78);
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  padding: 3rem 1.5rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.life-stats {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 860px;
  margin: 0 auto;
}

.stat {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 1.5rem 2rem;
  border-right: 1px solid rgba(255, 215, 0, 0.18);
}
.stat:last-child { border-right: none; }

.stat-n {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}

.stat-l {
  color: var(--t2);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.4rem;
}


/* ── 8. SECTION BASE ────────────────────────────────────────── */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.6rem;
}

.section-sub {
  text-align: center;
  color: var(--t2);
  font-size: 0.95rem;
  margin-bottom: 2.4rem;
  letter-spacing: 0.5px;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.8rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 215, 0, 0.4), transparent);
  max-width: 220px;
}

.divider-star { color: var(--gold); font-size: 1.3rem; }


/* ── 9. GALLERY ─────────────────────────────────────────────── */
.gallery-section {
  background: rgba(12, 0, 24, 0.68);
  padding: 5rem 0;
}

/* Masonry-style column layout — images keep natural proportions */
.photo-grid {
  column-count: 4;
  column-gap: var(--gap);
  min-height: 200px;
}

.photo-card {
  break-inside: avoid;
  margin-bottom: var(--gap);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 215, 0, 0.08);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.photo-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.15);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.4s ease;
}

/* Subtle gradient overlay on hover */
.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 0, 31, 0.65) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--ease);
}

.photo-card:hover::after { opacity: 1; }

/* Zoom icon appears on hover */
.photo-card .zoom-icon {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--ease), transform var(--ease);
  pointer-events: none;
}

.photo-card:hover .zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Loading state shown while manifest is being fetched */
.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem;
  color: var(--t2);
  column-span: all;
  grid-column: 1 / -1;
}

/* Empty / error state */
.gallery-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--t2);
  column-span: all;
}

.gallery-empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.gallery-empty code {
  background: rgba(255, 215, 0, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--gold);
}

/* Load More button area */
.load-more-wrap {
  display: none;
  text-align: center;
  margin-top: 2.5rem;
}

.load-more-count {
  margin-top: 0.75rem;
  color: var(--t2);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}


/* ── 10. LOADING SPINNER ────────────────────────────────────── */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 215, 0, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}


/* ── 11. BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), color var(--ease);
  border: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-mid), var(--gold));
  color: #12001F;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 215, 0, 0.45);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: #12001F;
  transform: translateY(-2px);
}

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


/* ── 12. LIGHTBOX ───────────────────────────────────────────── */
.lightbox {
  display: none;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8, 0, 18, 0.97);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  pointer-events: auto;
  opacity: 1;
}

.lb-img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 80px rgba(255, 215, 0, 0.15);
  transition: opacity 0.25s ease;
}

/* Preload image is invisible — just loads the next photo in background */
.lb-preload {
  display: none;
}

.lb-close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
  z-index: 1001;
}

.lb-close:hover { background: rgba(200, 30, 30, 0.6); }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  color: var(--gold);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
  backdrop-filter: blur(4px);
  z-index: 1001;
}

.lb-nav:hover { background: rgba(255, 215, 0, 0.28); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

.lb-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--t2);
  font-size: 0.85rem;
  letter-spacing: 2px;
  z-index: 1001;
}


/* ── 13. MEMORIES ───────────────────────────────────────────── */
.memories-section {
  background: rgba(14, 2, 32, 0.88);
  padding: 5rem 0;
  position: relative;
  z-index: 10;
}

.memory-form {
  background: rgba(18, 4, 48, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 20px;
  padding: 2.4rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 11;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fg label {
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.fg input,
.fg textarea,
.fg select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  color: var(--white);
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
  outline: none;
  resize: vertical;
  pointer-events: auto;
  position: relative;
  z-index: 12;
  -webkit-appearance: none;
}

.fg input:focus,
.fg textarea:focus,
.fg select:focus {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.fg input::placeholder,
.fg textarea::placeholder { color: rgba(255, 255, 255, 0.28); }

.fg select option { background: #2d0a5e; }

.form-foot {
  text-align: right;
  margin-top: 1.4rem;
}


/* ── 14. MEMORY CARDS ───────────────────────────────────────── */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.memory-card {
  background: rgba(18, 4, 48, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 16px;
  padding: 1.7rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  animation: fadeUp 0.5s ease forwards;
}

.memory-card:hover {
  border-color: rgba(255, 215, 0, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(124, 58, 237, 0.25);
}

.mem-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

/* Coloured initial avatar */
.mem-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-l), var(--gold-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.mem-info { flex: 1; min-width: 0; }
.mem-name { font-weight: 700; color: var(--gold-light); font-size: 0.95rem; }
.mem-rel  { font-size: 0.78rem; color: var(--t2); margin-top: 0.15rem; }
.mem-date { font-size: 0.72rem; color: var(--t2); flex-shrink: 0; text-align: right; }

.mem-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  line-height: 1.85;
  color: var(--t1);
  font-size: 0.93rem;
}

.mem-text::before { content: '\201C'; }
.mem-text::after  { content: '\201D'; }

.no-memories {
  text-align: center;
  padding: 3rem;
  color: var(--t2);
  grid-column: 1 / -1;
}


/* ── 15. FOOTER ─────────────────────────────────────────────── */
.footer {
  background: rgba(5, 0, 12, 0.88);
  border-top: 1px solid rgba(255, 215, 0, 0.1);
  padding: 4.5rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--gold);
  max-width: 580px;
  margin: 0 auto 1.2rem;
  line-height: 1.8;
}

.footer-sub {
  color: var(--t2);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}


/* ── 16. TOAST NOTIFICATION ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--gold);
  color: #12001F;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 3000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35);
}

.toast.show { transform: translateX(-50%) translateY(0); }


/* ── 17. SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}


/* ── 18. KEYFRAME ANIMATIONS ────────────────────────────────── */
/* Slow cinematic zoom on the hero background photo */
@keyframes kenburns {
  from { transform: scale(1.06); }
  to   { transform: scale(1.18); }
}

@keyframes shimmer {
  0%   { background-position: 0%   center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(9px); }
}

@keyframes flicker {
  0%,100% { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(0deg); }
  18%     { transform: translateX(-54%) scaleX(0.85) scaleY(1.14) rotate(-5deg); }
  38%     { transform: translateX(-46%) scaleX(1.14) scaleY(0.9)  rotate(5deg); }
  58%     { transform: translateX(-52%) scaleX(0.92) scaleY(1.08) rotate(-2deg); }
  78%     { transform: translateX(-48%) scaleX(1.06) scaleY(0.95) rotate(2deg); }
}

@keyframes glow-pulse {
  0%, 100% { transform: translateX(-50%) scale(1);   opacity: 0.65; }
  50%       { transform: translateX(-50%) scale(1.5); opacity: 1;    }
}

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

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


/* ── 19. RESPONSIVE ─────────────────────────────────────────── */
/* background-attachment: fixed is broken on iOS — fall back to scroll */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}

@media (max-width: 1200px) {
  .photo-grid { column-count: 3; }
}

@media (max-width: 900px) {
  .photo-grid { column-count: 2; }
}

@media (max-width: 768px) {
  /* Nav mobile */
  .nav { padding: 0.9rem 1.2rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(18, 0, 31, 0.98);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  }

  .nav-links.open { display: flex; }

  .nav-links li { border-bottom: 1px solid rgba(255, 215, 0, 0.08); }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
  }

  .nav-toggle { display: block; }

  /* Stats */
  .stat {
    border-right: none;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  }
  .stat:last-child { border-bottom: none; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Lightbox nav buttons */
  .lb-nav { width: 42px; height: 42px; font-size: 1.3rem; }
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }
}

@media (max-width: 480px) {
  .photo-grid { column-count: 1; }
  .hero-quote { display: none; } /* save space on very small phones */
  .memory-form { padding: 1.5rem; }
}
