/* ============================================================
   Gilded Quay — Components
   Buttons, deckled frames, Deco seal, schedule, forms,
   masthead, countdown, RSVP, footer
   ============================================================ */

/* ============================================================
   1. ENVELOPE INTRO OVERLAY
   ============================================================ */

.envelope {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background:
    /* Watercolor envelope photograph */
    url("../assets/images/envelope-bg.png") center center / cover no-repeat,
    var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 1100ms var(--ease-out), visibility 0s linear 1100ms;
  overflow: hidden;
}

/* Soft paper wash sitting over the image so text reads cleanly.
   Heavier in the middle (behind the content column), lighter at the edges
   so the watercolour atmosphere still shows through. */
.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 55% 75% at 50% 55%,
      rgba(244, 236, 219, 0.92) 0%,
      rgba(244, 236, 219, 0.78) 35%,
      rgba(244, 236, 219, 0.52) 70%,
      rgba(244, 236, 219, 0.28) 100%
    );
  pointer-events: none;
  z-index: 1;
}

/* Decorative inner Deco frame */
.envelope-frame {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(216, 200, 168, 0.55);
  pointer-events: none;
  z-index: 2;
}
.envelope-frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(191, 157, 84, 0.30);
}

/* Envelope flap SVG hidden — the background image already shows an envelope */
.envelope-flap {
  display: none;
}

.envelope.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  animation: rise 1100ms var(--ease-out) both;
}

.envelope-inner .seal-wrapper {
  margin-bottom: var(--s6);
  transition: transform 600ms var(--ease-out);
}

/* Red wax seal photograph — transparent PNG with its own soft shadow.
   Boost contrast + brightness so the embossed H&E reads clearly. */
.wax-seal {
  display: block;
  width: clamp(180px, 22vw, 260px);
  height: auto;
  margin: 0 auto;
  filter:
    contrast(1.18)
    brightness(1.06)
    saturate(1.08)
    drop-shadow(0 6px 14px rgba(82, 18, 18, 0.28));
}

.envelope-inner:hover .seal-wrapper {
  transform: scale(1.04) rotate(-2deg);
}

/* Personalised name on the envelope — addressed-to line, only shown when ?g=<slug> matches */
.envelope-greeting {
  display: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--ink);
  letter-spacing: 0.015em;
  margin: 0 auto var(--s6);
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 1px 0 rgba(251, 247, 238, 0.85), 0 0 14px rgba(251, 247, 238, 0.75);
}

.envelope-greeting[hidden] { display: none !important; }

.envelope-greeting.is-visible {
  display: block;
  animation: rise 1.4s var(--ease-out) 0.3s both;
}

.envelope-greeting::before,
.envelope-greeting::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin: 0 var(--s4);
  opacity: 0.85;
}

.envelope-date {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
  margin: var(--s7) 0 var(--s3);
  text-shadow: 0 1px 0 rgba(251, 247, 238, 0.85), 0 0 12px rgba(251, 247, 238, 0.75);
}

.envelope-venue {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sepia);
  margin: 0;
  text-shadow: 0 1px 0 rgba(251, 247, 238, 0.85), 0 0 10px rgba(251, 247, 238, 0.7);
}

.envelope-prompt {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: var(--s7);
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  animation: pulse 2400ms var(--ease-in-out) infinite;
  text-shadow: 0 1px 0 rgba(251, 247, 238, 0.85), 0 0 10px rgba(251, 247, 238, 0.7);
}

.envelope-prompt::before,
.envelope-prompt::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   2. DECO SEAL (H&E monogram in beaded medallion)
   ============================================================ */

.seal {
  position: relative;
  display: inline-block;
  color: var(--gold);
  line-height: 0;
}

.seal svg { display: block; margin: 0 auto; }

.seal-mono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.seal-mono .letter {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  display: inline-block;
}

.seal-mono .amp {
  font-family: var(--script);
  font-weight: 400;
  color: var(--gold);
  line-height: 0;
  position: relative;
  display: inline-block;
  margin: 0 0.12em;
  transform: translateY(-0.04em);
}

.seal--xl { width: 132px; }
.seal--xl svg { width: 132px; height: 132px; }
.seal--xl .seal-mono .letter { font-size: 32px; }
.seal--xl .seal-mono .amp    { font-size: 44px; }

.seal--lg { width: 96px; }
.seal--lg svg { width: 96px; height: 96px; }
.seal--lg .seal-mono .letter { font-size: 23px; }
.seal--lg .seal-mono .amp    { font-size: 32px; }

.seal--sm { width: 64px; }
.seal--sm svg { width: 64px; height: 64px; }
.seal--sm .seal-mono .letter { font-size: 15px; }
.seal--sm .seal-mono .amp    { font-size: 22px; }

/* When .seal contains the wax-seal image, override the fixed wrapper sizing */
.seal:has(.wax-seal) { width: auto; line-height: 1; }
.seal--xl .wax-seal { width: 160px; height: auto; margin: 0; }
.seal--lg .wax-seal { width: 124px; height: auto; margin: 0; }
.seal--sm .wax-seal { width: 84px;  height: auto; margin: 0; }
.seal .wax-seal { filter: drop-shadow(0 4px 10px rgba(82, 18, 18, 0.22)); }

/* ============================================================
   3. MASTHEAD (Pinyon names + Deco frame)
   ============================================================ */

.masthead {
  position: relative;
  padding: var(--s10) 0 var(--s9);
  text-align: center;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.masthead-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.masthead-bg img,
.masthead-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  filter: saturate(1) brightness(0.98);
}

.masthead-image,
.masthead-video {
  display: block;
}

/* Slow ken-burns on the static masthead image so it isn't dead-still */
.masthead-image {
  animation: masthead-kenburns 38s ease-in-out infinite alternate;
  transform-origin: 50% 55%;
  will-change: transform;
}

@keyframes masthead-kenburns {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  100% { transform: scale(1.06) translate3d(-0.6%, -1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .masthead-image { animation: none !important; }
}

.masthead-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* Bottom fade — starts higher and ramps more gradually so the join with the welcome section is seamless */
    linear-gradient(to bottom,
      transparent 35%,
      rgba(244, 236, 219, 0.18) 55%,
      rgba(244, 236, 219, 0.42) 70%,
      rgba(244, 236, 219, 0.72) 84%,
      rgba(244, 236, 219, 0.92) 94%,
      var(--paper) 100%
    ),
    radial-gradient(65% 50% at 50% 50%, rgba(244, 236, 219, 0.90) 0%, rgba(244, 236, 219, 0.55) 45%, rgba(244, 236, 219, 0.18) 75%, transparent 92%),
    radial-gradient(140% 110% at 50% 50%, transparent 30%, rgba(244, 236, 219, 0.55) 95%);
}

/* Soft parchment haze sitting in front of the welcome section's top —
   bridges the masthead's bottom fade so the section seam dissolves */
#welcome::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(to bottom,
    var(--paper) 0%,
    rgba(244, 236, 219, 0.65) 40%,
    rgba(244, 236, 219, 0.25) 75%,
    transparent 100%);
  pointer-events: none;
  z-index: 0;
}

#welcome > .wrap { position: relative; z-index: 1; }

.frame-deco {
  position: absolute;
  inset: 24px;
  border: 1px solid var(--sand);
  pointer-events: none;
  z-index: 1;
  /* Dissolve the frame's bottom edge & corners into the welcome section */
  -webkit-mask-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 55%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0) 96%
  );
          mask-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 55%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0) 96%
  );
}

.frame-deco::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(191, 157, 84, 0.45);
}

.corner {
  position: absolute;
  width: 54px;
  height: 54px;
  color: var(--gold);
  z-index: 2;
}

.corner.tl { top: 14px; left: 14px; }
.corner.tr { top: 14px; right: 14px; transform: scaleX(-1); }
.corner.bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.corner.br { bottom: 14px; right: 14px; transform: scale(-1, -1); }

.mh-inner {
  position: relative;
  z-index: 3;
  padding: 0 var(--s6);
  max-width: 900px;
  margin: 0 auto;
  /* Soft parchment-tone shadow behind text so it lifts off the video for legibility */
  text-shadow:
    0 0 24px rgba(244, 236, 219, 0.85),
    0 0 8px rgba(244, 236, 219, 0.65);
}

.mh-inner > * {
  opacity: 0;
  animation: rise 1.0s var(--ease-out) forwards;
}
.mh-inner > *:nth-child(1) { animation-delay: 0.55s; }
.mh-inner > *:nth-child(2) { animation-delay: 0.75s; }
.mh-inner > *:nth-child(3) { animation-delay: 0.95s; }
.mh-inner > *:nth-child(4) { animation-delay: 1.15s; }
.mh-inner > *:nth-child(5) { animation-delay: 1.35s; }
.mh-inner > *:nth-child(6) { animation-delay: 1.55s; }
.mh-inner > *:nth-child(7) { animation-delay: 1.75s; }

.mh-intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  color: var(--ink);
  margin: 0;
}

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--script);
  font-size: clamp(3.6rem, 9vw, 7rem);
  color: var(--ink);
  margin: var(--s4) 0;
  line-height: 1;
}

.names .name-line {
  display: block;
  line-height: 1.05;
}

.names .amp {
  display: block;
  font-family: var(--script);
  color: var(--gold);
  font-size: 0.78em;
  line-height: 0.7;
  margin: 0.08em 0;
}

.mh-invite {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  color: var(--ink);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.mh-date {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--ink);
  margin-top: var(--s6);
}

.mh-venue {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--sepia);
  margin-top: var(--s3);
}

.mh-tag {
  display: inline-flex;
  gap: var(--s3);
  align-items: center;
  margin-top: var(--s6);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.mh-tag::before,
.mh-tag::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
}

/* ============================================================
   4. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  padding: var(--s4) var(--s7);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: var(--ink);
  color: var(--ivory);
  cursor: pointer;
  text-decoration: none;
  background-image: none;
  transition: letter-spacing 320ms var(--ease-out),
              background 320ms var(--ease-out),
              color 320ms var(--ease-out);
}

.btn:hover {
  letter-spacing: 0.42em;
  background: var(--charcoal);
}

.btn--gold {
  background: var(--gold-deep);
  color: var(--ivory);
  border-color: var(--gold-deep);
}
.btn--gold:hover { background: var(--gold); border-color: var(--gold); }

.btn--ghost {
  background: transparent;
  color: var(--gold-deep);
  border-color: var(--gold);
}
.btn--ghost:hover {
  background: var(--gold-deep);
  color: var(--ivory);
  border-color: var(--gold-deep);
}

/* ============================================================
   5. DECKLED IMAGE FRAME
   ============================================================ */

.deckle {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.deckle .mat {
  position: absolute;
  inset: -10px;
  background: var(--ivory);
  clip-path: var(--clip-mat);
  box-shadow: var(--shadow-card);
  z-index: 0;
}

.deckle img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  clip-path: var(--clip-img);
}

.deckle.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  clip-path: var(--clip-img);
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   6. WELCOME — narrative card
   ============================================================ */

/* Personalised guest greeting — shown only when ?g=<slug> is in the URL */
.guest-greeting {
  display: none;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--olive);
  letter-spacing: 0.02em;
  margin: 0 auto var(--s6);
  padding: 0 var(--s3);
}

.guest-greeting[hidden] { display: none !important; }

.guest-greeting.is-visible {
  display: block;
  animation: rise 1.2s var(--ease-out) both;
}

.guest-greeting .guest-greeting-name {
  color: var(--ink);
  font-weight: 500;
}

.guest-greeting::before,
.guest-greeting::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin: 0 var(--s3);
  opacity: 0.85;
}

/* Welcome section — gentle moving wash background */
.welcome-section {
  position: relative;
  overflow: hidden;
}

.welcome-wash {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 28% at 22% 36%, rgba(174, 185, 148, 0.16) 0%, transparent 60%),
    radial-gradient(36% 24% at 78% 64%, rgba(198, 139, 130, 0.14) 0%, transparent 60%),
    radial-gradient(50% 32% at 50% 50%, rgba(232, 210, 172, 0.18) 0%, transparent 65%);
  filter: blur(40px);
  animation: wash-drift 24s ease-in-out infinite alternate;
}

@keyframes wash-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d( 2%,  1%, 0) scale(1.04); }
  100% { transform: translate3d(-1%,  2%, 0) scale(1); }
}

.welcome-section > .wrap { position: relative; z-index: 1; }

.welcome-couple {
  display: flex;
  justify-content: center;
  margin: var(--s6) auto var(--s7);
  position: relative;
  isolation: isolate;
}

/* Warm watercolour halo BEHIND the portrait — soft champagne + blush wash,
   blurred, so the figures sit inside a pool of warmth rather than on a flat page. */
.welcome-couple::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, 90%);
  height: 0;
  padding-bottom: min(700px, 120%);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 45% 50% at 50% 46%, rgba(232, 210, 172, 0.32) 0%, transparent 65%),
    radial-gradient(ellipse 60% 55% at 52% 56%, rgba(198, 139, 130, 0.14) 0%, transparent 72%);
  filter: blur(32px);
  pointer-events: none;
  z-index: 0;
}

.welcome-couple-video {
  position: relative;
  z-index: 1;
  display: block;
  width: min(320px, 58%);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;

  /* Painterly multi-stop fade — long gradual falloff, no visible boundary.
     Two layered gradients at slight offsets break the symmetry so it doesn't
     read as a perfect oval vignette. */
  -webkit-mask-image:
    radial-gradient(ellipse 85% 92% at 50% 50%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,1) 28%,
      rgba(0,0,0,0.96) 44%,
      rgba(0,0,0,0.85) 56%,
      rgba(0,0,0,0.66) 68%,
      rgba(0,0,0,0.42) 78%,
      rgba(0,0,0,0.20) 87%,
      rgba(0,0,0,0.07) 94%,
      transparent 100%),
    radial-gradient(ellipse 78% 95% at 52% 47%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,0.92) 50%,
      rgba(0,0,0,0.5) 75%,
      transparent 100%);
  -webkit-mask-composite: source-over;
  mask-image:
    radial-gradient(ellipse 85% 92% at 50% 50%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,1) 28%,
      rgba(0,0,0,0.96) 44%,
      rgba(0,0,0,0.85) 56%,
      rgba(0,0,0,0.66) 68%,
      rgba(0,0,0,0.42) 78%,
      rgba(0,0,0,0.20) 87%,
      rgba(0,0,0,0.07) 94%,
      transparent 100%),
    radial-gradient(ellipse 78% 95% at 52% 47%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,0.92) 50%,
      rgba(0,0,0,0.5) 75%,
      transparent 100%);
  mask-composite: add;

  mix-blend-mode: multiply;
  opacity: 0.94;
  filter: saturate(0.9) contrast(1.04);
  animation: couple-float 14s ease-in-out infinite;
  transform-origin: center 60%;
}

@keyframes couple-float {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50%      { transform: translateY(-6px) rotate(0.4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-wash, .welcome-couple-video { animation: none !important; }
}

.welcome-block {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.welcome-block .lede {
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  color: var(--sepia);
  font-style: italic;
}

.welcome-block p + p {
  margin-top: var(--s5);
}

/* ============================================================
   7. DETAILS — date, location, dress code cards
   ============================================================ */

#details {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Interesting drifting background: faint champagne + sage wash blobs that
   slowly orbit, plus a low-opacity Deco diamond pattern in gold hairline. */
#details::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -2;
  background:
    radial-gradient(38% 30% at 18% 28%, rgba(232, 210, 172, 0.28) 0%, transparent 65%),
    radial-gradient(34% 28% at 82% 72%, rgba(174, 185, 148, 0.20) 0%, transparent 65%),
    radial-gradient(40% 32% at 55% 50%, rgba(198, 139, 130, 0.13) 0%, transparent 70%);
  filter: blur(48px);
  animation: details-wash-drift 32s ease-in-out infinite alternate;
  pointer-events: none;
}

#details::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23BF9D54' stroke-width='0.5' stroke-opacity='0.8'><polygon points='60,18 78,60 60,102 42,60'/><polygon points='60,30 70,60 60,90 50,60' stroke-width='0.4'/><line x1='60' y1='0' x2='60' y2='14'/><line x1='60' y1='106' x2='60' y2='120'/><line x1='0' y1='60' x2='14' y2='60'/><line x1='106' y1='60' x2='120' y2='60'/></g></svg>");
  background-repeat: repeat;
  background-size: 120px 120px;
  pointer-events: none;
}

@keyframes details-wash-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d( 2%,  1%, 0) scale(1.04); }
  100% { transform: translate3d( 0,    2%, 0) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  #details::before { animation: none !important; }
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  margin-top: var(--s5);
  position: relative;
  z-index: 1;
}

.detail-card {
  background: var(--ivory);
  border: var(--rule);
  padding: var(--s7) var(--s5);
  text-align: center;
  position: relative;
  /* Entrance animation: each card rises + scales + fades when scrolled into view */
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition:
    opacity 1300ms var(--ease-out),
    transform 1300ms var(--ease-out),
    box-shadow 480ms var(--ease-out),
    border-color 480ms var(--ease-out);
}

.detail-card.is-visible,
.is-visible > .detail-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger when revealed as a group */
.reveal-stagger.is-visible > .detail-card:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > .detail-card:nth-child(2) { transition-delay: 220ms; }
.reveal-stagger.is-visible > .detail-card:nth-child(3) { transition-delay: 440ms; }

.detail-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 1px;
  background: var(--gold);
}

.detail-card .eyebrow { margin-bottom: var(--s4); }

.detail-card h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--olive);
  margin: 0 0 var(--s3);
}

.detail-card .date-num {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.18em;
  color: var(--ink);
  margin: var(--s3) 0;
}

.detail-card p {
  color: var(--ink);
  font-size: 1.1rem;
}

.detail-card .map-link {
  display: inline-block;
  margin-top: var(--s4);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

@media (max-width: 880px) {
  .details-grid {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }
}

/* ============================================================
   8. CELEBRATION — vertical timeline
   ============================================================ */

/* ============================================================
   Welcome section — peacock + paisley watercolour background
   ============================================================ */
#welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.welcome-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
}

.welcome-bg__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
  mix-blend-mode: multiply;
  filter: saturate(1.04);
}

/* ============================================================
   Details section — full-bleed watercolour video background
   ============================================================ */
#details {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.details-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
}

.details-bg__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.82;
  mix-blend-mode: multiply;
  filter: saturate(1.04) brightness(1.04);
}

/* Soft parchment scrim so the cards always read cleanly */
.details-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(72% 60% at 50% 50%,
      rgba(244, 236, 219, 0.42) 0%,
      rgba(244, 236, 219, 0.22) 50%,
      rgba(244, 236, 219, 0.08) 78%,
      rgba(244, 236, 219, 0.24) 100%);
  pointer-events: none;
}

/* ============================================================
   Section background video — Welcome + Details sections
   ============================================================ */

.section-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
}

.section-bg__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  /* Lighten blend mode so the watercolour adds light to the parchment instead
     of darkening it — keeps the cream gold airy and luminous */
  mix-blend-mode: lighten;
  filter: saturate(1.12) brightness(1.18) contrast(1.02);
}

/* Soft warm ivory scrim — gentle warmth rather than dimming the watercolour */
.section-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 50%,
      rgba(251, 247, 238, 0.28) 0%,
      rgba(251, 247, 238, 0.12) 50%,
      rgba(251, 247, 238, 0.04) 78%,
      rgba(251, 247, 238, 0.16) 100%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .section-bg__video { animation: none !important; }
}

/* "The Celebration" — watercolour cloud/sky background, edges fade into parchment */
#celebration {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.celebration-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Mask vertically AND horizontally so the rectangle dissolves into parchment */
  -webkit-mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    22%,
      rgba(0,0,0,1)    78%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
}

.celebration-bg__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  mix-blend-mode: multiply;
  filter: saturate(1.02);
}

/* "How the evening will unfold" — quiet Deco ornament before the timeline */
.celebration-ornament-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s5);
  margin: var(--s2) auto var(--s8);
  max-width: 480px;
  color: var(--gold);
  opacity: 0.9;
}

.celebration-ornament-row .ornament-line {
  flex: 1 1 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  max-width: 180px;
  opacity: 0.7;
}

.celebration-ornament-row .ornament-sunburst {
  width: 96px;
  height: 28px;
  flex: 0 0 auto;
  animation: celebration-ornament-breathe 7s ease-in-out infinite;
  transform-origin: center;
}

@keyframes celebration-ornament-breathe {
  0%, 100% { opacity: 0.7;  transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .celebration-ornament-row .ornament-sunburst { animation: none !important; }
}

/* Legacy celebration-image / video kept in CSS as orphan — no longer in HTML */
.celebration-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 0 auto var(--s8);
  isolation: isolate;
}

/* Warm watercolour halo pooling behind the arch + sprigs */
.celebration-image::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 50%;
  width: min(560px, 88vw);
  aspect-ratio: 9 / 12;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 38% 50% at 50% 42%, rgba(232, 210, 172, 0.50) 0%, transparent 65%),
    radial-gradient(ellipse 60% 55% at 50% 60%, rgba(198, 139, 130, 0.18) 0%, transparent 72%),
    radial-gradient(ellipse 70% 35% at 50% 95%, rgba(174, 185, 148, 0.12) 0%, transparent 70%);
  filter: blur(42px);
  pointer-events: none;
  z-index: 0;
}

/* The chuppah video — soft watercolour blended into the parchment.
   Same treatment as the couple portrait so the two feel like cousins. */
.celebration-video {
  position: relative;
  z-index: 1;
  display: block;
  width: min(340px, 64vw);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: transparent;

  /* Painterly blend — light areas multiply into parchment */
  mix-blend-mode: multiply;
  opacity: 0.95;
  filter: saturate(0.92) contrast(1.05);

  /* Multi-stop radial fade — long gradual falloff, no hard rectangle */
  -webkit-mask-image:
    radial-gradient(ellipse 82% 90% at 50% 50%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,1) 28%,
      rgba(0,0,0,0.95) 44%,
      rgba(0,0,0,0.82) 56%,
      rgba(0,0,0,0.62) 68%,
      rgba(0,0,0,0.38) 78%,
      rgba(0,0,0,0.18) 87%,
      rgba(0,0,0,0.06) 94%,
      transparent 100%);
  mask-image:
    radial-gradient(ellipse 82% 90% at 50% 50%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,1) 28%,
      rgba(0,0,0,0.95) 44%,
      rgba(0,0,0,0.82) 56%,
      rgba(0,0,0,0.62) 68%,
      rgba(0,0,0,0.38) 78%,
      rgba(0,0,0,0.18) 87%,
      rgba(0,0,0,0.06) 94%,
      transparent 100%);

  /* Gentle drift so it isn't perfectly static */
  animation: celebration-video-float 16s ease-in-out infinite;
  transform-origin: center 60%;
}

@keyframes celebration-video-float {
  0%, 100% { transform: translateY(0) rotate(-0.3deg); }
  50%      { transform: translateY(-5px) rotate(0.3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .celebration-video { animation: none !important; }
}

/* Italic caption with a gold hairline above */
.celebration-caption {
  position: relative;
  z-index: 1;
  margin: var(--s5) auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.45;
  color: var(--ink);
  text-align: center;
  max-width: 32ch;
}

.celebration-caption::before {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto var(--s4);
  opacity: 0.85;
}

.schedule {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* Central vertical hairline running the length of the timeline */
.schedule::before {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--gold-deep) 6%,
    var(--gold-deep) 94%,
    transparent 100%);
  opacity: 0.85;
  transform: translateX(-50%);
}

.schedule-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: var(--s5) 0;
  position: relative;
}

/* Disable the old diamond + connecting hairline (legacy) */
.schedule-item + .schedule-item::before,
.schedule-item + .schedule-item::after { display: none; }

.schedule-content {
  position: relative;
}

.schedule-item.is-right .schedule-content {
  grid-column: 2;
  padding-left: var(--s6);
  text-align: left;
}

.schedule-item.is-left .schedule-content {
  grid-column: 1;
  padding-right: var(--s6);
  text-align: right;
}

/* Tick from the centre line into the content block */
.schedule-item.is-right .schedule-content::before,
.schedule-item.is-left .schedule-content::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: var(--gold-deep);
  opacity: 0.85;
}

.schedule-item.is-right .schedule-content::before { left: -28px; }
.schedule-item.is-left  .schedule-content::before { right: -28px; }

.schedule-time {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  color: var(--gold-deep);
  letter-spacing: 0.01em;
  margin-bottom: var(--s2);
  line-height: 1.2;
}

.schedule-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin: 0;
  line-height: 1.35;
}

.schedule-note {
  margin-top: var(--s2);
  color: var(--sepia);
  font-size: 0.98rem;
  font-style: italic;
}

/* Mobile: collapse to a single column with line on the left */
@media (max-width: 640px) {
  .schedule::before { left: 24px; }
  .schedule-item { grid-template-columns: 1fr; }
  .schedule-item.is-right .schedule-content,
  .schedule-item.is-left  .schedule-content {
    grid-column: 1;
    padding-left: 60px;
    padding-right: 0;
    text-align: left;
  }
  .schedule-item.is-right .schedule-content::before,
  .schedule-item.is-left  .schedule-content::before {
    left: -36px;
    right: auto;
    width: 28px;
  }
}

/* ============================================================
   9. GIFTS — wishing well + bank transfer card
   ============================================================ */

.gifts-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--ivory);
  border: var(--rule);
  padding: var(--s8) var(--s7);
  text-align: center;
  position: relative;
}

.gifts-card::before,
.gifts-card::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold);
  opacity: 0.55;
}
.gifts-card::before {
  top: 12px; left: 12px;
  border-right: 0; border-bottom: 0;
}
.gifts-card::after {
  bottom: 12px; right: 12px;
  border-left: 0; border-top: 0;
}

.gifts-card p {
  color: var(--sepia);
  font-style: italic;
}

.gifts-card .gifts-line {
  margin: var(--s6) 0;
  height: 1px;
  background: var(--sand);
  position: relative;
}
.gifts-card .gifts-line::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.gifts-note {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: var(--s5) 0 0;
  text-align: center;
}

/* ============================================================
   10. RSVP — Google Form placeholder slot
   ============================================================ */

.rsvp-block {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.rsvp-block .lede { margin-bottom: var(--s6); }

/* ============================================================
   RSVP card — ivory panel with a gold double-frame
   ============================================================ */

.rsvp-card {
  position: relative;
  background: var(--ivory);
  padding: clamp(var(--s7), 7vw, var(--s8)) clamp(var(--s5), 5vw, var(--s7));
  text-align: left;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.rsvp-card::before,
.rsvp-card::after {
  content: "";
  position: absolute;
  border: 1px solid var(--gold);
  pointer-events: none;
  z-index: 0;
}

.rsvp-card::before {
  inset: 12px;
  opacity: 0.85;
}

.rsvp-card::after {
  inset: 20px;
  opacity: 0.35;
}

.rsvp-card > * {
  position: relative;
  z-index: 1;
}

/* In-card title — replaces the section h2 visually */
.rsvp-card-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  color: var(--ink);
  margin: 0 0 var(--s3);
  line-height: 1.2;
  text-align: center;
}

/* In-card subhead — gold caps reply-by */
.rsvp-card-subhead {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 var(--s7);
  text-align: center;
}

/* ============================================================
   RSVP — invitation-style form (centered labels, underline inputs)
   Defensive: explicit display + alignment on every node so nothing
   inherits from .rsvp-block / .sec-head text-align: center surprises.
   ============================================================ */

/* Tighten the RSVP section's spacing — heading, subhead, form sit closer */
#rsvp { padding: var(--s8) 0; }
#rsvp .sec-head { margin: 0 auto var(--s5); }
#rsvp .sec-head h2 { margin-bottom: var(--s3); }
#rsvp .sec-head .subhead { margin-top: var(--s2); }
#rsvp .rsvp-block { margin-top: 0; }

/* RSVP wordmark — matches the script treatment of the names in the masthead */
.rsvp-eyebrow {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.4rem, 8.5vw, 6rem);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
  line-height: 1;
  margin-bottom: var(--s4);
}

.rsvp-form {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  /* Reset any nested fieldset weirdness if old HTML lingers */
}

.rsvp-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

.rsvp-form legend {
  padding: 0;
  margin: 0;
  float: none;
  width: auto;
}

/* Hide the honeypot from sight but keep it in the DOM for bots */
.rsvp-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.rsvp-field {
  display: block;
  margin: 0 0 var(--s6);
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
}

.rsvp-field:last-of-type { margin-bottom: var(--s5); }

/* Hidden attribute must override .rsvp-field's display: block */
.rsvp-field[hidden] { display: none !important; }

/* Serif question label — left-aligned, calm, confident */
.rsvp-form .rsvp-question {
  display: block;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--ink);
  margin: 0 0 var(--s3);
  letter-spacing: 0.005em;
  text-align: left;
  line-height: 1.3;
}

.rsvp-form .rsvp-question .req {
  color: var(--gold-deep);
  font-style: normal;
  font-weight: 400;
  margin-left: 2px;
  font-size: 0.85em;
}

.rsvp-form .rsvp-help {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--sepia);
  margin: 0 0 var(--s3);
  max-width: 60ch;
  line-height: 1.45;
  text-align: left;
}

/* Bordered inputs on paper — clearly fillable, refined */
.rsvp-form input[type="text"],
.rsvp-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 2px;
  padding: var(--s3) var(--s4);
  margin: 0;
  resize: vertical;
  line-height: 1.4;
  text-align: left;
  transition: border-color 280ms var(--ease-out), background 280ms var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.rsvp-form textarea {
  min-height: 88px;
  font-style: normal;
}

.rsvp-form input[type="text"]:focus,
.rsvp-form textarea:focus {
  border-color: var(--gold-deep);
  background: var(--ivory);
}

/* Outlined accept/decline pair — full-width side-by-side, no radio dot */
.rsvp-form .rsvp-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.rsvp-form .rsvp-radio {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: initial;
  max-width: 100%;
  gap: 0;
  padding: var(--s4) var(--s4);
  font-family: var(--serif);
  font-style: normal;
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 2px;
  cursor: pointer;
  margin: 0;
  text-align: center;
  transition: border-color 280ms var(--ease-out),
              background 280ms var(--ease-out),
              color 280ms var(--ease-out),
              box-shadow 280ms var(--ease-out);
}

.rsvp-form .rsvp-radio:hover {
  background: var(--ivory);
  border-color: var(--gold);
}

/* Hide the native radio circle entirely — the whole label is the button */
.rsvp-form .rsvp-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.rsvp-form .rsvp-radio:has(input:checked) {
  border-color: var(--garnet);
  background: var(--garnet);
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--garnet);
}

/* Mobile: stack the radio pair so the labels don't squeeze */
@media (max-width: 520px) {
  .rsvp-form .rsvp-radio-group {
    grid-template-columns: 1fr;
  }
}

/* Error line */
.rsvp-form .rsvp-error {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--garnet);
  min-height: 1.2em;
  text-align: center;
  margin-top: var(--s3);
}

.rsvp-form .rsvp-error:empty { display: none; }

/* Actions row — centred submit, clean (no rule, no diamond) */
.rsvp-form .rsvp-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--s6);
  padding-top: 0;
  border-top: 0;
  position: relative;
}

/* Error line */
.rsvp-error {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--garnet);
  min-height: 1.2em;
}

.rsvp-error:empty { display: none; }

/* RSVP submit — garnet pill */
.btn--rsvp {
  align-self: center;
  margin-top: var(--s3);
  padding: var(--s4) var(--s8);
  background: var(--garnet);
  color: var(--ivory);
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.32em;
}

.btn--rsvp:hover {
  background: #5C2218;
  letter-spacing: 0.42em;
}

.btn--rsvp.is-sending {
  opacity: 0.65;
  pointer-events: none;
}

/* ============================================================
   RSVP v2 — dynamic per-guest form (rendered into #rsvp-app)
   ============================================================ */
.rsvp-app { text-align: center; }

.rsvp-loading,
.rsvp-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sepia);
  line-height: 1.55;
  max-width: 44ch;
  margin: var(--s5) auto;
}

.rsvp-intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--sepia);
  margin: 0 0 var(--s3);
}

.rsvp-deadline {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 var(--s7);
}

/* per-guest block */
.rsvp-guest {
  border-top: 1px solid var(--sand);
  padding: var(--s6) 0;
  text-align: left;
}
.rsvp-guest:first-of-type { border-top: 0; padding-top: var(--s3); }

.rsvp-guest-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: var(--s4);
}

.rsvp-guest-name-input,
.rsvp-app input[type="text"],
.rsvp-app textarea,
.rsvp-app select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 2px;
  padding: var(--s3) var(--s4);
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 280ms var(--ease-out), background 280ms var(--ease-out);
}
.rsvp-guest-name-input { margin-bottom: var(--s4); }
.rsvp-app textarea { min-height: 84px; resize: vertical; }
.rsvp-app input[type="text"]:focus,
.rsvp-app textarea:focus,
.rsvp-app select:focus {
  border-color: var(--gold-deep);
  background: var(--ivory);
}

/* accept / decline pair */
.rsvp-att {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}
.rsvp-att--inline { max-width: 280px; }

.rsvp-att-btn {
  padding: var(--s4);
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  transition: border-color 220ms var(--ease-out),
              background 220ms var(--ease-out),
              color 220ms var(--ease-out);
}
.rsvp-att-btn:hover { border-color: var(--gold); background: var(--ivory); }
.rsvp-att-btn.sel-yes {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--ivory);
}
.rsvp-att-btn.sel-no {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--ink);
}

@media (max-width: 520px) {
  .rsvp-att { grid-template-columns: 1fr; }
}

/* dietary — appears once a guest accepts */
.rsvp-diet { margin-top: var(--s5); }
.rsvp-diet[hidden] { display: none; }

.rsvp-diet-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: var(--s3);
}

.rsvp-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }

.rsvp-chip {
  padding: var(--s2) var(--s4);
  border-radius: 999px;
  border: 1px solid var(--sand);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 200ms var(--ease-out),
              background 200ms var(--ease-out),
              color 200ms var(--ease-out);
}
.rsvp-chip:hover { border-color: var(--gold); }
.rsvp-chip.on {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--ivory);
}

.rsvp-other { margin-top: var(--s3); }
.rsvp-other[hidden] { display: none; }

/* extra-guest dropdown + invite-level rows */
.rsvp-extra,
.rsvp-row {
  text-align: left;
  margin-top: var(--s6);
}
.rsvp-extra-label,
.rsvp-row-label {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: var(--s3);
  line-height: 1.3;
}
.rsvp-select { max-width: 120px; cursor: pointer; }

.rsvp-app .rsvp-error {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--garnet);
  min-height: 1.2em;
  text-align: center;
  margin-top: var(--s5);
}
.rsvp-app .rsvp-error:empty { display: none; }

.rsvp-app .rsvp-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--s5);
}

/* Success state — replaces the form on submit */
.rsvp-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s8) var(--s5);
  margin-top: var(--s6);
  background: var(--ivory);
  border: 1px solid var(--sand);
  outline: 1px solid var(--gold);
  outline-offset: -6px;
  animation: rise 900ms var(--ease-out) both;
}

.rsvp-success .seal { margin-bottom: var(--s5); }

.rsvp-success h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--olive);
  margin: 0 0 var(--s4);
}

.rsvp-success p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 36ch;
  margin: 0 auto;
}

/* ============================================================
   11. COUNTDOWN — cityscape as full-width section background
   ============================================================ */

#countdown {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.countdown-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  /* Fade the video edges into the surrounding parchment — soft top + bottom + sides */
  -webkit-mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    24%,
      rgba(0,0,0,1)    76%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.55) 12%,
      rgba(0,0,0,1)    24%,
      rgba(0,0,0,1)    76%,
      rgba(0,0,0,0.55) 88%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%),
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 5%,
      rgba(0,0,0,1)    14%,
      rgba(0,0,0,1)    86%,
      rgba(0,0,0,0.30) 95%,
      transparent 100%);
}

.countdown-bg__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  filter: saturate(0.96) brightness(1.02);
  animation: countdown-bg-kenburns 36s ease-in-out infinite alternate;
  transform-origin: 50% 55%;
  will-change: transform;
}

/* Parchment scrim — softer in the middle so the cityscape stays visible */
.countdown-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(68% 56% at 50% 50%,
      rgba(244, 236, 219, 0.55) 0%,
      rgba(244, 236, 219, 0.28) 45%,
      rgba(244, 236, 219, 0.10) 72%,
      rgba(244, 236, 219, 0.35) 100%);
  pointer-events: none;
  z-index: -1;
}

@keyframes countdown-bg-kenburns {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  100% { transform: scale(1.06) translate3d(-0.6%, -1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .countdown-bg__video { animation: none !important; }
}

/* Lift countdown text off the video, like the masthead */
#countdown .sec-head,
#countdown .countdown-grid {
  text-shadow:
    0 0 20px rgba(244, 236, 219, 0.78),
    0 0 6px  rgba(244, 236, 219, 0.55);
}

/* ============================================================
   11b. COUNTDOWN — numerals
   ============================================================ */

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s5);
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.countdown-unit {
  position: relative;
  padding: var(--s5) var(--s3);
}

.countdown-unit:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: calc(var(--s3) * -1 - 4px);
  top: 32%;
  font-family: var(--sans);
  color: var(--gold);
  font-size: 2rem;
  font-weight: 300;
}

.countdown-value {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 600ms var(--ease-out);
}

.countdown-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: var(--s4);
}

@media (max-width: 560px) {
  .countdown-grid { gap: var(--s3); }
  .countdown-unit:not(:last-child)::after { display: none; }
}

/* ============================================================
   12. CONTACT
   ============================================================ */

.contact-block {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.contact-block p {
  color: var(--sepia);
  font-style: italic;
  font-size: 1.1rem;
}

.contact-info {
  margin-top: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  align-items: center;
}

.contact-info .eyebrow {
  font-size: 11px;
  letter-spacing: 0.36em;
}

.contact-info a {
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink);
}

/* ============================================================
   13. FOOTER
   ============================================================ */

footer {
  padding: var(--s5) 0 var(--s7);
  text-align: center;
  position: relative;
}

/* Tighten contact → footer so the tradition image sits close to the section above */
#contact { padding-bottom: var(--s5); }

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 50vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sand), transparent);
}

.footer-names {
  font-family: var(--script);
  font-size: clamp(2.6rem, 6vw, 4rem);
  color: var(--ink);
  line-height: 0.95;
  margin: var(--s5) 0 var(--s3);
}
.footer-names .amp { color: var(--gold); }

.footer-date {
  font-family: var(--sans);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--sepia);
}

/* Feast band — full-width horizontal banner sitting in the gap between
   contact and footer. Stretches across the viewport, sides feather into
   the parchment so it dissolves rather than ending at a hard edge. */
.feast-band {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: clamp(260px, 28vw, 420px);
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
  /* Combine horizontal + vertical masks via intersect so ALL four edges
     dissolve smoothly into the parchment — no harsh top/bottom lines */
  -webkit-mask-image:
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 6%,
      rgba(0,0,0,1)    18%,
      rgba(0,0,0,1)    82%,
      rgba(0,0,0,0.30) 94%,
      transparent 100%),
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.45) 14%,
      rgba(0,0,0,0.85) 26%,
      rgba(0,0,0,1)    40%,
      rgba(0,0,0,1)    60%,
      rgba(0,0,0,0.85) 74%,
      rgba(0,0,0,0.45) 86%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to right,
      transparent 0%,
      rgba(0,0,0,0.30) 6%,
      rgba(0,0,0,1)    18%,
      rgba(0,0,0,1)    82%,
      rgba(0,0,0,0.30) 94%,
      transparent 100%),
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.10) 4%,
      rgba(0,0,0,0.45) 14%,
      rgba(0,0,0,0.85) 26%,
      rgba(0,0,0,1)    40%,
      rgba(0,0,0,1)    60%,
      rgba(0,0,0,0.85) 74%,
      rgba(0,0,0,0.45) 86%,
      rgba(0,0,0,0.10) 96%,
      transparent 100%);
}

.feast-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.92;
  mix-blend-mode: multiply;
  filter: saturate(0.98) contrast(1.02);
  animation: footer-image-zoom 28s ease-in-out infinite alternate;
  will-change: transform;
}

/* Soft warm candle-glow behind the frame — pulses gently like the candles in the image */
.footer-image__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(620px, 92vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 48% 48% at 50% 48%, rgba(232, 210, 172, 0.45) 0%, transparent 65%),
    radial-gradient(ellipse 56% 56% at 50% 52%, rgba(198, 139, 130, 0.18) 0%, transparent 72%);
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
  animation: footer-glow-flicker 5s ease-in-out infinite;
}

@keyframes footer-image-float {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50%      { transform: translateY(-6px) rotate(0.4deg); }
}

@keyframes footer-image-zoom {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  100% { transform: scale(1.06) translate3d(-1%, -1%, 0); }
}

@keyframes footer-glow-flicker {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  40%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.04); }
  70%      { opacity: 0.78; transform: translate(-50%, -50%) scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
  .footer-image .deckle,
  .footer-image img,
  .footer-image__glow { animation: none !important; }
}

.footer-coda {
  margin-top: var(--s8);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--taupe);
}

/* ============================================================
   14. MUSIC TOGGLE
   ============================================================ */

.music-toggle {
  position: fixed;
  right: var(--s5);
  bottom: var(--s5);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ivory);
  border: 1px solid var(--sand);
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4000;
  box-shadow: var(--shadow-card);
  transition: transform 300ms var(--ease-out), background 300ms var(--ease-out);
  background-image: none;
}

.music-toggle:hover {
  transform: scale(1.08);
  background: var(--champagne);
}

.music-toggle svg { width: 18px; height: 18px; }

.music-toggle .icon-mute { display: none; }
.music-toggle.is-muted .icon-mute { display: block; }
.music-toggle.is-muted .icon-sound { display: none; }
