:root {
  --ink: #22332a;
  --evergreen: #374e3f;
  --sage: #aebba3;
  --leaf: #697d60;
  --paper: #fffdf7;
  --warm-paper: #f8f4ec;
  --blush: #e8c7be;
  --gold: #b2873c;
  --gold-light: #f4d48e;
  --script: "Allura", cursive;
  --display-script: "Great Vibes", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--warm-paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, a {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Main scrollable invitation app */
.invite-app {
  position: relative;
  height: 100vh; /* fallback for browsers without dvh (iOS < 15.4) */
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #dbe5d9;
}

.invite-app::-webkit-scrollbar {
  display: none;
}

/* Subtle grain overlay */
.invite-app::before {
  content: "";
  position: fixed;
  z-index: 25;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* Base Scene definitions - each scene is a discrete full-height chapter */
.scene {
  position: relative;
  min-height: 100vh; /* fallbacks for browsers without dvh (iOS < 15.4) */
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) clamp(16px, 4vw, 32px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}

/* Paper card containers */
.paper-panel {
  position: relative;
  width: min(440px, 100%);
  text-align: center;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 16px 45px rgba(45, 60, 48, 0.14), 0 2px 10px rgba(45, 60, 48, 0.06);
  transition: opacity 0.85s cubic-bezier(0.2, 0.75, 0.25, 1), transform 0.85s cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* Hidden-until-revealed only when JS is running, so the invite never renders blank */
.js .paper-panel {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
}

.scene.in-view .paper-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.micro-copy {
  margin: 0;
  color: var(--evergreen);
  font: 600 10px/1.3 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.script-line {
  margin: 10px 0 4px;
  color: var(--gold);
  font: clamp(28px, 6vw, 38px)/1 var(--script);
}

/* ============================================================
   1. COVER / WELCOME SCENE
   ============================================================ */
.welcome-scene {
  isolation: isolate;
  background: #f7e8c9;
  justify-content: center;
}

.welcome-scene::before {
  position: absolute;
  z-index: 0;
  inset: -2%;
  content: "";
  transform: scale(1.02);
  background: url("img/cover.jpg") center/cover no-repeat;
  background-image: image-set(url("img/cover.avif") type("image/avif"), url("img/cover.jpg") type("image/jpeg"));
  transition: opacity 1.2s ease;
  will-change: transform;
}

/* Fade the cover art in only when JS runs (otherwise it simply shows) */
.js .welcome-scene::before {
  opacity: 0;
}

.welcome-scene.in-view::before {
  opacity: 1;
  animation: tirumala-breathe 22s ease-in-out infinite alternate;
}

.welcome-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.12) 0%, rgba(55, 40, 20, 0.15) 100%);
  pointer-events: none;
}

@keyframes tirumala-breathe {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1%, -0.8%, 0); }
}

.welcome-scene .cover-seal {
  z-index: 2;
  width: min(440px, 92vw);
  margin: 0 auto clamp(40px, 8vh, 70px);
  padding: clamp(20px, 4vh, 36px) clamp(16px, 4vw, 28px);
  border-radius: 20px;
  background: radial-gradient(ellipse at center, rgba(255, 252, 240, 0.88) 0%, rgba(255, 248, 230, 0.6) 65%, rgba(255, 248, 230, 0.15) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 14px 40px rgba(50, 40, 25, 0.12), inset 0 0 0 1px rgba(255, 248, 225, 0.6);
  border: 1px solid rgba(178, 135, 60, 0.25);
  box-sizing: border-box;
}

.welcome-scene .cover-seal::before,
.welcome-scene .cover-seal::after {
  display: none;
}

.cover-seal .micro-copy {
  font-family: "Yatra One", var(--serif);
  color: #425c38;
  font-size: clamp(10px, 2.7vw, 13px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
  white-space: normal;
  max-width: 95%;
  margin: 0 auto;
}

.seal-floral {
  color: #b2873c;
  font-size: 13px;
  letter-spacing: 6px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.seal-floral-top {
  margin: 8px 0 4px;
}

.seal-floral-bottom {
  margin-top: 14px;
}

.cover-seal .script-line {
  margin: 8px 0 2px;
  color: #9c732b;
  font-family: var(--script);
  font-size: clamp(32px, 8vw, 48px);
  line-height: 1.05;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
}

.cover-seal .opening-title {
  margin: 8px 0 10px;
  color: #274735;
  font-family: var(--display-script);
  font-size: clamp(44px, 11vw, 68px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
  white-space: normal;
}

.cover-seal .welcome-subtitle {
  margin: 12px 0 0;
  color: #315139;
  font-family: var(--serif);
  font-size: clamp(20px, 5vw, 27px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
}

/* Opening trigger button */
.unwrap-trigger {
  position: absolute;
  z-index: 6;
  bottom: clamp(24px, 5vh, 44px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px 12px 14px;
  border: 1px solid rgba(255, 244, 191, 0.95);
  border-radius: 99px;
  color: #fffbf2;
  background: rgba(33, 62, 45, 0.94);
  box-shadow: 0 8px 24px rgba(35, 25, 10, 0.35), 0 2px 6px rgba(255, 224, 151, 0.25);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.16em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.unwrap-trigger span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #244432;
  background: #f0cf79;
  font-size: 11px;
}

.unwrap-trigger:hover {
  transform: translateX(-50%) translateY(-2px);
  background: #193826;
  box-shadow: 0 12px 28px rgba(35, 25, 10, 0.45);
}

/* ============================================================
   2. COUPLE SCENE
   ============================================================ */
.couple-scene {
  isolation: isolate;
  overflow: hidden;
  background: #f4eee2;
}

.couple-scene::before {
  position: absolute;
  z-index: 0;
  inset: -2%;
  content: "";
  opacity: 0;
  transform: scale(1.02);
  background: center/cover no-repeat;
  transition: opacity 1.2s ease;
  will-change: transform;
}

/* Artwork below the cover is only fetched once its scene is about to scroll into view (.is-near, set in script.js) */
.couple-scene.is-near::before {
  background-image: url("img/couple-temple.jpg");
  background-image: image-set(url("img/couple-temple.avif") type("image/avif"), url("img/couple-temple.jpg") type("image/jpeg"));
}

.couple-scene.in-view::before {
  opacity: 0.95;
  animation: couple-temple-drift 24s ease-in-out infinite alternate;
}

.couple-scene::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.45;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 253, 240, 0.75), transparent 60%),
              linear-gradient(180deg, rgba(255, 251, 238, 0.2) 0%, rgba(230, 222, 205, 0.3) 100%);
}

@keyframes couple-temple-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1.2%, -0.8%, 0); }
}

.couple-frame {
  position: relative;
  z-index: 6;
  width: min(540px, 94vw);
  padding: clamp(10px, 2vh, 22px) clamp(12px, 3vw, 28px);
  background: transparent;
  box-shadow: none;
  border: none;
}

.couple-frame::before,
.couple-frame::after {
  display: none;
}

.corner-mark {
  display: block;
  color: var(--gold);
  font-size: 13px;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.top-mark {
  margin-bottom: 6px;
}

.bottom-mark {
  margin-top: 8px;
}

.couple-scene .micro-copy {
  margin: 0 auto 12px;
  position: relative;
  z-index: 2;
  color: #4e6245;
  font-size: clamp(10px, 1.8vw, 11px);
  letter-spacing: 0.24em;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
}

/* Couple portrait: grand zoomed-in portrait framed inside illuminated sacred arch (heads 100% intact, cropped at bottom) */
.couple-scene .couple-illustration {
  position: relative;
  isolation: isolate;
  width: min(340px, 86vw);
  height: clamp(250px, 32vh, 285px);
  margin: 0 auto 12px;
  padding-top: 14px;
  box-sizing: border-box;
  border-radius: 170px 170px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(175, 142, 82, 0.44);
  background: radial-gradient(ellipse at 50% 28%, rgba(255, 254, 246, 0.98) 0%, rgba(248, 240, 218, 0.65) 58%, rgba(188, 204, 176, 0.16) 78%, transparent 80%);
  box-shadow: 0 14px 32px rgba(85, 75, 50, 0.14), inset 0 0 24px rgba(255, 252, 236, 0.6);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.couple-scene .couple-illustration::before {
  display: none;
}

/* Let the <img> inside <picture> size against the arch frame, as before */
.couple-scene .couple-illustration picture {
  display: contents;
}

.couple-scene .couple-illustration img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 8px 12px rgba(71, 65, 45, 0.16));
  transform-origin: center bottom;
}

.couple-scene.in-view .couple-illustration img {
  animation: couple-portrait-breathe 7s ease-in-out 1s infinite alternate;
}

@keyframes couple-portrait-breathe {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -3px, 0) scale(1.015); }
}

.couple-scene .script-line {
  margin: 4px 0 2px;
  color: #9c7b3e;
  font-family: var(--script);
  font-size: clamp(26px, 5.5vw, 36px);
  text-shadow: 0 1px 3px rgba(255, 252, 240, 0.9);
}

/* Couple Names Typography */
.couple-frame h2 {
  margin: 6px auto 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #374c35;
  border-top: 1px solid rgba(145, 130, 85, 0.35);
  border-bottom: 1px solid rgba(145, 130, 85, 0.35);
  background: linear-gradient(90deg, transparent, rgba(255, 251, 235, 0.72) 18%, rgba(255, 251, 235, 0.72) 82%, transparent);
  text-shadow: 0 1px 8px rgba(255, 252, 240, 0.95);
}

.couple-frame h2 span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(19px, 4.4vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
}

.couple-frame h2 em {
  display: block;
  color: #b38e42;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1;
  margin: 1px 0;
  text-shadow: 0 1px 6px rgba(255, 248, 222, 0.9);
}

@media (min-width: 680px) {
  .couple-frame h2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
  }
  .couple-frame h2 span:first-child { text-align: right; }
  .couple-frame h2 span:last-child { text-align: left; }
  .couple-frame h2 em { font-size: 26px; }
}

.parents-copy {
  max-width: 440px;
  margin: 8px auto 14px;
  color: #4b5d44;
  font-size: clamp(13px, 3.2vw, 15px);
  font-style: italic;
  line-height: 1.35;
  text-shadow: 0 1px 5px rgba(255, 252, 239, 0.9);
}

.parents-copy b {
  font-weight: 600;
  color: #273722;
}

.text-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border: 1px solid rgba(158, 132, 74, 0.45);
  border-radius: 99px;
  color: #3b5239;
  background: rgba(255, 252, 242, 0.88);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(65, 58, 40, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.text-cta:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(65, 58, 40, 0.14);
}

.text-cta i {
  color: var(--gold);
  font-size: 14px;
  font-style: normal;
}

/* ============================================================
   3. CELEBRATIONS SCENE
   ============================================================ */
.events-scene {
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, #f5e7cf, #e6f0e3 53%, #f4d9cb);
}

.event-backgrounds {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.event-backgrounds::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(20, 32, 25, 0.22) 0%, rgba(255, 248, 230, 0.1) 45%, rgba(22, 34, 28, 0.32) 100%);
}

.event-background {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transform: scale(1.04);
  background: center/cover no-repeat;
  transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.events-scene.is-near .event-background--haldi {
  background-image: url("img/event-haldi.jpg");
  background-image: image-set(url("img/event-haldi.avif") type("image/avif"), url("img/event-haldi.jpg") type("image/jpeg"));
}
.events-scene.is-near .event-background--mehendi {
  background-image: url("img/event-mehendi.jpg");
  background-image: image-set(url("img/event-mehendi.avif") type("image/avif"), url("img/event-mehendi.jpg") type("image/jpeg"));
}
.events-scene.is-near .event-background--sangeet {
  background-image: url("img/event-sangeet.jpg");
  background-image: image-set(url("img/event-sangeet.avif") type("image/avif"), url("img/event-sangeet.jpg") type("image/jpeg"));
}
.events-scene.is-near .event-background--reception {
  background-image: url("img/event-reception.jpg");
  background-image: image-set(url("img/event-reception.avif") type("image/avif"), url("img/event-reception.jpg") type("image/jpeg"));
}

.events-scene[data-active-event="haldi"] .event-background--haldi,
.events-scene[data-active-event="mehendi"] .event-background--mehendi,
.events-scene[data-active-event="sangeet"] .event-background--sangeet,
.events-scene[data-active-event="reception"] .event-background--reception {
  opacity: 1;
  transform: scale(1);
}

.events-paper {
  position: relative;
  z-index: 1;
  width: min(520px, 94vw);
  padding: clamp(75px, 10vh, 105px) clamp(16px, 4vw, 32px) clamp(20px, 3vh, 32px);
  /* See-through card (a little lighter than the cover card): fuller behind the text, fading out
     towards the edges so the event artwork shows through when a celebration is selected */
  background: radial-gradient(ellipse at center, rgba(255, 252, 240, 0.78) 0%, rgba(255, 248, 230, 0.45) 65%, rgba(255, 248, 230, 0.08) 100%);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(35, 45, 36, 0.15), inset 0 0 0 1px rgba(255, 248, 225, 0.6);
  border: 1px solid rgba(165, 140, 90, 0.25);
  /* keep the shared .paper-panel reveal (opacity/transform) alongside the event-hover transitions */
  transition: backdrop-filter 0.6s ease, border-color 0.6s ease,
              opacity 0.85s cubic-bezier(0.2, 0.75, 0.25, 1), transform 0.85s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.events-scene[data-active-event] .events-paper {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-color: rgba(255, 238, 185, 0.75);
}

/* Garland ornament hanging from top */
.garland {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-around;
  height: 68px;
  pointer-events: none;
}

.garland i {
  position: relative;
  display: block;
  width: 1px;
  height: var(--drop);
  background: #7a916e;
}

.garland i::before {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 18px;
  height: 19px;
  border-radius: 54% 54% 48% 48%;
  transform: translateX(-50%) rotate(45deg);
  background: radial-gradient(circle at 33% 36%, #ffe5a5 0 14%, transparent 15%), #e6aa45;
  box-shadow: -5px -2px 0 -2px #5f7850, 5px 2px 0 -2px #5f7850;
}

.garland i:nth-child(1) { --drop: 30px; }
.garland i:nth-child(2) { --drop: 54px; }
.garland i:nth-child(3) { --drop: 40px; }
.garland i:nth-child(4) { --drop: 62px; }
.garland i:nth-child(5) { --drop: 36px; }
.garland i:nth-child(6) { --drop: 52px; }
.garland i:nth-child(7) { --drop: 28px; }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 16px);
  margin: 0 0 10px;
  color: var(--evergreen);
}

.countdown span {
  display: grid;
  gap: 2px;
  min-width: 40px;
  font: 600 9.5px var(--sans);
  letter-spacing: 0.12em;
}

.countdown b {
  color: var(--gold);
  font: 500 clamp(18px, 4vw, 24px) var(--serif);
  letter-spacing: 0;
}

.events-paper .script-line {
  margin: 4px 0 2px;
  font-size: clamp(24px, 5vw, 32px);
}

.events-paper h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(26px, 5.5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Event Tiles Grid */
.events-paper .event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 2vw, 12px);
}

.events-paper .event-tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: clamp(105px, 14vh, 130px);
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 245, 215, 0.45);
  box-shadow: 0 8px 18px rgba(45, 40, 25, 0.16);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.25, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.3s ease;
}

/* Tile colours keep small text at >= 4.5:1 contrast (WCAG AA) */
.events-paper .haldi-tile { background: #8a6424; color: #fffaf0; }
.events-paper .mehendi-tile { background: #5d7048; color: #fffaf0; }
.events-paper .sangeet-tile { background: #44565e; color: #fffaf0; }
.events-paper .reception-tile { background: #7f6550; color: #fffaf0; }

.events-scene[data-active-event] .events-paper .event-tile {
  background: rgba(30, 45, 35, 0.72);
  border-color: rgba(255, 240, 195, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.events-scene[data-active-event] .events-paper .event-tile.is-current {
  border-color: #ffe499;
  background: rgba(20, 36, 26, 0.92);
  box-shadow: 0 12px 26px rgba(15, 22, 16, 0.4), 0 0 0 1px #ffd982;
  transform: translateY(-3px) scale(1.02);
}

.events-paper .event-copy {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.events-paper .event-tile p {
  margin: 0;
  color: #fdf0cf;
  font: 600 10px var(--sans);
  letter-spacing: 0.14em;
}

.events-paper .event-tile h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(20, 25, 20, 0.3);
}

.events-paper .event-tile span {
  color: #fff8e6;
  font: 500 9px var(--sans);
  letter-spacing: 0.08em;
}

.events-paper .event-tile small {
  margin-top: 6px;
  color: #fff8e6;
  font: 600 8.5px var(--sans);
  letter-spacing: 0.12em;
  text-align: center;
  transition: opacity 0.25s ease;
}

.events-paper .event-tile:hover,
.events-paper .event-tile:focus-visible {
  border-color: #ffe6a3;
  box-shadow: 0 12px 24px rgba(45, 38, 20, 0.25);
  transform: translateY(-2px);
  outline: none;
}

.events-paper .text-cta {
  display: inline-flex;
  margin: 16px auto 0;
}

@media (min-width: 768px) {
  .events-paper {
    width: min(620px, 92vw);
    padding: 100px 36px 36px;
  }
  .events-paper .event-grid {
    gap: 16px;
  }
  .events-paper .event-tile {
    min-height: 135px;
    padding: 16px 12px;
  }
  .events-paper .event-tile h3 {
    font-size: 32px;
  }
  .events-paper .event-tile p {
    font-size: 11px;
  }
  .events-paper .event-tile span,
  .events-paper .event-tile small {
    font-size: 10px;
  }
}

/* ============================================================
   4. WEDDING SCENE (Saptapadi artwork)
   ============================================================ */
.wedding-scene {
  isolation: isolate;
  overflow: hidden;
  background: #1c2438;
}

.wedding-scene::before {
  position: absolute;
  z-index: 0;
  inset: -2%;
  content: "";
  opacity: 0;
  transform: scale(1.02);
  background: linear-gradient(180deg, rgba(15, 25, 42, 0.1) 0%, rgba(35, 12, 22, 0.2) 100%) center/cover no-repeat;
  transition: opacity 1.2s ease;
  will-change: transform;
}

.wedding-scene.is-near::before {
  background-image: linear-gradient(180deg, rgba(15, 25, 42, 0.1) 0%, rgba(35, 12, 22, 0.2) 100%), url("img/saptapadi.jpg");
  background-image: linear-gradient(180deg, rgba(15, 25, 42, 0.1) 0%, rgba(35, 12, 22, 0.2) 100%),
                    image-set(url("img/saptapadi.avif") type("image/avif"), url("img/saptapadi.jpg") type("image/jpeg"));
}

.wedding-scene.in-view::before {
  opacity: 1;
  animation: saptapadi-pan 22s ease-in-out infinite alternate;
}

@keyframes saptapadi-pan {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1.2%, -1%, 0); }
}

.wedding-card {
  position: relative;
  z-index: 2;
  width: min(520px, 94vw);
  margin: 0 auto;
  padding: clamp(20px, 3vh, 32px) clamp(16px, 4vw, 28px);
  background: transparent;
  box-shadow: none;
  border: none;
  color: #fff9ea;
}

.wedding-card::before,
.wedding-card::after {
  display: none;
}

.arch-illustration {
  position: relative;
  width: 140px;
  height: 85px;
  margin: 0 auto 12px;
  border: 2px solid #ffd47b;
  border-bottom: 0;
  border-radius: 90px 90px 0 0;
  filter: drop-shadow(0 2px 6px rgba(10, 18, 35, 0.7));
}

.arch-illustration::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 1px;
  height: 75px;
  transform: translateX(-50%);
  background: #ffd47b;
}

.arch-illustration span,
.arch-illustration i,
.arch-illustration b {
  position: absolute;
  top: 22px;
  width: 13px;
  height: 13px;
  border: 1px solid #ffe199;
  border-radius: 50%;
  background: #e8c7be;
}

.arch-illustration span { left: 18px; }
.arch-illustration i { left: calc(50% - 6.5px); top: 10px; }
.arch-illustration b { right: 18px; }

.wedding-card .micro-copy {
  color: #ffe39d;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-shadow: 0 2px 6px rgba(5, 12, 28, 0.95);
}

.wedding-card .script-line {
  margin: 10px 0 4px;
  color: #ffd982;
  font-family: var(--display-script);
  font-size: clamp(34px, 7.5vw, 48px);
  line-height: 0.9;
  text-shadow: 0 2px 6px rgba(5, 12, 28, 0.95), 0 0 16px rgba(255, 191, 83, 0.35);
}

.wedding-card h2 {
  margin: 4px 0 8px;
  color: #fffaf0;
  font-size: clamp(48px, 10vw, 68px);
  font-weight: 500;
  line-height: 0.9;
  text-shadow: 0 3px 8px rgba(5, 12, 28, 0.95), 0 0 18px rgba(255, 245, 220, 0.25);
}

.wedding-card h2 sup {
  margin-left: 2px;
  color: #ffd47b;
  font-size: 0.35em;
  letter-spacing: 0;
}

.muhurtham {
  margin: 10px 0 12px;
  color: #ffedc9;
  font: 600 11px/1.3 var(--sans);
  letter-spacing: 0.2em;
  text-shadow: 0 2px 5px rgba(5, 12, 28, 0.95);
}

.muhurtham span {
  color: #ffc967;
}

.wedding-copy {
  max-width: 320px;
  margin: 0 auto;
  color: #fff6e2;
  font-size: clamp(15px, 3.5vw, 18px);
  font-style: italic;
  line-height: 1.25;
  text-shadow: 0 2px 5px rgba(5, 12, 28, 0.95);
}

/* Location pill: readable, elegant frosted glass */
.location-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px auto 0;
  padding: 8px 18px;
  border-radius: 99px;
  border: 1px solid rgba(255, 222, 147, 0.65);
  background: rgba(16, 26, 46, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.location-link:hover {
  transform: translateY(-2px);
  background: rgba(25, 40, 70, 0.88);
  border-color: #ffd47b;
}

.map-pin {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: #ffc967;
  filter: drop-shadow(0 2px 3px rgba(5, 12, 28, 0.8));
}

.location-link p {
  margin: 0;
  color: #ffefa8;
  font: 600 10px/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-shadow: none;
}

.location-link p span {
  color: #ffc967;
}

/* RSVP CTA button in wedding scene: high contrast, radiant gold pill */
.wedding-card .round-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px 26px 11px 20px;
  border-radius: 99px;
  border: 1px solid rgba(255, 238, 194, 0.8);
  color: #1a2536;
  background: linear-gradient(135deg, #ffd985 0%, #d89f33 100%);
  font: 700 11px/1 var(--sans);
  letter-spacing: 0.18em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(255, 217, 133, 0.35);
  text-shadow: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wedding-card .round-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(255, 217, 133, 0.5);
}

.wedding-card .round-cta i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(26, 37, 54, 0.18);
  border: none;
  color: #1a2536;
  font-size: 13px;
  font-style: normal;
}

/* ============================================================
   5. RSVP CHOICE SCENE
   ============================================================ */
.rsvp-scene {
  background: radial-gradient(circle at 50% 35%, #fff8e8, #d7e2d5 75%);
}

.rsvp-paper {
  position: relative;
  z-index: 1;
  width: min(440px, 94vw);
  padding: clamp(32px, 6vh, 48px) clamp(20px, 5vw, 36px) clamp(24px, 4vh, 36px);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.95);
  box-shadow: 0 20px 50px rgba(50, 68, 52, 0.14);
  border: 1px solid rgba(168, 140, 85, 0.28);
}

.rsvp-paper::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(168, 140, 85, 0.22);
  border-radius: 10px;
  pointer-events: none;
}

.floral-wreath {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 12px;
  color: var(--gold);
}

.floral-wreath span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(178, 135, 60, 0.45);
  border-radius: 50%;
  font-size: 11px;
}

.floral-wreath span:nth-child(2),
.floral-wreath span:nth-child(4) {
  transform: translateY(-6px);
}

.rsvp-paper .script-line {
  margin: 6px 0 2px;
  font-size: clamp(26px, 5.5vw, 34px);
}

.rsvp-paper h2 {
  margin: 4px 0 10px;
  color: var(--ink);
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.rsvp-copy {
  max-width: 280px;
  margin: 8px auto 20px;
  color: #4b5d49;
  font-size: 16px;
  font-style: italic;
  line-height: 1.25;
}

.rsvp-actions {
  display: grid;
  gap: 10px;
}

.rsvp-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--evergreen);
  text-decoration: none;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.rsvp-actions a:first-child {
  color: #fffef7;
  background: var(--evergreen);
  box-shadow: 0 4px 12px rgba(45, 65, 50, 0.2);
}

.rsvp-actions a:first-child:hover {
  transform: translateY(-2px);
  background: #273b2f;
  box-shadow: 0 8px 18px rgba(45, 65, 50, 0.28);
}

.rsvp-actions a:first-child i {
  margin-left: 8px;
  color: #f7dca1;
  font-size: 14px;
  font-style: normal;
}

.rsvp-actions a:last-child {
  color: var(--evergreen);
  background: transparent;
}

.rsvp-actions a:last-child:hover {
  transform: translateY(-2px);
  background: rgba(55, 78, 63, 0.08);
}

.restart {
  margin-top: 20px;
  padding: 6px 12px;
  border: 0;
  color: #8c6523;
  background: transparent;
  font: italic 15px var(--serif);
  cursor: pointer;
  transition: color 0.2s ease;
}

.restart:hover {
  color: #6f4f1b;
  text-decoration: underline;
}

/* ============================================================
   PETAL ANIMATION LAYER
   ============================================================ */
.petal-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petal-layer i {
  --petal: #f19aae;
  --sway: 20vw;
  position: absolute;
  top: -12%;
  left: var(--left);
  width: var(--size);
  aspect-ratio: 1.4;
  border-radius: 78% 22% 75% 25%;
  transform: translate3d(0, 0, 0) rotate(0);
  background: radial-gradient(ellipse at 30% 26%, rgba(255, 255, 255, 0.85) 0 7%, transparent 8%),
              linear-gradient(135deg, #ffced6, var(--petal) 56%, #bf516c);
  box-shadow: inset -2px -2px 3px rgba(132, 45, 69, 0.16), 0 2px 4px rgba(117, 53, 59, 0.18);
  opacity: 0.72;
  animation: petal-scatter var(--duration) cubic-bezier(0.36, 0.05, 0.64, 0.94) var(--delay) infinite;
}

.petal-layer i::after {
  position: absolute;
  top: 12%;
  left: 48%;
  width: 1px;
  height: 74%;
  content: "";
  transform: rotate(27deg);
  background: rgba(150, 53, 76, 0.22);
}

/* Pause continuous motion in scenes that are scrolled out of view (.is-onscreen, set in script.js) */
.scene:not(.is-onscreen) .petal-layer i,
.scene:not(.is-onscreen)::before {
  animation-play-state: paused;
}

@keyframes petal-scatter {
  0% { opacity: 0; transform: translate3d(0, -6vh, 0) rotate(0deg) scale(0.7); }
  8% { opacity: 0.72; }
  40% { transform: translate3d(var(--sway), 45vh, 0) rotate(180deg) scale(1); }
  75% { transform: translate3d(0, 85vh, 0) rotate(420deg) scale(0.85); }
  92% { opacity: 0.5; }
  100% { opacity: 0; transform: translate3d(6vw, 115vh, 0) rotate(580deg) scale(0.6); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .petal-layer { display: none !important; }
  .welcome-scene::before,
  .couple-scene::before,
  .wedding-scene::before { animation: none !important; opacity: 1 !important; }
}
