* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --invitation-width: 27rem;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: Georgia, serif;
  background: #eeede7;
  color: #5f6a5a;
}

h1, h2, h3, h4, h5, h6 {
  color: #3d5a3a;
}

/* ---------- Contenido principal ---------- */
#main-content {
  width: min(var(--invitation-width), 100%);
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100dvh;
  container-type: inline-size;
  container-name: invitation;
}

@media (min-width: 27rem) {
  html,
  body {
    background: #e4e2d9;
  }

  #main-content {
    background: #eeede7;
    box-shadow: 0 0 0 1px rgba(141, 113, 63, 0.22);
  }
}

.intro-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  background: #eeede7;
}

.intro-screen {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  background: #eeede7;
}

.intro-screen.needs-tap {
  cursor: pointer;
}

.intro-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(1.15rem, env(safe-area-inset-bottom));
  margin: 0;
  color: #8d713f;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.intro-screen.is-playing .intro-hint {
  opacity: 0;
}

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5c4528;
  cursor: pointer;
  transform: translateX(-50%);
  animation: scroll-cue 1.5s ease-in-out infinite;
}

.scroll-cue[hidden] {
  display: none;
}

.scroll-cue svg {
  width: 2.15rem;
  height: 2.15rem;
}

@keyframes scroll-cue {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(0.4rem); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue {
    animation: none;
  }
}

.song-player {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 200px;
  height: 113px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.music-toggle {
  position: fixed;
  right: max(
    0.85rem,
    env(safe-area-inset-right),
    calc((100% - min(100%, var(--invitation-width))) / 2 + 0.85rem)
  );
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid #8d713f;
  border-radius: 50%;
  background: rgba(238, 237, 231, 0.92);
  color: #8d713f;
  cursor: pointer;
}

.music-toggle[hidden] {
  display: none;
}

.music-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.music-toggle.is-paused {
  opacity: 0.55;
}

html.is-sealed,
html.is-sealed body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

html.is-sealed body {
  position: fixed;
  inset: 0;
  width: 100%;
  touch-action: none;
}

.intro-title {
  width: min(40rem, 100%);
  margin-inline: auto;
  padding:
    clamp(2rem, 6cqw, 4rem)
    max(1.25rem, env(safe-area-inset-right))
    clamp(2rem, 6cqw, 4rem)
    max(1.25rem, env(safe-area-inset-left));
  text-align: center;
}

.intro-title {
  padding-top: max(2.75rem, env(safe-area-inset-top));
}

.intro-title h1 {
  font-size: clamp(1.75rem, 6cqw, 3rem);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
}

.title-image {
  display: block;
  width: min(36rem, 100%);
  height: auto;
  margin-inline: auto;
}

.program-title + .title-image {
  margin-top: 0.35rem;
}

.reel {
  width: min(19rem, 86%);
  margin: 1.75rem auto 0;
}

.reel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.reel-track::-webkit-scrollbar {
  display: none;
}

.reel-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  min-width: 0;
  height: 22rem;
  margin: 0;
  padding-inline: 0.45rem;
  scroll-snap-align: start;
}

.reel-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 2px solid #8d713f;
  border-radius: 15%;
}

.reel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.reel-button {
  border: 0;
  background: transparent;
  color: #3d5a3a;
  font-family: Georgia, serif;
  font-size: 1.45rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  cursor: pointer;
}

.reel-dots {
  display: flex;
  gap: 0.42rem;
}

.reel-dot {
  width: 0.38rem;
  height: 0.38rem;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #c5cbb8;
  cursor: pointer;
}

.reel-dot.is-active {
  background: #3d5a3a;
}

.intro-title > p:not(.subtitle):not(.place-name):not(.place-city):not(.place-time):not(.place-note):not(.dress-text) {
  width: min(22rem, 100%);
  margin: 2.75rem auto 0;
  padding-inline: 1.15rem;
  font-size: clamp(0.92rem, 2.4cqw, 1.02rem);
  line-height: 1.75;
}

.divider {
  width: 1in;
  height: 1px;
  margin: 3.75rem auto 2.75rem;
  background: #7d9a78;
}

.intro-title .subtitle {
  margin: 0;
  color: #3d5a3a;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.date-frame {
  position: relative;
  width: min(25rem, calc(100% + 1.75rem));
  margin: 2.25rem 0 0;
  left: 50%;
  transform: translateX(-50%);
}

.date-image {
  display: block;
  width: 100%;
  height: auto;
}

.church-image {
  display: block;
  width: min(25rem, calc(100% + 1.75rem));
  height: auto;
  margin: 7.5rem 0 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.church-image + .subtitle,
.lunch-image + .subtitle,
.music-image + .subtitle {
  margin-top: 1.5rem;
}

.lunch-image,
.music-image,
.dress-image {
  display: block;
  width: min(25rem, calc(100% + 1.75rem));
  height: auto;
  margin: 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.dress-image + .place-title {
  margin-top: 1.45rem;
}

.dress-text {
  width: min(22rem, 100%);
  margin: 0.25rem auto 0;
  color: #5f6a5a;
  font-size: clamp(0.92rem, 2.4cqw, 1.02rem);
  line-height: 1.75;
}

.intro-title .reserved-colors {
  margin-top: 2rem;
  line-height: 1.7;
}

.color-swatches {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.35rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.color-swatches li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 4.4rem;
  color: #3d5a3a;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.swatch {
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid #8d713f;
  border-radius: 50%;
}

.swatch-white {
  background: #ffffff;
}

.swatch-beige {
  background: #d2be9c;
}

.swatch-navy {
  background: #2c4460;
}

.gifts-image {
  display: block;
  width: min(18rem, 82%);
  height: auto;
  margin: 0.45rem auto 0;
}

.place-title {
  margin-top: 1.35rem;
  font-size: clamp(1.4rem, 5cqw, 2.25rem);
  line-height: 1.25;
}

.program-title {
  margin-top: 0;
}

.schedule-image {
  display: block;
  width: min(23rem, 100%);
  height: auto;
  margin: 1.75rem auto 0;
  transform: translateX(-0.45rem);
}

.place-name {
  margin-top: 0.7rem;
  color: #000;
  font-size: clamp(1rem, 2.8cqw, 1.12rem);
  line-height: 1.4;
}

.place-city,
.place-note {
  margin-top: 0.45rem;
  color: #3d5a3a;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.place-time {
  margin-top: 1.25rem;
  color: #8d713f;
  font-style: italic;
  font-size: clamp(1.2rem, 4cqw, 1.35rem);
  line-height: 1.2;
}

.closing-line {
  width: min(20rem, 92%);
  margin: 1.5rem auto 0;
  font-size: clamp(1.05rem, 3.6cqw, 1.25rem);
  line-height: 1.55;
}

.closing-line + .dress-text {
  margin-top: 0.9rem;
}

.closing-name {
  margin: 1.85rem 0 0;
  color: #000;
  font-size: clamp(1.02rem, 4.4cqw, 1.4rem);
  font-weight: normal;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

.intro-title .closing-date {
  margin-top: 0.8rem;
}

.final-video {
  position: relative;
  width: min(24rem, 100%);
  margin: 2.35rem auto 0.25rem;
}

.final-video-player {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #8d713f;
  border-radius: 1.15rem;
  background: #d9d6cc;
  cursor: pointer;
}

.final-cue {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.42rem 0.95rem;
  border: 1px solid #8d713f;
  border-radius: 999px;
  background: rgba(238, 237, 231, 0.92);
  color: #8d713f;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.2;
  cursor: pointer;
}

.final-cue[hidden] {
  display: none;
}

.final-video.is-playing .final-video-player {
  cursor: auto;
}

.place-note {
  margin-top: 0.7rem;
  line-height: 1.7;
}

.song-form {
  width: min(17rem, 82%);
  margin: 1.65rem auto 0;
}

.song-form input {
  display: block;
  width: 100%;
  padding: 0.35rem 0.25rem 0.45rem;
  border: 0;
  border-bottom: 1px solid #8d713f;
  border-radius: 0;
  background: transparent;
  color: #5f6a5a;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.song-form input::placeholder {
  color: #6f7b68;
  opacity: 1;
}

.song-form button {
  display: block;
  width: fit-content;
  margin: 0.95rem auto 0;
  padding: 0.38rem 0.85rem;
  border: 1px solid #8d713f;
  border-radius: 999px;
  background: transparent;
  color: #3d5a3a;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
}

.song-form button:hover,
.song-form button:focus-visible {
  background: #3d5a3a;
  color: #eeede7;
  outline: none;
}

.song-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  color: #3d5a3a;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.song-list:empty {
  display: none;
}

.rsvp-form {
  width: min(18.5rem, 88%);
  margin: 1.85rem auto 0;
  text-align: left;
}

.rsvp-form > label {
  display: block;
  margin-top: 1.7rem;
  color: #5f6a5a;
  font-size: 0.98rem;
  line-height: 1.3;
}

.rsvp-form > label:first-of-type {
  margin-top: 0.35rem;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="tel"] {
  display: block;
  width: 100%;
  margin-top: 0.7rem;
  padding: 0 0 0.4rem;
  border: 0;
  border-bottom: 1px solid #8d713f;
  border-radius: 0;
  background: transparent;
  color: #3d5a3a;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.rsvp-form input[type="text"]:focus,
.rsvp-form input[type="tel"]:focus {
  border-bottom-color: #3d5a3a;
}

.rsvp-choice {
  margin: 1.7rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.rsvp-choice legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rsvp-choice label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.72rem;
  color: #3d5a3a;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.rsvp-choice input {
  -webkit-appearance: none;
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  border: 1.5px solid #8d713f;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.rsvp-choice input:checked::after {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #3d5a3a;
}

.rsvp-choice input:focus-visible {
  outline: 1px solid #3d5a3a;
  outline-offset: 2px;
}

.rsvp-form button {
  display: block;
  width: fit-content;
  margin: 1.45rem auto 0;
  padding: 0.38rem 0.85rem;
  border: 1px solid #8d713f;
  border-radius: 999px;
  background: transparent;
  color: #3d5a3a;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
}

.rsvp-form button:hover,
.rsvp-form button:focus-visible {
  background: #3d5a3a;
  color: #eeede7;
  outline: none;
}

.rsvp-thanks,
.rsvp-error {
  margin: 1.15rem 0 0;
  color: #3d5a3a;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.rsvp-error {
  color: #8d713f;
}

.rsvp-form.is-sent button {
  display: none;
}

.place-map {
  width: min(19rem, 82%);
  height: 12.5rem;
  margin: 2.25rem auto 0;
  border: 2px solid #8d713f;
  border-radius: 15%;
  overflow: hidden;
}

.place-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.countdown {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 78%;
  color: #3d5a3a;
}

.countdown-row {
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3cqw, 1.2rem);
}

.countdown-days .countdown-value {
  font-size: clamp(1.7rem, 7cqw, 2.2rem);
}

.countdown-note {
  margin: 0.1rem 0 0;
  color: #8d713f;
  font-style: italic;
  font-size: clamp(0.78rem, 3cqw, 0.95rem);
  line-height: 1.2;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.6rem;
}

.countdown-value {
  font-size: clamp(1.35rem, 5.5cqw, 1.85rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  margin-top: 0.35rem;
  font-size: clamp(0.5rem, 2cqw, 0.62rem);
  letter-spacing: 0.14em;
  line-height: 1;
}

