/* Homepage layout — Fluid Widescreen / Full-Width Shell (Mirrors Admin Dashboard) */

body.page-home .container {
  max-width: 100%;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  margin: 0 auto;
}

/* ---------------- Hero Section ---------------- */
.hero-section-wrapper { width: 100%; max-width: none; margin: 0; padding: 0; }
/* Only the background layers are clipped (.hero-media / .hero-scrim are inset:0),
   so an open calendar can extend below the hero instead of being cut off. */
.hero-section { position: relative; overflow: visible; width: 100%; }
.hero-section .hero-media, .hero-section .hero-scrim { overflow: hidden; }
.hero {
  min-height: clamp(500px, 62vh, 700px);
  padding: clamp(56px, 8vh, 96px) clamp(24px, 3.5vw, 56px) clamp(44px, 6vh, 68px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  max-width: 1040px;
  margin-bottom: 16px;
  color: var(--on-inverse);
}
.hero h1 span { display: block; }
.hero h1 .hero-accent { color: var(--accent); }
.hero p {
  font-size: clamp(17px, 1.25vw, 20px);
  max-width: 860px;
  line-height: 1.5;
  margin: 0 0 28px;
  color: rgba(var(--on-inverse-rgb), 0.88);
}
.hero-brand-tag { margin-bottom: 16px; }

.hero p .hero-lead {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2em;
  line-height: 1.25;
  color: var(--on-inverse);
}

/* Hero Tabs & Search Panel */
.hero-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: -1.5px;
  position: relative;
  z-index: 2;
}
.hero-tabs button {
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 13px 26px;
  min-height: 48px;
  border-radius: 12px 12px 0 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: rgba(var(--on-inverse-rgb), 0.78);
  background: transparent;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hero-tabs button:hover:not([aria-selected="true"]) {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.hero-tabs button[aria-selected="false"] {
  border: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
  background: transparent;
  color: rgba(var(--on-inverse-rgb), 0.78);
  font-weight: 600;
}
.hero-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-bottom: 2px solid var(--surface);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.22);
  z-index: 3;
}
/* The selected tab clips its accent bar to its own rounded corners: a 3px-high bar
   cannot follow a 12px corner by itself, so its square ends stuck out past the curve. */
.hero-tabs button[aria-selected="true"] { overflow: hidden; }
.hero-tabs button[aria-selected="true"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}
.hero-tabs button[aria-selected="true"]::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-ink);
  margin-inline-start: 8px;
  vertical-align: middle;
}
[data-theme="dark"] .hero-tabs button[aria-selected="true"]::after {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--yellow-rgb), 0.6);
}
.hero-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-tabs button[aria-selected="true"]:focus-visible { outline-color: var(--accent); }

.hero .search-panel {
  /* Spans the hero's content width, so the left and right margins match at every screen size
     (a fixed 1280px cap left a wide gap on the right of large screens). Overrides the
     940px cap the base .search-panel rule in styles.css sets. */
  width: 100%;
  max-width: none;
  margin-bottom: 4px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px 14px;
  box-shadow: 0 12px 36px rgba(var(--scrim-rgb), 0.16);
  display: flex;
  align-items: stretch;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.hero .search-panel[hidden] { display: none; }
.hero .search-panel:has(.date-picker-popover:not([hidden])) { z-index: 5; }
.hero .search-panel:not([hidden]) { animation: searchPanelEnter 140ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes searchPanelEnter { 0% { opacity: 0; transform: translateY(-3px); } 100% { opacity: 1; transform: translateY(0); } }

.hero .search-panel#panel-freight[hidden],
.hero .search-panel#panel-equip[hidden] { display: none; }
.hero .search-panel#panel-equip {
  border-top-left-radius: 0 !important;
  border-start-start-radius: 0 !important;
}
.hero .search-panel#panel-freight {
  border-top-left-radius: var(--radius-card) !important;
  border-start-start-radius: var(--radius-card) !important;
}
[dir="rtl"] .hero .search-panel#panel-equip {
  border-top-left-radius: var(--radius-card) !important;
  border-top-right-radius: 0 !important;
  border-start-start-radius: 0 !important;
}

.hero .search-field { min-width: 0; flex: 1; padding: 6px 12px; }
.hero .search-field--vehicle { flex: 1.15; }
.hero .search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.hero .search-input-wrap:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(var(--yellow-rgb), 0.24);
}
.hero .search-input-icon { width: 18px; height: 18px; flex: 0 0 18px; color: var(--text-muted); }
.hero .search-control { min-height: 48px; padding: 8px 0; margin-top: 0; font-size: 16px; font-family: var(--font-body); color: var(--text); }
.hero .search-input-wrap .search-control { flex: 1; width: 0; border: none; outline: none; background: transparent; }
.hero .search-input-wrap select.search-control { border: 0; background: transparent; outline: none; cursor: pointer; width: 100%; color: var(--text); font-family: var(--font-body); }
.hero .search-input-wrap select.search-control:has(option[value=""]:checked) { color: var(--text-muted); }
.hero .search-input-wrap select.search-control option { color: var(--text); background: var(--surface); }

.hero .search-panel#panel-equip select.search-control:has(option[value=""]:checked) { color: var(--text-muted); }
.hero .search-panel#panel-equip select.search-control option { color: var(--text); background: var(--surface); }
.hero .search-input-wrap .search-control:focus-visible { outline: none; }
.hero .search-panel .divider { flex: 0 0 1px; width: 1px; background: var(--border); margin: 6px 0; }
.hero .search-field--date { flex: 0 0 240px; }
.hero .search-field--date .date-picker-trigger {
  width: 100%;
  min-height: 48px;
  height: 48px;
  box-sizing: border-box;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text);
  white-space: nowrap;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.hero .search-field--date .date-picker-value { white-space: nowrap; }
.hero .search-field--date .date-picker-trigger:hover { border-color: var(--accent); }
.hero .search-field--date .date-picker-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(var(--yellow-rgb), 0.24); }
.hero .search-field--date .date-picker-trigger[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.hero .search-panel .btn {
  padding: 0 28px;
  white-space: nowrap;
  /* Level with the input boxes: the fields carry a label above their box, so centring
     the button on the whole row put it about 10px higher than the boxes. Bottom-aligned,
     with the fields' 6px bottom padding, it lines up with them. */
  align-self: flex-end;
  margin-bottom: 6px;
  height: 48px;
}
/* The freight fields' input boxes are 50px tall (48px on the equipment tab). */
.hero .search-panel#panel-freight .btn { height: 50px; }

/* ---------------- Proof Strip ("Book it. Track it. Prove it.") ---------------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
  padding-top: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.proof-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.proof-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: var(--inverse-bg);
  color: var(--accent);
}
.proof-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--line);
  font: 700 14px/1 var(--font-mono);
  letter-spacing: -0.02em;
}
.proof-icon svg { width: 22px; height: 22px; }
.proof-item h2 { font: 700 20px/1.2 var(--font-heading); margin: 0 0 6px; }
.proof-item p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--slate); }

/* ---------------- Core Business Lines / Service Feature Cards ---------------- */
.service-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 2.5vw, 44px);
  min-width: 0;
  align-items: stretch;
}
.flatbed-feature {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .flatbed-feature:hover {
    border-color: rgba(var(--yellow-rgb), 0.38);
    box-shadow: 0 12px 36px rgba(var(--ink-rgb), 0.22);
  }
  .flatbed-feature:hover .flatbed-feature__photo img { transform: scale(1.025); }
}
.flatbed-feature__photo {
  position: relative;
  height: clamp(320px, 25vw, 460px);
  min-height: 0;
  overflow: hidden;
  background: var(--surface-2);
}
.flatbed-feature__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.equipment-feature .flatbed-feature__photo img { object-position: center 18%; }
.flatbed-feature__photo-label {
  position: absolute;
  inset-inline-start: 24px;
  bottom: 24px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(var(--scrim-rgb), 0.85);
  color: #fff;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .09em;
}
.flatbed-feature__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: clamp(32px, 3.2vw, 48px);
}
.flatbed-feature__copy > .btn { margin-top: auto; align-self: flex-start; }
.flatbed-feature__copy .eyebrow { margin-bottom: 14px; color: var(--accent); }
.flatbed-feature__copy h2 {
  max-width: 620px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.15;
}
.flatbed-feature__copy p {
  max-width: 600px;
  margin: 0 0 24px;
  color: var(--slate);
  font-size: 16px;
  line-height: 1.6;
}
.flatbed-feature__loads { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.flatbed-feature__loads span {
  padding: 8px 12px;
  border: 1px solid rgba(var(--on-inverse-rgb), 0.24);
  border-radius: 999px;
  color: rgba(var(--on-inverse-rgb), 0.88);
  font-size: 13px;
}

/* ---------------- Equipment Categories ---------------- */
.quick-cats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  padding: 12px 0 24px;
  scrollbar-width: none;
}
.quick-cats::-webkit-scrollbar { display: none; }
.quick-cat {
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: transform 80ms ease-out;
}
.quick-cat:active { transform: translateY(1px); }
.quick-cat .photo {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  margin: 0 auto 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--ink), 0 8px 20px rgba(var(--ink-rgb), 0.10);
  position: relative;
}
.quick-cat .photo-zoom {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .18s ease;
}
.quick-cat img.photo-zoom {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.quick-cat:hover .photo-zoom,
.quick-cat:focus-visible .photo-zoom { transform: scale(1.12); }
.quick-cat span {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
}
#quick-cats { min-height: 152px; }
/* Home "Equipment for hire" (FE-18): the group as a small grey label under the name. */
.quick-cat .quick-cat-group { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--slate); }

/* ---------------- Featured Equipment Cards ---------------- */
#featured-grid.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  min-width: 0;
  gap: clamp(24px, 2.5vw, 36px);
}
#featured-grid .listing-card {
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
#featured-grid .listing-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(var(--ink-rgb), 0.12);
}
#featured-grid .featured-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
#featured-grid .featured-empty__icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--line);
}
#featured-grid .featured-empty__icon svg { width: 20px; height: 20px; }
#featured-grid .featured-empty__copy { flex: 1; }
#featured-grid .featured-empty h3 { margin: 0 0 4px; font: 700 17px/1.3 var(--font-heading); }
#featured-grid .featured-empty p { margin: 0; color: var(--slate); font-size: 14px; line-height: 1.5; }

/* Skeletons */
.is-skeleton .card-photo, .is-skeleton .sk-bar { background: var(--line); }
.is-skeleton .card-photo { height: auto; aspect-ratio: 4 / 3; }
.sk-bar { height: 12px; border-radius: 6px; margin: 14px 16px 10px; }
.sk-bar.short { width: 44%; margin-top: 0; }
.is-skeleton { pointer-events: none; }

/* ---------------- FAQ ---------------- */
.faq-item summary { cursor: pointer; list-style: none; font: 700 15px/1.4 var(--font-heading); display: flex; gap: 10px; min-height: 24px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-inline-start: auto; font: 400 16px/1 var(--font-mono); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 10px 0 0; }

/* ---------------- CTA Band ---------------- */
.cta-band {
  background: var(--inverse-bg);
  color: var(--on-inverse);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(36px, 4.5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { color: var(--on-inverse); font-size: clamp(28px, 2.6vw, 40px); }
.cta-band p { color: var(--on-inverse-muted); margin: 8px 0 0; font-size: 16px; }

/* ---------------- Responsive Breakpoints ---------------- */
@media (max-width: 1100px) {
  .quick-cats {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 8px 2px 14px;
  }
  .quick-cat { flex: 0 0 auto; width: 140px; }
  .quick-cat .photo { width: 108px; max-width: none; }
}

@media (max-width: 900px) {
  .steps-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-feature-grid { grid-template-columns: 1fr; }
  .flatbed-feature__photo { height: auto; aspect-ratio: 16 / 9; }
  .equipment-feature .flatbed-feature__photo { aspect-ratio: 16 / 9; }
  .flatbed-feature__copy { padding: 28px 24px; }
  .proof-strip { grid-template-columns: 1fr; gap: 24px; }
  .cta-band { align-items: flex-start; }
}

@media (max-width: 1040px) {
  .hero { min-height: 0; padding: 36px 24px 28px; }
  .hero h1 { font-size: clamp(30px, 8.5vw, 40px); }
  .hero p { font-size: 15px; margin-bottom: 20px; }
  .hero .search-panel#panel-freight { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .hero .search-panel#panel-freight .search-field { padding: 8px 10px; }
  .hero .search-panel#panel-freight .search-field--cargo .search-input-wrap,
  .hero .search-panel#panel-freight .search-field--vehicle .search-input-wrap { min-width: 0; }
  .hero .search-panel#panel-freight .search-control { font-size: 16px; }
  .hero .search-panel#panel-freight .search-field--cargo,
  .hero .search-panel#panel-freight .search-field--vehicle { grid-column: 1 / -1; }
  .hero .search-panel#panel-freight .search-field--date { grid-column: 1 / -1; }
  .hero .search-panel .divider { display: none; }
  .hero .search-panel .btn { width: 100%; grid-column: 1 / -1; margin-bottom: 0; }
  .hero .search-panel#panel-equip { flex-wrap: wrap; }
  .hero .search-panel#panel-equip .search-field { flex-basis: 100%; }
}

@media (max-width: 480px) {
  .hero .search-panel#panel-freight { grid-template-columns: 1fr; }
  .hero .search-panel#panel-freight .search-field { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body.page-home .container {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
  .hero { padding-inline-start: 20px; padding-inline-end: 20px; }
}

@media (max-width: 640px) {
  #featured-grid .featured-empty { align-items: flex-start; flex-wrap: wrap; gap: 14px; padding: 18px; }
  #featured-grid .featured-empty__copy { flex-basis: calc(100% - 58px); }
  #featured-grid .featured-empty > .btn { margin-inline-start: 58px; }
}

/* Home rows as one-row sliders (handoff 23 §6): 6 cards visible at ≥1280,
   4 at 1024, 3 at 768, 1.5 on phones; scrollbar hidden, swipe/wheel work. */
.quick-cats.is-slider {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  --slider-gap: clamp(16px, 2vw, 32px);
  gap: var(--slider-gap);
}
.quick-cats.is-slider::-webkit-scrollbar { display: none; }
/* 5 tiles a row on wide screens: at 4 the tile was wider than its 220px photo, so
   the photos sat far apart (8 Nov). 6 on very wide screens, 4 on small laptops,
   3 on tablets. The photo fills its tile (up to 260px) above phone width, so the
   space between photos is just the gap. */
.quick-cats.is-slider > .quick-cat { flex: 0 0 calc((100% - 4 * var(--slider-gap)) / 5); scroll-snap-align: start; min-width: 0; }
@media (min-width: 1680px) { .quick-cats.is-slider > .quick-cat { flex-basis: calc((100% - 5 * var(--slider-gap)) / 6); } }
@media (max-width: 1279px) { .quick-cats.is-slider > .quick-cat { flex-basis: calc((100% - 3 * var(--slider-gap)) / 4); } }
@media (min-width: 601px) { .quick-cats.is-slider > .quick-cat .photo { width: 100%; max-width: 260px; } }
@media (max-width: 1023px) { .quick-cats.is-slider > .quick-cat { flex-basis: calc((100% - 2 * var(--slider-gap)) / 3); } }
@media (max-width: 600px) { .quick-cats.is-slider > .quick-cat { flex-basis: calc((100% - var(--slider-gap)) / 1.5); } }
.section-title .slider-nav { display: flex; gap: 8px; margin-inline-start: auto; margin-inline-end: 12px; }
.section-title .slider-nav[hidden] { display: none; }
.slider-btn { width: 44px; min-width: 44px; padding: 0; font-size: 22px; line-height: 1; justify-content: center; }
.slider-btn:disabled { opacity: .4; cursor: default; }
[dir="rtl"] .slider-btn { transform: scaleX(-1); }
/* Phones: swipe the row; the arrows would stack above "View all". */
@media (max-width: 640px) { .section-title .slider-nav { display: none; } }
/* Auto-drifting sliders: snapping would fight the slow scroll. */
.quick-cats.is-slider.is-auto { scroll-snap-type: none; scroll-behavior: auto; }
/* "View all freight / equipment" under each home row (7 Nov meeting). */
.row-more { margin: 14px 0 0; text-align: right; }
.row-more a { font: 600 14px/1.4 var(--font-heading); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.row-more a:hover { color: var(--slate); }

/* The drift itself: home.js sets --kx-drift; `translate` keeps the cards' own
   transform (press effect) working. */
.quick-cats.is-auto > .quick-cat { translate: var(--kx-drift, 0px) 0; }

/* Desktop scale (2 Nov audit): smaller hero so the search form sits higher. */
@media (min-width: 861px) {
  .hero {
    min-height: clamp(420px, 54vh, 580px);
    padding: clamp(40px, 6vh, 72px) clamp(24px, 3.5vw, 56px) clamp(32px, 4.5vh, 52px);
  }
  .hero h1 { font-size: clamp(34px, 4.2vw, 56px); margin-bottom: 12px; }
  .hero p { font-size: clamp(15px, 1.05vw, 17px); margin-bottom: 22px; }
}

/* Supplier band (homepage, above the footer) */
.supply-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--brand-yellow-tint);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: clamp(28px, 3.5vw, 48px);
}
.supply-band h2 { font-size: clamp(24px, 2.2vw, 32px); margin: 0 0 8px; }
.supply-band p { margin: 0; max-width: 640px; color: var(--text-muted); font-size: 16px; }
