/* ==========================================================
   Lucía & Jaime — estilo editorial The Wed
   Tipografías (Google Fonts, cargadas en index.html):
     · Newsreader  → serif editorial: nombres, títulos, cuerpo, acentos
     · Inter       → sans: etiquetas, kickers, nav, fechas pequeñas
   (Equivalentes libres de las de The Wed: ABC Arizona + GT America.)
   ========================================================== */

/* ---------- Tokens: paleta The Wed ---------- */
:root {
  --paper: #ffffff;      /* fondo blanco puro */
  --ink: #1e1e1e;        /* texto casi-negro, nunca negro puro */
  --muted: #8a8a8a;      /* gris de etiquetas y kickers */
  --faint: #b3b3b3;
  --line: #e6e6e6;
  --line-dark: #cfcfcf;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Helvetica, Arial, sans-serif;

  --nav-h: 5.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.05rem, .3vw + 1rem, 1.2rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1.25rem;
  z-index: 200;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- Utilidades editoriales ---------- */
/* Kicker / etiqueta pequeña: sans gris tracked (firma "revista" de The Wed). */
.eyebrow, .label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.rule {
  width: 1px;
  height: clamp(3rem, 8vh, 5rem);
  background: var(--line-dark);
  margin: 0 auto;
}

/* ---------- Estructura de sección ---------- */
.page-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6rem, 16vh, 11rem) 6vw;
  scroll-margin-top: var(--nav-h);
}
.section-content {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
}

/* Título de sección: serif grande, caja mixta (así trabaja The Wed). */
.section-head { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.section-head .num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--faint);
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: .01em;
  line-height: 1.15;
  margin: 0;
}

.lede {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
  max-width: 46ch;
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.monogram {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: .2em;
  text-decoration: none;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* Botón hamburguesa — fuera del <header> en el HTML para flotar sobre el overlay. */
.hamburger {
  position: fixed;
  right: 6vw;
  top: calc((var(--nav-h) - 30px) / 2);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 130;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Overlay de menú a pantalla completa (móvil) */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.mobile-nav.open { opacity: 1; visibility: visible; }
/* Cada entrada del menú replica el encabezado de sección de la página:
   numeral pequeño arriba, nombre debajo, con una línea fina separando cada una. */
.mobile-nav {
  gap: 0;
  padding: calc(var(--nav-h) + 2rem) 12vw 3rem;
  justify-content: center;
}
.mobile-nav a {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 1.35rem 0;
  text-decoration: none;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 1px solid var(--line); }
.mobile-nav .mn-num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .62rem;
  letter-spacing: .3em;
  color: var(--faint);
}
.mobile-nav .mn-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: .01em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.18) 40%, rgba(0,0,0,.5));
}
.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2.25rem;
  padding: calc(var(--nav-h) + 6vh) 6vw 12vh;
  color: #fff;
}
.hero .eyebrow { color: rgba(255,255,255,.85); }
.names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 1;
  letter-spacing: .01em;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .04em;
  text-shadow: 0 2px 40px rgba(0,0,0,.45);
}
.names .amp { font-size: .4em; font-style: italic; opacity: .92; margin: .1em 0; }
.hero-date {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.65rem);
  line-height: 1.4;
  margin: 0;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hero-place {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(.7rem, 1.4vw, .82rem);
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 0;
  color: rgba(255,255,255,.9);
}
/* ---------- Banda de foto B&N ---------- */
.photo-band {
  margin: 0;
  width: 100%;
  height: clamp(280px, 60vh, 620px);
  overflow: hidden;
}
.photo-band img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); }

/* Banda de fresco a color (único acento cromático) */
.fresco { margin: 0; width: 100%; overflow: hidden; background: #0d0d0d; }
.fresco img { width: 100%; height: 100%; object-fit: cover; }
.fresco.strip { height: clamp(150px, 22vh, 260px); }
.fresco.tall { height: clamp(380px, 72vh, 720px); }

/* ---------- Cuenta regresiva ---------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 3rem);
}
.cd-item { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.cd-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd-lbl {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .6rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-sep {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  padding-top: .1em;
  color: var(--line-dark);
}
.cd-note { font-style: italic; font-size: .95rem; color: var(--muted); margin: 0; }

/* ---------- Itinerario ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6.5rem;
  width: 100%;
}
.event { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; width: 100%; }
.event-icon { color: var(--ink); }
.event-icon svg { display: block; }
.event-type {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.event-time {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.2;
  margin: 0;
}
.event-venue {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  line-height: 1.5;
  margin: 0;
  max-width: 100%;
}
.event .btn { margin-top: .5rem; }

/* ---------- Código de vestimenta ---------- */
.dress-code {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.3;
  margin: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 1rem 2.4rem;
  cursor: pointer;
  transition: background .3s, color .3s, opacity .3s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.on-photo { border-color: #fff; color: #fff; background: transparent; }
.btn.on-photo:hover { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.full { width: 100%; padding: 1.05rem; }

/* ---------- Tarjetas ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(2.5rem, 6vw, 4rem);
  width: 100%;
}
.card { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.card-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}
.card-note { margin: 0; color: var(--muted); font-size: .92rem; }
[data-placeholder] { color: var(--faint); }

/* ---------- RSVP ---------- */
.rsvp-form-wrap { width: 100%; max-width: 500px; margin: 0 auto; text-align: left; }
.rsvp-lbl {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}
.opt { letter-spacing: 0; text-transform: none; color: var(--faint); }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-dark);
  border-radius: 0;
  padding: .7rem 0;
  transition: border-color .3s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus { outline: 0; border-bottom-color: var(--ink); }
textarea { resize: none; line-height: 1.7; }
::placeholder { color: var(--faint); opacity: 1; }

.rsvp-search { position: relative; }
.rsvp-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line-dark);
  box-shadow: 0 12px 34px rgba(0,0,0,.12);
  max-height: 260px;
  overflow-y: auto;
}
.rsvp-dropdown.open { display: block; }
.rsvp-opt {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.rsvp-opt:last-child { border-bottom: 0; }
.rsvp-opt:hover { background: #f5f5f5; }
.rsvp-opt-pases { font-family: var(--sans); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rsvp-nores { padding: .85rem 1rem; font-size: .95rem; color: var(--muted); }

.rsvp-greeting {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.4;
  text-align: center;
  margin: 0 0 2.5rem;
}
.rsvp-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.rsvp-card-num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .66rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
}
.rsvp-att { display: flex; gap: .75rem; }
.rsvp-att-btn {
  flex: 1;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-dark);
  padding: .8rem .5rem;
  cursor: pointer;
  transition: all .25s;
}
.rsvp-att-btn:hover { border-color: var(--ink); color: var(--ink); }
.rsvp-att-btn.on-si { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rsvp-att-btn.on-no { background: var(--muted); border-color: var(--muted); color: var(--paper); }

.rsvp-extra { display: flex; flex-direction: column; gap: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--line); }

.choices { display: flex; flex-wrap: wrap; gap: 1.75rem; padding-top: .4rem; }
.choice { display: flex; align-items: center; gap: .6rem; margin: 0; cursor: pointer; font-size: 1.02rem; color: var(--ink); }
.choice input { accent-color: var(--ink); margin: 0; }

.error { margin: .5rem 0 0; min-height: 1em; font-family: var(--sans); font-size: .78rem; color: #a3382f; }
.form-status { margin: 1.25rem 0 0; font-size: .95rem; color: var(--muted); text-align: center; }
.form-status.ok { color: var(--ink); }
.form-status.bad { color: #a3382f; }

.thanks { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.thanks h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.4; margin: 0; }
.thanks p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Footer ---------- */
.footer {
  padding: clamp(5rem, 12vh, 8rem) 6vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  border-top: 1px solid var(--line);
}
.footer-names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  letter-spacing: .01em;
  margin: 0;
}
.footer-date {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------- Aparición ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  /* iniciales a la izquierda, hamburguesa a la derecha (nav en space-between) */
}
@media (max-width: 620px) {
  .section-content { gap: 3rem; }
  .timeline { gap: 4.5rem; }
  .countdown { gap: .75rem; }
  .cd-num { font-size: clamp(1.6rem, 8vw, 2.25rem); }
  .cd-lbl { font-size: .52rem; letter-spacing: .16em; }
  .cd-sep { font-size: 1.25rem; }
  .choices { gap: 1.25rem; }
  .rsvp-att { flex-direction: column; }
}
