:root {
  --plum: #4d254f;
  --plum-deep: #2b142d;
  --mauve: #a4779f;
  --rose: #d9aebd;
  --blush: #f5e8e6;
  --ivory: #fffaf2;
  --gold: #c9a55d;
  --ink: #3d2c3b;
  --serif: "Italiana", Georgia, serif;
  --script: "Parisienne", cursive;
  --sans: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--ivory); font-family: var(--sans); }
body.welcome-open { overflow: hidden; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.welcome {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px;
  overflow: hidden;
  background: url("assets/portada-mariposas.png") center / cover no-repeat;
  transition: opacity .8s ease, visibility .8s ease;
}
.welcome.is-leaving { opacity: 0; visibility: hidden; }
.welcome__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35,16,37,.15), rgba(35,16,37,.65)); }
.welcome__content {
  position: relative;
  width: min(100%, 430px);
  padding: clamp(38px, 9vw, 64px) 24px;
  text-align: center;
  color: white;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(43,20,45,.4);
  box-shadow: 0 24px 80px rgba(24,10,25,.3);
  backdrop-filter: blur(5px);
}
.welcome__content::before, .welcome__content::after { content: ""; position: absolute; width: 48px; height: 48px; border-color: var(--gold); }
.welcome__content::before { top: 10px; left: 10px; border-top: 1px solid; border-left: 1px solid; }
.welcome__content::after { right: 10px; bottom: 10px; border-right: 1px solid; border-bottom: 1px solid; }
.welcome__butterfly { display: block; margin-bottom: 20px; color: #efd290; font-size: 26px; }
.welcome h1, .hero h1 { margin: 12px 0 18px; font: 400 clamp(3.5rem, 16vw, 6rem)/.82 var(--serif); letter-spacing: -.04em; }
.welcome h1 em, .hero h1 em { display: block; color: #f3d795; font-family: var(--script); font-size: 1.08em; font-weight: 400; }
.welcome__message { max-width: 320px; margin: 0 auto 28px; line-height: 1.7; }

.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: .7rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 0 28px; border: 1px solid transparent; border-radius: 0; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--filled { color: white; background: linear-gradient(135deg, var(--plum), #8c4d72); box-shadow: 0 10px 30px rgba(77,37,79,.24); }
.button--outline { color: white; border-color: rgba(255,255,255,.8); background: rgba(255,255,255,.04); }

.music-toggle { position: fixed; z-index: 50; top: 18px; right: 18px; width: 52px; height: 52px; color: white; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(77,37,79,.88); box-shadow: 0 8px 30px rgba(0,0,0,.18); cursor: pointer; }
.music-toggle.is-playing span { display: inline-block; animation: pulse 1.4s ease-in-out infinite; }

.hero { position: relative; display: grid; align-items: end; min-height: 100svh; overflow: hidden; color: white; }
.hero__image, .hero__veil { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__image { object-fit: cover; }
.hero__veil { background: linear-gradient(180deg, rgba(38,17,40,.12) 15%, rgba(40,18,41,.78) 100%); }
.hero__content { position: relative; width: min(100%, 720px); padding: 120px clamp(22px, 7vw, 72px) 62px; }
.hero__content > p:not(.eyebrow):not(.hero__fifteen) { max-width: 360px; margin: 0 0 30px; font-size: 1.05rem; }
.hero__fifteen { display: flex; align-items: baseline; gap: 12px; margin: 0 0 22px; font: 400 1.3rem var(--serif); text-transform: uppercase; letter-spacing: .18em; }
.hero__fifteen strong { color: #f2d895; font: 400 4.6rem/.8 var(--serif); }

.section { padding: 100px clamp(22px, 7vw, 80px); }
.section-heading { position: relative; z-index: 1; max-width: 650px; margin: auto; text-align: center; }
.section h2 { margin: 0 0 24px; color: var(--plum-deep); font: 400 clamp(2.4rem, 8vw, 4.6rem)/1.08 var(--serif); }
.section-heading > p:last-child, .detail-card > p:last-child, .rsvp__content > p { line-height: 1.85; }
.invitation { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--ivory), #fbf0ec); }
.section-number { position: absolute; top: 25px; left: 50%; color: rgba(164,119,159,.1); font: 400 12rem var(--serif); transform: translateX(-50%); }
.butterfly-divider { display: flex; align-items: center; gap: 18px; max-width: 300px; margin: 50px auto 0; color: var(--gold); }
.butterfly-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.butterfly-divider span:last-child { transform: scaleX(-1); }

.date-section { min-height: 720px; display: grid; place-items: center; padding: 70px 22px; background: linear-gradient(rgba(43,20,45,.38), rgba(43,20,45,.65)), url("assets/portada-mariposas.png") center / cover fixed; }
.date-card { width: min(100%, 490px); padding: 58px 28px; text-align: center; color: white; border: 1px solid rgba(255,255,255,.55); background: rgba(43,20,45,.72); backdrop-filter: blur(6px); }
.date-card__month, .date-card__year { margin: 0; font-size: .76rem; letter-spacing: .28em; text-transform: uppercase; }
.date-card__day { display: block; margin: 12px 0 5px; color: #f3d795; font: 400 clamp(6rem, 25vw, 9rem)/.8 var(--serif); }
.date-card h2 { margin: 35px 0 8px; color: white; font-size: 2.6rem; }
.date-card__time { margin: 0 0 30px; color: #f3d795; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }

.countdown-section { position: relative; overflow: hidden; background: var(--ivory); }
.countdown-section::before,
.countdown-section::after {
  content: "✦";
  position: absolute;
  color: rgba(164,119,159,.12);
  font-size: clamp(7rem, 20vw, 14rem);
  line-height: 1;
}
.countdown-section::before { top: -25px; left: -20px; transform: rotate(-14deg); }
.countdown-section::after { right: -20px; bottom: -35px; transform: rotate(18deg); }
.countdown {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 850px;
  margin: 55px auto 0;
  border-top: 1px solid rgba(77,37,79,.2);
  border-bottom: 1px solid rgba(77,37,79,.2);
}
.countdown div { display: grid; place-items: center; min-height: 180px; padding: 24px 8px; }
.countdown div + div { border-left: 1px solid rgba(77,37,79,.2); }
.countdown strong { color: var(--plum); font: 400 clamp(2.4rem, 8vw, 5rem)/1 var(--serif); }
.countdown span { margin-top: 14px; color: #7a6676; font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; }

.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 0; background: #dec9d5; }
.detail-card { position: relative; min-height: 430px; padding: 70px clamp(26px, 7vw, 80px); background: var(--ivory); }
.detail-card--contrast { color: white; background: var(--plum); }
.detail-card--contrast h2 { color: white; }
.detail-card__icon { position: absolute; top: 35px; right: 35px; color: rgba(201,165,93,.55); font: 400 2rem var(--serif); }
.reserved-color { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.reserved-color > span { width: 38px; height: 38px; border: 5px solid rgba(255,255,255,.2); border-radius: 50%; background: #214e86; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.reserved-color small { color: rgba(255,255,255,.76); font-size: .66rem; letter-spacing: .15em; text-transform: uppercase; }

.rsvp { text-align: center; background: linear-gradient(135deg, #f7eae9, #f1e4ed); }
.rsvp__content { max-width: 650px; margin: auto; }
.rsvp-form { display: grid; gap: 18px; margin-top: 38px; padding: clamp(24px, 6vw, 42px); text-align: left; border: 1px solid rgba(77,37,79,.2); background: rgba(255,255,255,.72); box-shadow: 0 20px 70px rgba(77,37,79,.08); }
.rsvp-form label { display: grid; gap: 9px; }
.rsvp-form label > span { font-size: .73rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.rsvp-form input { width: 100%; height: 52px; padding: 0 15px; color: var(--ink); border: 1px solid rgba(77,37,79,.22); background: white; outline: none; }
.rsvp-form input:focus { border-color: var(--mauve); box-shadow: 0 0 0 3px rgba(164,119,159,.12); }
.rsvp-form small { color: #76616f; }
.rsvp-error { min-height: 20px; margin: 0; color: #9b2146; font-size: .84rem; }
.rsvp-form .button { width: 100%; }

footer { padding: 56px 22px; text-align: center; color: white; background: var(--plum-deep); }
footer > p { margin: 0 0 8px; color: var(--gold); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; }
footer > strong { font: 400 1.8rem var(--serif); }
.footer__credit { display: grid; justify-items: center; gap: 15px; margin-top: 45px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.14); }
.footer__credit span { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; }
.footer__credit img { width: min(250px, 75vw); }

.reveal { opacity: 0; transform: translateY(25px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes pulse { 50% { transform: scale(1.18); } }

@media (max-width: 700px) {
  .welcome { padding: 16px; }
  .welcome__content { padding: 42px 18px; }
  .welcome h1, .hero h1 { font-size: clamp(3.2rem, 16vw, 4.8rem); }
  .hero__content { padding: 100px 22px 45px; }
  .section { padding: 82px 22px; }
  .date-section { min-height: 650px; background-attachment: scroll; }
  .details { grid-template-columns: 1fr; }
  .detail-card { min-height: auto; padding: 68px 26px; }
  .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .countdown div { min-height: 135px; }
  .countdown div:nth-child(3) { border-left: 0; border-top: 1px solid rgba(77,37,79,.2); }
  .countdown div:nth-child(4) { border-top: 1px solid rgba(77,37,79,.2); }
}

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