:root {
  --cream: #f8f1e3;
  --cream-dark: #efe2c8;
  --panel: #f1e6d2;
  --gold: #b98b52;
  --gold-light: #c9a15a;
  --sage: #8a9a7e;
  --rose: #7f9497;
  --heading: #445659;
  --ink: #4a3c30;
  --ink-soft: #7a6a58;

  --font-display: 'Italiana', serif;
  --font-signature: 'Beau Rivage', cursive;
  --font-script: 'Parisienne', cursive;
  --font-body: 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
}

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

html.intro-lock, html.intro-lock body {
  overflow: hidden;
  height: 100%;
}

/* ENVELOPE INTRO: dos mitades que se separan hacia arriba/abajo */
.envelope-half {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: linear-gradient(155deg, #fffefc 0%, #fbf9f4 55%, #f5f2ea 100%);
  cursor: pointer;
  perspective: 2200px;
  overflow: hidden;
  transition: transform 1.1s cubic-bezier(0.6, 0, 0.2, 1);
}
.envelope-half--top {
  clip-path: polygon(0% 0%, 100% 0%, 100% 26%, 50% 50%, 0% 26%);
  -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 26%, 50% 50%, 0% 26%);
}
.envelope-half--bottom {
  clip-path: polygon(0% 26%, 50% 50%, 100% 26%, 100% 100%, 0% 100%);
  -webkit-clip-path: polygon(0% 26%, 50% 50%, 100% 26%, 100% 100%, 0% 100%);
}
@media (min-width: 600px) {
  .envelope-half--top {
    clip-path: polygon(0% 0%, 100% 0%, 50% 50%);
    -webkit-clip-path: polygon(0% 0%, 100% 0%, 50% 50%);
  }
  .envelope-half--bottom {
    clip-path: polygon(0% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%);
    -webkit-clip-path: polygon(0% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%);
  }
}
.envelope-intro.is-open .envelope-half--top {
  transform: translateY(-100%);
}
.envelope-intro.is-open .envelope-half--bottom {
  transform: translateY(100%);
}
.envelope-intro.is-open .envelope-half {
  pointer-events: none;
}
.envelope-half::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(74, 60, 48, 0) 50%, rgba(74, 60, 48, 0.07) 100%);
  pointer-events: none;
}
.envelope-intro__diagonals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.diagonals-mobile { display: none; }
.diagonals-desktop { display: block; }
@media (max-width: 599px) {
  .diagonals-desktop { display: none; }
  .diagonals-mobile { display: block; }
}
.envelope-intro__diagonals .crease-shadow {
  stroke: #4a3c30;
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: 0.1;
  filter: blur(2.2px);
}
.envelope-intro__diagonals .fold-shadow {
  stroke: #4a3c30;
  stroke-width: 0.4;
  opacity: 0.14;
  filter: blur(0.3px);
}
.envelope-intro__diagonals .fold-line {
  stroke: #d8d0bd;
  stroke-width: 0.4;
  opacity: 0.85;
  filter: blur(0.2px);
}

.envelope-intro__names {
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  line-height: 1.25;
  color: #7f9497;
  margin: 0;
}

.envelope-intro__seal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 78px;
  height: 78px;
  z-index: 1000;
  transform: translate(-50%, -50%);
  animation: seal-breathe 2.6s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(74, 60, 48, 0.4));
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.envelope-intro.is-open .envelope-intro__seal {
  opacity: 0;
  animation: none;
  transform: translate(-50%, -50%) scale(0.4) rotate(20deg);
  pointer-events: none;
}
.envelope-intro__seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes seal-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

.envelope-intro__cta {
  position: absolute;
  bottom: 12%;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.7;
}
.envelope-intro__cta strong {
  display: inline-block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.hero__media {
  position: relative;
  width: 100%;
  height: 100%;
  line-height: 0;
}
.hero__media picture {
  display: block;
  width: 100%;
  height: auto;
}
.hero__img {
  width: 100%;
  height: auto;
  display: block;
  mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
}
@media (min-width: 600px) {
  .hero__media picture {
    height: 100%;
  }
  .hero__img {
    height: 100%;
    object-fit: cover;
    object-position: center center;
    mask-image: none;
    -webkit-mask-image: none;
  }
}
.hero__media::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20%;
  background: linear-gradient(to bottom, rgba(248, 241, 227, 0) 0%, var(--cream) 92%);
  pointer-events: none;
}
@media (min-width: 600px) {
  .hero__media::after { display: block; }
}
@media (max-width: 599px) {
  .hero__media::after { display: none; }
}
.hero__text {
  position: absolute;
  top: 18%;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 2.5vw, 1rem);
  text-align: center;
}
.hero__preheading {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 5.5vw, 2rem);
  line-height: 1.3;
  color: var(--rose);
  margin: 0;
}
.hero__names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  line-height: 1.4;
  letter-spacing: normal;
  color: #7f9497;
  margin: 0;
}
.hero__amp {
  color: inherit;
  font-family: inherit;
  font-style: normal;
  font-size: 1em;
}
.hero__date {
  font-family: var(--font-display);
  letter-spacing: 0.3em;
  font-size: clamp(0.95rem, 3.4vw, 1.2rem);
  font-weight: 700;
  color: #8c672f;
  text-shadow: 0 1px 3px rgba(255, 253, 248, 0.8);
  margin: 0;
}
.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.3rem;
  text-decoration: none;
  z-index: 3;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* SECTIONS */
.section {
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  text-align: center;
}
.section__eyebrow {
  font-family: var(--font-signature);
  color: var(--rose);
  font-size: 1.85rem;
  margin: 0 0 0.5rem;
}
.section__title {
  font-family: var(--font-signature);
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
  color: var(--heading);
}
.section__subtitle {
  color: var(--ink-soft);
  margin-top: 0;
}
.section__script {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--ink);
  margin: 0 0 1rem;
}

.divider {
  text-align: center;
  color: var(--gold-light);
  font-size: 0.8rem;
  opacity: 0.6;
  margin: 0;
}

/* COUNTDOWN */
.countdown__title,
.fine-title {
  font-family: var(--font-signature);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--rose);
  margin: 0;
}
.countdown__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 0.9rem auto 0;
  max-width: 220px;
}
.countdown__divider span {
  flex: 1;
  height: 1px;
  background: var(--gold-light);
  opacity: 0.6;
}
.countdown__divider i {
  font-style: normal;
  font-size: 0.55rem;
  color: var(--gold-light);
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 64px;
  padding: 1.1rem 0.5rem;
  background: #fffdf8;
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(74, 60, 48, 0.1);
}
.countdown__num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}
.countdown__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* SONG */
/* VINYL */
.vinyl {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  cursor: pointer;
}
.vinyl__disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.1), transparent 42%),
    repeating-radial-gradient(circle, #17140f 0px, #17140f 3px, #060503 3px, #060503 6px);
  box-shadow: 0 10px 24px rgba(74, 60, 48, 0.3);
  animation: vinyl-spin 7s linear infinite;
  animation-play-state: paused;
}
.vinyl.is-playing .vinyl__disc {
  animation-play-state: running;
}
@keyframes vinyl-spin {
  to { transform: rotate(360deg); }
}
.vinyl__label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62%;
  height: 62%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #f3e6c8, #d8b876 65%, #b98b52 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), inset 0 -1px 3px rgba(74, 60, 48, 0.3);
}
.vinyl__label-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vinyl__label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10%;
  height: 10%;
  transform: translate(-50%, -50%);
  background: var(--cream);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(74, 60, 48, 0.3);
}
.vinyl__initials {
  position: absolute;
  inset: 0;
}
.vinyl__letter {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-signature);
  font-size: 1.9rem;
  line-height: 1;
}
.vinyl__letter--a {
  transform: translate(-95%, -60%);
  color: var(--ink);
}
.vinyl__letter--j {
  transform: translate(-5%, -40%);
  color: var(--gold);
  opacity: 0.9;
}
.vinyl__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fffdf8;
  font-size: 1.4rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: opacity 0.2s;
}
.vinyl.is-playing .vinyl__icon {
  opacity: 0;
}
.vinyl__hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0.9rem 0 0;
}
.vinyl__playlist {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 340px;
  margin: 1.5rem auto 0;
  line-height: 1.5;
}
.vinyl__playlist a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
}

/* PLACES */
.place__media {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 1.5rem;
  line-height: 0;
}
.place__img.full-bleed {
  width: 100%;
}
.place__media::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(248, 241, 227, 0) 0%, var(--cream) 92%);
  pointer-events: none;
}
.place__title {
  font-family: var(--font-signature);
  font-size: 1.7rem;
  color: var(--heading);
  margin: 0 0 0.25rem;
}
.place__meta {
  color: var(--rose);
  font-weight: 600;
  margin: 0;
}
.place__address {
  color: var(--ink-soft);
  margin: 0.25rem 0 1.25rem;
}
.btn-map {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  padding: 0.6rem 1.6rem;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
}
.btn-map:hover { background: var(--gold); color: #fff; }

@media (min-width: 700px) {
  .section--place {
    max-width: 960px;
  }
  .place__layout {
    display: flex;
    align-items: center;
    gap: 3rem;
  }
  .section--place-reverse .place__layout {
    flex-direction: row-reverse;
  }
  .place__media,
  .place__info {
    flex: 1;
    min-width: 0;
  }
  .place__media {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
  }
  .place__media::after {
    display: none;
  }
  .place__img.full-bleed {
    mask-image: radial-gradient(ellipse 78% 78% at center, #000 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 78% 78% at center, #000 50%, transparent 100%);
  }
  .place__info {
    text-align: left;
  }
}

/* RSVP */
.rsvp__title {
  font-family: var(--font-signature);
  font-size: 1.9rem;
  color: var(--heading);
  margin: 0 0 0.25rem;
}
.rsvp__subtitle {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.4;
}
.steps__item.is-active,
.steps__item.is-done { opacity: 1; }
.steps__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--rose);
}
.steps__item.is-done .steps__num,
.steps__item.is-active .steps__num {
  background: var(--rose);
  color: #fff;
}
.steps__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.steps__line {
  width: 24px;
  height: 1px;
  background: var(--rose);
  opacity: 0.4;
  margin: 0 4px;
  margin-bottom: 1.1rem;
}

.rsvp-form { text-align: left; }
.rsvp-step { display: none; border: none; padding: 0; margin: 0; }
.rsvp-step.is-active { display: block; }

.field {
  display: block;
  margin-bottom: 1.1rem;
}
.field span {
  display: block;
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-light);
}
.field-row {
  display: flex;
  gap: 1rem;
}
.field-row .field { flex: 1; }
.field--small { flex: 0.8; }

.field-intro {
  font-family: var(--font-body);
  color: var(--ink);
  margin: 0 0 1rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.radio-group--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}
.radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}
.radio input { accent-color: var(--rose); width: 18px; height: 18px; }

.rsvp-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.btn-fill, .btn-outline {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.7rem 1.8rem;
  border-radius: 30px;
  cursor: pointer;
  border: 1px solid var(--gold);
}
.btn-fill {
  background: var(--gold);
  color: #fff;
  margin-left: auto;
}
.btn-outline {
  background: transparent;
  color: var(--gold);
}
.btn-outline:disabled { opacity: 0.3; cursor: default; }

.rsvp-thanks {
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--rose);
  padding: 2rem 1rem;
}

/* GIFT */
.gift__text { color: var(--ink); }
.gift__account {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold);
  font-size: 1.15rem;
  border: 1px dashed var(--gold-light);
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  margin: 1rem 0;
}
.gift__thanks {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--ink);
}

/* HOTELS */
.hotels {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  text-align: left;
}
.hotels__item {
  border-bottom: 1px solid var(--cream-dark);
}
.hotels__item:first-child { border-top: 1px solid var(--cream-dark); }

.hotels__accordion {
  padding: 0;
}
.hotels__accordion[open] .hotels__name::after {
  transform: translateY(-50%) rotate(225deg);
}
.hotels__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  padding: 1.1rem 1.7rem 1.1rem 0;
  font-family: var(--font-signature);
  font-size: 1.25rem;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
}
.hotels__name::-webkit-details-marker { display: none; }
.hotels__name::after {
  content: '';
  position: absolute;
  right: 0.15rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.25s ease;
}
.hotels__detail {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 0 0 1.1rem;
}
.hotels__detail a { color: var(--gold); }

/* GALLERY / BOOK */
.book {
  position: relative;
  max-width: 340px;
  margin: 1.75rem auto 0;
  padding: 6px 6px 6px 16px;
}
.book::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 14px;
  background: linear-gradient(to right, #c9b78f, var(--cream) 95%);
  border-radius: 4px 0 0 4px;
  box-shadow: inset -3px 0 5px rgba(74, 60, 48, 0.3);
}
.book__viewport {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  perspective: 1600px;
  border-radius: 4px;
  box-shadow: 0 10px 22px rgba(74, 60, 48, 0.25);
}
.book__page {
  position: absolute;
  inset: 0;
  background: #fbf8f0;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11% 9%;
  transform-style: preserve-3d;
  transform-origin: left center;
  backface-visibility: hidden;
  transition: transform 0.32s ease-in;
}
.book__page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  box-shadow: 0 3px 8px rgba(74, 60, 48, 0.3);
}
.book__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.6);
  backdrop-filter: blur(2px);
  border: none;
  color: var(--gold);
  opacity: 0.9;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
}
.book__arrow:hover {
  opacity: 1;
  background: rgba(255, 253, 248, 0.85);
}
.book__arrow--prev { left: -2.4rem; }
.book__arrow--next { right: -2.6rem; }
.book__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.book__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream-dark);
  cursor: pointer;
  transition: background 0.2s;
}
.book__dot.is-active {
  background: var(--gold);
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem 4rem;
  border-top: 1px solid var(--cream-dark);
  margin-top: 1rem;
}
.footer__names {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--ink);
  margin: 0;
}
.footer__date {
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  margin: 0.25rem 0 0;
}

/* Ajustes finos para pantallas muy pequeñas */
@media (max-width: 400px) {
  .countdown { gap: 0.5rem; }
  .countdown__item { min-width: 52px; padding: 0.9rem 0.35rem; }
  .countdown__num { font-size: 1.6rem; }
  .section { padding: 2.75rem 1.25rem; }
  .hero__names { font-size: 2.7rem; }
}
