/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .6rem 1rem; z-index: 100; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 2.5rem); }
.block { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.block:nth-of-type(even) { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }

/* ---------- Cabecera ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: transparent; transition: background .3s, box-shadow .3s, padding .3s;
}
/* Sobre una portada con foto la barra es transparente: un degradado suave
   garantiza que el texto se lea sea cual sea la imagen. */
.hero-media .topbar:not(.solid) { color: #fff; }
.hero-media .topbar:not(.solid)::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.38), rgba(0,0,0,0));
}
.hero-media .topbar:not(.solid) .brand,
.hero-media .topbar:not(.solid) .nav a { text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.hero-media .topbar:not(.solid) .nav.open a { text-shadow: none; }
.hero-media .topbar:not(.solid) .nav a { color: rgba(255,255,255,.85); }
.hero-media .topbar:not(.solid) .nav a:hover { color: #fff; }
.hero-media .topbar:not(.solid) .nav.open a { color: var(--muted); }
.hero-media .topbar:not(.solid) .nav.open a:hover { color: var(--accent); }
.topbar.solid {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 10%, transparent);
}
.brand { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: .06em; text-decoration: none; }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.nav a:hover { color: var(--accent); }
.burger { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: inherit; }
.burger span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 4px 0; transition: .25s; }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 3.6rem 0 auto 0; flex-direction: column; gap: 0; align-items: center;
    background: var(--bg); padding: 1.2rem 0 2rem; display: none;
    box-shadow: 0 12px 24px rgba(0,0,0,.08); max-height: 80vh; overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 1rem; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--primary); color: #fff; font-family: var(--font-body);
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .95rem 2.1rem; border-radius: 999px; transition: transform .2s, filter .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid currentColor; }
.btn.small { padding: .45rem 1rem; font-size: .72rem; }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }

/* ---------- Encabezado de seccion ---------- */
.sec-head { text-align: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.eyebrow {
  font-size: .75rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .8rem;
}
.rule { display: block; width: 54px; height: 1px; background: var(--accent); margin: 1.2rem auto 0; opacity: .6; }

/* ---------- Portada ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  text-align: center; color: var(--text); padding: 6rem 1.5rem 4rem; overflow: hidden;
}
.hero.has-img { color: #fff; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } html { scroll-behavior: auto; } }
.hero-veil { position: absolute; inset: 0; background: #000; }
.hero:not(.has-img) .hero-veil { display: none; }
.hero-inner { position: relative; max-width: 46rem; }
.hero .names {
  font-size: clamp(3rem, 12vw, 6.5rem); margin: 0 0 1.2rem; line-height: 1;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .35em;
}
.hero .amp { color: var(--accent); font-style: italic; }
.hero.has-img .amp { color: #fff; opacity: .8; }
.hero-date { font-size: 1.05rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: .3rem; }
.hero-place { color: inherit; opacity: .85; margin-bottom: 2rem; }
.hero .btn { margin-top: 1.5rem; }
.hero.has-img .btn { background: #fff; color: var(--text); }
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; width: 1px; height: 48px;
  background: currentColor; opacity: .4; animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scaleY(.4); opacity: .2; } 50% { transform: scaleY(1); opacity: .6; } }

/* ---------- Cuenta atras ---------- */
.countdown { display: flex; justify-content: center; gap: clamp(1rem, 4vw, 2.6rem); margin: 2rem 0; }
.cd-unit { min-width: 4.2rem; }
.cd-num { display: block; font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1; }
.cd-lbl { display: block; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; opacity: .7; margin-top: .5rem; }

/* ---------- Bloques divididos ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.no-img .split, .split:has(.split-text:only-child) { grid-template-columns: 1fr; max-width: 46rem; margin-inline: auto; text-align: center; }
.layout-rev .split-media { order: -1; }
.split-media img { border-radius: 4px; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .layout-rev .split-media { order: 0; } }

/* ---------- Rejillas y tarjetas ---------- */
.grid { display: grid; gap: 1.6rem; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
/* Una sola tarjeta no debe ocupar todo el ancho */
.grid > :only-child { max-width: 26rem; margin-inline: auto; width: 100%; }
.card {
  background: var(--surface); border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px -18px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
}
.card.plain { box-shadow: none; background: transparent; border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.card-media img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.card-body { padding: 1.6rem; }
.card-body > :last-child { margin-bottom: 0; }
.card-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.event-time { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); margin-bottom: .2rem; }
.event-place { font-weight: 600; margin-bottom: .2rem; }
.tag {
  display: inline-block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: .2rem .7rem; margin-bottom: .7rem;
}

/* ---------- Historia ---------- */
.story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.story-item { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.story-item.alt .story-media { order: 1; }
.story-item:not(:has(img)) { grid-template-columns: 1fr; max-width: 40rem; margin-inline: auto; text-align: center; }
.story-media img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; width: 100%; }
@media (max-width: 760px) { .story-item { grid-template-columns: 1fr; } .story-item.alt .story-media { order: 0; } }

/* ---------- Horario ---------- */
.sched-list { list-style: none; margin: 0 auto; padding: 0; max-width: 42rem; }
.sched-item {
  display: grid; grid-template-columns: 2.2rem 4.5rem 1fr; align-items: baseline; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--text) 18%, transparent);
}
.sched-item:last-child { border-bottom: 0; }
.sched-icon { font-size: 1.2rem; }
.sched-time { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); }
.sched-body strong { display: block; }
.sched-body em { font-style: normal; color: var(--muted); font-size: .92rem; }

/* ---------- Galeria ---------- */
.gal { display: grid; gap: .6rem; }
.gal.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.gal.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.gal.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.gal-cell { border: 0; padding: 0; background: none; cursor: zoom-in; overflow: hidden; border-radius: 3px; }
.gal-cell img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .5s ease, filter .3s; }
.gal-cell:hover img { transform: scale(1.06); filter: brightness(1.03); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,13,11,.95);
  display: grid; place-items: center; padding: 3rem 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 1200px); max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; padding: .5rem 1rem; opacity: .75; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: .5rem; right: 1rem; font-size: 2.4rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Vestimenta, regalos, FAQ ---------- */
.palette { list-style: none; display: flex; gap: 1.4rem; flex-wrap: wrap; padding: 0; margin: 1.5rem 0 0; }
.palette li { display: flex; align-items: center; gap: .55rem; font-size: .9rem; }
.swatch { width: 1.6rem; height: 1.6rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.iban {
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em;
  background: var(--surface); padding: 1rem 1.4rem; border-radius: 6px; margin: 1.5rem 0 .5rem;
}
.faq-item { border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent); padding: .3rem 0; }
.faq-item summary { cursor: pointer; padding: 1.1rem .5rem 1.1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: .2rem; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .prose { padding-bottom: 1rem; color: var(--muted); }

.quote { text-align: center; background-size: cover; background-position: center; }
.quote.has-img { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.quote blockquote { margin: 0 auto; width: min(46rem, 90%); }
.quote p { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.6rem); font-style: italic; }
.quote cite { font-style: normal; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }

.contact-list { list-style: none; padding: 0; display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap; }
.contact-item { display: grid; gap: .2rem; }
.contact-item a { color: var(--accent); }

/* ---------- Formulario ---------- */
.form { background: var(--surface); padding: clamp(1.5rem, 4vw, 2.6rem); border-radius: 8px; box-shadow: 0 10px 40px -28px rgba(0,0,0,.5); }
.field { margin-bottom: 1.3rem; border: 0; padding: 0; }
.field label, .field legend { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 4px; padding: .75rem .9rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input[aria-invalid="true"] { border-color: #c0392b; }
.choices { display: flex; gap: .8rem; flex-wrap: wrap; }
.field .choice { display: flex; align-items: center; gap: .6rem; flex: 1 1 12rem; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); border-radius: 4px; padding: .75rem .9rem;
  text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 400; color: var(--text); margin: 0; }
.field .choice input { width: auto; flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.companion { border-left: 2px solid var(--accent); padding-left: 1rem; margin-bottom: 1rem; }
.hp { position: absolute; left: -9999px; }
.form-msg { margin: 1rem 0 0; min-height: 1.4em; }
.form-msg.ok { color: var(--primary); }
.form-msg.err { color: #c0392b; }
.form.sent { text-align: center; }
.notice { background: var(--surface); padding: 1.6rem; border-radius: 6px; }

/* ---------- Pie ---------- */
.site-footer { padding: 3rem 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* ---------- Aparicion al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
