/* ============================================================
   THE PROFESSOR GIRL — Animations Stylesheet
   theprofessorgirl.com | 2026
   ============================================================ */

/* ── Keyframe: Fade In Down ────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Keyframe: Fade In Up ──────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Keyframe: Fade In Right ───────────────────────────────── */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Keyframe: Fade In Left ────────────────────────────────── */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Keyframe: Float (hero card) ───────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-16px); }
}

/* ── Keyframe: Pulse Dot (live indicator) ──────────────────── */
@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);
    transform: scale(1.15);
  }
}

/* ── Keyframe: Progress Bar Grow ───────────────────────────── */
@keyframes progress-grow {
  from { width: 0%; }
  to   { width: 65%; }
}

/* ── Keyframe: Shimmer (card shine sweep) ──────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── Keyframe: Spin Slow (background orbs) ─────────────────── */
@keyframes spin-slow {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.08); }
  to   { transform: rotate(360deg) scale(1); }
}

/* ── Keyframe: Glow Pulse (CTA buttons) ────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45); }
  50%       { box-shadow: 0 8px 48px rgba(124, 58, 237, 0.75), 0 0 0 4px rgba(124,58,237,0.12); }
}

/* ── Keyframe: Count-Up Number Scale ───────────────────────── */
@keyframes number-pop {
  0%   { transform: scale(0.85); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Keyframe: Star Twinkle ────────────────────────────────── */
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.2); }
}

/* ── Keyframe: Gradient Shift (background) ─────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Keyframe: Slide In Up (mobile nav) ────────────────────── */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Keyframe: Badge Bounce ────────────────────────────────── */
@keyframes badge-bounce {
  0%, 100% { transform: translateY(0); }
  30%       { transform: translateY(-5px); }
  60%       { transform: translateY(-2px); }
}

/* ── Applied Animation Utilities ───────────────────────────── */
.animate-float          { animation: float 5s ease-in-out infinite; }
.animate-pulse-dot      { animation: pulse-dot 1.4s ease-in-out infinite; }
.animate-glow           { animation: glow-pulse 2.5s ease-in-out infinite; }
.animate-shimmer        {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
}
.animate-twinkle        { animation: twinkle 3s ease-in-out infinite; }
.animate-badge-bounce   { animation: badge-bounce 3s ease-in-out infinite; }

/* ── Background Orbs (decorative) ──────────────────────────── */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: spin-slow 20s linear infinite;
  z-index: 0;
}
.bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  top: -100px; left: -150px;
}
.bg-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,165,152,0.1) 0%, transparent 70%);
  bottom: -80px; right: -120px;
  animation-direction: reverse;
  animation-duration: 15s;
}
.bg-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 25s;
}

/* ── Hero Section Decorative Lines ─────────────────────────── */
.hero-deco-line {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.hero-deco-line-1 {
  top: 20%;
  right: 5%;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 50%;
  animation: spin-slow 30s linear infinite;
}
.hero-deco-line-2 {
  bottom: 15%;
  left: 3%;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(232,165,152,0.12);
  border-radius: 50%;
  animation: spin-slow 20s linear infinite reverse;
}

/* ── Glow Text Effect ───────────────────────────────────────── */
.text-glow {
  text-shadow: 0 0 30px rgba(124,58,237,0.6), 0 0 60px rgba(124,58,237,0.3);
}

/* ── Primary CTA Glow Animation ────────────────────────────── */
.btn-primary {
  animation: glow-pulse 3s ease-in-out infinite;
}
.btn-primary:hover {
  animation: none;
}

/* ── Card Entrance Stagger ──────────────────────────────────── */
.stagger-1 { transition-delay: 0.05s !important; }
.stagger-2 { transition-delay: 0.15s !important; }
.stagger-3 { transition-delay: 0.25s !important; }
.stagger-4 { transition-delay: 0.35s !important; }
.stagger-5 { transition-delay: 0.45s !important; }
.stagger-6 { transition-delay: 0.55s !important; }

/* ── Underline Slide Animation (nav hover) ──────────────────── */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  transition: left 0.25s ease, right 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  left: 0.75rem;
  right: 0.75rem;
}

/* ── Scroll Progress Bar (top of viewport) ──────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #7C3AED, #E8A598, #7C3AED);
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
  z-index: 2000;
  transition: width 0.1s linear;
}

/* ── Tutor Card Shimmer on Hover ────────────────────────────── */
.tutor-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.tutor-card:hover::before {
  left: 150%;
}

/* ── Feature Card Top Border Gradient Reveal ────────────────── */
.feature-card {
  position: relative;
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(124,58,237,0) 0%, rgba(124,58,237,0.4) 50%, rgba(232,165,152,0.2) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.feature-card:hover::after {
  opacity: 1;
}

/* ── Pricing Card Featured Glow ─────────────────────────────── */
.pricing-card.featured {
  position: relative;
}
.pricing-card.featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 1px);
  background: linear-gradient(135deg, #7C3AED, #E8A598, #7C3AED);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  z-index: -1;
  opacity: 0.6;
}

/* ── Step Item Hover Animation ──────────────────────────────── */
.step-item {
  transition: transform 0.3s ease;
}
.step-item:hover {
  transform: translateY(-4px);
}

/* ── Subject Pill Ripple Effect ─────────────────────────────── */
.subject-pill {
  position: relative;
  overflow: hidden;
}
.subject-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124,58,237,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.subject-pill:hover::after {
  opacity: 1;
}

/* ── Smooth Section Transition Overlay ──────────────────────── */
.section-transition {
  position: relative;
}
.section-transition::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.3), transparent);
}

/* ── Live Indicator Rings ───────────────────────────────────── */
@keyframes live-ring {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}
.live-ring {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ff3b30;
  animation: live-ring 1.8s ease-out infinite;
}

/* ── Testimonial Card Quote Mark ────────────────────────────── */
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  color: rgba(124,58,237,0.15);
  pointer-events: none;
  user-select: none;
}
.testimonial-card {
  position: relative;
}

/* ── Reduced Motion Override ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}
