/* =========================================================
   NIETO ABOGADOS — ANIMATIONS.CSS
   Keyframes, transiciones globales, clases reveal
   ========================================================= */

/* ----- CLASES DE REVEAL (usadas por GSAP y CSS) ----- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
}

.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-spring);
}

/* Delay utilities */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }

/* ----- LÍNEA DECORATIVA ANIMADA ----- */
.animated-line {
  position: relative;
  overflow: hidden;
}

.animated-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  transition: width 0.6s var(--ease-out);
}

.animated-line:hover::after,
.animated-line.is-visible::after {
  width: 100%;
}

/* ----- COUNTER ANIMACIÓN ----- */
.counter {
  display: inline-block;
}

/* ----- CLIP PATH REVEAL (para hero) ----- */
.clip-reveal {
  clip-path: inset(0 0 100% 0);
}

.clip-reveal.is-visible {
  clip-path: inset(0 0 0% 0);
  transition: clip-path 1s var(--ease-out);
}

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

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

/* ----- HOVER LIFT ----- */
.hover-lift {
  transition: transform var(--duration-base) var(--ease-premium),
              box-shadow var(--duration-base) var(--ease-premium);
}

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

/* ----- GOLD SHIMMER (para texto destacado) ----- */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--color-gold) 0%,
    var(--color-gold-light) 40%,
    var(--color-gold) 60%,
    var(--color-gold-light) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 4s linear infinite;
}

/* ----- PULSE (para el dot de estado) ----- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.9); }
}

.pulse-dot {
  animation: pulse 2s ease-in-out infinite;
}

/* ----- FADE IN ----- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s var(--ease-out) forwards;
}

/* ----- SLIDE UP ----- */
@keyframes slideUpAnim {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUpAnim 0.6s var(--ease-out) forwards;
}

/* ----- BORDE DORADO ANIMADO (hover en cards) ----- */
.border-animate {
  position: relative;
}

.border-animate::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--color-gold), transparent, var(--color-gold));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-base);
}

.border-animate:hover::before {
  opacity: 1;
}

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

/* ----- PAGE TRANSITIONS ----- */
.page-transition-enter {
  animation: fadeIn 0.4s var(--ease-out) forwards;
}

/* ----- PRELOADER (si se usa) ----- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ----- NOTIFICATION ----- */
@keyframes notifSlide {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.notification {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1.5rem;
  z-index: 1200;
  padding: 1rem 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  max-width: 360px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: notifSlide 0.4s var(--ease-out) forwards;
}

.notification--success {
  border-left: 3px solid var(--color-success);
}

.notification--error {
  border-left: 3px solid var(--color-error);
}

.notification__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.notification__close {
  margin-left: auto;
  font-size: 1rem;
  color: var(--color-text-light);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

/* ----- SCROLL PROGRESS BAR ----- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}
