/**
 * Afanti Automotive Marketing Landing Page
 * Design System: Premium, Tech-Forward, Cohesive
 * Aesthetic: Refined minimalism with strategic depth
 */

/* ==================== DESIGN TOKENS ==================== */
:root {
  /* Spacing scale - consistent rhythm */
  --space-section: 6rem;
  --space-section-sm: 4rem;
  --space-content: 4rem;
  --space-element: 2rem;

  /* Typography scale */
  --text-hero: clamp(2.5rem, 5vw, 4.5rem);
  --text-h2: clamp(2rem, 4vw, 3rem);
  --text-h3: clamp(1.5rem, 3vw, 2rem);
  --text-body: 1.125rem;
  --text-small: 0.875rem;

  /* Colors - Brand system */
  --color-brand-primary: #3373ff;
  --color-brand-light: #5999ff;
  --color-brand-dark: #1a4ff5;

  /* Surfaces */
  --surface-dark: #0f172a;
  --surface-darker: #020617;
  --surface-light: #ffffff;
  --surface-gray: #f8fafc;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== BASE ==================== */
* {
  font-family: 'DM Sans', 'Noto Sans SC', -apple-system, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Text utilities */
.text-pretty { text-wrap: pretty; }
.text-balance { text-wrap: balance; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: rgba(51, 115, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(51, 115, 255, 0.5);
}

/* ==================== NAVIGATION ==================== */
#header {
  transition: all var(--transition-base);
}

#header.scrolled {
  position: fixed !important;
}

#navbar {
  background: transparent;
  transition: background-color var(--transition-base),
              backdrop-filter var(--transition-base),
              box-shadow var(--transition-base);
  will-change: background-color, backdrop-filter;
}

#navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
}

#navbar.scrolled a,
#navbar.scrolled button {
  color: white !important;
  transition: color var(--transition-base);
}

#navbar.scrolled a:hover {
  color: var(--color-brand-light) !important;
}

/* ==================== SECTIONS ==================== */
/* Consistent section spacing */
section {
  position: relative;
}

/* Dark sections */
.section-dark {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: white;
}

/* Light sections */
.section-light {
  background: white;
  color: #111827;
}

/* Gray sections */
.section-gray {
  background: #f8fafc;
  color: #111827;
}

/* ==================== TYPOGRAPHY REFINEMENTS ==================== */
.heading-gradient {
  background: linear-gradient(135deg, var(--color-brand-light) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== CARDS & COMPONENTS ==================== */
/* Glass effect for overlays */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ==================== DECORATIVE ELEMENTS ==================== */
/* Blur orbs for depth */
.blur-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
}

/* Grain texture overlay */
.grain-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s var(--transition-base) forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Stagger delays for orchestrated reveals */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ==================== UTILITIES ==================== */
/* Focus states */
.focus-ring:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

/* Hover lift effect */
.hover-lift {
  transition: transform var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Brand logo treatment */
.brand-logo {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.125rem;
  transition: all var(--transition-fast);
}

.brand-logo-wide {
  width: 2.5rem;
  height: 1.75rem;
  object-fit: cover;
  object-position: left center;
}

.brand-logo:hover {
  transform: scale(1.05);
}

/* ==================== RESPONSIVE UTILITIES ==================== */
@media (max-width: 640px) {
  :root {
    --space-section: 4rem;
    --space-content: 2rem;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  .no-print {
    display: none !important;
  }
}
