/* Forge Fleet Growth: shared stylesheet
   Palette: asphalt, manifest paper, steel, signal blue, marker yellow */

:root {
  --asphalt: #14181c;
  --ink-2: #2d343a;
  --paper: #f3f4f1;
  --white: #ffffff;
  --steel: #56626b;
  --signal: #1f4e8c;
  --signal-dark: #173d6e;
  --marker: #f2c230;
  --rule: #c8cdc9;

  --font-head: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 70rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--asphalt);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Type */
h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2.5rem, 1.2rem + 6vw, 4.75rem);
  line-height: 1.02;
  max-width: 16ch;
}

h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem);
  max-width: 20ch;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}

p,
li,
dd {
  max-width: 68ch;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

a {
  color: var(--signal);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--signal-dark);
}

a:focus-visible,
.btn:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid var(--asphalt);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--asphalt);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.6rem;
  background: var(--signal);
  color: var(--white);
  font: 600 1.05rem var(--font-body);
  text-decoration: none;
  border-radius: 2px;
}

.btn:hover {
  background: var(--signal-dark);
  color: var(--white);
}

.btn-sm {
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: 1rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: var(--asphalt);
  text-decoration: none;
  font: 700 1.35rem var(--font-head);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  max-width: none;
}

.nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--asphalt);
  text-decoration: none;
  font-weight: 500;
}

.nav a:not(.btn):hover {
  text-decoration: underline;
}

.nav a[aria-current="page"] {
  font-weight: 600;
  box-shadow: inset 0 -4px 0 var(--marker);
}

/* Menu toggle (hidden until the script confirms JavaScript is running) */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.9rem;
  background: transparent;
  color: var(--asphalt);
  border: 1px solid var(--asphalt);
  border-radius: 2px;
  font: 600 1rem var(--font-body);
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--asphalt);
}

.bars {
  position: relative;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .bars::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bars::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 52rem) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .nav {
    display: none;
    width: 100%;
  }

  .js .nav.open {
    display: block;
    padding-bottom: 0.5rem;
  }

  .js .nav ul {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
  }

  .js .nav li {
    border-top: 1px solid var(--rule);
  }

  .js .nav a:not(.btn) {
    width: 100%;
    min-height: 48px;
  }

  .js .nav li:last-child {
    padding-top: 0.75rem;
  }

  .js .nav .btn {
    width: 100%;
  }
}

@media (max-width: 64rem) {
  .nav ul {
    gap: 0.15rem 1rem;
  }
}

/* Hero */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: 4rem;
  }
}

.hero .lead {
  margin-top: 1.5rem;
}

.hero-cta {
  margin-top: 2rem;
}

.hero-note {
  margin: 1rem 0 0;
  font-size: 0.97rem;
  color: var(--steel);
}

/* Driver intake sheet (the one memorable element) */
.sheet {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--asphalt);
  border-top: 6px solid var(--asphalt);
}

@media (min-width: 56rem) {
  .sheet {
    transform: rotate(-1deg);
  }
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px dashed var(--steel);
  font: 500 0.75rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
}

.sheet-body {
  padding: 1.25rem 1rem 0.5rem;
}

.flow {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.6rem;
  position: relative;
}

.flow::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.9rem;
  bottom: 1.3rem;
  width: 2px;
  background: var(--asphalt);
  transform-origin: top;
  animation: draw 1.1s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.flow li {
  position: relative;
  padding: 0.3rem 0 0.9rem;
  font-size: 0.97rem;
  line-height: 1.45;
}

.flow li::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  background: var(--marker);
  border: 2px solid var(--asphalt);
}

.flow b {
  font: 500 0.85rem var(--font-mono);
  margin-right: 0.5rem;
}

.lanes {
  margin: 0.75rem 0 0;
  border-top: 2px solid var(--asphalt);
}

.lane {
  display: grid;
  grid-template-columns: 6.75rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.lane:last-child {
  border-bottom: 0;
}

.lane dt {
  font: 700 1.15rem var(--font-head);
}

.lane dd {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--ink-2);
}

.stamp {
  justify-self: start;
  background: var(--marker);
  border: 2px solid var(--asphalt);
  padding: 0.1rem 0.45rem;
  transform: rotate(-3deg);
  animation: stamp 0.45s 1.5s both;
}

.sheet figcaption {
  padding: 0.7rem 1rem;
  border-top: 1px dashed var(--steel);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--steel);
}

@keyframes draw {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: scale(1.8) rotate(-12deg);
  }
  60% {
    opacity: 1;
    transform: scale(0.95) rotate(-3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-3deg);
  }
}

/* Sections */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--rule);
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }

  .sticky {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

.split-head p {
  margin-top: 1rem;
  color: var(--ink-2);
}

.checks {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  border-top: 2px solid var(--asphalt);
}

.checks li {
  position: relative;
  padding: 0.9rem 0 0.9rem 2rem;
  border-bottom: 1px solid var(--rule);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.2rem;
  width: 0.95rem;
  height: 0.5rem;
  border-left: 3px solid var(--signal);
  border-bottom: 3px solid var(--signal);
  transform: rotate(-45deg);
}

.bullets {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.bullets li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.4rem;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 7px;
  height: 7px;
  background: var(--asphalt);
}

/* Route: how it works */
.route {
  list-style: none;
  margin: 0 0 0 0.4rem;
  padding: 0;
  counter-reset: step;
}

.route li {
  counter-increment: step;
  position: relative;
  padding: 0 0 2.25rem 2rem;
  border-left: 2px solid var(--asphalt);
}

.route li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.route li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  background: var(--marker);
  border: 2px solid var(--asphalt);
}

.route h3::before {
  content: "Stop " counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.2rem;
  font: 500 0.82rem var(--font-mono);
  color: var(--steel);
}

.route p {
  margin: 0.4rem 0 0;
  color: var(--ink-2);
}

/* Spec sheet: what's included */
.spec {
  margin: 0;
  border-top: 2px solid var(--asphalt);
}

.spec > div {
  display: grid;
  gap: 0.2rem 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 40rem) {
  .spec > div {
    grid-template-columns: minmax(0, 13rem) 1fr;
  }
}

.spec dt {
  font: 600 1.2rem/1.3 var(--font-head);
}

.spec dd {
  margin: 0;
  color: var(--ink-2);
}

.more {
  margin-top: 1.5rem;
}

/* Call to action band */
.cta {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 6px solid var(--asphalt);
}

.cta-grid {
  display: grid;
  gap: 1.75rem;
  align-items: end;
}

@media (min-width: 56rem) {
  .cta-grid {
    grid-template-columns: 1fr auto;
    gap: 4rem;
  }
}

.cta h2 {
  max-width: 18ch;
}

.cta p {
  margin: 1rem 0 0;
  color: var(--ink-2);
}

/* Inner page heads */
.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
}

.page-head .lead {
  margin-top: 1.5rem;
}

.page-head.legal h1 {
  font-size: clamp(2.25rem, 1.2rem + 4vw, 3.5rem);
  max-width: none;
}

.meta {
  margin: 1.25rem 0 0;
  font: 500 0.88rem var(--font-mono);
  color: var(--steel);
}

/* Services rows */
.svc h2 {
  font-size: clamp(1.7rem, 1.1rem + 2vw, 2.4rem);
}

.svc .num {
  display: block;
  margin-bottom: 0.5rem;
  font: 500 0.85rem var(--font-mono);
  color: var(--steel);
}

.svc h3 {
  margin: 1.5rem 0 0.5rem;
}

.lanes-list {
  margin: 1rem 0 1.5rem;
  border-top: 2px solid var(--asphalt);
}

.lanes-list > div {
  display: grid;
  gap: 0.1rem 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 40rem) {
  .lanes-list > div {
    grid-template-columns: 8rem 1fr;
  }
}

.lanes-list dt {
  font: 700 1.1rem var(--font-head);
}

.lanes-list dd {
  margin: 0;
  color: var(--ink-2);
}

.twocol {
  display: grid;
  gap: 2rem;
}

@media (min-width: 40rem) {
  .twocol {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.twocol > div {
  border-top: 2px solid var(--asphalt);
  padding-top: 1rem;
}

/* Company details */
.facts {
  margin: 0;
  border-top: 2px solid var(--asphalt);
}

.facts > div {
  display: grid;
  gap: 0.1rem 2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 40rem) {
  .facts > div {
    grid-template-columns: 11rem 1fr;
  }
}

.facts dt {
  font: 500 0.9rem var(--font-mono);
  color: var(--steel);
}

.facts dd {
  margin: 0;
}

.facts dd.big {
  max-width: none;
  font: 700 clamp(1.5rem, 1rem + 2vw, 2.25rem) / 1.15 var(--font-head);
}

.result {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.note {
  font-size: 0.95rem;
  color: var(--steel);
}

/* Legal prose */
.prose {
  max-width: 68ch;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.prose h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  max-width: none;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--asphalt);
}

.prose h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.15rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-left: 6px solid var(--asphalt);
}

.callout p:last-child {
  margin-bottom: 0;
}

.toc {
  margin: 1.5rem 0 0;
  padding: 0 0 0 1.25rem;
  color: var(--ink-2);
}

.toc li {
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--asphalt);
  color: #e6eae7;
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.site-footer a {
  color: #e6eae7;
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer a:focus-visible {
  outline-color: var(--marker);
}

.foot {
  display: grid;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .foot {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

.foot-name {
  margin: 0 0 0.5rem;
  font: 700 1.4rem var(--font-head);
  color: var(--white);
}

.site-footer address {
  font-style: normal;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  max-width: none;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.foot-label {
  margin: 0 0 0.35rem;
  font: 500 0.82rem var(--font-mono);
  color: #aab3ad;
}

.foot-base {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #39424a;
  font-size: 0.9rem;
  color: #aab3ad;
}

.foot-base p {
  margin: 0;
  max-width: none;
}

/* Small screens */
@media (max-width: 40rem) {
  .nav {
    width: 100%;
  }

  .nav ul {
    gap: 0.1rem 1rem;
  }

  .lane {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .btn {
    width: 100%;
  }

  .nav .btn,
  .btn-sm {
    width: auto;
  }

  .js .nav .btn {
    width: 100%;
  }
}

/* Reduced motion: show final state, no animation */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .flow::before,
  .stamp {
    animation: none;
  }

  .sheet {
    transform: none;
  }
}

.twocol h4 {
  margin: 0 0 0.5rem;
  font: 600 1.25rem/1.25 var(--font-head);
}

/* ---- Motion layer (decoration only) ---- */

/* Hero lane map: road network with moving route dots */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.lane-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 10%, #000 60%);
  mask-image: linear-gradient(90deg, transparent 10%, #000 60%);
}

.lane-map svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: translate(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -9px));
  transition: transform 0.3s ease-out;
}

.lane-map .base {
  fill: none;
  stroke: #c8cdc9;
  stroke-width: 2;
}

.lane-map .dots {
  fill: none;
  stroke: #14181c;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.1 34;
  opacity: 0.55;
  animation: travel 8s linear infinite;
}

.lane-map .d2 { animation-duration: 11s; }
.lane-map .d3 { animation-duration: 9.5s; }
.lane-map .d4 { animation-duration: 13s; }
.lane-map .d5 { animation-duration: 10s; }

.lane-map .node {
  fill: #f2c230;
  stroke: #14181c;
  stroke-width: 2;
}

.lane-map .ring {
  fill: none;
  stroke: #14181c;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3.4s ease-out infinite;
}

@keyframes travel {
  to { stroke-dashoffset: -341; }
}

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

@media (max-width: 55.99rem) {
  .lane-map {
    opacity: 0.45;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* Intake sheet: tilts toward the pointer on desktop */
@media (min-width: 56rem) {
  .sheet {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-1deg);
    box-shadow: calc(var(--sx, 0) * -24px) calc(var(--sy, 0) * 24px + 14px) 30px rgba(20, 24, 28, 0.16);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
  }
}

/* How it works: route draws and stops light up as you scroll */
.js .route li {
  border-left-color: var(--rule);
}

.js .route li:last-child {
  border-left-color: transparent;
}

.route li::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--asphalt);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s ease;
}

.route li:last-child::after {
  display: none;
}

.route li.in::after {
  transform: scaleY(1);
}

.js .route li::before {
  background: var(--white);
  transition: background 0.35s ease 0.2s;
}

.js .route li.in::before {
  background: var(--marker);
}

/* Use cases: the 5 to 10 range as filled seats */
.seats-wrap {
  margin-top: 1.75rem;
  max-width: 30rem;
}

.seats {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.3rem;
}

.seats span {
  aspect-ratio: 1;
  border: 2px solid var(--asphalt);
  background: var(--marker);
}

.seats span.maybe {
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(20, 24, 28, 0.25) 5px 7px);
}

.js .seats span {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: calc(var(--i) * 90ms);
}

.js .seats.in span {
  opacity: 1;
  transform: none;
}

.seats-wrap .note {
  margin-top: 0.75rem;
}

/* Reduced motion: everything static and fully visible */
@media (prefers-reduced-motion: reduce) {
  .lane-map .dots,
  .lane-map .ring {
    animation: none;
  }

  .lane-map .ring {
    opacity: 0;
  }

  .lane-map svg {
    transform: none;
    transition: none;
  }

  .sheet {
    transform: none;
    transition: none;
  }

  .route li::after {
    transform: scaleY(1);
    transition: none;
  }

  .js .route li::before {
    background: var(--marker);
    transition: none;
  }

  .js .seats span {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
