/* ==========================================================================
   ENY Logo Reveal — Capas animadas del logo en el hero
   ========================================================================== */

.eny-logo-reveal {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, 80vw);
  aspect-ratio: 1;
  height: auto;
  pointer-events: none;
  z-index: 1;
}

/* ---- CAPAS ---- */
.eny-logo-reveal__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

/* Yantra — base, más lenta, mayor profundidad */
.eny-logo-reveal__layer--yantra {
  z-index: 1;
  opacity: 0.7;
  filter: drop-shadow(0 4px 16px rgba(61, 50, 41, 0.12));
  animation: eny-logo-breathe-yantra 6s ease-in-out infinite;
  transform-origin: center center;
}

/* Mandala/Araucarias — intermedio */
.eny-logo-reveal__layer--mandala {
  z-index: 2;
  opacity: 0.75;
  filter: drop-shadow(0 2px 10px rgba(61, 50, 41, 0.08));
  animation: eny-logo-breathe-mandala 5s ease-in-out infinite 0.8s;
  transform-origin: center center;
}

/* Ring — capa superior, más rápida */
.eny-logo-reveal__layer--ring {
  z-index: 3;
  opacity: 0;
  animation: eny-logo-appear-ring 1.2s ease-out forwards 0.3s;
  filter: drop-shadow(0 1px 6px rgba(61, 50, 41, 0.06));
}

/* ---- APARICIÓN EN CARGA ---- */
@keyframes eny-logo-appear-ring {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- RESPIRACIÓN ---- */
@keyframes eny-logo-breathe-yantra {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.015) rotate(0.4deg);
  }
  50% {
    transform: scale(1.025) rotate(0deg);
  }
  75% {
    transform: scale(1.015) rotate(-0.4deg);
  }
}

@keyframes eny-logo-breathe-mandala {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  30% {
    transform: scale(1.012) rotate(-0.3deg);
  }
  60% {
    transform: scale(1.02) rotate(0.3deg);
  }
}

/* ---- ENSA BLAMIENTO SUTIL (scroll) ---- */
:root {
  --eny-logo-progress: 0;
  --eny-logo-breath: 0;
}

/* Cuando scroll progress > 0.1, las capas se alinean suavemente */
.eny-logo-reveal[data-progress="assembling"] .eny-logo-reveal__layer--yantra {
  transform: scale(calc(1 + var(--eny-logo-progress) * 0.03));
}
.eny-logo-reveal[data-progress="assembling"] .eny-logo-reveal__layer--mandala {
  transform: scale(calc(1 + var(--eny-logo-progress) * 0.02));
}
.eny-logo-reveal[data-progress="assembling"] .eny-logo-reveal__layer--ring {
  transform: scale(calc(1 + var(--eny-logo-progress) * 0.01));
}

/* ---- VARIANT: DENTRO DEL HERO ---- */
.enya-hero .eny-logo-reveal {
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .eny-logo-reveal {
    width: min(260px, 70vw) !important;
  }
}

@media (max-width: 600px) {
  .eny-logo-reveal {
    width: min(160px, 48vw) !important;
    top: 2% !important;
  }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .eny-logo-reveal__layer--yantra,
  .eny-logo-reveal__layer--mandala,
  .eny-logo-reveal__layer--ring {
    animation: none !important;
    opacity: 0.7;
  }
  .eny-logo-reveal {
    animation: none !important;
  }
  :root {
    --eny-logo-progress: 0;
  }
}