/* ================================================
   NORTH STAR DRIVING ACADEMY - DESIGN SYSTEM
   Global styles, colors, gradients, and components
   ================================================ */

/* ================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ================================================ */
:root {
  /* Primary Colors */
  --color-primary: #2a9d8f;
  --color-primary-dark: #1d6f64;
  --color-primary-light: #3fb3a3;
  --color-primary-50: #e6f7f5;
  --color-primary-100: #ccefeb;
  --color-primary-200: #99dfd7;
  --color-primary-900: #0d3d38;

  /* Secondary/Accent Colors */
  --color-accent: #e76f51;
  --color-accent-light: #f4a261;
  --color-accent-dark: #d62828;

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Success/Warning/Error */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2a9d8f 0%, #1d6f64 100%);
  --gradient-primary-light: linear-gradient(135deg, #3fb3a3 0%, #2a9d8f 100%);
  --gradient-hero: linear-gradient(135deg, #2a9d8f 0%, #1d6f64 50%, #0d3d38 100%);
  --gradient-hero-radial: radial-gradient(ellipse at top right, #3fb3a3 0%, #2a9d8f 40%, #1d6f64 100%);
  --gradient-accent: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

  /* 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-teal: 0 10px 40px -10px rgba(42, 157, 143, 0.4);
  --shadow-teal-lg: 0 20px 50px -15px rgba(42, 157, 143, 0.5);

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Typography */
  --font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;

  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  --spacing-24: 6rem;
}

/* ================================================
   BASE STYLES
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-gray-50);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background-color: var(--color-primary-100);
  color: var(--color-primary-900);
}

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

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

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-size: var(--font-size-base);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-teal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary-50);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--color-white);
  box-shadow: 0 10px 40px -10px rgba(231, 111, 81, 0.4);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -15px rgba(231, 111, 81, 0.5);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--font-size-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
}

.btn-pill {
  border-radius: var(--radius-full);
}

/* ================================================
   CARDS
   ================================================ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-bordered {
  border: 1px solid var(--color-gray-200);
}

.card-bordered:hover {
  border-color: var(--color-primary);
}

/* ================================================
   HERO SECTIONS
   ================================================ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-gradient {
  background: var(--gradient-hero);
}

.hero-radial {
  background: var(--gradient-hero-radial);
}

.hero-pattern {
  position: relative;
}

.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: blob-float 8s ease-in-out infinite;
}

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

/* ================================================
   NAVIGATION
   ================================================ */
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--color-gray-600);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-primary);
}

/* ================================================
   FORM ELEMENTS
   ================================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
  background: var(--color-white);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

.form-input:hover:not(:focus) {
  border-color: var(--color-gray-300);
}

.form-input.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: var(--color-success);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-gray-700);
}

.form-group {
  margin-bottom: 1.5rem;
}

/* ================================================
   BADGES & PILLS
   ================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--color-primary-100);
  color: var(--color-primary-dark);
}

.badge-accent {
  background: rgba(231, 111, 81, 0.1);
  color: var(--color-accent);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

/* ================================================
   TRUST BADGES
   ================================================ */
.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
}

.trust-badge-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  color: var(--color-white);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-teal);
}

.trust-badge-title {
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--color-gray-800);
  margin-bottom: 0.25rem;
}

.trust-badge-text {
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

/* ================================================
   PRICING TABLE
   ================================================ */
.pricing-card-enhanced {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

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

.pricing-card-enhanced.featured {
  border: 3px solid var(--color-primary);
}

.pricing-card-enhanced.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--gradient-accent);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 0.25rem 2.5rem;
  transform: rotate(45deg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-header {
  background: var(--gradient-primary);
  padding: 2rem;
  text-align: center;
  color: var(--color-white);
}

.pricing-price {
  font-size: var(--font-size-4xl);
  font-weight: 700;
}

.pricing-features {
  padding: 2rem;
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.pricing-feature:last-child {
  border-bottom: none;
}

.pricing-feature-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-success);
}

/* ================================================
   TESTIMONIALS
   ================================================ */
.testimonial-card-enhanced {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.testimonial-card-enhanced::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 5rem;
  font-family: Georgia, serif;
  color: var(--color-primary-100);
  line-height: 1;
}

.testimonial-content-enhanced {
  position: relative;
  z-index: 1;
  font-size: var(--font-size-lg);
  font-style: italic;
  color: var(--color-gray-700);
  margin-bottom: 1.5rem;
  padding-top: 2rem;
}

.testimonial-author-enhanced {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-weight: 700;
  color: var(--color-gray-800);
}

.testimonial-role {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  color: #fbbf24;
}

/* ================================================
   FAQ ACCORDION
   ================================================ */
.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-gray-800);
  transition: all var(--transition-fast);
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

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

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

.faq-answer-content {
  color: var(--color-gray-600);
  line-height: 1.7;
}

/* ================================================
   FOOTER
   ================================================ */
.footer-enhanced {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.footer-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link:hover {
  color: var(--color-white);
  transform: translateX(4px);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social-link {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--color-white);
  transition: all var(--transition-base);
}

.footer-social-link:hover {
  background: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s ease forwards;
}

.animate-pulse-slow {
  animation: pulse 3s ease-in-out infinite;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ================================================
   UTILITIES
   ================================================ */
.container-tight {
  max-width: 65rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-balance {
  text-wrap: balance;
}

.gradient-border {
  position: relative;
  background: var(--color-white);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--gradient-primary);
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
}

/* ================================================
   RESPONSIVE UTILITIES
   ================================================ */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .stack-mobile {
    flex-direction: column;
  }

  .text-center-mobile {
    text-align: center;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ================================================
   LOADING STATES
   ================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-200) 25%, var(--color-gray-100) 50%, var(--color-gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

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

/* ================================================
   SCROLL PROGRESS
   ================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 9999;
  transition: width 0.1s linear;
}
