/* MIS XV · Keydi Guadalupe — invitación web */
:root {
  --rosa: #e9bdb7;
  --rosa-soft: #f4dcd7;
  --rosa-deep: #d4918d;
  --crema: #fbf3ea;
  --oro: #b08a47;
  --oro-t: #7f5e28;
  --vino: #3f1a20;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", system-ui, sans-serif;
  --script: "Pinyon Script", "Cormorant Garamond", cursive;
  --col: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--rosa);
  color: var(--vino);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Columna tipo "papel" sobre fondo rosa (como el ejemplo) */
main {
  max-width: var(--col);
  margin: 0 auto;
  background:
    radial-gradient(rgba(63, 26, 32, 0.05) 1px, transparent 1.3px) 0 0 / 6px 6px,
    var(--crema);
  box-shadow: 0 30px 80px rgba(63, 26, 32, 0.18);
  overflow: hidden;
}
section { position: relative; padding: 64px 28px; text-align: center; }

/* Tipografía */
.micro {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--oro-t);
}
.caps {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.8;
}
.script { font-family: var(--script); font-weight: 400; color: var(--oro-t); line-height: 1.1; }
.muted { color: var(--oro-t); font-family: var(--sans); font-size: 12px; letter-spacing: 0.08em; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn--gold { background: var(--vino); color: var(--crema); }
.btn--gold:hover { background: #5a2830; }
.btn--sm { padding: 11px 22px; font-size: 11px; }
.btn--line { background: transparent; border: 1.5px solid var(--oro); color: var(--vino); }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* Mariposa lineal */
.bfly { position: absolute; color: var(--oro); width: 54px; height: 44px; pointer-events: none; }
.bfly--hero { right: 34px; top: 120px; transform: rotate(14deg); animation: drift 7s ease-in-out infinite alternate; }
.bfly--gallery { left: 22px; bottom: 26px; transform: rotate(-10deg); width: 44px; height: 36px; animation: drift 8s ease-in-out infinite alternate; }
.bfly--done { position: static; display: block; margin: 0 auto 12px; width: 60px; height: 48px; }
@keyframes drift { from { translate: 0 0; } to { translate: -8px -10px; } }

.goldline { display: block; width: 1.5px; height: 56px; margin: 0 auto 26px; background: var(--oro); }

/* ── Portada ─────────────────────────────────────────────────────── */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  background:
    radial-gradient(rgba(63, 26, 32, 0.05) 1px, transparent 1.3px) 0 0 / 6px 6px,
    radial-gradient(circle at 50% 30%, var(--crema) 0%, var(--rosa-soft) 70%, var(--rosa) 100%);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.cover.is-open { opacity: 0; visibility: hidden; }
.cover__inner { max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cover__mono { width: min(62vw, 260px); height: auto; margin: 18px 0 4px; filter: drop-shadow(0 12px 22px rgba(176, 138, 71, 0.25)); }
.cover__title { font-size: 54px; margin-top: -6px; }
.cover__name { font-family: var(--serif); font-weight: 500; font-size: 30px; letter-spacing: 0.22em; text-transform: uppercase; margin-top: 2px; }
.cover__guest {
  margin: 26px 0 26px;
  padding: 18px 26px;
  border-top: 1px solid var(--oro);
  border-bottom: 1px solid var(--oro);
  display: flex; flex-direction: column; gap: 6px;
}
.cover__guest strong { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; }
.cover__pases { font-family: var(--sans); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oro-t); }
.cover .btn { margin-top: 28px; }
.cover__hint { margin-top: 12px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; color: var(--oro-t); text-transform: uppercase; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero { padding-top: 56px; padding-bottom: 40px; }
.hero__mis { font-size: 62px; margin-top: 4px; }
.hero__name { font-weight: 500; font-size: 34px; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.1; margin-top: 4px; }
.arch {
  position: relative;
  margin: 34px auto 0;
  width: min(100%, 330px);
  aspect-ratio: 3 / 4.6;
  border-radius: 999px 999px 0 0;
  padding: 8px;
  border: 1.5px solid var(--oro);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 999px 999px 0 0; }
.arch::after {
  content: "";
  position: absolute;
  left: -14px; right: -14px; bottom: -14px;
  height: 1.5px;
  background: var(--oro);
}

/* ── Frase ───────────────────────────────────────────────────────── */
.quote { padding-top: 40px; }
.quote blockquote { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.25; max-width: 340px; margin: 0 auto; }
.quote cite { display: block; margin-top: 16px; font-style: normal; font-family: var(--sans); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--oro-t); }

/* ── Música ──────────────────────────────────────────────────────── */
.player { padding: 28px 28px 44px; }
.player__bar { position: relative; height: 2px; max-width: 240px; margin: 16px auto 18px; background: rgba(176, 138, 71, 0.3); border-radius: 2px; }
.player__bar span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--oro); }
.player__bar span::after { content: ""; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--oro); }
.player__btn, .music-fab {
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: var(--oro); color: var(--crema);
  display: inline-grid; place-items: center;
  box-shadow: 0 10px 24px rgba(176, 138, 71, 0.35);
}
.player__btn svg, .music-fab svg { width: 24px; height: 24px; fill: currentColor; grid-area: 1 / 1; }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.music-fab { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; z-index: 40; }
.music-fab svg { width: 20px; height: 20px; }

/* ── Padres ──────────────────────────────────────────────────────── */
.parents { background: var(--rosa-soft); }
.parents__names { font-size: 31px; color: var(--vino); margin-top: 14px; }
.parents .amp { display: block; font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--oro-t); margin: 4px 0 -6px; }

/* ── Fecha ───────────────────────────────────────────────────────── */
.date__xv { font-family: var(--serif); font-weight: 500; font-size: 40px; letter-spacing: 0.24em; margin-top: 2px; }
.date__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 30px; }
.date__side {
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0.22em;
  padding: 10px 0; border-top: 1px solid var(--oro); border-bottom: 1px solid var(--oro);
}
.date__center { display: flex; flex-direction: column; align-items: center; }
.date__month { font-size: 40px; margin-bottom: -18px; }
.date__day { font-family: var(--serif); font-weight: 300; font-size: 128px; line-height: 1; color: var(--oro-t); }

.countdown { margin-top: 46px; }
.countdown__title { font-size: 40px; }
.countdown__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.countdown__grid b { display: block; font-family: var(--serif); font-weight: 500; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__grid span { font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oro-t); }
.countdown__grid div + div { border-left: 1px solid rgba(176, 138, 71, 0.4); }

.calendar { margin-top: 52px; }
.calendar__title { font-size: 40px; }
.calendar__month { margin-top: 4px; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 10px; margin: 18px auto 0; max-width: 340px; }
.calendar__grid span { font-family: var(--sans); font-size: 14px; line-height: 34px; height: 34px; position: relative; }
.calendar__grid .dow { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--oro-t); font-weight: 600; }
.calendar__grid .is-day { color: var(--crema); font-weight: 600; z-index: 0; }
.calendar__grid .is-day::before {
  content: ""; position: absolute; inset: -4px 2px; z-index: -1;
  background: var(--vino); border-radius: 50%;
  outline: 1.5px solid var(--oro); outline-offset: 3px;
  aspect-ratio: 1; margin: auto; width: 40px; height: 40px;
}

/* ── Eventos ─────────────────────────────────────────────────────── */
.events { background: var(--rosa-soft); display: grid; gap: 22px; }
.event {
  background: var(--crema);
  border: 1px solid rgba(176, 138, 71, 0.55);
  border-radius: 200px 200px 18px 18px;
  padding: 42px 22px 30px;
}
.event__icon { width: 52px; height: 52px; margin: 0 auto 6px; }
.event__icon svg { width: 100%; height: 100%; fill: none; stroke: var(--oro); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.event__title { font-size: 40px; }
.event__time { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: 0.06em; margin-top: 8px; }
.event__place { font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; }
.event__addr { font-family: var(--sans); font-size: 13px; color: var(--oro-t); margin-top: 4px; }
.event__note { font-style: italic; font-size: 19px; margin-top: 12px; }
.event .btn { margin-top: 20px; }

/* ── Dress code ──────────────────────────────────────────────────── */
.dress h3 { font-size: 44px; }
.dress p { font-size: 20px; margin-top: 6px; }
.swatch {
  position: relative;
  width: 150px; height: 190px;
  margin: 26px auto 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(63, 26, 32, 0.15);
  transform: rotate(-3deg);
  padding: 10px 10px 0;
}
.swatch span { display: block; height: 136px; background: var(--rosa-deep); }
.swatch small { display: block; margin-top: 10px; text-align: left; font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em; color: var(--oro-t); }
.swatch i {
  position: absolute; left: -26px; right: -26px; top: 50%; height: 2.5px;
  background: var(--oro); transform: rotate(-52deg);
}
.dress__rule { font-family: var(--sans) !important; font-weight: 600; font-size: 15px !important; letter-spacing: 0.18em; text-transform: uppercase; }

/* ── Foto de la playa ─────────────────────────────────────────────── */
.gallery { padding: 0; }
.gallery .g { overflow: hidden; aspect-ratio: 4 / 5; }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

/* ── Confirmación ────────────────────────────────────────────────── */
.rsvp { background: var(--rosa-soft); }
.rsvp h3 { font-size: 44px; }
.rsvp__fam { font-family: var(--serif); font-weight: 600; font-size: 28px; margin-top: 14px; line-height: 1.15; }
.rsvp__lead { font-size: 20px; margin-top: 6px; }
.rsvp__form { margin-top: 26px; display: grid; gap: 18px; text-align: left; }
.choice { display: grid; gap: 10px; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: block; text-align: center;
  padding: 15px 18px; border-radius: 999px;
  border: 1.5px solid var(--oro); background: var(--crema);
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.choice input:checked + span { background: var(--vino); color: var(--crema); border-color: var(--vino); }
.choice input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 3px; }
.rsvp__yes { text-align: center; display: grid; gap: 8px; justify-items: center; }
.stepper { display: inline-flex; align-items: center; gap: 18px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--oro); background: var(--crema); font-size: 22px; line-height: 1; }
.stepper output { font-family: var(--serif); font-weight: 500; font-size: 48px; min-width: 50px; text-align: center; line-height: 1; }
.field { display: grid; gap: 6px; width: 100%; text-align: left; }
.field span { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; }
.field em { color: var(--oro-t); font-style: normal; }
.field textarea {
  width: 100%; resize: vertical;
  border: 1px solid rgba(176, 138, 71, 0.7); border-radius: 12px;
  background: var(--crema); padding: 12px 14px;
  font-family: var(--serif); font-size: 18px; color: var(--vino);
}
.field textarea:focus { outline: 2px solid var(--oro); outline-offset: 1px; }
.rsvp__form .btn { justify-self: center; margin-top: 4px; }
.rsvp__error { text-align: center; color: #8a1f2b; font-family: var(--sans); font-size: 13px; }
.rsvp__done { margin-top: 26px; }
.rsvp__thanks { font-size: 22px; line-height: 1.4; }
.rsvp__done .btn { margin-top: 18px; }

/* ── Cierre ──────────────────────────────────────────────────────── */
.closing { padding-bottom: 80px; }
.closing__title { font-size: 56px; }
.closing__mono { width: 170px; height: auto; margin: 18px auto; }
.closing__text { font-style: italic; font-size: 24px; margin-bottom: 16px; }

/* ── Aparición al hacer scroll ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bfly { animation: none; }
  html { scroll-behavior: auto; }
}

@media (min-width: 560px) {
  body { padding: 40px 0; }
}
