/* ==============================================================================
   ROAD LEGAL COMPLIANCE & SAFETY - COMMERCIAL STYLESHEET
   Brand Colors: Deep Navy (#0F2537), Forest Emerald (#0E8345), Crisp White (#FFFFFF)
   Accessibility: High Contrast WCAG AA Compliant
   ============================================================================== */

:root {
  --navy-900: #0a1926;
  --navy-800: #0f2537;
  --navy-700: #1a365d;
  --navy-600: #244b7d;
  --emerald-700: #0a6534;
  --emerald-600: #0e8345;
  --emerald-500: #16a34a;
  --emerald-400: #22c55e;
  --emerald-100: #dcfce7;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --red-600:   #dc2626;
  --red-100:   #fee2e2;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--slate-800);
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 3px solid var(--emerald-500) !important;
  outline-offset: 3px !important;
}

/* Skip link for keyboard navigators */
.skip-link {
  position: absolute;
  top: -40px;
  left: 20px;
  background: var(--navy-800);
  color: #ffffff;
  padding: 8px 16px;
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 10px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--navy-800);
  font-weight: 800;
  line-height: 1.25;
}

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 2px solid transparent;
  gap: 0.5rem;
  text-align: center;
}

.btn-primary {
  background-color: var(--emerald-600);
  color: #ffffff;
  border-color: var(--emerald-600);
  box-shadow: 0 4px 12px rgba(14, 131, 69, 0.25);
}
.btn-primary:hover {
  background-color: var(--emerald-700);
  border-color: var(--emerald-700);
  transform: translateY(-1px);
}

.btn-navy {
  background-color: var(--navy-800);
  color: #ffffff;
  border-color: var(--navy-800);
}
.btn-navy:hover {
  background-color: var(--navy-900);
  border-color: var(--navy-900);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn-outline:hover {
  background-color: var(--navy-800);
  color: #ffffff;
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}
.btn-outline-white:hover {
  background-color: #ffffff;
  color: var(--navy-800);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
}

.badge-green {
  background-color: var(--emerald-100);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-400);
}

.badge-navy {
  background-color: #e2e8f0;
  color: var(--navy-800);
  border: 1px solid var(--slate-300);
}

.badge-red {
  background-color: var(--red-100);
  color: var(--red-600);
}

.badge-amber {
  background-color: var(--amber-100);
  color: var(--amber-600);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.top-bar {
  background-color: var(--navy-800);
  color: #ffffff;
  font-size: 0.8125rem;
  padding: 0.4rem 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  border-radius: 4px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--navy-800);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-title span {
  color: var(--emerald-600);
}
.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-500);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.75rem;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-700);
  transition: color 0.15s;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--emerald-600);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--emerald-600);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--navy-800);
}

/* ==============================================================================
   ANIMATED HERO & VIDEO BANNER STYLES
   ============================================================================== */
.hero-section {
  position: relative;
  background: #0A1926;
  color: #ffffff;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}

/* Animated road / highway motion background canvas & styling */
.hero-animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
  background: radial-gradient(circle at 20% 30%, #1A365D 0%, transparent 60%),
              radial-gradient(circle at 80% 70%, #0E8345 0%, transparent 50%),
              linear-gradient(180deg, rgba(10, 25, 38, 0.85) 0%, rgba(15, 37, 55, 0.95) 100%);
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(135deg, rgba(10, 25, 38, 0.92) 0%, rgba(15, 37, 55, 0.85) 50%, rgba(10, 25, 38, 0.95) 100%);
  pointer-events: none;
}

/* Animated road grid lines representing freight arteries */
.road-arteries-animation {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background: 
    linear-gradient(90deg, transparent 49.5%, rgba(22, 163, 74, 0.2) 50%, transparent 50.5%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 100%, 100% 30px;
  animation: roadFlow 18s linear infinite;
  perspective: 400px;
  transform: rotateX(55deg) scale(1.5);
  transform-origin: bottom center;
  opacity: 0.35;
}

@keyframes roadFlow {
  0% { background-position: 0 0; }
  100% { background-position: 0 600px; }
}

.hero-content-wrap {
  position: relative;
  z-index: 10;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-headline {
  font-size: 2.75rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-headline span.accent {
  color: #34d399;
}

.hero-lead {
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 620px;
}

.trust-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* ==============================================================================
   HIGH CONTRAST RISK SELF-CHECK TOOL STYLING (WCAG AA)
   ============================================================================== */
.risk-calc-box {
  background: #FFFFFF !important;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--slate-300);
  color: var(--slate-900) !important;
}

.risk-calc-box h2,
.risk-calc-box h3 {
  color: #0F172A !important;
}

.risk-calc-box p {
  color: #334155 !important;
}

.risk-calc-box .form-label {
  color: #0F172A !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  margin-bottom: 0.5rem !important;
}

/* Styled interactive radio option cards with crisp dark text */
.risk-option-card {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 6px !important;
  background-color: #F8FAFC !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #0F172A !important; /* ULTRA HIGH CONTRAST DARK TEXT */
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
}

.risk-option-card:hover {
  background-color: #F1F5F9 !important;
  border-color: var(--emerald-600) !important;
}

.risk-option-card:has(input:checked) {
  background-color: #DCFCE7 !important;
  border-color: var(--emerald-600) !important;
  color: #064E3B !important;
  box-shadow: 0 1px 3px rgba(14, 131, 69, 0.15) !important;
}

.risk-option-card input[type="radio"] {
  accent-color: var(--emerald-600);
  width: 17px;
  height: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

.score-meter {
  height: 12px;
  background-color: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.score-fill {
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.6s;
}

/* Card Grids */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-navy {
  background-color: var(--navy-800);
  color: #ffffff;
  border-color: var(--navy-700);
}
.card-navy h3, .card-navy h4 {
  color: #ffffff;
}

.pillar-card {
  border-top: 4px solid var(--emerald-600);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pillar-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--emerald-100);
  color: var(--emerald-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Service Proposal Card */
.service-card {
  background: #ffffff;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card.featured {
  border-color: var(--emerald-600);
  box-shadow: var(--shadow-lg);
}

.checklist {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--slate-700);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald-600);
  font-weight: 900;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate-800);
  background-color: #ffffff;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(14, 131, 69, 0.15);
  outline: none;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.site-footer {
  background-color: var(--navy-900);
  color: var(--slate-300);
  margin-top: auto;
  border-top: 4px solid var(--emerald-600);
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-heading {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: var(--slate-300);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #34d399;
}

.legal-banner {
  background: var(--navy-800);
  border: 1px solid #1e3a5f;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 2rem;
}

.footer-bottom {
  border-top: 1px solid #1e3a5f;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 2.1rem;
  }
  .nav-links {
    display: none;
  }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--emerald-600);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    gap: 1rem;
    z-index: 100;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .road-arteries-animation {
    animation: none !important;
  }
}

/* --- High-Contrast Risk Self-Check Option Cards --- */
.risk-option-card {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 8px !important;
  color: #0F172A !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-bottom: 0.5rem !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

.risk-option-card:hover {
  border-color: #0E8345 !important;
  background: #F0FDF4 !important;
}

.risk-option-card input[type="radio"] {
  accent-color: #0E8345 !important;
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.risk-option-card input[type="radio"]:checked ~ span,
.risk-option-card:has(input[type="radio"]:checked) {
  border-color: #0E8345 !important;
  background: #ECFDF5 !important;
  color: #064E3B !important;
  box-shadow: 0 0 0 1.5px #0E8345 !important;
}

.risk-option-card span {
  color: #0F172A !important;
  font-size: 0.875rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}

/* --- Hero Animated Video / Motion Banner --- */
.hero-video-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: #0B1926;
}

.hero-video-banner,
.hero-canvas-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(15, 37, 55, 0.85) 0%, rgba(15, 37, 55, 0.4) 60%, rgba(15, 37, 55, 0.75) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  pointer-events: none;
}

.hero-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 131, 69, 0.85);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

