/* Uliana & Nahuel — landing de invitación
   Usa los tokens de ../tokens/colors.css y ../tokens/typography.css (importados via styles.css) */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-on-light);
  font-family: var(--font-body);
  font-weight: var(--weight-body-regular);
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

button { font-family: var(--font-body); }

/* ---------- Escala tipográfica ----------
   Se usa en toda la web sin excepciones (salvo la portada y el hero,
   que son "momentos" de marca y no secciones de contenido):
   Título    -> var(--fs-title)     Birthstone, headline de cada sección
   Subtítulo -> var(--fs-subtitle)  Montserrat 600 mayúscula tracked, etiquetas/kickers
   Cuerpo    -> var(--fs-body)      Montserrat 300/400, párrafos
   Small     -> var(--fs-small)     Montserrat, texto secundario/meta (datos, hints)
------------------------------------------- */

:root {
  --fs-title: 46px;
  --fs-title-mobile: 35px;
  --fs-subtitle: 16px;
  --fs-body: 16px;
  --fs-small: 13px;

  --gutter: 32px;
}

@media (max-width: 560px) {
  :root { --gutter: 22px; }
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Bandas de fondo ---------- */
/* Solo 3 fondos permitidos por el sistema de diseño: blanco, arena, oliva.
   Cada sección alterna entre ellos para separarse visualmente. */

.band {
  width: 100%;
}

.band--arena { background: var(--bg-primary); color: var(--text-on-light); }
.band--white { background: var(--color-white); color: var(--text-on-light); }
.band--olive { background: var(--color-olive); color: var(--color-white); }

/* ---------- Detalle decorativo: hojas de esquina ---------- */
/* Solo en secciones con fondo arena indicadas puntualmente (hero, lugar y fecha,
   dresscode, canciones). Puramente ornamental: no interactivo, siempre detrás del contenido.
   La raíz de la rama siempre mira hacia la esquina (afuera); las hojas, hacia el contenido (adentro).
   Se alterna la diagonal (arriba-izq/abajo-der vs arriba-der/abajo-izq) sección por sección. */

.leaf-corners {
  position: relative;
  z-index: 0;
}

.leaf-corners::before,
.leaf-corners::after {
  content: '';
  position: absolute;
  top: 0;
  width: 168px;
  height: 143px;
  background: url('../images/decor/leaves.png') no-repeat center / contain;
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
}

.leaf-corners::after {
  top: auto;
  bottom: 0;
}

/* Diagonal A: hoja arriba-izquierda + abajo-derecha */
.leaf-corners--a::before { left: 0; transform: scaleY(-1); }
.leaf-corners--a::after  { right: 0; transform: scaleX(-1); }

/* Diagonal B: hoja arriba-derecha + abajo-izquierda */
.leaf-corners--b::before { right: 0; transform: rotate(180deg); }
.leaf-corners--b::after  { left: 0; transform: none; }

/* Hero: mucho más grandes, a modo de decoración de carátula */
.leaf-corners--lg::before,
.leaf-corners--lg::after {
  width: 320px;
  height: 273px;
}

/* Hero: arte a medida provisto ya orientado (solo desktop por ahora, sin rotación nuestra) */
@media (min-width: 561px) {
  #hero.leaf-corners::before {
    width: 340px;
    height: 340px;
    background-image: url('../images/decor/hero-tl.png');
    transform: none;
  }

  #hero.leaf-corners::after {
    width: 340px;
    height: 340px;
    background-image: url('../images/decor/hero-br.png');
    transform: none;
  }
}

@media (max-width: 560px) {
  .leaf-corners::before,
  .leaf-corners::after {
    width: 122px;
    height: 104px;
  }

  .leaf-corners--lg::before,
  .leaf-corners--lg::after {
    width: 220px;
    height: 188px;
  }
}

/* ---------- Utilidades ---------- */

.eyebrow {
  font-size: var(--fs-subtitle);
  font-weight: var(--weight-body-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: currentColor;
}

.icon-chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(167,180,141,0.3);
  color: var(--color-olive);
}

.band--olive .icon-chip {
  background: rgba(255,255,255,0.16);
  color: var(--color-white);
}

.icon-chip svg {
  width: 22px;
  height: 22px;
}

.divider {
  width: 40px;
  height: 2px;
  background: var(--color-terracotta);
  border-radius: 2px;
  opacity: 0.7;
  margin: 18px auto;
}

.btn {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 100px;
  border: 1px solid transparent;
  font-size: var(--fs-small);
  font-weight: var(--weight-body-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

.btn--olive { background: var(--color-olive); color: var(--color-white); }
.btn--outline { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.btn--white { background: var(--color-white); color: var(--color-olive); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.3,1), transform 0.9s cubic-bezier(.2,.7,.3,1);
}

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

/* ---------- Portada de carga ---------- */

.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-olive);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  text-align: center;
  transition: opacity 0.9s ease, visibility 0.9s;
}

.cover.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover__kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.9;
}

.cover__names {
  font-family: var(--font-display);
  font-size: 68px;
  color: var(--color-white);
  line-height: 1.1;
}

.cover__date {
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--color-white);
  opacity: 0.9;
}

/* ---------- Hero ---------- */
/* Momento de marca a pantalla completa: única excepción a la escala de títulos. */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding-top: 40px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1;
}

.hero__date {
  font-size: var(--fs-subtitle);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 20px;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.countdown__num {
  font-family: var(--font-body);
  font-weight: var(--weight-body-semibold);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.75;
}

.countdown__sep {
  font-family: var(--font-body);
  font-weight: var(--weight-body-semibold);
  font-size: 26px;
  color: var(--color-terracotta);
  padding-top: 2px;
  opacity: 0.8;
}

/* ---------- Secciones genéricas ---------- */

.section {
  padding-top: 100px;
  padding-bottom: 100px;
  text-align: center;
}

.section--tight { padding-top: 70px; padding-bottom: 70px; }

.section__title {
  font-family: var(--font-display);
  font-size: 64px;
}

/* ---------- Historia / fotos ---------- */

.photo-carousel {
  position: relative;
  margin-bottom: 32px;
}

.carousel__viewport {
  --edge-fade: 34px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black var(--edge-fade), black calc(100% - var(--edge-fade)), transparent);
  mask-image: linear-gradient(to right, transparent, black var(--edge-fade), black calc(100% - var(--edge-fade)), transparent);
}

.carousel__track {
  --slide-w: clamp(240px, 74vw, 380px);
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px calc((100% - var(--slide-w)) / 2);
}

.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 auto;
  width: var(--slide-w);
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: center;
  background: var(--color-white);
  box-shadow: 0 6px 22px rgba(107,122,79,0.18);
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel__arrow {
  position: absolute;
  top: calc(50% - 10px);
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-white);
  color: var(--color-olive);
  box-shadow: 0 2px 10px rgba(107,122,79,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.carousel__arrow:hover { transform: translateY(-50%) scale(1.06); }
.carousel__arrow svg { width: 18px; height: 18px; }
.carousel__arrow--prev { left: 12px; }
.carousel__arrow--next { right: 12px; }

.carousel__arrow[disabled] { opacity: 0; pointer-events: none; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--color-sage);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.carousel__dot.is-active {
  background: var(--color-terracotta);
  opacity: 1;
  transform: scale(1.3);
}

@media (max-width: 700px) {
  .carousel__arrow { display: none; }
}

.story__text {
  font-family: var(--font-body);
  font-weight: var(--weight-body-regular);
  font-size: var(--fs-body);
  line-height: 1.8;
  padding: 0 8px;
}

/* ---------- Lugar y fecha ---------- */

.location__venue {
  font-family: var(--font-display);
  font-size: var(--fs-title);
}

.location__salon {
  margin-top: 4px;
  font-size: var(--fs-subtitle);
  font-weight: var(--weight-body-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location__date { font-size: var(--fs-body); margin-top: 18px; }

/* ---------- Itinerario (línea de tiempo interactiva) ---------- */

.timeline {
  position: relative;
  text-align: left;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.timeline__track {
  position: absolute;
  left: 15px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: rgba(167,180,141,0.55);
  border-radius: 2px;
}

.timeline__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--color-terracotta);
  border-radius: 2px;
}

.timeline__item {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 130px;
}

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

.timeline__dot-col {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.timeline__dot {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-sage);
  color: var(--color-olive);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
}

.timeline__dot svg { width: 16px; height: 16px; }

.timeline__item.is-active .timeline__dot {
  background: var(--color-olive);
  border-color: var(--color-olive);
  color: var(--color-white);
  opacity: 1;
  transform: scale(1.08);
}

@keyframes timelinePulse {
  0% { box-shadow: 0 0 0 0 rgba(201,122,76,0.55); }
  100% { box-shadow: 0 0 0 16px rgba(201,122,76,0); }
}

.timeline__dot.is-pulsing { animation: timelinePulse 0.75s ease-out; }

.timeline__content { padding-top: 5px; }

.timeline__time {
  font-size: var(--fs-subtitle);
  font-weight: var(--weight-body-semibold);
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.timeline__label {
  font-size: var(--fs-body);
  padding-top: 2px;
  transition: opacity 0.35s ease;
}

.timeline__item:not(.is-active) .timeline__label { opacity: 0.6; }

/* ---------- Dresscode ---------- */

.dresscode__note {
  font-size: var(--fs-body);
  margin-top: 14px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ---------- Regalos ---------- */

.gifts__intro {
  font-family: var(--font-body);
  font-weight: var(--weight-body-regular);
  font-size: var(--fs-body);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

.gift-cards {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 36px;
}

.gift-card {
  flex: 1 1 280px;
  width: 100%;
  max-width: 320px;
  background: var(--color-white);
  color: var(--text-on-light);
  border: 1px solid rgba(107,122,79,0.14);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(107,122,79,0.12);
  text-align: left;
  overflow: hidden;
}

.gift-card__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 22px;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gift-card__title {
  font-family: var(--font-body);
  font-weight: var(--weight-body-semibold);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.gift-card__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-terracotta);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.gift-card.is-open .gift-card__chevron { transform: rotate(180deg); }

.gift-card__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
}

.gift-card__body {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gift-card__body-inner {
  padding: 0 22px 22px;
}

.gift-card.is-open .gift-card__body {
  opacity: 1;
  transform: translateY(0);
}

.gift-card__details {
  font-size: var(--fs-body);
  line-height: 1.9;
  padding-top: 14px;
  border-top: 1px solid rgba(107,122,79,0.14);
}

.gift-card__alias {
  font-weight: var(--weight-body-semibold);
  cursor: pointer;
  border-bottom: 1px dashed var(--color-terracotta);
}

.gift-card__copy-hint {
  display: block;
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--color-olive);
  color: var(--color-white);
  font-size: var(--fs-small);
  letter-spacing: 0.05em;
  padding: 12px 22px;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Música de fondo ---------- */

.music-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--color-olive);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(107,122,79,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 190;
}

.music-toggle.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.music-toggle.is-visible:hover { transform: scale(1.06); }

.music-toggle__icon {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.music-toggle__icon--pause { opacity: 0; transform: scale(0.7); }

.music-toggle.is-playing .music-toggle__icon--play { opacity: 0; transform: scale(0.7); }
.music-toggle.is-playing .music-toggle__icon--pause { opacity: 1; transform: scale(1); }

/* ---------- Modal de mapa (Cómo llegar) ---------- */

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.map-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(82, 96, 64, 0.6);
}

.map-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: min(80vh, 640px);
  background: rgba(107,122,79,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(45,53,32,0.35);
  transform: scale(0.94) translateY(10px);
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1);
}

.map-modal.is-open .map-modal__panel {
  transform: scale(1) translateY(0);
}

.map-modal__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-modal__card {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 76px);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-white);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 12px rgba(45,53,32,0.28);
}

.map-modal__title {
  font-size: var(--fs-small);
  font-weight: var(--weight-body-semibold);
  line-height: 1.3;
  color: var(--text-on-light);
}

.map-modal__link {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(107,122,79,0.14);
  color: var(--color-olive);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-modal__link svg { width: 16px; height: 16px; }

.map-modal__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--color-white);
  color: var(--color-olive);
  box-shadow: 0 2px 12px rgba(45,53,32,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.map-modal__close svg { width: 16px; height: 16px; }

/* ---------- Canciones ---------- */

.songs__title { max-width: 380px; margin: 0 auto 14px; }

.songs__text {
  font-size: var(--fs-body);
  max-width: 420px;
  margin: 0 auto 26px;
  line-height: 1.6;
}

/* ---------- Confirmación ---------- */

.rsvp__title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  margin-bottom: 10px;
}

.rsvp__text { font-size: var(--fs-body); margin-bottom: 26px; }

/* ---------- Info: alojamiento y traslados ---------- */

.info-group {
  background: var(--color-white);
  color: var(--text-on-light);
  border: 1px solid rgba(107,122,79,0.14);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(107,122,79,0.1);
  text-align: left;
  overflow: hidden;
  margin-bottom: 20px;
}

.info-group:last-child { margin-bottom: 0; }

.info-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 20px 22px;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.info-group__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-subtitle);
  font-weight: var(--weight-body-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}

.info-group__label svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.info-group__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-terracotta);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.info-group.is-open .info-group__chevron { transform: rotate(180deg); }

.info-group__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(.4,0,.2,1);
}

.info-group__body {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-group__body-inner {
  padding: 0 22px 22px;
}

.info-group.is-open .info-group__body {
  opacity: 1;
  transform: translateY(0);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(107,122,79,0.14);
}

.info-item:first-child { padding-top: 0; border-top: none; }

.info-item__name { font-size: var(--fs-body); font-weight: var(--weight-body-medium); }
.info-item__contact { font-size: var(--fs-small); }

/* ---------- Footer ---------- */

.footer {
  padding-top: 90px;
  padding-bottom: 60px;
  text-align: center;
}

.footer__names {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
}

.footer__date {
  font-size: var(--fs-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0.85;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  :root { --fs-title: var(--fs-title-mobile); }

  .cover__names { font-size: 52px; }
  .hero__title { font-size: 46px; }
  .section__title { font-size: 46px; }
  .gift-cards { flex-direction: column; align-items: center; }
  .gift-card { flex-basis: auto; }
  .countdown__item { padding: 0 10px; }
  .countdown__num { font-size: 27px; }
  .countdown__sep { font-size: 20px; }
  .timeline__item { padding-bottom: 100px; }
}
