/* ============================================
   LOADER.CSS — Animación de carga premium
   Casa Bonita · Cajamarca
   ============================================ */

/* Keyframes */
@keyframes loaderFadeIn {
  to { opacity: 1; }
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contenedor principal */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1A0F07;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Bloque central */
.loader__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Ornamentación: línea ◆ línea */
.loader__ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: loaderFadeIn 0.4s ease forwards;
  /* disparo controlado desde JS añadiendo clase .is-visible */
}

.loader__ornament.is-visible {
  animation: loaderFadeIn 0.4s ease forwards;
}

.loader__line {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, #C9A84C, transparent);
}

.loader__diamond {
  color: #C9A84C;
  font-size: 0.6rem;
  line-height: 1;
}

/* Nombre del hotel — letras individuales generadas por JS */
.loader__brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.3em;
  color: #F5EFE0;
  font-weight: 300;
  display: flex;
  align-items: baseline;
  gap: 0.1em;
}

.loader__letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  /* El delay se aplica inline desde JS */
  animation: letterReveal 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Espacio entre CASA y BONITA */
.loader__word-space {
  display: inline-block;
  width: 0.4em;
}

/* Línea divisora que se expande */
.loader__divider {
  width: 0;
  height: 1px;
  background: #C9A84C;
  transition: width 0.6s ease;
  margin: 0 auto;
}

/* Localización */
.loader__location {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: #C9A84C;
  font-weight: 300;
  margin: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Barra de progreso — bottom de la pantalla */
.loader__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, #C9A84C, #F5EFE0);
  transition: width 1.8s ease;
}

/* ============================================
   Loader simple — subpáginas (fade-in/out)
   ============================================ */
.loader__simple-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: #F5EFE0;
  opacity: 0;
  animation: loaderFadeIn 0.5s ease 0.1s forwards;
}
