/*=============================================================
  ET CREATIVES — ANIMATION LIBRARY
  animations.css | GSAP + AOS + Custom Animation Classes
=============================================================*/

/* ─── AOS BASE ─────────────────────────────────────────────── */
[data-aos] {
  transition-duration: 0.5s !important;
  transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1) !important;
  will-change: opacity, transform;
}

/* Hero section elements visible immediately without waiting for scroll */
.hero [data-aos],
.page-hero [data-aos],
.hero-content [data-aos],
.hero-badge [data-aos],
.hero-title [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

[data-aos="fade-up"] {
  transform: translateY(20px);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

[data-aos="fade-down"] {
  transform: translateY(-20px);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="fade-down"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

[data-aos="fade-left"] {
  transform: translateX(20px);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="fade-right"] {
  transform: translateX(-20px);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="zoom-in"] {
  transform: scale(0.96);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
  opacity: 1;
}

[data-aos="zoom-out"] {
  transform: scale(1.04);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="zoom-out"].aos-animate {
  transform: scale(1);
  opacity: 1;
}

/* ─── GSAP INITIAL STATES ──────────────────────────────────── */
.gsap-hidden {
  opacity: 0;
  visibility: hidden;
}

.gsap-slide-up {
  opacity: 0;
  transform: translateY(60px);
}

.gsap-slide-left {
  opacity: 0;
  transform: translateX(-60px);
}

.gsap-slide-right {
  opacity: 0;
  transform: translateX(60px);
}

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

/* Text split animation classes */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.split-char {
  display: inline-block;
}

.split-line {
  overflow: hidden;
}

/* ─── HERO TITLE CLIP ANIMATION ────────────────────────────── */
.hero-title-wrap {
  overflow: hidden;
}

.hero-title-line {
  display: block;
  overflow: hidden;
  line-height: 1.1;
}

/* ─── MAGNETIC BUTTON ──────────────────────────────────────── */
.magnetic-wrap {
  display: inline-block;
  position: relative;
}

.magnetic-inner {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── PARALLAX ELEMENTS ────────────────────────────────────── */
.parallax-slow   { will-change: transform; }
.parallax-medium { will-change: transform; }
.parallax-fast   { will-change: transform; }

.image-reveal-wrap {
  overflow: hidden;
  position: relative;
}

.image-reveal-wrap img {
  transition: transform 0.6s ease;
}

.image-reveal-wrap:hover img {
  transform: scale(1.04);
}

/* ─── COUNTER ANIMATION ────────────────────────────────────── */
.counter-wrap {
  position: relative;
}

.counter-suffix {
  display: inline-block;
}

/* ─── HOVER UNDERLINE ──────────────────────────────────────── */
.hover-underline {
  position: relative;
  display: inline-block;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}

.hover-underline:hover::after {
  transform: scaleX(1);
}

/* ─── FLOAT ANIMATION ──────────────────────────────────────── */
.float-anim {
  animation: floatGeneric 5s ease-in-out infinite;
}

.float-anim-delay-1 { animation-delay: -1s; }
.float-anim-delay-2 { animation-delay: -2.5s; }
.float-anim-delay-3 { animation-delay: -4s; }

@keyframes floatGeneric {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-16px) rotate(2deg); }
  66%       { transform: translateY(-8px) rotate(-1deg); }
}

/* ─── PULSE ANIMATION ──────────────────────────────────────── */
.pulse-anim {
  animation: pulseGeneric 2s ease-in-out infinite;
}

@keyframes pulseGeneric {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

/* ─── GRADIENT SHIFT ───────────────────────────────────────── */
.gradient-shift {
  background: linear-gradient(270deg, #2563EB, #06B6D4, #0EA5E9, #2563EB);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── SPIN SLOW ────────────────────────────────────────────── */
.spin-slow {
  animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── BLINK ────────────────────────────────────────────────── */
.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── RIPPLE EFFECT ────────────────────────────────────────── */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 200%;
  padding-bottom: 200%;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: transform 0.6s var(--ease-smooth), opacity 0.6s;
  opacity: 0;
}

.ripple-btn:active::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: none;
}

/* ─── SHIMMER SKELETON ─────────────────────────────────────── */
.shimmer {
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmerMove 1.5s linear infinite;
}

@keyframes shimmerMove {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* ─── SCROLL PROGRESS BAR ──────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--gradient-main);
  z-index: calc(var(--z-nav) + 10);
  transition: width 0.1s linear;
  transform-origin: left;
  border-radius: 0 2px 2px 0;
}

/* ─── STAGGER CHILDREN ─────────────────────────────────────── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth);
}

.stagger-children.in-view > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0.0s; }
.stagger-children.in-view > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 0.1s; }
.stagger-children.in-view > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 0.2s; }
.stagger-children.in-view > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 0.3s; }
.stagger-children.in-view > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 0.4s; }
.stagger-children.in-view > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 0.5s; }

/* ─── TYPING CURSOR ────────────────────────────────────────── */
.typed-cursor {
  color: var(--color-accent);
  animation: blink 1s step-end infinite;
}

/* ─── GRADIENT BORDER ──────────────────────────────────────── */
.gradient-border {
  position: relative;
  border-radius: var(--radius-xl);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-main);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

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

/* ─── GLOW EFFECT ──────────────────────────────────────────── */
.glow-on-hover {
  transition: box-shadow var(--transition-slow);
}

.glow-on-hover:hover {
  box-shadow: var(--shadow-glow), var(--shadow-xl);
}

/* ─── CLIP PATH REVEAL ─────────────────────────────────────── */
.clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.clip-reveal.in-view {
  clip-path: inset(0 0% 0 0);
}
