:root {
  --maroon: #4a0d1f;
  --maroon-deep: #2c0512;
  --gold: #d4af37;
  --gold-light: #f4e4a6;
  --cream: #fff8ec;
  --rose: #e8b4b8;
  --shadow: rgba(0, 0, 0, 0.45);
}

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

html, body { height: 100%; }

body {
  font-family: "Cormorant Garamond", serif;
  color: var(--cream);
  background: radial-gradient(circle at 50% 30%, var(--maroon) 0%, var(--maroon-deep) 75%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.lang-hi { font-family: "Tiro Devanagari Hindi", serif; }
body.lang-hi .couple,
body.lang-hi .card-couple,
body.lang-hi #card-title { font-family: "Yatra One", serif; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Screens ---------- */
.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 72px 16px 48px;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.screen.active { display: flex; animation: contentFadeIn 1s ease both; }

.eyebrow {
  font-family: "Cinzel", serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold-light);
}
body.lang-hi .eyebrow { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0.05em; font-size: 1rem; }

.couple {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 5.5rem);
  color: var(--gold);
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.45);
  margin: 8px 0 4px;
  animation: pulseGlow 4s ease-in-out infinite;
}

.request { font-style: italic; font-size: 1.2rem; color: var(--rose); }
.dates {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  margin-top: 10px;
  color: var(--gold-light);
}

/* ---------- Corner flowers ---------- */
.corner-flower {
  position: absolute;
  z-index: 1;
  width: clamp(50px, 14vw, 84px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  animation: sway 6s ease-in-out infinite;
}
.corner-flower.tl { top: -8px; left: -8px; --r: -15deg; }
.corner-flower.tr { top: -8px; right: -8px; --r: 25deg; animation-delay: -1.5s; }
.corner-flower.bl { bottom: -8px; left: -8px; --r: 160deg; animation-delay: -3s; }
.corner-flower.br { bottom: -8px; right: -8px; --r: 200deg; animation-delay: -4.5s; }
#screen-door { overflow: hidden; }

/* ---------- Language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: 16px;
  right: 50%;
  transform: translateX(50%);
  z-index: 40;
  padding: 6px 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(44, 5, 18, 0.7);
  color: var(--gold-light);
  font-family: "Tiro Devanagari Hindi", "Cinzel", serif;
  backdrop-filter: blur(4px);
}

/* ---------- Main door ---------- */
.main-door {
  position: relative;
  z-index: 5;
  width: min(440px, 100%);
  max-width: 100%;
  aspect-ratio: 563 / 557;
  margin: 28px auto 14px;
  perspective: 1100px;
  container-type: inline-size;
  border: 3px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.35), 0 20px 40px var(--shadow);
  transform-origin: 50% 45%;
  transition: transform 2s cubic-bezier(.4, 0, .3, 1), border-color 1s, box-shadow 1s;
}

/* Light behind the doors, seen through the gap as they open */
.door-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #fff6dc 30%, var(--gold-light) 55%, var(--gold) 85%);
}
/* Hidden while the door is shut so no light leaks through the seam */
.main-door.unlock .door-glow,
.main-door.open .door-glow { opacity: 1; }
.door-glow::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.75) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 65%);
  mask: radial-gradient(circle, #000 0%, transparent 65%);
  animation: spinGlow 12s linear infinite;
}

.door-panel {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  z-index: 2;
  background-image: url("images/main-door.jpg");
  background-size: 200% 100%;
  background-repeat: no-repeat;
  transition: transform 2.3s cubic-bezier(.45, .05, .2, 1);
}
/* Shade on each panel that deepens as it swings away from the light */
.door-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2.3s ease;
}
.door-panel.left::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.7)); }
.door-panel.right::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.7)); }
.door-panel.left { left: 0; transform-origin: left center; background-position: left center; }
.door-panel.right { right: 0; transform-origin: right center; background-position: right center; }

/* Names written into the blank oval in the centre of the door image */
.door-medallion {
  position: absolute;
  z-index: 3;
  left: 49.4%;
  top: 37.2%;
  width: 15.6%;
  height: 18.7%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-top: 0.6cqw;
  border-radius: 50%;
  color: #3b2a4a;
  text-align: center;
  transition: opacity 0.6s, transform 0.8s;
}
.dm-name {
  font-family: "Great Vibes", cursive;
  font-size: 4.1cqw;
  line-height: 0.95;
  color: #4a0d1f;
}
.dm-amp {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 2.6cqw;
  line-height: 0.9;
  color: #8a6d1d;
}
.dm-rule {
  width: 7cqw;
  height: 1px;
  margin: 0.6cqw 0 0.4cqw;
  background: linear-gradient(90deg, transparent, #b8932c, transparent);
}
.dm-sub {
  max-width: 11cqw;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 1.25cqw;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b3a6e;
}
body.lang-hi .dm-sub { font-family: "Tiro Devanagari Hindi", serif; font-size: 1.7cqw; letter-spacing: 0; }

/* Opening sequence: unlock, swing open, walk through */
.main-door.unlock { animation: doorUnlock 0.5s ease; }
.main-door.unlock .door-medallion { opacity: 0; transform: translate(-50%, -50%) scale(1.25); filter: brightness(1.6); }
.main-door.open .door-panel.left { transform: rotateY(-112deg); }
.main-door.open .door-panel.right { transform: rotateY(112deg); }
.main-door.open .door-panel::after { opacity: 1; }
.main-door.open { transform: scale(1.15); border-color: transparent; box-shadow: 0 0 120px 40px rgba(255, 246, 220, 0.6); }
.main-door.through { transform: scale(3.4); transition: transform 1.4s cubic-bezier(.5, 0, .75, 0), border-color 1s, box-shadow 1s; }

#screen-door > :not(.main-door) { transition: opacity 0.7s ease; }
body.entering { overflow: hidden; }
body.entering #screen-door > :not(.main-door) { opacity: 0; }
body.entering .lang-toggle { opacity: 0; transition: opacity 0.5s; }

/* one entrance only: this replaces the usual screen fade-in */
#screen-hall.active.reveal { animation: hallReveal 1.6s cubic-bezier(.2, .7, .2, 1) both; }

.tap-hint {
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  animation: bob 2.4s ease-in-out infinite;
}
body.lang-hi .tap-hint { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0; }

/* ---------- Hall ---------- */
#screen-hall { justify-content: flex-start; }
.hall-header h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--gold);
  margin: 6px 0 18px;
}
body.lang-hi .hall-header h2 { font-family: "Yatra One", serif; font-weight: 400; }

.doors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 560px;
}
@media (min-width: 820px) {
  .doors-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 900px; }
}

.ceremony-door {
  position: relative;
  aspect-ratio: 3 / 4.2;
  border-radius: 80px 80px 6px 6px;
  border: 3px solid var(--gold);
  overflow: hidden;
  perspective: 900px;
  box-shadow: 0 12px 28px var(--shadow);
  transition: transform 0.3s;
}
.ceremony-door:hover { transform: translateY(-4px); }


.blessing {
  margin-top: 32px;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--rose);
}

/* ---------- Card ---------- */
.card-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  /* top room keeps the card clear of the music and language buttons */
  padding: 64px 16px 48px;
  overflow-y: auto;
  background: rgba(20, 2, 8, 0.75);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.card-overlay.show { opacity: 1; visibility: visible; }

.invite-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold));
  box-shadow: 0 30px 60px var(--shadow);
  transform: scale(0.85) rotateX(12deg);
  transition: transform 0.6s cubic-bezier(.2, .9, .3, 1.2);
}
.card-overlay.show .invite-card { transform: none; }

.card-inner {
  padding: 32px 22px 26px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--maroon);
  text-align: center;
  border: 1px dashed var(--gold);
}
.card-inner .eyebrow { color: var(--maroon); }
.card-flowers { color: var(--gold); letter-spacing: 0.3em; margin-bottom: 8px; }

#card-title {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 3.2rem;
  color: var(--maroon);
  line-height: 1.1;
}
.card-couple { font-family: "Playfair Display", serif; font-size: 1.2rem; margin-bottom: 6px; }
.card-tagline { font-style: italic; color: #8a4a55; margin-bottom: 16px; }

.card-details { display: grid; gap: 10px; margin-bottom: 18px; }
.card-details div { border-top: 1px solid rgba(212, 175, 55, 0.5); padding-top: 8px; }
.card-details dt {
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9b7a1c;
}
body.lang-hi .card-details dt { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0; font-size: 0.9rem; }
.card-details dd { font-size: 1.1rem; }

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--maroon);
  color: var(--gold-light);
  text-decoration: none;
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
}
.map-link[hidden] { display: none; }
body.lang-hi .map-link { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0; }
.card-blessing { margin-top: 18px; font-style: italic; color: #8a4a55; }

/* ---------- Ceremony door tiles (carved door that opens in place) ---------- */
/* Scene image is drawn at the tile's width and shifted up by 15cqw.
   Door leaves come from the image at x 64–436, y 302–708 of 500×889. */
.ceremony-door {
  padding: 0;
  container-type: inline-size;
  background: #3a2208;
}
.sd-bg {
  position: absolute;
  inset: 0;
  background: url("images/doors/carved-door.jpg") 0 -15cqw / 100cqw auto no-repeat;
}
.sd-glow, .sd-leaf {
  position: absolute;
  top: 45.4cqw;
  height: 81.2cqw;
}
.sd-glow {
  left: 12.8cqw;
  width: 74.4cqw;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(ellipse at 50% 55%, #fff 0%, #fff4c4 30%, #ffd75a 65%, #e9a913 100%);
}
.ceremony-door.open .sd-glow { opacity: 1; }
.sd-glow::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.8) 0deg 4deg, transparent 4deg 13deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 60%);
  mask: radial-gradient(circle, #000 0%, transparent 60%);
  animation: spinGlow 14s linear infinite;
}
.sd-leaf {
  width: 37.2cqw;
  background-image: url("images/doors/carved-door.jpg");
  background-size: 100cqw auto;
  background-repeat: no-repeat;
  transition: transform 1.6s cubic-bezier(.45, .05, .2, 1);
}
.sd-leaf.left { left: 12.8cqw; background-position: -12.8cqw -60.4cqw; transform-origin: left center; }
.sd-leaf.right { left: 50cqw; background-position: -50cqw -60.4cqw; transform-origin: right center; }
.sd-leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.sd-leaf.left::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.75)); }
.sd-leaf.right::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.75)); }
.sd-peacock {
  position: absolute;
  left: 0;
  top: 105cqw;
  width: 52.4cqw;
  pointer-events: none;
}
.sd-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18cqw 0 6cqw;
  background: linear-gradient(180deg, transparent, rgba(30, 14, 2, 0.85));
}
.sd-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1cqw;
}
.ceremony-door .cd-name {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 13cqw;
  line-height: 1;
  color: #f6d77a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}
/* thin gold rule under each name */
.ceremony-door .cd-name::after {
  content: "";
  display: block;
  width: 40cqw;
  height: 1px;
  margin: 2cqw auto 0;
  background: linear-gradient(90deg, transparent, #f2c14e, transparent);
}
body.lang-hi .ceremony-door .cd-name { font-family: "Yatra One", serif; font-size: 9cqw; }

/* Bells: cut from the scene (1px of the 500px image = 0.2cqw) and swung from their chains */
.sd-bells { position: absolute; inset: 0; pointer-events: none; }
.sd-bell {
  position: absolute;
  top: -15cqw;
  height: auto;
  animation: bellSwing var(--dur, 2.6s) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes bellSwing {
  from { transform: rotate(calc(var(--amp, 3deg) * -1)); }
  to { transform: rotate(var(--amp, 3deg)); }
}
.ceremony-door.open .sd-bell { --amp: 7deg; animation-duration: 0.45s; }
.ceremony-door.open .sd-leaf.left { transform: rotateY(-105deg); }
.ceremony-door.open .sd-leaf.right { transform: rotateY(105deg); }
.ceremony-door.open .sd-leaf::after { opacity: 1; }

/* ---------- Haldi card (illustrated) ---------- */
.theme-card {
  position: relative;
  width: min(380px, 100%, calc((100vh - 112px) * 378 / 673));
  width: min(380px, 100%, calc((100dvh - 112px) * 378 / 673));
  max-width: 100%;
  aspect-ratio: 378 / 673;
  container-type: inline-size;
  border-radius: 6px;
  background: #fdfae3 center / 100% 100% no-repeat;
  box-shadow: 0 30px 60px var(--shadow);
  transform: scale(0.85) rotateX(12deg);
  transition: transform 0.6s cubic-bezier(.2, .9, .3, 1.2);
}
.card-overlay.show .theme-card { transform: none; }
.haldi-card { background-image: url("images/cards/haldi-bg.jpg"); }
.sangeet-card {
  width: min(400px, 100%, calc((100vh - 112px) * 720 / 1280));
  width: min(400px, 100%, calc((100dvh - 112px) * 720 / 1280));
  aspect-ratio: 720 / 1280;
  background-image: url("images/cards/sangeet-bg.jpg");
}

/* Sangeet text sits in the open sky between the chandelier and the arches */
.mc-text {
  position: absolute;
  top: 21.2%;
  left: 9%;
  right: 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8cqw;
  text-align: center;
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  color: #5d7d69;
}
.mc-text p { margin: 0; }
.mc-invite { font-size: 4.1cqw; line-height: 1.45; padding-inline: 8cqw; }
.mc-name {
  margin: -1cqw 0 0;
  font-family: "Playfair Display SC", "Playfair Display", serif;
  font-weight: 700;
  font-size: 11cqw;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #9d1c45;
}
.mc-line { font-size: 3.9cqw; line-height: 1.45; }
.mc-when { font-size: 4.1cqw; line-height: 1.35; color: #9d1c45; }
.mc-venue { font-size: 3.7cqw; line-height: 1.45; }
.sangeet-card .tc-map { font-size: 3.6cqw; margin-top: 0.4cqw; }
body.lang-hi .mc-text { font-family: "Tiro Devanagari Hindi", serif; font-weight: 400; }
body.lang-hi .mc-name { font-family: "Yatra One", serif; font-weight: 400; }

/* ---------- Mehndi card (arch, mandala and henna hands) ---------- */
.mehndi-card {
  width: min(400px, 100%, calc((100vh - 112px) * 675 / 1200));
  width: min(400px, 100%, calc((100dvh - 112px) * 675 / 1200));
  aspect-ratio: 675 / 1200;
  background-image: url("images/cards/mehndi-bg.jpg");
}
/* Text sits inside the white arch, above the bride's hands */
.mh-text {
  position: absolute;
  top: 13.5%;
  left: 15%;
  right: 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1cqw;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #5a3a2c;
}
.mh-text p { margin: 0; }
.mh-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 3cqw;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a2342;
}
.mh-name {
  margin: -1cqw 0 -2cqw;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 16cqw;
  line-height: 1.15;
  color: #7a2e1a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.mh-rule {
  width: 30cqw;
  height: 1.6cqw;
  background:
    linear-gradient(90deg, transparent, #b8873a 30%, #b8873a 70%, transparent) center / 100% 1px no-repeat,
    radial-gradient(circle, #b8873a 0 0.8cqw, transparent 0.9cqw) center / 1.6cqw 1.6cqw no-repeat;
}
.mh-line { font-style: italic; font-size: 4.4cqw; line-height: 1.25; color: #5a3a2c; padding-inline: 2cqw; }
.mh-date { margin-top: 0.8cqw !important; font-size: 5cqw; font-weight: 600; color: #8a2342; }
.mh-time {
  font-family: "Cinzel", serif;
  font-size: 3.3cqw;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a2342;
}
.mh-venue { margin-top: 0.8cqw !important; font-size: 5cqw; font-weight: 600; color: #4f6b2a; }
.mh-address { font-size: 3.8cqw; font-weight: 600; line-height: 1.3; color: #5a3a2c; }
.mehndi-card .tc-map { font-size: 3.4cqw; margin-top: 0.6cqw; }
body.lang-hi .mh-text, body.lang-hi .mh-eyebrow, body.lang-hi .mh-time { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0; text-transform: none; }
body.lang-hi .mh-name { font-family: "Yatra One", serif; font-size: 11cqw; }
.invite-card.reveal, .theme-card.reveal { animation: hallReveal 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.theme-card .card-close { top: 2.5cqw; right: 2.5cqw; }

.tc-text {
  position: absolute;
  top: 20.6%;
  left: 19%;
  right: 19%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5cqw;
  text-align: center;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: #2f6a47;
}
.tc-text p { margin: 0; }
.tc-title {
  font-family: "Pinyon Script", "Great Vibes", cursive;
  font-weight: 400;
  font-size: 7.6cqw;
  line-height: 1.1;
  color: #a3233a;
}
.tc-tagline { font-size: 2.7cqw; line-height: 1.45; padding-inline: 3cqw; }
.tc-when {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 3.8cqw;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #a3233a;
}
.tc-when span:last-child { font-size: 0.82em; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: #b8333c; }
.tc-when sup { font-size: 0.6em; }
.tc-dress {
  font-family: "Pinyon Script", "Great Vibes", cursive;
  font-size: 4.9cqw;
  line-height: 1.1;
  color: #2f6a47;
}
.tc-venue { font-size: 3.45cqw; color: #b8333c; margin-bottom: -1.4cqw !important; }
.tc-address { font-size: 2.65cqw; line-height: 1.45; }
.tc-map {
  display: inline-flex;
  align-items: center;
  gap: 1.3cqw;
  margin-top: 0.6cqw;
  padding: 1.1cqw 3.4cqw 1.1cqw 2.4cqw;
  border-radius: 999px;
  background: linear-gradient(180deg, #c0392b, #9b1c2e);
  border: 0.5cqw solid #f2c14e;
  box-shadow: 0 1cqw 2.4cqw rgba(155, 28, 46, 0.35);
  color: #fff6dc;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 3.2cqw;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tc-map:hover, .tc-map:focus-visible { transform: translateY(-2px); box-shadow: 0 1.6cqw 3cqw rgba(155, 28, 46, 0.45); }
.pin { width: 1.25em; height: 1.25em; flex: none; color: #f2c14e; animation: pinBounce 1.8s ease-in-out infinite; }
@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-18%); }
  60% { transform: translateY(4%); }
}
body.lang-hi .tc-text { font-family: "Tiro Devanagari Hindi", serif; }
body.lang-hi .tc-title,
body.lang-hi .tc-dress { font-family: "Yatra One", serif; }
body.lang-hi .tc-title { font-size: 7cqw; }
body.lang-hi .tc-when, body.lang-hi .tc-map { font-family: "Tiro Devanagari Hindi", serif; font-style: normal; }
body.lang-hi .tc-when span:last-child { text-transform: none; letter-spacing: 0; }
body.lang-hi .tc-dress { font-size: 3.8cqw; }

.card-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1.5px solid #e9c46a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a3173a, #6e0d24 70%);
  box-shadow: 0 4px 12px rgba(74, 13, 31, 0.4), 0 0 0 3px rgba(255, 246, 220, 0.55);
  color: #fff3d0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.card-close:hover, .card-close:focus-visible { transform: rotate(90deg) scale(1.08); box-shadow: 0 6px 16px rgba(74, 13, 31, 0.5), 0 0 0 3px rgba(255, 246, 220, 0.8); }
.card-close:active { transform: rotate(90deg) scale(0.94); }

/* ---------- Effects ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.petal {
  position: absolute;
  top: -60px;
  height: auto;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
  animation: fall linear forwards;
  will-change: transform;
}

/* Full-screen light that floods in as you walk through the door */
.light-flash {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #fffaf0 30%, var(--gold-light) 70%, var(--gold) 120%);
  transition: opacity 1.5s ease;
}
.light-flash.flood { opacity: 1; transition: opacity 0.9s ease-in; }
.light-flash .rays {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 260vmax;
  height: 260vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.9) 0deg 3deg, rgba(255, 255, 255, 0) 3deg 11deg);
  -webkit-mask: radial-gradient(circle, transparent 2%, #000 8%, transparent 45%);
  mask: radial-gradient(circle, transparent 2%, #000 8%, transparent 45%);
  animation: raysSpin 18s linear infinite;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 14px rgba(212, 175, 55, 0.35); }
  50% { text-shadow: 0 0 30px rgba(244, 228, 166, 0.8); }
}
@keyframes spinGlow { to { transform: rotate(360deg); } }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0deg) rotateX(0deg); opacity: 0; }
  8% { opacity: 1; }
  25% { transform: translate(calc(var(--drift, 40px) * -0.4), 28vh) rotate(calc(var(--spin, 360deg) * 0.25)) rotateX(120deg); }
  50% { transform: translate(calc(var(--drift, 40px) * 0.5), 56vh) rotate(calc(var(--spin, 360deg) * 0.5)) rotateX(220deg); }
  75% { transform: translate(calc(var(--drift, 40px) * -0.1), 84vh) rotate(calc(var(--spin, 360deg) * 0.75)) rotateX(300deg); }
  90% { opacity: 1; }
  100% { transform: translate(var(--drift, 40px), 112vh) rotate(var(--spin, 360deg)) rotateX(360deg); opacity: 0; }
}
@keyframes sway {
  0%, 100% { transform: rotate(var(--r, 0deg)) scale(1); }
  50% { transform: rotate(calc(var(--r, 0deg) + 7deg)) scale(1.04); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes raysSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes doorUnlock {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.03) rotate(-0.6deg); }
  60% { transform: scale(1.02) rotate(0.6deg); }
}
@keyframes hallReveal {
  from { opacity: 0; transform: scale(1.12); filter: blur(8px) brightness(1.8); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 380px) {
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Directions button (all cards) ---------- */
a.dir-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.45em 1.3em 0.45em 0.45em;
  border-radius: 999px;
  border: 1px solid rgba(255, 226, 150, 0.9);
  background: linear-gradient(135deg, #b3122e 0%, #7d0f24 55%, #5c0a1b 100%);
  box-shadow: 0 0.6em 1.4em rgba(125, 15, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff6dc;
  font-family: "Playfair Display", serif;
  font-style: normal;
  letter-spacing: 0;
  text-decoration: none;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
a.dir-btn:hover, a.dir-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 0.8em 1.8em rgba(125, 15, 36, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
a.dir-btn:active { transform: scale(0.97); }
.dir-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #f2c14e 55%, #c8901f);
  color: #7d0f24;
  box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.6);
  animation: dirPulse 2.2s ease-out infinite;
}
.dir-icon svg { width: 52%; height: 52%; transform: translate(-6%, 6%); }
.dir-text { display: flex; flex-direction: column; line-height: 1.15; }
.dir-main { font-size: 1.08em; font-weight: 600; }
.dir-sub { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 0.82em; opacity: 0.85; }
.dir-shine {
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: dirShine 3.6s ease-in-out infinite;
  pointer-events: none;
}
body.lang-hi a.dir-btn, body.lang-hi .dir-sub { font-family: "Tiro Devanagari Hindi", serif; font-style: normal; }
@keyframes dirPulse {
  0% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.6); }
  70%, 100% { box-shadow: 0 0 0 0.7em rgba(242, 193, 78, 0); }
}
@keyframes dirShine {
  0%, 55% { left: -60%; }
  100% { left: 130%; }
}

/* ---------- Music on/off ---------- */
.music-toggle {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 55;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(44, 5, 18, 0.7);
  color: var(--gold-light);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.music-toggle svg { width: 20px; height: 20px; }
.music-toggle .eq { position: absolute; bottom: 6px; display: flex; gap: 2px; align-items: flex-end; height: 6px; }
.music-toggle .eq i { width: 2px; background: currentColor; animation: eqBar 0.9s ease-in-out infinite alternate; }
.music-toggle .eq i:nth-child(2) { animation-delay: -0.3s; }
.music-toggle .eq i:nth-child(3) { animation-delay: -0.6s; }
.music-toggle.off { opacity: 0.6; }
.music-toggle.off .eq { display: none; }
.music-toggle.off::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
@keyframes eqBar { from { height: 2px; } to { height: 6px; } }

/* ---------- Countdown ---------- */
.countdown {
  position: relative;
  width: min(calc(100vw - 32px), 460px);
  margin: 0 auto 30px;
  padding: 20px 14px 16px;
  border: 1px solid rgba(212, 175, 55, 0.75);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(244, 228, 166, 0.16), transparent 65%),
    linear-gradient(160deg, rgba(92, 16, 40, 0.85), rgba(36, 4, 15, 0.9));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 5px rgba(36, 4, 15, 0.9), inset 0 0 0 6px rgba(212, 175, 55, 0.35);
  overflow: hidden;
}
/* slow shine sweeping across the panel */
.countdown::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -50%;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 170, 0.12), transparent);
  transform: skewX(-18deg);
  animation: cdShine 6s ease-in-out infinite;
  pointer-events: none;
}
.cd-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(244, 228, 166, 0.8);
}
.cd-corner.tl { top: 9px; left: 9px; }
.cd-corner.tr { top: 9px; right: 9px; }
.cd-corner.bl { bottom: 9px; left: 9px; }
.cd-corner.br { bottom: 9px; right: 9px; }

.cd-title, .cd-done {
  font-family: "Great Vibes", cursive;
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
  margin-bottom: 12px;
}
.cd-done { font-size: 2.1rem; margin: 6px 0 10px; }
body.lang-hi .cd-title, body.lang-hi .cd-done { font-family: "Yatra One", serif; font-size: 1.3rem; }

.cd-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cd-row[hidden], .cd-title[hidden] { display: none; }
.cd-unit {
  position: relative;
  width: min(20vw, 84px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(120, 24, 52, 0.95), rgba(40, 5, 17, 0.95) 70%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(212, 175, 55, 0.25);
}
.cd-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cd-ring circle { fill: none; stroke-width: 4; }
.cd-track { stroke: rgba(212, 175, 55, 0.18); }
.cd-arc {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 3px rgba(244, 228, 166, 0.9));
  transition: stroke-dashoffset 0.9s cubic-bezier(.3, .7, .3, 1);
}
.cd-num {
  position: relative;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: min(7.4vw, 1.95rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff6d5 10%, #f2cf6b 50%, #c8962a 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}
.cd-num.flip { animation: cdFlip 0.55s cubic-bezier(.2, .8, .3, 1.2); }
.cd-unit small {
  position: relative;
  margin-top: 3px;
  font-family: "Cinzel", serif;
  font-size: min(2.3vw, 0.62rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}
body.lang-hi .cd-unit small { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0; font-size: min(2.9vw, 0.8rem); }
.cd-sep {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.8;
  animation: cdTwinkle 2s ease-in-out infinite;
}

.cd-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: min(4.4vw, 1.05rem);
  white-space: nowrap;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}
body.lang-hi .cd-date { font-family: "Tiro Devanagari Hindi", serif; font-style: normal; }
.cd-line { flex: 0 1 46px; min-width: 14px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.cd-line:last-child { transform: scaleX(-1); }

@keyframes cdFlip {
  0% { opacity: 0; transform: translateY(-40%) scale(0.85); }
  100% { opacity: 1; transform: none; }
}
@keyframes cdShine {
  0%, 60% { left: -50%; }
  100% { left: 130%; }
}
@keyframes cdTwinkle {
  0%, 100% { opacity: 0.4; transform: rotate(45deg) scale(0.8); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.15); }
}

/* ---------- Moving parts inside the cards ---------- */
.tc-anim { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.tc-part {
  position: absolute;
  height: auto;
  animation: partSway 4s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes partSway {
  from { transform: rotate(calc(var(--amp) * -1)); }
  to { transform: rotate(var(--amp)); }
}
.tc-sparkle {
  position: absolute;
  width: calc(4cqw * var(--s, 1));
  aspect-ratio: 1;
  background: radial-gradient(circle, #fff 0 14%, rgba(255, 236, 170, 0.8) 22%, transparent 60%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 3px rgba(255, 220, 120, 0.9));
  opacity: 0;
  animation: sparkle 3s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* ---------- Wedding card (couple on the swing) ---------- */
.wedding-card {
  width: min(400px, 100%, calc((100vh - 112px) * 746 / 1334));
  width: min(400px, 100%, calc((100dvh - 112px) * 746 / 1334));
  aspect-ratio: 746 / 1334;
  background-image: url("images/cards/wedding-bg.jpg");
}
.wd-scenes { position: absolute; left: 11%; right: 11%; top: 15%; height: 33%; }
.wd-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s 0.9s;
}
.wd-scene.on { opacity: 1; visibility: visible; transition: opacity 0.9s ease 0.3s, visibility 0s; }

/* gold script that writes itself in from the left */
.wd-save p {
  font-family: "Great Vibes", cursive;
  font-size: 15cqw;
  line-height: 1;
  background: linear-gradient(120deg, #a87412, #f0c75e 40%, #fff1b8 50%, #d39b2a 60%, #a87412);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(120, 80, 10, 0.25));
  padding: 0.15em 0.2em;
  clip-path: inset(-40% 100% -40% -20%);
}
.wd-save.on p { animation: wdWrite 1.8s ease-out 0.3s forwards, wdGleam 3s linear 1.6s infinite; }

.wd-join { font-family: "Great Vibes", cursive; font-size: 7cqw; color: #6d5a52; }
.wd-month { margin: 1cqw 0 2cqw; font-family: "Playfair Display", serif; font-weight: 600; font-size: 5.4cqw; color: #4a3b35; }
.wd-month::first-letter { color: #c0392b; }
.wd-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6cqw 1.8cqw;
  font-family: "Playfair Display", serif;
  font-size: 3.6cqw;
  color: #3d302b;
}
.wd-grid b { font-weight: 400; font-size: 2.6cqw; color: #7a6a62; }
.wd-grid b:first-child, .wd-grid .sun { color: #c0392b; }
.wd-grid span { position: relative; }
.wd-cal .wd-join, .wd-cal .wd-month, .wd-cal .wd-grid { opacity: 0; transform: translateY(2cqw); transition: opacity 0.8s, transform 0.8s; }
.wd-cal.on .wd-join { opacity: 1; transform: none; transition-delay: 0.3s; }
.wd-cal.on .wd-month { opacity: 1; transform: none; transition-delay: 0.9s; }
.wd-cal.on .wd-grid { opacity: 1; transform: none; transition-delay: 1.4s; }
.wd-day3 { color: #c0392b; font-weight: 700; }
.wd-heart {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8.5cqw;
  transform: translate(-50%, -52%);
  overflow: visible;
}
.wd-heart path { fill: none; stroke: #d0313d; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.wd-cal.on .wd-heart path { animation: wdDraw 1.4s ease-in-out 2.6s forwards; }

.wd-names p { margin: 0; color: #5b4a44; }
.wd-n1, .wd-n2 { font-family: "Great Vibes", cursive; font-size: 15cqw; line-height: 1; }
.wd-n1 { align-self: flex-start; margin-left: 4%; }
.wd-n2 { align-self: flex-end; margin-right: 4%; }
.wd-amp { font-family: "Great Vibes", cursive; font-size: 8cqw; line-height: 1.1; }
.wd-names .wd-n1, .wd-names .wd-amp, .wd-names .wd-n2 { opacity: 0; filter: blur(4px); transition: opacity 1s, filter 1s, transform 1s; }
.wd-names .wd-n1 { transform: translateX(-6cqw); }
.wd-names .wd-n2 { transform: translateX(6cqw); }
.wd-names.on .wd-n1, .wd-names.on .wd-amp, .wd-names.on .wd-n2 { opacity: 1; filter: none; transform: none; }
.wd-names.on .wd-n1 { transition-delay: 0.3s; }
.wd-names.on .wd-amp { transition-delay: 0.9s; }
.wd-names.on .wd-n2 { transition-delay: 1.4s; }

.wd-info p { margin: 0; }
.wd-info { justify-content: center; gap: 3.2cqw; top: -4%; bottom: -8%; }
.wd-when { font-family: "Playfair Display", serif; font-weight: 600; font-size: 5cqw; line-height: 1.4; color: #8c1d2e; }
.wd-time { margin: 0 0 1.5cqw; font-family: "Cinzel", serif; font-size: 3.6cqw; letter-spacing: 0.12em; color: #6d5a52; }
.wd-venue { font-family: "Great Vibes", cursive; font-size: 8.5cqw; line-height: 1.6; color: #5b4a44; }
.wd-venue::before {
  content: "";
  display: block;
  width: 22cqw;
  height: 1px;
  margin: 0 auto 2.5cqw;
  background: linear-gradient(90deg, transparent, #c9a24a, transparent);
}
.wd-city { margin-top: 0; font-family: "Cinzel", serif; font-size: 3.6cqw; letter-spacing: 0.3em; color: #a87412; }
.wd-info p { opacity: 0; transform: translateY(2cqw); transition: opacity 0.8s, transform 0.8s; }
.wd-info.on p { opacity: 1; transform: none; }
.wd-info.on p:nth-child(2) { transition-delay: 0.3s; }
.wd-info.on p:nth-child(3) { transition-delay: 0.6s; }
.wd-info.on p:nth-child(4) { transition-delay: 0.9s; }

body.lang-hi .wd-save p, body.lang-hi .wd-join, body.lang-hi .wd-n1, body.lang-hi .wd-n2, body.lang-hi .wd-venue, body.lang-hi .wd-amp { font-family: "Yatra One", serif; }
body.lang-hi .wd-save p { font-size: 12cqw; }
body.lang-hi .wd-join { font-size: 5.6cqw; }
body.lang-hi .wd-n1, body.lang-hi .wd-n2 { font-size: 11cqw; }
body.lang-hi .wd-venue { font-size: 6.4cqw; }
body.lang-hi .wd-when, body.lang-hi .wd-time, body.lang-hi .wd-month, body.lang-hi .wd-grid b, body.lang-hi .wd-city { font-family: "Tiro Devanagari Hindi", serif; letter-spacing: 0; }

.wd-btn { position: absolute; left: 0; right: 0; bottom: 3.5%; display: flex; justify-content: center; }
.wedding-card .tc-map { font-size: 3.6cqw; }

@keyframes wdWrite { to { clip-path: inset(-40% -20% -40% -20%); } }
@keyframes wdGleam { to { background-position: -200% 0; } }
@keyframes wdDraw { to { stroke-dashoffset: 0; } }

/* the swing sways (seen from behind it moves a little away and back),
   the bride's hair lifts in the breeze, flowers stay in front */
.wd-stage { position: absolute; inset: 0; pointer-events: none; }
.wd-stage img { position: absolute; height: auto; }
.wd-swing {
  position: absolute;
  inset: 0;
  transform-origin: 50% 4.5%;
  animation: wdSwing 3.6s ease-in-out infinite alternate;
  will-change: transform;
}
.wd-hair {
  transform-origin: 68.6% 2.5%;
  animation: wdHair 2.8s ease-in-out infinite alternate;
}
@keyframes wdSwing {
  from { transform: rotate(-0.5deg); }
  to { transform: rotate(0.5deg) translateY(-0.25%); }
}
@keyframes wdHair {
  0% { transform: rotate(-1.4deg) skewX(1deg); }
  100% { transform: rotate(1.8deg) skewX(-1.5deg); }
}

/* ---------- Site background: maroon paisley whose pattern flows ---------- */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #4f0c1f url("images/bg/paisley-base.jpg") center / cover no-repeat;
  pointer-events: none;
}
.bg-lines {
  position: absolute;
  inset: -6%;
  background: url("images/bg/paisley-lines.webp") center / cover no-repeat;
  animation: paisleyFlow 22s ease-in-out infinite alternate;
  will-change: transform;
}
/* a soft band of light that travels along the pattern */
.bg-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 196, 160, 0.28) 48%, rgba(255, 226, 170, 0.4) 50%, rgba(255, 196, 160, 0.28) 52%, transparent 62%) 0 0 / 300% 300%;
  -webkit-mask: url("images/bg/paisley-lines.webp") center / cover no-repeat;
  mask: url("images/bg/paisley-lines.webp") center / cover no-repeat;
  animation: paisleyGlow 9s linear infinite;
}
@keyframes paisleyFlow {
  0% { transform: translate(-1.5%, 1%) rotate(-1.2deg) scale(1.02); }
  50% { transform: translate(1%, -0.5%) rotate(0.6deg) scale(1.05); }
  100% { transform: translate(1.5%, 1.5%) rotate(1.4deg) scale(1.03); }
}
@keyframes paisleyGlow {
  from { background-position: 100% 100%; }
  to { background-position: 0 0; }
}

/* The whole door opens: each half is the full height of the tile and
   carries its own bells. */
.ceremony-door .sd-glow { top: 0; left: 0; width: 100%; height: 100%; }
.ceremony-door .sd-leaf {
  top: 0;
  height: 100%;
  width: 50cqw;
  overflow: hidden;
  background-size: 100cqw auto;
}
.ceremony-door .sd-leaf.left { left: 0; background-position: 0 -15cqw; }
.ceremony-door .sd-leaf.right { left: 50cqw; background-position: -50cqw -15cqw; }
.ceremony-door .sd-bells { z-index: 1; }
.ceremony-door .sd-label { transition: opacity 0.4s ease; }
.ceremony-door.open .sd-label { opacity: 0; }
.ceremony-door.open .sd-leaf.left { transform: rotateY(-78deg); }
.ceremony-door.open .sd-leaf.right { transform: rotateY(78deg); }

/* Great Vibes draws a capital A that reads like a small "a"; Pinyon Script
   has a clear copperplate capital for the couple's names on the first page */
#screen-door .couple, .dm-name { font-family: "Pinyon Script", "Great Vibes", cursive; }
#screen-door .couple { font-size: clamp(2.8rem, 11vw, 5rem); }

/* Keep text on the background readable when the light band passes behind it */
#screen-door .eyebrow, #screen-door .couple, #screen-door .request, #screen-door .dates, .tap-hint,
.hall-header .eyebrow, .hall-header h2, .blessing {
  text-shadow: 0 2px 4px rgba(35, 2, 12, 0.95), 0 0 14px rgba(35, 2, 12, 0.85), 0 0 28px rgba(35, 2, 12, 0.6);
}
#screen-door .couple { animation: none; }

/* While the door closes the light stays on behind it, and only fades once
   the two halves have met */
.ceremony-door .sd-glow { transition: opacity 0.4s ease 1.5s; }
.ceremony-door.open .sd-glow { transition-delay: 0s; }
.ceremony-door .sd-label { transition: opacity 0.5s ease 1.2s; }
.ceremony-door.open .sd-label { transition-delay: 0s; }

/* Peacocks stand in front of the door: the leaves use a copy of the door
   picture with the birds painted out, and the birds sit on top, unmoving. */
.ceremony-door .sd-leaf { background-image: url("images/doors/carved-door-leaves.jpg"); }
.ceremony-door .sd-peacock {
  left: 0;
  top: 104.6cqw;
  width: 50.6cqw;
  z-index: 1;
}
.ceremony-door .sd-label { z-index: 2; }

/* Peacocks: the body stays still, the heads turn gently this way and that. */
.ceremony-door .sd-peacocks {
  position: absolute;
  left: 0;
  top: 104.6cqw;
  width: 50.6cqw;
  aspect-ratio: 253 / 193;
  z-index: 1;
  pointer-events: none;
}
.sd-peacocks img { position: absolute; display: block; }
.sd-peacocks .pk-body { inset: 0; width: 100%; }
.sd-peacocks .pk-head.left {
  left: 0; top: 0; width: 30.83%;
  transform-origin: 44.9% 92.8%;
  animation: peacockLook 6.4s ease-in-out infinite;
}
.sd-peacocks .pk-head.right {
  left: 63.24%; top: 26.94%; width: 36.76%;
  transform-origin: 60.2% 90.6%;
  animation: peacockLook 7.3s ease-in-out -3.1s infinite reverse;
}
@keyframes peacockLook {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-6deg) scaleX(0.93); }
  35% { transform: rotate(-6deg) scaleX(0.93); }
  50% { transform: rotate(0deg); }
  65% { transform: rotate(5deg) scaleX(0.95); }
  85% { transform: rotate(5deg) scaleX(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .sd-peacocks .pk-head { animation: none; }
}

/* Copyright bar, fixed to the bottom of every page (door, hall and cards). */
.copyright {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  margin: 0;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  text-align: center;
  /* Cinzel has even, same-height digits; Cormorant's digits sit up and down */
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: rgba(244, 215, 140, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  background: linear-gradient(180deg, rgba(30, 4, 12, 0), rgba(30, 4, 12, 0.85) 45%);
  pointer-events: none;
}
.copyright span, .copyright a { white-space: nowrap; }
.copyright a { pointer-events: auto; color: inherit; text-decoration: none; }
.copyright .cp-sep { margin: 0 0.4em; opacity: 0.6; }
/* Small phones: name and number on two neat lines instead of a squeezed one */
@media (max-width: 400px) {
  .copyright { font-size: 0.62rem; letter-spacing: 0.04em; }
  .copyright .cp-sep { display: none; }
  .copyright a { display: block; }
}
