/* ==========================================================================
   Safe N Save Logistics — design tokens
   Palette drawn from the freight world: night-highway navy, safety-signage
   orange used sparingly, concrete neutrals, and a route-tracking green.
   ========================================================================== */

:root {
  --ink: #3e3a35;
  --steel: #46564f;
  --steel-light: #5c6f66;
  --concrete: #f1eae1;
  --paper: #fbf8f3;
  --line: #e4dccf;
  --cargo: #c97b5f;
  --cargo-btn: #a8593f;
  --cargo-btn-dark: #8f4933;
  --route: #7c9473;
  --route-deep: #5c7754;
  --white: #ffffff;

  /* Logo height — change this one value to resize the logo, truck icon and Est. 2006 tag together */
  --logo-h: 80px;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: 0.002em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.rule--light {
  border-top-color: rgba(255, 255, 255, 0.18);
}

:focus-visible {
  outline: 3px solid var(--cargo-btn);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  /* Keep at least 20px between the header and the screen edge on narrower laptops
     (adds nothing on wide screens, where the centred layout already leaves room) */
  padding-left: max(0px, 20px - max(0px, (100vw - var(--max-width)) / 2));
  padding-right: max(0px, 20px - max(0px, (100vw - var(--max-width)) / 2));
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

.wordmark span {
  color: var(--cargo);
}

.wordmark small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  color: #6b6f73;
  margin-left: 0.35rem;
  letter-spacing: 0.02em;
}

.logo-img {
  height: var(--logo-h);
  width: auto;
  display: block;
}

/* Forces the navy/grey logo to a clean white silhouette for dark backgrounds */
.logo-img--white {
  filter: brightness(0) invert(1);
}

/* "Est. 2006" tag — tucked under the right end of the logo's bottom rule.
   Offsets are percentages of the logo PNG (its artwork has transparent
   padding), so the tag stays lined up at any --logo-h. */
.logo-lockup {
  position: relative;
  display: block;
  flex-shrink: 0;
}

.wordmark .logo-est {
  position: absolute;
  top: 94%;
  right: 4.65%;
  font-family: var(--font-body);
  font-size: max(9px, calc(var(--logo-h) * 0.14));
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #132B53; /* logo navy */
}

.site-footer .wordmark .logo-est {
  color: var(--white);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.main-nav a {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.3rem 0.05rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-color: var(--cargo-btn);
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--steel);
  white-space: nowrap;
}

.header-phone svg { flex-shrink: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.btn--header-quote {
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* Phone link inside the dropdown menu — only shown on phones (see below) */
.main-nav .nav-phone { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle svg { display: block; }

/* Small laptops: phone number collapses to its icon so the row fits */
@media (max-width: 1220px) {
  .header-phone span.phone-label { display: none; }
  .main-nav { gap: 1.6rem; }
}

@media (max-width: 1100px) {
  .main-nav { gap: 1.25rem; }
}

/* Tablets and phones: nav moves into the menu button */
@media (max-width: 1024px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem var(--gutter) 1.5rem;
    gap: 1rem;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  /* Give the header the same side margins as the rest of the page */
  .site-header__bar { padding-left: var(--gutter); padding-right: var(--gutter); }
}

/* Phones: the header shows the logo, the tap-to-call number and the menu
   button (the header's Request a Quote button is hidden). Logo sizes step
   down with screen width so it never collides with the number. */
@media (max-width: 600px) {
  .site-header { --logo-h: 60px; }
  .site-header__bar { gap: 0.9rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
  .site-header .btn--header-quote { display: none; }
  .site-header .wordmark { flex-shrink: 0; }          /* the logo never gets squeezed */
  .site-header .header-actions { margin-left: auto; min-width: 0; }
  /* number shrinks a little on the narrowest phones so it always fits */
  .site-header .header-phone { gap: 0.4rem; padding: 0.4rem 0; font-size: clamp(0.9rem, 4.5vw, 1.15rem); }
  .site-header .header-phone span.phone-label { display: inline; }
}

@media (max-width: 420px) {
  .site-header { --logo-h: 52px; }
}

@media (max-width: 400px) {
  .site-header { --logo-h: 46px; }
  .site-header__bar { gap: 0.6rem; }
}

@media (max-width: 375px) {
  .site-header { --logo-h: 42px; }
}

@media (max-width: 360px) {
  .site-header { --logo-h: 40px; }
}

/* Smallest phones (320px class) */
@media (max-width: 350px) {
  .site-header { --logo-h: 36px; }
  .site-header__bar { padding-left: 14px; padding-right: 14px; }
  .nav-toggle { padding: 0.25rem; }
  .site-header .header-phone svg { width: 16px; height: 16px; }
}

/* --------------------------------------------------------------------------
   Quote modal
   -------------------------------------------------------------------------- */

html.no-scroll, body.no-scroll { overflow: hidden; }

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.quote-modal.is-open { display: block; }

.quote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 42, 61, 0.55);
  opacity: 0;
  animation: modal-fade 0.18s ease-out forwards;
}

.quote-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--paper);
  max-width: 640px;
  width: calc(100% - 2.5rem);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  margin: 1.5rem auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 6px;
  border-top: 4px solid var(--cargo-btn);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  animation: modal-in 0.22s ease-out forwards 0.02s;
}

@keyframes modal-fade { to { opacity: 1; } }
@keyframes modal-in { to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .quote-modal__backdrop, .quote-modal__panel { animation: none; opacity: 1; transform: none; }
}

.quote-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--concrete);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.quote-modal__close:hover { background: var(--line); }

.quote-modal__lede { color: #4b4f53; margin-bottom: 1.5rem; }

.quote-form--modal { padding: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

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

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn--ghost:hover { background: rgba(0,0,0,0.04); }

.btn--on-dark.btn--ghost {
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn--on-dark.btn--ghost:hover { background: rgba(255,255,255,0.08); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero--video {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(480px, 78vh, 760px);
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.45) contrast(1.08) brightness(1.03);
  pointer-events: none; /* it's a backdrop: taps go to the page, not the video */
}

/* The still photo sits on top of the video and fades away only once the
   video is actually playing. When a phone won't autoplay (e.g. iPhone Low
   Power Mode) the photo stays, covering the phone's play button. */
.hero-still {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #46564f url("assets/hero-truck-poster.jpg?v=3") center / cover no-repeat;
  filter: saturate(1.45) contrast(1.08) brightness(1.03); /* match the video */
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.hero--video.is-playing .hero-still { opacity: 0; }

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(70, 86, 79, 0.55) 0%, rgba(45, 42, 38, 0.74) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 640px;
}

.hero__eyebrow-note {
  font-size: 0.95rem;
  color: #f1dfcf;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.hero__content h1 { color: var(--white); }

.hero__content p.lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.hero--video .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

@media (max-width: 640px) {
  .hero--video { min-height: 560px; }
}

/* --------------------------------------------------------------------------
   Stat strip
   -------------------------------------------------------------------------- */

.stat-strip {
  background: var(--steel);
  color: var(--white);
  padding: clamp(2.2rem, 4vw, 3rem) 0;
}

.stat-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-strip .stat {
  padding: 0 1.5rem;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.stat-strip .stat:first-child { border-left: none; padding-left: 0; }

.stat-strip .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-strip .stat span {
  font-size: 0.92rem;
  color: #d9e1db;
}

@media (max-width: 700px) {
  .stat-strip__grid { grid-template-columns: 1fr; gap: 1.25rem; text-align: left; }
  .stat-strip .stat { border-left: none; padding-left: 0; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.18); }
  .stat-strip .stat:first-child { border-top: none; padding-top: 0; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section--tight { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }

.section--alt {
  background: var(--concrete);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section__head p {
  margin: 0;
  color: #4b4f53;
}

.tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--route-deep);
  margin-bottom: 0.6rem;
}

/* Manifest-style row list — used for services & values, echoing a waybill line item */

.manifest {
  border-top: 1px solid var(--line);
}

.manifest__row {
  display: grid;
  grid-template-columns: 84px 1fr 1.4fr;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.manifest__code {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cargo-btn);
  padding-top: 0.15rem;
}

.manifest__row h3 { margin-bottom: 0.4rem; }
.manifest__row p { margin: 0; color: #4b4f53; }

@media (max-width: 760px) {
  .manifest__row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1.4rem 0;
  }
  .manifest__code { padding-top: 0; }
}

/* --------------------------------------------------------------------------
   CTA banner
   -------------------------------------------------------------------------- */

.cta-banner {
  background: var(--steel);
  color: var(--white);
  padding: clamp(2.8rem, 6vw, 4rem) 0;
}

.cta-banner__grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-banner h2 { margin-bottom: 0.3rem; }
.cta-banner p { color: #e3dccf; margin: 0; }

.cta-banner__phone {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--white);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: #dad3c6;
  padding: 3rem 0 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
}

.site-footer .wordmark { color: var(--white); }
.site-footer .wordmark span { color: var(--cargo); }

.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 0.9rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a:hover { color: var(--white); }

.site-footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #afa795;
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.page-hero p.lede {
  font-size: 1.1rem;
  color: #3c4247;
}

/* --------------------------------------------------------------------------
   Values (about page) — two-column text blocks
   -------------------------------------------------------------------------- */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.values__item {
  padding: 2rem 1.9rem 2rem 0;
  border-right: 1px solid var(--line);
}
.values__item:last-child { border-right: none; }

@media (max-width: 800px) {
  .values { grid-template-columns: 1fr; }
  .values__item {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1.6rem 0;
  }
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-detail {
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-detail:first-child { padding-top: 0; }

.contact-detail svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--cargo-btn);
}

.contact-detail h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.contact-detail p { margin: 0; color: #4b4f53; }

form.quote-form {
  background: var(--concrete);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cargo-btn);
}

.field textarea { resize: vertical; min-height: 110px; }

.form-note {
  font-size: 0.85rem;
  color: #6b6f73;
  margin-top: 0.75rem;
}

.form-success {
  display: none;
  background: var(--route-deep);
  color: var(--white);
  padding: 1.1rem 1.3rem;
  border-radius: 3px;
  margin-bottom: 1.3rem;
  font-weight: 600;
}
.form-success.is-visible { display: block; }

/* --------------------------------------------------------------------------
   Booking form — section grouping, radio/checkbox groups, confirmation code
   -------------------------------------------------------------------------- */

.booking-section {
  margin-bottom: 2.25rem;
}

.booking-section h3 {
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.field--choice {
  border: none;
  padding: 0;
  margin: 0 0 1.1rem;
}

.field--choice legend {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.5rem;
}

.choice-options {
  display: flex;
  gap: 0.6rem 1.4rem; /* tighter spacing when options wrap onto a new line */
  flex-wrap: wrap;
}

.choice-options label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
}

.choice-options input[type="radio"],
.choice-options input[type="checkbox"] {
  width: auto;
  accent-color: var(--cargo-btn);
}

.confirmation-code {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* Fields stack on phones: spacing comes from each field's own margin, so it stays even */
  .form-row { grid-template-columns: 1fr; row-gap: 0; }
  /* Origin / Destination: keep City and Province/State together under their one label */
  .form-row--location .field:first-child { margin-bottom: 0.5rem; }
  .form-row--location .field + .field > label { display: none; }
  /* A little less padding around the form inside the quote popup, so the boxes are wider */
  .quote-modal .quote-form { padding: 1.25rem 1rem; }
}

/* Three short questions side by side (booking form: load type, stackable, tarping).
   Stays three-across on most phones; stacks only on the narrowest screens. */
.form-row--3 { grid-template-columns: repeat(3, 1fr); }
.form-row--3 > .field--choice { min-width: 0; }

@media (max-width: 380px) {
  .form-row--3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Careers page
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Benefit cards */
.perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.perk {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.6rem 1.5rem 1.7rem;
}

.perk__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--concrete);
  color: var(--cargo-btn);
  margin-bottom: 1rem;
}

.perk h3 { margin: 0 0 0.4rem; font-size: 1.35rem; }
.perk p { margin: 0; color: #4b4f53; }

@media (max-width: 900px) {
  .perks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .perks { grid-template-columns: 1fr; }
}

/* Work With Us section */
.careers-apply { scroll-margin-top: 4rem; }
#qp-form { scroll-margin-top: 7.5rem; } /* clears the sticky header when jumped to */
.contact-detail .inline-link { color: var(--cargo-btn); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.apply-steps {
  list-style: none;
  counter-reset: step;
  margin: 1.8rem 0 1.4rem;
  padding: 0;
}

.apply-steps li {
  counter-increment: step;
  position: relative;
  padding: 0.15rem 0 1.4rem 3.1rem;
}

.apply-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--steel);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* thin line joining the numbered steps */
.apply-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.05rem - 0.5px);
  top: 2.3rem;
  bottom: 0.2rem;
  width: 1px;
  background: var(--line);
}

.apply-steps b { display: block; font-weight: 600; }
.apply-steps span { color: #4b4f53; font-size: 0.95rem; }

/* Resume upload — the real file input covers the whole box, so clicking
   or dropping a file anywhere on it works in every browser */
.upload { position: relative; }

.field .upload__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.upload__zone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  padding: 1.35rem 1rem;
  border: 1.5px dashed #c9bca9;
  border-radius: 4px;
  background: var(--white);
  color: var(--steel);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload:hover .upload__zone,
.upload.is-dragover .upload__zone {
  border-color: var(--cargo-btn);
  background: #fdf9f5;
}

.upload__input:focus-visible + .upload__zone {
  outline: 2px solid var(--cargo-btn);
  outline-offset: 2px;
}

.upload.has-file .upload__zone {
  border-style: solid;
  border-color: var(--route-deep);
}

.upload__link {
  color: var(--cargo-btn);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload__file {
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.upload__or { color: #6b6f73; }

/* Drag-and-drop hint only makes sense with a mouse */
@media (hover: none) {
  .upload__drag { display: none; }
}

.careers-apply .form-note a {
  color: var(--cargo-btn);
  font-weight: 600;
}

.careers-error {
  color: #8F4933;
  font-weight: 600;
}

.upload__hint {
  font-size: 0.82rem;
  color: #5b5f63;
  margin: 0.45rem 0 0;
}

.upload__error {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8F4933;
  margin: 0.45rem 0 0;
}

/* --------------------------------------------------------------------------
   Province / State picker (type-ahead drop-down, built by script.js)
   -------------------------------------------------------------------------- */

.combo { position: relative; }

.field input[data-region-picker] {
  padding-right: 2.4rem;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2346564f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
}

.combo__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 264px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(62, 58, 53, 0.16);
  padding-bottom: 0.3rem;
}

.combo__list[hidden] { display: none; }

.combo__group {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5b5f63;
  padding: 0.6rem 0.85rem 0.3rem;
}

.combo__option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.combo__option:hover,
.combo__option.is-active { background: var(--concrete); }

.combo__option.is-active { box-shadow: inset 3px 0 0 var(--cargo-btn); }

.combo__code {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #5b5f63;
}

.combo__empty {
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  color: #5b5f63;
}

/* --------------------------------------------------------------------------
   Booking form — Load & Equipment controls
   Yes/No and FTL/LTL become two-part buttons, loading details become
   toggle chips, and equipment becomes picture tiles. Only applies in
   browsers that support :has() — older browsers keep plain checkboxes.
   -------------------------------------------------------------------------- */

@supports selector(:has(*)) {
  /* The real radio/checkbox stays in place (invisible) so clicks,
     keyboard and screen readers all work as before */
  .booking-section:has(input[name="equipment"]) .choice-options label {
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .booking-section:has(input[name="equipment"]) .choice-options input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }

  .booking-section:has(input[name="equipment"]) .choice-options label:has(input:focus-visible) {
    outline: 3px solid var(--cargo-btn);
    outline-offset: 2px;
    z-index: 1;
  }

  .booking-section:has(input[name="equipment"]) .field--choice legend {
    margin-bottom: 0.6rem;
  }

  /* Load type / Stackable / Tarping — two-part buttons */
  .form-row--3 .choice-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    max-width: 15rem;
  }

  .form-row--3 .choice-options label {
    flex: 1 1 0;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    background: var(--white);
    border: 1.5px solid #cfc5b6;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
  }

  .form-row--3 .choice-options label:first-child { border-radius: 4px 0 0 4px; }
  .form-row--3 .choice-options label:last-child { border-radius: 0 4px 4px 0; margin-left: -1.5px; }
  .form-row--3 .choice-options label:hover { background: #f8f4ee; }

  .form-row--3 .choice-options label:has(input:checked) {
    background: var(--steel);
    border-color: var(--steel);
    color: var(--white);
    z-index: 1;
  }

  /* Loading details — toggle chips (pick any) */
  .field--choice:has(input[name="loading_details"]) .choice-options { gap: 0.6rem; }

  .field--choice:has(input[name="loading_details"]) .choice-options label {
    gap: 0.5rem;
    padding: 0.5rem 0.95rem 0.5rem 0.7rem;
    background: var(--white);
    border: 1.5px solid #cfc5b6;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 600;
  }

  .field--choice:has(input[name="loading_details"]) .choice-options label::before {
    content: "";
    width: 15px;
    height: 15px;
    flex: none;
    background-color: #6d6a64;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .field--choice:has(input[name="loading_details"]) .choice-options label:hover { border-color: #a99d8c; }

  .field--choice:has(input[name="loading_details"]) .choice-options label:has(input:checked) {
    background: var(--steel);
    border-color: var(--steel);
    color: var(--white);
  }

  .field--choice:has(input[name="loading_details"]) .choice-options label:has(input:checked)::before {
    background-color: var(--white);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  }

  /* Equipment required — picture tiles (pick any) */
  .field--choice:has(input[name="equipment"]) .choice-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .field--choice:has(input[name="equipment"]) .choice-options label {
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    min-height: 6.4rem;
    padding: 1rem 0.6rem 0.85rem;
    background: var(--white);
    border: 1.5px solid #ddd3c4;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
  }

  .field--choice:has(input[name="equipment"]) .choice-options label::before {
    content: "";
    width: 86px;
    height: 37px;
    flex: none;
    background-color: #6f7a75;
    -webkit-mask: var(--equip-icon) center / contain no-repeat;
    mask: var(--equip-icon) center / contain no-repeat;
    transition: background-color 0.15s ease;
  }

  /* tick in the corner once a tile is chosen */
  .field--choice:has(input[name="equipment"]) .choice-options label::after {
    content: "";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--steel);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .field--choice:has(input[name="equipment"]) .choice-options label:hover { border-color: #a99d8c; }

  .field--choice:has(input[name="equipment"]) .choice-options label:has(input:checked) {
    border-color: var(--steel);
    background: #edf1ee;
    box-shadow: inset 0 0 0 1px var(--steel);
  }

  .field--choice:has(input[name="equipment"]) .choice-options label:has(input:checked)::before {
    background-color: var(--steel);
  }

  .field--choice:has(input[name="equipment"]) .choice-options label:has(input:checked)::after {
    opacity: 1;
    transform: scale(1);
    background: var(--steel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  }

  .field--choice:has(input[name="equipment"]) label:has(input[value="Van" i]),
  .field--choice:has(input[name="equipment"]) label:has(input[value="Dry Van" i]) { --equip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='2' y='4' width='42' height='16.5' rx='1.5'/%3E%3Cpath d='M46 20.5V10h8.2l5.3 5.6v4.9z'/%3E%3Cpath d='M49 12.6h4.6l2.6 2.9H49z'/%3E%3Ccircle cx='8' cy='22.4' r='2.5'/%3E%3Ccircle cx='14' cy='22.4' r='2.5'/%3E%3Ccircle cx='51' cy='22.4' r='2.5'/%3E%3Ccircle cx='57' cy='22.4' r='2.5'/%3E%3C/svg%3E"); }
  .field--choice:has(input[name="equipment"]) label:has(input[value="Reefer" i]) { --equip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='2' y='4' width='42' height='16.5' rx='1.5'/%3E%3Cpath d='M23 7.5v9.5M18.9 9.9l8.2 4.7M18.9 14.6l8.2-4.7'/%3E%3Cpath d='M46 20.5V10h8.2l5.3 5.6v4.9z'/%3E%3Cpath d='M49 12.6h4.6l2.6 2.9H49z'/%3E%3Ccircle cx='8' cy='22.4' r='2.5'/%3E%3Ccircle cx='14' cy='22.4' r='2.5'/%3E%3Ccircle cx='51' cy='22.4' r='2.5'/%3E%3Ccircle cx='57' cy='22.4' r='2.5'/%3E%3C/svg%3E"); }
  .field--choice:has(input[name="equipment"]) label:has(input[value="Straight truck" i]) { --equip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='9' y='4' width='35' height='16.5' rx='1.5'/%3E%3Cpath d='M46 20.5V10h8.2l5.3 5.6v4.9z'/%3E%3Cpath d='M49 12.6h4.6l2.6 2.9H49z'/%3E%3Ccircle cx='17' cy='22.4' r='2.5'/%3E%3Ccircle cx='57' cy='22.4' r='2.5'/%3E%3C/svg%3E"); }
  .field--choice:has(input[name="equipment"]) label:has(input[value="Flatbed" i]) { --equip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M2 16.5h42v4H2z'/%3E%3Cpath d='M42 16.5V9.5'/%3E%3Cpath d='M46 20.5V10h8.2l5.3 5.6v4.9z'/%3E%3Cpath d='M49 12.6h4.6l2.6 2.9H49z'/%3E%3Ccircle cx='8' cy='22.4' r='2.5'/%3E%3Ccircle cx='14' cy='22.4' r='2.5'/%3E%3Ccircle cx='51' cy='22.4' r='2.5'/%3E%3Ccircle cx='57' cy='22.4' r='2.5'/%3E%3C/svg%3E"); }
  .field--choice:has(input[name="equipment"]) label:has(input[value="Step-deck" i]) { --equip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M2 17h29v-4h13v7.5H2z'/%3E%3Cpath d='M46 20.5V10h8.2l5.3 5.6v4.9z'/%3E%3Cpath d='M49 12.6h4.6l2.6 2.9H49z'/%3E%3Ccircle cx='8' cy='22.4' r='2.5'/%3E%3Ccircle cx='14' cy='22.4' r='2.5'/%3E%3Ccircle cx='51' cy='22.4' r='2.5'/%3E%3Ccircle cx='57' cy='22.4' r='2.5'/%3E%3C/svg%3E"); }
  .field--choice:has(input[name="equipment"]) label:has(input[value="D-drop" i]) { --equip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M2 12.5h10l2.2 5h15.6l2.2-5H44v3.5H33.2l-2.2 5H13l-2.2-5H2z'/%3E%3Cpath d='M46 20.5V10h8.2l5.3 5.6v4.9z'/%3E%3Cpath d='M49 12.6h4.6l2.6 2.9H49z'/%3E%3Ccircle cx='5.5' cy='22.4' r='2.5'/%3E%3Ccircle cx='10.5' cy='22.4' r='2.5'/%3E%3Ccircle cx='51' cy='22.4' r='2.5'/%3E%3Ccircle cx='57' cy='22.4' r='2.5'/%3E%3C/svg%3E"); }

  @media (max-width: 520px) {
    .field--choice:has(input[name="equipment"]) .choice-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field--choice:has(input[name="equipment"]) .choice-options label { min-height: 5.6rem; padding: 0.85rem 0.5rem 0.75rem; }
    .field--choice:has(input[name="equipment"]) .choice-options label::before { width: 74px; height: 32px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .booking-section:has(input[name="equipment"]) .choice-options label,
    .booking-section:has(input[name="equipment"]) .choice-options label::before,
    .booking-section:has(input[name="equipment"]) .choice-options label::after { transition: none; }
  }
}
