/* ==========================================================================
   FastLane Sarajevo — Modern Automotive UI Stylesheet (CSS3)
   Works alongside Tailwind CSS CDN with full Light & Dark mode support
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800;900&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --brand-amber: #f59e0b;
  --brand-amber-hover: #d97706;
  --brand-orange: #ea580c;
  --brand-glow: rgba(245, 158, 11, 0.22);
  --card-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.07);
  --card-shadow-hover: 0 20px 40px -12px rgba(15, 23, 42, 0.14);
}

html.dark,
html[data-theme="dark"] {
  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-elevated: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.85);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --brand-amber: #f59e0b;
  --brand-amber-hover: #fbbf24;
  --brand-orange: #f97316;
  --brand-glow: rgba(245, 158, 11, 0.28);
  --card-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 20px 42px -10px rgba(0, 0, 0, 0.7);
}

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.font-mono-num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Glassmorphism Sticky Header */
.glass-nav {
  background-color: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Automotive Carbon & Tread Background Accents */
.hero-mesh {
  background-image:
    radial-gradient(at 85% 15%, rgba(245, 158, 11, 0.16) 0px, transparent 50%),
    radial-gradient(at 15% 85%, rgba(234, 88, 12, 0.10) 0px, transparent 55%);
}

html.dark .hero-mesh {
  background-image:
    radial-gradient(at 85% 15%, rgba(245, 158, 11, 0.20) 0px, transparent 50%),
    radial-gradient(at 15% 85%, rgba(234, 88, 12, 0.14) 0px, transparent 55%);
}

.carbon-grid {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
}

/* Interactive Card Elevations */
.fl-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

.fl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(245, 158, 11, 0.45);
}

/* Navigation Active Underline Indicator */
.fl-nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.fl-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  transition: width 0.25s ease;
}

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

/* Tire Spin Subtle Animation */
@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tire-spin-hover:hover .tire-icon-rotate {
  animation: slowSpin 8s linear infinite;
}

/* Pulse Dot for Live Status */
@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.4;
  }
}

.pulse-dot {
  animation: statusPulse 2s infinite ease-in-out;
}

/* Form Input Focus Ring */
.fl-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.fl-input:focus {
  outline: none;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.fl-input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Accordion Smooth Transition */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.open .faq-content {
  max-height: 500px;
  opacity: 1;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 9999px;
  border: 2px solid var(--bg-canvas);
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}
