/* =========================================================
   Ali & Génesis · 16 enero 2027
   Títulos: Lovely May · Subtítulos y texto: Goldenbook
   ========================================================= */

@font-face { font-family: "Lovely May"; src: url("fonts/LovelyMay.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Goldenbook"; src: url("fonts/Goldenbook Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Goldenbook"; src: url("fonts/Goldenbook Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --cream: #f1eddf;
  --green: #636246;
  --green-dark: #4a503f;
  --brown: #39342c;

  /* Goldenbook cubre ¡ ¿ y · cuando Lovely May no los tiene:
     el navegador cae a la siguiente fuente solo para esos glifos. */
  --f-title: "Lovely May", "Goldenbook", Georgia, serif;
  --f-sub: "Goldenbook", Georgia, "Times New Roman", serif;
  --f-text: "Goldenbook", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem);
  line-height: 1.75;
  color: var(--brown);
  background: var(--cream);
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
address { font-style: normal; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.container { width: min(1100px, 100% - 3rem); margin-inline: auto; }

/* ---------- Tipografía ---------- */
.eyebrow {
  font-family: var(--f-sub);
  font-size: clamp(1rem, .9rem + .5vw, 1.3rem);
  letter-spacing: .28em;
  text-transform: uppercase;
}
.title {
  font-family: var(--f-title);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.5rem + 4vw, 4.4rem);
  line-height: 1.15;
  color: var(--green-dark);
}
.subtitle { font-family: var(--f-sub); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.3; }
.lead { font-family: var(--f-sub); font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem); }
.note { margin-top: 2.5rem; text-align: center; max-width: 36rem; margin-inline: auto; font-style: italic; }

/* ---------- Secciones ---------- */
.section { padding: clamp(4.5rem, 3rem + 7vw, 9rem) 0; position: relative; }
.section__head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); display: grid; gap: .6rem; justify-items: center; }

.section--cream { background-color: var(--cream); color: var(--brown); }
.section--green { color: var(--cream); }
.section--green .title { color: var(--cream); }
.texture-cream {
  background-image: linear-gradient(rgba(241,237,223,.72), rgba(241,237,223,.72)), url("images/crema-patron.webp");
  background-size: cover; background-position: center;
}
.texture-green {
  background-color: var(--green-dark);
  background-image: linear-gradient(rgba(74,80,63,.78), rgba(74,80,63,.78)), url("images/textura-verde.webp");
  background-size: cover; background-position: center;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 2.2rem; border: 1px solid var(--green-dark); border-radius: 999px;
  background: var(--green-dark); color: var(--cream);
  font-family: var(--f-sub); font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .35s, color .35s, transform .35s var(--ease), box-shadow .35s;
}
.btn:hover { background: transparent; color: var(--green-dark); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(57,52,44,.6); }
.btn svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.btn--light { background: var(--cream); color: var(--green-dark); border-color: var(--cream); }
.btn--light:hover { background: transparent; color: var(--cream); }
.btn--ghost { background: transparent; color: var(--green-dark); }
.btn--ghost:hover { background: var(--green-dark); color: var(--cream); }

/* ---------- Animaciones de entrada (scroll) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal[data-reveal="left"] { transform: translateX(-48px); }
.js .reveal[data-reveal="right"] { transform: translateX(48px); }
.js .reveal[data-reveal="zoom"] { transform: scale(.94); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1rem, 4vw, 3rem);
  color: var(--cream); transform: translateY(-100%); transition: transform .5s var(--ease), background .4s;
}
body.is-ready .nav { transform: none; }
/* El fondo va en un pseudo-elemento: backdrop-filter en .nav atraparía el menú móvil (position: fixed) dentro de la barra */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(74,80,63,.94); backdrop-filter: blur(8px); opacity: 0; transition: opacity .4s; }
.nav.is-solid::before { opacity: 1; }
.nav__brand { font-family: var(--f-title); font-size: 1.8rem; text-decoration: none; line-height: 1; }
.nav__links { display: flex; gap: clamp(.9rem, 2vw, 2rem); }
.nav__links a { font-family: var(--f-sub); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; position: relative; padding: .3rem 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; color: inherit; cursor: pointer; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 26px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; background: var(--green-dark); flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
    opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
  }
  .nav__links a { font-size: 1.4rem; }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__brand, .nav__toggle { position: relative; z-index: 2; }
}

/* ---------- Portada ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: end center; overflow: hidden; color: var(--cream); background: var(--brown); }
.hero__media { position: absolute; inset: -8% 0; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
body.is-ready .hero__media img { animation: kenburns 18s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(57,52,44,.45) 0%, rgba(57,52,44,.25) 40%, rgba(57,52,44,.75) 100%); }
.hero__content { position: relative; z-index: 1; text-align: center; display: grid; justify-items: center; padding: 6rem 1.5rem clamp(5.5rem, 12vh, 8rem); width: min(760px, 100%); }
.hero__logo img { width: min(70vw, 460px); height: auto; filter: drop-shadow(0 4px 24px rgba(0,0,0,.35)); }
.hero__logo { opacity: 0; transform: translateY(24px); }
body.is-ready .hero__logo { animation: rise 1.4s var(--ease) .6s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__scroll { position: absolute; bottom: 1.8rem; left: 50%; z-index: 1; width: 28px; height: 46px; margin-left: -14px; border: 1.5px solid var(--cream); border-radius: 20px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--cream); border-radius: 2px; animation: scrolldot 1.8s ease-in-out infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ---------- Bienvenida ---------- */
.welcome { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.welcome__photo { overflow: hidden; border-radius: 200px 200px 6px 6px; box-shadow: 0 30px 60px -30px rgba(57,52,44,.6); }
.welcome__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.welcome__text { display: grid; gap: 1.3rem; justify-items: start; }
.welcome__crest { width: 84px; height: auto; }

/* ---------- Contador ---------- */
.countdown { text-align: center; }
.countdown .container { display: grid; gap: 2rem; justify-items: center; }
.countdown__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.6rem, 3vw, 2.5rem); width: min(780px, 100%); }
.cd { display: grid; gap: .2rem; padding: clamp(.8rem, 2vw, 1.6rem) 0; border-top: 1px solid rgba(241,237,223,.45); border-bottom: 1px solid rgba(241,237,223,.45); }
.cd__num { font-family: var(--f-title); font-size: clamp(2.6rem, 1.2rem + 6vw, 5.5rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd__num.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-8px); } }
.cd__label { font-family: var(--f-sub); letter-spacing: .22em; text-transform: uppercase; font-size: clamp(.7rem, .6rem + .5vw, 1rem); }
.countdown__date { font-family: var(--f-sub); font-size: 1.4rem; letter-spacing: .2em; }

/* ---------- Tarjetas e itinerario ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-inline: auto; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  display: grid; gap: .5rem; justify-items: center; text-align: center; text-decoration: none;
  padding: clamp(1.6rem, 3vw, 2.6rem) 1.4rem; background: rgba(251,249,241,.7); border: 1px solid rgba(74,80,63,.35); border-radius: 4px;
  outline: 1px solid rgba(74,80,63,.18); outline-offset: -9px; color: var(--brown);
  transition: transform .5s var(--ease), box-shadow .5s, background .5s;
}
a.card:hover, .card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -26px rgba(57,52,44,.6); background: #fbf9f1; }
.card h3 { font-family: var(--f-sub); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.25; color: var(--green-dark); }
.card__time { font-family: var(--f-title); font-size: clamp(2.4rem, 1.5rem + 3vw, 3.6rem); color: var(--green); line-height: 1.2; }
.card__meta { font-size: .95em; word-break: break-word; }
.card__icon { width: 54px; height: 54px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.links { display: grid; gap: .3rem; margin-top: .6rem; font-size: .95em; }
.links a { text-decoration-thickness: 1px; text-underline-offset: 4px; word-break: break-word; }
.links a:hover { color: var(--green); }
.schedule { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 3vw, 2.5rem); max-width: 760px; margin: 0 auto clamp(3rem, 6vw, 6rem); }

.venue { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; }
.venue__img { overflow: hidden; border-radius: 4px; box-shadow: 0 30px 60px -34px rgba(57,52,44,.7); }
.venue__img img { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.venue__img:hover img { transform: scale(1.04); }
.venue__info { display: grid; gap: 1.1rem; justify-items: start; }

/* ---------- Vestimenta y galería ---------- */
.dress { display: flex; justify-content: center; }
/* Galería: las 3 fotos comparten altura y se muestran completas (sin recorte) */
.gallery { display: flex; gap: 0; background: var(--brown); }
.gallery picture { display: contents; }
.gallery img { flex: var(--ar, 1) 1 0; min-width: 0; height: auto; aspect-ratio: var(--ar, 1); object-fit: cover; }

/* ---------- Hospedaje ---------- */
.card--left { align-content: start; }
.note--dark { margin-top: 3rem; }

/* ---------- Valencia ---------- */
.valencia { position: relative; overflow: hidden; color: var(--cream); padding: clamp(4.5rem, 3rem + 7vw, 9rem) 0; background: var(--green-dark); }
.valencia__bg { position: absolute; inset: -10% 0; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.valencia__bg img { width: 100%; height: 100%; object-fit: cover; }
.valencia__shade { position: absolute; inset: 0; background: rgba(57,60,45,.78); }
.valencia__inner { position: relative; }
.valencia .title { color: var(--cream); }
.reco {
  display: grid; align-content: start; gap: .1rem; padding: 0; overflow: hidden; text-decoration: none; text-align: center;
  border: 1px solid rgba(241,237,223,.45); border-radius: 4px; background: rgba(57,52,44,.25); backdrop-filter: blur(3px);
  transition: transform .5s var(--ease), background .5s, border-color .5s;
}
.reco:hover { transform: translateY(-6px); background: rgba(241,237,223,.14); border-color: var(--cream); }
.reco img { width: 100%; height: auto; aspect-ratio: 900 / 1189; object-fit: cover; margin-bottom: 1rem; transition: transform 1s var(--ease); }
.reco:hover img { transform: scale(1.04); }
.reco > span, .reco > strong, .reco > em { padding-inline: 1.2rem; }
.reco > em { padding-bottom: 1.5rem; }
.reco span { font-family: var(--f-sub); letter-spacing: .18em; text-transform: uppercase; font-size: .9rem; opacity: .85; }
.reco strong { font-family: var(--f-title); font-weight: 400; font-size: clamp(2rem, 1.5rem + 1.5vw, 2.8rem); line-height: 1.2; }
.reco em { font-style: normal; font-size: .95em; opacity: .85; }
.transport { margin-top: clamp(3rem, 6vw, 5rem); display: grid; gap: 1.4rem; justify-items: center; text-align: center; }
.transport__btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- RSVP ---------- */
.rsvp__inner { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.rsvp__img img { width: min(100%, 380px); margin-inline: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.4)); }
.rsvp__text { display: grid; gap: 1.2rem; justify-items: start; }
.btn--wa { margin-top: .6rem; }

/* ---------- Regalos ---------- */
.gifts__inner { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.gifts__text { display: grid; gap: 1.2rem; justify-items: start; }
.gifts__btns { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .6rem; }
.gifts__img img { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(57,52,44,.3)); transition: transform 1s var(--ease); }
.gifts__img:hover img { transform: rotate(-1.5deg) scale(1.02); }

/* ---------- Modal Zelle ---------- */
.modal { border: 0; border-radius: 6px; padding: 0; width: min(420px, 90vw); background: var(--cream); color: var(--brown); box-shadow: 0 40px 80px rgba(0,0,0,.45); }
.modal::backdrop { background: rgba(57,52,44,.7); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.modal form { padding: 2.4rem 2rem; display: grid; gap: 1rem; text-align: center; }
.modal h3 { font-family: var(--f-title); font-weight: 400; font-size: 2.6rem; color: var(--green-dark); line-height: 1.1; }
.modal__value { font-family: var(--f-sub); font-size: 1.4rem; padding: .8rem; border: 1px dashed var(--green); word-break: break-all; }
.modal__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.modal .btn { padding: .8rem 1.6rem; font-size: 1rem; }

/* ---------- Modal imagen (vestimenta) ---------- */
.modal--img { width: min(560px, 92vw); max-height: 92svh; overflow: auto; background: var(--cream); }
.modal--img form { padding: 0; position: relative; display: block; }
.modal--img img { width: 100%; height: auto; }
.modal--img p { padding: 3rem 2rem; font-family: var(--f-sub); font-size: 1.3rem; }
.modal__close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(74,80,63,.9); color: var(--cream); font-size: 1.7rem; line-height: 1; cursor: pointer;
  transition: transform .3s var(--ease), background .3s;
}
.modal__close:hover { transform: rotate(90deg); background: var(--brown); }

/* ---------- Pie ---------- */
.footer { text-align: center; color: var(--cream); padding: clamp(3.5rem, 8vw, 6rem) 1.5rem; display: grid; gap: .8rem; justify-items: center; }
.footer__names { width: min(70vw, 380px); height: auto; }
.footer__date { font-family: var(--f-sub); letter-spacing: .25em; text-transform: uppercase; }
.footer__small { opacity: .7; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  /* En móvil las animaciones laterales solo suben, para no ensanchar la página */
  .js .reveal[data-reveal="left"]:not(.is-visible),
  .js .reveal[data-reveal="right"]:not(.is-visible) { transform: translateY(32px); }
  .container { width: min(1100px, 100% - 2.2rem); }
  .welcome, .venue, .rsvp__inner, .gifts__inner { grid-template-columns: 1fr; }
  .welcome__photo { max-width: 360px; margin-inline: auto; }
  .welcome__text, .venue__info, .rsvp__text, .gifts__text { justify-items: center; text-align: center; }
  .welcome__text { order: 2; }
  .gifts__img { order: -1; max-width: 520px; margin-inline: auto; }
  .schedule { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .gallery { flex-direction: column; align-items: center; }
  .gallery img { flex: none; width: 100%; max-width: 560px; }
}
@media (max-width: 520px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .cd__label { letter-spacing: .1em; }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__logo { opacity: 1; transform: none; }
}
