/* ══════════════════════════════════════════════════════
   Tokens
   Lila = protagonista. Dorado y salvia = acentos mínimos.
   ══════════════════════════════════════════════════════ */
:root {
  --primary:            #D6B4F2;   /* lila — el color de la boda */
  --primary-soft:       #EFE3FA;   /* lila lavado, fondos de tarjeta */
  --primary-deep:       #7B5C9E;   /* lila profundo, botones (5.4:1 c/ blanco) */
  --secondary:          #BFA4E8;

  --background:         #FCF9FD;
  --surface:            #FFFFFF;

  --accent:             #D4B26A;   /* SOLO filetes, íconos, script sobre foto */
  --accent-secondary:   #A9C3A5;   /* SOLO divisores y hojas */

  --heading:            #4E3659;   /* 10.2:1 */
  --text:               #5F5A63;   /* 6.4:1 */

  --border:             #E9DEF5;
  --shadow:             rgba(123, 92, 158, .12);

  --display: "Imperial Script", cursive;
  --serif:   "Marcellus", Georgia, serif;
  --body:    "Lora", Georgia, serif;

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --stack:  clamp(3.5rem, 11vw, 6rem);
  --radius: 14px;
  --ease:   cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100dvh; }

img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; color: var(--heading); font-weight: 400; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Tipografía compartida ────────────────────────── */
.script {
  font-family: var(--display);
  font-size: clamp(2.2rem, 9vw, 3.1rem);
  line-height: 1.05;
  color: var(--heading);
}
.script--sm { font-size: clamp(1.6rem, 6vw, 2rem); }
.script--lg { font-size: clamp(2.6rem, 11vw, 3.8rem); }
.script--xl { font-size: clamp(3rem, 14vw, 4.6rem); }

.amp {
  display: block;
  font-family: var(--serif);
  font-size: .34em;
  color: var(--accent);
  line-height: 1.6;
}

.eyebrow {
  font-family: var(--serif);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--primary-deep);
}
.lead {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .05em;
  color: var(--primary-deep);
}
.fine { font-size: .84rem; line-height: 1.5; color: var(--text); }

.link-fine {
  display: block;
  margin-top: .9rem;
  font-size: .8rem;
  color: var(--primary-deep);
  text-underline-offset: 3px;
}

/* ── Botones ──────────────────────────────────────── */
.btn {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .7rem 1.6rem;
  background: var(--primary-deep);
  color: #fff;
  font-family: var(--serif);
  font-size: .84rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s;
}
.btn:hover, .btn:focus-visible { background: var(--heading); transform: translateY(-2px); }
.btn--lg { padding: .95rem 2.4rem; font-size: .95rem; }
.btn.is-disabled { pointer-events: none; opacity: .55; transform: none; cursor: default; }

/* ══ Portada ══ */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--primary-soft) 0%, var(--background) 70%);
  transition: opacity .9s var(--ease), visibility .9s;
}
.cover.is-open { opacity: 0; visibility: hidden; }

.cover__inner { max-width: 24rem; }
.cover__eyebrow {
  font-family: var(--serif);
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--primary-deep);
}
.cover__names {
  font-family: var(--display);
  font-size: clamp(3.2rem, 17vw, 5rem);
  line-height: .95;
  color: var(--heading);
  margin: .3em 0 .6em;
}
.cover__guest {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--heading);
  margin-bottom: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--accent);
}
.cover__hint { margin-top: 1.4rem; font-size: .78rem; letter-spacing: .1em; opacity: .65; }

/* ══ Invitación ══ */
.invite { opacity: 0; transition: opacity 1.1s var(--ease) .2s; }
.invite.is-open { opacity: 1; }

.section {
  position: relative;
  isolation: isolate;      /* los adornos quedan detrás del texto, no del fondo */
  max-width: 46rem;
  margin-inline: auto;
  padding: var(--stack) var(--gutter);
  text-align: center;
}

/* ── Adornos florales · decorativos, nunca compiten con el contenido ── */
.deco {
  position: absolute;
  z-index: -1;                          /* detrás del contenido */
  width: clamp(88px, 20vw, 150px);
  height: auto;
  opacity: .5;
  pointer-events: none;
  user-select: none;
}
.deco--tl { top: -14px; left: -24px; }
.deco--br { bottom: -14px; right: -24px; }
/* En pantallas muy angostas apretarían el texto: se ocultan */
@media (max-width: 22rem) { .deco { display: none; } }
.section--tight { padding-block: clamp(2rem, 7vw, 3rem); }

/* Filete dorado entre secciones — el único uso decorativo del dorado */
.section + .section::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 0 auto var(--stack);
  background: var(--accent);
  opacity: .55;
}

/* ── Hero ── */
.hero { display: grid; }
@media (min-width: 48rem) { .hero { grid-template-columns: 1fr 1fr; } }

.hero__photo {
  min-height: 46dvh;
  background: url("../assets/img/hero.webp") center/cover no-repeat;
}
.hero__panel {
  display: grid;
  place-content: center;
  gap: .8rem;
  padding: clamp(2.5rem, 9vw, 4rem) var(--gutter);
  text-align: center;
  background: var(--primary);
  color: var(--heading);
}
.hero__panel .eyebrow { color: var(--heading); }
.hero__panel .amp { color: var(--surface); }

.hero__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: 0;
  font-family: var(--serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .9rem;
}
.hero__date em {
  font-style: normal;
  font-size: 2.1rem;
  letter-spacing: 0;
  padding: 0 .7rem;
  border-inline: 1px solid rgba(78, 54, 89, .35);
}
.heart-glyph { width: 22px; margin: .4rem auto 0; fill: var(--surface); }

/* ── Countdown ── */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(.5rem, 3vw, 1rem);
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.countdown li {
  flex: 1 1 0;
  max-width: 5.5rem;
  padding: .7rem .2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px var(--shadow);
}
.countdown b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  font-weight: 400;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.countdown span { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }

/* ── Invitado ── */
.guest-card {
  padding: 1.6rem 1.4rem;
  background: var(--primary-soft);
  border: 1px dashed var(--secondary);
  border-radius: var(--radius);
}
.guest-card__intro { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.guest-card__name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  color: var(--heading);
  line-height: 1.3;
}
.guest-card__seats { margin: 0; font-size: .9rem; }

.heart-tap {
  margin: 1.6rem auto .4rem;
  padding: .5rem;
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 0;
}
.heart-tap svg { width: 34px; fill: var(--primary-deep); transition: transform .3s var(--ease); }
.heart-tap:hover svg { transform: scale(1.12); }
.heart-tap.is-done svg { fill: #C2185B; }

.hint { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }

/* Corazones que salen del tap */
.spark {
  position: fixed;
  z-index: 40;
  width: 16px;
  pointer-events: none;
  fill: #C2185B;
  animation: float 1.2s var(--ease) forwards;
}
@keyframes float {
  to { transform: translate(var(--dx), -140px) scale(.3) rotate(var(--rot)); opacity: 0; }
}

/* ── Rejilla y tarjetas ── */
.grid { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .grid--2 { grid-template-columns: 1fr 1fr; } }

/* Aire entre el título y las tarjetas de padres */
#parents-title { margin-bottom: clamp(1.4rem, 5vw, 2.2rem); }

.card {
  padding: 1.6rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--shadow);
}
.card--filled { background: var(--primary-soft); border-color: var(--secondary); }
.card__role {
  font-family: var(--serif);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary-deep);
  margin-bottom: .8rem;
}
.card p:not(.card__role) { font-size: .93rem; }

.place__icon { width: 40px; margin: 0 auto .8rem; color: var(--accent); }
.place__venue { font-family: var(--serif); color: var(--heading); font-size: 1rem; }
.place__addr { font-size: .84rem; }
.place__time { font-family: var(--serif); letter-spacing: .1em; color: var(--primary-deep); }

.dress .script--sm { margin-bottom: .3rem; }
.dress__what { font-family: var(--serif); color: var(--heading); }

.qr { margin: 0 auto 1rem; }
.date-chip {
  display: grid;
  place-content: center;
  width: 84px;
  margin: 0 auto 1rem;
  padding: .6rem;
  background: var(--primary-soft);
  border-radius: 10px;
}
.date-chip b { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; color: var(--heading); }
.date-chip span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }

/* ── Galería ── */
.gallery { margin-top: 1.8rem; }
.gallery__track {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox */
}
.gallery__track::-webkit-scrollbar { display: none; }   /* WebKit */
.gallery__slide { flex: 0 0 100%; scroll-snap-align: start; }
.gallery__slide img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--shadow);
}
.gallery__dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.1rem;
}
.gallery__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.gallery__dot[aria-current="true"] { background: var(--primary-deep); transform: scale(1.25); }

/* ── Itinerario ── */
.timeline {
  max-width: 20rem;
  margin: 1.8rem auto 0;
  padding: 0 0 0 1.6rem;
  list-style: none;
  text-align: left;
  border-left: 1px solid var(--accent-secondary);
}
.timeline li { position: relative; padding-bottom: 1.5rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.6rem - 4px);
  top: .55rem;
  width: 7px;
  height: 7px;
  background: var(--primary-deep);
  border-radius: 50%;
}
.timeline__label {
  display: block;
  font-family: var(--serif);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--primary-deep);
}
.timeline time { font-family: var(--serif); font-size: 1.15rem; color: var(--heading); }

/* ── Te esperamos ── */
.invite-card { max-width: 22rem; margin-inline: auto; }
.invite-card__lead { margin-bottom: .25rem; }
.invite-card__time {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 7vw, 2.2rem);
  letter-spacing: .08em;
  color: var(--primary-deep);
  margin: 0;
}

/* ── RSVP ── */
.rsvp {
  background: var(--primary);
  max-width: none;
  color: var(--heading);
}
.rsvp .eyebrow, .rsvp .fine { color: var(--heading); }
.rsvp .fine { margin-top: 1.4rem; }
.rsvp__seats { font-family: var(--serif); font-size: .95rem; margin-top: .6rem; }
.rsvp .btn { background: var(--surface); color: var(--heading); }
.rsvp .btn:hover, .rsvp .btn:focus-visible { background: var(--heading); color: #fff; }
.rsvp + .footer::before { content: none; }

.footer {
  padding: 2.5rem var(--gutter) 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── Música ── */
.music {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--primary-deep);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px var(--shadow);
  cursor: pointer;
}
.music__bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.music__bars i {
  width: 3px;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transform-origin: bottom;
  animation: eq .9s ease-in-out infinite alternate;
}
.music__bars i:nth-child(2) { animation-delay: .3s; }
.music__bars i:nth-child(3) { animation-delay: .6s; }
.music[aria-pressed="false"] .music__bars i { animation-play-state: paused; transform: scaleY(.35); }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

/* ── Reveals ── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .spark { display: none; }
}
