/**
 * Subpadi Landing Page - 2027 Modern Enhancements
 * Created: December 11, 2025
 * Purpose: Modern glassmorphism, animations, and interactions
 */

/* ============================================
   2027 DESIGN SYSTEM - CSS VARIABLES
   ============================================ */

:root {
  /* Primary Colors */
  --primary: #5230b0;
  --primary-light: #6b46c8;
  --primary-dark: #3d2380;

  /* Secondary Colors */
  --secondary: #FF6550;
  --accent: #FFC107;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --black: #000000;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  --gradient-mesh: radial-gradient(at 40% 20%, hsla(28,100%,74%,0.3) 0px, transparent 50%),
                   radial-gradient(at 80% 0%, hsla(189,100%,56%,0.3) 0px, transparent 50%),
                   radial-gradient(at 0% 50%, hsla(355,100%,93%,0.2) 0px, transparent 50%),
                   radial-gradient(at 80% 50%, hsla(340,100%,76%,0.3) 0px, transparent 50%);

  /* Spacing (8px grid) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-10: 5rem;
  --space-12: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(82, 48, 176, 0.3), 0 0 40px rgba(82, 48, 176, 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Better Selection */
::selection {
  background-color: var(--primary);
  color: var(--white);
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  border-radius: var(--radius-xl);
}

.glass-white {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(82, 48, 176, 0.3);
}

/* ============================================
   MODERN HERO SECTION
   ============================================ */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-mesh);
  opacity: 0.6;
  animation: meshMove 20s ease-in-out infinite;
}

@keyframes meshMove {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.hero-content-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transform-style: preserve-3d;
  transition: transform var(--transition-base);
}

.hero-content-glass:hover {
  transform: translateZ(20px);
}

/* Floating Trust Badges */
.trust-badges {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  animation: float 3s ease-in-out infinite;
}

.trust-badge:nth-child(2) {
  animation-delay: 0.5s;
}

.trust-badge:nth-child(3) {
  animation-delay: 1s;
}

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

/* Enhanced CTAs */
.cta-modern {
  position: relative;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.cta-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #FF8C00 100%);
  color: var(--gray-900);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.6);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Button Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   MODERN FEATURE CARDS
   ============================================ */

.feature-card-2027 {
  position: relative;
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  overflow: hidden;
}

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

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

.feature-card-2027:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(82, 48, 176, 0.3);
}

.feature-icon-2027 {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.feature-card-2027:hover .feature-icon-2027 {
  transform: rotateY(360deg) scale(1.1);
  box-shadow: var(--shadow-glow);
}

.feature-icon-2027 i,
.feature-icon-2027 svg {
  font-size: 2.5rem;
  color: white;
}

/* ============================================
   LIVE STATS COUNTER
   ============================================ */

.stats-section {
  position: relative;
  padding: var(--space-10) 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  backdrop-filter: blur(10px);
}

.stat-card {
  text-align: center;
  padding: var(--space-4);
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 1.125rem;
  color: var(--gray-700);
  font-weight: 500;
}

/* Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counting {
  animation: countUp 0.6s ease-out;
}

/* ============================================
   SERVICE CARDS - INTERACTIVE
   ============================================ */

.service-card-2027 {
  position: relative;
  padding: var(--space-5);
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.service-card-2027::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--gradient-primary);
  transition: height var(--transition-slow);
  z-index: 0;
}

.service-card-2027:hover::after {
  height: 100%;
}

.service-card-2027:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.service-card-2027:hover * {
  color: white !important;
  position: relative;
  z-index: 1;
}

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

.service-card-2027:hover .service-icon {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(5deg);
}

/* Quick Action Button */
.quick-action {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-base);
  z-index: 2;
  opacity: 0;
}

.service-card-2027:hover .quick-action {
  bottom: var(--space-3);
  opacity: 1;
}

/* ============================================
   TESTIMONIALS CAROUSEL
   ============================================ */

.testimonial-card {
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-2xl);
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.testimonial-stars {
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.testimonial-text {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--gray-700);
  margin-bottom: var(--space-3);
  font-style: italic;
}

.testimonial-author {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: var(--success);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: var(--space-2);
}

/* ============================================
   MODERN FAQ ACCORDION
   ============================================ */

.faq-2027 {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-2027:hover {
  box-shadow: var(--shadow-lg);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.faq-question:hover {
  background: var(--gray-50);
}

.faq-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  margin-right: var(--space-3);
  flex-shrink: 0;
}

.faq-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  border-radius: 50%;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.faq-question.active .faq-toggle {
  background: var(--primary);
  color: white;
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slower);
}

.faq-answer.active {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 var(--space-4) var(--space-4);
  padding-left: calc(var(--space-4) + 40px + var(--space-3));
  color: var(--gray-700);
  line-height: 1.6;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-on-hover {
  transition: all var(--transition-base);
}

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

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation Children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .hero-content-glass {
    padding: var(--space-4);
  }

  .trust-badges {
    justify-content: center;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .feature-card-2027,
  .service-card-2027 {
    margin-bottom: var(--space-4);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .glass,
  .glass-white,
  .glass-dark,
  .glass-card {
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
