/* ===== Home Page Styles ===== */
/* Animations, effects, and layout specific to the landing page. */
/* Extracted from home.html inline <style> blocks. */

/* --- Stat Cards --- */
.stat-card {
  width: 100%;
  min-width: 220px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.stat-card:hover .icon-magnetic {
  transform: scale(1.1) rotate(5deg);
  transition: all 0.3s ease;
}

.stat-card:hover .counter-up {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  transition: all 0.3s ease;
}

.stat-icon-container {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stat-value {
  margin-bottom: 0.5rem;
  line-height: 1.1;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-stat-label {
  margin-bottom: 0.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-metric {
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Feature Cards --- */
.feature-card {
  height: 100%;
  width: 100%;
}

.feature-card-inner {
  height: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}

.feature-card-inner:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.feature-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  height: 3rem;
}

.feature-icon-container {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s;
}

.feature-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  height: 1.5rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-badge {
  background-color: rgba(255, 255, 255, 0.2);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-title {
  color: rgba(251, 191, 36, 0.9);
}

.feature-description {
  color: rgb(209, 213, 219);
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  min-height: 5rem;
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.feature-description::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: linear-gradient(to right, rgba(251, 191, 36, 0), rgba(251, 191, 36, 0.5), rgba(251, 191, 36, 0));
  transition: width 0.8s ease;
}

.feature-card:hover .feature-description::after {
  width: 100%;
}

.feature-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2rem;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  transition: transform 0.3s;
}

.feature-link:hover {
  transform: translateX(0.25rem);
  text-shadow: 0 0 20px #f59e0b;
}

.feature-meta {
  text-align: right;
}

@media (max-width: 768px) {
  .feature-card-inner {
    min-height: 340px;
  }
  .feature-description {
    min-height: 4rem;
  }
}

/* --- Grid Background --- */
.grid-pattern {
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 146, 60, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  width: 100%;
  height: 100%;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* --- Core Animations --- */
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes gradient-flow {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(60px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes levitate {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes textShine {
  0%, 100% { background-position: -200% center; }
  50% { background-position: 200% center; }
}

@keyframes magic-float {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.3; }
  25% { transform: translateY(-20px) scale(1.2); opacity: 0.7; }
  50% { transform: translateY(-40px) scale(0.8); opacity: 1; }
  75% { transform: translateY(-20px) scale(1.1); opacity: 0.6; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@keyframes bounceSequence {
  0%, 100% { transform: translateY(0px); }
  20% { transform: translateY(-15px); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-10px); }
  80% { transform: translateY(-3px); }
}

@keyframes energyWave {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes pulseEnhanced {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes staggeredEntry {
  0% { opacity: 0; transform: translateY(30px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes typewriter {
  0% { width: 0; }
  100% { width: 100%; }
}

@keyframes textDance {
  0%, 100% { transform: translateY(0px); }
  25% { transform: translateY(-3px); }
  75% { transform: translateY(3px); }
}

@keyframes progressLine {
  0% { width: 0%; opacity: 0; }
  50% { opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

@keyframes float-reverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(180deg); }
}

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Animation Delays --- */
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-900 { animation-delay: 0.9s; }
.animation-delay-1000 { animation-delay: 1s; }
.animation-delay-1100 { animation-delay: 1.1s; }
.animation-delay-1300 { animation-delay: 1.3s; }
.animation-delay-1400 { animation-delay: 1.4s; }
.animation-delay-1500 { animation-delay: 1.5s; }
.animation-delay-1600 { animation-delay: 1.6s; }
.animation-delay-2000 { animation-delay: 2s; }

/* --- Named Animation Classes --- */
.animate-bounce-slow { animation: bounce-slow 3s ease-in-out infinite; }
.animate-float-reverse { animation: float-reverse 8s ease-in-out infinite; }
.animate-pulse-slow { animation: pulse-slow 4s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow 8s linear infinite; }

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-scale {
  animation: fadeInScale 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-stagger {
  animation: staggeredEntry 0.8s ease-out forwards;
  opacity: 0;
}

.gradient-shift {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease-in-out infinite;
}

.gradient-flow {
  background-size: 300% 300%;
  animation: gradient-flow 4s ease-in-out infinite;
}

.icon-float { animation: levitate 3s ease-in-out infinite; }
.icon-levitate { animation: levitate 2s ease-in-out infinite; }
.bounce-sequence { animation: bounceSequence 1.5s ease-in-out infinite; }
.energy-pulse { animation: energyWave 2s ease-out infinite; }
.progress-bar { animation: progressLine 3s ease-out forwards; }
.floating-orb { animation: levitate 4s ease-in-out infinite; }

.typewriter-welcome {
  overflow: hidden;
  white-space: nowrap;
  animation: typewriter 3s steps(30) forwards;
  border-right: 3px solid #f59e0b;
}

.typewriter-features {
  overflow: hidden;
  white-space: nowrap;
  animation: typewriter 2s steps(20) forwards;
}

.section-underline {
  animation: progressLine 2s ease-out forwards;
  width: 0%;
}

.title-shimmer {
  background: linear-gradient(90deg, #ffffff 25%, #f59e0b 50%, #ffffff 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShine 3s ease-in-out infinite;
}

.highlight-word {
  background: linear-gradient(90deg, #f59e0b, #fb923c, #f59e0b);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShine 2s ease-in-out infinite;
}

/* --- Visual Effects --- */
.glass-effect {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.orb-blur {
  filter: blur(60px);
  -webkit-filter: blur(60px);
}

.glow-effect {
  filter: blur(8px);
  -webkit-filter: blur(8px);
}

.icon-shadow {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* --- Particles --- */
.magic-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.magic-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #f59e0b, #fb923c);
  border-radius: 50%;
  animation: magic-float 8s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.magic-particle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.magic-particle:nth-child(2) { top: 20%; left: 80%; animation-delay: 1s; }
.magic-particle:nth-child(3) { top: 40%; left: 20%; animation-delay: 2s; }
.magic-particle:nth-child(4) { top: 60%; left: 90%; animation-delay: 3s; }
.magic-particle:nth-child(5) { top: 80%; left: 30%; animation-delay: 4s; }
.magic-particle:nth-child(6) { top: 30%; left: 70%; animation-delay: 1.5s; }
.magic-particle:nth-child(7) { top: 70%; left: 60%; animation-delay: 2.5s; }
.magic-particle:nth-child(8) { top: 50%; left: 40%; animation-delay: 3.5s; }
.magic-particle:nth-child(9) { top: 90%; left: 80%; animation-delay: 0.5s; }
.magic-particle:nth-child(10) { top: 15%; left: 50%; animation-delay: 4.5s; }

.stars { position: absolute; width: 100%; height: 100%; }

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffffff;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
  box-shadow: 0 0 6px #ffffff;
}

.star:nth-child(1) { top: 15%; left: 25%; animation-delay: 0s; }
.star:nth-child(2) { top: 35%; left: 75%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 65%; left: 15%; animation-delay: 1s; }
.star:nth-child(4) { top: 85%; left: 85%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 25%; left: 55%; animation-delay: 2s; }

/* --- Buttons --- */
.button-glow {
  position: relative;
  overflow: hidden;
}

.button-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.button-glow:hover::before {
  left: 100%;
}

/* --- Scrollbar (page-specific) --- */
.home-page ::-webkit-scrollbar { width: 8px; }
.home-page ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
.home-page ::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #f59e0b, #fb923c);
  border-radius: 4px;
}

::selection {
  background: rgba(245, 158, 11, 0.3);
  color: white;
}

/* --- Social Links --- */
.social-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
  transform: scale(1.2) translateY(-5px);
  text-shadow: 0 0 20px #f59e0b;
}

.social-links:hover .social-icon { opacity: 0.6; }
.social-links:hover .social-icon:hover { opacity: 1; }

/* --- CTA Section --- */
.cta-container {
  position: relative;
  z-index: 2;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);
}

.footer-entrance {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}

/* --- Stagger delays for feature cards --- */
.feature-card:nth-child(1) .feature-card-inner { animation-delay: 0.1s; }
.feature-card:nth-child(2) .feature-card-inner { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-card-inner { animation-delay: 0.3s; }
.feature-card:nth-child(4) .feature-card-inner { animation-delay: 0.4s; }
.feature-card:nth-child(5) .feature-card-inner { animation-delay: 0.5s; }
.feature-card:nth-child(6) .feature-card-inner { animation-delay: 0.6s; }

.feature-card-inner {
  animation: fadeInUp 0.8s ease-out forwards;
  animation-fill-mode: both;
}
