/* 
 * ═══════════════════════════════════════════════════════════════
 * MODERN HOMEPAGE STYLES - Next-Generation UI Components
 * ═══════════════════════════════════════════════════════════════
 * Features:
 * - Modern glassmorphism effects
 * - Advanced animations
 * - Responsive grid layouts
 * - Interactive components
 * - Theme-aware styling
 */

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════════ */

.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--theme-bg-primary);
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(244, 63, 94, 0.1) 0%, transparent 50%);
  animation: heroGradient 20s ease-in-out infinite;
}

@keyframes heroGradient {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(2%, 2%) rotate(1deg);
  }
  66% {
    transform: translate(-1%, 1%) rotate(-1deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: var(--theme-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroTitleFade 1s ease-out;
}

@keyframes heroTitleFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--theme-text-secondary);
  margin-bottom: 2rem;
  animation: heroSubtitleFade 1s ease-out 0.3s both;
}

@keyframes heroSubtitleFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroActionsFade 1s ease-out 0.6s both;
}

@keyframes heroActionsFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--theme-radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--theme-transition-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-button-primary {
  background: var(--theme-gradient-primary);
  color: white;
  box-shadow: var(--theme-shadow-lg);
}

.hero-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-xl);
}

.hero-button-secondary {
  background: var(--theme-glass-bg);
  color: var(--theme-text-primary);
  border: 1px solid var(--theme-border-2);
  backdrop-filter: blur(var(--theme-glass-blur));
}

.hero-button-secondary:hover {
  background: var(--theme-surface-2);
  border-color: var(--theme-border-3);
}

/* ═══════════════════════════════════════════════════════════════
   FEATURE CARDS
═══════════════════════════════════════════════════════════════ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.feature-card {
  background: var(--theme-glass-bg);
  backdrop-filter: blur(var(--theme-glass-blur));
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-2xl);
  padding: 2rem;
  transition: all var(--theme-transition-slow);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--theme-gradient-primary);
  transform: scaleX(0);
  transition: transform var(--theme-transition-slow);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--theme-shadow-2xl);
  border-color: var(--theme-border-2);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--theme-radius-xl);
  background: var(--theme-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--theme-shadow-lg);
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 0.75rem;
}

.feature-description {
  color: var(--theme-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--theme-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--theme-transition-fast);
}

.feature-link:hover {
  color: var(--theme-primary-600);
}

/* ═══════════════════════════════════════════════════════════════
   STATS SECTION
═══════════════════════════════════════════════════════════════ */

.stats-section {
  background: var(--theme-bg-secondary);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--theme-surface-1);
  border-radius: var(--theme-radius-xl);
  border: 1px solid var(--theme-border-1);
  transition: all var(--theme-transition-base);
}

.stat-card:hover {
  transform: scale(1.05);
  box-shadow: var(--theme-shadow-lg);
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  background: var(--theme-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--theme-text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════════════════════════ */

.cta-section {
  padding: 6rem 2rem;
  text-align: center;
  background: var(--theme-bg-primary);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--theme-text-primary);
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.25rem;
  color: var(--theme-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.cta-input {
  flex: 1;
  min-width: 250px;
  padding: 1rem 1.5rem;
  border: 2px solid var(--theme-border-2);
  border-radius: var(--theme-radius-xl);
  background: var(--theme-surface-1);
  color: var(--theme-text-primary);
  font-size: 1rem;
  transition: all var(--theme-transition-base);
}

.cta-input:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.cta-button {
  padding: 1rem 2rem;
  background: var(--theme-gradient-primary);
  color: white;
  border: none;
  border-radius: var(--theme-radius-xl);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--theme-transition-base);
  white-space: nowrap;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-xl);
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING ELEMENTS
═══════════════════════════════════════════════════════════════ */

.floating-element {
  position: absolute;
  border-radius: 50%;
  background: var(--theme-gradient-primary);
  opacity: 0.1;
  filter: blur(40px);
  animation: float 20s ease-in-out infinite;
}

.floating-element-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 10%;
  animation-delay: -5s;
}

.floating-element-3 {
  width: 250px;
  height: 250px;
  bottom: 20%;
  left: 20%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(50px, -50px) rotate(90deg);
  }
  50% {
    transform: translate(0, -100px) rotate(180deg);
  }
  75% {
    transform: translate(-50px, -50px) rotate(270deg);
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-button {
    justify-content: center;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .cta-section {
    padding: 4rem 1rem;
  }
  
  .cta-form {
    flex-direction: column;
  }
  
  .cta-input,
  .cta-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATES
═══════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--theme-surface-2) 25%,
    var(--theme-surface-3) 50%,
    var(--theme-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--theme-radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL INDICATOR
═══════════════════════════════════════════════════════════════ */

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--theme-text-muted);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-indicator-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--theme-border-3);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator-wheel {
  width: 4px;
  height: 8px;
  background: var(--theme-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 24px;
  }
}
