/* =========================================================
   COMPONENTES
   ========================================================= */

/* ---------- Bienvenida ---------- */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--color-bg);
  transition: opacity 1s ease, visibility 1s ease;
}

.welcome.is-opening {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.welcome__names {
  color: var(--color-primary);
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 0.85;
}

.welcome__ornament {
  position: absolute;
  color: var(--color-primary);
  font-family: var(--font-detail);
  font-size: 3rem;
  opacity: 0.45;
}

.welcome__ornament--top {
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.welcome__ornament--bottom {
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
}

/* ---------- Sobre ---------- */
.envelope-wrap {
  width: min(72vw, 330px);
  aspect-ratio: 1.42;
  display: grid;
  place-items: center;
  perspective: 1500px;
}

.envelope {
  position: relative;
  width: 100%;
  height: 70%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 25px rgba(45,45,43,0.12));
  transition: transform 1.2s var(--transition);
}

.envelope__back,
.envelope__front,
.envelope__flap {
  position: absolute;
  inset: 0;
  background: var(--color-white);
  border: 1px solid rgba(123, 2, 29, 0.22);
}

.envelope__back {
  z-index: 1;
}

.envelope__front {
  z-index: 4;
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
}

.envelope__flap {
  z-index: 5;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: #fffdf5;
  transition: transform 1s var(--transition);
}

.envelope__paper {
  position: absolute;
  z-index: 2;
  left: 12%;
  right: 12%;
  bottom: 4%;
  height: 72%;
  display: grid;
  place-items: center;
  background: var(--color-bg);
  border: 1px solid rgba(123, 2, 29, 0.12);
  transform: translateY(0);
  transition: transform 1s var(--transition);
}

.envelope__names {
  color: var(--color-primary);
  font-size: clamp(1.6rem, 6vw, 2.6rem);
}

.envelope__seal {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 55%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-primary);
  color: var(--color-bg);
  font-family: var(--font-detail);
  font-size: 1.2rem;
  transition: opacity 500ms ease;
}

.envelope.is-open .envelope__flap {
  transform: rotateX(180deg);
}

.envelope.is-open .envelope__paper {
  transform: translateY(-85%);
}

.envelope.is-open .envelope__seal {
  opacity: 0;
}

/* ---------- Botones ---------- */
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: transform 300ms ease, background 300ms ease, color 300ms ease;
}

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

.button--outline {
  background: transparent;
  color: var(--color-primary);
}

.button--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.button--light {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-primary);
}

.button--light:hover {
  background: transparent;
  color: var(--color-white);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  background-image: url("../img/portada/portada\ final.jpg.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  overflow: hidden;
}

/* Capa sobre la fotografía */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.25);

  z-index: 0;
}

/* Contenido por encima */
.hero__inner,
.hero .ornament {
  position: relative;
  z-index: 1;
}


/* ---------- Versículo ---------- */
.verse__text {
  margin: var(--space-4) 0 var(--space-2);
  font-size: clamp(1rem, 2.4rem, 1.3rem);
  font-style: italic;
  line-height: 1.8;
}

.verse cite {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- Fotografía ---------- */
.photo-section,
.closing {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.placeholder-image {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(123,2,29,.10), rgba(45,45,43,.12)),
    repeating-linear-gradient(
      45deg,
      rgba(123,2,29,.04) 0,
      rgba(123,2,29,.04) 1px,
      transparent 1px,
      transparent 12px
    ),
    #e8e1d1;
  color: rgba(45,45,43,.55);
  text-align: center;
}

.photo-section__image,
.closing__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.photo-section__overlay,
.closing__overlay {
  position: absolute;
  inset: 0;
}

/* Mensaje: degradado más oscuro para mejorar el contraste y la lectura */
.photo-section__overlay {
  background:
    linear-gradient(
      to top,
      rgba(18, 18, 18, .94) 0%,
      rgba(24, 24, 24, .82) 28%,
      rgba(35, 35, 35, .48) 52%,
      rgba(45, 45, 43, .10) 78%,
      rgba(255, 255, 255, .02) 100%
    );
}

/* Despedida: conserva un degradado más suave */
.closing__overlay {
  background: linear-gradient(
    to top,
    rgba(45,45,43,.78) 0%,
    rgba(45,45,43,.18) 68%,
    rgba(45,45,43,.03) 100%
  );
}

.photo-section__content,
.closing__content {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12%;
  width: min(90%, 700px);
  transform: translateX(-50%);
  color: var(--color-white);
  text-align: center;
}

.photo-section__title,
.closing__title {
  margin: 0.5rem 0 1rem;
  font-size: clamp(3.5rem, 12vw, 7rem);
  line-height: 0.85;
}

.photo-section__text {
  max-width: 520px;
  margin: auto;
  font-size: 1rem;
}

/* ---------- Fecha ---------- */
.date-section {
  text-align: center;
}

.date-section__weekday,
.date-section__month,
.date-section__year {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.date-section__weekday {
  margin-top: var(--space-2);
  font-size: 0.72rem;
}

.date-section__day {
  margin: 0.3rem 0;
  color: var(--color-primary);
  font-family: var(--font-detail);
  font-size: clamp(7rem, 28vw, 13rem);
  line-height: 0.75;
}

.date-section__month {
  font-size: 0.8rem;
}

.date-section__year {
  margin-top: 0.35rem;
  font-family: var(--font-detail);
  font-size: 1rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 650px;
  margin: var(--space-3) auto 0;
  border-top: 1px solid rgba(123,2,29,.25);
  border-bottom: 1px solid rgba(123,2,29,.25);
  padding: var(--space-3) 0;
}

.countdown__item {
  display: grid;
  gap: 0.25rem;
  text-align: center;
  border-right: 1px solid rgba(123,2,29,.18);
}

.countdown__item:last-child {
  border-right: 0;
}

.countdown__item strong {
  color: var(--color-primary);
  font-family: var(--font-detail);
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.countdown__item span {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Cronograma ---------- */
.timeline {
  position: relative;
  max-width: 600px;
  margin: var(--space-6) auto 0;
  text-align: left;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 1px;
  background: rgba(123,2,29,.25);
}

.timeline__item {
  position: relative;
  padding: 0 0 var(--space-6) 45px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  top: 0;
  left: 4px;
  width: 13px;
  height: 13px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-bg);
}

.timeline time {
  color: var(--color-primary);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.timeline h3 {
  margin: 0.35rem 0;
  font-size: 1.45rem;
  font-weight: 400;
}

.timeline p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ---------- Lugares ---------- */
.location-section {
  display: grid;
  min-height: 100svh;
  background: var(--color-bg);
}

.location-section__image {
  min-height: 55svh;
}

.location-section__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-3);
  text-align: center;
}

.location-section__content p:not(.section-script) {
  margin: 0 0 var(--space-2);
  line-height: 1.7;
}

/* =========================================================
   CÓDIGO DE VESTIMENTA — UNA ILUSTRACIÓN CENTRADA
   ========================================================= */

.dresscode__illustrations {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  margin: 35px auto;
}

.dresscode__figure {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  max-width: 280px;

  border: none;
}

.dresscode__image {
  display: block;

  width: 100%;
  height: auto;

  max-height: 500px;

  object-fit: contain;
}


/* ---------- Confirmación ---------- */
.confirmation {
  text-align: center;
}

.guest-card {
  margin: var(--space-5) auto;
  padding: var(--space-4);
  border-top: 1px solid rgba(255,255,255,.35);
  border-bottom: 1px solid rgba(255,255,255,.35);
}

.guest-card__name {
  margin: 0.5rem 0;
  font-size: clamp(3rem, 11vw, 5rem);
  line-height: 0.9;
}

.guest-card__places {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ---------- Despedida ---------- */
.closing__content {
  bottom: 50%;
  transform: translate(-50%, 50%);
}

.closing__content > p:not(.closing__title) {
  font-size: 0.95rem;
}

.closing__ornament {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-detail);
  font-size: 2rem;
}

/* ---------- Música ---------- */
.music-control {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(123,2,29,.35);
  border-radius: 50%;
  background: rgba(255,252,239,.92);
  color: var(--color-primary);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}


/* =========================================================
   AJUSTES SEPTIEMBRE 2026
   ========================================================= */

/* ---------- Portada: fotografía 9:6 + texto marfil ---------- */
.hero {
  min-height: auto;
  aspect-ratio: 9 / 6;
  padding: 0;
  background-position: center;
}

.hero::before {
  background: rgba(45, 45, 43, 0.28);
}

.hero .eyebrow,
.hero .display,
.hero .display span,
.hero .hero__date {
  color: var(--color-bg);
}

.hero__inner {
  padding: var(--space-6) var(--space-3);
}

/* Flores de portada */
.hero__flower {
  position: absolute;
  z-index: 1;
  width: clamp(130px, 22vw, 330px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 12px 22px rgba(45,45,43,.12));
}

.hero__flower--top-left {
  top: -2%;
  left: -1%;
}

.hero__flower--bottom-right {
  right: -1%;
  bottom: -2%;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

/* ---------- Versículo: mejor jerarquía ---------- */
.verse .section-script {
  font-size: clamp(2.1rem, 6.2vw, 3.7rem);
  line-height: 0.95;
}

.verse__text {
  font-size: clamp(0.95rem, 1.7vw, 1.18rem);
}

.verse__flower {
  display: block;
  width: min(72vw, 250px);
  height: auto;
  margin: var(--space-4) auto 0;
  pointer-events: none;
}

/* ---------- Fecha ---------- */
.date-section__flower {
  display: block;
  width: min(68vw, 360px);
  height: auto;
  margin: var(--space-4) auto var(--space-3);
  pointer-events: none;
}

/* ---------- Cronograma centrado y serpenteante ---------- */
.timeline--serpentine {
  max-width: 760px;
  margin-top: var(--space-5);
  padding: var(--space-2) 0;
  text-align: center;
}

.timeline--serpentine::before,
.timeline--serpentine .timeline__dot {
  display: none;
}

.timeline__path {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.timeline__path path {
  fill: none;
  stroke: rgba(123, 2, 29, .42);
  stroke-width: .35;
  stroke-dasharray: 1.6 1.8;
  vector-effect: non-scaling-stroke;
}

.timeline--serpentine .timeline__item {
  z-index: 1;
  width: 100%;
  padding: 0 0 clamp(2.4rem, 6vw, 4.5rem);
}

.timeline--serpentine .timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__event {
  position: relative;
  width: min(76%, 390px);
  margin: 0 auto;
  padding: 0.9rem 1rem;
  background: rgba(255,252,239,.78);
}

.timeline__illustration {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
  background: transparent;
}

.timeline--serpentine time {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-detail);
  font-size: 1.1rem;
}

.timeline--serpentine h3 {
  margin: 0.2rem 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 400;
}

.timeline--serpentine p {
  max-width: 310px;
  margin: 0 auto;
}

/* ---------- Código de vestimenta ---------- */
.dresscode__figure p {
  font-weight: 700;
  font-size: 0.78rem;
}

.dresscode__image {
  width: 100%;
  min-height: 190px;
  height: 260px;
  object-fit: contain;
  border: 0;
  outline: 0;
  background: transparent;
}

/* ---------- Confirmación ---------- */
.confirmation__contact {
  margin: 0 auto var(--space-3);
  max-width: 420px;
  color: rgba(255,255,255,.92);
  font-size: 0.95rem;
}

.confirmation__contact strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--color-white);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.confirmation__message-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
}

.confirmation__message-preview {
  width: min(100%, 520px);
  margin: 0 auto var(--space-3);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ---------- Donativo: QR más discreto ---------- */
.donation__qr-frame {
  width: min(52vw, 210px);
  padding: 10px;
}

.donation__qr-card {
  max-width: 360px;
  padding: 24px 20px 22px;
}

.donation__qr-title {
  margin-bottom: 14px;
}

/* Eliminación definitiva de ornamentos tipo corazón/flor tipográfica */
.welcome__ornament,
.hero .ornament,
.divider,
.donation__ornament,
.closing__ornament {
  display: none !important;
}


/* ---------- Donativo voluntario ---------- */
.donation {
  background: var(--color-bg);
  color: var(--color-text);
  text-align: center;
}

.donation__intro {
  max-width: 520px;
  margin: 0 auto 42px;
  font-size: 1rem;
  line-height: 1.7;
}

.donation__accounts {
  width: min(100%, 720px);
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.donation-card {
 padding: 28px 22px;
  background: rgba(255,255,255,.35);
  box-shadow: 0 12px 30px rgba(45,45,43,.07);
}

.donation-card__name {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-size: clamp(2rem, 4vw, 2.4rem);
}

.donation-card__bank {
  margin: 0 0 10px;
  font-size: 0.84rem;
  letter-spacing: .04em;
}

.donation-card__number {
  margin: 0 0 18px;
  font-weight: 500;
  letter-spacing: .08em;
  word-break: break-all;
}

.button--small {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.65rem;
}

.donation__qr-card {
  width: min(100%, 360px);
  margin: 0 auto;
  background: rgba(255,255,255,.35);
  box-shadow: 0 18px 42px rgba(45,45,43,.09);
}

.donation__qr-title {
  color: var(--color-primary);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.donation__qr-frame {
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: var(--color-bg);
  border: 1px solid rgba(123, 2, 29, .30);
  display: grid;
  place-items: center;
}

.donation__qr {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.donation__qr-caption {
  margin: 16px 0 0;
  font-size: 0.78rem;
  letter-spacing: .04em;
}

.donation__thanks {
  max-width: 500px;
  margin: 30px auto 0;
  font-size: 0.88rem;
  line-height: 1.7;
  font-style: italic;
}

/* =========================================================
   CORRECCIÓN DE IMÁGENES QUE NO LLENAN EL CONTENEDOR
   ========================================================= */

.photo-section__image,
.closing__image {
  overflow: hidden;
}

.photo-section__image img,
.closing__image img {
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;
  object-position: center;
}

/* =========================================================
   FLORES ANCLADAS AL SOBRE - PANTALLA DE BIENVENIDA
   ========================================================= */

.envelope-wrap {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* Las flores se posicionan respecto al sobre, no respecto a toda
   la pantalla. Así mantienen su composición en celular y escritorio. */
.welcome__flower {
  position: absolute;
  z-index: 5;
  height: auto;
  pointer-events: none;
  user-select: none;
  max-width: none;
}

/* Arreglo inferior izquierdo */
.welcome__flower--envelope-left {
  width: clamp(130px, 28vw, 260px);
  left: -18%;
  bottom: -22%;
  transform: rotate(-2deg);
  transform-origin: center;
}

/* Arreglo superior derecho */
.welcome__flower--envelope-right {
  width: clamp(130px, 28vw, 260px);
  right: -20%;
  top: -24%;
  transform: rotate(2deg);
  transform-origin: center;
}

/* El sobre queda visualmente por debajo de las flores */
.official-envelope {
  position: relative;
  z-index: 2;
}

.official-envelope__image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Nombre personalizado del invitado ---------- */

.guest-card__name {
  text-transform: none !important;
}