/* ============================================================
   JJR GROUP — animations.css
   Keyframes, clases AOS custom, logo slider infinito, efectos
   ============================================================ */

/* ── LOGO SLIDER INFINITO (CSS PURO) ─────────────────────── */
@keyframes scroll-logos {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logos-track {
  animation: scroll-logos 28s linear infinite;
}

.logos-track:hover {
  animation-play-state: paused;
}

/* ── FADE ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── SCALE ANIMATIONS ────────────────────────────────────── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes scaleInUp {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── SLIDE ANIMATIONS ────────────────────────────────────── */
@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── HERO ESPECÍFICO ─────────────────────────────────────── */
@keyframes heroTag {
  0%   { opacity: 0; transform: translateY(-15px) scaleX(0.7); }
  100% { opacity: 1; transform: translateY(0) scaleX(1); }
}

@keyframes heroSubtitle {
  0%   { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes heroCta {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scrollIndicator {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(10px); opacity: 0.4; }
}

.scroll-indicator {
  animation: scrollIndicator 2s ease-in-out infinite;
}

/* ── GLOWING EFFECTS ─────────────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(232,121,10,0.3); }
  50%       { box-shadow: 0 0 40px rgba(232,121,10,0.6); }
}

.glow-primary {
  animation: glow-pulse 2.5s ease-in-out infinite;
}

/* ── NUMBER COUNTER HIGHLIGHT ────────────────────────────── */
@keyframes number-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); color: var(--color-gold); }
  100% { transform: scale(1); }
}

.counter-pop {
  animation: number-pop 0.5s ease-out;
}

/* ── BORDER DRAW ─────────────────────────────────────────── */
@keyframes draw-border-top {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes draw-border-right {
  from { height: 0; }
  to   { height: 100%; }
}

/* ── BLUEPRINT GRID LINES ────────────────────────────────── */
@keyframes grid-appear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── LOADING / SHIMMER ───────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.8s linear infinite;
}

/* ── TEXT REVEAL ─────────────────────────────────────────── */
.text-reveal {
  overflow: hidden;
  display: inline-block;
}

.text-reveal__inner {
  display: inline-block;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.text-reveal.revealed .text-reveal__inner {
  transform: translateY(0);
}

/* ── PARALLAX HELPER ─────────────────────────────────────── */
.parallax-container {
  overflow: hidden;
}

.parallax-img {
  will-change: transform;
}

/* ── AOS CUSTOM OVERRIDES ────────────────────────────────── */
[data-aos="fade-up-custom"] {
  opacity: 0;
  transform: translateY(50px);
  transition-property: opacity, transform;
}

[data-aos="fade-up-custom"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="scale-in"] {
  opacity: 0;
  transform: scale(0.85);
  transition-property: opacity, transform;
}

[data-aos="scale-in"].aos-animate {
  opacity: 1;
  transform: scale(1);
}

[data-aos="slide-left"] {
  opacity: 0;
  transform: translateX(-50px);
  transition-property: opacity, transform;
}

[data-aos="slide-left"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

[data-aos="slide-right"] {
  opacity: 0;
  transform: translateX(50px);
  transition-property: opacity, transform;
}

[data-aos="slide-right"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

/* ── DIVIDER DRAW ANIMATION ──────────────────────────────── */
.divider--animated {
  width: 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.divider--animated.drawn {
  width: 64px;
}

/* ── CARD HOVER LIFT ─────────────────────────────────────── */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* ── IMAGE ZOOM ON HOVER ─────────────────────────────────── */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.7s ease;
  will-change: transform;
}

.img-zoom:hover img {
  transform: scale(1.07);
}

/* ── STAGGER UTILITY CLASSES ─────────────────────────────── */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* ── FLOATING ELEMENTS ───────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.float-element {
  animation: float 4s ease-in-out infinite;
}

/* ── ORANGE LINE DECORATION ──────────────────────────────── */
.line-decoration {
  position: relative;
}

.line-decoration::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.line-decoration.in-view::after {
  width: 100%;
}

/* ── CONSTRUCTION GRID OVERLAY ───────────────────────────── */
.construction-grid {
  background-image:
    linear-gradient(rgba(232,121,10,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,121,10,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── REDUCE MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
