:root {
  --orange: #f07a2e;
  --coral: #e9725a;
  --pink: #e8847f;
  --pink-soft: #f2a7a0;
  --wine: #6b1a2e;
  --cream: #f8ebdf;
  --cream-2: #f3dfd0;
  --paper: #fbf3ec;
  --green: #2f3a2b;
  --ink: #3a2a2e;
  --muted: #7d6a66;
  --line: #e5cfc1;
  --gold: #f3b05a;

  --f-script: 'Great Vibes', 'Brush Script MT', cursive;
  --f-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-body: 'EB Garamond', Georgia, serif;
  --f-label: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(107, 26, 46, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font: 18px/1.55 var(--f-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1;
  overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; }
a { color: inherit; }

.container { width: min(1080px, 100% - 40px); margin-inline: auto; position: relative; z-index: 1; }
.narrow { width: min(640px, 100% - 40px); }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Tipografía y adornos ---------- */
.eyebrow {
  font: 500 12px/1 var(--f-label);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--coral);
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
}
.center .eyebrow { justify-content: center; }
.eyebrow--dark { color: var(--ink); }
.eyebrow--wine { color: var(--wine); }
.eyebrow .sparkle { width: 16px; height: 16px; }

.title { font: 500 clamp(34px, 5vw, 48px)/1.1 var(--f-display); margin: 0 0 18px; color: var(--ink); }
.title--sm { font-size: clamp(28px, 4vw, 38px); }
.subtitle { font-size: 19px; color: var(--muted); margin: 0 0 40px; }

.sparkle { width: 22px; height: 22px; color: var(--orange); }
.sparkle--gold { color: var(--gold); }
.sparkle--center { display: block; margin: 0 auto 14px; width: 18px; height: 18px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 500 17px/1 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn--pink { background: var(--pink); color: #fff; box-shadow: 0 10px 30px -8px rgba(232, 132, 127, .7); }
.btn--coral { background: var(--coral); color: #fff; box-shadow: 0 10px 24px -10px rgba(233, 114, 90, .8); }
.btn--coral:hover { background: #df6347; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--ghost { color: var(--muted); background: none; padding: 0 12px; }
.btn--sm { min-height: 40px; padding: 0 22px; font-size: 15px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--coral); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(24px, 4vw) 18px;
  color: #fff;
  transition: background .3s, color .3s, padding .3s, box-shadow .3s;
}
.nav.is-solid { background: rgba(251, 243, 236, .94); color: var(--ink); backdrop-filter: blur(10px); padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px; box-shadow: 0 1px 0 var(--line); }
.nav__brand { font: 500 26px/1 var(--f-display); text-decoration: none; }
.nav__links { display: flex; gap: 6px; font-size: 16px; }
.nav__links a { text-decoration: none; padding: 6px 4px; opacity: .92; }
.nav__links a + a::before { content: '·'; margin-right: 10px; opacity: .7; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav__toggle { display: none; background: none; border: 0; color: inherit; padding: 6px; cursor: pointer; }
.nav__toggle svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 12px; right: 12px;
    flex-direction: column; gap: 0;
    background: var(--paper); color: var(--ink);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 8px; font-size: 19px;
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity .2s, transform .2s;
  }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; transform: none; }
  .nav__links a { padding: 12px 14px; border-radius: 10px; }
  .nav__links a + a::before { display: none; }
  .nav__links a:hover { background: var(--cream); text-decoration: none; }
}

/* ---------- Portada ---------- */
.hero {
  position: relative;
  min-height: max(100svh, 720px);
  display: grid; place-items: center;
  padding: max(150px, 22vh) 20px 150px;
  color: #fff; text-align: center;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 100%, #f08a4a 0%, rgba(240, 138, 74, 0) 60%),
    linear-gradient(180deg, #3b2340 0%, #5e3156 32%, #a24a5a 58%, #e27a4e 78%, #3a1f24 100%);
}
.hero__scene { position: absolute; inset: 0; pointer-events: none; }
.hero__photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s; }
.hero.has-photo .hero__photo { opacity: 1; }
.hero.has-photo .hero__photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40, 20, 40, .55), rgba(40, 20, 40, .25) 40%, rgba(40, 15, 20, .6)); }
.hero.has-photo .hero__trees, .hero.has-photo .hero__flowers, .hero.has-photo .hero__bokeh, .hero.has-photo .hero__disco { display: none; }

.hero__bokeh span {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 120, .9), rgba(255, 170, 90, 0) 70%);
  animation: twinkle var(--d, 4s) ease-in-out infinite alternate;
}
.hero__lights { position: absolute; top: 0; left: 0; width: 100%; height: min(28vh, 260px); overflow: visible; }
.hero__lights .wire { fill: none; stroke: #241720; stroke-width: 1.6; }
.hero__lights .bulb { fill: #ffd58a; filter: url(#glow); }
.hero__lights .bulb-halo { fill: rgba(255, 196, 110, .35); animation: twinkle var(--d, 3s) ease-in-out infinite alternate; }
.hero__lights .bulb-cap { fill: #3b2a24; }

.hero__disco { position: absolute; top: 64px; right: 7%; width: clamp(70px, 9vw, 120px); height: clamp(90px, 12vw, 156px); animation: sway 6s ease-in-out infinite; transform-origin: 50% 0; }
.hero__trees { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30%; overflow: visible; }
.hero__flowers { position: absolute; bottom: 30px; width: clamp(180px, 26vw, 360px); height: clamp(130px, 18vw, 250px); }
.hero__flowers--l { left: -20px; }
.hero__flowers--r { right: -20px; transform: scaleX(-1); }

.hero__content { position: relative; z-index: 2; max-width: 760px; }
.hero__star { width: 34px; height: 34px; margin-bottom: 4px; filter: drop-shadow(0 0 10px rgba(255, 190, 100, .8)); animation: twinkle 3s ease-in-out infinite alternate; }
.hero__script { font: 400 clamp(46px, 8vw, 74px)/1 var(--f-script); color: var(--gold); margin: 0 0 -6px; transform: rotate(-5deg); text-shadow: 0 2px 18px rgba(0, 0, 0, .3); }
.hero__names { font: 500 clamp(60px, 11vw, 112px)/1 var(--f-display); margin: 0; letter-spacing: -.01em; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.hero__names span { font-style: italic; font-weight: 400; }
.hero__date { font: 400 clamp(18px, 2.6vw, 25px)/1 var(--f-body); letter-spacing: .32em; text-transform: uppercase; margin: 22px 0 26px; }
.hero__date span { opacity: .7; letter-spacing: 0; margin: 0 .55em 0 .23em; }
.hero__lead { font: 400 clamp(20px, 2.6vw, 26px)/1.3 var(--f-display); margin: 0 0 24px; }

.countdown { display: flex; gap: 10px; justify-content: center; margin: 0 0 26px; flex-wrap: wrap; }
.countdown__box {
  width: 84px; padding: 12px 4px 10px;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: 12px;
  background: rgba(40, 20, 35, .28); backdrop-filter: blur(4px);
}
.countdown__box span { display: block; font: 400 36px/1 var(--f-body); font-variant-numeric: tabular-nums; }
.countdown__box small { display: block; font-size: 14px; opacity: .9; margin-top: 4px; }
.countdown__done { font: 400 italic 28px/1.3 var(--f-display); color: var(--gold); margin: 0 0 24px; }

.hero__place { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; margin: 0 0 26px; }
.hero__place svg { width: 18px; height: 18px; color: var(--orange); }
.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 70px; fill: var(--paper); z-index: 3; }

@media (max-width: 480px) {
  .hero__trees { height: 22%; }
  .hero__flowers { bottom: 20px; }
  .countdown { gap: 8px; }
  .countdown__box { width: calc(25% - 6px); min-width: 64px; }
  .countdown__box span { font-size: 30px; }
  .countdown__box small { font-size: 12px; }
}

/* ---------- Secciones ---------- */
.section { position: relative; padding: clamp(70px, 10vw, 120px) 0; overflow: hidden; }
.section--soft { background: var(--cream); }
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco--flowers-tr { top: 10px; right: -30px; width: 260px; height: 180px; transform: scaleY(-1) rotate(10deg); opacity: .95; }
.deco--flowers-bl { bottom: -10px; left: -30px; width: 240px; height: 170px; }
.deco--cheers { left: max(20px, 6vw); top: 34%; width: 170px; height: 180px; opacity: .9; }
@media (max-width: 900px) { .deco--cheers { display: none; } }
@media (max-width: 820px) {
  .deco--flowers-bl, .deco--flowers-card { display: none; }
  .deco--flowers-tr { width: 160px; height: 110px; top: 0; right: -40px; }
}

/* Fecha y ubicación */
.venue { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.venue .title { font-family: var(--f-body); font-weight: 400; }
.venue__time { font-size: 19px; color: var(--muted); margin: -6px 0 18px; }
.venue__place { display: flex; gap: 10px; font: 400 22px/1.35 var(--f-display); margin: 0 0 32px; }
.venue__place svg { width: 22px; height: 22px; color: var(--coral); margin-top: 3px; }
.venue__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.venue__actions .btn { min-width: 250px; }
.venue__photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); box-shadow: var(--shadow);
  background:
    url(img/lugar.jpg) center / cover,
    radial-gradient(60% 40% at 50% 70%, rgba(255, 200, 120, .55), transparent 70%),
    linear-gradient(180deg, #2b2a4a 0%, #4b3960 45%, #a3586a 75%, #2a1c22 100%);
}
.cal { position: relative; }
.cal__menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; min-width: 250px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
}
.cal__menu a { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.cal__menu a:hover { background: var(--cream); }
@media (max-width: 760px) {
  .venue { grid-template-columns: 1fr; }
  .venue__photo { aspect-ratio: 4 / 3; order: -1; }
  .venue__text { text-align: center; }
  .venue .eyebrow, .venue__place { justify-content: center; }
  .venue__place { text-align: left; }
  .venue__actions { align-items: center; }
  .venue__actions .btn, .cal { width: min(100%, 320px); }
  .cal__menu { left: 50%; transform: translateX(-50%); }
}

/* Programa */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 300px; text-align: left; position: relative; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1.5px; background: var(--pink-soft); }
.timeline li { display: flex; align-items: center; gap: 22px; padding: 12px 0; position: relative; }
.timeline__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 6px var(--cream); }
.timeline__icon svg { width: 22px; height: 22px; }
.timeline strong { display: block; font: 600 19px/1.2 var(--f-body); }
.timeline li span:not(.timeline__icon) { color: var(--muted); }

/* Confirmación */
.rsvp { display: grid; grid-template-columns: 0.85fr 1.15fr; overflow: hidden; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.rsvp__art { position: relative; min-height: 420px; background: linear-gradient(160deg, #f6d9c8, #f2bfb0 60%, #e8847f); overflow: hidden; }
.rsvp__disco { position: absolute; top: -10px; left: 50%; width: 52%; height: 70%; transform: translateX(-50%); animation: sway 7s ease-in-out infinite; transform-origin: 50% 0; }
.rsvp__flowers { position: absolute; bottom: -10px; left: -20px; width: 80%; height: 40%; }
.rsvp__s1 { position: absolute; top: 18%; left: 14%; width: 26px; height: 26px; }
.rsvp__s2 { position: absolute; top: 58%; right: 16%; width: 20px; height: 20px; }
.rsvp__s3 { position: absolute; top: 72%; left: 26%; width: 16px; height: 16px; }
.rsvp__body { position: relative; padding: clamp(28px, 5vw, 56px); }
.deco--flowers-card { top: -6px; right: -26px; width: 200px; height: 140px; transform: scaleY(-1) rotate(8deg); opacity: .9; }
.rsvp__body .eyebrow::before { content: '—'; letter-spacing: 0; }
@media (max-width: 820px) {
  .rsvp { grid-template-columns: 1fr; }
  .rsvp__art { min-height: 160px; }
  .rsvp__disco { width: 120px; height: 160px; top: -30px; }
  .rsvp__flowers { width: 220px; height: 130px; left: auto; right: -20px; transform: scaleX(-1); }
}

.rsvp-step__title { font: 500 clamp(30px, 4vw, 38px)/1.1 var(--f-display); margin: 0 0 6px; position: relative; }
.rsvp-step__subtitle { color: var(--muted); margin: 0 0 26px; font-size: 17px; }
.progress { display: flex; gap: 6px; margin-bottom: 22px; }
.progress span { height: 4px; flex: 1; max-width: 46px; border-radius: 4px; background: var(--line); transition: background .3s; }
.progress span.on { background: var(--coral); }

.field { margin-bottom: 22px; border: 0; padding: 0; min-width: 0; }
.field__label { display: block; font-size: 17px; margin-bottom: 8px; padding: 0; }
.field__label .req { color: var(--coral); }
.field__hint { font-size: 15px; color: var(--muted); margin-top: 6px; }
.field.is-new .field__label::after { content: 'Nuevo'; font: 500 10px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; background: var(--orange); color: #fff; border-radius: 999px; padding: 4px 8px; margin-left: 8px; vertical-align: 2px; }
.input {
  width: 100%; padding: 12px 14px;
  font: 17px/1.4 var(--f-body); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #b3a19b; }
.input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(232, 132, 127, .18); }
textarea.input { resize: vertical; min-height: 90px; }
.field.has-error .input { border-color: #c8443a; }
.field__error { color: #b8372e; font-size: 15px; margin-top: 6px; }

.choices { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.choice { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 17px; padding: 4px 0; }
.choice input { appearance: none; margin: 0; width: 22px; height: 22px; border: 1.5px solid #c9b1a6; background: #fff; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: border-color .2s; }
.choice input[type=checkbox] { border-radius: 6px; }
.choice input::after { content: ''; width: 12px; height: 12px; border-radius: inherit; background: var(--coral); transform: scale(0); transition: transform .15s; }
.choice input:checked { border-color: var(--coral); }
.choice input:checked::after { transform: scale(1); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--coral); cursor: pointer; border-radius: 50%; }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; }

.rsvp-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.rsvp-actions .btn--coral { min-width: 200px; }
.form-error { color: #b8372e; margin: 0 0 12px; }
.notice { background: var(--cream); border-left: 3px solid var(--orange); border-radius: 8px; padding: 12px 16px; font-size: 16px; margin-bottom: 22px; }

.rsvp-done { text-align: left; }
.rsvp-done__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.rsvp-done__icon svg { width: 28px; height: 28px; }
.rsvp-done p { margin: 0 0 14px; }
.edit-link { display: flex; gap: 8px; margin: 6px 0 22px; }
.edit-link input { font-size: 14px; color: var(--muted); }
.edit-link .btn { min-height: 44px; padding: 0 16px; }

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

/* Mensajes */
.message-form { display: grid; gap: 14px; justify-items: center; margin-top: 14px; }
.message-form .input { max-width: 520px; }
.message-thanks { margin-top: 20px; }
.big-heart { width: 40px; height: 40px; color: var(--pink); animation: beat 1.4s ease-in-out infinite; }

/* Regalo */
.gift { position: relative; background: linear-gradient(180deg, var(--cream) 0%, #f6cfc3 100%); padding: 110px 0 90px; overflow: hidden; }
.gift__wave { position: absolute; top: -1px; left: 0; width: 100%; height: 60px; fill: var(--cream); }
.gift__quote { font: 400 italic clamp(24px, 3.4vw, 32px)/1.3 var(--f-display); margin: 0 0 12px; }
.gift__text { color: var(--muted); margin: 0 0 24px; }
.gift__info { margin: 26px auto 0; padding: 20px 26px; background: rgba(255, 255, 255, .7); border-radius: 16px; display: inline-block; text-align: left; }
.gift__info p { margin: 6px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.gift__info span { font: 500 11px/1 var(--f-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); min-width: 60px; }
.gift__info code { font: 17px/1.3 var(--f-body); letter-spacing: .04em; }
.gift__box { position: absolute; right: max(20px, 8vw); bottom: 34px; width: 90px; height: 90px; }
.deco--flowers-gift { left: -20px; bottom: 10px; width: 230px; height: 160px; }
@media (max-width: 700px) { .gift { padding-bottom: 120px; } .gift__box { width: 60px; height: 60px; bottom: 24px; } .deco--flowers-gift { width: 150px; height: 100px; bottom: 0; } }

/* Pie */
.footer { background: var(--wine); color: var(--cream); text-align: center; padding: 50px 20px calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer__names { font: 400 44px/1 var(--f-script); margin: 0 0 14px; color: var(--pink-soft); }
.footer__tag { font: 400 13px/1 var(--f-label); letter-spacing: .3em; text-transform: uppercase; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; }
.footer__tag .sparkle { width: 12px; height: 12px; }
.footer__date { margin: 0; opacity: .7; letter-spacing: .2em; }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.rsvp__disco { animation-name: sway-c; }
@keyframes sway-c { 0%, 100% { transform: translateX(-50%) rotate(-3deg); } 50% { transform: translateX(-50%) rotate(3deg); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.fade-in { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
