:root {
  --ink: #202020;
  --muted: #6b625f;
  --paper: #fbf8f3;
  --white: #fff;
  --wine: #8f2634;
  --wine-dark: #5a1d26;
  --sage: #788b73;
  --line: #e6ddd5;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 248, 243, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav {
  width: min(var(--max), calc(100% - 30px));
  min-height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: max-content auto max-content;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.nav-side {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nav-right {
  justify-content: flex-start;
}

.nav-right .nav-cta {
  position: absolute;
  right: 0;
  top: 50%;
  margin-left: 0;
  transform: translateY(-50%);
}
.nav a { text-decoration: none; }
.nav-cta {
  padding: 11px 16px;
  color: #fff;
  background: var(--wine);
  border-radius: 999px;
}
.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 122px;
  color: var(--wine);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .08em;
}
.monogram img { width: 28px; height: 28px; }
.menu-toggle {
  display: none;
  justify-self: end;
  border: 0;
  background: transparent;
  font-size: 28px;
  color: var(--wine);
}

.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 48vw);
  align-items: stretch;
  background: #fff;
}
.hero-copy {
  padding: clamp(70px, 9vw, 140px) clamp(24px, 7vw, 110px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.hero-copy p,
.section-kicker,
.person-card p,
.venue-content p {
  margin: 0 0 12px;
  color: var(--wine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.person-card p {
  text-align: center;
}
h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.02;
}
h1 {
  margin: 0;
  font-size: clamp(58px, 9vw, 122px);
}
.hero-copy a,
.promo a,
.venue-content a,
.rsvp button {
  width: fit-content;
  min-height: 48px;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  color: #fff;
  background: var(--wine);
  border-radius: 0;
  border: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.hero-photo {
  min-height: 620px;
  background: var(--wine-dark);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}
.hero-date {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 18px;
  color: #fff;
  background: var(--wine-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.count-panel,
.promo,
.contact {
  padding: 58px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.16), transparent 28%),
    radial-gradient(circle at 82% 85%, rgba(255,255,255,.1), transparent 30%),
    linear-gradient(135deg, rgba(143,38,52,.96), rgba(75,36,38,.95));
  text-align: center;
}
.count-panel h2,
.section-head h2,
.promo h2,
.contact h2,
.rsvp h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
}
.countdown {
  width: min(840px, 100%);
  margin: 34px auto 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.countdown div {
  padding: 22px 10px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
}
.countdown strong {
  display: block;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1;
  font-weight: 800;
}
.countdown span,
.count-summary span {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.count-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.count-summary span {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.25);
}

.people {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto;
  padding: 90px 0;
  display: grid;
  grid-template-columns: .78fr 1.2fr .78fr;
  gap: 28px;
  align-items: center;
}
.person-card {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
}
.person-card img {
  width: 170px;
  aspect-ratio: 1;
  margin: 0 auto 22px;
  object-fit: cover;
  border-radius: 50%;
}
.person-card h2 {
  margin: 0 0 12px;
  font-size: 42px;
  text-align: center;
}
.person-card > span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.socials {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}
.socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
}
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.facebook { background: #1877f2; }
.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 45%, #8134af 78%, #515bd4); }
.tiktok { background: #111; box-shadow: inset 3px 0 0 #25f4ee, inset -3px 0 0 #fe2c55; }

.memory-wall {
  position: relative;
  padding: 18px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(32,32,32,.14);
}
.carousel-frame {
  aspect-ratio: 1;
  overflow: hidden;
}
.carousel-track {
  height: 100%;
  display: flex;
  transition: transform .55s ease;
}
.carousel-track img {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  object-fit: cover;
}
.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  color: #fff;
  background: var(--wine);
  font-size: 32px;
  cursor: pointer;
  transform: translateY(-50%);
}
.carousel-button.prev { left: -8px; }
.carousel-button.next { right: -8px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c9bbb3;
}
.carousel-dots .active { background: var(--wine); }

.story,
.schedule,
.venue,
.special,
.faq,
.rsvp {
  padding: 92px 0;
}
.section-head {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto 44px;
  text-align: center;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: 20px auto 0;
  background: var(--wine);
  transform: rotate(45deg);
  box-shadow: -18px 18px 0 #c98991, 18px -18px 0 #c98991;
}
.story-grid {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
}
.story-grid article {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
}
.story-grid article:nth-child(even) {
  grid-template-columns: 1fr 280px;
}
.story-grid article:nth-child(even) img { order: 2; }
.story-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.story-grid time {
  color: var(--wine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.story-grid h3 {
  margin: 6px 0;
  font-size: 34px;
}
.story-grid p { margin: 0; color: var(--muted); }

.schedule { background: #fff; }
.schedule-track {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.schedule-track article {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.schedule-track strong {
  display: block;
  color: var(--wine);
  font-size: 34px;
  line-height: 1;
}
.schedule-track span {
  display: block;
  margin: 14px 0 8px;
  font-weight: 800;
  text-transform: uppercase;
}
.schedule-track p { margin: 0; color: var(--muted); }

.promo img {
  width: 250px;
  margin: 0 auto 14px;
  filter: brightness(0) invert(1);
}
.promo p {
  max-width: 660px;
  margin: 12px auto 0;
  color: rgba(255,255,255,.86);
}
.promo a {
  margin-inline: auto;
  color: var(--wine);
  background: #fff;
}

.venue { background: var(--paper); }
.venue-grid {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto;
  display: grid;
  gap: 28px;
}
.venue-grid article {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  background: #fff;
  border: 1px solid var(--line);
}
.venue-grid article:nth-child(even) { grid-template-columns: 1.1fr .9fr; }
.venue-grid article:nth-child(even) img { order: 2; }
.venue-grid > article > img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}
.venue-content {
  padding: 34px;
}
.venue-content h3 {
  margin: 0 0 12px;
  font-size: 44px;
}
.venue-content > span {
  display: block;
  color: var(--muted);
}
.venue-content iframe {
  width: 100%;
  height: 230px;
  margin-top: 18px;
  border: 0;
}
.transport {
  margin-top: 16px;
  padding: 16px;
  background: var(--paper);
}
.transport strong {
  display: block;
  color: var(--wine);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .12em;
}
.transport span { color: var(--muted); font-size: 14px; }

.special { background: #fff; }
.special-grid {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.special-grid article {
  padding: 12px 12px 22px;
  background: var(--paper);
  text-align: center;
  border: 1px solid var(--line);
}
.special-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.special-grid span {
  display: block;
  margin-top: 16px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.special-grid h3 {
  margin: 4px 0 0;
  font-size: 26px;
}

.faq { background: var(--paper); }
.faq-list {
  width: min(900px, calc(100% - 30px));
  margin: 0 auto;
  display: grid;
  gap: 10px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
}
.faq-question {
  width: 100%;
  min-height: 62px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.faq-question span {
  color: var(--wine);
  font-size: 24px;
  margin-left: 16px;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-answer p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}
.faq-item.open .faq-answer { max-height: 220px; }

.contact {
  width: min(var(--max), calc(100% - 30px));
  margin: 0 auto 90px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: center;
  text-align: left;
  border-radius: 0;
  box-shadow: 0 24px 64px rgba(90, 29, 38, .18);
}
.contact p {
  max-width: 560px;
  margin: 14px 0 0;
  color: rgba(255,255,255,.84);
}
.quick-actions {
  display: grid;
  gap: 12px;
}
.quick-actions a {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: #25d366;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.quick-actions svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.quick-actions span { color: inherit; }
.quick-actions a > span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.rsvp {
  background:
    linear-gradient(rgba(32,32,32,.66), rgba(32,32,32,.66)),
    url("../images/countdown-bg.png") center / cover;
}
.rsvp-box {
  width: min(840px, calc(100% - 30px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
  color: #fff;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  text-align: center;
  box-shadow: 0 28px 70px rgba(0,0,0,.24);
}
.rsvp p {
  max-width: 640px;
  margin: 14px auto 28px;
  color: rgba(255,255,255,.86);
}
.rsvp form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .75fr) minmax(0, .75fr) minmax(190px, auto);
  gap: 10px;
}
.rsvp input,
.rsvp select,
.rsvp button {
  min-height: 50px;
  border: 0;
  padding: 0 14px;
  font: inherit;
}
.rsvp button {
  width: 100%;
  justify-content: center;
  margin: 0;
  padding: 0 14px;
  white-space: nowrap;
}
.rsvp :disabled {
  opacity: 1;
  cursor: default;
}

.footer {
  padding: 64px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .16), transparent 28%),
    radial-gradient(circle at 82% 85%, rgba(255, 255, 255, .1), transparent 30%),
    linear-gradient(135deg, rgba(159, 36, 50, .96), rgba(97, 43, 45, .95)),
    var(--wine-dark);
}

.footer-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.footer .eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
}

.footer p:not(.eyebrow) {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.footer img {
  width: 150px;
  min-height: 90px;
  margin: 0 auto;
  object-fit: contain;
}

.footer address {
  display: grid;
  gap: 8px;
  justify-self: end;
  font-style: normal;
  text-align: right;
}

.footer address strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .nav {
    width: 100%;
    min-height: 68px;
    padding: 0 16px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }
  .monogram { order: 1; justify-self: auto; min-width: 0; }
  .menu-toggle { display: block; order: 2; justify-self: auto; }

  /* Menú móvil: los dos grupos de enlaces forman UN solo desplegable en
     columna, dentro de la barra fija (sin huecos transparentes ni saltos
     de posición), un enlace por línea y centrado, haya los que haya. */
  .nav-side {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    opacity: 0;
    transition: max-height .4s ease, opacity .28s ease, padding .4s ease;
  }
  .nav-right { order: 4; }
  .nav-side.open { max-height: 600px; opacity: 1; }
  .nav-side:not(.nav-right).open { padding-top: 6px; }
  .nav-right.open { padding-bottom: 12px; }

  .nav-side a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  /* "Confirmar" deja de flotar a la derecha: pasa a ser una línea más,
     centrada, como el resto. */
  .nav-right .nav-cta {
    position: static;
    transform: none;
    right: auto;
    top: auto;
    align-self: center;
    width: 100%;
    max-width: 320px;
    margin: 8px auto 2px;
    justify-content: center;
  }
  .hero,
  .people,
  .venue-grid article,
  .venue-grid article:nth-child(even),
  .contact {
    grid-template-columns: 1fr;
  }
  .venue-grid article:nth-child(even) img,
  .story-grid article:nth-child(even) img {
    order: 0;
  }
  .story-grid article,
  .story-grid article:nth-child(even),
  .schedule-track {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .special-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rsvp form {
    grid-template-columns: 1fr;
  }

  .memory-wall {
    order: 3;
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .hero-photo {
    min-height: 420px;
  }

  .countdown,
  .special-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .person-card,
  .venue-content,
  .special-grid article,
  .contact,
  .rsvp-box {
    text-align: center;
  }

  .quick-actions {
    width: 100%;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
  }

  .quick-actions a {
    display: flex;
    width: 100%;
    max-width: none;
    justify-content: center;
  }

  .footer address {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .countdown,
  .special-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(46px, 16vw, 72px);
  }

  .monogram {
    min-width: 0;
    font-size: 24px;
  }

  .monogram img {
    width: 24px;
    height: 24px;
  }
}
    width: 100%;

/* Edad de los novios (añadido por la plataforma) */
.person-card p.age {
  margin: 2px 0 18px;
  color: var(--wine);
  font-weight: 600;
}


/* === Pulido con datos incompletos (Boda Bonita) === */
/* Sin galería: los dos perfiles se reparten equilibrados (sin hueco central). */
.people.no-gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* Lugar SIN foto: la tarjeta pasa a una columna (sin el hueco de la foto). */
.venue-grid article.no-photo { grid-template-columns: 1fr; }
.venue-grid article.no-photo .venue-content { max-width: 760px; margin-inline: auto; }

/* Ambos lugares SIN foto: dos columnas de la misma altura (como los perfiles). */
.venue-grid.venues-no-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.venue-grid.venues-no-photos > article { height: 100%; }
.venue-grid.venues-no-photos .venue-content { max-width: none; }
