/* ============================================================
   Invitación · Guillermina y Fernando · "Cumplimos 100"
   Paleta "Verde secos" tomada del diseño de Figma.
   Todos los valores finos viven como variables para poder
   ajustarlos en un solo lugar.
   ============================================================ */

:root {
  /* --- Paleta (referencia de colores "Verde secos") --- */
  --green-900: #3f4926; /* 5753 · verde oscuro (secciones/titulares) */
  --green-700: #5f663a; /* 5763 */
  --green-600: #767c4e; /* 5773 */
  --olive-500: #9c9d73; /* 5783 · tarjeta RSVP / hojas */
  --sage-300: #b6b78f;  /* 5793 */
  --sage-200: #c6c6a4;  /* 803  */
  --sage-100: #dadbb9;  /* 5743 · más claro */

  --bg: #d2d4bd;        /* fondo principal de la invitación */
  --on-dark: #d2d4bd;   /* texto/separador/etc. claros sobre verde oscuro */

  /* --- Roles semánticos --- */
  --ink: var(--green-900);            /* texto principal */
  --page-bg: var(--sage-300);         /* telón detrás de la tarjeta (desktop) */

  /* --- Tipografías (exactas del diseño) --- */
  --font-serif: "Baskervville", Georgia, "Times New Roman", serif; /* titulares y números */
  --font-sc: "Baskervville SC", Georgia, serif;                    /* small caps: rótulos y botones */
  --font-body: "Sorts Mill Goudy", Georgia, serif;                 /* párrafos y datos del lugar */
  --font-cinzel: "Cinzel", Georgia, serif;                         /* botón "Cómo llegar" */
  --font-script: "Luxurious Script", "Segoe Script", cursive;      /* firma final */

  /* --- Layout --- */
  --col: 480px;                        /* ancho de la columna de la invitación */
  --pad: clamp(1.1rem, 5vw, 2rem);     /* padding horizontal fluido */
  --radius-pill: 999px;
}

html,
body {
  overflow-x: hidden; /* red de seguridad contra desbordes horizontales */
}

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
}

/* Columna central: en desktop se ve como una tarjeta tipo teléfono */
.invite {
  max-width: var(--col);
  margin-inline: auto;
  background: var(--bg);
  box-shadow: 0 10px 40px rgba(63, 73, 38, 0.25);
  overflow: hidden;
}

/* Contenedor con padding horizontal reutilizable */
.wrap {
  padding-inline: var(--pad);
}

/* ============================================================
   Utilidades tipográficas
   ============================================================ */
.eyebrow {
  font-family: var(--font-sc);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
}

/* Separador: línea de 2px, centrada. El ancho y el color se definen
   por instancia (ver .date .divider y .venue__sep). */
.divider {
  height: 2px;
  background: currentColor;
  margin-inline: auto;
}

/* ============================================================
   Botones
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-sc); /* Baskervville SC (small caps) por defecto */
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  padding: 0.72em 2em;
  border-radius: var(--radius-pill);
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.btn:active {
  transform: translateY(0);
}

/* Claro sobre fondo verde · texto verde oscuro */
.btn--light {
  color: var(--green-900);
}
/* Verde sobre fondo claro (Cómo llegar) · texto claro */
.btn--dark {
  background: var(--green-900);
  color: var(--on-dark);
}

/* Fondos específicos de cada botón claro (colores exactos del diseño) */
#calendar-btn {
  background: #d2d4bd; /* AGENDAR FECHA */
}
#rsvp-open {
  background: #c6c6a4; /* CONFIRMAR ASISTENCIA */
}

/* "Cómo llegar" usa Cinzel */
#maps-btn {
  font-family: var(--font-cinzel);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 2.4rem var(--pad) 0;
  text-align: center;
}

.hero__logo {
  width: 62%;
  margin: 0 auto 0.6rem;
}

.hero__cumplimos {
  font-family: var(--font-serif); /* Baskervville */
  font-size: clamp(2.2rem, 13vw, 3.7rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--green-900);
  line-height: 1;
}

.hero__100 {
  width: 66%;
  margin: 0.4rem auto 0;
}

.hero__photo {
  width: 100%;
  margin-top: 1.6rem;
}

.hero__intro {
  font-family: var(--font-body); /* Sorts Mill Goudy */
  font-size: 1.55rem;
  line-height: 1.5;
  color: var(--ink); /* #3F4926 */
  padding: 2.2rem var(--pad) 2.4rem;
  text-align: center;
}

/* ============================================================
   FECHA / COUNTDOWN (bloque verde)
   ============================================================ */
.date {
  background: var(--green-900); /* #3F4926 */
  color: var(--on-dark); /* #D2D4BD para todo el texto de la sección */
  text-align: center;
  padding: 2.6rem var(--pad) 2.8rem;
}

.date__eyebrow {
  margin-bottom: 0.5rem;
}

.date__day {
  font-family: var(--font-serif); /* Baskervville */
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.05;
}

.date__time {
  font-family: var(--font-sc); /* Baskervville SC */
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  margin-top: 0.35rem;
  margin-bottom: 1.4rem;
}

/* Separador countdown: ~179/375 del ancho, color #D2D4BD (heredado) */
.date .divider {
  width: 55%;
  margin-bottom: 1.8rem;
}

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.15rem, 1.2vw, 0.5rem);
  margin-bottom: 2rem;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(2.5rem, 11vw, 3.6rem);
}
.countdown__num {
  font-family: var(--font-serif); /* Baskervville */
  font-size: clamp(2.1rem, 10vw, 3.1rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}
.countdown__sep {
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  opacity: 0.85;
}
.countdown--ended {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

/* ============================================================
   INVITACIÓN / LUGAR (bloque claro con hojas)
   ============================================================ */
.venue {
  position: relative;
  text-align: center;
  padding: 2.8rem var(--pad) 2.6rem;
}

/* El contenido va por encima de las hojas decorativas */
.venue__deco {
  position: relative;
  z-index: 1;
}

.venue__lead {
  font-family: var(--font-body); /* Sorts Mill Goudy */
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--ink); /* #3F4926 */
  max-width: 23rem;
  margin: 0 auto 1.4rem;
  padding-inline: 0.5rem;
}

/* Separador arriba del logo de ESENCIA: ~170/375 del ancho, #3F4926 */
.venue__sep {
  width: 52%;
  margin: 0 auto 1.2rem;
}

/* Hojas decorativas — reproducción de assets/images/posicion-plantas.png.
   Ramas verticales finas a los costados, con mix-blend-mode: overlay.
   Los valores se calibran contra esa imagen de referencia. */
.leaf {
  position: absolute;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  mix-blend-mode: overlay;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}
/* Izquierda: plant-image-right (plantas intercambiadas de lado) */
.leaf--left {
  background-image: url("../assets/images/plant-image-right.png");
  width: 57.5%;
  aspect-ratio: 185.27 / 259.33;
  left: -17%;
  top: 4.4rem;
  transform: rotate(8.47deg);
}
/* Derecha: plant-image-left (plantas intercambiadas de lado) */
.leaf--right {
  background-image: url("../assets/images/plant-image-left.png");
  width: 58%;
  aspect-ratio: 187.25 / 261.74;
  left: 58%;
  top: 3.8rem;
  transform: rotate(173.37deg);
}

.venue__badge {
  width: 24%;
  margin: 0 auto 1.1rem;
}

.venue__name {
  font-family: var(--font-body); /* Sorts Mill Goudy */
  font-size: 1.95rem;
  font-weight: 400;
  color: var(--green-900);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.venue__address {
  font-family: var(--font-body); /* Sorts Mill Goudy */
  font-size: 1.25rem;
  color: var(--ink); /* #3F4926 */
  margin: 0.2rem 0 1.6rem;
}

/* ============================================================
   RSVP (tarjeta oliva)
   ============================================================ */
.rsvp {
  padding: 0 var(--pad) 2.8rem;
}
.rsvp__card {
  background: var(--olive-500);
  border-radius: 22px;
  text-align: center;
  padding: 2.4rem 1.6rem 2.6rem;
}
.rsvp__title {
  font-family: var(--font-serif); /* Baskervville */
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--green-900);
}
.rsvp__subtitle {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink); /* #3F4926 */
  margin: 0.3rem 0 1.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  text-align: center;
  padding: 0.6rem var(--pad) 2.8rem;
}
.foot__details {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink); /* #3F4926 */
  margin-bottom: 1.6rem;
}
.foot__signature {
  font-family: var(--font-script);
  font-size: 2.9rem;
  line-height: 1;
  color: var(--green-900);
}

/* ============================================================
   Animaciones de entrada al hacer scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
}

/* El padding y las tipografías clave usan clamp()/vw, por lo que
   escalan de forma fluida entre ~320px y el ancho máximo de la
   columna (480px) sin necesidad de breakpoints adicionales. */

/* ============================================================
   DESKTOP / pantallas más grandes que un celular (≥ 768px)
   Mismo diseño del móvil (mismo orden, tipografías y colores),
   escalado ~1.6x y ocupando toda la pantalla:
   · El fondo crema de .invite se extiende a TODO el ancho (sin
     márgenes ni sombra) → la pantalla queda llena.
   · La banda verde de la fecha se vuelve full-bleed (borde a
     borde) para dar un aire inmersivo.
   · El resto del contenido (incluida la foto, sin recortar) se
     centra en una columna de 30rem — que a este font-size raíz
     equivale a la MISMA proporción que los 480px del móvil, así
     los cortes de texto y todas las calibraciones (cuenta
     regresiva, hojas) quedan idénticos, sólo que más grandes.
   ============================================================ */
@media (min-width: 768px) {
  html {
    font-size: 26px; /* ~1.6x → 30rem = 780px ≈ la columna del móvil escalada */
  }

  .invite {
    max-width: none; /* el fondo crema ocupa toda la pantalla */
    box-shadow: none;
  }

  /* Contenido centrado en una columna proporcional a la del móvil */
  .hero,
  .hero__photo,
  .hero__intro,
  .venue,
  .rsvp,
  .foot {
    max-width: 30rem; /* = 480px a 16px; a 26px ≈ 780px, misma proporción */
    margin-inline: auto;
  }

  /* Banda verde de la fecha a todo el ancho, con su contenido centrado */
  .date > * {
    max-width: 30rem;
    margin-inline: auto;
  }
}
