:root {
  --paper: #f8f7f3;
  --green: #30401c;
  --ink: #353535;
  --light-green: #dfe7d9;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  min-width: 320px;
  overflow-x: hidden;
  font-family: "Comic Neue", Arial, sans-serif;
}

.page-scaler {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.figma-canvas {
  position: absolute;
  left: 50%;
  margin-left: -720px;
  top: 0;
  width: 1440px;
  height: 6700px;
  transform-origin: top center;
  background: var(--paper);
  overflow: hidden;
}

/* HERO */
.hero-art {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 1018px;
  object-fit: contain;
}

.intro {
  position: absolute;
  left: 458.5px;
  top: 1007px;
  width: 523px;
  height: 407px;
  text-align: center;
}

.bismillah {
  width: 313px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 10px;
}

.intro-blessing {
  margin: 0;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 25px;
  font-weight: 400;
  color: #353535;
}

.intro h1 {
  margin: 28px 0 18px;
  font-family: "Dancing Script", cursive;
  font-size: 96px;
  line-height: 102px;
  letter-spacing: -2.88px;
  font-weight: 400;
  color: var(--green);
  white-space: nowrap;
}

.intro-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 19px;
  padding: 0 12px;
  font-family: "Castoro Titling", serif;
  font-size: 26px;
  line-height: 32px;
  text-transform: uppercase;
  color: #353535;
  white-space: nowrap;
}

.solid-button,
.outline-button {
  text-decoration: none;
}

.solid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  border-radius: 96px;
  font-family: "Comic Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
}

.rsvp-button {
  margin-top: 28px;
  min-width: 280px;
  height: 49px;
  padding: 0 35px;
  font-size: 16px;
}

/* FAMILY */
.families-heading {
  position: absolute;
  left: 165px;
  top: 1464px;
  width: 1110px;
  margin: 0;
  text-align: center;
  font-family: "Dancing Script", cursive;
  font-size: 96px;
  line-height: 102px;
  letter-spacing: -2.88px;
  font-weight: 400;
  color: var(--green);
  white-space: nowrap;
}

.families {
  position: absolute;
  left: 197px;
  top: 1616px;
  width: 1046px;
  height: 217px;
  display: grid;
  grid-template-columns: 523px 523px;
}

.family-block {
  text-align: center;
}

.family-block h3 {
  margin: 0 0 10px;
  font-family: "Dancing Script", cursive;
  font-size: 74px;
  line-height: 77px;
  letter-spacing: -2.22px;
  font-weight: 400;
  color: var(--green);
  white-space: nowrap;
}

.family-block p {
  width: 523px;
  height: 25px;
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 25px;
  color: #353535;
}

/* HOUSE */
.house-art {
  position: absolute;
  left: 49px;
  top: 1883px;
  width: 1342px;
  height: 641px;
  object-fit: contain;
}

/* SPARKLES */
.spark {
  position: absolute;
  color: #d8e1d3;
  font-family: Georgia, serif;
  font-size: 44px;
  line-height: 1;
  opacity: .9;
}
.sparkle-nikah-left { left: 85px; top: 2576px; }
.sparkle-nikah-right { left: 1325px; top: 2570px; }
.sparkle-reception-left { left: 88px; top: 3820px; }
.sparkle-reception-right { left: 1308px; top: 3502px; }

/* NIKAH */
.chair-art {
  position: absolute;
  left: 167.5px;
  top: 2574px;
  width: 532px;
  height: 805px;
  object-fit: contain;
}

.event-copy {
  text-align: center;
  color: var(--ink);
}

.event-copy h2 {
  margin: 0 0 48px;
  font-family: "Dancing Script", cursive;
  font-size: 74px;
  line-height: 77px;
  letter-spacing: -2.22px;
  font-weight: 400;
  color: var(--green);
}

.event-copy p {
  margin: 0 0 12px;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 26px;
  line-height: 32px;
  text-transform: uppercase;
}

.nikah-copy {
  position: absolute;
  left: 895.5px;
  top: 2815.5px;
  width: 377px;
  min-height: 322px;
}

.outline-button {
  display: inline-flex;
  height: 49px;
  min-width: 136px;
  margin-top: 16px;
  padding: 0 35px;
  align-items: center;
  justify-content: center;
  border: 1px solid #353535;
  border-radius: 96px;
  color: #353535;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* RECEPTION */
.reception-copy {
  position: absolute;
  left: 141px;
  top: 3572.5px;
  width: 441px;
  min-height: 323px;
}

.reception-copy h2 { margin-bottom: 47px; }

.table-art {
  position: absolute;
  left: 664px;
  top: 3429px;
  width: 635px;
  height: 610px;
  object-fit: contain;
}

/* VENUE */
.car-art {
  position: absolute;
  left: 9px;
  top: 4089px;
  width: 622px;
  height: 680px;
  object-fit: contain;
}

.venue-copy {
  position: absolute;
  left: 631px;
  top: 4256px;
  width: 800px;
  height: 346px;
  text-align: center;
}

.venue-copy h2 {
  margin: 0;
  font-family: "Dancing Script", cursive;
  font-size: 74px;
  line-height: 77px;
  letter-spacing: -2.22px;
  font-weight: 400;
  color: var(--green);
}

.venue-cross {
  margin: 10px auto 10px;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 30px;
}

.where {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 25px;
}

.venue-address {
  margin: 0 auto;
  width: 760px;
  font-size: 18px;
  line-height: 23px;
}

.directions-button {
  height: 44px;
  min-width: 231px;
  padding: 0 35px;
  font-size: 14px;
  line-height: 17px;
}

/* MAP + PLANE */
.map-frame {
  position: absolute;
  left: 62.5px;
  top: 4819px;
  width: 800px;
  height: 400px;
  overflow: hidden;
  background: #e9ece7;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.plane-art {
  position: absolute;
  left: 920px;
  top: 4930px;
  width: 405px;
  height: auto;
  object-fit: contain;
}

/* FOOTER */
.footer-flower {
  position: absolute;
  bottom: -22px;
  object-fit: contain;
  pointer-events: none;
}

.footer-flower-left {
  left: -25px;
  width: 470px;
}

.footer-flower-right {
  right: -25px;
  width: 500px;
}

.closing {
  position: absolute;
  left: 0;
  top: 5495px;
  width: 1440px;
  height: 176px;
  text-align: center;
  z-index: 2;
}

.closing p {
  margin: 0;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 25px;
  letter-spacing: .04em;
}

.closing h2 {
  margin: 18px 0 0;
  font-family: "Dancing Script", cursive;
  font-size: 96px;
  line-height: 102px;
  letter-spacing: -2.88px;
  font-weight: 400;
  color: var(--green);
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: transform .15s ease, opacity .15s ease; }
  a:hover { transform: translateY(-1px); opacity: .9; }
}

/* ==========================================================
   RESPONSIVE INVITATION LAYOUT
   Desktop keeps the Figma artboard. Phone/tablet views reflow
   the same artwork into a readable invitation instead of
   shrinking the complete 1440px canvas into one tiny page.
   ========================================================== */
@media (max-width: 899px) {
  html, body {
    width: 100%;
    min-width: 0;
    background: var(--paper);
  }

  body { overflow-x: hidden; }

  .page-scaler {
    height: auto !important;
    min-height: 100vh;
    overflow: visible;
  }

  .figma-canvas {
    position: relative;
    left: auto;
    top: auto;
    margin-left: 0;
    width: 100%;
    height: auto;
    min-height: 100vh;
    transform: none !important;
    transform-origin: initial;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    padding: 12px 0 0;
  }

  .hero-art,
  .intro,
  .families-heading,
  .families,
  .house-art,
  .chair-art,
  .nikah-copy,
  .reception-copy,
  .table-art,
  .car-art,
  .venue-copy,
  .map-frame,
  .plane-art,
  .closing {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    min-height: 0;
  }

  .spark { display: none; }

  /* Hero gets its own visual beat */
  .hero-art {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 540px);
    object-fit: contain;
    margin: 0 auto;
  }

  .intro {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(94%, 520px);
    padding: 2px 18px 0;
    margin: -2px auto 0;
    text-align: center;
  }

  .bismillah {
    width: clamp(132px, 42vw, 190px);
    height: auto;
    margin: 0 auto 9px;
  }

  .intro-blessing {
    font-size: clamp(10px, 2.85vw, 14px);
    line-height: 1.45;
  }

  .intro h1 {
    margin: 16px 0 10px;
    font-size: clamp(45px, 13vw, 68px);
    line-height: 1;
    letter-spacing: -1.3px;
  }

  .intro-meta {
    gap: 10px;
    padding: 0;
    font-size: clamp(10px, 2.75vw, 14px);
    line-height: 1.35;
    letter-spacing: .015em;
  }

  .rsvp-button {
    min-width: 0;
    height: 34px;
    margin-top: 14px;
    padding: 0 17px;
    font-size: 10px;
    letter-spacing: .4px;
  }

  /* Families: retain Narine's two-family composition, but readable */
  .families-heading {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(94%, 650px);
    margin: 38px auto 20px;
    padding: 0 8px;
    font-size: clamp(36px, 10vw, 60px);
    line-height: 1.05;
    letter-spacing: -1px;
    white-space: normal;
  }

  .families {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(96%, 620px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 0 10px;
    align-items: start;
  }

  .family-block h3 {
    margin-bottom: 7px;
    font-size: clamp(28px, 7.7vw, 44px);
    line-height: 1.02;
    letter-spacing: -.6px;
    white-space: normal;
  }

  .family-block p {
    width: auto;
    height: auto;
    margin: 0 0 4px;
    padding: 0 2px;
    font-size: clamp(8.5px, 2.3vw, 12px);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .house-art {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(96%, 720px);
    object-fit: contain;
    margin: 30px auto 58px;
  }

  /* Nikah / reception preserve the original left-right art direction */
  .chair-art {
    grid-column: 1;
    align-self: center;
    justify-self: center;
    width: min(92%, 330px);
    object-fit: contain;
    margin: 0 0 50px;
  }

  .nikah-copy {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    width: min(96%, 300px);
    padding: 0 12px;
    margin: 0 0 50px;
  }

  .event-copy h2 {
    margin: 0 0 22px;
    font-size: clamp(38px, 10.2vw, 58px);
    line-height: 1;
    letter-spacing: -.8px;
  }

  .event-copy p {
    margin: 0 0 7px;
    font-size: clamp(10px, 2.65vw, 14px);
    line-height: 1.45;
  }

  .outline-button {
    height: 35px;
    min-width: 91px;
    margin-top: 11px;
    padding: 0 18px;
    font-size: 10px;
    letter-spacing: .4px;
  }

  .reception-copy {
    grid-column: 1;
    align-self: center;
    justify-self: center;
    width: min(96%, 310px);
    padding: 0 12px;
    margin: 0 0 52px;
  }

  .reception-copy h2 { margin-bottom: 22px; }

  .table-art {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    width: min(96%, 370px);
    object-fit: contain;
    margin: 0 0 52px;
  }

  /* Venue */
  .car-art {
    grid-column: 1;
    align-self: center;
    justify-self: center;
    width: min(98%, 360px);
    object-fit: contain;
    margin: 6px 0 42px;
  }

  .venue-copy {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    width: min(98%, 380px);
    padding: 0 10px;
    margin: 0 0 42px;
  }

  .venue-copy h2 {
    font-size: clamp(35px, 9.2vw, 55px);
    line-height: 1;
    letter-spacing: -.7px;
  }

  .venue-cross {
    margin: 5px auto;
    font-size: 13px;
    line-height: 20px;
  }

  .where {
    margin: 0 0 8px;
    font-size: clamp(10px, 2.55vw, 13px);
    line-height: 1.35;
  }

  .venue-address {
    width: auto;
    margin: 0 auto;
    font-size: clamp(9px, 2.25vw, 12px);
    line-height: 1.45;
  }

  .venue-address br { display: none; }

  .directions-button {
    min-width: 0;
    height: 34px;
    padding: 0 15px;
    font-size: 9px;
    line-height: 1;
  }

  /* Route / travel visual */
  .map-frame {
    grid-column: 1;
    align-self: center;
    justify-self: stretch;
    width: calc(100% - 18px);
    height: clamp(170px, 48vw, 280px);
    margin: 8px 0 42px 14px;
    border-radius: 1px;
  }

  .plane-art {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    width: min(86%, 300px);
    object-fit: contain;
    margin: 8px 0 42px;
  }

  /* Closing composition */
  .closing {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 250px;
    padding: 80px 20px 88px;
    text-align: center;
    z-index: 3;
  }

  .closing p {
    font-size: clamp(11px, 2.8vw, 14px);
    line-height: 1.25;
    letter-spacing: .05em;
  }

  .closing h2 {
    margin-top: 12px;
    font-size: clamp(48px, 13vw, 72px);
    line-height: 1;
    letter-spacing: -1.2px;
  }

  .footer-flower {
    position: absolute;
    bottom: -4px;
    height: auto;
    z-index: 2;
  }

  .footer-flower-left {
    left: -26px;
    width: min(48vw, 260px);
  }

  .footer-flower-right {
    right: -26px;
    width: min(51vw, 275px);
  }
}

/* Very small phones: prevent the two-column areas becoming cramped. */
@media (max-width: 355px) {
  .intro { width: 98%; padding-inline: 12px; }
  .intro-meta { gap: 7px; font-size: 9px; }
  .families { gap: 7px; padding-inline: 5px; }
  .family-block p { font-size: 8px; }
  .event-copy { padding-inline: 7px; }
  .event-copy p { font-size: 9px; }
  .venue-copy { padding-inline: 5px; }
  .venue-address { font-size: 8.5px; }
}

/* Mobile landscape gets more breathing room horizontally, while keeping the
   page readable instead of reverting to the tiny desktop-artboard scale. */
@media (min-width: 560px) and (max-width: 899px) and (orientation: landscape) {
  .figma-canvas {
    max-width: 820px;
    margin: 0 auto;
    padding-top: 8px;
  }

  .hero-art { width: min(72%, 590px); }

  .intro {
    width: min(76%, 590px);
    padding-inline: 22px;
  }

  .intro h1 { font-size: clamp(58px, 9vw, 72px); }
  .intro-blessing { font-size: 13px; }
  .intro-meta { font-size: 13px; }

  .families-heading {
    width: min(82%, 650px);
    margin-top: 42px;
    font-size: clamp(48px, 7vw, 62px);
  }

  .families { width: min(78%, 640px); }
  .family-block h3 { font-size: clamp(38px, 5.8vw, 48px); }
  .family-block p { font-size: 11px; }

  .house-art {
    width: min(78%, 680px);
    margin-top: 30px;
    margin-bottom: 66px;
  }

  .chair-art { width: min(72%, 340px); margin-bottom: 58px; }
  .nikah-copy { width: min(88%, 330px); margin-bottom: 58px; }
  .event-copy h2 { font-size: 52px; }
  .event-copy p { font-size: 13px; }

  .reception-copy { width: min(88%, 330px); margin-bottom: 62px; }
  .table-art { width: min(78%, 370px); margin-bottom: 62px; }

  .car-art { width: min(82%, 380px); margin-bottom: 56px; }
  .venue-copy { width: min(90%, 390px); margin-bottom: 56px; }
  .venue-copy h2 { font-size: 50px; }
  .venue-address { font-size: 11px; }

  .map-frame {
    width: calc(100% - 32px);
    height: 250px;
    margin-left: 20px;
    margin-bottom: 58px;
  }
  .plane-art { width: min(70%, 310px); margin-bottom: 58px; }

  .closing { min-height: 290px; padding-top: 92px; padding-bottom: 105px; }
  .closing h2 { font-size: 68px; }
  .footer-flower-left { width: min(37vw, 280px); }
  .footer-flower-right { width: min(39vw, 295px); }
}

/* ==========================================================
   NARINE V4 — OPENING EXPERIENCE + ELEGANT SCROLL MOTION
   ========================================================== */
html { scroll-behavior: smooth; }
body.gate-active { overflow: hidden; }

/* Full-screen opener */
.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
  opacity: 1;
  visibility: visible;
  transition: opacity .72s cubic-bezier(.22,.7,.25,1), visibility .72s;
}
.intro-gate__stage {
  position: relative;
  width: min(100vw, 1440px);
  height: min(100svh, 1018px);
  overflow: hidden;
  background: var(--paper);
  transform: scale(1.025);
  transition: transform 1.15s cubic-bezier(.22,.75,.22,1);
}
.intro-gate__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  pointer-events: none;
}

/* A watercolor-like central seal/veil hides the merged couple artwork until opened. */
.intro-gate__veil {
  position: absolute;
  left: 50%;
  top: 62%;
  width: clamp(310px, 31vw, 455px);
  height: clamp(390px, 45vw, 600px);
  transform: translate(-50%, -50%);
  border-radius: 48% 48% 46% 46% / 34% 34% 55% 55%;
  background:
    radial-gradient(circle at 50% 12%, rgba(231,235,226,.99) 0 22%, rgba(242,242,235,.99) 52%, rgba(248,247,243,.985) 74%, rgba(248,247,243,.90) 100%);
  box-shadow:
    0 0 44px 36px rgba(248,247,243,.78),
    inset 0 0 55px rgba(48,64,28,.035);
  opacity: 1;
  filter: blur(.2px);
  transition: opacity .9s cubic-bezier(.22,.65,.25,1), transform .9s cubic-bezier(.22,.75,.25,1), filter .9s ease;
  pointer-events: none;
}
.intro-gate__button {
  position: absolute;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%);
  width: 126px;
  height: 126px;
  border-radius: 50%;
  border: 1px solid rgba(48,64,28,.42);
  background: rgba(248,247,243,.92);
  color: var(--green);
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
  font: 700 13px/1.15 "Comic Neue", Arial, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  box-shadow: 0 12px 34px rgba(39,52,29,.12), 0 0 0 0 rgba(48,64,28,.12);
  transition: opacity .5s ease, transform .65s cubic-bezier(.22,.75,.25,1), background .25s ease;
  animation: gatePulse 2.8s ease-in-out infinite;
}
.intro-gate__button:hover { background: #fff; }
.intro-gate__button:focus-visible { outline: 3px solid rgba(48,64,28,.25); outline-offset: 5px; }
.intro-gate__star { font-size: 15px; line-height: 1; }
@keyframes gatePulse {
  0%,100% { box-shadow: 0 12px 34px rgba(39,52,29,.12), 0 0 0 0 rgba(48,64,28,.10); }
  50% { box-shadow: 0 12px 34px rgba(39,52,29,.12), 0 0 0 12px rgba(48,64,28,0); }
}

body.gate-revealing .intro-gate__button {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.86);
  pointer-events: none;
  animation: none;
}
body.gate-revealing .intro-gate__veil {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.07);
  filter: blur(8px);
}
body.gate-revealing .intro-gate__stage { transform: scale(1); }
body.gate-settling .intro-gate {
  opacity: 0;
  pointer-events: none;
}
body.gate-settling .intro-gate__stage {
  transform: translateY(-2.3vh) scale(.975);
}
body.gate-complete .intro-gate { display: none; }

/* Music control */
.music-toggle {
  position: fixed;
  z-index: 8500;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(48,64,28,.28);
  background: rgba(248,247,243,.9);
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(48,64,28,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: 700 18px/1 "Comic Neue", Arial, sans-serif;
}
.music-toggle[hidden] { display: none !important; }
.music-toggle__off { display: none; font-size: 18px; }
.music-toggle.is-muted .music-toggle__on { display: none; }
.music-toggle.is-muted .music-toggle__off { display: block; }

/* Scroll-triggered movement. JS adds .is-visible once, then leaves it there. */
.motion-ready .reveal {
  opacity: 0;
  transition:
    opacity .82s cubic-bezier(.22,.65,.25,1),
    transform .82s cubic-bezier(.22,.72,.25,1),
    filter .82s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.motion-ready .reveal-up { transform: translateY(34px); }
.motion-ready .reveal-left { transform: translateX(-42px); }
.motion-ready .reveal-right { transform: translateX(42px); }
.motion-ready .reveal-soft { transform: translateY(15px) scale(.985); }
.motion-ready .reveal-scale { transform: scale(.975); filter: saturate(.95); }
.motion-ready .reveal-scale-left { transform: translateX(-20px) scale(.975); }
.motion-ready .reveal-scale-right { transform: translateX(20px) scale(.975); }
.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Make venue anchor stop with the heading comfortably visible. */
#venue { scroll-margin-top: 95px; }

@media (max-width: 899px) {
  .intro-gate__stage {
    width: 100vw;
    height: 100svh;
  }
  .intro-gate__art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
  }
  .intro-gate__veil {
    top: 60%;
    width: clamp(245px, 69vw, 370px);
    height: clamp(390px, 116vw, 570px);
  }
  .intro-gate__button {
    top: 51%;
    width: 104px;
    height: 104px;
    font-size: 11px;
  }
  .music-toggle {
    width: 39px;
    height: 39px;
    right: 12px;
    top: 12px;
  }
  .motion-ready .reveal-up { transform: translateY(25px); }
  .motion-ready .reveal-left { transform: translateX(-28px); }
  .motion-ready .reveal-right { transform: translateX(28px); }
  .motion-ready .reveal-scale-left { transform: translateX(-15px) scale(.982); }
  .motion-ready .reveal-scale-right { transform: translateX(15px) scale(.982); }
  #venue { scroll-margin-top: 62px; }
}

@media (min-width: 560px) and (max-width: 899px) and (orientation: landscape) {
  .intro-gate__art {
    object-fit: cover;
    object-position: center center;
  }
  .intro-gate__veil {
    top: 58%;
    width: min(34vw, 300px);
    height: min(63vh, 380px);
  }
  .intro-gate__button {
    top: 50%;
    width: 92px;
    height: 92px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-gate__button { animation: none; }
  .motion-ready .reveal,
  .motion-ready .reveal-up,
  .motion-ready .reveal-left,
  .motion-ready .reveal-right,
  .motion-ready .reveal-soft,
  .motion-ready .reveal-scale,
  .motion-ready .reveal-scale-left,
  .motion-ready .reveal-scale-right {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}


/* ==========================================================
   NARINE V5 — SLOWER OPENING, FROSTED WATERCOLOR REVEAL
   ========================================================== */

/* Keep the opener visually calm; the page underneath does not compete until the settle phase. */
.intro-gate{
  transition:
    opacity 1.65s cubic-bezier(.22,.68,.2,1),
    visibility 1.65s;
}

.intro-gate__stage{
  transform:scale(1.018);
  transition:
    transform 1.75s cubic-bezier(.18,.72,.2,1),
    opacity 1.55s ease;
}

/*
  The couple is part of the exported hero artwork, so instead of a large blank patch,
  use a soft frosted-watercolor veil directly over them. It keeps the arch/background
  visually present while making the couple unreadable until the guest opens the invite.
*/
.intro-gate__veil{
  left:50%;
  top:61%;
  width:clamp(235px,23vw,320px);
  height:clamp(325px,35vw,455px);
  border-radius:49% 49% 46% 46% / 39% 39% 57% 57%;
  background:
    radial-gradient(circle at 50% 32%,
      rgba(248,247,243,.78) 0 28%,
      rgba(242,244,237,.70) 57%,
      rgba(248,247,243,.54) 78%,
      rgba(248,247,243,.28) 100%);
  border:1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter:blur(22px) saturate(.55) brightness(1.18);
  backdrop-filter:blur(22px) saturate(.55) brightness(1.18);
  box-shadow:
    0 0 34px 22px rgba(248,247,243,.30),
    inset 0 0 48px rgba(255,255,255,.20);
  filter:none;
  transition:
    opacity 1.55s cubic-bezier(.2,.62,.2,1),
    transform 1.65s cubic-bezier(.18,.72,.2,1),
    -webkit-backdrop-filter 1.55s ease,
    backdrop-filter 1.55s ease,
    box-shadow 1.55s ease;
}

.intro-gate__button{
  top:52.5%;
  width:118px;
  height:118px;
  background:rgba(248,247,243,.93);
  border:1px solid rgba(48,64,28,.34);
  box-shadow:
    0 14px 36px rgba(39,52,29,.13),
    0 0 0 0 rgba(48,64,28,.12);
  transition:
    opacity .48s ease,
    transform .62s cubic-bezier(.2,.75,.2,1),
    background .25s ease;
  animation:gatePulseV5 3.2s ease-in-out infinite;
}
@keyframes gatePulseV5{
  0%,100%{
    box-shadow:0 14px 36px rgba(39,52,29,.13),0 0 0 0 rgba(48,64,28,.10);
  }
  50%{
    box-shadow:0 14px 36px rgba(39,52,29,.13),0 0 0 14px rgba(48,64,28,0);
  }
}

body.gate-revealing .intro-gate__button{
  opacity:0;
  transform:translate(-50%,-50%) scale(.82);
  pointer-events:none;
  animation:none;
}

body.gate-revealing .intro-gate__veil{
  opacity:0;
  transform:translate(-50%,-50%) scale(1.045);
  -webkit-backdrop-filter:blur(3px) saturate(.9) brightness(1.04);
  backdrop-filter:blur(3px) saturate(.9) brightness(1.04);
  box-shadow:0 0 18px 10px rgba(248,247,243,0);
}

/* Very subtle "breath" while the couple is being revealed. */
body.gate-revealing .intro-gate__stage{
  transform:scale(1.002);
}

/*
  After the couple has been visible long enough to register, the opener settles
  back into the real invitation. This is intentionally much slower than v4.
*/
body.gate-settling .intro-gate{
  opacity:0;
  pointer-events:none;
}

body.gate-settling .intro-gate__stage{
  transform:translateY(-5.5vh) scale(.885);
  opacity:.78;
}

body.gate-complete .intro-gate{display:none}

/* Let the first page content arrive after the opener, not all at once. */
.motion-ready .reveal{
  transition-duration:.92s;
}

/* Music control is deliberately quiet visually. */
.music-toggle{
  opacity:.82;
  transition:opacity .2s ease,transform .2s ease,background .2s ease;
}
.music-toggle:hover{opacity:1;transform:translateY(-1px)}

/* Mobile opener: keep the frosted veil on the couple rather than covering the whole arch. */
@media (max-width:899px){
  .intro-gate__art{
    object-fit:cover;
    object-position:center 50%;
  }
  .intro-gate__veil{
    top:59%;
    width:clamp(215px,57vw,292px);
    height:clamp(330px,84vw,425px);
    -webkit-backdrop-filter:blur(20px) saturate(.55) brightness(1.16);
    backdrop-filter:blur(20px) saturate(.55) brightness(1.16);
  }
  .intro-gate__button{
    top:51.5%;
    width:104px;
    height:104px;
  }
  body.gate-settling .intro-gate__stage{
    transform:translateY(-3.5vh) scale(.91);
  }
}

/* Landscape phones need a shallower mask and less vertical travel. */
@media (min-width:560px) and (max-width:899px) and (orientation:landscape){
  .intro-gate__veil{
    top:58%;
    width:min(29vw,245px);
    height:min(72vh,310px);
  }
  .intro-gate__button{
    top:50%;
    width:92px;
    height:92px;
  }
  body.gate-settling .intro-gate__stage{
    transform:translateY(-2.5vh) scale(.92);
  }
}


/* ==========================================================
   V9 — Rebuilt premium opening for Narine version
   One elegant sequence: empty arch → couple reveal → glide to hero
   ========================================================== */

:root {
  --gate-couple-x: 50.4%;
  --gate-couple-y: 61.5%;
}

body.gate-active {
  overflow: hidden;
}

body.gate-active .hero-art,
body.gate-active .intro,
body.gate-active .families-heading,
body.gate-active .families,
body.gate-active .house-art,
body.gate-active .chair-art,
body.gate-active .nikah-copy,
body.gate-active .reception-copy,
body.gate-active .table-art,
body.gate-active .car-art,
body.gate-active .venue-copy,
body.gate-active .map-frame,
body.gate-active .plane-art,
body.gate-active .countdown-block,
body.gate-active .rsvp-card,
body.gate-active .footer-flower,
body.gate-active .closing,
body.gate-active .spark {
  visibility: hidden;
}

.hero-art--opening-ready {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: var(--bg);
  opacity: 1;
  transition: opacity 220ms ease;
}

.intro-gate__stage {
  position: fixed;
  overflow: hidden;
  background: transparent;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  will-change: transform, opacity;
  transition: transform 1380ms cubic-bezier(.2, .72, .18, 1);
}

.intro-gate__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.intro-gate__art--full {
  opacity: 1;
  clip-path: ellipse(0% 0% at var(--gate-couple-x) var(--gate-couple-y));
  transition:
    clip-path 1200ms cubic-bezier(.22, .72, .20, 1),
    transform 1200ms cubic-bezier(.22, .72, .20, 1);
  transform: translateY(14px);
}

.intro-gate__bloom {
  position: absolute;
  left: var(--gate-couple-x);
  top: var(--gate-couple-y);
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.72);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.72) 0%, rgba(255,255,255,.34) 30%, rgba(255,255,255,0) 72%);
  opacity: 0;
  pointer-events: none;
  transition: transform 950ms cubic-bezier(.22, .72, .20, 1), opacity 950ms ease;
  mix-blend-mode: screen;
}

.intro-gate__button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(52, 69, 36, .17);
  background: rgba(255,255,255,.84);
  color: var(--green);
  box-shadow: 0 16px 40px rgba(52, 69, 36, .08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: opacity 260ms ease, transform 520ms cubic-bezier(.22,.72,.2,1), background .25s ease, box-shadow .25s ease;
  animation: gatePulse 3.2s ease-in-out infinite;
  font: 700 12px/1.18 "Comic Neue", Arial, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.intro-gate__button:hover {
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 48px rgba(52, 69, 36, .10);
}

.intro-gate__button:focus-visible {
  outline: 3px solid rgba(52, 69, 36, .18);
  outline-offset: 5px;
}

.intro-gate__star { font-size: 14px; line-height: 1; }

@keyframes gatePulse {
  0%, 100% {
    box-shadow: 0 16px 40px rgba(52, 69, 36, .08), 0 0 0 0 rgba(78, 103, 53, .08);
  }
  50% {
    box-shadow: 0 20px 48px rgba(52, 69, 36, .11), 0 0 0 14px rgba(78, 103, 53, 0);
  }
}

.intro-gate.is-revealed .intro-gate__button {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
  pointer-events: none;
  animation: none;
}

.intro-gate.is-revealed .intro-gate__bloom {
  opacity: .8;
  transform: translate(-50%, -50%) scale(1.25);
}

.intro-gate.is-revealed .intro-gate__art--full {
  clip-path: ellipse(20% 35% at var(--gate-couple-x) var(--gate-couple-y));
  transform: translateY(0);
}

.intro-gate.is-settling .intro-gate__stage {
  transform: translate3d(0, var(--gate-travel-y, 0px), 0);
}

.intro-gate.is-settling .intro-gate__bloom {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.5);
}

.intro-gate.is-settling .intro-gate__art--full {
  clip-path: ellipse(125% 125% at 50% 50%);
}

.intro-gate.is-handoff {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 899px) {
  .intro-gate__button {
    width: 106px;
    height: 106px;
    font-size: 10.5px;
  }

  .intro-gate__bloom {
    width: 156px;
  }
}

@media (max-width: 430px) {
  .intro-gate__button {
    width: 98px;
    height: 98px;
    font-size: 10px;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-gate,
  .intro-gate__stage,
  .intro-gate__art--full,
  .intro-gate__bloom,
  .intro-gate__button {
    transition-duration: .2s !important;
    animation: none !important;
  }
}


/* ==========================================================
   V10 FEEDBACK UPDATES — MUSIC OFFSET, COUNTDOWN, RSVP, FOOTER FLOWERS
   ========================================================== */

/* Desktop layout additions */
.countdown-block {
  position: absolute;
  left: 180px;
  top: 5290px;
  width: 1080px;
  min-height: 140px;
  text-align: center;
  padding: 28px 38px 24px;
  border: 1px solid rgba(48, 64, 28, 0.18);
  border-radius: 34px;
  background: rgba(255,255,255,0.34);
  backdrop-filter: blur(3px);
  z-index: 2;
}
.countdown-kicker {
  margin: 0 0 20px;
  font-family: "Castoro Titling", serif;
  font-size: 20px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--green);
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.countdown-item {
  min-width: 145px;
  display: grid;
  gap: 6px;
}
.countdown-item span {
  display: block;
  font-family: "Dancing Script", cursive;
  font-size: 74px;
  line-height: .95;
  letter-spacing: -1.5px;
  color: var(--green);
}
.countdown-item small {
  font-family: "Castoro Titling", serif;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #49513f;
}
.countdown-separator {
  font-family: "Castoro Titling", serif;
  font-size: 34px;
  line-height: 1;
  color: rgba(48,64,28,0.4);
  transform: translateY(-10px);
}

.rsvp-card {
  position: absolute;
  left: 380px;
  top: 5470px;
  width: 680px;
  min-height: 640px;
  z-index: 2;
}
.rsvp-card__inner {
  border-radius: 34px;
  padding: 52px 48px 42px;
  background: rgba(255,252,248,0.82);
  box-shadow: 0 20px 50px rgba(73, 70, 59, 0.10);
  border: 1px solid rgba(48, 64, 28, 0.10);
  backdrop-filter: blur(4px);
}
.rsvp-card h2 {
  margin: 0 0 14px;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 700;
  color: #243048;
}
.rsvp-card__intro {
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 1.45;
  color: #6f7785;
}
.rsvp-form { display: grid; gap: 18px; }
.rsvp-label {
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: #243048;
}
.rsvp-form input[type="text"] {
  width: 100%;
  height: 72px;
  border-radius: 22px;
  border: 1px solid #dde1e8;
  background: #f7f7f7;
  padding: 0 22px;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 18px;
  color: #243048;
  outline: none;
}
.rsvp-form input[type="text"]::placeholder { color: #a0a6b0; }
.rsvp-form input[type="text"]:focus {
  border-color: rgba(48, 64, 28, 0.35);
  box-shadow: 0 0 0 3px rgba(48,64,28,0.08);
}
.attendance-options { display: grid; gap: 14px; }
.attendance-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  border: 1px solid #e3e5ea;
  background: #f7f7f7;
  border-radius: 22px;
  padding: 0 18px;
  cursor: pointer;
}
.attendance-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.attendance-option__icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: #d9dde3;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  color: #636b79;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.attendance-option__text {
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #334055;
}
.attendance-option:has(input:checked) {
  border-color: rgba(48,64,28,0.28);
  background: #fcfbf8;
}
.attendance-option:has(input:checked) .attendance-option__icon {
  background: #cfd7c7;
  color: var(--green);
  transform: scale(1.06);
}
.rsvp-submit {
  margin-top: 8px;
  width: 100%;
  height: 68px;
  border: 0;
  border-radius: 22px;
  background: #d4bcab;
  color: #fff;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(70,70,70,0.06);
}
.rsvp-submit:hover { filter: brightness(.98); }
.rsvp-note {
  margin: 4px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: #8a8f98;
}
.rsvp-success {
  margin: 4px 0 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.4;
  color: var(--green);
  font-weight: 700;
}

/* Footer flowers fully visible */
.footer-flower {
  bottom: 14px;
}
.footer-flower-left {
  left: 0;
  width: 360px;
}
.footer-flower-right {
  right: 0;
  width: 395px;
}
.closing {
  top: 6150px;
  height: 190px;
}

@media (max-width: 899px) {
  .countdown-block,
  .rsvp-card {
    position: relative;
    left: auto;
    top: auto;
    width: min(92%, 720px);
    height: auto;
  }
  .countdown-block {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 6px auto 30px;
    padding: 24px 18px 22px;
    border-radius: 28px;
  }
  .countdown-kicker {
    font-size: clamp(11px, 2.8vw, 14px);
    margin-bottom: 14px;
  }
  .countdown {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .countdown-item {
    min-width: 0;
    flex: 1 1 0;
    gap: 5px;
  }
  .countdown-item span {
    font-size: clamp(31px, 8.4vw, 46px);
    letter-spacing: -.8px;
  }
  .countdown-item small {
    font-size: clamp(8px, 2vw, 10px);
    letter-spacing: .12em;
  }
  .countdown-separator {
    font-size: clamp(15px, 3vw, 18px);
    transform: translateY(-6px);
  }

  .rsvp-card {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0 auto 52px;
  }
  .rsvp-card__inner {
    padding: 28px 18px 24px;
    border-radius: 26px;
  }
  .rsvp-card h2 {
    font-size: clamp(24px, 6.6vw, 32px);
    margin-bottom: 10px;
  }
  .rsvp-card__intro {
    font-size: clamp(13px, 3.3vw, 16px);
    margin-bottom: 20px;
  }
  .rsvp-form { gap: 14px; }
  .rsvp-label { font-size: clamp(17px, 4.4vw, 21px); }
  .rsvp-form input[type="text"] {
    height: 58px;
    border-radius: 18px;
    font-size: 16px;
    padding-inline: 18px;
  }
  .attendance-option {
    min-height: 72px;
    border-radius: 18px;
    gap: 12px;
    padding-inline: 14px;
  }
  .attendance-option__icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 20px;
  }
  .attendance-option__text {
    font-size: clamp(15px, 4vw, 18px);
  }
  .rsvp-submit {
    height: 58px;
    border-radius: 18px;
    font-size: 17px;
  }
  .rsvp-note, .rsvp-success {
    font-size: 13px;
  }

  .closing {
    min-height: 220px;
    padding-top: 64px;
    padding-bottom: 88px;
  }
  .footer-flower {
    bottom: 10px;
  }
  .footer-flower-left {
    left: 0;
    width: min(42vw, 210px);
  }
  .footer-flower-right {
    right: 0;
    width: min(45vw, 225px);
  }
}

@media (max-width: 520px) {
  .countdown-block { width: min(94%, 460px); }
  .countdown { gap: 4px; }
  .countdown-item span { font-size: clamp(26px, 8vw, 38px); }
  .countdown-separator { font-size: 14px; }
}


/* ==========================================================
   V11 — RSVP STATE COLORS + NON-OVERLAPPING FINAL SECTION
   ========================================================== */

/* Give the post-location content a clear vertical rhythm on desktop. */
.countdown-block {
  top: 5290px;
}

.rsvp-card {
  top: 5510px;
  min-height: 0;
}

.rsvp-card__inner {
  min-height: 0;
}

/* Final message now begins only after the RSVP card has fully finished. */
.closing {
  top: 6285px;
  height: 210px;
  z-index: 4;
}

/* Show both Figma floral assets fully inside the canvas instead of cutting them at the edges. */
.footer-flower {
  bottom: 18px;
  height: auto;
  object-fit: contain;
  z-index: 2;
}

.footer-flower-left {
  left: 14px;
  width: 390px;
}

.footer-flower-right {
  right: 14px;
  width: 425px;
}

/* RSVP default state */
.attendance-option {
  transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.attendance-option:hover {
  border-color: rgba(48,64,28,.18);
  background: #fbfbf9;
}

/* YES gets the invitation's muted green palette. */
.attendance-option--yes:has(input:checked) {
  border-color: rgba(65, 91, 48, .38);
  background: #f3f7ef;
  box-shadow: 0 7px 18px rgba(65,91,48,.07);
}

.attendance-option--yes:has(input:checked) .attendance-option__icon {
  background: #dce7d5;
  color: #30401c;
}

.attendance-option--yes:has(input:checked) .attendance-option__text {
  color: #30401c;
}

/* NO uses a restrained dusty-rose state — distinct, but still on-theme. */
.attendance-option--no:has(input:checked) {
  border-color: rgba(166, 101, 89, .34);
  background: #fbf3f1;
  box-shadow: 0 7px 18px rgba(166,101,89,.06);
}

.attendance-option--no:has(input:checked) .attendance-option__icon {
  background: #ead8d3;
  color: #9c6258;
}

.attendance-option--no:has(input:checked) .attendance-option__text {
  color: #87564e;
}

/* Confirm button begins neutral and only becomes meaningful after the guest chooses. */
.rsvp-submit {
  background: #d9d3cd;
  color: rgba(255,255,255,.95);
  cursor: not-allowed;
  transition: background-color .22s ease, box-shadow .22s ease, transform .18s ease, opacity .22s ease;
}

.rsvp-submit:disabled {
  opacity: .82;
  box-shadow: none;
}

.rsvp-card[data-choice="yes"] .rsvp-submit:not(:disabled) {
  background: #637b50;
  box-shadow: 0 10px 22px rgba(69,93,49,.14);
  cursor: pointer;
}

.rsvp-card[data-choice="no"] .rsvp-submit:not(:disabled) {
  background: #c79c91;
  box-shadow: 0 10px 22px rgba(164,103,89,.12);
  cursor: pointer;
}

.rsvp-submit:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(.985);
}

.rsvp-success {
  min-height: 24px;
  margin-top: 4px;
}

.rsvp-card[data-choice="no"] .rsvp-success {
  color: #8d5f56;
}

/* Submitted state should remain visually stable and not collapse into the footer. */
.rsvp-card.is-submitted .rsvp-note {
  margin-bottom: 0;
}

@media (max-width: 899px) {
  /* Mobile uses natural document flow, so no overlap can occur. */
  .rsvp-card {
    margin-bottom: 34px;
  }

  .closing {
    top: auto;
    margin-top: 16px;
    min-height: 280px;
    padding-top: 58px;
    padding-bottom: 108px;
  }

  .footer-flower {
    bottom: 12px;
  }

  .footer-flower-left {
    left: 10px;
    width: min(38vw, 190px);
  }

  .footer-flower-right {
    right: 10px;
    width: min(41vw, 205px);
  }
}

@media (max-width: 430px) {
  .closing {
    min-height: 250px;
    padding-top: 50px;
    padding-bottom: 94px;
  }

  .footer-flower-left {
    width: 36vw;
  }

  .footer-flower-right {
    width: 39vw;
  }
}

/* ==========================================================
   V12 — FINAL FOOTER COMPOSITION / SPACING POLISH
   Matches the Figma closing composition more closely.
   ========================================================== */

/* Give the RSVP card and the closing message a deliberate breathing space. */
.closing {
  top: 6405px;
  height: 225px;
  z-index: 4;
}

/* The floral artwork should touch the left/right/bottom edges exactly,
   as in the Figma composition — no artificial margins. */
.footer-flower {
  bottom: 0;
  object-fit: contain;
  z-index: 2;
}

.footer-flower-left {
  left: 0;
  width: 455px;
}

.footer-flower-right {
  right: 0;
  width: 515px;
}

/* Position the closing copy between the two floral arrangements rather than above them. */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 18px;
}

.closing p {
  margin: 0 0 18px;
}

.closing h2 {
  margin: 0;
}

/* Keep the full bottom edge occupied by the Figma artwork. */
.figma-canvas {
  overflow: hidden;
}

@media (max-width: 899px) {
  /* Natural-flow mobile spacing: noticeably more room after the form. */
  .rsvp-card {
    margin-bottom: 86px;
  }

  .closing {
    top: auto;
    margin-top: 0;
    min-height: 300px;
    padding: 64px 14px 112px;
    justify-content: flex-start;
  }

  .closing p {
    margin-bottom: 14px;
  }

  /* Flush to viewport/canvas edges and bottom — no white gutter around flowers. */
  .footer-flower {
    bottom: 0;
  }

  .footer-flower-left {
    left: 0;
    width: min(43vw, 220px);
  }

  .footer-flower-right {
    right: 0;
    width: min(47vw, 240px);
  }
}

@media (max-width: 430px) {
  .rsvp-card {
    margin-bottom: 74px;
  }

  .closing {
    min-height: 270px;
    padding-top: 54px;
    padding-bottom: 98px;
  }

  .footer-flower-left {
    left: 0;
    width: 40vw;
  }

  .footer-flower-right {
    right: 0;
    width: 44vw;
  }
}


/* ==========================================================
   V13 — MOBILE/TABLET SPACING & FLOW QA FIX
   Countdown and RSVP remain in natural document flow on small screens,
   with no invisible reveal placeholders or oversized grid gaps.
   ========================================================== */

@media (max-width: 899px) {
  .figma-canvas {
    row-gap: 0;
    align-items: start;
  }

  /* Keep the location/travel row compact before the new content starts. */
  .map-frame {
    margin-bottom: 24px;
  }

  .plane-art {
    margin-bottom: 24px;
  }

  /* These blocks must always render immediately when reached in mobile flow. */
  .countdown-block,
  .rsvp-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    visibility: visible !important;
    transition: none !important;
  }

  .countdown-block {
    grid-column: 1 / -1;
    width: min(92%, 620px);
    min-height: 0;
    margin: 8px auto 28px;
    padding: 22px 16px 20px;
  }

  .rsvp-card {
    grid-column: 1 / -1;
    width: min(92%, 620px);
    min-height: 0;
    margin: 0 auto 72px;
  }

  .rsvp-card__inner {
    min-height: 0;
  }

  /* The closing should follow the form naturally; no implicit empty row. */
  .closing {
    grid-column: 1 / -1;
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .map-frame,
  .plane-art {
    margin-bottom: 18px;
  }

  .countdown-block {
    width: min(94%, 460px);
    margin-top: 4px;
    margin-bottom: 22px;
    padding: 20px 12px 18px;
  }

  .rsvp-card {
    width: min(94%, 460px);
    margin-bottom: 64px;
  }

  .rsvp-card__inner {
    padding: 26px 16px 22px;
  }
}

/* Landscape phones/tablets use the same compact flow instead of inheriting
   the older 58px bottom margins from the landscape layout rules. */
@media (min-width: 560px) and (max-width: 899px) and (orientation: landscape) {
  .map-frame,
  .plane-art {
    margin-bottom: 26px;
  }

  .countdown-block {
    width: min(82%, 680px);
    margin: 4px auto 28px;
  }

  .rsvp-card {
    width: min(78%, 650px);
    margin: 0 auto 74px;
  }
}


/* =========================================================
   V14 — performance/navigation/large-screen refinements
   ========================================================= */
#rsvp-flow { scroll-margin-top: 42px; }

/* On large desktop screens the 1440px Figma artboard now scales up proportionally
   instead of sitting as a small island in a 1920px viewport. */
@media (min-width: 1441px) {
  body { background: var(--paper); }
  .page-scaler { width: 100%; }
}

@media (max-width: 899px) {
  #rsvp-flow { scroll-margin-top: 18px; }
}


/* ==========================================================
   V16 — RSVP GUEST COUNT + FAVICON
   ========================================================== */
.guest-count-field {
  display: grid;
  gap: 9px;
}
.guest-count-field[hidden] { display: none !important; }
.rsvp-label__hint {
  font-weight: 400;
  color: #7f8792;
  font-size: .82em;
}
#guestCount {
  width: 100%;
  height: 72px;
  border-radius: 22px;
  border: 1px solid #dde1e8;
  background: #f7f7f7;
  padding: 0 22px;
  font-family: "Comic Neue", Arial, sans-serif;
  font-size: 18px;
  color: #243048;
  outline: none;
  -moz-appearance: textfield;
}
#guestCount::placeholder { color: #a0a6b0; }
#guestCount:focus {
  border-color: rgba(48, 64, 28, 0.35);
  box-shadow: 0 0 0 3px rgba(48,64,28,0.08);
}
#guestCount:disabled {
  cursor: not-allowed;
  opacity: .68;
  background: #f1f1ef;
}
/* The form can grow naturally when the guest-count field is shown. */
.rsvp-card { height: auto; }

@media (max-width: 520px) {
  #guestCount { height: 58px; font-size: 16px; border-radius: 18px; }
}


/* ==========================================================
   V18 — RSVP INPUT UX + REFRESH/GATE SAFETY
   Keep countdown/RSVP out of the opening screen even though the
   mobile flow intentionally forces them visible after the gate opens.
   ========================================================== */
body.gate-active .countdown-block,
body.gate-active .rsvp-card {
  visibility: hidden !important;
}


/* ==========================================================
   V19 — RSVP guest-count state polish
   ========================================================== */
.guest-count-field.is-disabled .rsvp-label {
  opacity: .58;
}
.guest-count-field.is-disabled #guestCount {
  opacity: .55;
  background: #ececea;
  color: #8d8d88;
  border-color: #e2e2df;
  box-shadow: none;
  cursor: not-allowed;
}


/* ==========================================================
   V21 — RSVP cache-safe / strict numeric guest-count UX
   ========================================================== */
#guestCount:disabled,
.guest-count-field.is-disabled #guestCount {
  pointer-events: none;
  user-select: none;
  cursor: not-allowed;
  opacity: .52;
  background: #ececea;
  color: #8d8d88;
  border-color: #e2e2df;
  box-shadow: none;
}
.guest-count-field.is-disabled .rsvp-label {
  opacity: .58;
}
