/* ==========================================================================
   Boda Simón & Camila — Mobile-First Stylesheet
   Tokens extracted verbatim from Invitacion 30.pdf & Invitacion_editable_Illustrator.ai
   ========================================================================== */

:root {
  --bg-canvas: #ffffff;
  --bg-outer: #faf7ef;
  --bg-envelope: #010000;
  --olive-title: #4f5b2a;
  --olive-swatch: #6c7c28;
  --ink-dark: #343e31;
  --ink-black: #010000;
  --gold-accent: #8b6e43;
  --gold-icon: #9b7c4e;
  --gold-soft: #dec396;
  --border-warm: #d5c6a9;
  --border-muted: #bbab8d;
  --border-medallion: #ddcfb7;
  --card-soft: #faf7ef;
  --medallion-bg: #f0ebde;
  --btn-pill: #e9dfc9;
  --btn-pill-hover: #dec396;
  --hero-cream: #fff2d1;
  --seal-hint-white: #fffdf6;

  --font-serif: Georgia, 'Gelasio', 'Times New Roman', serif;
  --shell-max: 480px;
  --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-serif);
  color: var(--ink-dark);
  background-color: var(--bg-outer);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.is-locked,
body.is-locked {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* ==========================================================================
   1. ENVELOPE COVER OVERLAY (100dvh, 3D Top-Flap Fold + Attached Wax Seal)
   ========================================================================== */

.envelope-cover {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 999;
  background-color: #080808;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 1;
  transition: opacity 0.54s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-cover.is-dissolving {
  opacity: 0;
  pointer-events: none;
}

.envelope-cover.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.envelope-stage {
  /* Extra height (114dvh) ensures bottom paper texture stays edge-to-edge after vertical centering shift */
  --stage-w: max(100vw, calc(114dvh * 941 / 1672));
  --stage-h: calc(var(--stage-w) * 1672 / 941);
  /* Position seal center (62.5% of artwork) consistently around 58dvh across screen ratios */
  --stage-shift-y: max(0px, calc(0.625 * var(--stage-h) - 58dvh));
  position: absolute;
  width: var(--stage-w);
  height: var(--stage-h);
  left: 50%;
  top: calc(0px - var(--stage-shift-y));
  transform: translateX(-50%);
  perspective: 2500px;
  perspective-origin: 50% calc(var(--stage-shift-y) + 28dvh);
}

.envelope-pocket-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.envelope-flap-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--stage-h) * 1110 / 1672);
  clip-path: polygon(0 0, 100% 0, 100% 59.91%, 50% 97.66%, 0 60.09%);
  background: rgba(0, 0, 0, 0.88);
  transform: translateY(7px);
  filter: blur(7px);
  opacity: 0.86;
  pointer-events: none;
  transition: transform 1.05s cubic-bezier(0.32, 0.02, 0.2, 1),
    filter 1.05s ease,
    opacity 1.05s ease;
}

.envelope-cover.is-lifting .envelope-flap-shadow {
  transform: translateY(-54px) scaleY(0.68);
  filter: blur(32px);
  opacity: 0.2;
}

.envelope-flap-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--stage-h) * 1110 / 1672);
  transform-origin: 50% var(--stage-shift-y);
  transform-style: preserve-3d;
  transform: rotateX(0deg);
  will-change: transform;
  transition: transform 1.08s cubic-bezier(0.32, 0.02, 0.2, 1),
    filter 1.08s ease;
}

.envelope-cover.is-lifting .envelope-flap-3d {
  transform: rotateX(82deg);
  filter: brightness(1.13);
}

.envelope-flap-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.envelope-flap-sheen {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 59.91%, 50% 97.66%, 0 60.09%);
  background: radial-gradient(
    ellipse at 50% 78%,
    rgba(235, 205, 155, 0.22),
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.envelope-cover.is-lifting .envelope-flap-sheen {
  opacity: 1;
}

.envelope-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 56%,
    rgba(0, 0, 0, 0) 34%,
    rgba(0, 0, 0, 0.34) 100%
  );
  pointer-events: none;
}

.envelope-kicker {
  position: absolute;
  top: clamp(32px, 6.5dvh, 64px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--seal-hint-white);
  font-size: clamp(0.75rem, 3vw, 0.9rem);
  letter-spacing: 0.22em;
  text-align: center;
  white-space: nowrap;
  opacity: 0.9;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Wax seal rides attached to the tip of the 3D V-flap (1045 / 1110 = 94.14%) */
.seal-wrapper {
  position: absolute;
  top: 94.14%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.seal-trigger {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.58));
}

.seal-trigger:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 8px;
}

.wax-seal-img {
  width: clamp(178px, 48vw, 228px);
  height: auto;
  aspect-ratio: 1 / 1;
  pointer-events: none;
}

.envelope-cover:hover .seal-trigger {
  transform: scale(1.03);
}

.seal-trigger.is-pressed {
  transform: scale(0.93);
  filter: drop-shadow(0 6px 16px rgba(222, 195, 150, 0.42));
}

.seal-hint {
  position: absolute;
  top: calc(58dvh + clamp(110px, 29vw, 140px));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--seal-hint-white);
  font-size: clamp(0.85rem, 3.4vw, 0.98rem);
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  animation: sealHintPulse 2.6s ease-in-out infinite;
  transition: opacity 0.18s ease;
}

.envelope-cover.is-tapped .envelope-kicker,
.envelope-cover.is-tapped .seal-hint {
  opacity: 0;
  animation: none;
}

@keyframes sealHintPulse {
  0%, 100% {
    opacity: 0.55;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 0.96;
    transform: translate(-50%, 3px);
  }
}

/* ==========================================================================
   2. INVITATION SHELL & SHARED LAYOUT PRIMITIVES
   ========================================================================== */

.invitation-shell {
  position: relative;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  background-color: var(--bg-canvas);
  overflow-x: clip;
  box-shadow: 0 0 42px rgba(52, 62, 49, 0.08);
  opacity: 0.94;
  transition: opacity 0.65s var(--ease-reveal);
}

.invitation-shell.is-revealed {
  opacity: 1;
}

.container {
  width: 100%;
  padding-inline: clamp(20px, 6vw, 34px);
}

.sec-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.sec-icon img {
  display: block;
  height: auto;
}

.olive-heading {
  margin: 0;
  color: var(--olive-title);
  font-size: clamp(1.75rem, 7.2vw, 2.15rem);
  font-weight: 400;
  line-height: 1.18;
  text-align: center;
}

.gold-title {
  margin: 0;
  color: var(--gold-accent);
  font-size: clamp(1.85rem, 7.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.ink-heading {
  margin: 0;
  color: var(--ink-dark);
  font-size: clamp(1.75rem, 7.2vw, 2.15rem);
  font-weight: 400;
  line-height: 1.18;
  text-align: center;
}

.section-rule {
  width: 68%;
  height: 1px;
  border: 0;
  margin: clamp(34px, 8vw, 46px) auto 0;
  background-color: var(--gold-accent);
  opacity: 0.55;
  transform: scaleX(0.3);
  transition: opacity 0.72s var(--ease-reveal), transform 0.8s var(--ease-reveal);
}

.section-rule.is-visible {
  opacity: 0.55;
  transform: scaleX(1);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.72s var(--ease-reveal), transform 0.72s var(--ease-reveal);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.venue-col.reveal:nth-child(2),
.dress-card.reveal:nth-child(2) {
  transition-delay: 110ms;
}

/* ==========================================================================
   3. BLOQUE 1: BENDICIÓN DE LOS PADRES
   ========================================================================== */

.sec-parents {
  padding-top: clamp(44px, 11vw, 62px);
  padding-bottom: clamp(36px, 9vw, 52px);
  text-align: center;
}

.parents-lead {
  margin: 0 0 24px;
  color: var(--olive-title);
  font-size: clamp(0.95rem, 3.7vw, 1.05rem);
  line-height: 1.5;
}

.parents-group {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.parent-names {
  margin: 0;
  color: var(--olive-title);
  font-size: clamp(1.18rem, 4.9vw, 1.38rem);
  line-height: 1.32;
  letter-spacing: 0.045em;
}

.sec-parents .section-rule {
  width: 62%;
  margin-top: clamp(34px, 8.5vw, 48px);
}

/* ==========================================================================
   4. BLOQUE 2: PORTADA FOTOGRÁFICA
   ========================================================================== */

.sec-hero {
  width: 100%;
}

.hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 660 / 1475;
  overflow: hidden;
  background-color: #2f3e2e;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, var(--hero-parallax, 0px), 0) scale(1.03);
  will-change: transform;
}

.hero-scrim-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 36%;
  background: linear-gradient(
    to bottom,
    rgba(24, 34, 24, 0.42) 0%,
    rgba(24, 34, 24, 0) 100%
  );
  pointer-events: none;
}

.hero-scrim-bottom {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(
    to top,
    rgba(12, 16, 11, 0.88) 0%,
    rgba(18, 24, 16, 0.62) 42%,
    rgba(18, 24, 16, 0) 100%
  );
  pointer-events: none;
}

.hero-top-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12.5%;
  padding-inline: 16px;
}

.hero-eyebrow {
  margin: 0 0 6.5%;
  color: #ffffff;
  font-size: clamp(1.38rem, 6.2vw, 1.85rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.hero-monogram {
  width: 40.5%;
  max-width: 210px;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.25));
}

.hero-bottom-content {
  position: absolute;
  inset: auto 0 4.8% 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 16px;
}

.hero-names-art {
  width: 82%;
  max-width: 390px;
  height: auto;
  margin-bottom: 10px;
}

.hero-line {
  display: block;
  width: 64%;
  height: 1px;
  background-color: rgba(255, 242, 209, 0.85);
  margin-bottom: 12px;
}

.hero-date {
  margin: 0;
  color: var(--hero-cream);
  font-size: clamp(0.68rem, 2.75vw, 0.86rem);
  letter-spacing: 0.085em;
  text-align: center;
  white-space: nowrap;
}

.hero-scroll-cue {
  margin-top: 14px;
  opacity: 0.85;
  animation: heroCueFloat 2.2s ease-in-out infinite;
}

@keyframes heroCueFloat {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.65;
  }
  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

/* ==========================================================================
   5. BLOQUE 3: CONTADOR REGRESIVO + RESERVA FAMILIAR
   ========================================================================== */

.sec-countdown {
  position: relative;
  z-index: 3;
  margin-top: -26px;
  border-radius: 50% 50% 0 0 / 26px 26px 0 0;
  background-color: var(--bg-canvas);
  padding-top: clamp(44px, 10.5vw, 58px);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.14);
  text-align: center;
}

.sec-countdown .sec-icon img {
  width: 24px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px auto 30px;
  max-width: 400px;
}

.countdown-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 4px;
}

.countdown-cell + .countdown-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 4px;
  width: 1px;
  background-color: var(--border-muted);
}

.cd-num {
  color: var(--ink-dark);
  font-size: clamp(1.85rem, 8.2vw, 2.55rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.cd-label {
  margin-top: 6px;
  color: var(--gold-accent);
  font-size: clamp(0.75rem, 3.1vw, 0.92rem);
}

.family-card {
  margin: 0 auto;
  max-width: 390px;
  padding: 16px 18px;
  border: 1px solid var(--border-warm);
  border-radius: 6px;
  background-color: var(--bg-canvas);
}

.family-title {
  margin: 0 0 6px;
  color: var(--gold-accent);
  font-size: clamp(0.76rem, 3vw, 0.88rem);
  letter-spacing: 0.125em;
  text-transform: uppercase;
}

.family-seats {
  margin: 0;
  color: var(--ink-dark);
  font-size: clamp(0.84rem, 3.3vw, 0.98rem);
  line-height: 1.4;
}

/* ==========================================================================
   6. BLOQUE 4: DÓNDE Y CUÁNDO
   ========================================================================== */

.sec-when-where {
  padding-top: clamp(38px, 9.5vw, 52px);
  text-align: center;
}

.sec-when-where .sec-icon img {
  width: 48px;
}

.date-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 22px auto 34px;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  padding: 5px 22px;
  border: 1px solid var(--border-warm);
  border-radius: 6px;
  color: var(--gold-accent);
  font-size: clamp(1.1rem, 4.5vw, 1.32rem);
  background-color: var(--bg-canvas);
  position: relative;
  z-index: 2;
}

.date-day {
  color: var(--gold-accent);
  font-size: clamp(5.4rem, 23vw, 7.1rem);
  line-height: 0.88;
  margin: 2px 0 4px;
  letter-spacing: -0.02em;
}

.venues-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 16px);
  align-items: stretch;
}

.venue-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.venue-illus {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 112px;
  margin-bottom: -2px;
}

.venue-illus .illus-church {
  width: clamp(68px, 20vw, 82px);
  height: auto;
}

.venue-illus .illus-cake {
  width: clamp(92px, 27vw, 112px);
  height: auto;
}

.venue-card {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 10px 20px;
  border: 1px solid var(--border-warm);
  border-radius: 12px;
  background-color: var(--bg-canvas);
}

.venue-tag {
  margin: 0 0 2px;
  color: var(--gold-accent);
  font-size: clamp(0.72rem, 2.9vw, 0.88rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.venue-time {
  margin: 0 0 14px;
  color: var(--ink-dark);
  font-size: clamp(0.84rem, 3.2vw, 0.96rem);
}

.venue-place-prefix {
  margin: 0 0 2px;
  color: var(--gold-accent);
  font-size: clamp(0.9rem, 3.6vw, 1.08rem);
}

.venue-name {
  margin: 0 0 14px;
  color: var(--olive-title);
  font-size: clamp(1.06rem, 4.3vw, 1.32rem);
  font-weight: 400;
  line-height: 1.18;
}

.venue-name--reception {
  margin-top: 4px;
}

.venue-address {
  margin: auto 0 0;
  color: var(--ink-dark);
  font-size: clamp(0.68rem, 2.65vw, 0.8rem);
  line-height: 1.35;
}

.venue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  width: 100%;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 14px;
  background-color: var(--btn-pill);
  color: var(--ink-dark);
  font-family: var(--font-serif);
  font-size: clamp(0.7rem, 2.7vw, 0.82rem);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.pill-btn:hover,
.pill-btn:focus-visible {
  background-color: var(--btn-pill-hover);
}

.pill-btn:active {
  transform: scale(0.97);
}

@media (max-width: 350px) {
  .venues-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   7. BLOQUE 5: ITINERARIO
   ========================================================================== */

.sec-itinerary {
  padding-top: clamp(38px, 9.5vw, 52px);
}

.sec-itinerary .sec-icon img {
  width: 40px;
}

.itinerary-subtitle {
  margin: 8px 0 30px;
  color: var(--gold-accent);
  font-size: clamp(0.95rem, 3.8vw, 1.14rem);
  font-style: italic;
  text-align: center;
}

.timeline {
  position: relative;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 410px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 24px;
  bottom: 34px;
  width: 1px;
  background-color: var(--border-warm);
  z-index: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.timeline-item + .timeline-item {
  margin-top: 26px;
}

.timeline-badge {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-canvas);
}

.timeline-badge img {
  width: 48px;
  height: 48px;
}

.timeline-copy {
  padding-top: 3px;
}

.timeline-time {
  margin: 0 0 2px;
  color: var(--gold-accent);
  font-size: clamp(0.96rem, 3.8vw, 1.12rem);
  line-height: 1.25;
}

.timeline-desc {
  margin: 0;
  color: var(--ink-dark);
  font-size: clamp(0.86rem, 3.4vw, 0.98rem);
  line-height: 1.42;
}

.timeline-desc--closing {
  max-width: 28ch;
}

/* ==========================================================================
   8. BLOQUE 6: CÓDIGO DE VESTUARIO
   ========================================================================== */

.sec-dresscode {
  padding-top: clamp(38px, 9.5vw, 52px);
  text-align: center;
}

.sec-dresscode .sec-icon img {
  width: 46px;
}

.dress-formal {
  margin: 14px 0 6px;
  color: var(--gold-accent);
  font-size: clamp(0.76rem, 3vw, 0.88rem);
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.dress-reserved {
  margin: 0 0 18px;
  color: var(--olive-title);
  font-size: clamp(0.82rem, 3.2vw, 0.94rem);
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 34px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.swatch--beige {
  background-color: var(--gold-soft);
}

.swatch--white {
  background-color: #ffffff;
  border: 1px solid var(--border-medallion);
}

.swatch--green {
  background-color: var(--olive-swatch);
}

.dress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 16px);
  padding-top: 24px;
  align-items: stretch;
}

.dress-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 12px 18px;
  border-radius: 12px;
  background-color: var(--card-soft);
}

.dress-illus {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  height: 58px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.dress-illus .illus-shoe {
  width: clamp(88px, 26vw, 108px);
  height: auto;
}

.dress-illus .illus-heel {
  width: clamp(62px, 18vw, 76px);
  height: auto;
}

.dress-role {
  margin: 0 0 8px;
  color: var(--ink-dark);
  font-size: clamp(1.1rem, 4.4vw, 1.32rem);
  font-weight: 400;
}

.dress-text {
  margin: 0;
  color: var(--ink-dark);
  font-size: clamp(0.74rem, 2.9vw, 0.86rem);
  line-height: 1.45;
}

.pinterest-link {
  margin-top: auto;
  padding-top: 12px;
  color: var(--gold-accent);
  font-size: clamp(0.72rem, 2.8vw, 0.84rem);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 110, 67, 0.4);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.pinterest-link:hover,
.pinterest-link:focus-visible {
  opacity: 0.8;
  border-bottom-color: var(--gold-accent);
}

@media (max-width: 350px) {
  .dress-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

/* ==========================================================================
   9. BLOQUE 7 & 8: REGALO DE BODAS + CONFIRMA TU ASISTENCIA + CIERRE
   ========================================================================== */

.sec-gifts {
  padding-top: clamp(38px, 9.5vw, 52px);
  text-align: center;
}

.sec-gifts .sec-icon img {
  width: 48px;
}

.gift-copy {
  margin: 14px auto 0;
  max-width: 34ch;
  color: var(--olive-title);
  font-size: clamp(0.88rem, 3.5vw, 1.02rem);
  line-height: 1.5;
}

.sec-rsvp {
  padding-top: clamp(38px, 9.5vw, 52px);
  padding-bottom: clamp(48px, 12vw, 68px);
  text-align: center;
}

.sec-rsvp .sec-icon img {
  width: 72px;
}

.rsvp-copy {
  margin: 14px auto 26px;
  max-width: 36ch;
  color: var(--ink-black);
  font-size: clamp(0.88rem, 3.5vw, 1.02rem);
  line-height: 1.5;
}

.rsvp-cta-wrap {
  display: flex;
  justify-content: center;
}

.pill-btn--rsvp {
  min-height: 44px;
  padding: 11px 28px;
  border-radius: 16px;
  font-size: clamp(0.84rem, 3.3vw, 0.96rem);
}

.closing-signature {
  margin: 30px 0 0;
  color: var(--gold-accent);
  font-size: clamp(1.28rem, 5.2vw, 1.55rem);
  font-style: italic;
}

/* ==========================================================================
   10. SUBTLE SCROLL-ACCOMPANYING BUTTERFLY (Margin-safe SVG)
   ========================================================================== */

.scroll-butterfly {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.6s ease;
  filter: drop-shadow(0 4px 10px rgba(139, 110, 67, 0.2));
}

.scroll-butterfly.is-active {
  opacity: 0.65;
}

@media (max-width: 540px) {
  .scroll-butterfly svg {
    width: 28px;
    height: 25px;
  }
}

.butterfly-wing {
  transform-box: fill-box;
  animation: wingFlutter 1.9s ease-in-out infinite;
}

.butterfly-wing--left {
  transform-origin: right center;
}

.butterfly-wing--right {
  transform-origin: left center;
  animation-name: wingFlutterRight;
}

.scroll-butterfly.is-scrolling .butterfly-wing {
  animation-duration: 0.48s;
}

@keyframes wingFlutter {
  0%, 100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.46);
  }
}

@keyframes wingFlutterRight {
  0%, 100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.46);
  }
}

/* ==========================================================================
   11. RSVP INFO MODAL (Fallback when Google Form URL is not yet linked)
   ========================================================================== */

.rsvp-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(1, 0, 0, 0.56);
}

.rsvp-modal[hidden] {
  display: none;
}

.rsvp-modal-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 28px 22px 24px;
  border: 1px solid var(--border-warm);
  border-radius: 14px;
  background-color: var(--bg-canvas);
  text-align: center;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

.rsvp-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--gold-accent);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.rsvp-modal-title {
  margin: 0 0 10px;
  color: var(--olive-title);
  font-size: 1.25rem;
}

.rsvp-modal-text {
  margin: 0 0 18px;
  color: var(--ink-dark);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ==========================================================================
   12. REDUCED MOTION ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .envelope-cover,
  .envelope-flap-3d,
  .envelope-flap-shadow {
    transition-duration: 0.01ms;
  }
  .seal-hint,
  .hero-scroll-cue,
  .butterfly-wing {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-butterfly {
    display: none;
  }
}
