/* Variante B - Animaciones modernas para Jardín Girasoles */

html { scroll-behavior: smooth; }

/* ============ KEYFRAMES ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 32px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-48px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(48px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes kenBurns {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.12) translate3d(-1.5%, -1.5%, 0); }
}
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}
@keyframes shimmerLine {
  0% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}
@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  50% { border-radius: 60% 40% 30% 70% / 60% 40% 60% 40%; }
}

/* ============ SCROLL REVEAL (set by JS) ============ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.reveal-left { transform: translate3d(-48px, 0, 0); }
.reveal-right { transform: translate3d(48px, 0, 0); }
.reveal-scale { transform: scale(0.94); }
.reveal-scale.is-visible { transform: scale(1); }

/* ============ STAGGER DELAYS (children) ============ */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 60ms; }
.stagger > *:nth-child(3) { transition-delay: 120ms; }
.stagger > *:nth-child(4) { transition-delay: 180ms; }
.stagger > *:nth-child(5) { transition-delay: 240ms; }
.stagger > *:nth-child(6) { transition-delay: 300ms; }
.stagger > *:nth-child(7) { transition-delay: 360ms; }
.stagger > *:nth-child(8) { transition-delay: 420ms; }
.stagger > *:nth-child(n+9) { transition-delay: 480ms; }

/* ============ HERO KEN BURNS ============ */
.ken-burns {
  animation: kenBurns 18s ease-out forwards;
}

/* ============ GALLERY CARD HOVER ============ */
.card-lift {
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 350ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.card-lift:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: 0 24px 48px -16px rgba(42, 31, 24, 0.18);
}

.zoom-img {
  overflow: hidden;
}
.zoom-img img {
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
              filter 700ms ease;
  will-change: transform;
}
.zoom-img:hover img {
  transform: scale(1.06);
}

/* ============ MORPHING BLOB (decorative) ============ */
.blob {
  animation: blobMorph 12s ease-in-out infinite;
}

/* ============ FLOAT (decorative) ============ */
.float-slow { animation: float 6s ease-in-out infinite; }

/* ============ UNDERLINE GROW ON HOVER ============ */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  height: 2px; width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ============ BUTTON SHIMMER ============ */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover::before {
  transform: translateX(100%);
}
.btn-primary:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 12px 24px -8px rgba(245, 184, 46, 0.5);
}
.btn-primary:active {
  transform: translate3d(0, 0, 0);
}

/* ============ PARALLAX (controlled by JS via --offset) ============ */
.parallax {
  transform: translate3d(0, var(--offset, 0px), 0);
  will-change: transform;
}

/* ============ NAV SHADOW ON SCROLL (nav siempre cocoa) ============ */
.nav-scrolled {
  box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.4);
}

/* ============ MOSAIC IMG TINT ============ */
.mosaic-img {
  filter: saturate(1.02);
  transition: filter 500ms ease;
}
.mosaic-img:hover {
  filter: saturate(1.15) brightness(1.04);
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ken-burns { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .parallax { transform: none; }
}
