/* ═══════════════════════════════════════════════════════
   For Lia — A cinematic memory page
   Palette: deep black, warm rose, soft gold, glass white
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --black: #0a0a0a;
  --deep: #111111;
  --rose: #c4a08a;
  --gold: #d4af87;
  --blush: #e8c4b0;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --text: rgba(255, 255, 255, 0.88);
  --text-soft: rgba(255, 255, 255, 0.55);
  --text-whisper: rgba(255, 255, 255, 0.35);
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Film grain overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── Sections ── */
section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  overflow: hidden;
}

/* ── Fade-in animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ── Bokeh canvas ── */
#bokeh-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   SECTION: Opening Hero
   ═══════════════════════════════════════════ */
.hero-opening {
  background: radial-gradient(ellipse at 50% 40%, #1a1412 0%, var(--black) 70%);
  flex-direction: column;
  gap: 1rem;
  z-index: 1;
}

.hero-opening h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: 0.04em;
  color: var(--blush);
  text-align: center;
  animation: fadeFloat 2.5s ease-out both;
}

.hero-opening .ampersand {
  font-style: italic;
  color: var(--gold);
  margin: 0 0.15em;
}

.hero-opening .subtitle {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: clamp(0.85rem, 2.2vw, 1.15rem);
  color: var(--text-whisper);
  letter-spacing: 0.12em;
  text-transform: lowercase;
  animation: fadeFloat 2.5s ease-out 0.6s both;
}

.hero-opening .date-line {
  font-family: 'Lora', serif;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  color: var(--text-whisper);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  animation: fadeFloat 2.5s ease-out 1.2s both;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeFloat 2.5s ease-out 2s both;
}

.scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-whisper);
}

.scroll-hint .arrow {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--rose), transparent);
  animation: pulse-down 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════
   SECTION: Song Embed
   ═══════════════════════════════════════════ */
.song-section {
  background: radial-gradient(ellipse at 50% 60%, #16120f 0%, var(--black) 70%);
  flex-direction: column;
  gap: 2rem;
}

.song-section .section-whisper {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--rose);
  text-align: center;
}

.song-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 800px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.song-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(196, 160, 138, 0.15), transparent 50%, rgba(212, 175, 135, 0.1));
  z-index: -1;
  animation: gentle-pulse 4s ease-in-out infinite;
}

.song-card iframe {
  width: 100%;
  border: none;
  border-radius: 12px;
  display: block;
}

/* ═══════════════════════════════════════════
   SECTION: Photo + Quote Heroes
   ═══════════════════════════════════════════ */
.photo-quote {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .photo-quote {
    background-attachment: scroll;
  }
}

.photo-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.35) 40%,
    rgba(10, 10, 10, 0.55) 70%,
    rgba(10, 10, 10, 0.85) 100%
  );
  z-index: 1;
}

.quote-container {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 2rem;
  text-align: center;
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  color: var(--blush);
  line-height: 1.8;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.quote-text .response {
  display: block;
  margin-top: 1.2rem;
  color: var(--gold);
  font-size: 0.9em;
}

.quote-attribution {
  margin-top: 1.5rem;
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  color: var(--text-whisper);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.quote-date {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  color: var(--text-whisper);
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════
   SECTION: Lia's Poem
   ═══════════════════════════════════════════ */
.poem-section {
  background: radial-gradient(ellipse at 50% 50%, #1a1510 0%, var(--black) 65%);
  flex-direction: column;
  gap: 2.5rem;
  padding: 3rem 1.5rem;
}

.poem-section .poem-label {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-whisper);
}

.poem-body {
  max-width: 400px;
  text-align: center;
}

.poem-body p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  color: var(--blush);
  line-height: 2.2;
  letter-spacing: 0.02em;
}

.poem-body .poem-line {
  display: block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.poem-body.visible .poem-line {
  opacity: 1;
  transform: translateY(0);
}

.poem-body.visible .poem-line:nth-child(1)  { transition-delay: 0.1s; }
.poem-body.visible .poem-line:nth-child(2)  { transition-delay: 0.25s; }
.poem-body.visible .poem-line:nth-child(3)  { transition-delay: 0.4s; }
.poem-body.visible .poem-line:nth-child(4)  { transition-delay: 0.55s; }
.poem-body.visible .poem-line:nth-child(5)  { transition-delay: 0.7s; }
.poem-body.visible .poem-line:nth-child(6)  { transition-delay: 0.85s; }
.poem-body.visible .poem-line:nth-child(7)  { transition-delay: 1.0s; }
.poem-body.visible .poem-line:nth-child(8)  { transition-delay: 1.15s; }
.poem-body.visible .poem-line:nth-child(9)  { transition-delay: 1.3s; }
.poem-body.visible .poem-line:nth-child(10) { transition-delay: 1.45s; }
.poem-body.visible .poem-line:nth-child(11) { transition-delay: 1.6s; }
.poem-body.visible .poem-line:nth-child(12) { transition-delay: 1.75s; }
.poem-body.visible .poem-line:nth-child(13) { transition-delay: 1.9s; }

.poem-author {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-whisper);
  margin-top: 1rem;
}

.poem-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 135, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}

/* ═══════════════════════════════════════════
   SECTION: Voice Messages
   ═══════════════════════════════════════════ */
.voice-section {
  background: radial-gradient(ellipse at 30% 50%, #14110e 0%, var(--black) 65%);
  flex-direction: column;
  gap: 2rem;
  padding: 3rem 1.5rem;
}

.voice-section .section-whisper {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--rose);
  text-align: center;
}

.voice-cards {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 420px;
  width: 90%;
}

.voice-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.voice-card .voice-label {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-whisper);
  margin-bottom: 0.8rem;
}

.voice-card audio {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  outline: none;
}

/* Chrome audio styling */
.voice-card audio::-webkit-media-controls-panel {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.voice-section .section-whisper + .voice-cards + .section-whisper {
  margin-top: 3rem;
}

/* ═══════════════════════════════════════════
   SECTION: Dedication
   ═══════════════════════════════════════════ */
.dedication-section {
  background: radial-gradient(ellipse at 50% 40%, #1a1510 0%, var(--black) 60%);
  flex-direction: column;
  gap: 2rem;
  padding: 4rem 2rem;
}

.dedication-section .dedication-label {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--gold);
  letter-spacing: 0.05em;
}

.dedication-body {
  max-width: 580px;
  text-align: center;
}

.dedication-body p {
  font-family: 'Lora', serif;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  color: var(--text-soft);
  line-height: 2;
  margin-bottom: 1.5rem;
}

.dedication-body p em {
  color: var(--blush);
  font-style: normal;
}

.dedication-signature {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--rose);
  margin-top: 2rem;
}

/* ═══════════════════════════════════════════
   SECTION: Closing
   ═══════════════════════════════════════════ */
.closing-section {
  background: var(--black);
  flex-direction: column;
  gap: 1rem;
  min-height: 50vh;
}

.closing-section .closing-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-whisper);
  letter-spacing: 0.08em;
  animation: breathe 5s ease-in-out infinite;
}

.closing-section .closing-heart {
  font-size: 0.8rem;
  color: var(--rose);
  opacity: 0.5;
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeFloat {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gentle-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes pulse-down {
  0%, 100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.8;
    transform: scaleY(1.3);
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .quote-container {
    padding: 1.5rem;
  }

  .song-card {
    padding: 1.2rem;
  }

  .dedication-section {
    padding: 3rem 1.5rem;
  }
}
