/* ============================================================
   Atelier — Animations CSS
   GSAP initial states + pure CSS keyframes
   ============================================================ */

/* ── GSAP Initial States ─────────────────────────────────────── */
/* Elements start invisible; GSAP animates them to final state */

.gsap-fade-up {
  opacity: 0;
  transform: translateY(32px);
}

.gsap-fade-in {
  opacity: 0;
}

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

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

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

/* ── CSS Fallback (if GSAP fails to load) ────────────────────── */
/* IntersectionObserver adds .is-visible to trigger these */
.gsap-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.gsap-fade-in.is-visible {
  opacity: 1;
  transition: opacity 0.7s ease;
}
.gsap-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.gsap-slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.gsap-slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ── Hero Gradient Background ────────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Dashboard Float ─────────────────────────────────────────── */
@keyframes dashboard-float {
  0%   { transform: translateY(0px) rotate(0deg); }
  33%  { transform: translateY(-10px) rotate(0.5deg); }
  66%  { transform: translateY(-5px) rotate(-0.25deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* ── Popular Card Pulse Glow ─────────────────────────────────── */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(79,70,229,.2);
  }
  50% {
    box-shadow: 0 8px 48px rgba(79,70,229,.4), 0 0 0 4px rgba(79,70,229,.1);
  }
}

/* ── Shimmer (skeleton loading) ──────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    #f3f4f6 25%,
    #e5e7eb 50%,
    #f3f4f6 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* Applied to mockup rows */
.mockup-row {
  background: linear-gradient(
    90deg,
    #f9fafb 25%,
    #f3f4f6 50%,
    #f9fafb 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}
.mockup-row:nth-child(2) { animation-delay: 0.2s; }
.mockup-row:nth-child(3) { animation-delay: 0.4s; }
.mockup-row:nth-child(4) { animation-delay: 0.6s; }
.mockup-row:nth-child(5) { animation-delay: 0.8s; }

/* ── Page Load Fade ──────────────────────────────────────────── */
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-fade-in {
  animation: page-fade-in 0.5s ease forwards;
}

/* ── Hero Entrance ───────────────────────────────────────────── */
.hero-text .hero-eyebrow  { animation: page-fade-in 0.5s ease 0.1s both; }
.hero-text .hero-title    { animation: page-fade-in 0.6s ease 0.2s both; }
.hero-text .hero-subtitle { animation: page-fade-in 0.6s ease 0.35s both; }
.hero-text .hero-cta      { animation: page-fade-in 0.6s ease 0.5s both; }
.hero-text .hero-stats    { animation: page-fade-in 0.6s ease 0.65s both; }
.hero-visual              { animation: page-fade-in 0.8s ease 0.3s both; }

/* ── Nav CTA Pulse on Hover ──────────────────────────────────── */
@keyframes nav-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(79,70,229,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(79,70,229,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
}

/* ── Stat Counter Number Increment ───────────────────────────── */
@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Timeline Progress Draw ──────────────────────────────────── */
.timeline-progress-active {
  width: 75% !important;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Feature Card Hover ──────────────────────────────────────── */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, transparent, rgba(79,70,229,.03));
  opacity: 0;
  transition: opacity 300ms ease;
}
.feature-card:hover::before { opacity: 1; }

/* ── Scroll Progress Bar ─────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  z-index: 9999;
  transform-origin: left;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Stagger Animation Delays ────────────────────────────────── */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ── AI Reports Highlight ────────────────────────────────────── */
.ai-feature-card {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fde68a !important;
}
.ai-feature-card .feature-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* ── Gold Accent Glow ─────────────────────────────────────────── */
@keyframes gold-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(245,158,11,.3); }
  50%       { box-shadow: 0 0 24px rgba(245,158,11,.6); }
}
.gold-glow { animation: gold-glow 2s ease-in-out infinite; }
