:root {
  --bg: #fff7ef;
  --bg-soft: #fffdf9;
  --text: #40261d;
  --muted: #7f6256;
  --primary: #c46a4a;
  --primary-dark: #944f39;
  --accent: #d9a441;
  --card: rgba(255, 255, 255, 0.82);
  --shadow: 0 20px 60px rgba(77, 42, 28, 0.16);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(196, 106, 74, 0.14), transparent 30rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.15)),
    url("../assets/images/pattern.svg");
  opacity: .28;
  z-index: -1;
}

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

h1 {
  font-size: clamp(3.8rem, 12vw, 8rem);
  line-height: .9;
  letter-spacing: -0.08em;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h2 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  margin-bottom: 1rem;
}

a {
  color: inherit;
}

code {
  background: rgba(255,255,255,.8);
  padding: .2rem .4rem;
  border-radius: .4rem;
}

.section {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 5.5rem 0;
}

.center {
  text-align: center;
}

.max-width {
  max-width: 680px;
  margin-inline: auto;
}

.eyebrow {
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    linear-gradient(rgba(255, 247, 239, 0.72), rgba(255, 247, 239, 0.92)),
    radial-gradient(circle at center, rgba(217, 164, 65, .35), transparent 28rem),
    var(--bg);
  transition: opacity .8s ease, visibility .8s ease;
}

.intro.hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-card {
  width: min(460px, 100%);
  padding: 1.2rem;
  border-radius: 36px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(12px);
}

.intro-card h1 {
  margin: 1rem 0 .4rem;
  font-size: clamp(2.8rem, 13vw, 5.4rem);
}

.intro-card h2 {
  color: var(--primary-dark);
  font-size: clamp(2rem, 10vw, 4rem);
  margin-bottom: 1.4rem;
}

.intro-photo {
  width: 100%;
  border-radius: 28px;
  display: block;
  box-shadow: 0 18px 40px rgba(64, 38, 29, .12);
}

.intro small {
  display: block;
  color: var(--muted);
  margin-top: .9rem;
}

.hero {
  width: 100%;
  min-height: 92vh;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(64, 38, 29, .18), rgba(64, 38, 29, .42)),
    url("../assets/images/portada.svg") center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fffaf2;
  padding: 1rem;
  text-shadow: 0 8px 30px rgba(43, 25, 17, .28);
}

.hero .subtitle {
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.date-pill {
  display: inline-flex;
  padding: .8rem 1.2rem;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.phrase {
  text-align: center;
  max-width: 860px;
}

.ornament {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

blockquote {
  margin: 0 auto 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 5vw, 3rem);
  line-height: 1.16;
}

.phrase span {
  color: var(--primary-dark);
  font-weight: 700;
}

.countdown {
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius);
  padding: 3rem 1.2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 2rem;
}

.count-grid div {
  border-radius: 22px;
  padding: 1.4rem .6rem;
  background: rgba(255, 247, 239, .9);
  border: 1px solid rgba(196, 106, 74, .16);
}

.count-grid strong {
  display: block;
  font-size: clamp(2rem, 8vw, 4rem);
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary-dark);
}

.count-grid span {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.event-card,
.info-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.84);
  backdrop-filter: blur(10px);
}

.info-card {
  min-height: 260px;
}

.icon {
  font-size: 2.2rem;
  margin-bottom: .9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fffaf3;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(148, 79, 57, .25);
}

.btn.secondary {
  color: var(--primary-dark);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(148, 79, 57, .2);
}

.button-row {
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  margin-top: 1.4rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hint {
  text-align: center;
  color: var(--muted);
  margin-top: 1rem;
}

.final {
  text-align: center;
  padding-bottom: 7rem;
}

.final p:last-child {
  font-size: 1.4rem;
  color: var(--primary-dark);
  font-weight: 800;
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 16px 40px rgba(64, 38, 29, .28);
  font-size: 1.4rem;
  cursor: pointer;
}

.music-toggle.playing {
  animation: pulse 1.8s infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@media (max-width: 760px) {
  .section {
    padding: 4rem 0;
  }

  .cards,
  .gallery {
    grid-template-columns: 1fr;
  }

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

  .hero {
    min-height: 86vh;
  }
}
