/* ═══════════════════════════════════════════════
   CARLOS & DANIELA · 09.10.2026
   Moderno · fotos a color · Instrument Serif + Barlow
   ═══════════════════════════════════════════════ */

:root {
  --white:  #ffffff;
  --cream:  #f4f1e8;
  --off:    #eae5d7;
  --ink:    #1b211a;
  --green:  #3c4b36;
  --sage:   #6f8a67;
  --gray:   #6e7065;
  --border: #e1ddce;
  --serif: "Instrument Serif", serif;
  --sans:  "Barlow", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--white); }

/* ═══ LIQUID GLASS (spec) ═══ */
.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0)    40%,
    rgba(255,255,255,0)    60%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.liquid-glass-strong {
  background: rgba(255, 255, 255, 0.02);
  background-blend-mode: luminosity;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  border: none;
  box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.liquid-glass-strong::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.5) 0%,
    rgba(255,255,255,0.2) 20%,
    rgba(255,255,255,0)   40%,
    rgba(255,255,255,0)   60%,
    rgba(255,255,255,0.2) 80%,
    rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ═══ Animación de entrada (blur suave) ═══ */
.js [data-fade] {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(10px);
}
.js [data-fade].in {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity .8s cubic-bezier(.25,.46,.45,.94) var(--d, 0s),
    transform .8s cubic-bezier(.25,.46,.45,.94) var(--d, 0s),
    filter .8s cubic-bezier(.25,.46,.45,.94) var(--d, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-fade] { opacity: 1; transform: none; filter: none; transition: none; }
}

/* palabras del titular */
.bw {
  display: inline-block;
  margin-right: .25em;
  opacity: 0;
}
.bw:last-child { margin-right: 0; }
.js .bw.go {
  animation: blurWord .7s cubic-bezier(.25,.46,.45,.94) both;
  animation-delay: var(--wd, 0s);
}
@keyframes blurWord {
  0%   { filter: blur(10px); opacity: 0; transform: translateY(46px); }
  50%  { filter: blur(5px);  opacity: .5; transform: translateY(-5px); }
  100% { filter: blur(0);    opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bw { opacity: 1; }
  .js .bw.go { animation: none; }
}

/* ═══ NAV ═══ */
#nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: 0 clamp(1rem, 4vw, 4rem);
}
.nav-logo {
  width: 48px; height: 48px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; flex: 0 0 auto;
}
.nav-logo span {
  font-family: var(--serif); font-style: italic;
  font-size: 1.15rem; color: #fff; letter-spacing: .02em;
}
.nav-links {
  display: none;
  border-radius: 9999px;
  padding: .38rem;
  gap: .1rem;
}
.nav-links a {
  font-size: .875rem; font-weight: 500; color: rgba(255,255,255,.92);
  text-decoration: none;
  padding: .55rem .9rem; border-radius: 9999px;
  transition: background .3s ease;
}
.nav-links a:hover { background: rgba(255,255,255,.12); }
@media (min-width: 820px) { .nav-links { display: flex; } }
.nav-cta {
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff; color: var(--green);
  font-size: .875rem; font-weight: 600; text-decoration: none;
  padding: .72rem 1.25rem; border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: transform .3s ease;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta svg { width: 16px; height: 16px; }

/* nav sobre secciones blancas */
body.past-hero .nav-logo { background: var(--green); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.past-hero .nav-links {
  background: rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px var(--border);
}
body.past-hero .nav-links a { color: var(--ink); }
body.past-hero .nav-links a:hover { background: rgba(60,75,54,.08); }
body.past-hero .nav-cta { background: var(--green); color: #fff; }

/* ═══ HERO ═══ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  justify-content: center;
}
.hero-media, .hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media img { animation: heroZoom 9s cubic-bezier(.22,1,.36,1) both; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-media img { animation: none; } }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,.06) 30%, rgba(0,0,0,.12) 62%, rgba(0,0,0,.55) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 6.5rem 1.25rem 3rem;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .65rem;
  border-radius: 9999px;
  padding: .35rem;
  margin-bottom: clamp(1.4rem, 3.5vw, 2.2rem);
}
.hb-chip {
  background: #fff; color: var(--ink);
  font-size: .72rem; font-weight: 600;
  padding: .32rem .8rem; border-radius: 9999px;
  white-space: nowrap;
}
.hb-text {
  font-size: .85rem; color: rgba(255,255,255,.92);
  padding-right: .85rem; white-space: nowrap;
}
.hero-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(3.6rem, 15vw, 8.5rem);
  line-height: .92;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 14ch;
  display: flex; flex-wrap: wrap; justify-content: center;
  row-gap: .05em;
}
.hero-sub {
  margin-top: 1.2rem;
  font-size: clamp(.95rem, 2.5vw, 1.05rem); font-weight: 300;
  line-height: 1.5; color: #fff;
  max-width: 34rem;
}
.hero-ctas {
  display: flex; align-items: center; gap: .8rem;
  margin-top: 1.6rem; flex-wrap: wrap; justify-content: center;
}
.hero-stats {
  display: flex; align-items: stretch; gap: .9rem;
  margin-top: clamp(1.8rem, 4.5vw, 2.6rem);
  flex-wrap: wrap; justify-content: center;
}
.stat {
  width: 200px; border-radius: 1.25rem;
  padding: 1.15rem 1.25rem;
  text-align: left;
}
.stat-num {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 2.4rem; line-height: 1; letter-spacing: -1px;
  color: #fff;
}
.stat-num small { font-size: .55em; }
.stat-label {
  display: block; margin-top: .5rem;
  font-size: .74rem; font-weight: 300; color: rgba(255,255,255,.95);
}

/* ═══ Botones ═══ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .9rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  padding: .8rem 1.45rem; border-radius: 9999px;
  border: none;
  transition: transform .3s ease, opacity .3s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-white { background: #fff; color: var(--green); box-shadow: 0 3px 14px rgba(0,0,0,.10); }
.btn-glass { color: #fff; border-radius: 9999px; }
.btn-dark  { background: var(--green); color: #fff; }
.btn-sm { padding: .62rem 1.1rem; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; padding: 1rem; font-size: .95rem; }

/* ═══ Secciones ═══ */
.sec { padding: clamp(4.5rem, 11vw, 8rem) 0; }
.sec-tight { padding-top: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 3rem); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); text-align: center; }
.wrap-form { max-width: 620px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); text-align: center; }

.kicker {
  font-size: .8rem; font-weight: 500; color: var(--sage);
  letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.heading {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.7rem, 8.5vw, 5.2rem);
  line-height: .95; letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}
.heading em { font-style: italic; color: var(--sage); }
.body-copy {
  font-size: clamp(.98rem, 2.4vw, 1.08rem); font-weight: 300;
  line-height: 1.65; color: #3d3d39;
  max-width: 46rem;
}
.body-copy em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 1.18em; color: var(--sage);
}

/* ═══ VERSO ═══ */
.quote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  line-height: 1.18; letter-spacing: -0.015em;
}
.quote em { color: var(--sage); }
.quote-ref {
  margin-top: 1.4rem;
  font-size: .85rem; font-weight: 400; color: var(--gray);
}

/* ═══ COUNTDOWN ═══ */
.cd-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
@media (min-width: 640px) { .cd-grid { grid-template-columns: repeat(4, 1fr); } }
.cd-tile {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: clamp(1.3rem, 3.5vw, 2rem) 1rem;
  text-align: center;
  background: var(--off);
}
.cd-tile span {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2.5rem, 7.5vw, 4rem);
  line-height: 1; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.cd-tile small {
  display: block; margin-top: .55rem;
  font-size: .74rem; font-weight: 500; color: var(--gray);
  text-transform: lowercase;
}

/* ═══ EL GRAN DÍA ═══ */
.day-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: clamp(2rem, 5vw, 3.2rem);
}
@media (min-width: 820px) { .day-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.day-card {
  position: relative;
  min-height: clamp(480px, 62svh, 560px);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.4rem;
  isolation: isolate;
}
.day-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22,1,.36,1);
}
.day-card:hover .day-bg { transform: scale(1.035); }
.day-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 32%, rgba(0,0,0,.08) 55%, rgba(0,0,0,.62) 100%);
}
.day-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.day-icon {
  width: 44px; height: 44px; border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.day-icon svg { width: 22px; height: 22px; color: #fff; fill: currentColor; }
.day-tags {
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: .4rem; max-width: 70%;
}
.tag {
  border-radius: 9999px;
  padding: .3rem .8rem;
  font-size: .72rem; font-weight: 400; color: rgba(255,255,255,.94);
  white-space: nowrap;
}
.day-info h3 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 2.7rem); line-height: 1;
  letter-spacing: -1px; color: #fff;
  margin-bottom: .7rem;
}

/* ── Variante boceto (Ceremonia) ── */
.day-card--sketch {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0;
  justify-content: flex-start;
}
.sketch-window {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem 1.2rem 0;
  background:
    radial-gradient(120% 90% at 50% 0%, #fbf9f4 0%, #f2ede3 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.sketch-img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; }
.sketch-tags {
  position: absolute; top: 1rem; right: 1rem;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem;
  max-width: 72%;
}
.tag-ink {
  background: rgba(23,20,15,.05);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 9999px;
  padding: .3rem .8rem;
  font-size: .72rem; white-space: nowrap;
}
.day-info--ink { padding: 1.5rem 1.5rem 1.6rem; }
.day-info--ink h3 { color: var(--ink); }
.day-info--ink .day-place { color: var(--ink); }
.day-info--ink .day-addr { color: var(--gray); }
.btn-outline {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--border);
}
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.day-place {
  font-size: 1rem; font-weight: 500; color: #fff;
  margin-bottom: .25rem;
}
.day-addr {
  font-size: .85rem; font-weight: 300; color: rgba(255,255,255,.85);
  margin-bottom: 1.1rem;
}
.day-hall {
  font-family: var(--serif); font-style: italic;
  font-size: 1.15rem; line-height: 1.1;
  color: var(--sage);
  margin-top: -.1rem; margin-bottom: .35rem;
}
.day-btns { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ═══ VESTIMENTA ═══ */
.vest-grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(1.8rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 860px) { .vest-grid { grid-template-columns: 1.05fr .95fr; } }
.vest-text .body-copy { margin-bottom: 1.5rem; }
.vest-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
#vestimenta .body-copy { margin: 0 auto 1.6rem; }
#vestimenta .vest-chips { justify-content: center; }
.chip {
  border: 1px solid var(--border);
  background: var(--off);
  border-radius: 9999px;
  padding: .55rem 1.1rem;
  font-size: .82rem; font-weight: 500; color: var(--ink);
  white-space: nowrap;
}
.chip-dark { background: var(--green); color: #fff; border-color: var(--green); }
.vest-photo {
  border-radius: 1.25rem; overflow: hidden;
  aspect-ratio: 4 / 4.6;
  max-width: 520px; width: 100%;
  margin: 0 auto;
}
.vest-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ GALERÍA ═══ */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
  margin-top: clamp(2rem, 5vw, 3.2rem);
}
@media (min-width: 720px) { .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.gal-item {
  aspect-ratio: 4 / 5;
  border-radius: 1rem; overflow: hidden;
  cursor: pointer;
}
.gal-item img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
  transition: transform .9s cubic-bezier(.22,1,.36,1);
}
.gal-item:hover img { transform: scale(1.04); }

/* Lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(8, 8, 8, .95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lbImg { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: .75rem; }
#lightbox button {
  position: absolute; background: rgba(255,255,255,.08); border: none; cursor: pointer;
  color: #fff; font-family: var(--sans); font-weight: 300;
  width: 44px; height: 44px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lb-close { top: 1rem; right: 1rem; font-size: 1.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 1.15rem; }
.lb-prev { left: clamp(.5rem, 3vw, 1.6rem); }
.lb-next { right: clamp(.5rem, 3vw, 1.6rem); }

/* ═══ RSVP ═══ */
.rsvp-note { margin: 0 auto 2rem; }
.rsvp-note strong { font-weight: 600; }
#rsvpForm {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: clamp(1.4rem, 4.5vw, 2.2rem);
}
.field { margin-bottom: 1.25rem; }
.field > label {
  display: block;
  font-size: .8rem; font-weight: 600; color: var(--ink);
  margin-bottom: .5rem;
}
.field > label i { font-style: normal; font-weight: 400; color: var(--gray); }
.field input {
  width: 100%;
  font-family: var(--sans); font-size: 1rem; font-weight: 400;
  color: var(--ink);
  background: var(--off);
  border: 1.5px solid transparent;
  border-radius: .9rem;
  padding: .9rem 1.05rem;
  outline: none;
  transition: border-color .25s ease, background .25s ease;
}
.field input::placeholder { color: #a3a29c; }
.field input:focus { border-color: var(--ink); background: #fff; }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .9rem; font-weight: 500; color: var(--ink);
  background: var(--off);
  border: 1.5px solid var(--border);
  border-radius: .9rem;
  padding: .95rem .6rem;
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, color .25s ease;
}
.choice svg { width: 15px; height: 15px; opacity: 0; transition: opacity .25s ease; }
.choice input:checked + span {
  background: var(--green); border-color: var(--green); color: #fff;
}
.choice input:checked + span svg { opacity: 1; }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.btn-loader { display: none; }
.btn.loading .btn-text { display: none; }
.btn.loading .btn-loader { display: inline; }

#rsvpSuccess { display: none; padding: 2.2rem 0 .6rem; }
#rsvpSuccess.show { display: block; }
#rsvpSuccess h3 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 2.1rem; margin-bottom: .6rem;
}
#rsvpSuccess p { font-size: 1rem; font-weight: 300; line-height: 1.6; color: #3d3d39; }
#msgNo { display: none; }

/* ═══ FOOTER ═══ */
#footer {
  background: var(--green); color: #fff;
  text-align: center;
  padding: clamp(3.6rem, 9vw, 5.5rem) 1.25rem calc(2.4rem + env(safe-area-inset-bottom, 0px));
}
.foot-names {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2.6rem, 9vw, 4.5rem); line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.foot-names em { color: rgba(255,255,255,.55); }
.foot-date {
  font-size: .82rem; font-weight: 400; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.75);
  margin-bottom: .8rem;
}
.foot-verse {
  font-family: var(--serif); font-style: italic;
  font-size: 1rem; color: rgba(255,255,255,.5);
}
