/* ==========================================
   Boda Clásica Dorada — plantilla de boda
   Dorado + crema + carbón · Cormorant Garamond + Jost (locales, sin CDN)
   ========================================== */
@import url('/fonts/cormorant-garamond/cormorant-garamond.css');
@import url('/fonts/jost/jost.css');

:root {
  --gold: #c9a96e;        /* adornos y fondos */
  --gold-ink: #7d5f26;    /* texto dorado sobre claro (5,6:1 sobre crema) */
  --gold-btn: #8a6a2b;    /* botón con letra blanca (5:1) */
  --gold-btn-hover: #6f541f;
  --ink: #2d2d2d;
  --muted: #5b5a57;
  --cream: #faf8f5;
  --line: #e7e1d6;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 60px;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body, button, input, select, textarea { font-family: var(--sans); }
body {
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }
:focus-visible { outline: 2px solid var(--gold-btn); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.ic { width: 1.25em; height: 1.25em; flex: none; }

/* --- Tipografía --- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
.section-tag {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-ink);
  margin-bottom: 0.5rem;
}

/* --- Estructura --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5.5rem 0; }
.section-alt { background: #ffffff; }
.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--ink);
}
@media (max-width: 768px) { .section { padding: 3.5rem 0; } .section-title { margin-bottom: 2rem; } }

/* Foto con proporción fija: el editor la cambia con un clic */
.ph { position: relative; overflow: hidden; background: #eadfca; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 2rem;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--gold-btn); color: #ffffff; }
.btn-primary:hover { background: var(--gold-btn-hover); transform: translateY(-1px); }

/* --- Navegación --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(45, 45, 45, 0.94);
  backdrop-filter: blur(8px);
  padding: 0 1.5rem;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--gold); letter-spacing: 0.1em; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.875rem; color: rgba(255, 255, 255, 0.82); transition: color 0.2s; letter-spacing: 0.04em; }
.nav-links a:hover { color: var(--gold); }
.nav-links .nav-cta {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 1.1rem; border-radius: 999px;
  background: var(--gold-btn); color: #fff; font-weight: 500;
}
.nav-links .nav-cta:hover { background: var(--gold-btn-hover); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none; border: none; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; transition: transform 0.2s, background 0.2s;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav { padding: 0 1.25rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #262626; padding: 0.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(201, 169, 110, 0.25);
    z-index: 200;
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a { display: flex; align-items: center; min-height: 48px; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .nav-links .nav-cta { justify-content: center; margin-top: 0.9rem; border-bottom: none; min-height: 48px; }
}

/* --- Portada --- */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  background: #3b332b;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + min(4vh, 2.5rem));
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 100%; }
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.62) 0%, rgba(20, 16, 12, 0.4) 55%, rgba(20, 16, 12, 0.5) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 1.5rem; pointer-events: none; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.hero-content :is(p, h1, a, span) { pointer-events: auto; }
.hero-kicker { font-size: 0.8125rem; letter-spacing: 0.35em; text-transform: uppercase; color: #f1dfb8; margin-bottom: 1rem; }
.hero-names {
  font-size: clamp(3.25rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.02;
}
.hero-ampersand { display: block; font-size: 0.5em; font-style: italic; font-weight: 400; color: #f1dfb8; margin: 0.1rem 0; }
.hero-divider { width: 64px; height: 1px; background: var(--gold); margin: 1.25rem auto; }
.hero-date { font-size: 1.375rem; font-weight: 400; letter-spacing: 0.12em; }
.hero-place { font-size: 1rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.9; margin-top: 0.4rem; }
.hero-cta { margin-top: 1.5rem; text-shadow: none; }
@media (max-width: 768px) {
  .hero { padding-top: calc(var(--nav-h) + 2rem); }
  .hero-media img { object-position: 60% 60%; }
  .hero-date { font-size: 1.125rem; }
}

/* --- Cuenta regresiva --- */
.count-band { background: #2d2d2d; color: #fff; text-align: center; padding: 2rem 1.5rem 2.25rem; }
.count-label { font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.hero-countdown { display: flex; gap: 3rem; justify-content: center; }
.hero-countdown-item { text-align: center; min-width: 4.5rem; }
.hero-countdown-number { font-family: var(--serif); font-size: 3rem; color: #fff; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-countdown-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.78); margin-top: 0.4rem; }
@media (max-width: 480px) {
  .hero-countdown { gap: 0.5rem; }
  .hero-countdown-item { min-width: 0; flex: 1; }
  .hero-countdown-number { font-size: 2.25rem; }
  .hero-countdown-label { letter-spacing: 0.04em; font-size: 0.75rem; }
}

/* --- Historia (línea de tiempo) --- */
.timeline { position: relative; max-width: 960px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  top: 0; bottom: 0; width: 1px; background: var(--gold);
}
.timeline-item { display: flex; align-items: flex-start; margin-bottom: 3.5rem; position: relative; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item:nth-child(odd) { flex-direction: row-reverse; }
.timeline-dot {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; background: var(--gold);
  border: 3px solid var(--cream); box-shadow: 0 0 0 1px var(--gold);
  border-radius: 50%; z-index: 1; top: 14px;
}
.timeline-content {
  width: calc(50% - 2.5rem);
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(60, 45, 20, 0.08);
  border: 1px solid var(--line);
}
.timeline-content .ph { aspect-ratio: 16 / 10; }
.timeline-body { padding: 1.5rem 1.6rem 1.7rem; }
.timeline-year { font-family: var(--serif); color: var(--gold-ink); font-size: 1.25rem; font-weight: 600; letter-spacing: 0.08em; margin-bottom: 0.15rem; }
.timeline-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.timeline-text { font-size: 1rem; color: var(--muted); line-height: 1.7; }
@media (max-width: 768px) {
  .timeline::before { left: 11px; transform: none; }
  .timeline-item, .timeline-item:nth-child(odd) { flex-direction: row; padding-left: 2.25rem; margin-bottom: 2.25rem; }
  .timeline-dot { left: 11px; }
  .timeline-content { width: 100%; }
}

/* --- Evento --- */
.event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 880px; margin: 0 auto; }
.event-card {
  background: var(--cream);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(60, 45, 20, 0.08);
  border: 1px solid var(--line);
  text-align: center;
}
.event-card .ph { aspect-ratio: 16 / 10; }
.event-body { padding: 0 1.75rem 2rem; }
.event-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin: -28px auto 1rem;
  position: relative; z-index: 1;
  border-radius: 50%; background: #fff; border: 1px solid var(--gold); color: var(--gold-ink);
}
.event-icon .ic { width: 26px; height: 26px; }
.event-card h3 { font-size: 1.625rem; margin-bottom: 0.6rem; }
.event-detail { font-size: 1rem; color: var(--muted); line-height: 1.55; }
.event-time { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 600; color: var(--gold-ink); font-size: 1.125rem; margin-top: 0.9rem; }
.event-map-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px; margin-top: 0.6rem; padding: 0 0.25rem;
  color: var(--gold-ink); font-size: 0.9375rem; font-weight: 500;
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.event-map-link:hover { border-bottom-color: var(--gold-ink); }
@media (max-width: 768px) { .event-grid { grid-template-columns: 1fr; } }

/* --- Código de vestimenta --- */
.dress { text-align: center; margin-top: 4rem; }
.dress-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--gold-ink); border: 1px solid var(--gold); margin-bottom: 0.9rem; }
.dress-icon .ic { width: 24px; height: 24px; }
.dress-title { font-size: 1.75rem; margin-bottom: 1.75rem; }
.dress-code-grid { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.dress-item { text-align: center; max-width: 120px; }
.dress-circle { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 0.75rem; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), 0 4px 10px rgba(0, 0, 0, 0.1); }
.dress-label { font-size: 0.9375rem; color: var(--muted); font-weight: 500; line-height: 1.35; }
.dress-note { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--muted); font-style: italic; }
@media (max-width: 480px) { .dress-code-grid { gap: 1.5rem 1.25rem; } .dress-circle { width: 64px; height: 64px; } }

/* --- Galería (mosaico) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 0.75rem;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.gallery-grid > :nth-child(1) { grid-row: span 2; }
.gallery-grid > :nth-child(4) { grid-column: span 2; }
.gallery-grid > .tm-add-btn { grid-column: 1 / -1; grid-row: auto; }
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; gap: 0.5rem; }
  .gallery-grid > :nth-child(1) { grid-row: auto; grid-column: span 2; }
  .gallery-grid > :nth-child(4) { grid-column: auto; }
}

/* --- RSVP --- */
.rsvp-box {
  text-align: center; max-width: 540px; margin: 0 auto;
  background: var(--cream); padding: 3rem 2.25rem; border-radius: 6px;
  border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(60, 45, 20, 0.07);
}
.rsvp-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-ink); margin-bottom: 1.25rem; }
.rsvp-icon .ic { width: 26px; height: 26px; }
.rsvp-box p { color: var(--muted); margin-bottom: 1.75rem; line-height: 1.7; }
@media (max-width: 480px) { .rsvp-box { padding: 2.25rem 1.25rem; } .rsvp-box .btn { width: 100%; padding-left: 1rem; padding-right: 1rem; } }

/* --- Mesa de regalos --- */
.registry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 760px; margin: 0 auto; }
.registry-card {
  background: #fff; padding: 2.25rem 1.75rem; border-radius: 6px;
  border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(60, 45, 20, 0.07); text-align: center;
}
.card-icon, .travel-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #f4ecda; color: var(--gold-ink); margin-bottom: 0.9rem; }
.card-icon .ic, .travel-icon .ic { width: 24px; height: 24px; }
.registry-card { display: flex; flex-direction: column; align-items: center; }
.registry-card h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.registry-detail { max-width: 100%; font-size: 1rem; color: var(--muted); margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.qr-placeholder { width: 150px; height: 150px; margin: 0.75rem auto; border: 1px dashed var(--gold); border-radius: 6px; object-fit: cover; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: auto; padding: 0 1.4rem;
  background: transparent; color: var(--gold-ink); border: 1px solid var(--gold-ink);
  border-radius: 999px; font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.copy-btn:hover { background: var(--gold-btn); border-color: var(--gold-btn); color: #fff; }
@media (max-width: 768px) { .registry-grid { grid-template-columns: 1fr; } }

/* --- Alojamiento --- */
.travel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.travel-card { background: var(--cream); border-radius: 6px; padding: 1.75rem; border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(60, 45, 20, 0.06); }
.travel-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.travel-detail { font-size: 1rem; color: var(--muted); margin-bottom: 0.25rem; line-height: 1.6; }
.travel-distance, .travel-line { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.9375rem; color: var(--gold-ink); font-weight: 500; margin-bottom: 0.75rem; }
.travel-distance .ic, .travel-line .ic { margin-top: 0.15em; }
.travel-line { color: var(--muted); font-weight: 400; font-size: 1rem; }
.travel-line .ic { color: var(--gold-ink); }
.travel-phone { display: flex; align-items: center; gap: 0.55rem; min-height: 44px; font-size: 1rem; color: var(--ink); font-weight: 500; }
.travel-phone .ic { color: var(--gold-ink); }
.travel-phone:hover { color: var(--gold-ink); }

/* --- Preguntas --- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { background: #fff; border-radius: 6px; margin-bottom: 0.75rem; border: 1px solid var(--line); overflow: hidden; }
.faq-item summary {
  padding: 1.1rem 1.5rem; min-height: 56px; cursor: pointer; font-weight: 500; font-size: 1.0625rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--gold-ink); flex: none; }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 1.5rem 1.35rem; color: var(--muted); line-height: 1.7; }

/* --- Cortejo --- */
.party-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; }
.party-card { text-align: center; }
.party-initials {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e8d5a3);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-family: var(--serif); font-weight: 600; color: #fff;
  margin: 0 auto 1rem; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--gold), 0 6px 16px rgba(60, 45, 20, 0.15);
}
.party-name { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; margin-bottom: 0.15rem; }
.party-role { font-size: 0.8125rem; color: var(--gold-ink); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; }
@media (max-width: 900px) { .party-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .party-initials { width: 100px; height: 100px; } }

/* --- Pie --- */
.footer { background: #2d2d2d; color: rgba(255, 255, 255, 0.85); text-align: center; padding: 3.5rem 1.5rem; }
.footer-hashtag { font-family: var(--serif); font-size: 2rem; color: var(--gold); margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.footer-text { font-size: 1rem; max-width: 480px; margin: 0 auto 1rem; opacity: 0.85; }
.footer-divider { width: 40px; height: 1px; background: rgba(255, 255, 255, 0.3); margin: 1.5rem auto; }
.footer-credit { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.75); }
.footer-credit .ic { color: var(--gold); width: 1.1em; height: 1.1em; fill: var(--gold); }

/* --- Utilidades --- */
.text-center { text-align: center; }

.registry-card > .registry-detail:nth-last-child(2) { margin-bottom: 0.9rem; }
