/* =============================================
   ESCO LOGISTICS LLC — GLOBAL DESIGN SYSTEM
   Dark & Orange Theme
   ============================================= */

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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-card: rgba(255, 255, 255, 0.9);
  --accent: #FF5A1F;
  --accent-light: #FF9933;
  --accent-dark: #E62E00;
  --accent-glow: rgba(255, 68, 0, 0.15);
  --accent-gradient: linear-gradient(90deg, #FF9933, #FF2A00);
  --accent-gradient-r: linear-gradient(90deg, #FF2A00, #FF9933);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-hover: rgba(0, 0, 0, 0.04);
  --success: #00ba7c;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --container-max: 1280px;
  --container-padding: 1.5rem;
  --section-padding: 6rem 0;
  --card-radius: 16px;
  --btn-radius: 10px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 4px 20px rgba(255, 107, 0, 0.2);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-secondary); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
  .bg-glow {
    display: none !important;
  }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }
p { color: var(--text-secondary); line-height: 1.8; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); }
.section { padding: var(--section-padding); position: relative; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header .accent-line { width: 60px; height: 4px; background: var(--accent-gradient); border-radius: 2px; margin: 0 auto 1.5rem; }
.section-header p { max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-gradient { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }

.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

/* ---- Icon System (replacing emojis) ---- */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* ---- Truck/Dispatching Backgrounds ---- */
.bg-trucks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-trucks::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60' opacity='0.03'%3E%3Cpath d='M10 45h25v-15h15l10-10h15v25h5v5h-10a8 8 0 01-16 0h-20a8 8 0 01-16 0h-8v-5zm14 5a5 5 0 100-10 5 5 0 000 10zm40 0a5 5 0 100-10 5 5 0 000 10z' fill='%23ff6b00'/%3E%3C/svg%3E");
  background-size: 200px 100px;
  background-repeat: repeat;
  animation: trucksScroll 60s linear infinite;
}

.bg-trucks::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,107,0,0.15) 0px, rgba(255,107,0,0.15) 30px, transparent 30px, transparent 50px);
}

@keyframes trucksScroll {
  0% { background-position: 0 0; }
  100% { background-position: 2000px 0; }
}

.bg-dispatch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-dispatch::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    /* Highway lanes */
    linear-gradient(0deg, transparent 49%, rgba(255,107,0,0.04) 49%, rgba(255,107,0,0.04) 51%, transparent 51%),
    /* Route dots */
    radial-gradient(circle 2px, rgba(255,107,0,0.06) 100%, transparent 100%),
    /* Grid pattern like dispatch map */
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 100% 80px, 40px 40px, 80px 80px, 80px 80px;
}

/* Animated route lines for hero */
.bg-routes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-routes .route-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  animation: routeMove 8s linear infinite;
  opacity: 0.3;
}

.bg-routes .route-line:nth-child(1) { top: 20%; width: 40%; left: -40%; animation-delay: 0s; animation-duration: 12s; }
.bg-routes .route-line:nth-child(2) { top: 40%; width: 30%; left: -30%; animation-delay: 3s; animation-duration: 10s; }
.bg-routes .route-line:nth-child(3) { top: 60%; width: 50%; left: -50%; animation-delay: 6s; animation-duration: 14s; }
.bg-routes .route-line:nth-child(4) { top: 75%; width: 35%; left: -35%; animation-delay: 2s; animation-duration: 11s; }
.bg-routes .route-line:nth-child(5) { top: 30%; width: 25%; left: -25%; animation-delay: 5s; animation-duration: 9s; }

@keyframes routeMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 100%)); }
}

/* Truck silhouette floating elements */
.bg-truck-float {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.bg-truck-float svg {
  fill: rgba(255, 107, 0, 0.04);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Scroll Animations ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.9); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-scale.active { opacity: 1; transform: scale(1); }

.stagger-children > * { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

.bg-glow { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); pointer-events: none; z-index: 0; filter: blur(80px); }

.page-content { min-height: 100vh; }

.preloader { position: fixed; inset: 0; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; z-index: 10000; transition: opacity 0.5s ease, visibility 0.5s ease; }
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-spinner { width: 50px; height: 50px; border: 3px solid var(--glass-border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  :root { --container-padding: 1rem; --section-padding: 4rem 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
}

/* ---- Admin Visibility ---- */
/* Hide dashboard links from public navigation (admin direct access only) */
a[href*="dashboard.html"] {
  display: none !important;
}

/* Remove elements requested by user */
.footer-socials,
.back-to-top,
#backToTop {
  display: none !important;
}
