/* ============================================
   ELLEN'S 65TH BIRTHDAY — STYLES
   ============================================ */

:root {
  --orange: #FF7A1A;
  --yellow: #FFC233;
  --coral: #FF5E5B;
  --turquoise: #2EC4B6;
  --cream: #FFF8EE;
  --charcoal: #2B2422;
  --evan: #1D4E89;
  --laura: #6A2C91;
  --grace: #C8102E;
  --chris: #2E7D32;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- PHOTO WARMTH FILTER ---- */
.warm-photo {
  filter: saturate(1.08) brightness(1.03) sepia(0.06);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.1) brightness(1.02) sepia(0.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,122,26,0.18) 0%,
    rgba(255,194,51,0.12) 40%,
    rgba(43,36,34,0.55) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-content h1 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  color: #fff;
  text-shadow: 0 4px 30px rgba(43,36,34,0.35);
  line-height: 1.1;
  margin-bottom: 0.3em;
}

.hero-content .subtitle {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 12px rgba(43,36,34,0.3);
  margin-bottom: 1.5em;
  font-style: italic;
}

.hero-content .song-label {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 0.6em 1.4em;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}

.hero-content .song-label:hover {
  background: rgba(255,255,255,0.3);
}

/* ---- CONFETTI CANVAS ---- */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

/* ============================================
   WAVE DIVIDERS
   ============================================ */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  margin: -1px 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================
   PORTA POTTY BANNER
   ============================================ */
.porta-potty {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
  padding: 3rem 1.5rem;
  text-align: center;
  overflow: hidden;
}

.porta-potty h2 {
  font-family: 'Chewy', cursive;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  transform: rotate(-1deg);
  text-shadow: 0 2px 0 rgba(255,255,255,0.25);
}

.porta-potty-photos {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

.porta-potty-photos .pp-photo {
  flex: 0 0 auto;
  width: 260px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(43,36,34,0.18);
  border: 4px solid rgba(255,255,255,0.5);
  scroll-snap-align: center;
  transition: transform 0.3s ease;
}

.porta-potty-photos .pp-photo:nth-child(1) { transform: rotate(-3deg); }
.porta-potty-photos .pp-photo:nth-child(2) { transform: rotate(1.5deg); }
.porta-potty-photos .pp-photo:nth-child(3) { transform: rotate(-2deg); }

.porta-potty-photos .pp-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Video montage row */
.pp-videos {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: nowrap;
  max-width: 1100px;
  margin: 2rem auto 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

.pp-videos video {
  flex: 0 0 auto;
  width: 200px;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(43,36,34,0.15);
  border: 3px solid rgba(255,255,255,0.5);
  scroll-snap-align: center;
}

/* ============================================
   65 THINGS SECTION
   ============================================ */
.things-section {
  background: var(--cream);
  padding: 4rem 1.5rem 5rem;
}

.things-section .section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.things-section .section-header h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
}

/* Legend */
.legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Cards grid — CSS columns for masonry effect */
.cards-grid {
  columns: 3;
  column-gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(43,36,34,0.07);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  width: 100%;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(43,36,34,0.12);
}

.card-inner {
  padding: 1.2rem 1.2rem 1rem;
  border-left: 4px solid transparent;
}

.card[data-author="evan"] .card-inner { border-left-color: var(--evan); background: rgba(29,78,137,0.07); }
.card[data-author="laura"] .card-inner { border-left-color: var(--laura); background: rgba(106,44,145,0.07); }
.card[data-author="grace"] .card-inner { border-left-color: var(--grace); background: rgba(200,16,46,0.06); }
.card[data-author="chris"] .card-inner { border-left-color: var(--chris); background: rgba(46,125,50,0.07); }

.card .card-photo {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.card .card-text {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--charcoal);
  margin-bottom: 0.6rem;
}

.card .card-author {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card[data-author="evan"] .card-author { color: var(--evan); }
.card[data-author="laura"] .card-author { color: var(--laura); }
.card[data-author="grace"] .card-author { color: var(--grace); }
.card[data-author="chris"] .card-author { color: var(--chris); }

/* Card number badge */
.card .card-number {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: rgba(43,36,34,0.25);
  margin-bottom: 0.4rem;
}

/* ============================================
   TIMELINE SECTION
   ============================================ */
.timeline-section {
  background: linear-gradient(180deg, var(--cream) 0%, #FFF0D4 50%, var(--cream) 100%);
  padding: 4rem 1.5rem 5rem;
}

.timeline-section .section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.timeline-section .section-header h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--charcoal);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--yellow), var(--coral));
  transform: translateX(-50%);
  border-radius: 3px;
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item .tl-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--orange);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--orange);
  z-index: 2;
}

.timeline-item .tl-photo {
  width: calc(50% - 2.5rem);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(43,36,34,0.12);
  border: 3px solid rgba(255,255,255,0.7);
}

.timeline-item .tl-photo img {
  width: 100%;
  display: block;
}

.timeline-item .tl-spacer {
  width: calc(50% - 2.5rem);
}

/* ============================================
   CLOSE SECTION
   ============================================ */
.close-section {
  background: linear-gradient(135deg, var(--orange) 0%, var(--coral) 50%, var(--yellow) 100%);
  padding: 5rem 2rem;
  text-align: center;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.close-section h2 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #fff;
  text-shadow: 0 3px 20px rgba(43,36,34,0.2);
  margin-bottom: 0.5em;
  line-height: 1.2;
}

.close-section p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.9);
  max-width: 500px;
  line-height: 1.6;
}

.close-section .heart {
  font-size: 2.5rem;
  margin-top: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ============================================
   AUDIO CONTROLS
   ============================================ */
.audio-controls {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  gap: 0.4rem;
}

.audio-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--orange);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(255,122,26,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.15s;
}

.audio-btn:hover {
  background: var(--coral);
  transform: scale(1.08);
}

.audio-btn:active {
  transform: scale(0.95);
}

/* ============================================
   SUN RAY MOTIF (decorative)
   ============================================ */
.sun-rays {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,194,51,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .cards-grid {
    columns: 2;
  }
}

@media (max-width: 650px) {
  .cards-grid {
    columns: 1;
    max-width: 500px;
  }

  /* Porta potty — stack on small screens */
  .porta-potty-photos {
    flex-direction: column;
    align-items: center;
  }

  .porta-potty-photos .pp-photo {
    width: 85%;
    max-width: 300px;
  }

  .porta-potty-photos .pp-photo:nth-child(1),
  .porta-potty-photos .pp-photo:nth-child(2),
  .porta-potty-photos .pp-photo:nth-child(3) {
    transform: rotate(0);
  }

  .pp-videos {
    flex-wrap: wrap;
    gap: 0.8rem;
    overflow-x: visible;
  }

  .pp-videos video {
    width: calc(50% - 0.4rem);
    height: 200px;
  }

  /* Timeline — single column on mobile */
  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
    padding-left: 2.5rem;
  }

  .timeline-item .tl-dot {
    left: 20px;
  }

  .timeline-item .tl-photo {
    width: 100%;
  }

  .timeline-item .tl-spacer {
    display: none;
  }

  .hero-content h1 {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }
}

@media (max-width: 400px) {
  .legend {
    gap: 0.8rem;
  }

  .card-inner {
    padding: 1rem 1rem 0.8rem;
  }
}
