/* =============================================
   SPLENDOR VITA — Animaciones y Transiciones Premium
   ============================================= */

/* Clases de reveal — GSAP maneja opacity/transform vía JS.
   NO se pre-setean en CSS para que gsap.from() capture el estado
   natural del elemento como destino correcto de la animación. */

/* Fallback cuando GSAP termina */
.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Loader de página ────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              visibility 0.7s ease;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page-loader__logo {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  color: var(--color-text-inverse);
  animation: loader-breathe 2s ease-in-out infinite;
}

/* ── Línea decorativa animada ────────────── */
.animated-line {
  width: 0;
  height: 1px;
  background: var(--color-secondary);
  transition: width 1.2s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.animated-line.active {
  width: 60px;
}

/* ── Category cards ──────────────────────── */
.category-card {
  overflow: hidden;
  position: relative;
}
.category-card img {
  transition: transform 1.2s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.category-card:hover img {
  transform: scale(1.08);
}
.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-xl);
  color: white;
  transition: background 0.6s ease;
}
.category-card:hover .category-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.12) 70%);
}

/* ── Cursor follower (decorativo) ────────── */
.cursor-follower {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              height 0.4s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              opacity 0.3s;
  mix-blend-mode: difference;
}

/* ── Selection color premium ─────────────── */
::selection {
  background: rgba(201, 169, 110, 0.25);
  color: var(--color-text);
}

/* ── Smooth image loading ────────────────── */
img {
  opacity: 1;
  transition: opacity 0.4s ease;
}
/* Las imágenes lazy ya no se ocultan por defecto — el browser maneja el
   fade-in nativo. Esto evita parpadeos cuando ScrollTrigger no las detecta a tiempo. */

/* ── Focus states premium ────────────────── */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}
