/* =========================================================
   Lola & Ale · Save the Date
   Estética mediterránea / náutica en acuarela
   ========================================================= */

:root {
  --navy: #1e3a5f;
  --cobalt: #235b93;
  --ocean: #6ba3c9;
  --sky: #a9cce0;
  --mist: #eaf2f8;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* El scroll nativo está desactivado (overflow: hidden); la paginación
   entre secciones la controla js/main.js animando scrollTop directamente,
   lo que evita el rebote de asentamiento del scroll-snap nativo. */
#scrollContainer {
  scrollbar-width: none; /* Firefox */
}
#scrollContainer::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* =========================================================
   Fade In / Fade Out de secciones (IntersectionObserver)
   ========================================================= */
.section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
}

.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Menú hamburguesa
   ========================================================= */
.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.4s ease, opacity 0.3s ease;
}

/* Estado abierto → transformar en "X" */
body.menu-open #menuToggle .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.menu-open #menuToggle .hamburger-line:nth-child(2) {
  opacity: 0;
}
body.menu-open #menuToggle .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   Selector de idioma
   ========================================================= */
.lang-btn {
  color: var(--navy);
  opacity: 0.45;
}
.lang-btn.active {
  color: var(--cobalt);
  opacity: 1;
}
.lang-btn:hover {
  opacity: 0.85;
}

/* Enlaces del menú lateral */
.menu-link {
  position: relative;
  color: var(--navy);
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}
.menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--ocean);
  transition: width 0.4s ease;
}
.menu-link:hover,
.menu-link.active {
  color: var(--cobalt);
}
.menu-link:hover::after,
.menu-link.active::after {
  width: 100%;
}

/* =========================================================
   Cuenta atrás
   ========================================================= */
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.countdown-num {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 500;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  margin-top: 6px;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean);
}

.countdown-dot {
  align-self: flex-start;
  margin-top: 0.45rem;
  color: var(--navy);
  opacity: 0.2;
  font-size: 1.6rem;
  line-height: 1;
}

/* =========================================================
   Olas decorativas de fondo (Hero)
   ========================================================= */
.wave-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* El color se estabiliza en #fdfdfd (idéntico a la fila superior de lighthouse.jpg)
     antes de llegar al punto donde empieza la imagen del faro, para que no se note el corte */
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, var(--mist) 55%, #fdfdfd 68%, #fdfdfd 100%);
}
/* Faro de acuarela anclado a la parte inferior de la portada */
.hero-lighthouse {
  position: absolute;
  /* Contenedor a pantalla completa: la imagen (escalada por ancho) puede
     extenderse hacia arriba tanto como necesite para no recortar la punta
     del faro, sea cual sea la proporción de la pantalla. */
  inset: 0;
  z-index: 1;
  background-image: url("lighthouse.jpg?v=2");
  /* Escalado por ancho: la imagen siempre mide el 100% del ancho (de punta a
     punta horizontalmente) y su altura es proporcional. Anclada abajo. */
  background-size: 100% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
  /* Fundido anclado al borde superior de la imagen: la máscara usa el mismo
     tamaño/posición relativos (%) que la propia imagen —nunca vw/px fijos—
     para que el degradado suba con ella y el redimensionado siga siendo
     fluido y proporcional al cambiar el viewport. */
  -webkit-mask: linear-gradient(to top, #000 82%, transparent 100%);
  mask: linear-gradient(to top, #000 82%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}

/* =========================================================
   Indicador de scroll
   ========================================================= */
.scroll-pill {
  display: inline-block;
  white-space: nowrap;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--navy);
}

.scroll-arrow-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: bob-move 1.8s infinite ease-in-out;
}

.scroll-arrow {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--navy);
  border-bottom: 1.5px solid var(--navy);
  transform: rotate(45deg);
  animation: bob-fade 1.8s infinite ease-in-out;
}

/* El backplate circular se traslada junto con la flecha (misma animación de
   movimiento) para que esta permanezca siempre centrada dentro del círculo;
   el desvanecimiento se anima por separado solo en la flecha. */
@keyframes bob-move {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@keyframes bob-fade {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* =========================================================
   Botón "copiar dirección" (sección El Lugar)
   ========================================================= */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--ocean);
  transition: color 0.25s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.copy-btn svg {
  width: 16px;
  height: 16px;
}
.copy-btn:hover {
  color: var(--cobalt);
}
.copy-btn.copied {
  color: var(--cobalt);
  transform: scale(1.1);
}

/* =========================================================
   Cronograma / timeline del evento (sección El Evento)
   ========================================================= */
.timeline {
  position: relative;
}
/* Línea vertical central */
.timeline::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--ocean) 8%,
    var(--ocean) 92%,
    transparent 100%
  );
  opacity: 0.55;
}

.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.25rem;
}

/* Todos los elementos de una fila comparten la misma fila del grid,
   independientemente de la columna asignada (evita que el auto-placement
   los reparta en filas implícitas en las filas invertidas). */
.tl-icon,
.tl-node,
.tl-text {
  grid-row: 1;
}

/* Nodo sobre la línea */
.tl-node {
  grid-column: 2;
  width: 11px;
  height: 11px;
  border-radius: 9999px;
  background: var(--mist);
  border: 2px solid var(--ocean);
  z-index: 1;
}

/* Icono (columna izquierda por defecto) */
.tl-icon {
  grid-column: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  color: var(--ocean);
}
.tl-icon svg {
  width: 38px;
  height: 38px;
}
/* Icono de fiesta: viewBox 30 renderizado más grande para mantener el
   px-por-unidad constante (esfera ×1.5, símbolos flotantes a tamaño real). */
.tl-icon--party svg {
  width: 47.5px;
  height: 47.5px;
}

/* Texto (columna derecha por defecto) */
.tl-text {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}

/* Filas invertidas: icono a la derecha, texto a la izquierda */
.tl-row--flip .tl-icon {
  grid-column: 3;
  justify-self: start;
}
.tl-row--flip .tl-text {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.tl-time {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}
.tl-label {
  margin-top: 3px;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(30, 58, 95, 0.7);
}
.tl-detail {
  margin-top: 2px;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 0.72rem;
  color: rgba(30, 58, 95, 0.5);
}

@media (min-width: 640px) {
  .tl-icon svg {
    width: 44px;
    height: 44px;
  }
  .tl-icon--party svg {
    width: 55px;
    height: 55px;
  }
  .tl-time {
    font-size: 1.35rem;
  }
  .tl-label {
    font-size: 0.68rem;
  }
}

/* =========================================================
   Sección intro (foto + texto)
   ========================================================= */
.intro-photo {
  position: relative;
  width: 100%;
  /* Desde justo debajo del menú (pt de la sección) hasta la mitad de la
     pantalla; escala con la resolución (siempre ~50vh de alto). */
  height: calc(50vh - 4rem);
  /* El tercio inferior se desvanece a transparente para fundirse con el fondo. */
  -webkit-mask: linear-gradient(to bottom, #000 0%, #000 67%, transparent 100%);
  mask: linear-gradient(to bottom, #000 0%, #000 67%, transparent 100%);
}
.intro-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ancla el recorte/zoom a la altura del anillo (mano de la novia),
     en vez del centro exacto, al ensancharse la pantalla. */
  object-position: 53% 64%;
  /* Escala de azules (duotono) en tono claro/acuarela: brillo alto y contraste
     bajo para aportar blancos y aclarar el fondo. */
  filter: grayscale(1) sepia(0.6) hue-rotate(170deg) saturate(1.15) brightness(1.35)
    contrast(0.72);
  opacity: 0.92;
}

/* =========================================================
   Cómo llegar (bloques de direcciones)
   ========================================================= */
.dir-block {
  max-width: 22rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  /* En escritorio, dos columnas de igual ancho */
  .dir-block {
    flex: 1;
    margin: 0;
  }
}
.dir-title {
  /* Misma tipografía que "El Far Hotel Restaurant" en la sección El Lugar:
     Playfair Display normal (sin cursiva), text-lg y color navy. */
  font-family: "Playfair Display", serif;
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.dir-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1.1rem;
  text-align: left;
}
.dir-icon {
  flex-shrink: 0;
  color: var(--ocean);
  display: inline-flex;
  padding-top: 0.1rem;
}
.dir-icon svg {
  width: 30px;
  height: 30px;
}
.dir-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(30, 58, 95, 0.8);
}
.dir-mode {
  font-weight: 600;
  color: var(--navy);
}
.dir-text a {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s ease;
}
.dir-text a:hover {
  color: var(--navy);
}

/* =========================================================
   Alojamiento (botones Booking / Airbnb)
   ========================================================= */
.stay-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--ocean);
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cobalt);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.stay-btn:hover {
  background-color: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

/* =========================================================
   Regalo (datos de cuenta EUR / USD)
   ========================================================= */
.acct-block {
  /* Ancho fijo e idéntico en ambos bloques, para que el texto quede
     alineado entre sí; el grupo se centra desde el contenedor padre. */
  width: min(19rem, 100%);
  text-align: left;
}
.acct-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.5rem;
}
/* El resto del texto (nombre, IBAN, BIC/SWIFT, BIC Corresponsal) comparte
   tipografía, tamaño y peso normal, en tono gris. */
.acct-row,
.acct-label {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: #4b5563;
}
.acct-row {
  margin-top: 0.35rem;
}
.acct-label {
  margin-right: 0.25rem;
}
.acct-iban {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* =========================================================
   Dresscode (selector Ellos / Ellas + silueta con llamadas)
   ========================================================= */
.dress-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--ocean);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.6);
}
.dress-tab {
  padding: 0.45rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cobalt);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.dress-tab:hover {
  background: rgba(107, 163, 201, 0.15);
}
.dress-tab.is-active {
  background: var(--cobalt);
  color: #fff;
}

.dress-panels {
  width: 100%;
}
.dress-panel {
  display: flex;
  width: 100%;
  justify-content: center;
}
.dress-panel[hidden] {
  display: none;
}

/* Contenedor de la figura: la relación de aspecto coincide con el viewBox
   del SVG (400×320), de modo que las etiquetas HTML posicionadas en % caen
   exactamente donde terminan las líneas guía dibujadas en el SVG. Se limita
   por alto (vh) para que la sección siga cabiendo en una pantalla. */
.dress-figure {
  position: relative;
  /* Cuadrado (como la ilustración). El tercer término reserva el alto que
     ocupan título, textos y selector (~28rem) para que la sección quepa en
     pantalla en móviles bajos; en pantallas altas manda el ancho. */
  width: min(100%, 24rem, calc(100vh - 28rem));
  aspect-ratio: 1 / 1;
}
/* Ilustración: imagen cuadrada (1024×1024) recortada a su franja central
   (40 % del ancho del contenedor = mitad central de la imagen) y fundida con
   el fondo mediante multiply, de modo que el blanco del PNG desaparece. */
.dress-photo {
  position: absolute;
  top: 0;
  left: 30%; /* (100 % − 40 %) / 2: centrada sin transform, que usa la animación */
  height: 100%;
  width: 40%;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.dress-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* Halo claro bajo cada línea guía para que se lea al cruzar el traje */
.dress-leader-halo {
  fill: none;
  stroke: var(--mist);
  stroke-opacity: 0.9;
  stroke-width: 3.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.dress-leader {
  fill: none;
  stroke: var(--ocean);
  stroke-width: 1.1;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.dress-dot {
  fill: var(--ocean);
  stroke: #fff;
  stroke-width: 1.2;
}

.dress-label {
  position: absolute;
  top: var(--y);
  width: 33%;
  margin: 0;
  transform: translateY(-50%);
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(30, 58, 95, 0.85);
}
/* Etiqueta inferior: el texto crece hacia arriba desde la línea guía para
   no salirse del contenedor en pantallas bajas. */
.dress-label--up {
  transform: translateY(-82%);
}
.dress-label--left {
  right: calc(100% - var(--x));
  text-align: right;
}
.dress-label--right {
  left: var(--x);
  text-align: left;
}
@media (min-width: 640px) {
  .dress-label {
    font-size: 0.8rem;
  }
}
/* Pantallas bajas (móviles pequeños): la figura se encoge, así que la letra
   de las etiquetas también, para que no se solapen entre sí. */
@media (max-height: 700px) {
  .dress-label {
    font-size: 0.66rem;
    line-height: 1.3;
  }
}

/* Animación de entrada: la silueta aparece y las llamadas se van
   encendiendo una a una. Se reinicia cada vez que la sección se hace
   visible (clase .is-visible) o al cambiar de pestaña (display: none → flex). */
.section.is-visible .dress-photo {
  animation: dress-rise 0.7s ease both;
}
.section.is-visible .dress-callout,
.section.is-visible .dress-label {
  opacity: 0;
  animation: dress-fade 0.5s ease forwards;
  animation-delay: calc(0.45s + var(--i) * 0.14s);
}
@keyframes dress-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes dress-fade {
  to {
    opacity: 1;
  }
}

/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .section,
  .hamburger-line,
  #menuOverlay,
  #sideMenu,
  .dress-tab {
    transition: none !important;
  }
  .scroll-arrow,
  .scroll-arrow-circle {
    animation: none;
  }
  .section.is-visible .dress-photo,
  .section.is-visible .dress-callout,
  .section.is-visible .dress-label {
    animation: none;
    opacity: 1;
  }
}
