:root {
  --principal: #888888;
  --oscuro: #2e2e2e;
  --claro: #f6f4f2;
  --blanco: #ffffff;
  --serif: 'Cardo', Georgia, serif;
  --sans: 'Montserrat', system-ui, sans-serif;
  --script: 'Great Vibes', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--oscuro);
  background: var(--blanco);
  line-height: 1.6;
  letter-spacing: .5px;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
main { max-width: 600px; margin: 0 auto; background: var(--blanco); box-shadow: 0 0 40px rgba(0,0,0,.08); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
.small { font-size: .85rem; opacity: .85; }

/* ===== Bienvenida ===== */
#welcome {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 24px;
  background: var(--claro);
  transition: opacity .6s ease;
}
#welcome.hide { opacity: 0; pointer-events: none; }
.welcome-head { text-align: center; color: var(--principal); }
.welcome-kicker { font-family: var(--serif); letter-spacing: 8px; font-size: 1.1rem; }
.welcome-head h1 { font-size: 5rem; line-height: 1; color: var(--oscuro); }
.invite-card {
  position: relative;
  width: min(320px, 86vw);
  padding: 44px 20px 32px;
  background: var(--blanco);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  display: flex; flex-direction: column; gap: 10px; text-align: center;
}
.invite-card::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 10px; background: var(--principal); border-radius: 0 0 5px 5px;
}
.invite-card strong { color: var(--principal); letter-spacing: 2px; font-size: 1.1rem; }
.invite-card span { font-size: .9rem; }
.floating { color: var(--principal); font-weight: 600; font-size: .85rem; letter-spacing: 2px; }
.floating.show { animation: flotar 2.2s ease-in-out infinite; }
@keyframes flotar { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.fade { opacity: 0; transform: translateY(10px); transition: opacity 1s ease, transform 1s ease; }
.fade.show { opacity: 1; transform: none; }

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px; max-height: 900px;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 24px 16px 110px;
  color: var(--blanco); text-align: center;
  background: url('img/oli-1.jpg') center 25% / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55)); }
.hero-inner { position: relative; }
.title-xv { font-family: var(--serif); font-weight: 400; font-size: 2rem; letter-spacing: 6px; }
.title-xv strong { font-weight: 700; font-size: 1.4em; }
.hero-name { font-size: 5.5rem; line-height: .9; margin: -6px 0 18px; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div {
  min-width: 68px; padding: 10px 4px;
  border: 1px solid rgba(255,255,255,.6); border-radius: 8px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.countdown span { display: block; font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; }
.countdown small { font-size: .6rem; letter-spacing: 1.5px; }
.wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 50px; fill: var(--principal); }

/* ===== Bloques ===== */
.block { padding: 56px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.block-gray { background: var(--principal); color: var(--blanco); }
.block h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; letter-spacing: 4px; }
.block .text { max-width: 440px; font-size: .95rem; }
.venue { font-family: var(--serif); font-size: 1.4rem; }
.icon { width: 56px; height: 56px; fill: none; stroke: var(--blanco); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.icon.dark { stroke: var(--principal); }

.btn {
  display: inline-block; margin-top: 10px;
  padding: 12px 30px; border-radius: 40px;
  background: var(--principal); color: var(--blanco);
  font-size: .8rem; font-weight: 600; letter-spacing: 2px; text-decoration: none;
  transition: transform .2s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn-light { background: var(--blanco); color: var(--oscuro); }
.plain-link { color: inherit; text-decoration: none; }

/* ===== Banner ===== */
.banner {
  position: relative; height: 70vh; min-height: 420px; max-height: 640px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--blanco);
  background: var(--bg) 65% center / cover no-repeat;
}
.banner::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.3); }
.banner .title-xv { position: relative; }
.banner .script { font-size: 4.5rem; letter-spacing: 0; line-height: 1; }

/* ===== Galerías ===== */
.gallery {
  display: flex; gap: 10px; padding: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 auto; scroll-snap-align: center; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.gallery-portrait img { width: 75%; aspect-ratio: 2 / 3; }
.gallery-landscape img { width: 88%; aspect-ratio: 3 / 2; }

/* ===== Frase / footer ===== */
.quote { padding: 56px 24px 40px; text-align: center; font-family: var(--serif); font-size: 1.15rem; letter-spacing: 2px; }
.big { font-size: 3.4rem; line-height: 1.2; color: var(--principal); }
.footer { padding: 48px 24px 60px; text-align: center; background: var(--claro); }
.footer .small { letter-spacing: 6px; }

/* ===== Modales ===== */
.modal, .lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal.open, .lightbox.open { opacity: 1; pointer-events: auto; }
.modal-box {
  position: relative; width: min(440px, 100%);
  padding: 36px 22px 26px; border-radius: 12px;
  background: var(--blanco); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.modal-box h4 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: 3px; }
.modal-box iframe { width: 100%; height: 280px; border: 0; border-radius: 8px; margin-top: 8px; }
.modal-close { position: absolute; top: 6px; right: 12px; font-size: 2rem; line-height: 1; color: var(--principal); }
.lightbox .modal-close { color: var(--blanco); top: 12px; right: 18px; }
.lightbox img { max-height: 90vh; border-radius: 6px; }
.label { font-size: .75rem; letter-spacing: 2px; color: var(--principal); margin-top: 8px; }
.value { font-family: var(--serif); font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.copy { font-family: var(--sans); font-size: .65rem; letter-spacing: 1px; padding: 4px 10px; border: 1px solid var(--principal); border-radius: 20px; color: var(--principal); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); z-index: 300;
  padding: 10px 18px; border-radius: 20px; background: var(--oscuro); color: var(--blanco); font-size: .85rem;
  opacity: 0; transition: .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Animación al hacer scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .fade { opacity: 1; transform: none; transition: none; }
  .floating.show { animation: none; }
}
