/* ==========================================================================
   Swift Logistics Route — Design System
   ========================================================================== */

:root {
  /* Brand */
  --primary: #0B1F3A;
  --primary-light: #155EEF;
  --accent: #FF7A00;

  /* Status */
  --success: #12B76A;
  --warning: #F79009;
  --danger: #D92D20;
  --info: #06AED4;
  --purple: #7A5AF8;

  /* Backgrounds */
  --bg: #F8FAFC;
  --surface: #FFFFFF;

  /* Typography */
  --text-dark: #101828;
  --text: #475467;
  --text-muted: #667085;

  /* Borders */
  --border: #D0D5DD;

  /* Derived tones (used sparingly, never replacing the tokens above) */
  --primary-tint: #EFF4FF;
  --accent-tint: #FFF1E5;
  --primary-deep: #071630;

  /* Rhythm */
  --radius-sm: 6px;
  --radius-md: 10px;
  --section-y: 6rem;
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  color: var(--text-dark);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 { font-weight: 700; letter-spacing: -0.02em; }

p { color: var(--text); }

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

.text-muted-custom { color: var(--text-muted) !important; }

.lede {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 62ch;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

.section-tag::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn { font-weight: 600; border-radius: var(--radius-sm); padding: 0.65rem 1.4rem; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }

.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover, .btn-accent:focus { background-color: #E56D00; border-color: #E56D00; color: #fff; }

.btn-primary-custom {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary-custom:hover, .btn-primary-custom:focus { background-color: var(--primary-deep); border-color: var(--primary-deep); color: #fff; }

.btn-outline-light-custom {
  background-color: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
}
.btn-outline-light-custom:hover { background-color: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

.btn-outline-primary-custom {
  background-color: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-dark);
}
.btn-outline-primary-custom:hover { border-color: var(--primary-light); color: var(--primary-light); }

/* ==========================================================================
   Navbar
   ========================================================================== */

.slr-navbar {
  background-color: var(--primary);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.slr-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Space Grotesk", sans-serif;
  color: #fff !important;
}

.slr-brand .mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.slr-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.slr-brand .brand-top {
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  color: #fff;
}

.slr-brand .brand-bottom {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.68);
  margin-top: 3px;
}

.slr-navbar .nav-link {
  color: rgba(255,255,255,0.78);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.slr-navbar .nav-link:hover { color: #fff; }

.slr-navbar .nav-link.active {
  color: #fff;
  background-color: rgba(255,255,255,0.08);
}

.slr-navbar .navbar-toggler {
  border-color: rgba(255,255,255,0.3);
}

.slr-navbar .navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(255,255,255,0.35); }

/* ==========================================================================
   Hero + route motif
   ========================================================================== */

.hero {
  background-color: var(--primary);
  background-image: radial-gradient(circle at 85% 20%, rgba(21,94,239,0.35), transparent 45%);
  padding: 5.5rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero h1 { color: #fff; }
.hero .lede { color: rgba(255,255,255,0.75); }

.page-hero {
  background-color: var(--primary);
  padding: 3.75rem 0;
}
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.72); margin-bottom: 0; }

/* Photographic hero treatments (real photography with a brand-navy overlay) */
.hero-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--primary);
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: 7rem 0 5.5rem;
  overflow: hidden;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(7,22,48,0.95) 0%, rgba(7,22,48,0.82) 40%, rgba(7,22,48,0.32) 78%);
  z-index: 1;
}
.hero-photo .container { position: relative; z-index: 2; }
.hero-photo h1 { color: #fff; }
.hero-photo .lede { color: rgba(255,255,255,0.8); }

.page-hero-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--primary);
  padding: 5.5rem 0;
  overflow: hidden;
}
.page-hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(7,22,48,0.93) 15%, rgba(7,22,48,0.5) 85%);
  z-index: 1;
}
.page-hero-photo .container { position: relative; z-index: 2; }
.page-hero-photo h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero-photo p { color: rgba(255,255,255,0.75); margin-bottom: 0; }

.route-svg .path-line {
  stroke: rgba(255,255,255,0.35);
  stroke-width: 2;
  stroke-dasharray: 7 7;
  fill: none;
}
.route-svg .waypoint { fill: #fff; }
.route-svg .waypoint-ring { fill: none; stroke: rgba(255,255,255,0.4); stroke-width: 1.5; }
.route-svg .waypoint-active { fill: var(--accent); }
.route-svg .pin-origin { fill: var(--info); }
.route-svg .pin-dest { fill: var(--accent); }
.route-svg .truck { fill: #fff; }

.route-divider {
  height: 24px;
  width: 100%;
  overflow: hidden;
}
.route-divider svg { width: 100%; height: 100%; display: block; }
.route-divider .path-line { stroke: var(--border); stroke-width: 2; stroke-dasharray: 6 8; fill: none; }
.route-divider .dot { fill: var(--accent); }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  margin-top: 2.5rem;
}
.stat-row .stat-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat-row .stat-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

/* ==========================================================================
   Sections / Panels
   ========================================================================== */

section { padding: var(--section-y) 0; }

.panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  height: 100%;
  transition: border-color .15s ease;
}
.panel:hover { border-color: var(--primary-light); }

.panel .icon-tile {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-tint);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
}

.panel.accent-top { border-top: 3px solid var(--accent); }

.bg-surface-alt { background-color: var(--surface); }

.badge-industry {
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.badge-industry i { color: var(--primary-light); }

/* Process steps (legitimate sequence) */
.process-step {
  position: relative;
  padding-left: 3.25rem;
}
.process-step .step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Testimonials */
.testimonial {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  height: 100%;
}
.testimonial .quote-mark { color: var(--accent); font-size: 2rem; font-family: "Space Grotesk", sans-serif; line-height: 1; }
.testimonial .author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background-color: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; font-family: "Space Grotesk", sans-serif;
}

/* CTA banner */
.cta-banner {
  background-color: var(--primary);
  border-radius: var(--radius-md);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.7); }

/* Timeline (About) */
.timeline { position: relative; padding-left: 2rem; border-left: 2px dashed var(--border); }
.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.42rem;
  top: 0.15rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background-color: var(--success);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--success);
}
.timeline-item .year { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--primary-light); }

/* Team */
.team-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background-color: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control, .form-select {
  border-color: var(--border);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.form-label { font-weight: 600; color: var(--text-dark); font-size: 0.92rem; margin-bottom: 0.4rem; }

/* Track lookup */
.track-search .form-control { padding: 0.9rem 1.1rem; font-size: 1.05rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}
.status-badge.transit { background-color: #EFF4FF; color: var(--primary-light); }
.status-badge.delivered { background-color: #E8F9F0; color: var(--success); }
.status-badge.pending { background-color: #FEF3E7; color: var(--warning); }
.status-badge.exception { background-color: #FDECEC; color: var(--danger); }
.status-badge .dot { width: 7px; height: 7px; border-radius: 50%; background-color: currentColor; }

.stepper { display: flex; justify-content: space-between; position: relative; margin: 2.5rem 0 1rem; }
.stepper::before {
  content: "";
  position: absolute;
  top: 17px; left: 5%; right: 5%;
  height: 2px;
  background-color: var(--border);
  z-index: 0;
}
.stepper .step { position: relative; z-index: 1; text-align: center; flex: 1; }
.stepper .step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background-color: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.6rem;
  font-size: 0.95rem;
}
.stepper .step.done .step-circle { background-color: var(--success); border-color: var(--success); color: #fff; }
.stepper .step.current .step-circle { background-color: var(--accent); border-color: var(--accent); color: #fff; }
.stepper .step-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.stepper .step.done .step-label, .stepper .step.current .step-label { color: var(--text-dark); }

@media (max-width: 767px) {
  .stepper { flex-direction: column; gap: 1.25rem; align-items: flex-start; }
  .stepper::before { display: none; }
  .stepper .step { display: flex; align-items: center; gap: 0.75rem; text-align: left; }
  .stepper .step-circle { margin: 0; flex-shrink: 0; }
}

#trackResult { display: none; }
#trackEmpty.hide, #trackResult.show { display: block; }

/* Contact */
.contact-card {
  display: flex;
  gap: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
}
.contact-card .icon-tile { margin-bottom: 0; flex-shrink: 0; }

.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 340px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.15); }

#formSuccess { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */

.slr-footer {
  background-color: var(--primary-deep);
  color: rgba(255,255,255,0.65);
  padding: 4rem 0 0;
}
.slr-footer h6 { color: #fff; font-family: "Space Grotesk", sans-serif; margin-bottom: 1.1rem; font-size: 0.95rem; }
.slr-footer a { color: rgba(255,255,255,0.6); }
.slr-footer a:hover { color: #fff; }
.slr-footer .footer-brand { color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.slr-footer p { color: rgba(255,255,255,0.55); }
.slr-footer .footer-list { list-style: none; padding: 0; margin: 0; }
.slr-footer .footer-list li { margin-bottom: 0.65rem; }
.slr-footer .social-icons { display: flex; gap: 0.6rem; margin-top: 1.25rem; }
.slr-footer .social-icons a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
}
.slr-footer .social-icons a:hover { border-color: var(--accent); background-color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

/* Back to top */
#backToTop {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 1030;
  box-shadow: 0 4px 14px rgba(11,31,58,0.3);
}
#backToTop.show { display: flex; }

/* Accordion (Track FAQ) */
.accordion-button:not(.collapsed) {
  background-color: var(--primary-tint);
  color: var(--primary);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: 0 0 0 3px var(--primary-tint); }
