/* Home page only. Shared tokens and components live in rail.css (.rl). */

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

.hm-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Header (36px strip + 76px bar) plus hero fill the first screen exactly. */
  --hm-head-h: 112px;
  min-height: calc(100vh - var(--hm-head-h));
  min-height: calc(100svh - var(--hm-head-h));
  overflow: hidden;
  background: var(--rl-navy-deep);
  color: var(--rl-white);
  isolation: isolate;
}

.hm-hero-media,
.hm-hero-bg,
.hm-hero-scrim {
  position: absolute;
  inset: 0;
}

.hm-hero-media {
  z-index: -2;
}

.hm-hero-bg {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hm-hero-bg.is-active {
  opacity: 1;
}

.hm-hero-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 22, 58, 0.94) 0%, rgba(0, 22, 58, 0.78) 42%, rgba(0, 22, 58, 0.2) 100%),
    linear-gradient(0deg, rgba(0, 22, 58, 0.7) 0%, rgba(0, 22, 58, 0) 35%);
}

html[dir="rtl"] .hm-hero-scrim {
  background:
    linear-gradient(270deg, rgba(0, 22, 58, 0.94) 0%, rgba(0, 22, 58, 0.78) 42%, rgba(0, 22, 58, 0.2) 100%),
    linear-gradient(0deg, rgba(0, 22, 58, 0.7) 0%, rgba(0, 22, 58, 0) 35%);
}

.hm-hero :focus-visible {
  outline-color: var(--rl-orange);
}

.hm-hero-inner {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-block: clamp(3rem, 8vh, 6rem) clamp(2rem, 5vh, 3.5rem);
}

.hm-hero-copy {
  max-width: 50rem;
}

.hm-hero-title {
  color: var(--rl-white);
  font-family: inherit;
  font-size: clamp(2.25rem, 1.2rem + 3.4vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  margin-bottom: 1.5rem !important;
}

html[dir="rtl"] .hm-hero-title {
  letter-spacing: 0;
  line-height: 1.3;
}

.hm-hero-accent {
  display: block;
  color: var(--rl-orange);
}

.hm-hero-lead {
  max-width: 50ch;
  color: #dfe6f0;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  margin-bottom: 2.25rem !important;
}

/* Quote picker: the hero's action in working form, handing off to the contact form. */
.hm-quote {
  max-width: 40rem;
}

.hm-quote-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--rl-on-navy);
  font-size: 0.875rem;
  font-weight: 600;
}

.hm-quote-row {
  display: flex;
}

.hm-quote-select {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 0.75rem 1rem;
  padding-inline-end: 3rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23001f4d' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.125rem center;
  border: 2px solid var(--rl-white);
  border-inline-end: 0;
  border-radius: 0;
  background-color: var(--rl-white);
  color: var(--rl-navy);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

html[dir="rtl"] .hm-quote-select {
  background-position: left 1.125rem center;
}

.hm-quote-select:focus-visible {
  outline: 3px solid var(--rl-orange);
  outline-offset: 0;
}

.hm-quote .rl-btn {
  flex: none;
}

.hm-hero-sign {
  margin-top: 2.25rem !important;
  color: var(--rl-on-navy);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hm-hero-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.375rem;
  background: rgba(0, 22, 58, 0.78);
}

.hm-hero-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  background: transparent;
  color: var(--rl-white);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hm-hero-nav:hover {
  background: var(--rl-white);
  color: var(--rl-navy);
}

.hm-hero-dots {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.hm-proof {
  position: relative;
  background: var(--rl-navy-deep);
  border-top: 1px solid var(--rl-line-navy);
}

.hm-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hm-proof-item {
  padding-block: 1.5rem;
  padding-inline: 2rem;
  border-inline-start: 1px solid var(--rl-line-navy);
}

.hm-proof-item:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.hm-proof-item dt {
  color: var(--rl-white);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.hm-proof-item dd {
  margin-top: 0.25rem;
  color: var(--rl-on-navy);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ---------- The chain: port to door ---------- */

.hm-chain {
  padding-block: var(--rl-pad);
  background: var(--rl-white);
}

.hm-chain-head {
  max-width: 46rem;
  margin-bottom: 3.5rem;
}

.hm-chain-head .rl-intro {
  margin-bottom: 0;
}

/* Two parallel rules read as a track; each stop is a square marker sitting on it. */
.hm-chain-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem;
  border-top: 3px solid var(--rl-navy);
}

.hm-chain-line::before {
  content: "";
  position: absolute;
  top: 5px;
  inset-inline: 0;
  height: 3px;
  background: var(--rl-navy);
}

.hm-stop {
  position: relative;
  padding-top: 2.25rem;
}

.hm-stop::before {
  content: "";
  position: absolute;
  top: -11px;
  inset-inline-start: 0;
  width: 22px;
  height: 22px;
  border: 3px solid var(--rl-navy);
  background: var(--rl-orange);
  transition: transform 0.3s var(--rl-ease);
}

.hm-stop:hover::before,
.hm-stop:focus-within::before {
  transform: scale(1.25);
}

.hm-stop-link {
  display: grid;
  gap: 0.5rem;
}

.hm-stop-title {
  color: var(--rl-ink);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.hm-stop-link:hover .hm-stop-title {
  color: #a64f00;
}

.hm-stop-text {
  color: var(--rl-text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.hm-chain-photo {
  margin-top: 4rem;
}

.hm-chain-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

/* ---------- Lower sections: photo-led ---------- */

.hm-services,
.hm-trust {
  padding-block: var(--rl-pad);
  background: var(--rl-white);
}

.hm-network,
.hm-news {
  padding-block: var(--rl-pad);
  background: var(--rl-paper);
}

/* Heading and intro on the start side, the section's way out on the end side. */
.hm-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

.hm-section-head > div {
  max-width: 44rem;
}

.hm-section-head .rl-h2 {
  margin-bottom: 0;
}

.hm-section-head .rl-intro {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Photo tile: the picture fills the tile, a navy scrim carries the text.
   Shared by the services mosaic and the lead news story. */
.hm-tile {
  position: relative;
  min-height: 0;
}

.hm-tile-link {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100%;
  min-height: 15rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--rl-navy-deep);
  color: var(--rl-white);
}

.hm-tile-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center, 85% center;
  background-size: cover;
  transition: transform 0.9s var(--rl-ease);
}

.hm-tile-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(0, 22, 58, 0.94) 0%, rgba(0, 22, 58, 0.62) 38%, rgba(0, 22, 58, 0.08) 72%);
  transition: background-color 0.4s ease;
}

.hm-tile-link:hover .hm-tile-img,
.hm-tile-link:focus-visible .hm-tile-img {
  transform: scale(1.05);
}

.hm-tile-link:focus-visible {
  outline: 3px solid var(--rl-orange);
  outline-offset: -3px;
}

.hm-tile-body {
  display: grid;
  gap: 0;
  width: 100%;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  padding-inline-end: 4.5rem;
}

.hm-tile-title {
  color: var(--rl-white);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

/* The description opens under the title on hover and focus; touch screens always show it. */
.hm-tile-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--rl-ease);
}

.hm-tile-desc {
  overflow: hidden;
  color: #d6deea;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.hm-tile-link:is(:hover, :focus-visible) .hm-tile-more {
  grid-template-rows: 1fr;
}

.hm-tile-link:is(:hover, :focus-visible) .hm-tile-desc {
  padding-top: 0.625rem;
}

.hm-tile-go {
  position: absolute;
  inset-inline-end: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  bottom: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--rl-orange);
  color: var(--rl-navy);
  font-size: 0.9375rem;
  transition: translate 0.35s var(--rl-ease);
}

.hm-tile-link:is(:hover, :focus-visible) .hm-tile-go {
  translate: calc(4px * var(--rl-dir)) 0;
}

.hm-tile-date {
  margin-top: 0.5rem;
  color: var(--rl-on-navy);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Services mosaic: the first service takes a 2x2 lead, the rest fill square cells. */
.hm-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Rows grow when an open description needs more room (touch screens, long AR/EN titles). */
  grid-auto-rows: minmax(clamp(15rem, 11rem + 7vw, 19rem), auto);
  grid-auto-flow: dense;
  gap: 6px;
}

.hm-tile--lead {
  grid-column: span 2;
  grid-row: span 2;
}

.hm-tile--lead .hm-tile-title {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem);
  letter-spacing: -0.01em;
}

.hm-tile--lead .hm-tile-more {
  grid-template-rows: 1fr;
}

.hm-tile--lead .hm-tile-desc {
  max-width: 46ch;
  padding-top: 0.75rem;
  font-size: 1rem;
}

/* ---------- Equipment: full-bleed band, then workshop and register ---------- */

.hm-fleet {
  background: var(--rl-navy);
  color: var(--rl-white);
}

.hm-fleet :focus-visible {
  outline-color: var(--rl-orange);
}

.hm-fleet-band {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(30rem, 74vh, 48rem);
  overflow: hidden;
  isolation: isolate;
}

.hm-fleet-band-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.hm-fleet-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 31, 77, 0.94) 0%, rgba(0, 31, 77, 0.72) 38%, rgba(0, 31, 77, 0) 72%),
    linear-gradient(0deg, rgba(0, 31, 77, 1) 0%, rgba(0, 31, 77, 0) 32%);
}

html[dir="rtl"] .hm-fleet-band::after {
  background:
    linear-gradient(270deg, rgba(0, 31, 77, 0.94) 0%, rgba(0, 31, 77, 0.72) 38%, rgba(0, 31, 77, 0) 72%),
    linear-gradient(0deg, rgba(0, 31, 77, 1) 0%, rgba(0, 31, 77, 0) 32%);
}

.hm-fleet-band-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-block: var(--rl-pad) clamp(2.5rem, 2rem + 2vw, 4rem);
}

.hm-fleet-head {
  max-width: 34rem;
}

.hm-fleet-head .rl-intro {
  margin-block: 1.25rem 1.75rem;
}

.hm-fleet-band-caption {
  flex-shrink: 0;
  color: var(--rl-on-navy);
  font-size: 0.8125rem;
  font-weight: 600;
}

.hm-fleet-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(1rem, 2vw, 2rem) var(--rl-pad);
}

.hm-fleet-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.hm-fleet-photo figcaption {
  margin-top: 0.75rem;
  color: var(--rl-on-navy);
  font-size: 0.8125rem;
  font-weight: 600;
}

.hm-register {
  border-bottom: 1px solid var(--rl-line-navy);
}

.hm-register-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name spec"
    "desc spec";
  column-gap: 2rem;
  row-gap: 0.375rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rl-line-navy);
}

.hm-register-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.hm-register-name {
  grid-area: name;
  color: var(--rl-white);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hm-register-desc {
  grid-area: desc;
  max-width: 44ch;
  color: var(--rl-on-navy);
  font-size: 1rem;
  line-height: 1.55;
}

.hm-register-spec {
  grid-area: spec;
  align-self: center;
  justify-self: end;
  color: var(--rl-white);
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Network: the list drives the map ---------- */

.hm-network-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hm-network .rl-map {
  min-height: 34rem;
}

.hm-poles {
  border-bottom: 1px solid var(--rl-line);
}

.hm-pole {
  position: relative;
  display: grid;
  gap: 0.375rem;
  padding-block: 1.75rem;
  padding-inline-end: 3rem;
  border-top: 1px solid var(--rl-line);
}

.hm-poles li:first-child .hm-pole {
  padding-top: 0.25rem;
  border-top: 0;
}

.hm-pole-name {
  color: var(--rl-ink);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.hm-pole-city {
  color: var(--rl-text);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Leaflet positions the icon root with transform, so the highlight scales the inner square. */
.hm-stop-marker span {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid var(--rl-navy);
  background: var(--rl-orange);
  transition: transform 0.3s var(--rl-ease);
}

.hm-stop-marker.is-on {
  z-index: 1000 !important;
}

.hm-stop-marker.is-on span {
  transform: scale(1.35);
}

.hm-pole-text {
  max-width: 46ch;
  color: var(--rl-text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.hm-pole-go {
  position: absolute;
  inset-inline-end: 0.25rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--rl-navy);
  transition: translate 0.35s var(--rl-ease), color 0.2s ease;
}

.hm-pole:is(:hover, :focus-visible) .hm-pole-name {
  color: #a64f00;
}

.hm-pole:is(:hover, :focus-visible) .hm-pole-go {
  translate: calc(4px * var(--rl-dir)) -50%;
  color: #a64f00;
}

/* ---------- References: logos moving across the page ---------- */

.hm-trust-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
}

.hm-trust .rl-h2 {
  margin-bottom: 0;
}

.hm-marquee-toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rl-line);
  background: transparent;
  color: var(--rl-navy);
  cursor: pointer;
}

.hm-marquee-toggle:hover {
  border-color: var(--rl-navy);
}

.hm-marquee-toggle:focus-visible {
  outline: 3px solid var(--rl-orange);
  outline-offset: 2px;
}

.hm-marquee-toggle .fa-play,
.hm-marquee-toggle[aria-pressed="true"] .fa-pause {
  display: none;
}

.hm-marquee-toggle[aria-pressed="true"] .fa-play {
  display: inline-block;
}

/* Two identical lists side by side, each sliding by its own width, make an endless loop. */
.hm-marquee {
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--rl-line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hm-logos {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-around;
  min-width: 100%;
  animation: hm-marquee calc(var(--count, 6) * 4s) linear infinite;
}

/* --rl-dir is -1 in Arabic, so the strip runs the other way. */
@keyframes hm-marquee {
  to {
    translate: calc(-100% * var(--rl-dir)) 0;
  }
}

.hm-marquee:hover .hm-logos,
.hm-trust.is-paused .hm-logos {
  animation-play-state: paused;
}

.hm-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 14rem;
  min-height: 7rem;
  padding: 1rem 1.25rem;
  border-inline-end: 1px solid var(--rl-line);
}

.hm-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 3.5rem;
  object-fit: contain;
  filter: grayscale(1);
  mix-blend-mode: multiply;
  opacity: 0.85;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.hm-logo:hover img {
  filter: none;
  opacity: 1;
}

.hm-logo-name {
  color: var(--rl-ink);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- News: photo lead, two companions ---------- */

.hm-news-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.hm-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: auto auto;
  gap: 0 clamp(2rem, 4vw, 3.5rem);
}

.hm-tile--news {
  grid-row: 1 / -1;
}

.hm-tile--news .hm-tile-link {
  min-height: 30rem;
}

.hm-tile--news .hm-tile-title {
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
}

.hm-brief-link {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rl-line);
}

.hm-tile--news + .hm-brief .hm-brief-link {
  padding-top: 0;
  border-top: 0;
}

.hm-brief:last-child .hm-brief-link {
  border-bottom: 1px solid var(--rl-line);
}

.hm-brief-img {
  display: block;
  aspect-ratio: 4 / 3;
  background-color: var(--rl-navy-deep);
  background-position: center, 85% center;
  background-size: cover;
}

.hm-brief-body {
  display: grid;
  gap: 0.375rem;
}

.hm-brief-title {
  color: var(--rl-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s ease;
}

.hm-brief-link:is(:hover, :focus-visible) .hm-brief-title {
  text-decoration-color: var(--rl-orange);
}

.hm-brief-text {
  color: var(--rl-text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ---------- Responsive ---------- */

@media (max-width: 1340px) {
  .hm-hero {
    --hm-head-h: 100px; /* the bar shrinks to 64px here (rail.css) */
  }
}

/* Short laptop screens (1366x768, 1280x720): tighten so the hero still ends at the fold. */
@media (min-width: 901px) and (max-height: 860px) {
  .hm-hero-inner {
    padding-block: 2rem 1.75rem;
  }

  .hm-hero-title {
    font-size: clamp(2.25rem, 7vh, 4rem);
    margin-bottom: 1rem !important;
  }

  .hm-hero-lead {
    margin-bottom: 1.5rem !important;
  }
}

/* No hover on touch screens: descriptions stay open, so the scrim reaches higher behind them. */
@media (hover: none) {
  .hm-tile-more {
    grid-template-rows: 1fr;
  }

  .hm-tile-link::after {
    background: linear-gradient(0deg, rgba(0, 22, 58, 0.95) 0%, rgba(0, 22, 58, 0.8) 50%, rgba(0, 22, 58, 0.25) 100%);
  }

  .hm-tile-desc {
    padding-top: 0.625rem;
  }
}

@media (max-width: 1100px) {
  .hm-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hm-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding-block: 4.5rem 2rem;
  }

  .hm-hero-scrim,
  html[dir="rtl"] .hm-hero-scrim {
    background: linear-gradient(0deg, rgba(0, 22, 58, 0.96) 0%, rgba(0, 22, 58, 0.88) 38%, rgba(0, 22, 58, 0.76) 64%, rgba(0, 22, 58, 0.2) 100%);
  }

  /* Keep the truck cab in view above the headline. */
  .hm-hero-bg {
    background-position: 70% 20%;
  }

  .hm-proof-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hm-proof-item,
  .hm-proof-item:first-child {
    padding-inline: 0;
    padding-block: 1.125rem;
    border-inline-start: 0;
    border-top: 1px solid var(--rl-line-navy);
  }

  .hm-proof-item:first-child {
    border-top: 0;
  }

  .hm-chain-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-top: 0;
    border-inline-start: 3px solid var(--rl-navy);
  }

  .hm-chain-line::before {
    top: 0;
    bottom: 0;
    inset-inline: 5px auto;
    width: 3px;
    height: auto;
  }

  .hm-stop {
    padding-top: 0;
    padding-bottom: 2rem;
    padding-inline-start: 2.25rem;
  }

  .hm-stop:last-child {
    padding-bottom: 0;
  }

  .hm-stop::before {
    top: 0;
    inset-inline-start: -12.5px;
  }

  .hm-chain-photo {
    margin-top: 3rem;
  }

  .hm-fleet-body,
  .hm-network-grid,
  .hm-news-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hm-fleet-band {
    min-height: clamp(26rem, 80vh, 36rem);
  }

  .hm-fleet-band::after,
  html[dir="rtl"] .hm-fleet-band::after {
    background: linear-gradient(0deg, rgba(0, 31, 77, 1) 0%, rgba(0, 31, 77, 0.86) 40%, rgba(0, 31, 77, 0.2) 80%);
  }

  .hm-fleet-band-caption {
    display: none;
  }

  .hm-network .rl-map {
    min-height: 340px;
  }

  .hm-news-grid {
    grid-template-rows: auto;
  }

  .hm-tile--news {
    grid-row: auto;
    margin-bottom: 2rem;
  }

  .hm-tile--news .hm-tile-link {
    min-height: 24rem;
  }

  .hm-tile--news + .hm-brief .hm-brief-link {
    padding-top: 1.75rem;
    border-top: 1px solid var(--rl-line);
  }
}

@media (max-width: 560px) {
  .hm-quote-row {
    flex-direction: column;
  }

  .hm-quote-select {
    border-inline-end: 2px solid var(--rl-white);
  }

  .hm-quote .rl-btn {
    width: 100%;
  }

  .hm-mosaic {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(16rem, auto);
  }

  .hm-tile--lead {
    grid-column: auto;
    grid-row: span 1;
  }

  .hm-register-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "name"
      "desc"
      "spec";
  }

  .hm-register-spec {
    justify-self: start;
    margin-top: 0.5rem;
  }

  .hm-brief-link {
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 1rem;
  }

  .hm-brief-text {
    display: none;
  }

  .hm-logo {
    width: 10rem;
    min-height: 5rem;
    padding: 1rem;
  }
}

/* Reduced motion: the logos stand still, wrapped, with no copy and no pause button. */
@media (prefers-reduced-motion: reduce) {
  .hm-marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hm-logos {
    flex-wrap: wrap;
    flex-shrink: 1;
    animation: none;
  }

  .hm-logos[aria-hidden="true"],
  .hm-marquee-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-hero-bg,
  .hm-tile-img,
  .hm-tile-more,
  .hm-stop-marker span {
    transition: none;
  }
}

/* ---------- Full-screen pages: the scroll moves one section at a time ----------
   Desktop and laptop only; phones keep free scrolling. Each section fills the screen under the
   sticky bar and snaps to it. A section taller than the screen still scrolls freely inside. */

@media (min-width: 901px) and (min-height: 640px) {
  html:has(.hm-hero) {
    --hm-bar: 64px; /* rail.css bar height below 1340px */
    --hm-page: calc(100svh - var(--hm-bar));
    scroll-snap-type: y mandatory;
    scroll-padding-top: var(--hm-bar);
  }

  .hm-hero,
  .hm-chain,
  .hm-services,
  .hm-fleet-band,
  .hm-fleet-body,
  .hm-network,
  .hm-trust,
  .hm-news,
  .rl-close {
    scroll-snap-align: start;
  }

  .rl-foot {
    scroll-snap-align: end;
  }

  /* The hero snaps to the very top, ticker strip included, not to just under the bar. */
  .hm-hero {
    scroll-margin-top: 36px; /* rail.css --rl-strip-h */
  }

  .hm-chain,
  .hm-services,
  .hm-network,
  .hm-trust,
  .hm-news {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--hm-page);
    padding-block: clamp(2rem, 4.5vh, 3.5rem);
  }

  .hm-chain-head {
    margin-bottom: clamp(2rem, 5vh, 3.5rem);
  }

  .hm-chain-photo {
    margin-top: clamp(2rem, 5vh, 4rem);
  }

  .hm-chain-photo img {
    max-height: min(420px, 28svh);
  }

  /* Services: four columns so the lead and eight tiles fill exactly three rows of one screen. */
  .hm-mosaic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(clamp(9rem, (var(--hm-page) - 17rem) / 3, 17rem), auto);
  }

  .hm-mosaic .hm-tile-link {
    min-height: 0;
  }

  .hm-fleet-band {
    min-height: var(--hm-page);
  }

  .hm-fleet-body {
    align-content: center;
    align-items: center;
    min-height: var(--hm-page);
    padding-block: clamp(2rem, 4.5vh, 3.5rem);
  }

  .hm-network .rl-map {
    min-height: min(34rem, var(--hm-page) - 15rem);
  }

  .hm-tile--news .hm-tile-link {
    min-height: min(30rem, var(--hm-page) - 14rem);
  }

  /* References get a screen of their own: larger logo cells. */
  .hm-logo {
    width: 17rem;
    min-height: clamp(8rem, 20vh, 12rem);
  }

  .hm-logo-name {
    font-size: 1.125rem;
  }
}

@media (min-width: 1341px) and (min-height: 640px) {
  html:has(.hm-hero) {
    --hm-bar: 76px;
  }
}

/* main.js glides between the pages itself on mouse and trackpad desktops; native snapping would fight it. */
html.hm-glide:has(.hm-hero) {
  scroll-snap-type: none;
}

/* ---------- Section entrances (main.js marks .hm-page, .is-current and each .rl-beat with --beat) ----------
   Only under html.hm-glide, so touch screens, reduced motion and no-JavaScript visitors see everything at rest.
   Leaving is quick and together; arriving is staggered in reading order. */

html.hm-glide .rl-beat {
  transition:
    opacity 0.3s ease-in,
    translate 0.35s ease-in,
    clip-path 0.35s ease-in;
}

html.hm-glide .hm-page:not(.is-current) .rl-beat {
  opacity: 0;
  translate: 0 1.5rem;
}

html.hm-glide .hm-page:not(.is-current) .rl-beat--wipe {
  translate: none;
  clip-path: inset(100% 0 0 0);
}

html.hm-glide .hm-page.is-current .rl-beat {
  transition:
    opacity 0.7s var(--rl-ease),
    translate 0.9s var(--rl-ease),
    clip-path 1s var(--rl-ease);
  transition-delay: calc(150ms + var(--beat, 0) * 70ms);
}

html.hm-glide .hm-page.is-current .rl-beat--wipe {
  clip-path: inset(0 0 0 0);
}

/* The chain's track draws itself across, uncovering the stops as it passes. */
html.hm-glide .hm-chain:not(.is-current) .hm-chain-line {
  opacity: 1;
  translate: none;
  clip-path: inset(-2rem 100% 0 0);
}

html[dir="rtl"].hm-glide .hm-chain:not(.is-current) .hm-chain-line {
  clip-path: inset(-2rem 0 0 100%);
}

html.hm-glide .hm-chain.is-current .hm-chain-line {
  clip-path: inset(-2rem 0 0 0);
  transition: clip-path 1.5s cubic-bezier(0.65, 0, 0.35, 1) calc(150ms + var(--beat, 0) * 70ms);
}

/* The trucks settle from a slight zoom while their heading rises. */
html.hm-glide .hm-fleet-band:not(.is-current) .hm-fleet-band-img {
  scale: 1.12;
  transition: scale 0s 0.5s;
}

html.hm-glide .hm-fleet-band.is-current .hm-fleet-band-img {
  transition: scale 2.4s var(--rl-ease) 0.1s;
}

/* ---------- Section rail: a short track of square stops on the end side ---------- */

.hm-rail {
  position: fixed;
  inset-inline-end: clamp(0.75rem, 1.4vw, 1.5rem);
  top: 50%;
  z-index: 1040; /* under the header and the scroll-down button */
  display: none;
  translate: 0 -50%;
}

/* Wide enough that the rail sits in the margin beside the content, never over it. */
@media (min-width: 1300px) {
  html.hm-glide .hm-rail {
    display: block;
  }
}

.hm-rail ol {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem 0.375rem;
  background: rgba(0, 22, 58, 0.86);
}

/* Two thin rails behind the stops, the chain's double rule turned upright. */
.hm-rail ol::before {
  content: "";
  position: absolute;
  inset-block: 1rem;
  inset-inline-start: calc(50% - 3px);
  width: 6px;
  border-inline: 1px solid rgba(255, 255, 255, 0.35);
}

.hm-rail-stop {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hm-rail-stop::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: var(--rl-navy-deep);
  transition: width 0.3s var(--rl-ease), height 0.3s var(--rl-ease), background-color 0.2s ease, border-color 0.2s ease;
}

.hm-rail-stop:hover::before {
  border-color: var(--rl-orange);
}

.hm-rail-stop[aria-current="step"]::before {
  width: 16px;
  height: 16px;
  border-color: var(--rl-white);
  background: var(--rl-orange);
}

.hm-rail-stop:focus-visible {
  outline: 2px solid var(--rl-orange);
  outline-offset: 0;
}

.hm-rail-label {
  position: absolute;
  inset-inline-end: calc(100% + 0.875rem);
  top: 50%;
  padding: 0.375rem 0.75rem;
  background: var(--rl-navy-deep);
  color: var(--rl-white);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  translate: calc(6px * var(--rl-dir)) -50%;
  transition: opacity 0.2s ease, translate 0.25s var(--rl-ease);
}

.hm-rail-stop:is(:hover, :focus-visible) .hm-rail-label {
  opacity: 1;
  translate: 0 -50%;
}
