/* =========================================================
   XV Años · Isabella & Lyzander
   Paleta tomada de la sesión: crema del vestido, puntos negros,
   ladrillo/terracota, piedra, verde jardín y rosa bugambilia.
   ========================================================= */

:root {
  color-scheme: light;
  --paper: #f8f3ea;
  --cream: #f1e9db;
  --sand: #e4d7c3;
  --ink: #221d19;
  --ink-soft: #5b5047;
  --stone: #8c7b6a;
  --terra: #a8583f;
  --terra-deep: #8a4430;
  --sage: #66724f;
  --rose: #c45a7c;
  --line: rgba(34, 29, 25, .14);

  --f-script: "Pinyon Script", "Snell Roundhand", cursive;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-sans: "Jost", system-ui, sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(.22, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: clamp(18px, 1.15vw + 12px, 21px);
  line-height: 1.6;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--terra); color: var(--paper); }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.script { font-family: var(--f-script); font-weight: 400; line-height: 1; }

.eyebrow {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 14px;
}

.sec-head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-title {
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -.01em;
}
.sec-title em { font-style: italic; color: var(--terra); }
.sec-sub { color: var(--ink-soft); margin: 16px 0 0; }

/* Patrón de puntos — guiño al vestido */
.dots {
  background-color: var(--cream);
  background-image: radial-gradient(rgba(34, 29, 25, .085) 1.6px, transparent 1.9px);
  background-size: 26px 26px;
}

/* Arco — motivo de la hacienda */
.arch {
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  aspect-ratio: 3 / 4.3;
  background: var(--sand);
  box-shadow: 0 30px 60px -30px rgba(60, 35, 20, .45);
}
.arch img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.arch:hover img { transform: scale(1.04); }
.arch--tall { aspect-ratio: 3 / 4.6; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-sans);
  font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  padding: 16px 30px;
  border-radius: 999px;
  border: 1px solid var(--terra);
  color: var(--terra);
  background: transparent;
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { background: var(--terra); color: var(--paper); transform: translateY(-2px); }
.btn--solid { background: var(--terra); color: var(--paper); }
.btn--solid:hover { background: var(--terra-deep); border-color: var(--terra-deep); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* Reveal — visible por defecto; JS lo oculta solo si puede animarlo */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* ================= NAV ================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  color: var(--paper);
  transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s, transform .5s var(--ease);
}
.nav.is-solid {
  background: rgba(248, 243, 234, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand { font-family: var(--f-script); font-size: 30px; text-decoration: none; line-height: 1; }
.nav__brand span { font-size: .75em; color: var(--terra); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-family: var(--f-sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; position: relative; padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { border: 1px solid currentColor; border-radius: 999px; padding: 8px 18px !important; }
.nav__cta::after { display: none; }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: end center;
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 50% 45%; animation: kenburns 14s var(--ease) both; }
@keyframes kenburns { from { transform: scale(1.14); } to { transform: scale(1.02); } }
.hero__veil {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(25, 18, 12, .45) 0%, rgba(25, 18, 12, 0) 26%),
    linear-gradient(0deg, rgba(25, 18, 12, .82) 0%, rgba(25, 18, 12, .35) 38%, rgba(25, 18, 12, 0) 62%);
}
.hero__content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0 var(--gutter) clamp(90px, 13vh, 140px);
}
.hero__eyebrow { color: var(--paper); opacity: .85; animation: rise 1.2s .3s var(--ease) both; }
.hero__xv {
  font-family: var(--f-serif); font-weight: 300;
  font-size: clamp(54px, 9vw, 120px); line-height: .9; letter-spacing: .04em;
  margin: 0;
  animation: rise 1.3s .45s var(--ease) both;
}
.hero__xv em { font-style: italic; font-size: .55em; letter-spacing: 0; }
.hero__names {
  margin: 10px 0 22px;
  font-weight: 400;
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 .3em;
  font-size: clamp(58px, 10vw, 150px);
  line-height: 1.05;
}
.hero__names .script { animation: rise 1.4s .7s var(--ease) both; text-shadow: 0 4px 30px rgba(0,0,0,.25); }
.hero__names .script:last-child { animation-delay: .95s; }
.hero__amp { font-family: var(--f-serif); font-style: italic; font-weight: 300; font-size: .45em; color: #f0c9b4; animation: rise 1.4s .85s var(--ease) both; }
.hero__date {
  font-family: var(--f-sans); font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin: 0;
  animation: rise 1.2s 1.2s var(--ease) both;
}
.hero__sep { width: 36px; height: 1px; background: currentColor; opacity: .7; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero__scroll {
  position: absolute; z-index: 1; bottom: 26px; left: 50%; translate: -50% 0;
  width: 24px; height: 40px; border: 1px solid rgba(255,255,255,.7); border-radius: 20px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--paper); border-radius: 2px; animation: wheel 1.8s infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ================= BIENVENIDA ================= */
.welcome { padding: clamp(90px, 13vw, 170px) 0; text-align: center; }
.ornament { width: 96px; color: var(--terra); margin: 0 auto 34px; }
.lead {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 300; line-height: 1.45;
  margin: 0 auto;
}
.lead--accent { font-style: italic; color: var(--terra); margin-top: 26px; }

/* ================= CUENTA REGRESIVA ================= */
.countdown { padding: clamp(80px, 10vw, 130px) 0; text-align: center; }
.countdown__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 28px);
  max-width: 760px; margin: 0 auto 44px;
}
.cd {
  background: var(--paper);
  border-radius: 999px 999px 10px 10px;
  padding: clamp(26px, 4vw, 44px) 6px clamp(16px, 2.5vw, 26px);
  box-shadow: 0 18px 40px -26px rgba(60, 35, 20, .5);
}
.cd__num {
  display: block;
  font-size: clamp(40px, 6vw, 76px); font-weight: 300; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd__num.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: .3; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.cd__lbl {
  display: block; margin-top: 10px;
  font-family: var(--f-sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--stone);
}
.countdown__done { font-family: var(--f-script); font-size: clamp(48px, 7vw, 80px); color: var(--terra); margin: 0 0 30px; }

/* ================= FESTEJADOS ================= */
.twins { padding: clamp(90px, 12vw, 160px) 0; }
.twins__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 6vw, 110px);
  max-width: 900px; margin: 0 auto;
}
.twin { margin: 0; text-align: center; }
.twin--offset { margin-top: clamp(40px, 9vw, 120px); }
.twin figcaption { margin-top: 22px; }
.twin__name { font-size: clamp(46px, 6vw, 84px); color: var(--ink); }

/* ================= FAMILIA ================= */
.family {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 680px;
  background: var(--ink);
}
.family__photo { position: relative; overflow: hidden; }
.family__photo img { position: absolute; inset: 0; width: 100%; height: 115%; object-fit: cover; object-position: 50% 62%; will-change: transform; }
.family__card {
  align-self: center;
  margin: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 80px) clamp(40px, 6vw, 80px) calc(-1 * clamp(40px, 7vw, 120px));
  position: relative; z-index: 1;
  background: var(--paper);
  padding: clamp(40px, 5vw, 70px) clamp(28px, 4vw, 60px);
  text-align: center;
  border-radius: 280px 280px 8px 8px;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.6);
}
.family__intro { font-style: italic; color: var(--ink-soft); margin: 30px auto 36px; max-width: 26ch; line-height: 1.4; font-size: clamp(20px, 1.8vw, 24px); }
.family__block .eyebrow { margin-bottom: 12px; }
.family__name { margin: 0; font-size: clamp(22px, 2vw, 28px); line-height: 1.35; }
.family__dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin: 32px auto; box-shadow: -18px 0 0 -1px var(--stone), 18px 0 0 -1px var(--stone); }

/* ================= RECEPCIÓN ================= */
.venue { padding: clamp(90px, 12vw, 160px) 0; }
.venue__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.venue__img .arch { max-width: 440px; margin-inline: auto; }
.venue__time { display: flex; align-items: baseline; gap: 14px; margin: 26px 0 4px; }
.venue__hour { font-size: clamp(72px, 9vw, 120px); font-weight: 300; line-height: 1; color: var(--terra); letter-spacing: -.02em; }
.venue__hlbl { font-family: var(--f-sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--stone); }
.venue__date { margin: 0 0 30px; font-style: italic; color: var(--ink-soft); }
.venue__map {
  margin-top: 34px;
  border-radius: 10px; overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--sand);
  box-shadow: 0 20px 50px -30px rgba(60, 35, 20, .5);
}
.venue__map iframe { width: 100%; height: 100%; border: 0; filter: sepia(.25) saturate(.85); }

/* ================= DETALLES ================= */
.details { padding: clamp(80px, 10vw, 130px) 0; }
.details__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); max-width: 980px; }
.detail {
  text-align: center;
  padding: clamp(40px, 5vw, 60px) clamp(24px, 3vw, 44px);
  border: 1px solid var(--line);
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
}
.detail svg { width: 44px; color: var(--terra); margin: 18px auto 18px; }
.detail h3 { font-weight: 400; font-size: clamp(30px, 3vw, 40px); margin: 0 0 10px; line-height: 1.1; }
.detail p:last-child { color: var(--ink-soft); margin: 0; }

/* ================= FRANJA ================= */
.band { position: relative; height: clamp(320px, 60vh, 620px); overflow: hidden; display: grid; place-items: center; }
.band__img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; will-change: transform; }
.band::after { content: ""; position: absolute; inset: 0; background: rgba(25, 18, 12, .28); }
.band__text { position: relative; z-index: 1; color: var(--paper); font-size: clamp(90px, 18vw, 260px); margin: 0; text-shadow: 0 6px 40px rgba(0,0,0,.3); }

/* ================= GALERÍA ================= */
.gallery { padding: clamp(90px, 12vw, 160px) 0; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 17vw, 230px);
  grid-auto-flow: dense;
  gap: clamp(8px, 1.2vw, 16px);
}
.g { position: relative; overflow: hidden; border-radius: 6px; background: var(--sand); cursor: zoom-in; }
.g--wide { grid-column: span 2; grid-row: span 2; }
.g--tall { grid-row: span 2; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.g:hover img { transform: scale(1.06); }
.g::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(25,18,12,.25));
  opacity: 0; transition: opacity .5s;
}
.g:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 15, 11, .95);
  display: grid; place-items: center;
  padding: 60px 16px;
  animation: fade .35s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb__img { max-width: min(1400px, 100%); max-height: calc(100svh - 120px); object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb__close, .lb__nav {
  position: absolute; background: none; border: 0; color: var(--paper); cursor: pointer;
  font-family: var(--f-serif); font-weight: 300; line-height: 1; opacity: .8; transition: opacity .3s;
}
.lb__close:hover, .lb__nav:hover { opacity: 1; }
.lb__close { top: 14px; right: 20px; font-size: 46px; }
.lb__nav { top: 50%; translate: 0 -50%; font-size: 64px; padding: 20px; }
.lb__prev { left: 4px; }
.lb__next { right: 4px; }
.lb__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; margin: 0; color: var(--sand); font-family: var(--f-sans); font-size: 12px; letter-spacing: .25em; }

/* ================= CONFIRMAR ================= */
.rsvp { padding: clamp(90px, 12vw, 160px) 0; }
.rsvp__form {
  background: var(--paper);
  padding: clamp(28px, 5vw, 56px);
  border-radius: 10px;
  box-shadow: 0 30px 70px -40px rgba(60, 35, 20, .55);
  display: grid; gap: 22px;
}
.field { display: grid; gap: 8px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend {
  font-family: var(--f-sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); padding: 0;
}
.field small { text-transform: none; letter-spacing: 0; }
.field input[type="text"], .field select, .field textarea {
  font: inherit; font-size: 20px; color: var(--ink);
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  padding: 8px 2px; border-radius: 0;
  transition: border-color .3s;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238c7b6a' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--terra); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.choice { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.choice legend { width: 100%; margin-bottom: 8px; }
.choice label { display: inline-flex; gap: 8px; align-items: center; font-size: 20px; cursor: pointer; }
.choice input { accent-color: var(--terra); width: 18px; height: 18px; }
.form-error { color: var(--terra-deep); margin: 0; font-style: italic; }
.rsvp__form .btn { justify-self: center; margin-top: 8px; }

/* ================= FOOTER ================= */
.footer { position: relative; min-height: 90svh; display: grid; place-items: center; text-align: center; color: var(--paper); overflow: hidden; }
.footer__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.footer__veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(25,18,12,.85), rgba(25,18,12,.35)); }
.footer__content { position: relative; z-index: 1; padding: 0 var(--gutter); }
.footer .eyebrow { color: #f0c9b4; }
.footer__names { font-size: clamp(64px, 11vw, 150px); margin: 0 0 16px; }
.footer__line { font-family: var(--f-sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; opacity: .85; margin: 0; }
.footer__credit { position: absolute; bottom: 16px; left: 0; right: 0; margin: 0; font-family: var(--f-sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .55; z-index: 1; }

/* Botón flotante (móvil) */
.fab {
  position: fixed; z-index: 40; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: none;
  font-family: var(--f-sans); font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  background: var(--terra); color: var(--paper);
  padding: 14px 26px; border-radius: 999px;
  box-shadow: 0 14px 30px -10px rgba(120, 50, 30, .6);
  transition: opacity .4s, transform .4s var(--ease);
  white-space: nowrap;
}
.fab.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .family { grid-template-columns: 1fr; min-height: 0; }
  .family__photo { height: 62vw; min-height: 300px; }
  .family__card { margin: -110px 16px 56px; border-radius: 220px 220px 8px 8px; }
  .venue__grid { grid-template-columns: 1fr; }
  .venue__info { text-align: center; }
  .venue__time { justify-content: center; }
  .details__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .g--wide { grid-column: span 2; grid-row: span 1; }
  .g--tall { grid-row: span 2; }
}
@media (max-width: 700px) {
  .fab { display: inline-block; }
  .nav { padding-block: 12px; }
  .nav__cta { display: none; }
  .hero__content { padding-bottom: 96px; }
  .hero__date { gap: 10px; font-size: 12px; }
  .twins__grid { gap: 14px; }
  .twin--offset { margin-top: 56px; }
  .countdown__grid { gap: 8px; }
  .cd { padding-inline: 2px; }
  .cd__lbl { font-size: 9px; letter-spacing: .14em; }
  .field-row { grid-template-columns: 1fr; }
  .lb__nav { font-size: 44px; padding: 10px; }
  .footer { padding-bottom: 60px; }
}

/* Movimiento reducido: solo apagamos lo intrusivo */
@media (prefers-reduced-motion: reduce) {
  .hero__media img { animation: none; }
  .hero__scroll span { animation: none; }
}

/* Móvil: textos del hero arriba para dejar ver a los festejados */
@media (max-width: 700px) {
  .hero { place-items: start center; }
  .hero__content { padding: calc(84px + env(safe-area-inset-top)) 16px 0; }
  .hero__veil {
    background:
      linear-gradient(180deg, rgba(25, 18, 12, .82) 0%, rgba(25, 18, 12, .5) 34%, rgba(25, 18, 12, 0) 56%),
      linear-gradient(0deg, rgba(25, 18, 12, .45) 0%, rgba(25, 18, 12, 0) 22%);
  }
  .hero__names { font-size: 64px; margin: 6px 0 16px; }
  .hero__xv { font-size: 58px; }
  .family__photo { height: 118vw; }
  .family__photo img { object-position: 50% 80%; }
  .family__card { margin-top: -70px; }
}
.rsvp__form .btn { white-space: nowrap; }
.field input, .field select, .cd__num, .venue__hour { font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 700px) { .rsvp__form .btn { letter-spacing: .12em; padding-inline: 22px; width: 100%; } }
