/* ═══════════════════════════════════════════════════
   SABRINA & CAMILO — Sitio de boda
   Paleta: marfil #F7F4EE · perla #FFFFFF · dorado #B6A16A
           salvia #A5AC93 · gris cálido #858174 · carbón #222222
   ═══════════════════════════════════════════════════ */

:root {
  --ivory:      #F7F4EE;
  --pearl:      #FFFFFF;
  --gold:       #B6A16A;
  --gold-soft:  #CDBD92;
  --sage:       #A5AC93;
  --sage-deep:  #8B9378;
  --warm-gray:  #858174;
  --charcoal:   #222222;
  --ink:        #3A382F;

  --font-script: 'Great Vibes', cursive;
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Montserrat', 'Helvetica Neue', sans-serif;

  --ease: cubic-bezier(.22,.61,.21,1);
  --shadow-soft: 0 18px 50px -18px rgba(34,34,34,.18);
}

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

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

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

::selection { background: var(--gold); color: var(--pearl); }

/* ─────────── Navegación ─────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background .45s var(--ease), box-shadow .45s var(--ease), padding .45s var(--ease);
}
.nav--scrolled {
  background: rgba(247,244,238,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(182,161,106,.25);
  padding-block: .7rem;
}
.nav__brand {
  font-family: var(--font-script);
  font-size: 1.7rem; color: var(--ivory);
  text-decoration: none; letter-spacing: .04em;
  transition: color .45s var(--ease);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.nav__brand span { color: var(--gold-soft); }
.nav--scrolled .nav__brand { color: var(--charcoal); text-shadow: none; }
.nav--scrolled .nav__brand span { color: var(--gold); }

.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.2rem); align-items: center; }
.nav__links a {
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; color: var(--ivory);
  transition: color .3s var(--ease), opacity .3s var(--ease);
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.nav--scrolled .nav__links a { color: var(--warm-gray); text-shadow: none; }
.nav__links a:hover { color: var(--gold-soft); }
.nav--scrolled .nav__links a:hover { color: var(--gold); }
.nav__cta {
  border: 1px solid currentColor; border-radius: 999px;
  padding: .55em 1.4em;
}
.nav__toggle {
  display: none; flex-direction: column; gap: 6px;
  background: none; border: 0; cursor: pointer; padding: .5rem;
}
.nav__toggle span {
  width: 24px; height: 1.5px; background: var(--ivory);
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.nav--scrolled .nav__toggle span { background: var(--charcoal); }
.nav--open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav--open .nav__toggle span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

/* ─────────── Portada ─────────── */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center;
  overflow: hidden; background: var(--charcoal);
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 50% 18%; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,20,18,.42) 0%, rgba(20,20,18,.12) 30%, rgba(20,20,18,.18) 62%, rgba(20,20,18,.62) 100%);
}
.hero__content {
  position: relative; z-index: 2; text-align: center;
  padding: 6rem 1.5rem 5rem; color: var(--ivory);
}
.hero__eyebrow {
  font-size: .72rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 1.2rem;
}
.hero__names {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  line-height: 1.1; text-shadow: 0 2px 30px rgba(0,0,0,.45);
}
.hero__amp { color: var(--gold-soft); font-size: .62em; }
.hero__quote {
  margin-top: 1.6rem;
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: rgba(247,244,238,.92); letter-spacing: .02em;
  text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .8rem;
  text-decoration: none;
}
.hero__scroll-line {
  width: 1px; height: 52px; background: var(--gold-soft);
  transform-origin: top; animation: scrollPulse 2.4s var(--ease) infinite;
}
.hero__scroll-text {
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(247,244,238,.85);
}
@keyframes scrollPulse {
  0%   { transform: scaleY(0); opacity: 0; }
  35%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(14px); opacity: 0; }
}

/* ─────────── Secciones base ─────────── */
.section { padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 6vw, 3rem); }
.section--light { background: var(--pearl); }
.section--ivory { background: var(--ivory); }
.section--sage  { background: linear-gradient(160deg, #EDEFE7 0%, #E3E7DA 100%); }
.section__title {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  color: var(--charcoal); line-height: 1.2;
}
.section__subtitle {
  margin-top: .9rem; font-family: var(--font-serif); font-style: italic;
  color: var(--warm-gray); font-size: 1.1rem;
}
.ornament { width: 120px; color: var(--gold); margin-bottom: 1.4rem; }

/* Animación de aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal--visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ─────────── 2 · Fe ─────────── */
.fe__inner, .versiculo__inner, .rsvp__inner {
  max-width: 46rem; margin-inline: auto; text-align: center;
}
.fe__text { margin-top: 2rem; display: grid; gap: 1.3rem; }
.fe__text p, .etapa__text p, .invitacion__text p, .rsvp__inner .section__subtitle { font-size: 1.02rem; color: #54524a; }
.fe__text p:first-child::first-letter { /* detalle editorial sutil */
  font-family: var(--font-serif); font-size: 1.15em; color: var(--gold);
}

/* ─────────── 3 · Versículo ─────────── */
.versiculo__seal { width: clamp(150px, 26vw, 200px); margin: 0 auto 2.2rem; color: var(--gold); }
.versiculo__seal svg { width: 100%; height: auto; }
.versiculo__seal-text {
  font-family: var(--font-sans); font-size: 10.5px; letter-spacing: 3.2px;
  fill: var(--gold);
}
.versiculo__branch { animation: branchSway 7s ease-in-out infinite alternate; transform-origin: 100px 140px; }
@keyframes branchSway { from { transform: rotate(-1.2deg);} to { transform: rotate(1.2deg);} }
.versiculo__quote { margin: 0 0 2rem; }
.versiculo__verse {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  color: var(--charcoal); line-height: 1.25;
}
.versiculo__ref {
  display: block; margin-top: 1.1rem;
  font-family: var(--font-sans); font-style: normal;
  font-size: .78rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold);
}
.versiculo__reflection {
  max-width: 38rem; margin-inline: auto;
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.12rem; color: var(--warm-gray);
}

/* ─────────── 4 · Historia ─────────── */
.historia .section__title, .historia .section__subtitle { text-align: center; }
.timeline {
  max-width: 62rem; margin: 4rem auto 0;
  display: grid; gap: clamp(3rem, 7vw, 5rem);
}
.timeline__item {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
}
.timeline__item--reverse .timeline__photo { order: 2; }
.timeline__photo {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 2px; box-shadow: var(--shadow-soft);
  background:
    radial-gradient(120% 120% at 20% 10%, #EFEBE0 0%, #E4DFD1 55%, #D8D2C0 100%);
  display: grid; place-items: center;
  border: 1px solid rgba(182,161,106,.3);
}
.timeline__photo-tag {
  font-family: var(--font-script); font-size: 2.2rem; color: var(--gold);
  opacity: .85;
}
.timeline__photo figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: .9rem 1.2rem;
  font-family: var(--font-serif); font-style: italic; font-size: .95rem;
  color: var(--warm-gray); background: linear-gradient(transparent, rgba(247,244,238,.9));
}
.timeline__text h3 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 1.55rem; color: var(--charcoal); margin-bottom: .8rem;
}
.timeline__text p { color: #54524a; font-size: .98rem; }

/* ─────────── 5 · Nueva etapa ─────────── */
.etapa__inner {
  max-width: 44rem; margin-inline: auto; text-align: center; position: relative;
}
.etapa__branch { width: 46px; color: var(--sage-deep); margin: 0 auto 1.6rem; opacity: .8; }
.section__title--light { color: #3F4436; }
.etapa__text { margin-top: 1.8rem; display: grid; gap: 1.2rem; }

/* ─────────── 6 · Invitación ─────────── */
.invitacion__card {
  position: relative; max-width: 44rem; margin-inline: auto;
  background: var(--pearl); padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center; box-shadow: var(--shadow-soft);
}
.invitacion__frame {
  position: absolute; inset: 14px; pointer-events: none;
  border: 1px solid rgba(182,161,106,.55);
}
.invitacion__frame::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(182,161,106,.28);
}
.invitacion__eyebrow {
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.6rem;
}
.invitacion__text { margin-top: 1.8rem; display: grid; gap: 1.1rem; }
.invitacion__names {
  margin-top: 2.6rem;
  font-family: var(--font-script); font-size: clamp(2.6rem, 7vw, 3.8rem);
  color: var(--charcoal); line-height: 1.15;
}
.invitacion__names span { color: var(--gold); font-size: .7em; }
.invitacion__meta {
  margin-top: 1.2rem;
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.12rem; color: var(--warm-gray); letter-spacing: .04em;
}

/* ─────────── 7 · RSVP ─────────── */
.rsvp__inner { max-width: 34rem; }
.rsvp__form { margin-top: 2.6rem; text-align: left; display: grid; gap: 1.6rem; }
.field { border: 0; display: grid; gap: .5rem; }
.field label, .field legend {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--charcoal); font-weight: 400;
}
.field label small, .field legend small { text-transform: none; letter-spacing: .02em; color: var(--warm-gray); }
.field input[type="text"], .field select, .field textarea {
  width: 100%; padding: .9rem 1rem;
  background: var(--ivory); border: 1px solid #DDD6C4; border-radius: 2px;
  font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182,161,106,.15);
}
.field textarea { resize: vertical; min-height: 6rem; }
.field--invalid input, .field--invalid select { border-color: #B4654A; }
.field__error { font-size: .8rem; color: #A0522D; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.choice__option input { position: absolute; opacity: 0; pointer-events: none; }
.choice__card {
  display: block; padding: 1rem .8rem; text-align: center;
  border: 1px solid #DDD6C4; border-radius: 2px; background: var(--ivory);
  font-size: .92rem; cursor: pointer; transition: all .3s var(--ease);
}
.choice__option input:checked + .choice__card {
  border-color: var(--gold); background: rgba(182,161,106,.1);
  color: var(--charcoal); box-shadow: 0 0 0 1px var(--gold);
}
.choice__option input:focus-visible + .choice__card { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn {
  justify-self: center; margin-top: .4rem;
  padding: 1rem 2.8rem; cursor: pointer;
  background: var(--charcoal); color: var(--ivory);
  border: 1px solid var(--charcoal); border-radius: 999px;
  font-family: var(--font-sans); font-size: .74rem; letter-spacing: .26em; text-transform: uppercase;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
  display: inline-flex; align-items: center; gap: .8rem;
}
.btn:hover { background: transparent; color: var(--charcoal); transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn__spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(247,244,238,.35); border-top-color: var(--ivory);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.rsvp__status {
  font-size: .92rem; line-height: 1.6; border-radius: 2px; padding: 0;
  max-height: 0; overflow: hidden; transition: max-height .5s var(--ease), padding .5s var(--ease);
}
.rsvp__status--visible { padding: 1.1rem 1.3rem; max-height: 300px; }
.rsvp__status--ok    { background: rgba(165,172,147,.18); color: #4A5340; border: 1px solid rgba(139,147,120,.45); }
.rsvp__status--error { background: rgba(180,101,74,.1);  color: #8A4A32; border: 1px solid rgba(180,101,74,.4); }
.rsvp__status--info  { background: rgba(182,161,106,.12); color: #6E5F38; border: 1px solid rgba(182,161,106,.45); }

/* ─────────── 8 · Cierre ─────────── */
.cierre {
  background: var(--ivory);
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  min-height: 78vh;
}
.cierre__photo { overflow: hidden; }
.cierre__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cierre__content {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}
.cierre__names {
  font-family: var(--font-script); font-size: clamp(2.8rem, 6vw, 4.2rem);
  color: var(--charcoal); line-height: 1.15;
}
.cierre__verse {
  margin-top: 1.6rem; font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem); color: #54524a;
}
.cierre__ref {
  margin-top: .8rem; font-size: .72rem; letter-spacing: .32em;
  text-transform: uppercase; color: var(--gold);
}
.cierre__final {
  margin-top: 1.8rem; max-width: 26rem;
  font-family: var(--font-serif); font-size: 1.05rem; color: var(--warm-gray);
}
.ornament--gold { margin-top: 2rem; }

/* ─────────── Footer ─────────── */
.footer {
  background: var(--charcoal); color: rgba(247,244,238,.85);
  text-align: center; padding: 3rem 1.5rem 2.4rem;
}
.footer p:first-child { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; }
.footer__small {
  margin-top: .9rem; font-size: .68rem; letter-spacing: .24em;
  text-transform: uppercase; color: rgba(247,244,238,.45);
}

/* ─────────── Música ─────────── */
.music-toggle {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: rgba(34,34,34,.85); color: var(--gold-soft);
  border: 1px solid rgba(182,161,106,.5);
  display: grid; place-items: center;
  transition: background .3s var(--ease), transform .3s var(--ease);
  backdrop-filter: blur(6px);
}
.music-toggle:hover { transform: scale(1.06); }
.music-toggle svg { width: 22px; height: 22px; }
.music-toggle[aria-pressed="true"] { background: var(--gold); color: var(--charcoal); }
.music-toggle[aria-pressed="true"] .music-toggle__waves { opacity: 1; }

/* ─────────── Responsive ─────────── */
@media (max-width: 860px) {
  .cierre { grid-template-columns: 1fr; }
  .cierre__photo { max-height: 52vh; }
}
@media (max-width: 767px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 2.2rem;
    background: rgba(247,244,238,.98);
    opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
  }
  .nav--open .nav__links { opacity: 1; pointer-events: auto; }
  .nav__links a, .nav--scrolled .nav__links a { color: var(--charcoal); text-shadow: none; font-size: .85rem; }
  .nav--open .nav__toggle span { background: var(--charcoal); }

  .timeline__item { grid-template-columns: 1fr; }
  .timeline__item--reverse .timeline__photo { order: 0; }
  .choice { grid-template-columns: 1fr; }
  .hero__media img { object-position: 50% 12%; }
}

@media (min-width: 768px) {
  .hero__content { padding-top: 4rem; }
}
