/* =========================================================
   Baby Shower de Sergio — estilos
   ========================================================= */

:root {
  --sky-0: #F7FBFF;
  --sky-1: #E8F2FC;
  --sky-2: #D6E8FA;
  --blue-1: #A6CDF2;
  --blue-2: #6FA6E2;
  --blue-3: #3E76B9;
  --navy: #1C4E8A;
  --ink: #2C507C;
  --ink-soft: #5D7799;
  --gold: #F1C35A;

  --card: rgba(255, 255, 255, .74);
  --card-border: rgba(255, 255, 255, .95);
  --shadow: 0 22px 50px -28px rgba(28, 78, 138, .5);
  --shadow-sm: 0 10px 24px -14px rgba(28, 78, 138, .55);

  --f-script: 'Great Vibes', cursive;
  --f-hand: 'Dancing Script', cursive;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sky-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }
body:has(dialog[open]) { overflow: hidden; }

main { overflow-x: clip; }

svg { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--blue-2);
  outline-offset: 3px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Tipografía ---------- */

.t-script { font-family: var(--f-script); font-weight: 400; line-height: 1; }
.t-hand { font-family: var(--f-hand); font-weight: 700; line-height: 1.05; }

.title {
  margin: 0;
  font-size: clamp(2.7rem, 11vw, 4.2rem);
  color: var(--navy);
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .85);
}

.eyebrow {
  margin: 0;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue-3);
  text-align: center;
}

.lead {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(1.05rem, 3.8vw, 1.22rem);
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 18px;
  color: var(--blue-3);
}
.divider i {
  display: block;
  width: clamp(54px, 18vw, 96px);
  height: 1.5px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: .7;
}
.divider i:last-child { transform: scaleX(-1); }
.divider svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 50px;
  padding: .8em 1.5em;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn .icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #78AEE8 0%, #3F7BC2 100%);
  box-shadow: 0 12px 26px -12px rgba(40, 100, 175, .85), inset 0 1px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 1px 1px rgba(20, 60, 110, .25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(40, 100, 175, .9), inset 0 1px 0 rgba(255, 255, 255, .35); }

.btn-ghost {
  color: var(--blue-3);
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1.5px #BDD7F2, var(--shadow-sm);
}
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }

.btn-lg { min-height: 58px; padding: .9em 1.9em; font-size: 1.08rem; }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.btn-pulse { position: relative; }
.btn-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(111, 166, 226, .55);
  animation: pulse 2.4s ease-out infinite;
}

/* ---------- Cielo de fondo ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(90% 50% at 12% 0%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 62%),
    radial-gradient(70% 45% at 100% 34%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #D3E6F9 0%, #E5F0FC 48%, #F3F8FE 100%);
}
.sky-cloud {
  position: absolute;
  left: 0;
  top: var(--top, 10%);
  width: var(--w, 220px);
  opacity: var(--o, .85);
  animation: drift var(--t, 100s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
.sky-star {
  position: absolute;
  width: var(--s, 12px);
  height: var(--s, 12px);
  animation: twinkle var(--t, 3.5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.sky-star.sparkle { fill: #fff; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .9)); }

/* ---------- Secciones ---------- */

.section {
  position: relative;
  padding: clamp(70px, 12vw, 120px) 20px;
}
.section-inner {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
}

/* Ilustraciones */
.art { position: relative; width: 100%; }
.art svg { width: 100%; height: auto; overflow: visible; }
.art .art-anim { position: absolute; inset: 0; }
.string { fill: none; stroke: #8DB6E0; stroke-width: 1.5; stroke-linecap: round; }

.sway {
  animation: sway 5.5s ease-in-out infinite;
}
.hang {
  animation: hang 4.5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 3.2s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ---------- 0. Sobre de bienvenida ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(80% 50% at 50% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #CFE3F8 0%, #E6F1FC 60%, #F4F9FE 100%);
}
.intro-content { text-align: center; }
.intro-kicker {
  margin: 0;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.1;
  color: var(--navy);
}
.intro-kicker, .intro-hint { transition: opacity .5s ease; }
.intro.is-opening .intro-kicker,
.intro.is-opening .intro-hint { opacity: 0; }
.intro-hint {
  margin: 18px 0 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  transition: opacity .9s ease, transform .9s ease, visibility 0s .9s;
}

.envelope {
  position: relative;
  width: min(76vw, 320px);
  aspect-ratio: 1.5;
  margin: 34px auto 34px;
  perspective: 900px;
  animation: bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 22px 24px rgba(40, 90, 150, .25));
}
.env-back, .env-front, .env-flap, .env-letter { position: absolute; }
.env-back {
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #A2C8EF, #C3DCF5);
}
.env-letter {
  left: 7%;
  right: 7%;
  top: 6%;
  bottom: 8%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 9%;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #F3F8FE);
  transition: transform 1s cubic-bezier(.3, .8, .3, 1) .45s;
}
.env-letter-top {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-3);
}
.env-letter-name {
  font-size: clamp(2.6rem, 12vw, 3.4rem);
  color: var(--navy);
  line-height: 1.2;
}
.env-letter-heart { width: 16px; height: 16px; fill: var(--blue-2); }
.env-front {
  inset: 0;
  z-index: 2;
  border-radius: 14px;
  background: linear-gradient(165deg, #E2EEFB, #B9D5F2);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  left: 0;
  right: 0;
  top: 0;
  height: 62%;
  z-index: 3;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #BBD7F3, #93BDEA);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform .65s ease, z-index 0s .3s;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFEBB0, #E7B04A);
  box-shadow: 0 5px 12px rgba(160, 110, 30, .35), inset 0 -3px 6px rgba(170, 110, 20, .25);
  transform: translate(-50%, -50%);
  transition: opacity .3s ease, transform .4s ease;
}
.env-seal svg { width: 26px; height: 26px; fill: #fff; }

.intro.is-opening .env-seal { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
.intro.is-opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.intro.is-opening .env-letter { transform: translateY(-62%); }
.intro.is-opening .envelope { animation-play-state: paused; }
.intro.is-opening #open-invite { opacity: 0; transform: scale(.9); pointer-events: none; }
#open-invite { transition: opacity .4s ease, transform .4s ease; }

/* ---------- 1. Portada ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(64px, 11vh, 110px);
  padding-bottom: 90px;
}
.hero-grid {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
}
.hero-copy { text-align: center; }
.hero-kicker {
  margin: 0;
  font-size: clamp(1.35rem, 5.8vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .02em;
}
.hero-title {
  margin: .08em 0 0;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(2.5rem, 11.5vw, 4.4rem);
  line-height: 1.04;
  color: var(--navy);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .85);
  text-wrap: balance;
}
.hero-title span { display: block; }
.hero-art { width: min(80vw, 360px); margin-top: 6px; }

.moon {
  position: absolute;
  top: clamp(10px, 3vw, 36px);
  right: clamp(-14px, 3vw, 70px);
  width: clamp(84px, 22vw, 150px);
  animation: bob 7s ease-in-out infinite;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--blue-3);
  transform: translateX(-50%);
}
.scroll-cue svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 1.8s ease-in-out infinite;
}

/* ---------- 2. Bienvenida ---------- */

.welcome { padding-top: clamp(110px, 12vw, 120px); }
.welcome-grid {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}
.welcome-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome-hi {
  margin: 0 0 .25em;
  font-size: clamp(2rem, 8vw, 2.9rem);
  color: var(--navy);
}
.welcome-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-weight: 400;
  color: var(--navy);
}
.welcome-h .bs { font-size: clamp(3.8rem, 16vw, 6.2rem); line-height: 1.1; }
.welcome-h .de { font-size: clamp(2.2rem, 8.5vw, 3.2rem); line-height: .8; }
.welcome-h .name {
  padding: .14em .24em .08em;
  margin-top: -.12em;
  font-size: clamp(5.6rem, 27vw, 10rem);
  line-height: 1.05;
  background: linear-gradient(180deg, #3D7FC6 10%, #1C4E8A 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(255, 255, 255, .9));
}
.mini-heart {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--blue-3);
  stroke-width: 2;
}
.surname {
  margin: .1em 0 0;
  font-size: clamp(2.7rem, 10.5vw, 3.9rem);
  color: var(--navy);
}
.welcome-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.welcome-art { width: min(74vw, 320px); }
.welcome-text {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(1.08rem, 4vw, 1.24rem);
  font-weight: 600;
  text-wrap: balance;
}
.inline-name {
  font-size: 2.1em;
  line-height: .8;
  color: var(--navy);
  vertical-align: -.12em;
}
.balloons-cluster {
  position: absolute;
  top: -40px;
  left: 12px;
  width: clamp(80px, 21vw, 190px);
  animation: bob 6s ease-in-out infinite;
}

/* ---------- 3. Cuenta regresiva ---------- */

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 30px);
  margin: 26px auto 0;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bob 5s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.25s);
}
.cd-balloon {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(70px, 19.5vw, 116px);
  aspect-ratio: .86;
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 34% 28%, #F4F9FF 0, #A9CFF3 40%, #6A9FDA 100%);
  box-shadow: inset -6px -10px 18px rgba(40, 90, 160, .22), 0 16px 26px -16px rgba(40, 90, 160, .7);
}
.cd-balloon::before {
  content: '';
  position: absolute;
  top: 14%;
  left: 20%;
  width: 16%;
  height: 26%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  transform: rotate(28deg);
}
.cd-balloon::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  border: 6px solid transparent;
  border-bottom: 9px solid #6A9FDA;
  transform: translateX(-50%);
}
.cd-unit:nth-child(even) .cd-balloon {
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0, #F0F5FB 50%, #C3D4E8 100%);
}
.cd-unit:nth-child(even) .cd-balloon::after { border-bottom-color: #C3D4E8; }
.cd-num {
  position: relative;
  font-weight: 800;
  font-size: clamp(1.7rem, 7vw, 2.8rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 6px rgba(28, 78, 138, .45);
}
.cd-unit:nth-child(even) .cd-num { color: var(--navy); text-shadow: 0 2px 0 #fff; }
.cd-num.tick { animation: tick .5s ease; }
.cd-string {
  width: 10px;
  height: 30px;
  margin-top: 2px;
  fill: none;
  stroke: #8DB6E0;
  stroke-width: 1.4;
}
.cd-label {
  font-size: clamp(.62rem, 2.6vw, .78rem);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-3);
}
.countdown-note {
  margin: 22px auto 0;
  font-weight: 700;
  text-wrap: balance;
  text-align: center;
  color: var(--ink);
}
.countdown-note.is-today {
  font-family: var(--f-hand);
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  color: var(--navy);
}

/* ---------- 4. Detalles ---------- */

.details-inner { display: flex; flex-direction: column; align-items: center; }
.details .divider { margin-bottom: 10px; }
.details-body {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin-top: 18px;
}
.peek-art {
  width: 180px;
  margin: 0 auto -30px;
}
.info-list {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.info-pill {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 22px 11px 11px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-border), var(--shadow);
}
.info-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, #84B8EA, #3D77BE);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 8px 16px -8px rgba(40, 100, 170, .8);
}
.info-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-text {
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--navy);
}
.info-text strong { font-weight: 800; }

/* ---------- 5. Ubicación ---------- */

.location-grid {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.location-place {
  margin: 0;
  font-size: 1.12rem;
  text-align: center;
  color: var(--ink);
}
.location-place strong { color: var(--navy); }
.location-address {
  margin: 8px 0 0;
  font-size: .92rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-soft);
}
.map-card {
  width: 100%;
  max-width: 640px;
  margin-top: 18px;
  padding: 8px;
  border-radius: 30px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-border), var(--shadow);
}
.map-card iframe {
  display: block;
  width: 100%;
  height: clamp(260px, 62vw, 380px);
  border: 0;
  border-radius: 22px;
  background: var(--sky-2);
}
.location-actions { margin-top: 18px; }

/* ---------- 6. Regalos ---------- */

.gifts-grid {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.gift-art { width: min(80vw, 360px); }
.gifts-copy { text-align: center; }
.thanks {
  margin: 22px auto 0;
  max-width: 22ch;
  font-size: clamp(1.45rem, 5.6vw, 1.85rem);
  color: var(--navy);
  text-wrap: balance;
}

/* ---------- 7. Confirmación ---------- */

.rsvp-grid {
  display: grid;
  justify-items: center;
  gap: 18px;
}
.rsvp-copy { text-align: center; }
.rsvp-title span { display: block; }
.rsvp-saved {
  margin: 16px 0 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--blue-3);
}
.sleep-art { width: min(80vw, 360px); }
.zz {
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 28px;
  fill: var(--blue-2);
  animation: zz 3s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ---------- Pie ---------- */

.footer {
  position: relative;
  padding: 40px 20px calc(70px + env(safe-area-inset-bottom));
  text-align: center;
}
.footer-moon {
  width: 92px;
  margin: 0 auto 6px;
  animation: bob 6s ease-in-out infinite;
}
.footer-love {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  color: var(--navy);
}
.footer-name {
  margin: .05em 0 0;
  font-size: clamp(3rem, 12vw, 4.2rem);
  color: var(--navy);
}
.footer-date {
  margin: 30px 0 0;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .3em;
  color: var(--ink-soft);
}

/* ---------- Botón de música ---------- */

.music-btn {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, #84B8EA, #3D77BE);
  box-shadow: 0 12px 24px -10px rgba(28, 78, 138, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: pop-in .5s cubic-bezier(.3, 1.4, .5, 1) both;
}
.music-btn .note {
  grid-area: 1 / 1;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.music-btn .eq {
  grid-area: 1 / 1;
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}
.music-btn .eq i {
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}
.music-btn .eq i:nth-child(2) { animation-delay: -.35s; }
.music-btn .eq i:nth-child(3) { animation-delay: -.7s; }
.music-btn .eq i:nth-child(4) { animation-delay: -.15s; }
.music-btn.is-playing .eq { display: flex; }
.music-btn.is-playing .note { display: none; }
.music-btn:not(.is-playing)::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 1.5px #4F87C9;
}

/* ---------- Diálogos ---------- */

.sheet {
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 30px 30px 0 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.sheet[open] { animation: sheet-up .45s cubic-bezier(.2, .9, .3, 1); }
.sheet::backdrop {
  background: rgba(24, 60, 105, .38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.sheet-card {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 30px 22px calc(26px + env(safe-area-inset-bottom));
  border-radius: inherit;
  background:
    radial-gradient(120% 60% at 50% 0%, #fff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #F2F8FF, #E5F0FC);
  box-shadow: 0 -10px 40px -10px rgba(28, 78, 138, .35);
}
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--blue-3);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.sheet-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sheet-head { text-align: center; margin-bottom: 18px; }
.sheet-head h3 {
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 2.6rem);
  color: var(--navy);
}
.sheet-head p { margin: 6px auto 0; max-width: 32ch; font-weight: 600; color: var(--ink-soft); }
.sheet-bear { width: 92px; margin: -6px auto 4px; }

.cal-options { display: grid; gap: 10px; }
.cal-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .85);
  box-shadow: inset 0 0 0 1px #D4E6F8, var(--shadow-sm);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cal-option:hover { transform: translateY(-2px); }
.cal-option strong { display: block; color: var(--navy); font-weight: 800; }
.cal-option small { display: block; color: var(--ink-soft); font-weight: 600; font-size: .85rem; }
.cal-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(160deg, #84B8EA, #3D77BE);
}
.cal-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Formulario ---------- */

#rsvp-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label {
  padding: 0;
  font-size: .95rem;
  font-weight: 800;
  color: var(--navy);
}
.field-label small { font-weight: 600; color: var(--ink-soft); }
.field input[type="text"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #CFE2F6;
  border-radius: 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(111, 166, 226, .22);
}
.field input::placeholder, .field textarea::placeholder { color: #9DB2CB; }
.field.has-error input { border-color: #E58A8A; box-shadow: 0 0 0 4px rgba(229, 138, 138, .18); }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: 100%;
  padding: 12px 8px;
  border: 1.5px solid #CFE2F6;
  border-radius: 18px;
  font-weight: 800;
  font-size: .95rem;
  text-align: center;
  line-height: 1.25;
  color: var(--navy);
  background: #fff;
  transition: all .2s ease;
}
.choice span b { font-size: 1.5rem; font-weight: 400; }
.choice input:checked + span {
  border-color: var(--blue-2);
  background: linear-gradient(180deg, #F2F8FF, #DCEBFA);
  box-shadow: 0 0 0 3px rgba(111, 166, 226, .25);
  transform: translateY(-2px);
}
.choice input:focus-visible + span { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.fieldset-error .choice span { border-color: #E58A8A; }

.stepper {
  display: flex;
  align-items: center;
  width: max-content;
  border: 1.5px solid #CFE2F6;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.stepper button {
  width: 48px;
  height: 46px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-3);
  cursor: pointer;
}
.stepper button:active { background: var(--sky-1); }
.stepper input {
  width: 52px;
  border: 0;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  color: var(--navy);
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .92rem;
  font-weight: 700;
  color: #A04545;
  background: #FDEEEE;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.is-loading .spinner { display: block; }
.is-loading { pointer-events: none; opacity: .85; }

.rsvp-done { text-align: center; padding: 10px 0 4px; }
.rsvp-done h3 { margin: 0; font-size: clamp(2.3rem, 10vw, 2.9rem); color: var(--navy); }
.rsvp-done p { margin: 8px auto 0; max-width: 32ch; font-weight: 600; font-size: 1.05rem; }
.done-bear { width: 120px; margin: 0 auto; animation: bob 4s ease-in-out infinite; }

/* ---------- Efectos ---------- */

.fx { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.burst {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  animation: burst 1.6s cubic-bezier(.15, .7, .3, 1) both;
}
.burst svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 2px 3px rgba(40, 90, 150, .25)); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: rgba(28, 78, 138, .92);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Aparición al hacer scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Animaciones ---------- */

@keyframes drift { from { transform: translateX(-110%); } to { transform: translateX(100vw); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.75) rotate(0); } 50% { opacity: 1; transform: scale(1.08) rotate(14deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
@keyframes hang { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 166, 226, .6); } 80%, 100% { box-shadow: 0 0 0 16px rgba(111, 166, 226, 0); } }
@keyframes tick { 0% { transform: translateY(-6px) scale(1.12); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 8px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -14px); } }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(var(--s)) rotate(var(--r)); }
}

.sway, .hang { transform-box: view-box; }

/* ---------- Escritorio ---------- */

@media (min-width: 860px) {
  body { font-size: 18px; }

  .hero-grid { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 48px; }
  .hero-art { order: -1; width: 100%; max-width: 430px; }

  .welcome-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
  .balloons-cluster { top: calc(50% - 170px); left: max(0px, calc(50% - 680px)); }

  .details-body { max-width: 1000px; display: grid; grid-template-columns: 1fr 440px 1fr; align-items: end; gap: 28px; }
  .peek-art { width: 220px; margin: 0 0 -10px; justify-self: end; }

  .location-grid { grid-template-columns: .8fr 1.2fr; column-gap: 50px; align-items: center; }
  .location-copy { grid-row: span 2; }
  .map-card { margin-top: 0; }
  .location-actions { grid-column: 2; }

  .gifts-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .gift-art { width: 100%; max-width: 440px; }

  .rsvp-grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
  .sleep-art { width: 100%; max-width: 420px; }

  .sheet { margin: auto; border-radius: 30px; }
  .sheet[open] { animation-name: sheet-in; }
  .sheet-card { padding: 34px 32px 30px; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Menos movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
