/* ============================================================
   BIRTHDAY INVITATION v2 — STYLE.CSS
   Theme: Feminine Pink Birthday · Mobile-first · Desktop-aware
   ============================================================ */

/* ── FONTS (also in HTML <link>) ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,600&family=Great+Vibes&family=Jost:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  --pink-50: #fff5f8;
  --pink-100: #ffe8f0;
  --pink-200: #ffc9de;
  --pink-300: #ff9abe;
  --pink-400: #f76ca0;
  --pink-500: #e8458a;
  --pink-600: #c42b6e;
  --pink-700: #9e1a54;
  --blush: #fdeef5;
  --rose: #f4b8cc;
  --cream: #fffbf9;
  --white: #ffffff;

  --text-dark: #2e1020;
  --text-mid: #7a3d5c;
  --text-light: #b87098;

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Jost', system-ui, sans-serif;

  --max-mobile: 480px;
  --max-desktop: 1100px;
  --shadow-pink: 0 8px 40px rgba(196, 43, 110, 0.12);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ============================================================
   3. CANVAS LAYERS
   ============================================================ */
#floating-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  width: 100%;
  height: 100%;
}

/* ============================================================
   4. INTRO SCREEN — ENVELOPE
   ============================================================ */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--pink-50);
  overflow: hidden;
  /* smooth fade-out */
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

#intro-screen.closing {
  opacity: 0;
  visibility: hidden;
}

/* ── hero background text watermark ── */
.hero-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  overflow: hidden;
  opacity: 0.04;
  /* extremely subtle watermark */
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, white 15%, white 85%, transparent);
  mask-image: linear-gradient(180deg, transparent, white 15%, white 85%, transparent);
}

.hero-bg-row {
  font-family: var(--font-script);
  font-size: clamp(3rem, 7vw, 5.5rem);
  white-space: nowrap;
  color: var(--pink-600);
  animation: slideText 30s linear infinite;
}

.hero-bg-row:nth-child(even) {
  animation-direction: reverse;
  color: var(--pink-400);
}

@keyframes slideText {
  0% {
    transform: translateX(-20%);
  }

  100% {
    transform: translateX(20%);
  }
}

/* subtle gradient orbs in bg */
#intro-screen::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 154, 190, 0.25) 0%, transparent 70%);
  top: -120px;
  left: -120px;
  pointer-events: none;
}

#intro-screen::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 69, 138, 0.15) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  pointer-events: none;
}

/* ── ribbon at top of intro ── */
.intro-ribbon-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--pink-200), var(--pink-500), var(--pink-300), var(--pink-500), var(--pink-200));
}

/* ── label above envelope ── */
.intro-label {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 24px;
}

.intro-label-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--pink-400);
  margin-bottom: 2px;
}

.intro-label-script {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 9vw, 4.2rem);
  color: var(--pink-600);
  line-height: 1.1;
}

/* ── ENVELOPE ── */
.env-outer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* horizontal ribbon strip across envelope */
.env-ribbon-wrap {
  position: relative;
  width: min(310px, 85vw);
  margin-bottom: -8px;
  z-index: 6;
  pointer-events: none;
}

.env-ribbon-horiz {
  width: 100%;
  height: 16px;
  display: flex;
  align-items: center;
}

.env-ribbon-horiz::before {
  content: '';
  flex: 1;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, var(--pink-400), var(--pink-500), var(--pink-400));
  border-radius: 2px;
}

.env-ribbon-horiz::after {
  content: '';
  flex: 1;
  height: 2.5px;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-500), var(--pink-400), transparent);
  border-radius: 2px;
}

/* bow in center of ribbon */
.env-bow-center {
  flex-shrink: 0;
  padding: 0 4px;
  display: flex;
}

.env-bow-center svg {
  width: 56px;
  height: 36px;
  overflow: visible;
  filter: drop-shadow(0 2px 6px rgba(196, 43, 110, 0.3));
}

/* envelope body */
.envelope {
  position: relative;
  width: min(310px, 85vw);
  cursor: pointer;
  filter: drop-shadow(0 16px 40px rgba(196, 43, 110, 0.2));
  transition: transform 0.3s ease;
}

.envelope:hover {
  transform: translateY(-5px) scale(1.015);
}

.envelope.open {
  z-index: 10;
  /* Bring envelope in front of bow ribbons when opened */
}

/* plain single-color white envelope body */
.env-body {
  position: relative;
  width: 100%;
  padding-top: 64.5%;
  /* 2:3 ratio */
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  overflow: visible;
  border: 1.5px solid #ffccd9;
  border-top: none;
  box-shadow: inset 0 -4px 14px rgba(247, 108, 160, 0.06);
}

.envelope.open .env-body {
  z-index: 5;
  /* Render folds in front of the flap */
}

/* bottom-left fold — soft single shade */
.env-fold-l {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 calc(min(310px, 85vw) * 0.33) calc(min(310px, 85vw) * 0.5);
  border-color: transparent transparent #fff5f8 transparent;
}

/* bottom-right fold — soft single shade */
.env-fold-r {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 calc(min(310px, 85vw) * 0.5) calc(min(310px, 85vw) * 0.33) 0;
  border-color: transparent #fff5f8 transparent transparent;
}

/* flap on top — 1 clean single color (soft pastel pink) */
.env-flap {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  border-left: calc((min(310px, 85vw) + 2px)/2) solid transparent;
  border-right: calc((min(310px, 85vw) + 2px)/2) solid transparent;
  border-top: calc(min(310px, 85vw) * 0.36) solid #ffdeeb;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
  filter: drop-shadow(0 2px 5px rgba(232, 69, 138, 0.12));
}

.envelope.open .env-flap {
  transform: rotateX(-175deg);
  z-index: 1;
  /* Send flap to the back when open */
}

/* wax seal in center */
.env-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -20%);
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 16px rgba(196, 43, 110, 0.35);
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  z-index: 5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.envelope.open .env-seal {
  opacity: 0;
  transform: translate(-50%, -20%) scale(0.8);
}

/* card inside that pops out */
.env-card-inside {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0) scale(0.9);
  width: 95%;
  /* Increased from 90% */
  background: linear-gradient(160deg, #fff8fb, #fff0f5);
  border: 1px dashed var(--pink-300);
  border-radius: 6px;
  padding: 18px 14px 14px;
  text-align: center;
  z-index: 10;
  /* Set z-index to 10 so it sits in front of folds */
  opacity: 0;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.envelope.open .env-card-inside {
  animation: fallDownCard 2.5s forwards;
}

.env-card-emoji {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 4px;
}

.env-card-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
}

.env-card-name {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--pink-600);
  line-height: 1.2;
}

/* guest name tag — positioned at bottom-right with elegant typography */
.env-guest-tag {
  position: absolute;
  bottom: 12px;
  right: 18px;
  left: auto;
  text-align: right;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: #8e3859;
  letter-spacing: 0.02em;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
}

.env-guest-tag strong,
.env-guest-tag #intro-guest-name {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.55rem;
  color: var(--pink-600);
  font-weight: 500;
  line-height: 1;
}

/* hint text */
.env-hint {
  margin-top: 20px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--pink-400);
  letter-spacing: 0.1em;
  animation: hint-pulse 2.2s ease-in-out infinite;
}

@keyframes hint-pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* ============================================================
   5. MAIN PAGE
   ============================================================ */
#main-page {
  display: none;
  position: relative;
  z-index: 2;
}

#main-page.visible {
  display: block;
}

/* ── transition overlay that wipes from intro to main ── */
#transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--pink-50);
  z-index: 4999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#transition-overlay.flash {
  opacity: 1;
}

/* ============================================================
   6. MUSIC BUTTON
   ============================================================ */
#music-toggle {
  position: fixed;
  bottom: 22px;
  right: 18px;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(196, 43, 110, 0.18);
  z-index: 4000;
  border: 1.5px solid var(--pink-200);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

#music-toggle:hover {
  transform: scale(1.1);
}

/* ============================================================
   7. HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 50px;
  background: linear-gradient(170deg, rgba(255, 245, 248, 0.85) 0%, rgba(255, 232, 240, 0.85) 55%, rgba(253, 238, 245, 0.85) 100%);
  position: relative;
  overflow: hidden;
}

/* thin top accent */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pink-200), var(--pink-500), var(--pink-300));
}

/* vertical bow ribbon - sides */
.hero-bow-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  display: none;
  /* Hide on small screens */
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (min-width: 576px) {
  .hero-bow-side {
    display: flex;
  }
}

.hero-bow-side.left {
  left: clamp(16px, 3vw, 40px);
}

.hero-bow-side.right {
  right: clamp(16px, 3vw, 40px);
}

.hero-bow-side-line {
  flex: 1;
  width: 1.5px;
  background: linear-gradient(180deg, transparent, var(--pink-300), var(--pink-400), var(--pink-300), transparent);
}

.hero-bow-side-knot {
  font-size: 1.3rem;
  padding: 4px 0;
  animation: sway 4s ease-in-out infinite;
}

@keyframes sway {

  0%,
  100% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(4deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--pink-500);
  margin-bottom: 8px;
  opacity: 0;
  animation: fade-up 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-script);
  font-size: clamp(3.4rem, 12vw, 6.5rem);
  color: var(--pink-600);
  line-height: 1.05;
  opacity: 0;
  animation: fade-up 0.9s ease 0.4s forwards;
}

/* name — romantic script typography */
.hero-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.6rem, 8.5vw, 4.4rem);
  color: #8e1b52;
  font-weight: normal;
  line-height: 1.15;
  margin: 4px 0 -2px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(142, 27, 82, 0.15);
  opacity: 0;
  animation: fade-up 0.9s ease 0.6s forwards;
}

/* birthdate — refined uppercase tracking */
.hero-birthdate {
  font-family: 'Jost', sans-serif;
  font-size: clamp(0.76rem, 2.5vw, 0.92rem);
  color: var(--pink-500);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  font-weight: 500;
  font-style: normal;
  margin-bottom: 22px;
  opacity: 0;
  animation: fade-up 0.9s ease 0.7s forwards;
}

/* hero photo */
.hero-photo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
  opacity: 0;
  animation: fade-up 1s ease 0.8s forwards;
}

.hero-photo-bow-top {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.hero-photo-bow-top svg {
  width: 70px;
  height: 46px;
  overflow: visible;
  filter: drop-shadow(0 3px 8px rgba(196, 43, 110, 0.25));
}

.hero-photo-frame {
  width: min(200px, 54vw);
  height: min(250px, 67.5vw);
  border-radius: 50% 50% 42% 42% / 42% 42% 30% 30%;
  overflow: hidden;
  border: 5px solid var(--white);
  box-shadow: 0 10px 36px rgba(196, 43, 110, 0.2), 0 0 0 10px var(--pink-100);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* date badge — elegant editorial glass card */
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 3.2vw, 1.22rem);
  color: #7a2245;
  font-weight: 600;
  font-style: italic;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 24px;
  border-radius: 50px;
  border: 1px solid rgba(247, 108, 160, 0.32);
  box-shadow: 0 4px 20px rgba(196, 43, 110, 0.1);
  margin-top: 4px;
  opacity: 0;
  animation: fade-up 0.9s ease 1s forwards;
}

/* guest greeting line */
.hero-guest-line {
  margin-top: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--text-mid);
  font-style: italic;
  display: none;
}

.hero-guest-line .guest-name-display {
  font-family: 'Great Vibes', cursive;
  font-size: 1.75rem;
  color: var(--pink-600);
  font-weight: normal;
  font-style: normal;
  vertical-align: middle;
  margin: 0 4px;
}

/* scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0;
  animation: fade-up 1s ease 1.4s forwards;
}

.scroll-cue-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, var(--pink-400), transparent);
  animation: scline 1.6s ease-in-out infinite;
}

.scroll-cue-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-400);
  animation: bounce-sm 1.6s ease-in-out infinite;
}

@keyframes scline {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@keyframes bounce-sm {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

/* ============================================================
   8. COUNTDOWN — full-width ribbon style
   ============================================================ */
.countdown-section {
  background: rgba(255, 255, 255, 0.82);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* big horizontal bow ribbon — like the reference image */
.ribbon-strip-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  height: 36px;
  pointer-events: none;
}

.ribbon-strip-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink-300), var(--pink-500));
}

.ribbon-strip-line.right-line {
  background: linear-gradient(90deg, var(--pink-500), var(--pink-300), transparent);
}

.ribbon-strip-bow {
  flex-shrink: 0;
  padding: 0 6px;
}

.ribbon-strip-bow svg {
  width: 70px;
  height: 46px;
  overflow: visible;
  filter: drop-shadow(0 3px 8px rgba(196, 43, 110, 0.3));
}

.cd-eyebrow {
  font-family: var(--font-serif);
  font-size: clamp(0.75rem, 2.5vw, 0.95rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.cd-script {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 10vw, 4.8rem);
  color: var(--pink-500);
  line-height: 1;
  margin-bottom: 32px;
}

.cd-script em {
  color: var(--pink-600);
  font-style: normal;
}

.cd-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(40px, 12vw, 70px);
}

.cd-num {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 10vw, 5.2rem);
  font-weight: 500;
  color: #ab2c3f;
  /* warm red/maroon exactly like the image */
  line-height: 1;
}

.cd-lbl {
  display: none;
  /* Hide date labels completely */
}

.cd-colon {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  color: #ab2c3f;
  font-weight: 400;
  padding: 0 clamp(6px, 2.5vw, 20px);
  align-self: center;
  display: inline-block;
  line-height: 1;
}

/* bottom ribbon strip */
.ribbon-strip-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* ============================================================
   9. MESSAGE + PHOTO COLLAGE  (unified section)
   ============================================================ */
.story-section {
  padding: 44px 24px 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 245, 248, 0.82) 100%);
  position: relative;
  overflow: hidden;
}

/* ── Letter-frame message ── */
.letter-wrap {
  max-width: min(520px, 100%);
  margin: 0 auto 64px;
  position: relative;
}

/* SVG letter frame drawn around the text */
.letter-frame-svg {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.letter-body {
  position: relative;
  z-index: 1;
  padding: 36px 32px 28px;
}

@media (max-width: 480px) {
  .letter-body {
    padding: 24px 20px 20px;
  }
}

.letter-greeting {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--pink-500);
  margin-bottom: 12px;
  display: block;
}

.letter-text {
  font-family: var(--font-serif);
  font-size: clamp(0.92rem, 3.2vw, 1.02rem);
  color: var(--text-mid);
  line-height: 1.9;
  font-style: italic;
}

.letter-sig {
  margin-top: 18px;
  display: block;
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--pink-600);
  text-align: right;
}

.letter-dedicated {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  display: none;
}

.letter-dedicated .guest-name-display {
  color: var(--pink-500);
}

/* ── Photo zigzag ── */
.zigzag-wrap {
  max-width: min(560px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.zz-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: z-index 0.3s ease;
}

.zz-item:nth-child(1) {
  z-index: 1;
}

.zz-item:nth-child(2) {
  z-index: 2;
  margin-top: -60px;
}

.zz-item:nth-child(3) {
  z-index: 3;
  margin-top: -60px;
}

.zz-item:hover {
  z-index: 10;
}

.zz-item.r {
  flex-direction: row-reverse;
}

.zz-img-col {
  flex: 0 0 45%;
}

.zz-text-col {
  flex: 1;
  text-align: left;
}

.zz-item.r .zz-text-col {
  text-align: right;
}

/* mobile-specific overrides for compact zigzag */
@media (max-width: 575px) {

  .zz-item:nth-child(2),
  .zz-item:nth-child(3) {
    margin-top: -40px;
    /* pull up lower items to overlap nicely */
  }

  .polaroid {
    padding: 6px 6px 18px !important;
  }

  .polaroid-cap {
    font-size: 0.52rem !important;
    padding-top: 3px !important;
  }

  .arch-frame {
    border-width: 3px !important;
  }

  .circle-frame {
    border-width: 3px !important;
    box-shadow: 0 4px 14px rgba(196, 43, 110, 0.12), 0 0 0 4px var(--pink-100) !important;
  }

  .zz-title {
    font-size: clamp(0.85rem, 3.2vw, 1.05rem) !important;
  }
}

@media (min-width: 576px) {
  .zz-item {
    gap: 32px;
  }

  .zz-img-col {
    flex: 0 0 46%;
  }
}

/* polaroid frame */
.polaroid {
  background: white;
  padding: 9px 9px 28px;
  box-shadow: 0 6px 24px rgba(196, 43, 110, 0.13), 0 2px 8px rgba(0, 0, 0, 0.07);
  transform: rotate(-2.5deg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.zz-item.r .polaroid {
  transform: rotate(2.5deg);
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.03) !important;
  box-shadow: 0 12px 36px rgba(196, 43, 110, 0.2);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.polaroid-cap {
  text-align: center;
  font-family: 'Pacifico', var(--font-body);
  font-size: 0.68rem;
  color: var(--text-mid);
  padding-top: 6px;
  letter-spacing: 0.03em;
}

/* arch photo */
.arch-frame {
  border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 8px 28px rgba(196, 43, 110, 0.16);
  aspect-ratio: 3/4;
  transition: transform var(--transition);
}

.arch-frame:hover {
  transform: translateY(-5px);
}

.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* circle frame */
.circle-frame {
  border-radius: 50%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 5px solid white;
  box-shadow: 0 8px 28px rgba(196, 43, 110, 0.18), 0 0 0 8px var(--pink-100);
  transition: transform var(--transition);
}

.circle-frame:hover {
  transform: scale(1.04);
}

.circle-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zz-text-col {
  flex: 1;
  padding: 4px 2px;
}

.zz-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--pink-400);
  margin-bottom: 5px;
}

.zz-title {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
}

/* decorative SVG doodles near photos */
.doodle {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* ============================================================
   10. LITTLE ME — baby/current grid
   ============================================================ */
.little-me-section {
  padding: 36px 24px 32px;
  background: linear-gradient(180deg, var(--pink-50) 0%, var(--white) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-script-title {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  color: var(--pink-500);
  margin-bottom: 24px;
}

.little-me-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 400px;
  margin: 0 auto;
}

.little-me-grid .polaroid:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
}

.bow-badge {
  position: absolute;
  top: -14px;
  right: -10px;
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(196, 43, 110, 0.25));
  animation: sway 3s ease-in-out infinite;
  z-index: 3;
}

/* ============================================================
   11. CALENDAR & EVENT INFO — editorial style (like ref image 3)
   ============================================================ */
.event-section {
  padding: 44px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 245, 248, 0.82) 60%, rgba(255, 255, 255, 0.82) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.event-script {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  color: var(--pink-500);
  line-height: 1.05;
}

.event-in-month {
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 3vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin: 6px 0 20px;
}

/* editorial vertical connector */
.event-connector {
  width: 1px;
  height: 32px;
  background: var(--text-dark);
  margin: 0 auto 20px;
}

/* CALENDAR — plain editorial, no cards */
.cal-block {
  max-width: min(340px, 100%);
  margin: 0 auto 24px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-bottom: 6px;
}

.cal-wday {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 4px 0;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}

.cal-d {
  font-size: 0.8rem;
  color: var(--text-mid);
  padding: 5px 0;
  line-height: 1;
  font-family: var(--font-body);
}

.cal-d.empty {
  opacity: 0;
}

.cal-d.highlight {
  position: relative;
  color: white;
  font-weight: 700;
  z-index: 0;
}

.cal-d.highlight::before {
  content: '♥';
  position: absolute;
  font-size: 2.5rem;
  color: var(--pink-500);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  line-height: 1;
}

/* event info — editorial plain text, no cards */
.event-info-block {
  max-width: min(360px, 100%);
  margin: 28px auto 0;
}

.event-divider {
  width: 1px;
  height: 28px;
  background: var(--text-dark);
  margin: 0 auto 14px;
}

.event-big-date {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 700;
  color: var(--pink-600);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.event-line {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 5px;
}

.event-line strong {
  font-weight: 600;
  color: var(--text-dark);
  font-style: normal;
}

.event-accent-line {
  width: 40px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-600));
  margin: 10px auto;
  border-radius: 2px;
}

/* ============================================================
   12. TIMELINE — center-line, alternating sides, editorial
   ============================================================ */
.timeline-section {
  padding: 44px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 245, 248, 0.82) 100%);
  position: relative;
  overflow: hidden;
}

.timeline-header {
  text-align: center;
  padding: 0 24px;
  margin-bottom: 52px;
}

/* center vertical line */
.tl-center-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -28px;
  bottom: -28px;
  width: 1px;
  background: #ab2c3f;
  z-index: 1;
}

.tl-items {
  position: relative;
  padding: 0 0 20px;
  max-width: 500px;
  margin: 0 auto;
}

.tl-item {
  display: grid;
  grid-template-columns: 1fr 50px 1fr;
  align-items: center;
  margin-bottom: 40px;
  position: relative;
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-left-content {
  text-align: right;
  padding-right: 14px;
}

.tl-right-content {
  text-align: left;
  padding-left: 14px;
}

.tl-left-space,
.tl-right-space {
  /* empty spacer columns */
}

.tl-dot-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tl-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid #ab2c3f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ab2c3f;
  z-index: 3;
  position: relative;
  box-shadow: 0 0 0 4px var(--cream);
  /* visually breaks the vertical line */
}

.tl-icon-box svg {
  width: 20px;
  height: 20px;
}

/* time text */
.tl-time {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  font-weight: 600;
  color: #ab2c3f;
  line-height: 1.1;
  display: block;
}

.tl-name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ab2c3f;
  margin-top: 3px;
  display: block;
}

.tl-desc {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.4;
}

/* dress code block */
.dressCode-section {
  text-align: center;
  padding: 48px 24px 0;
}

.dc-script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  color: var(--pink-500);
  margin-bottom: 20px;
}

.dc-swatches {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.dc-swatch-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dc-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.11);
  transition: transform 0.25s ease;
}

.dc-swatch:hover {
  transform: scale(1.15);
}

.dc-swatch-name {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  text-transform: uppercase;
}

/* ============================================================
   13. MAP — plain, no card
   ============================================================ */
.map-section {
  padding: 44px 24px;
  background: linear-gradient(180deg, rgba(255, 245, 248, 0.82) 0%, rgba(255, 255, 255, 0.82) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--pink-400);
  margin-bottom: 4px;
}

.section-decor-line {
  width: 40px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-600));
  margin: 0 auto 20px;
  border-radius: 2px;
}

.section-serif-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 28px;
}

.map-embed {
  border-radius: 16px;
  overflow: hidden;
  max-width: min(520px, 100%);
  margin: 0 auto 18px;
  border: 3px solid white;
  box-shadow: var(--shadow-pink);
}

.map-embed iframe {
  width: 100%;
  height: 230px;
  display: block;
  border: 0;
}

.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: white;
  border-radius: 50px;
  padding: 12px 26px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 20px rgba(196, 43, 110, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-map:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(196, 43, 110, 0.38);
}

.map-note {
  max-width: min(440px, 100%);
  margin: 16px auto 0;
  font-family: var(--font-serif);
  font-size: 0.84rem;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.7;
}

.map-phone {
  color: var(--pink-600);
  font-style: normal;
  font-weight: 600;
}

/* ============================================================
   14. RSVP — transparent bg, content floats over petals
   ============================================================ */
.rsvp-section {
  padding: 44px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 245, 248, 0.82) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rsvp-inner {
  max-width: min(480px, 100%);
  margin: 0 auto;
}

.rsvp-script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 7vw, 3rem);
  color: var(--pink-500);
  margin-bottom: 4px;
}

.rsvp-sub {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 28px;
}

/* form — minimal, no card container */
.rsvp-form {
  text-align: left;
}

.fg {
  margin-bottom: 16px;
}

.fg label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 7px;
}

.fg input,
.fg textarea,
.fg select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--pink-200);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.fg input:focus,
.fg textarea:focus,
.fg select:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(232, 69, 138, 0.12);
  background: white;
}

.fg textarea {
  min-height: 90px;
  resize: vertical;
}

.btn-rsvp {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: white;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(196, 43, 110, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-rsvp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(196, 43, 110, 0.38);
}

.form-msg {
  margin-top: 12px;
  font-size: 0.82rem;
  text-align: center;
  min-height: 20px;
  color: var(--pink-600);
  font-weight: 500;
}

/* ============================================================
   15. GUESTBOOK
   ============================================================ */
.guestbook-section {
  padding: 44px 0;
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.guestbook-section .section-inner {
  padding: 0 24px;
  margin-bottom: 24px;
}

#gb-loading,
#gb-empty {
  font-size: 0.84rem;
  color: var(--text-light);
  padding: 16px 24px;
}

.gb-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 24px 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: auto !important;
}

.gb-track::-webkit-scrollbar {
  display: none;
}

.gb-card {
  flex: 0 0 min(250px, 70vw);
  background: linear-gradient(140deg, var(--pink-50), #fff8fb);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: left;
  transition: transform 0.25s ease;
  border-top: 3px solid var(--pink-200);
}

.gb-card:hover {
  transform: translateY(-3px);
}

.gb-name {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.gb-msg {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 10px;
}

.gb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  color: var(--text-light);
}

.gb-badge {
  font-size: 0.63rem;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
}

.gb-badge.a {
  background: #e8f5e9;
  color: #2e7d32;
}

.gb-badge.n {
  background: #fce4ec;
  color: #c62828;
}

/* ============================================================
   16. FOOTER
   ============================================================ */
.footer {
  background-image: url('../assets/images/photo7.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 135px 24px 30px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 238, 244, 0.62);
  /* clearer background photo while maintaining text legibility */
  z-index: -1;
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink-300), var(--pink-500), var(--pink-300));
  z-index: 2;
}

.footer-bow {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 12px;
}

.footer-ty {
  font-family: var(--font-script);
  font-size: clamp(3rem, 10vw, 4.8rem);
  color: var(--pink-600);
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95);
}

.footer-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.2rem, 7.5vw, 3.4rem);
  color: #8e1b52;
  font-weight: normal;
  line-height: 1.1;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95);
}

.footer-sub {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 12px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
}

.footer-dedicated {
  font-size: 0.82rem;
  color: var(--text-mid);
  font-style: italic;
  display: none;
}

.footer-dedicated .guest-name-display {
  color: var(--pink-600);
  font-weight: 600;
}

.footer-credit {
  width: calc(100% + 48px);
  margin: 40px -24px -30px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.68rem;
  line-height: 1.3;
  color: #555555;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}

.footer-credit a {
  color: var(--pink-600);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

.footer-credit a:hover {
  text-decoration: underline;
  color: var(--pink-700);
}

.footer-deco {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.35;
  color: var(--pink-400);
  pointer-events: none;
}

/* ============================================================
   17. SCROLL REVEAL (custom AOS)
   ============================================================ */
[data-aos] {
  opacity: 0;
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-aos="fade-up"] {
  transform: translateY(32px);
}

[data-aos="fade-left"] {
  transform: translateX(32px);
}

[data-aos="fade-right"] {
  transform: translateX(-32px);
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
}

[data-aos].aos-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   18. KEYFRAMES
   ============================================================ */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float-gentle {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes fallDownCard {
  0% {
    transform: translateX(-50%) translateY(0) scale(0.9);
    opacity: 0;
    z-index: 2;
  }

  20% {
    transform: translateX(-50%) translateY(-110%) scale(0.95);
    opacity: 1;
    z-index: 2;
  }

  25% {
    transform: translateX(-50%) translateY(-110%) scale(0.95);
    opacity: 1;
    z-index: 10;
  }

  60% {
    transform: translateX(-50%) translateY(-52%) scale(1.05);
    opacity: 1;
    z-index: 10;
  }

  100% {
    transform: translateX(-50%) translateY(-52%) scale(1.05);
    opacity: 1;
    z-index: 10;
  }
}

/* ============================================================
   19. DESKTOP LAYOUT (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {

  /* hero wider */
  .hero {
    padding: 70px 60px 60px;
  }

  .hero-photo-frame {
    width: 240px;
    height: 300px;
  }

  .hero-eyebrow {
    margin-bottom: 16px;
  }

  .hero-subtitle {
    margin: 12px 0 36px;
  }

  .hero-photo-wrap {
    margin-bottom: 32px;
  }

  /* countdown wider */
  .countdown-section {
    padding: 50px 60px;
  }

  .cd-num {
    font-size: 5.5rem;
  }

  .cd-colon {
    font-size: 4rem;
  }

  /* story — two-column zigzag wider */
  .story-section {
    padding: 60px 60px 50px;
  }

  .letter-wrap {
    max-width: 620px;
  }

  .zigzag-wrap {
    max-width: 680px;
  }

  .zz-item {
    gap: 32px;
  }

  .zz-item:nth-child(2),
  .zz-item:nth-child(3) {
    margin-top: -80px;
  }

  /* event section */
  .event-section {
    padding: 60px 60px;
  }

  .cal-block {
    max-width: 380px;
  }

  .event-big-date {
    font-size: 3rem;
  }

  /* timeline overrides for larger displays */
  .tl-items {
    max-width: 600px;
  }

  .tl-left-content {
    padding-right: 28px;
  }

  .tl-right-content {
    padding-left: 28px;
  }

  .tl-icon-box {
    width: 48px;
    height: 48px;
    box-shadow: 0 0 0 5px var(--cream);
  }

  .tl-icon-box svg {
    width: 24px;
    height: 24px;
  }

  /* map */
  .map-embed iframe {
    height: 300px;
  }

  /* rsvp */
  .rsvp-section {
    padding: 60px 60px;
  }

  .rsvp-inner {
    max-width: 560px;
  }

  /* guestbook cards a bit wider */
  .gb-card {
    flex: 0 0 300px;
  }

  /* footer */
  .footer {
    padding: 140px 60px 30px;
    min-height: 460px;
    justify-content: flex-end;
  }

  .footer-ty {
    font-size: 6rem;
  }
}

@media (min-width: 992px) {

  /* On very wide screens, story section goes 2-col */
  .story-section {
    padding: 70px 80px 70px;
  }

  .story-desktop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    max-width: var(--max-desktop);
    margin: 0 auto;
  }

  .letter-wrap {
    max-width: 100%;
    margin-bottom: 0;
  }

  .zigzag-wrap {
    max-width: 100%;
  }

  /* event grid */
  .event-desktop-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0 48px;
    align-items: center;
    max-width: var(--max-desktop);
    margin: 40px auto 0;
  }

  .event-divider-v {
    display: block;
    width: 1px;
    align-self: stretch;
    background: var(--pink-200);
  }

  /* timeline */
  .tl-item {
    padding: 0 100px;
  }

  /* rsvp inner max */
  .rsvp-inner {
    max-width: 640px;
  }
}

/* ============================================================
   20. UTILITY & MISC
   ============================================================ */
.section-inner {
  max-width: var(--max-mobile);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .section-inner {
    max-width: 600px;
  }
}

@media (min-width: 1100px) {
  .section-inner {
    max-width: 760px;
  }
}

.text-center {
  text-align: center;
}

/* countdown past */
.countdown-past {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--pink-500);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* small phones */
@media (max-width: 360px) {
  .cd-num {
    font-size: 2.2rem;
  }

  .tl-item {
    padding: 0 16px;
  }
}

/* ── transition overlay (added) ── */
#transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--pink-50);
  z-index: 4999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}

/* ── little-me inside story-section ── */
.little-me-section {
  padding: 32px 0 0;
  background: transparent;
  text-align: center;
}

.little-me-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 380px;
  margin: 0 auto;
  padding: 0 20px;
}

.little-me-grid .polaroid:first-child {
  grid-row: 1 / 3;
}

.polaroid.tilt-right {
  transform: rotate(2deg);
}

.polaroid.tilt-right:hover {
  transform: rotate(0deg) scale(1.03) !important;
}

@media (min-width: 768px) {
  .little-me-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 720px;
  }

  .little-me-grid .polaroid:first-child {
    grid-row: auto;
  }
}

/* event desktop vertical divider (deprecated) */
.event-divider-v {
  display: none;
}

/* hero 2-column layout on desktop */
@media (min-width: 992px) {
  .hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
      "eyebrow photo"
      "title photo"
      "name photo"
      "birthdate photo"
      "guest photo"
      "date photo";
    gap: 0 44px;
    align-items: center;
    max-width: 940px;
    text-align: left;
    margin: 0 auto;
    padding: 0 16px;
  }

  .hero-eyebrow {
    grid-area: eyebrow;
    text-align: left;
    margin-bottom: 8px;
  }

  .hero-title {
    grid-area: title;
    text-align: left;
    font-size: clamp(3.2rem, 4.8vw, 4.8rem) !important;
    margin-bottom: 0;
  }

  .hero-name {
    grid-area: name;
    text-align: left;
    font-size: clamp(1.8rem, 2.8vw, 2.5rem) !important;
    margin: 4px 0 2px !important;
  }

  .hero-birthdate {
    grid-area: birthdate;
    text-align: left;
    margin-bottom: 20px !important;
  }

  .hero-guest-line {
    grid-area: guest;
    text-align: left !important;
    margin-top: 6px !important;
    margin-bottom: 12px !important;
  }

  .hero-date {
    grid-area: date;
    text-align: left;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
  }

  .hero-photo-wrap {
    grid-area: photo;
    margin-bottom: 0 !important;
    justify-self: center;
  }
}

/* ============================================================
   MUSIC TOGGLE BUTTON — Circular Gold & Wine Red Style
   ============================================================ */
.music-toggle-btn {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  background: radial-gradient(circle at 35% 35%, #7a1b41 0%, #4a0d24 85%);
  border: 2px solid #d4af37;
  box-shadow: 0 6px 20px rgba(74, 13, 36, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  outline: none;
  user-select: none;
  touch-action: manipulation;
  will-change: transform;
}

.music-toggle-btn:hover {
  transform: translateY(-3px) scale(1.08);
  border-color: #f3e096;
  box-shadow: 0 10px 25px rgba(74, 13, 36, 0.6), 0 0 15px rgba(212, 175, 55, 0.35);
}

.music-toggle-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Inner Gold Circle Ring */
.music-btn-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.3s ease;
}

/* Muted State Icon (Gold Music Note with Slash) */
.music-icon-muted {
  width: 21px;
  height: 21px;
  color: #e2b474;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: block;
}

/* Equalizer Bars Container */
.music-equalizer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.music-equalizer .eq-bar {
  width: 3px;
  height: 14px;
  background: #e2b474;
  border-radius: 3px;
  transform-origin: bottom;
}

/* WHEN PLAYING */
.music-toggle-btn.playing {
  border-color: #e2b474;
  box-shadow: 0 0 20px rgba(226, 180, 116, 0.45), 0 6px 20px rgba(74, 13, 36, 0.5);
}

.music-toggle-btn.playing .music-icon-muted {
  opacity: 0;
  transform: scale(0.5);
}

.music-toggle-btn.playing .music-equalizer {
  opacity: 1;
  transform: scale(1);
}

.music-toggle-btn.playing .bar-1 {
  animation: barPulse1 0.8s ease-in-out infinite alternate;
}

.music-toggle-btn.playing .bar-2 {
  animation: barPulse2 1.1s ease-in-out infinite alternate 0.15s;
}

.music-toggle-btn.playing .bar-3 {
  animation: barPulse3 0.9s ease-in-out infinite alternate 0.3s;
}

.music-toggle-btn.playing .bar-4 {
  animation: barPulse4 1.2s ease-in-out infinite alternate 0.45s;
}

@keyframes barPulse1 {
  0% {
    height: 4px;
  }

  100% {
    height: 16px;
  }
}

@keyframes barPulse2 {
  0% {
    height: 8px;
  }

  100% {
    height: 18px;
  }
}

@keyframes barPulse3 {
  0% {
    height: 14px;
  }

  100% {
    height: 6px;
  }
}

@keyframes barPulse4 {
  0% {
    height: 5px;
  }

  100% {
    height: 15px;
  }
}

@media (max-width: 480px) {
  .music-toggle-btn {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
  }

  .music-btn-inner {
    width: 36px;
    height: 36px;
  }

  .music-icon-muted {
    width: 19px;
    height: 19px;
  }
}

/* ============================================================
   IMAGE LIGHTBOX MODAL
   ============================================================ */
.hero-photo-frame img,
.polaroid img,
.arch-frame img,
.circle-frame img {
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-photo-frame img:hover,
.polaroid img:hover,
.arch-frame img:hover,
.circle-frame img:hover {
  transform: scale(1.04);
  filter: brightness(1.03);
}

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 5, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 700px);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.88);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 12px;
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(85vh - 50px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pink-600);
  color: white;
  border: 2px solid white;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 5;
}

.lightbox-close:hover {
  transform: scale(1.1);
  background: var(--pink-700);
}

.lightbox-caption {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-style: italic;
  letter-spacing: 0.04em;
}