/* ==========================================================================
   BTR LOGISTIC - STITCH DESIGN SYSTEM "PRECISION LOGISTICS"
   Colors: Midnight Fleet Navy (#0B192C), Signal Orange (#FF6500), Steel Cobalt (#1E3E62)
   Typography: Plus Jakarta Sans & Inter
   ========================================================================== */

:root {
  /* Brand Tokens */
  --btr-navy-dark: #07101c;
  --btr-navy: #0b192c;
  --btr-navy-light: #132337;
  --btr-cobalt: #1e3e62;
  --btr-cobalt-light: #2b5687;
  
  --btr-orange: #ff6500;
  --btr-orange-hover: #ff7b24;
  --btr-orange-active: #e55a00;
  --btr-orange-light: #fff0e6;
  --btr-amber: #ff8e00;

  --btr-slate-900: #0f172a;
  --btr-slate-800: #1e293b;
  --btr-slate-700: #334155;
  --btr-slate-600: #475569;
  --btr-slate-500: #64748b;
  --btr-slate-400: #94a3b8;
  --btr-slate-300: #cbd5e1;
  --btr-slate-200: #e2e8f0;
  --btr-slate-100: #f1f5f9;
  --btr-slate-50: #f8fafc;
  --btr-white: #ffffff;

  --btr-emerald: #059669;
  --btr-emerald-light: #ecfdf5;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Elevations */
  --shadow-sm: 0 1px 2px 0 rgba(11, 25, 44, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(11, 25, 44, 0.08), 0 2px 4px -2px rgba(11, 25, 44, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(11, 25, 44, 0.1), 0 4px 6px -4px rgba(11, 25, 44, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(11, 25, 44, 0.15), 0 8px 10px -6px rgba(11, 25, 44, 0.08);
  --shadow-orange: 0 10px 25px -5px rgba(255, 101, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(255, 101, 0, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--btr-slate-800);
  background-color: var(--btr-slate-50);
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--btr-navy);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-top: 0;
}

/* Tabular numbers for telemetry, VINs, weights, volumes */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Container */
.btr-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Glassmorphism Classes (Stitch Spec) */
.glass-navy {
  background: rgba(11, 25, 44, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-card-dark {
  background: rgba(19, 35, 55, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--btr-slate-200);
}

/* Badge styles */
.badge-orange {
  background: var(--btr-orange-light);
  color: var(--btr-orange-active);
  border: 1px solid rgba(255, 101, 0, 0.25);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-navy {
  background: rgba(11, 25, 44, 0.08);
  color: var(--btr-navy);
  border: 1px solid rgba(11, 25, 44, 0.15);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-emerald {
  background: var(--btr-emerald-light);
  color: var(--btr-emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Custom Buttons with Shimmer sweep */
.btn-primary {
  background: var(--btr-orange);
  color: var(--btr-white) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(255, 101, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: 0.75s;
}

.btn-primary:hover::after {
  left: 150%;
}

.btn-primary:hover {
  background: var(--btr-orange-hover);
  box-shadow: var(--shadow-orange);
  transform: translateY(-2px);
}

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

.btn-navy {
  background: var(--btr-navy);
  color: var(--btr-white) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--btr-cobalt);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-navy:hover {
  background: var(--btr-cobalt);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.08);
  color: var(--btr-white) !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 0.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--btr-white);
  transform: translateY(-2px);
}

/* Service Card Hover effects */
.service-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--btr-slate-200);
  background: var(--btr-white);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: all 0.35s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(11, 25, 44, 0.12), 0 10px 10px -5px rgba(11, 25, 44, 0.04);
  border-color: rgba(255, 101, 0, 0.4);
}

.service-card:hover::before {
  background: linear-gradient(90deg, var(--btr-orange), var(--btr-amber));
}

.service-card:hover .service-icon {
  background: var(--btr-orange);
  color: var(--btr-white);
  transform: scale(1.1) rotate(6deg);
}

.service-icon {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fleet vehicle cards */
.fleet-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--btr-slate-200);
  background: var(--btr-white);
}

.fleet-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--btr-cobalt);
}

/* Hero Background and Parallax Glow */
.hero-wrapper {
  position: relative;
  background-color: var(--btr-navy);
  background-image: linear-gradient(135deg, rgba(7, 16, 28, 0.94) 0%, rgba(11, 25, 44, 0.88) 50%, rgba(30, 62, 98, 0.82) 100%), url('../assets/images/hero-truck.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

@media (min-width: 1024px) {
  .hero-wrapper {
    background-attachment: fixed;
  }
}

/* ==========================================================================
   ADVANCED ANIMATIONS (KEYFRAMES & MICRO-INTERACTIONS)
   ========================================================================== */

/* Pulsing Green Radar Dot */
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rgba(34, 197, 94, 0.5);
  animation: pulse 2s infinite ease-out;
}

/* Pulsing Orange Dot */
.pulse-orange-dot {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ff6500;
  border-radius: 50%;
}

.pulse-orange-dot::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(255, 101, 0, 0.5);
  animation: pulse 1.8s infinite ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Floating badge/card animation */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: floatSlow 4.5s ease-in-out infinite;
}

/* Moving truck along route */
@keyframes truckDrive {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(120px) scale(1.03);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

.animate-truck-drive {
  animation: truckDrive 8s ease-in-out infinite;
}

/* Glowing Border Pulse for Simulator */
@keyframes borderGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 101, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 101, 0, 0.35), 0 25px 30px -5px rgba(0, 0, 0, 0.4);
  }
}

.simulator-card-glow {
  animation: borderGlow 4s ease-in-out infinite;
}

/* Shimmer Highlight Effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-badge {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Smooth Fade In Up Reveal */
.fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Progress bar fill animation */
.progress-animated {
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tracking Step Indicator */
.tracking-step.completed .step-circle {
  background-color: var(--btr-orange);
  color: white;
  border-color: var(--btr-orange);
}

.tracking-step.active .step-circle {
  background-color: var(--btr-navy);
  color: white;
  border-color: var(--btr-orange);
  box-shadow: 0 0 0 5px rgba(255, 101, 0, 0.25);
}

/* Toast Notification */
#toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  transition: all var(--transition-normal);
  transform: translateY(150%);
  opacity: 0;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Floating quick contact button with soundwave radar */
.quick-call-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 900;
  box-shadow: var(--shadow-xl);
}

.quick-call-float::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: rgba(255, 101, 0, 0.3);
  animation: pulse 2.2s infinite ease-out;
  z-index: -1;
}

/* Floating Back To Top Button */
#backToTopBtn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;
}

#backToTopBtn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Print styles for quote estimations and invoices */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
