/* ==========================================================================
   POD Master - Enhanced Landing Page Styles
   Conversion-optimized design with modern UI patterns
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --color-primary:        #2f5fec;
  --color-primary-dark:   #2448b8;
  --color-primary-darker: #172a63;
  --color-primary-light:  #6f8ff5;
  --color-primary-pale:   #eaf0ff;

  /* Neutrals */
  --color-text:           #1a1f36;
  --color-text-muted:     #6b7280;
  --color-border:         #e5e7eb;
  --color-surface:        #ffffff;
  --color-bg:             #f9fafb;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(47, 95, 236, 0.08);
  --shadow-md:   0 4px 16px rgba(47, 95, 236, 0.12);
  --shadow-lg:   0 8px 32px rgba(47, 95, 236, 0.18);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-glow: 0 0 40px rgba(47, 95, 236, 0.3);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --section-padding-y: 5rem;
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
}

/* --------------------------------------------------------------------------
   2. Base Reset & Globals
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background-color: var(--color-surface);
  line-height: 1.6;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Hide scrollbar for testimonials carousel */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --------------------------------------------------------------------------
   3. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.25); }
  50%       { box-shadow: 0 0 0 10px rgba(30, 64, 175, 0); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation utility classes */
.animate-fade-in  { animation: fadeIn  0.6s var(--transition-base) both; }
.animate-slide-up { animation: slideUp 0.6s var(--transition-base) both; }
.animate-float    { animation: float 4s ease-in-out infinite; }
.animate-bounce-in { animation: bounceIn 0.6s var(--transition-bounce) both; }

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* --------------------------------------------------------------------------
   4. Announcement Bar
   -------------------------------------------------------------------------- */
#announcement-bar {
  position: relative;
  z-index: 50;
}

/* --------------------------------------------------------------------------
   5. Navbar
   -------------------------------------------------------------------------- */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Non-scrolled navbar - white text for hero section */
#navbar:not(.navbar-scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.95);
}

#navbar:not(.navbar-scrolled) .nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

#navbar:not(.navbar-scrolled) .nav-link.active {
  color: #ffffff;
  background-color: transparent;
}

.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all var(--transition-base);
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Navbar scrolled - ensure text is visible with dark color */
.navbar-scrolled .nav-link {
  color: #334155 !important;
}

.navbar-scrolled .nav-link:hover {
  color: var(--color-primary) !important;
}

.navbar-scrolled .nav-link.active {
  color: var(--color-primary) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* Active link - no background, just underline */
.nav-link.active {
  background-color: transparent !important;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero-gradient {
  background: linear-gradient(
    145deg,
    var(--color-primary-darker) 0%,
    var(--color-primary-dark)   40%,
    var(--color-primary)        75%,
    var(--color-primary-light)  100%
  );
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   8. Feature Cards
   -------------------------------------------------------------------------- */
.feature-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition-base);
  will-change: transform;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(47, 95, 236, 0.2);
}

/* --------------------------------------------------------------------------
   9. Pricing Cards
   -------------------------------------------------------------------------- */
.pricing-card {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  transition: all var(--transition-base);
  will-change: transform;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-popular {
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 4px rgba(47, 95, 236, 0.1), var(--shadow-lg);
}

.pricing-popular:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 4px rgba(47, 95, 236, 0.15), 0 12px 40px rgba(47, 95, 236, 0.25);
}

/* Toggle Switch */
#pricing-toggle {
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

#toggle-circle {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#pricing-toggle.yearly #toggle-circle {
  transform: translateX(32px);
}

/* --------------------------------------------------------------------------
   10. Testimonial Cards
   -------------------------------------------------------------------------- */
.testimonial-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   11. FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-item {
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: rgba(47, 95, 236, 0.3);
}

.faq-toggle {
  transition: all var(--transition-fast);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow) ease;
}

.faq-item.active .faq-content {
  max-height: 500px;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   12. Video Modal
   -------------------------------------------------------------------------- */
#video-modal {
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

#video-modal.active {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   14. Back to Top Button
   -------------------------------------------------------------------------- */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   15. Reading Progress Bar
   -------------------------------------------------------------------------- */
#reading-progress {
  box-shadow: 0 0 10px rgba(47, 95, 236, 0.5);
}

/* --------------------------------------------------------------------------
   16. Utility Classes
   -------------------------------------------------------------------------- */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Shimmer effect for loading states */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--color-bg) 25%,
    #f0f0f0 50%,
    var(--color-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* --------------------------------------------------------------------------
   17. Mobile Optimizations
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 3rem;
  }
  
  .hero-gradient {
    padding-top: 6rem;
  }
  
  .pricing-popular {
    transform: none !important;
  }
  
  .feature-card:hover,
  .pricing-card:hover {
    transform: translateY(-4px);
  }
}

/* --------------------------------------------------------------------------
   18. Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-aos] {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Focus styles */
:focus-visible {
  outline: 3px solid rgba(47, 95, 236, 0.4);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   19. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .no-print,
  #navbar,
  #announcement-bar,
  #back-to-top,
  #reading-progress {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
}

/* --------------------------------------------------------------------------
   20. Custom Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}
