:root {
  --paper: #fff9f4;
  --blush: #f6c6d7;
  --blush-dark: #e977a6;
  --gold: #a3927e;
  --gold-soft: #d6c2a8;
  --ink: #352d2f;
  --muted: #776c68;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(53, 45, 47, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1;
}

h1 {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: 1.06;
}

h2 {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: clamp(1.65rem, 4vw, 3rem);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--blush-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  min-height: 100vh;
  padding: 28px;
  place-items: center;
  background:
    linear-gradient(rgba(255, 249, 244, 0.18), rgba(255, 249, 244, 0.78)),
    url("../images/portada-desktop.jpg") center / cover fixed;
}

.hero-card {
  width: min(92vw, 540px);
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(163, 146, 126, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(10px);
}

.hero-logo {
  width: min(260px, 70vw);
  margin: 0 auto 24px;
}

.hero-date {
  margin-bottom: 26px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--blush-dark);
  border-radius: 999px;
  background: var(--blush-dark);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--gold);
}

.button-light {
  background: var(--white);
  color: var(--blush-dark);
}

.button-soft {
  background: var(--white);
  color: var(--blush-dark);
}

.countdown,
.phrase,
.gallery,
.map,
.calendar-section,
.form-section,
.music,
.hashtag {
  padding: clamp(56px, 8vw, 96px) 20px;
}

.countdown,
.phrase,
.music,
.hashtag,
footer {
  text-align: center;
}

.countdown-grid,
.details,
.actions-section,
.gallery-grid,
.rsvp-form {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.countdown-grid div,
.details article,
.actions-section article,
.rsvp-form {
  border: 1px solid rgba(163, 146, 126, 0.22);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 38px rgba(53, 45, 47, 0.08);
}

.countdown-grid div {
  padding: 24px 10px;
}

.countdown-grid strong {
  display: block;
  color: var(--blush-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.9;
}

.countdown-grid span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.phrase {
  background: #f2dfd8;
}

.phrase p {
  width: min(820px, 100%);
  margin: 0 auto;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.18rem, 2.7vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.55;
}

.details,
.actions-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: clamp(56px, 8vw, 96px) 16px;
}

.details article,
.actions-section article {
  padding: 28px;
  text-align: center;
}

.details img,
.actions-section img,
.music img,
.hashtag img {
  width: 76px;
  margin: 0 auto 18px;
}

.details p,
.actions-section p,
.music p,
.hashtag p {
  color: var(--muted);
}

.section-heading {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.calendar-section {
  background: #f8e9e2;
  text-align: center;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.gallery {
  background: #ead2c8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-item {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: 0 18px 46px rgba(53, 45, 47, 0.14);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 250ms ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.map iframe {
  display: block;
  width: min(1080px, calc(100% - 32px));
  height: 440px;
  margin: 0 auto;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.actions-section {
  grid-template-columns: repeat(2, 1fr);
  background: #ead2c8;
  box-shadow: 0 0 0 100vmax #ead2c8;
  clip-path: inset(0 -100vmax);
}

details {
  margin-top: 16px;
}

summary {
  cursor: pointer;
  color: var(--blush-dark);
  font-weight: 800;
}

.music {
  background:
    linear-gradient(rgba(255, 246, 242, 0.95), rgba(255, 246, 242, 0.98)),
    url("../images/background-canciones.png") center / cover fixed;
}

.music-player {
  width: min(680px, calc(100% - 32px));
  margin: 22px auto;
}

.music-player iframe {
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
}

.hashtag {
  background: #f5ddd5;
  color: var(--white);
}

.hashtag h2,
.hashtag p {
  color: var(--gold);
}

.hashtag img {
  opacity: 0.78;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  max-width: 680px;
  padding: clamp(22px, 5vw, 38px);
}

.rsvp-form label,
.rsvp-form legend {
  color: var(--gold);
  font-weight: 800;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px 12px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}

.rsvp-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
}

.rsvp-form fieldset label {
  font-weight: 500;
}

.rsvp-form button {
  width: 100%;
  cursor: pointer;
}

footer {
  padding: 22px;
  background: var(--blush-dark);
  color: var(--white);
}

footer p {
  margin: 0;
}

.back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.modal-open {
  overflow: hidden;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(34, 25, 28, 0.86);
}

.gallery-modal.is-open {
  display: flex;
}

.gallery-modal img {
  max-width: min(980px, 82vw);
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gallery-close,
.gallery-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.gallery-close {
  top: 18px;
  right: 18px;
}

.gallery-prev {
  left: 18px;
}

.gallery-next {
  right: 18px;
}

@media (max-width: 760px) {
  .hero {
    padding: 16px;
    background-image:
      linear-gradient(rgba(255, 249, 244, 0.12), rgba(255, 249, 244, 0.72)),
      url("../images/portada-mobile.jpg");
    background-attachment: scroll;
  }

  .countdown-grid,
  .details,
  .actions-section,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .map iframe {
    height: 340px;
  }

  .calendar-actions .button {
    width: 100%;
  }

  .gallery-modal {
    padding: 14px;
  }

  .gallery-modal img {
    max-width: 100%;
  }

  .gallery-nav {
    bottom: 18px;
    top: auto;
  }
}
