/* ═══════════════════════════════════════════
   David & Pérola — Wedding Site
   Cottagecore · Sage · Ivory · Gold
   Mirrors the finca-demo structure & palette
   ═══════════════════════════════════════════ */

:root {
  /* Palette — matches the demo's HSL tokens */
  --ivory:       #f5f0e6;     /* 40 39% 91% */
  --ivory-deep:  #ede5d6;     /* 40 35% 88% */
  --cream:       #f5f0e8;
  --sage-dark:   #36462f;     /* 100 15% 24% */
  --sage:        #7a8a68;     /* 77 15% 50% */
  --sage-light:  #b5b6a6;     /* 60 12% 69% */
  --sage-pale:   #DAD7CD;
  --olive:       #6b7756;     /* 72 16% 43% — countdown bg */
  --gold:        #eba923;     /* 42 85% 55% */
  --gold-soft:   #d4b46a;
  --terracotta:  #8b3a2f;
  --carbon:      #2a2a2a;

  --text:        #36462f;
  --text-light:  #5a6750;
  --text-muted:  #8a9480;

  /* Fonts */
  --font-display: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  --font-body:    'Lora', Georgia, serif;
  --font-script:  'Monsieur La Doulaise', cursive;

  /* Transitions */
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
  --ease-bounce: cubic-bezier(.68, -.55, .265, 1.55);

  /* Shadows */
  --shadow-soft:    0 2px 15px -3px rgba(58,69,52,.08), 0 4px 6px -2px rgba(58,69,52,.04);
  --shadow-elegant: 0 10px 40px -10px rgba(58,69,52,.15), 0 4px 15px -3px rgba(58,69,52,.08);
  --shadow-lifted:  0 20px 50px -15px rgba(58,69,52,.2), 0 8px 20px -5px rgba(58,69,52,.1);

  --container: 1100px;
  --section-pad: clamp(5rem, 12vw, 9rem);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--ivory);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
.hidden { display: none !important; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.4s var(--ease-smooth);
  white-space: nowrap;
}
.btn-sm { padding: 0.65rem 1.4rem; font-size: 0.7rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--sage-dark);
  color: var(--ivory);
  border: 1px solid var(--sage-dark);
}
.btn-primary:hover {
  background: var(--sage);
  border-color: var(--sage);
  transform: translateY(-1px);
  box-shadow: var(--shadow-elegant);
}
.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1px solid rgba(54,70,47,0.4);
}
.btn-outline:hover {
  background: var(--sage-dark);
  color: var(--ivory);
  border-color: var(--sage-dark);
}

/* ═══════════════════════════════════════════
   INTRO — ENVELOPE OVERLAY
   ═══════════════════════════════════════════ */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(235,169,35,0.05), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(122,138,104,0.06), transparent 60%),
    linear-gradient(160deg, #f5f0e8 0%, #ede5d6 50%, #dad3c4 100%);
  transition: opacity 1s var(--ease-smooth), visibility 1s;
}
.intro-overlay.fading { opacity: 0; }
.intro-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Paper texture overlay */
.intro-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(54,70,47,0.02) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(54,70,47,0.015) 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px;
  pointer-events: none;
}

/* Floating petals */
.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.petal {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petalFall linear infinite;
  will-change: transform, opacity;
}
@keyframes petalFall {
  0%   { transform: translateY(-50px) translateX(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.55; }
  50%  { transform: translateY(50vh) translateX(30px) rotate(180deg) scale(1); }
  90%  { opacity: 0.4; }
  100% { transform: translateY(110vh) translateX(-20px) rotate(540deg) scale(0.4); opacity: 0; }
}

.intro-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  width: 100%;
  max-width: 100vw;
}
.intro-pretitle {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards;
}
.intro-caption {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  font-family: var(--font-script);
  font-size: clamp(1.3rem, 3.2vw, 1.8rem);
  color: #6b5538;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  animation: fadeInUp 1s ease 1.2s forwards;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  pointer-events: none;
  z-index: 11;
}
.intro-hint {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 3vh, 2.2rem);
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: clamp(0.55rem, 1.6vw, 0.68rem);
  font-weight: 400;
  letter-spacing: clamp(0.12em, 0.8vw, 0.35em);
  text-transform: uppercase;
  white-space: normal;
  text-align: center;
  max-width: 85vw;
  padding: 0 1rem;
  color: var(--sage);
  text-shadow: 0 1px 10px rgba(245,240,230,0.8);
  opacity: 0;
  z-index: 300;
  animation: fadeInUp 1s ease 1.6s forwards, hintPulse 2.5s ease-in-out 2.4s infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ─── 3D LOVE STORY BOOK ─── */
.book-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2200px;
  opacity: 0;
  /* Centered, with comfortable breathing room on every viewport */
  margin: 0 auto;
  width: min(86vw, 56vh);
  aspect-ratio: 2 / 3;
  max-height: 84vh;
  animation: bookEntrance 1.2s var(--ease-smooth) 0.7s forwards;
}
/* Mobile portrait: width-constrained viewport — let the book use more height */
@media (max-aspect-ratio: 3/4) {
  .book-wrap {
    width: min(88vw, 64vh);
    max-height: 88vh;
  }
}
/* Ultra-narrow phones */
@media (max-width: 480px) {
  .book-wrap {
    width: 90vw;
    max-height: 90vh;
  }
}
@keyframes bookEntrance {
  0%   { opacity: 0; transform: translateY(30px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.book {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease-smooth);
}

/* ─── Gilded page-stack (visible depth on the right edge) ─── */
.book-stack {
  position: absolute;
  top: 1%;
  right: -1px;
  bottom: 1%;
  width: 10px;
  z-index: 2;
  pointer-events: none;
  transform: translateZ(-1px);
}
.book-stack span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  border-radius: 0 3px 3px 0;
  background:
    linear-gradient(90deg,
      rgba(212,180,106,0.0) 0%,
      rgba(212,180,106,0.35) 35%,
      rgba(235,210,170,0.7) 60%,
      rgba(212,180,106,0.45) 90%,
      rgba(120,90,40,0.35) 100%);
  box-shadow: inset 0 0 4px rgba(120,90,40,0.25);
}
.book-stack span:nth-child(1) { right: 0;  transform: translateX(0);      opacity: 1; }
.book-stack span:nth-child(2) { right: 2px;transform: translateX(0);      opacity: 0.85; }
.book-stack span:nth-child(3) { right: 4px;transform: translateX(0);      opacity: 0.7; }
.book-stack span:nth-child(4) { right: 6px;transform: translateX(0);      opacity: 0.55; }
.book-stack span:nth-child(5) { right: 8px;transform: translateX(0);      opacity: 0.4; }
.book-wrap.fading .book-stack { opacity: 0; transition: opacity 1.2s ease; }

/* ─── Silk ribbon bookmark ─── */
.book-ribbon {
  position: absolute;
  top: -6px;
  right: 14%;
  width: clamp(12px, 2.2vmin, 18px);
  height: 64%;
  z-index: 200;
  pointer-events: none;
  background:
    linear-gradient(180deg, #8b3a2f 0%, #a14538 40%, #7a2e25 100%);
  box-shadow:
    0 3px 8px rgba(0,0,0,0.25),
    inset 1px 0 0 rgba(255,255,255,0.12),
    inset -1px 0 0 rgba(0,0,0,0.25);
  transform-origin: top center;
  animation: ribbonSway 5s ease-in-out infinite;
}
.book-ribbon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 6px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.25);
}
.book-ribbon::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 14px;
  background:
    linear-gradient(180deg, #7a2e25 0%, #8b3a2f 70%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 50% 100%, 0 40%);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
}
@keyframes ribbonSway {
  0%, 100% { transform: rotate(-0.6deg); }
  50%      { transform: rotate(0.6deg); }
}
.book-wrap.fading  .book-ribbon,
.book-wrap.opening .book-ribbon {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* ─── Shared leaf rules (cover + pages) ─── */
.book-cover,
.book-page {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}


/* ─── Front cover (custom image) ─── */
.book-cover-front {
  z-index: 100;
  cursor: pointer;
  border-radius: 2px 7px 7px 2px;
  overflow: hidden;
  background: #fbf7ed;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    4px 6px 22px rgba(0,0,0,0.45),
    inset 0 0 40px rgba(0,0,0,0.22),
    inset -2px 0 6px rgba(255,255,255,0.05),
    inset 3px 0 8px rgba(0,0,0,0.35);
  transition: transform 1.1s cubic-bezier(.4, 0, .2, 1),
              box-shadow 0.6s ease;
}
.book-cover-img {
  position: absolute;
  inset: 0;
  background: url('assets/photos/coverbook.PNG') center/cover no-repeat;
  backface-visibility: hidden;
}
/* Names overlay on cover — gold-foil script names, same font stack as the hero */
.book-cover-title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.15rem, 0.6vmin, 0.5rem);
  padding: clamp(1.2rem, 4vmin, 2rem);
  text-align: center;
  z-index: 4;
  pointer-events: none;
  backface-visibility: hidden;
  /* Soft dark halo behind the text so it reads on any cover image */
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.22) 35%, transparent 70%);
}
.book-cover-name {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 11vmin, 5rem);
  font-weight: 400;
  line-height: 0.95;
  color: #ffffff;
  /* Soft, diffuse gray halo — no hard outline. Layered at three scales so
     the title reads on bright and dark backgrounds alike. */
  text-shadow:
    0 0 14px rgba(55,50,45,0.55),
    0 0 32px rgba(45,40,35,0.42),
    0 0 64px rgba(35,30,25,0.30);
}
.book-cover-amp {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 3.2vmin, 1.8rem);
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(55,50,45,0.55),
    0 0 24px rgba(45,40,35,0.42),
    0 0 50px rgba(35,30,25,0.3);
  margin: 0.1rem 0;
}
/* Embossed spine shadow over the image */
.book-cover-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 100%;
  background:
    linear-gradient(90deg,
      rgba(0,0,0,0.45) 0%,
      rgba(0,0,0,0.28) 25%,
      rgba(255,255,255,0.04) 55%,
      rgba(0,0,0,0.12) 75%,
      transparent 100%);
  border-radius: 2px 0 0 2px;
  pointer-events: none;
  z-index: 3;
}
/* Subtle vignette + gold frame over the image */
.book-cover-front::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px 7px 7px 2px;
  box-shadow:
    inset 0 0 70px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(235,210,170,0.22);
  pointer-events: none;
  z-index: 2;
}

/* Cover hover — slight lift */
.book-cover-front:hover {
  box-shadow:
    6px 8px 30px rgba(0,0,0,0.5),
    inset 0 0 40px rgba(0,0,0,0.22),
    inset -2px 0 6px rgba(255,255,255,0.05),
    inset 3px 0 8px rgba(0,0,0,0.35);
}
.book-wrap:hover .book { transform: translateY(-3px); }

/* ─── Back cover — pushed far behind pages, neutral color as a safety net ─── */
.book-cover-back {
  z-index: 0;
  transform: translateZ(-10px);
  background: #fbf7ed;
  border-radius: 2px 7px 7px 2px;
  box-shadow: inset -2px 0 6px rgba(255,255,255,0.04);
}

/* ─── Pages ─── */
.book-page {
  border-radius: 1px 4px 4px 1px;
}

/* Fast-flip whoosh pages (blank, sit below cover, flip rapidly on open) */
.flip-1 { z-index: 99; }
.flip-2 { z-index: 98; }
.flip-3 { z-index: 97; }
.flip-4 { z-index: 97; }
.flip-5 { z-index: 97; }
.flip-6 { z-index: 97; }

/* Photo pages (polaroids) — stacked beneath the flips.
   Higher z-index = on top of the stack (turns first).
   Each un-turned photo is pushed slightly back in Z so only the topmost
   page's front face is visible — this prevents the "stacked/flashing" bug
   where multiple photos are composited on top of each other. */
.photo-1 { z-index: 96; }
.photo-2 { z-index: 95; }
.photo-3 { z-index: 94; }
.photo-4 { z-index: 93; }
.photo-5 { z-index: 92; }
.photo-6 { z-index: 91; }
.photo-7 { z-index: 90; }

/* Hide ALL photo pages' front faces until the book is opening.
   This prevents photo-1 from bleeding through the cover on load. */
/* Hide ALL photo fronts until the cover has fully opened.
   Polaroids are hidden until the last flip page starts turning.
   The .photos-go class is added by JS at that exact moment. */
.book-page.photo .page-front { visibility: hidden; }
.book-wrap.photos-go .book-page.photo .page-front { visibility: visible; }

/* Push each un-turned page back in Z so only the current top page paints.
   The tiny translateZ offset creates a strict stacking order for the GPU
   compositor, preventing all 7 photos from rendering simultaneously. */
.book-page:not(.turned) { transform: translateZ(0px); }
.photo-2:not(.turned) { transform: translateZ(-1px); }
.photo-3:not(.turned) { transform: translateZ(-2px); }
.photo-4:not(.turned) { transform: translateZ(-3px); }
.photo-5:not(.turned) { transform: translateZ(-4px); }
.photo-6:not(.turned) { transform: translateZ(-5px); }
.photo-7:not(.turned) { transform: translateZ(-6px); }

/* Fast-flip pages turn in ~280ms for the whoosh effect.
   The last two flip pages (.flip-5, .flip-6) use a slower transition
   to decelerate into the photo pages. */
.flip {
  transition: transform 0.32s cubic-bezier(.4, 0, .2, 1);
}
/* Last two flips decelerate — slower turn eases into photo pace */
.flip-5 { transition: transform 0.55s cubic-bezier(.4, 0, .2, 1); }
.flip-6 { transition: transform 0.85s cubic-bezier(.4, 0, .2, 1); }

.page-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 1px 4px 4px 1px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #fbf7ed 0%, #f4ecd7 100%);
  box-shadow:
    inset 0 0 40px rgba(120,90,40,0.08),
    inset 8px 0 14px -8px rgba(60,45,20,0.22); /* gutter shadow near spine */
}
.page-face::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 2px;
  background: linear-gradient(90deg, transparent, rgba(120,90,40,0.18));
  pointer-events: none;
}

.page-back {
  transform: rotateY(180deg);
}
.page-back::after {
  /* mirror gutter on backs */
  right: auto; left: 0;
  background: linear-gradient(-90deg, transparent, rgba(120,90,40,0.18));
}

/* ─── Polaroid photo on each photo page ─── */
.polaroid {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  padding: clamp(8px, 1.5vmin, 14px);
  padding-bottom: clamp(34px, 6vmin, 54px);
  background: #fbf7ec;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 18px 36px -16px rgba(54,40,20,0.48),
    0 6px 14px -6px rgba(54,40,20,0.32);
  transform: translate(-50%, -50%) rotate(-2deg);
  will-change: transform;
  /* Isolate as its own compositor layer so ancestor 3D rotations can't force a
     re-decode / re-paint of the photo bitmap (Safari/iOS in particular). */
  isolation: isolate;
  contain: layout paint;
  transform-style: flat;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Alternate tilt per photo for variety */
.photo-1 .polaroid { transform: translate(-50%, -50%) rotate(-2.2deg); }
.photo-2 .polaroid { transform: translate(-50%, -50%) rotate(1.8deg); }
.photo-3 .polaroid { transform: translate(-50%, -50%) rotate(-1.2deg); }
.photo-4 .polaroid { transform: translate(-50%, -50%) rotate(2.4deg); }
.photo-5 .polaroid { transform: translate(-50%, -50%) rotate(-1.7deg); }
.photo-6 .polaroid { transform: translate(-50%, -50%) rotate(1.3deg); }
.photo-7 .polaroid { transform: translate(-50%, -50%) rotate(-2.8deg); }
.photo-8 .polaroid { transform: translate(-50%, -50%) rotate(1.6deg); }
.photo-9 .polaroid { transform: translate(-50%, -50%) rotate(-1.4deg); }

.polaroid-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e6e0cf;
  /* Promote to its own GPU layer; background-image is composited as a bitmap
     texture so ancestor 3D rotations don't re-decode or repaint it.
     (CSS filter removed intentionally — compositor re-runs filters each
      frame, which presents as a flicker during the flip animation.) */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Faint tape strip at the top of each polaroid */
.polaroid::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 64px;
  height: 20px;
  background: linear-gradient(180deg,
    rgba(245,235,200,0.55) 0%,
    rgba(220,205,160,0.5) 50%,
    rgba(245,235,200,0.55) 100%);
  border-left: 1px dashed rgba(180,160,110,0.22);
  border-right: 1px dashed rgba(180,160,110,0.22);
  box-shadow: 0 2px 5px rgba(54,40,20,0.16);
  pointer-events: none;
}
.photo-2 .polaroid::before,
.photo-5 .polaroid::before,
.photo-8 .polaroid::before { transform: translateX(-50%) rotate(3deg); width: 72px; }
.photo-3 .polaroid::before,
.photo-7 .polaroid::before { transform: translateX(-50%) rotate(-5deg); width: 58px; }

/* Page backs — plain cream, no green pattern. Kept visually quiet during flips. */
.page-endpaper {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fbf7ed 0%, #f4ecd7 100%);
}
.endpaper-monogram { display: none; }

/* ─── Page turn states ─── */
.book-cover-front.turned { transform: rotateY(-178deg); z-index: 0; }
.flip-1.turned           { transform: rotateY(-178deg); z-index: 1; }
.flip-2.turned           { transform: rotateY(-178deg); z-index: 2; }
.flip-3.turned           { transform: rotateY(-178deg); z-index: 3; }
.flip-4.turned           { transform: rotateY(-178deg); z-index: 4; }
.flip-5.turned           { transform: rotateY(-178deg); z-index: 5; }
.flip-6.turned           { transform: rotateY(-178deg); z-index: 6; }
/* Once turned, pages flip to the left side. z-index ascends so that
   each newly-turned page stacks on top of previously-turned ones.
   translateZ(0) resets the depth offset used for un-turned stacking. */
.photo-1.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 11; }
.photo-2.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 12; }
.photo-3.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 13; }
.photo-4.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 14; }
.photo-5.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 15; }
.photo-6.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 16; }
.photo-7.turned          { transform: rotateY(-178deg) translateZ(0); z-index: 17; }

/* ─── Book fade out after reading ─── */
.book-wrap.fading {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.4s ease, transform 1.4s ease;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   VENUE REVEAL (behind book, fades in on open)
   ═══════════════════════════════════════════ */
.venue-reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.6s var(--ease-smooth), visibility 1.6s;
  overflow: hidden;
}
.venue-reveal.show {
  opacity: 1;
  visibility: visible;
}
.venue-reveal-img {
  position: absolute;
  inset: -6%;
  background: url('assets/venue.png') center/cover no-repeat;
  filter: saturate(0.95) brightness(0.96);
  transform: scale(1.18);
  transition: transform 8s var(--ease-smooth);
}
.venue-reveal.show .venue-reveal-img {
  transform: scale(1);
}
.venue-reveal-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(15,22,12,0.55) 100%),
    linear-gradient(180deg, rgba(15,22,12,0.15) 0%, transparent 35%, rgba(15,22,12,0.45) 100%);
  pointer-events: none;
}
.venue-reveal-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f5f0e6;
  padding: 2rem 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.4s ease 1s, transform 1.4s ease 1s;
}
.venue-reveal.show .venue-reveal-content {
  opacity: 1;
  transform: translateY(0);
}
.venue-verse-pre {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  letter-spacing: 0.04em;
  max-width: 38ch;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
  margin-bottom: 0.4rem;
}
.venue-verse-ref {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 2.2rem;
}
.venue-names {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 400;
  line-height: 1.05;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
  margin-bottom: 0.6rem;
}
.venue-names span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.55em;
  color: var(--gold-soft);
  padding: 0 0.15em;
}
.venue-date {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.4vw, 0.85rem);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  opacity: 0.92;
}

/* ═══════════════════════════════════════════
   BIRDS (fly across after book opens)
   ═══════════════════════════════════════════ */
.birds {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.birds.show { opacity: 1; }
.bird {
  position: absolute;
  width: 38px;
  height: 19px;
  opacity: 0;
  will-change: transform, opacity;
}
.birds.show .bird { animation-play-state: running; }
.bird-1 {
  top: 22%;
  animation: birdFly1 11s linear 0.2s 1 forwards, birdFlap 0.32s ease-in-out infinite;
}
.bird-2 {
  top: 32%;
  width: 28px; height: 14px;
  animation: birdFly2 13s linear 1.4s 1 forwards, birdFlap 0.4s ease-in-out infinite;
}
.bird-3 {
  top: 18%;
  width: 22px; height: 11px;
  animation: birdFly1 14s linear 2.6s 1 forwards, birdFlap 0.46s ease-in-out infinite;
}
.bird-4 {
  top: 38%;
  width: 32px; height: 16px;
  animation: birdFly2 12s linear 3.4s 1 forwards, birdFlap 0.36s ease-in-out infinite;
}
.bird-5 {
  top: 26%;
  width: 18px; height: 9px;
  animation: birdFly1 15s linear 4.2s 1 forwards, birdFlap 0.5s ease-in-out infinite;
}
@keyframes birdFly1 {
  0%   { transform: translate(-12vw, 0) scale(1); opacity: 0; }
  8%   { opacity: 0.85; }
  50%  { transform: translate(55vw, -8vh) scale(0.92); }
  92%  { opacity: 0.75; }
  100% { transform: translate(118vw, -14vh) scale(0.7); opacity: 0; }
}
@keyframes birdFly2 {
  0%   { transform: translate(118vw, 0) scaleX(-1); opacity: 0; }
  8%   { opacity: 0.85; }
  50%  { transform: translate(55vw, -6vh) scaleX(-1) scale(0.95); }
  92%  { opacity: 0.7; }
  100% { transform: translate(-15vw, -12vh) scaleX(-1) scale(0.7); opacity: 0; }
}
@keyframes birdFlap {
  0%, 100% { transform-origin: center; }
  50%      { filter: brightness(1.1); }
}

/* When book finishes, hide the stage so the venue shows */
.intro-overlay.opened .book-wrap {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.4s ease, transform 1.4s ease;
  pointer-events: none;
}
.intro-overlay.opened .intro-pretitle,
.intro-overlay.opened .intro-hint,
.intro-overlay.opened .intro-caption { opacity: 0 !important; transition: opacity 0.6s ease; }

/* ═══════════════════════════════════════════
   MUSIC TOGGLE (shown after intro)
   ═══════════════════════════════════════════ */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(54,70,47,0.9);
  color: var(--ivory);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
}
.music-toggle.visible {
  opacity: 1;
  transform: scale(1);
}
.music-toggle:hover {
  background: var(--sage-dark);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════
   MAIN SITE
   ═══════════════════════════════════════════ */
.main-site {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease 0.3s;
}
.main-site.visible {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════════
   SECTION DEFAULTS
   ═══════════════════════════════════════════ */
.section { padding: var(--section-pad) 0; position: relative; }
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-illustration {
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: center;
}
.champagne-illo svg { width: clamp(140px, 20vw, 200px); height: auto; }
.party-illo svg { width: clamp(220px, 40vw, 360px); height: auto; }
.rings-illo svg { width: clamp(140px, 20vw, 200px); height: auto; }
.rings-illo-sm svg { width: clamp(120px, 18vw, 170px); height: auto; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.section-title-script {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--sage-dark);
  margin-bottom: 0.25rem;
  line-height: 1.1;
}
.section-title-light { color: var(--ivory); }
.section-sub {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.section-sub-light { color: rgba(245,240,230,0.75); }

/* Elegant divider between sections */
.divider-elegant {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  background: var(--ivory);
}
.divider-elegant span:first-child,
.divider-elegant span:last-child {
  width: clamp(50px, 8vw, 100px);
  height: 1px;
  background: rgba(54,70,47,0.35);
}
.div-star {
  color: rgba(54,70,47,0.5);
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════ */
#lang-nav {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  gap: 0.2rem;
  background: rgba(245,240,230,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.3rem;
  border-radius: 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(54,70,47,0.08);
}
.lang-btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.65rem;
  border-radius: 1.5rem;
  color: var(--text-light);
  transition: all 0.3s ease;
}
.lang-btn.active { background: var(--sage-dark); color: var(--ivory); }
.lang-btn:hover:not(.active) { color: var(--sage-dark); }

/* ═══════════════════════════════════════════
   MAIN NAV
   ═══════════════════════════════════════════ */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 890;
  background: rgba(245,240,230,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(54,70,47,0.08);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-smooth);
}
#main-nav.visible { transform: translateY(0); }
#main-nav ul {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
  padding: 1rem 0;
}
#main-nav a {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color 0.3s ease;
  position: relative;
  padding: 0.25rem 0;
}
#main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--sage-dark);
  transition: width 0.3s ease;
}
#main-nav a:hover::after,
#main-nav a.active::after { width: 100%; }
#main-nav a:hover,
#main-nav a.active { color: var(--sage-dark); }

#menu-toggle {
  display: none;
  position: fixed;
  top: 1.2rem;
  left: 1.5rem;
  z-index: 1001;
  width: 26px;
  height: 18px;
  flex-direction: column;
  justify-content: space-between;
}
#menu-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--sage-dark);
  transition: all 0.3s ease;
  transform-origin: center;
}
#menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: var(--ivory);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  position: absolute;
  inset: -5%;
  background:
    linear-gradient(180deg, rgba(36,46,32,0.25) 0%, rgba(36,46,32,0.55) 100%),
    url('assets/venue.png') center/cover no-repeat;
}
@keyframes heroSlowZoom {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -1%); }
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.55) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.25) 100%);
}

/* Subtle floating particles over hero */
.hero-bg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-bg-particles span {
  position: absolute;
  display: block;
  width: 4px;
  height: 4px;
  background: rgba(235,169,35,0.5);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(235,169,35,0.6);
  animation: particleFloat linear infinite;
}
.hero-bg-particles span:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; }
.hero-bg-particles span:nth-child(2) { left: 22%; animation-duration: 22s; animation-delay: 3s; }
.hero-bg-particles span:nth-child(3) { left: 38%; animation-duration: 15s; animation-delay: 1s; }
.hero-bg-particles span:nth-child(4) { left: 50%; animation-duration: 20s; animation-delay: 5s; }
.hero-bg-particles span:nth-child(5) { left: 62%; animation-duration: 17s; animation-delay: 2s; }
.hero-bg-particles span:nth-child(6) { left: 73%; animation-duration: 24s; animation-delay: 4s; }
.hero-bg-particles span:nth-child(7) { left: 85%; animation-duration: 19s; animation-delay: 1.5s; }
.hero-bg-particles span:nth-child(8) { left: 15%; animation-duration: 26s; animation-delay: 6s; width: 3px; height: 3px; }
.hero-bg-particles span:nth-child(9) { left: 45%; animation-duration: 21s; animation-delay: 7s; width: 3px; height: 3px; }
.hero-bg-particles span:nth-child(10) { left: 78%; animation-duration: 23s; animation-delay: 2.5s; width: 3px; height: 3px; }
@keyframes particleFloat {
  0%   { transform: translateY(110vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 90vw;
}
.hero-pre {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(245,240,230,0.8);
  margin-bottom: 1.8rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.hero-names {
  margin-bottom: 0.5rem;
}
.hero-name {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 11vw, 7rem);
  font-weight: 400;
  color: var(--ivory);
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.hero-amp {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 300;
  color: var(--gold);
  margin: 0.4rem 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem auto;
}
.hero-rule span:first-child,
.hero-rule span:last-child {
  width: clamp(40px, 6vw, 80px);
  height: 1px;
  background: rgba(245,240,230,0.5);
}
.hero-rule .rule-star {
  color: var(--gold);
  font-size: 1rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.hero-date {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(245,240,230,0.9);
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.hero-loc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  color: rgba(245,240,230,0.7);
  letter-spacing: 0.08em;
}

.hero-cta {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--ivory);
  transition: color 0.3s ease;
}
.hero-cta span { padding-left: 0.3em; /* compensate trailing letter-spacing */ }
.hero-cta:hover { color: rgba(245,240,230,0.75); }
.hero-cta span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.cta-arrow {
  animation: ctaBounce 1.5s var(--ease-smooth) infinite;
}
@keyframes ctaBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* Hero animations */
.anim {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeInUp 0.9s var(--ease-smooth) forwards;
}
.anim-d2 { animation-delay: 0.35s; }
.anim-d3 { animation-delay: 0.6s; }
.anim-d4 { animation-delay: 0.85s; }
.anim-d5 { animation-delay: 1.2s; }
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   COUNTDOWN
   ═══════════════════════════════════════════ */
.countdown-section {
  background:
    linear-gradient(135deg, #6b7756 0%, #5a6550 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.countdown-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(235,169,35,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.countdown-section .container { position: relative; z-index: 1; }
.countdown-section .section-title { margin-bottom: 0.5rem; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.8rem, 2vw, 1.8rem);
  max-width: 680px;
  margin: 3rem auto 0;
}
.cd-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: clamp(1.3rem, 3vw, 2.2rem) 0.5rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.cd-card span {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 300;
  color: var(--ivory);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.cd-card small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245,240,230,0.7);
}

/* ═══════════════════════════════════════════
   DETAILS
   ═══════════════════════════════════════════ */
.details { background: var(--ivory); }
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.detail-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(122,138,104,0.25);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth);
}
.detail-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elegant);
}
.detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(122,138,104,0.15);
  color: var(--sage-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.detail-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--sage-dark);
  letter-spacing: 0.01em;
}
.detail-time {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.detail-venue {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
  line-height: 1.6;
}
.detail-address {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-style: italic;
}

/* Location card */
.location-card {
  max-width: 720px;
  margin: 0 auto;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(122,138,104,0.25);
  border-radius: 10px;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.location-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: rgba(122,138,104,0.2);
  color: var(--sage-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.location-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--sage-dark);
  margin-bottom: 1rem;
}
.location-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--sage-dark);
  margin-bottom: 0.25rem;
}
.location-address {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}
.location-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.location-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  background: rgba(122,138,104,0.06);
  border: 1px dashed rgba(122,138,104,0.3);
  border-radius: 8px;
  color: var(--sage);
  margin-bottom: 1.5rem;
}
.location-map p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.location-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   SCHEDULE — Horizontal Timeline
   ═══════════════════════════════════════════ */
.schedule { background: var(--ivory); }
.timeline-h {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 0.5rem;
}
.timeline-line {
  position: absolute;
  top: 62px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(122,138,104,0.4) 10%, rgba(122,138,104,0.4) 90%, transparent);
}
.timeline-h-item {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
  position: relative;
  z-index: 1;
}
.timeline-h-item.visible { opacity: 1; transform: translateY(0); }
.time-pill {
  display: inline-block;
  background: var(--sage-dark);
  color: var(--ivory);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
  transition: background 0.3s ease;
}
.timeline-h-item:hover .time-pill { background: var(--sage); }
.time-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ivory);
  border: 1.5px solid rgba(122,138,104,0.45);
  color: var(--sage-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s var(--ease-smooth);
}
.timeline-h-item:hover .time-icon {
  border-color: var(--sage-dark);
  transform: scale(1.08);
  background: var(--sage-dark);
  color: var(--ivory);
}
.timeline-h-item h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sage-dark);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}
.timeline-h-item p {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* ═══════════════════════════════════════════
   TRAVEL
   ═══════════════════════════════════════════ */
.travel { background: var(--ivory); }
.travel .details-grid { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   GIFTS
   ═══════════════════════════════════════════ */
.gifts { background: var(--ivory); }
.gifts-card {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(122,138,104,0.25);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.gifts-text {
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem) 1.5rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
}
.gifts-toggle {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: rgba(122,138,104,0.08);
  border-top: 1px solid rgba(122,138,104,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-dark);
  transition: background 0.3s ease;
}
.gifts-toggle:hover { background: rgba(122,138,104,0.15); }
.gifts-toggle svg { transition: transform 0.3s ease; }
.gifts-toggle.open svg { transform: rotate(180deg); }
.gifts-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-smooth);
}
.gifts-panel.open { max-height: 300px; }
.gifts-panel-inner {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid rgba(122,138,104,0.15);
  text-align: center;
}
.gifts-panel-inner p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  font-style: italic;
}
.iban {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 1.5rem;
  background: rgba(122,138,104,0.08);
  border: 1px solid rgba(122,138,104,0.2);
  border-radius: 6px;
}
.iban-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
}
.iban-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--sage-dark);
  letter-spacing: 0.08em;
  font-style: italic;
}

/* ═══════════════════════════════════════════
   RSVP
   ═══════════════════════════════════════════ */
.rsvp {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-deep) 100%);
}
.rsvp-form {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(122,138,104,0.25);
  border-radius: 10px;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-elegant);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.55rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--sage-dark);
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(122,138,104,0.3);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(54,70,47,0.08);
}
.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2336462f' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
/* Phone field: country code + number side by side */
.phone-field {
  display: flex;
  gap: 0.5rem;
}
.phone-field select {
  width: auto;
  min-width: 110px;
  flex-shrink: 0;
  padding: 0.85rem 0.6rem;
  padding-right: 2rem;
  font-size: 0.85rem;
}
.phone-field input {
  flex: 1;
  min-width: 0;
}

.radio-group { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radio-label {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text) !important;
  margin: 0 !important;
}
.radio-label input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(122,138,104,0.5);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}
.radio-label input[type="radio"]:checked { border-color: var(--sage-dark); }
.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  background: var(--sage-dark);
  border-radius: 50%;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  cursor: pointer;
}
.chip input { display: none; }
.chip span {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--sage-dark);
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(122,138,104,0.35);
  border-radius: 999px;
  transition: all 0.3s ease;
}
.chip input:checked + span {
  background: var(--sage-dark);
  color: var(--ivory);
  border-color: var(--sage-dark);
}
.chip span:hover { border-color: var(--sage-dark); }

/* RSVP success */
.rsvp-success {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(122,138,104,0.25);
  border-radius: 10px;
  box-shadow: var(--shadow-elegant);
  animation: fadeInUp 0.8s var(--ease-smooth);
}
.success-icon { margin-bottom: 1.5rem; }
.success-title {
  font-family: var(--font-script);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--sage-dark);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}
.rsvp-success p {
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-size: 1.02rem;
  line-height: 1.7;
}
.success-sig {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--sage);
  margin: 1.5rem 0 2rem;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--sage-dark);
  color: rgba(245,240,230,0.85);
}
.footer-heart {
  display: block;
  margin: 0 auto 1.25rem;
  color: rgba(245,240,230,0.7);
}
.footer-names {
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 0.5rem;
}
.footer-date {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  opacity: 0.65;
  margin-bottom: 2rem;
}
.footer-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 0.25rem;
  opacity: 0.8;
}
.footer-verse-ref {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-smooth), transform 0.9s var(--ease-smooth);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.detail-card, .cd-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth), box-shadow 0.5s ease;
}
.detail-card.visible, .cd-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.detail-card.visible { transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth), box-shadow 0.5s ease; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .timeline-h {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 3rem;
  }
  .timeline-line {
    top: 0;
    bottom: 0;
    left: 3rem;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(to bottom, transparent, rgba(122,138,104,0.4) 5%, rgba(122,138,104,0.4) 95%, transparent);
  }
  .timeline-h-item {
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 1.2rem;
    padding: 1rem 0 1.5rem;
    position: relative;
  }
  .timeline-h-item .time-pill {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    align-self: center;
  }
  .timeline-h-item .time-icon {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin: 0;
    width: 44px;
    height: 44px;
  }
  .timeline-h-item h4 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 1.05rem;
  }
  .timeline-h-item p {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  #main-nav {
    position: fixed;
    inset: 0;
    background: rgba(245,240,230,0.98);
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* On mobile, .visible (from scroll) must NOT override the off-screen state.
     Only .mobile-open (from menu button) reveals the nav. */
  #main-nav,
  #main-nav.visible { transform: translateX(-100%); }
  #main-nav.mobile-open { transform: translateX(0) !important; }
  #main-nav ul { flex-direction: column; align-items: center; gap: 1.5rem; }
  #main-nav a { font-size: 0.85rem; letter-spacing: 0.25em; }
  #menu-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .countdown { gap: 0.5rem; }
  #lang-nav { top: 0.8rem; right: 0.8rem; }
  .hero-name { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .music-toggle { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  .cd-card span { font-size: 1.6rem; }
  .radio-group { flex-direction: column; gap: 0.75rem; }
}

/* ═══════════════════════════════════════════
   ▼ ADDITIONS — Story carousel, FAQ, Sticky bar,
     Toast, Open-in-Maps, Companion fields, Polish
   ═══════════════════════════════════════════ */

/* Use dvh for true mobile fullscreen on the hero */
.hero { min-height: 100vh; min-height: 100dvh; }

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ─── Our Story polaroid carousel ─── */
.story {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
  /* Subtle paper-grain backdrop for polaroid corkboard feel */
  position: relative;
}
.story::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.34  0 0 0 0 0.22  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
  opacity: 0.5;
}
.story > .container { position: relative; }

.carousel {
  position: relative;
  margin-top: 2.5rem;
  padding: 0 0 1rem;
}
.carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 3rem 0 4rem;
  /* Allow polaroid tilts to overflow without clipping */
  overflow-y: visible;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-card {
  flex: 0 0 min(78vw, 380px);
  scroll-snap-align: center;
  margin: 0;
  /* Polaroid frame: cream paper, thicker bottom border, soft shadow */
  background: #fbf7ec;
  padding: 14px 14px 50px;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 18px 40px -18px rgba(54,40,20,0.45),
    0 6px 14px -6px rgba(54,40,20,0.3);
  position: relative;
  /* Slight default tilt + scale, exaggerated for non-active cards */
  transform: rotate(-2deg) scale(0.92);
  opacity: 0.7;
  transition:
    transform 0.6s var(--ease-smooth),
    opacity 0.6s var(--ease-smooth),
    box-shadow 0.4s ease;
  cursor: pointer;
  will-change: transform;
}
/* Alternate tilt direction per card for stack feel */
.carousel-card:nth-child(2n)   { transform: rotate(2deg) scale(0.92); }
.carousel-card:nth-child(3n)   { transform: rotate(-1deg) scale(0.92); }
.carousel-card:nth-child(4n)   { transform: rotate(1.5deg) scale(0.92); }

.carousel-card.is-active {
  transform: rotate(0deg) scale(1) !important;
  opacity: 1;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 28px 60px -22px rgba(54,40,20,0.55),
    0 12px 24px -8px rgba(54,40,20,0.35);
  z-index: 2;
}

/* Tape strip on top of each polaroid */
.carousel-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 70px;
  height: 22px;
  background: linear-gradient(180deg,
    rgba(245,235,200,0.55) 0%,
    rgba(220,205,160,0.5) 50%,
    rgba(245,235,200,0.55) 100%);
  border-left: 1px dashed rgba(180,160,110,0.25);
  border-right: 1px dashed rgba(180,160,110,0.25);
  box-shadow: 0 2px 6px rgba(54,40,20,0.18);
  pointer-events: none;
}
.carousel-card:nth-child(2n)::before { transform: translateX(-50%) rotate(2deg); width: 60px; }
.carousel-card:nth-child(3n)::before { transform: translateX(-50%) rotate(-2deg); width: 80px; }
.carousel-card:nth-child(4n)::before { transform: translateX(-50%) rotate(4deg); width: 65px; }

.carousel-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #ddd;
  /* Slight desaturation so all photos feel like a set */
  filter: saturate(0.95) contrast(1.02);
}
.carousel-card figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.35rem;
  line-height: 1.1;
  color: #4a3a22;
  /* Faux handwritten ink color */
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(245,240,230,0.92);
  color: var(--sage-dark);
  box-shadow: var(--shadow-soft);
  display: none; /* hidden on mobile, shown >=720 */
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-arrow:hover { background: var(--sage-dark); color: var(--ivory); transform: translateY(-50%) scale(1.06); }
.carousel-prev { left: 0.25rem; }
.carousel-next { right: 0.25rem; }
@media (min-width: 720px) {
  .carousel-arrow { display: flex; }
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(122,138,104,0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.carousel-dot.is-active {
  background: var(--sage-dark);
  width: 24px;
  border-radius: 4px;
}

/* ─── Mobile sticky RSVP bar ─── */
.sticky-rsvp {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 880;
  padding: 0.95rem 2.2rem;
  background: var(--sage-dark);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 12px 30px -8px rgba(54,70,47,0.45);
  transition: transform 0.5s var(--ease-smooth), opacity 0.4s ease;
  opacity: 0;
}
.sticky-rsvp.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.sticky-rsvp.hide-now {
  transform: translateX(-50%) translateY(120%);
  opacity: 0;
}
@media (min-width: 900px) {
  .sticky-rsvp { display: none; } /* desktop has the top nav */
}

/* ─── Toast notifications ─── */
.toast-container {
  position: fixed;
  top: max(1.25rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 2rem);
}
.toast {
  background: rgba(54,70,47,0.95);
  color: var(--ivory);
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transform: translateY(-20px);
  opacity: 0;
  animation: toastIn 0.4s var(--ease-smooth) forwards;
}
.toast.toast-out { animation: toastOut 0.35s var(--ease-smooth) forwards; }
.toast.toast-error { background: rgba(139,58,47,0.95); }
.toast.toast-success { background: rgba(54,70,47,0.95); }
@keyframes toastIn  { to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0; } }

/* ─── IBAN copy button ─── */
.iban {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.iban-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(122,138,104,0.12);
  color: var(--sage-dark);
  transition: background 0.2s ease, transform 0.2s ease;
}
.iban-copy:hover { background: var(--sage-dark); color: var(--ivory); transform: scale(1.05); }
.iban-copy:active { transform: scale(0.95); }

/* ─── Companion name fields ─── */
#companions-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
#companions-container input {
  /* inherits .form-group input styles */
}

/* ─── Word-stagger title animation ─── */
.section-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}
.section-title.in-view .word {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Animated SVG botanical divider (replaces ✻) ─── */
.divider-elegant svg.botanical {
  width: clamp(80px, 14vw, 140px);
  height: auto;
}
.divider-elegant svg.botanical path,
.divider-elegant svg.botanical line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.6s var(--ease-smooth);
}
.divider-elegant.in-view svg.botanical path,
.divider-elegant.in-view svg.botanical line {
  stroke-dashoffset: 0;
}

/* ─── Countdown digit flip-ish pulse ─── */
.cd-card span.tick {
  animation: cdTick 0.5s var(--ease-smooth);
}
@keyframes cdTick {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-4px); opacity: 0.6; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ─── Reduce motion: kill the heaviest stuff ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .birds, .petals { display: none !important; }
}

/* ─── Mobile final tweaks ─── */
@media (max-width: 720px) {
  .carousel-card {
    flex-basis: 76vw;
    padding: 12px 12px 56px;
  }
  .carousel-card img { aspect-ratio: 5 / 6; }
  .carousel-card figcaption { font-size: 1.15rem; }
  .footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom) + 70px); }
}

/* Landscape mobile: hero would otherwise blow up */
@media (orientation: landscape) and (max-height: 520px) {
  .hero-name { font-size: clamp(2rem, 9vh, 3.2rem) !important; }
  .hero-amp  { font-size: clamp(1.5rem, 7vh, 2.5rem); }
  .hero-pre, .hero-date, .hero-loc { font-size: 0.65rem; }
  .hero-cta { bottom: 1rem; }
}

/* ═══════════════════════════════════════════
   LIGHTBOX (tap-to-zoom carousel photos)
   ═══════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(20,18,12,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
  transform: scale(0.92);
  transition: transform 0.4s var(--ease-smooth);
}
.lightbox.open .lightbox-img { transform: scale(1); }
.lightbox-caption {
  position: absolute;
  bottom: max(2.5rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: rgba(245,240,230,0.9);
  text-align: center;
  max-width: 90vw;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.22); transform: scale(1.06); }
.lightbox-close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
.lightbox-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

/* ═══════════════════════════════════════════
   UX POLISH — hero contrast, section bleeds, focus, skip link
   ═══════════════════════════════════════════ */

/* Hero text contrast — radial darken behind hero-content only */
.hero-content {
  position: relative;
}
.hero-content::before {
  content: '';
  position: absolute;
  inset: -10% -15%;
  background: radial-gradient(ellipse at center, rgba(15,20,10,0.55) 0%, rgba(15,20,10,0.25) 45%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

/* Soft section bleeds — top edge gradient on alternating sections */
.section.story::after,
.section.travel::after,
.section.gifts::after,
.section.rsvp::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 60px;
  background: linear-gradient(180deg, var(--ivory) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.section { position: relative; }

/* Focus visible — clear keyboard outlines */
:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 2px;
}
button:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}
.carousel-card:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 6px;
}

/* Skip-to-content link for keyboard users */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  background: var(--sage-dark);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  z-index: 9999;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: top 0.3s ease;
}
.skip-link:focus { top: 1rem; }

/* ═══════════════════════════════════════════
   DETAILS — Location + Dress Code pair
   ═══════════════════════════════════════════ */
/* Details of the Day — vertical stack: [Map + location info] then [Dress code] */
.details-pair {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}
.details-pair .location-card {
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.details-pair .location-body {
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
  text-align: center;
}
.details-pair .location-icon { margin-bottom: 1rem; }
.location-map-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e8e4d8;
  position: relative;
}
.location-map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Dress code card — sits below the map, centered, clearly readable */
.dresscode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.25rem) clamp(1.25rem, 3vw, 1.75rem);
}
.dresscode-card .detail-icon { margin-bottom: 1rem; }
.dresscode-card h3 { margin-bottom: 0.9rem; }
/* Make the main dress-code line the visible headline, not a tiny eyebrow */
.dresscode-card .detail-time {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--sage-dark);
  font-weight: 500;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.dresscode-card .detail-venue {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
  max-width: 36ch;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   TRAVEL — accommodation trigger button
   ═══════════════════════════════════════════ */
.accom-trigger {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* ═══════════════════════════════════════════
   ACCOMMODATION MODAL
   ═══════════════════════════════════════════ */
:root {
  --wed-green-modal: #2d3b2d;
  --wed-green-light: #4a5e4a;
  --wed-muted-modal: #7a7a6e;
  --wed-border-modal: rgba(45,59,45,0.15);
  --wed-border-hover-modal: rgba(45,59,45,0.3);
}

.accom-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(20,25,20,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 3vw, 1.5rem);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.accom-overlay[hidden] { display: none; }
.accom-overlay.open { opacity: 1; }

.accom-modal {
  background: #fff;
  border-radius: 14px;
  border: 0.5px solid var(--wed-border-modal);
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35), 0 12px 24px -12px rgba(0,0,0,0.25);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s var(--ease-smooth);
}
.accom-overlay.open .accom-modal { transform: translateY(0) scale(1); }

.accom-header {
  padding: 1.1rem 1.4rem 0.9rem;
  border-bottom: 0.5px solid var(--wed-border-modal);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.accom-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--wed-green-modal);
}
.accom-sub {
  font-size: 0.78rem;
  color: var(--wed-muted-modal);
  margin-top: 3px;
}
.accom-close {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--wed-muted-modal);
  padding: 0 6px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.accom-close:hover { color: var(--wed-green-modal); }

.accom-map {
  width: 100%;
  height: 220px;
  background: #e8e4d8;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.accom-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.accom-body {
  padding: 1.1rem 1.4rem 1.4rem;
  overflow-y: auto;
}

.accom-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--wed-muted-modal);
  margin-bottom: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.legend-dot-gold  { background: var(--gold); }
.legend-dot-green { background: var(--wed-green-modal); }

.accom-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.accom-filter {
  font-size: 0.72rem;
  padding: 5px 14px;
  border-radius: 20px;
  border: 0.5px solid var(--wed-border-hover-modal);
  background: transparent;
  color: var(--wed-muted-modal);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}
.accom-filter:hover { color: var(--wed-green-modal); }
.accom-filter.active {
  background: var(--wed-green-modal);
  color: #fff;
  border-color: var(--wed-green-modal);
}

.accom-section-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wed-muted-modal);
  margin-bottom: 0.5rem;
}

.accom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 9px;
}
.h-card {
  border: 0.5px solid var(--wed-border-modal);
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  display: block;
  cursor: pointer;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.h-card:hover {
  border-color: var(--wed-green-light);
  background: #fafaf8;
  transform: translateY(-1px);
}
.h-card[data-hidden] { display: none; }

.hc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 5px;
}
.hc-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--wed-green-modal);
  line-height: 1.3;
  flex: 1;
}
.hc-badge {
  font-size: 0.6rem;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-belem   { background: #eef3ee; color: var(--wed-green-light); }
.badge-central { background: #f5f2e8; color: #7a6a30; }
.badge-airbnb  { background: #fff0ee; color: #c0451a; }
.badge-booking { background: #eef2ff; color: #2d3a9e; }

.hc-desc {
  font-size: 0.72rem;
  color: var(--wed-muted-modal);
  line-height: 1.5;
  margin-bottom: 8px;
}
.hc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.hc-rating {
  font-size: 0.68rem;
  color: var(--wed-green-modal);
  font-weight: 500;
}
.hc-stars {
  color: var(--wed-muted-modal);
  font-weight: 400;
}
.hc-link {
  font-size: 0.68rem;
  color: var(--wed-muted-modal);
  border: 0.5px solid var(--wed-border-modal);
  border-radius: 20px;
  padding: 3px 9px;
  white-space: nowrap;
}
.h-card:hover .hc-link {
  border-color: var(--wed-border-hover-modal);
  color: var(--wed-green-modal);
}

body.accom-open { overflow: hidden; }
