/* ============================================================
   TD GLOBAL — FRESH MOBILE EXPERIENCE
   Built from the clean bilingual desktop source of truth.
   Phone layout: <= 767px. Tablet refinement: 768–1023px.
   Desktop is intentionally untouched.
   ============================================================ */

:root {
  --td-mobile-gutter: clamp(1rem, 5vw, 1.5rem);
  --td-mobile-radius: 1.15rem;
  --td-mobile-safe-top: max(0px, env(safe-area-inset-top));
  --td-mobile-safe-bottom: max(0px, env(safe-area-inset-bottom));
  --td-mobile-orange: #ff5a2f;
  --td-mobile-navy: #062630;
  --td-mobile-ink: #061f29;
  --td-mobile-paper: #f7f7f3;
}

@media (max-width: 47.98rem) {
  html {
    scroll-padding-top: calc(6rem + var(--td-mobile-safe-top));
  }

  html.has-mobile-menu-open,
  html.has-mobile-menu-open body {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    min-width: 0;
  }

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

  a,
  button {
    -webkit-tap-highlight-color: transparent;
  }

  /* ---------- Header ---------- */
  .header {
    top: calc(var(--td-mobile-safe-top) + 0.65rem);
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    min-height: 4.6rem;
    padding: 0.55rem 0.65rem 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 1.15rem;
    background: rgba(3, 35, 44, 0.88);
    box-shadow: 0 1rem 2.8rem rgba(0, 19, 25, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    backdrop-filter: blur(18px) saturate(125%);
    transform: translateZ(0);
  }

  .header.is-hidden {
    transform: translate3d(0, calc(-100% - var(--td-mobile-safe-top) - 1.4rem), 0);
  }

  .header-logo {
    width: clamp(7.2rem, 34vw, 9rem);
    height: auto;
    min-width: 0;
  }

  .header-logo-inner {
    width: 100%;
    height: auto;
  }

  .header-nav {
    margin-inline-start: auto;
  }

  .header-nav-toggle {
    width: 3.2rem;
    min-width: 3.2rem;
    height: 3.2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    place-items: center;
  }

  .header-nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .header-nav-toggle-icon {
    width: 1.25rem;
    height: 1rem;
  }

  .header-nav-toggle-icon::before,
  .header-nav-toggle-icon::after {
    left: 0;
    width: 100%;
  }

  .header-nav-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100svh;
    height: 100dvh;
    padding: calc(var(--td-mobile-safe-top) + 7.2rem) var(--td-mobile-gutter)
      calc(var(--td-mobile-safe-bottom) + 1.4rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
      radial-gradient(circle at 84% 12%, rgba(255, 90, 47, 0.14), transparent 28rem),
      linear-gradient(155deg, #031c24 0%, #052e39 58%, #041d25 100%);
    color: #fff;
    z-index: -1;
  }

  .header-nav-wrapper:not([inert]) {
    z-index: 1;
  }

  .header-nav-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 34rem;
    margin: 0 auto;
  }

  .header-mobile-column {
    position: relative;
    display: grid;
    gap: 0;
    padding-block-start: 2.05rem;
  }

  .header-mobile-column::before {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    font: 700 0.68rem/1 var(--ff-secondary, Arial, sans-serif);
    letter-spacing: 0.12em;
    color: var(--td-mobile-orange);
  }

  .header-mobile-column:first-child::before { content: "01 / FREIGHT"; }
  .header-mobile-column:nth-child(2)::before { content: "02 / LOGISTICS"; }

  html[dir="rtl"] .header-mobile-column:first-child::before { content: "01 / الشحن"; }
  html[dir="rtl"] .header-mobile-column:nth-child(2)::before { content: "02 / الخدمات اللوجستية"; }

  .header-mobile-heading {
    display: none;
  }

  .header-mobile-column > a {
    min-height: 3.35rem;
    display: flex;
    align-items: center;
    padding-block: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    color: #fff;
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
  }

  html[dir="rtl"] .header-mobile-column > a {
    letter-spacing: 0;
    line-height: 1.55;
  }

  .header-mobile-actions {
    max-width: 34rem;
    margin: 2.1rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .header-mobile-actions > a {
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.8rem;
    color: #fff;
    text-align: center;
    font-size: 0.86rem;
  }

  .header-mobile-actions .header-mobile-quote:nth-of-type(2) {
    background: var(--td-mobile-orange);
    border-color: var(--td-mobile-orange);
    font-weight: 700;
  }

  .header-mobile-actions > a:last-child {
    grid-column: 1 / -1;
  }

  /* ---------- Landing hero ---------- */
  body:not(.service-detail-page):not(.blog-page) .home-hero {
    min-height: 100svh;
    height: 100dvh;
    overflow: clip;
    background: var(--td-mobile-navy);
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero-video,
  body:not(.service-detail-page):not(.blog-page) .home-hero-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero-video video {
    object-fit: cover;
    object-position: 58% center;
    transform: scale(1.02);
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero::before {
    background:
      linear-gradient(180deg, rgba(3, 27, 34, 0.08) 0%, rgba(3, 27, 34, 0.15) 28%, rgba(3, 27, 34, 0.93) 91%),
      linear-gradient(90deg, rgba(2, 30, 38, 0.46), transparent 72%);
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero-copy {
    inset: auto 0 0;
    min-height: 100%;
    padding:
      calc(var(--td-mobile-safe-top) + 7.4rem)
      var(--td-mobile-gutter)
      calc(var(--td-mobile-safe-bottom) + 1.7rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.15rem;
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero .home-hero-title {
    width: min(100%, 8.3em);
    max-width: none;
    margin: 0;
    font-size: clamp(3rem, 15.2vw, 4.9rem);
    line-height: 0.92;
    letter-spacing: -0.052em;
    text-wrap: balance;
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero .home-hero-title br {
    display: none;
  }

  html[dir="rtl"] body:not(.service-detail-page):not(.blog-page) .home-hero .home-hero-title {
    width: min(100%, 9em);
    font-size: clamp(2.65rem, 12.5vw, 4.25rem);
    line-height: 1.28;
    letter-spacing: 0;
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero-actions {
    width: 100%;
    max-width: 31rem;
    margin: 0;
    display: grid;
    gap: 1rem;
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero-summary {
    width: min(100%, 27rem);
    margin: 0;
    padding: 0;
    font-size: clamp(0.98rem, 4.35vw, 1.12rem);
    line-height: 1.48;
  }

  body:not(.service-detail-page):not(.blog-page) .home-hero-summary::before {
    display: none;
  }

  .home-hero-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .home-hero-cta {
    width: 100%;
    min-height: 3.35rem;
    padding: 0.9rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.88rem;
    white-space: normal;
  }

  /* ---------- B2B freight statement ---------- */
  .td-b2b-scroll {
    min-height: 0;
    height: auto;
    padding: clamp(5.5rem, 18vw, 7.5rem) 0 clamp(3rem, 12vw, 5rem);
    background: var(--td-mobile-paper);
    overflow: clip;
  }

  .td-b2b-scroll__stage {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
    padding: 0 var(--td-mobile-gutter);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
  }

  .td-b2b-scroll__title {
    position: relative;
    inset: auto;
    width: min(100%, 8.6em);
    max-width: none;
    margin: 0;
    color: #0a0d0e;
    font-size: clamp(2.8rem, 14vw, 4.5rem);
    line-height: 0.91;
    letter-spacing: -0.058em;
    text-align: start;
  }

  html[dir="rtl"] .td-b2b-scroll__title {
    width: min(100%, 9.2em);
    font-size: clamp(2.35rem, 11.5vw, 4rem);
    line-height: 1.32;
    letter-spacing: 0;
  }

  .td-b2b-line {
    display: block;
  }

  .td-b2b-scroll__truck {
    position: relative;
    inset: auto;
    align-self: center;
    width: min(136vw, 40rem);
    max-width: none;
    height: auto;
    margin: clamp(2.6rem, 11vw, 4.3rem) -18vw 0;
    transform: none;
    filter: none;
    opacity: 1;
    will-change: auto;
  }

  /* ---------- Trust: tactile horizontal story ---------- */
  .trust {
    padding-block: clamp(5rem, 18vw, 7rem);
    overflow: clip;
  }

  .trust > .container {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }

  .trust-header {
    width: auto;
    margin: 0 var(--td-mobile-gutter) clamp(2.4rem, 9vw, 3.4rem);
  }

  .trust-pre {
    display: block;
    margin-bottom: 0.75rem;
  }

  .trust-title {
    display: block;
    max-width: 9em;
    font-size: clamp(2.3rem, 11.5vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
  }

  html[dir="rtl"] .trust-title {
    max-width: 10em;
    font-size: clamp(2.1rem, 9.7vw, 3.35rem);
    line-height: 1.38;
    letter-spacing: 0;
  }

  .trust-convictions-wrapper {
    width: 100%;
    display: flex;
    grid-template-columns: none;
    gap: 0.9rem;
    padding: 0 var(--td-mobile-gutter) 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--td-mobile-gutter);
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .trust-convictions-wrapper::-webkit-scrollbar { display: none; }

  .trust-convictions-wrapper .convictions-item {
    position: relative;
    flex: 0 0 min(82vw, 21rem);
    width: auto;
    min-width: 0;
    height: clamp(27rem, 118vw, 34rem);
    min-height: 0;
    margin: 0;
    border-radius: var(--td-mobile-radius);
    overflow: hidden;
    scroll-snap-align: start;
    isolation: isolate;
    background: #0b2229;
  }

  .trust-convictions-wrapper .convictions-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 24%, rgba(3,21,27,.12) 44%, rgba(3,21,27,.96) 100%);
    pointer-events: none;
  }

  .trust-convictions-wrapper .convictions-item-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .trust-convictions-wrapper .convictions-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .trust-convictions-wrapper .convictions-item-content {
    position: absolute;
    z-index: 2;
    inset-inline: 1.15rem;
    bottom: 1.15rem;
    color: #fff;
  }

  .trust-convictions-wrapper .convictions-item-title {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.65rem;
    align-items: start;
    margin: 0 0 0.7rem;
    font-size: clamp(1.25rem, 5.8vw, 1.65rem);
    line-height: 1.1;
  }

  html[dir="rtl"] .trust-convictions-wrapper .convictions-item-title {
    line-height: 1.5;
  }

  .trust-convictions-wrapper .convictions-item-icon {
    width: 1.7rem;
    height: 1.7rem;
  }

  .trust-convictions-wrapper .convictions-item-text {
    margin: 0;
    max-width: 26ch;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255,255,255,.78);
  }

  /* ---------- Services intro ---------- */
  .td-services-area {
    overflow: clip;
  }

  .td-cargo-mission {
    min-height: 0;
    padding: clamp(5.2rem, 17vw, 7rem) var(--td-mobile-gutter) clamp(4.2rem, 14vw, 6rem);
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    overflow: clip;
  }

  .td-cargo-lines {
    opacity: 0.32;
  }

  .td-cargo-plane {
    position: relative;
    inset: auto;
    order: 0;
    width: min(112vw, 32rem);
    max-width: none;
    align-self: center;
    margin: -1rem -11vw 0;
    transform: rotate(-3deg);
  }

  html[dir="rtl"] .td-cargo-plane {
    transform: rotate(3deg);
  }

  .td-section-truck {
    position: absolute;
    top: 4.2rem;
    inset-inline-end: -7rem;
    width: 13rem;
    opacity: 0.17;
    transform: rotate(-5deg);
  }

  .td-cargo-mission__content {
    position: relative;
    inset: auto;
    order: 1;
    width: 100%;
    max-width: 36rem;
    margin: 0;
    display: grid;
    gap: 1.3rem;
  }

  .td-cargo-mission h2 {
    margin: 0;
    font-size: clamp(2.75rem, 13.6vw, 4.35rem);
    line-height: 0.93;
    letter-spacing: -0.055em;
  }

  html[dir="rtl"] .td-cargo-mission h2 {
    font-size: clamp(2.3rem, 10.8vw, 3.8rem);
    line-height: 1.35;
    letter-spacing: 0;
  }

  .td-cargo-mission__copy {
    display: grid;
    gap: 1.1rem;
  }

  .td-cargo-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .td-cargo-pills a {
    min-height: 3.2rem;
    padding: 0.7rem 0.8rem;
    justify-content: space-between;
    font-size: 0.78rem;
  }

  .td-cargo-mission p {
    max-width: 31rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.62;
  }

  /* ---------- Services: swipe gallery ---------- */
  .td-services-grid-section {
    padding: clamp(4.7rem, 16vw, 6.5rem) 0 clamp(5rem, 18vw, 7.5rem);
    overflow: hidden;
  }

  .td-services-kicker,
  .td-services-grid-section > h2 {
    margin-inline: var(--td-mobile-gutter);
  }

  .td-services-grid-section > h2 {
    max-width: 8em;
    margin-bottom: clamp(2.3rem, 8vw, 3rem);
    font-size: clamp(2.65rem, 12.6vw, 4rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
  }

  html[dir="rtl"] .td-services-grid-section > h2 {
    max-width: 9em;
    font-size: clamp(2.25rem, 10.2vw, 3.55rem);
    line-height: 1.34;
    letter-spacing: 0;
  }

  .td-services-grid-section > h2 br { display: none; }

  .td-services-grid {
    display: flex;
    grid-template-columns: none;
    gap: 0.85rem;
    width: 100%;
    padding: 0 var(--td-mobile-gutter) 0.9rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--td-mobile-gutter);
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .td-services-grid::-webkit-scrollbar { display: none; }

  .td-service-card {
    flex: 0 0 min(82vw, 21rem);
    width: auto;
    min-width: 0;
    min-height: clamp(24rem, 108vw, 31rem);
    height: auto;
    margin: 0;
    border-radius: var(--td-mobile-radius);
    scroll-snap-align: start;
    overflow: hidden;
  }

  .td-service-card > img,
  .td-service-card > svg {
    width: 100%;
    height: min(68vw, 17rem);
    object-fit: contain;
    object-position: center;
  }

  .td-service-card__body {
    min-height: 5.2rem;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
  }

  .td-service-card__body > span {
    font-size: clamp(1.35rem, 6vw, 1.7rem);
    line-height: 1.05;
  }

  html[dir="rtl"] .td-service-card__body > span { line-height: 1.5; }

  .td-service-card__body a,
  .td-service-card-action {
    min-height: 2.9rem;
  }

  /* ---------- White Talk CTA ---------- */
  .td-talk-cta {
    min-height: 0;
    padding: clamp(4.8rem, 16vw, 6.5rem) var(--td-mobile-gutter) clamp(5rem, 17vw, 7rem);
    overflow: clip;
  }

  .td-talk-cta::before {
    font-size: clamp(6.4rem, 32vw, 9.2rem);
    inset-inline-end: -0.25em;
    bottom: -0.1em;
    opacity: 0.045;
    pointer-events: none;
  }

  html[dir="rtl"] .td-talk-cta::before {
    inset-inline-end: auto;
    inset-inline-start: -0.25em;
  }

  .td-talk-cta__inner {
    width: 100%;
    max-width: 35rem;
    margin: 0 auto;
    padding: 0;
  }

  .td-talk-cta__pill {
    width: fit-content;
    max-width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 0.55rem;
    row-gap: 0.1rem;
    align-items: center;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .td-talk-cta__pill > span:nth-child(2) {
    grid-column: 2;
    color: rgba(6,38,48,.54);
  }

  .td-talk-cta__pill strong {
    grid-column: 2;
    display: block;
    font-size: 0.82rem;
  }

  .td-talk-cta__pill-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .td-talk-cta__content {
    margin-top: clamp(3.1rem, 11vw, 4.5rem);
  }

  .td-talk-cta__title {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2.3rem, 10.7vw, 3.55rem);
    line-height: 0.98;
    letter-spacing: -0.052em;
  }

  html[dir="rtl"] .td-talk-cta__title {
    font-size: clamp(2.05rem, 9.2vw, 3.15rem);
    line-height: 1.38;
    letter-spacing: 0;
  }

  .td-talk-cta__title-line {
    display: block;
  }

  .td-talk-cta__title-line--dynamic {
    margin-top: 0.12em;
  }

  .td-talk-cta__word-shell {
    display: block;
    width: 100%;
    min-width: 0;
    height: 1.17em;
    margin-top: 0.05em;
    overflow: hidden;
    align-items: flex-start;
  }

  html[dir="rtl"] .td-talk-cta__word-shell {
    height: 1.48em;
  }

  .td-talk-cta__word {
    display: block;
    width: 100%;
    font-size: 0.93em;
    line-height: 1.02;
    padding-block-end: 0.1em;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
  }

  html[dir="rtl"] .td-talk-cta__word {
    line-height: 1.38;
  }

  .td-talk-cta__footer {
    margin-top: clamp(2.5rem, 9vw, 3.3rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .td-talk-cta__description {
    width: 100%;
    max-width: 32rem;
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .td-talk-cta__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .td-talk-cta__button {
    width: 100%;
    min-height: 3.55rem;
    padding: 0.9rem 1rem;
    justify-content: space-between;
  }

  .td-talk-cta__button--secondary {
    min-height: 3.15rem;
    background: transparent;
  }

  .td-talk-cta__route {
    width: min(78vw, 19rem);
    height: 72%;
    top: 21%;
    right: -35vw;
    opacity: 0.22;
    pointer-events: none;
  }

  html[dir="rtl"] .td-talk-cta__route {
    right: auto;
    left: -35vw;
  }

  /* ---------- Process: autoplay video + synchronized copy ---------- */
  .sequence-section.td-process-autoplay {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    padding: clamp(4.75rem, 16vw, 6.5rem) var(--td-mobile-gutter) clamp(5rem, 17vw, 7rem) !important;
    background: #050505;
    overflow: clip;
  }

  .sequence-section.td-process-autoplay .sequence-sticky {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    gap: clamp(1.25rem, 5vw, 1.8rem);
    overflow: visible;
    background: transparent;
  }

  .sequence-section.td-process-autoplay .sequence-title {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin: 0;
    text-align: start;
  }

  .sequence-section.td-process-autoplay .sequence-title p {
    margin: 0 0 .55rem;
    color: var(--td-mobile-orange);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  html[dir="rtl"] .sequence-section.td-process-autoplay .sequence-title p {
    letter-spacing: 0;
  }

  .sequence-section.td-process-autoplay .sequence-title h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.5rem, 11vw, 3.55rem) !important;
    line-height: .96;
    letter-spacing: -.045em;
  }

  html[dir="rtl"] .sequence-section.td-process-autoplay .sequence-title h2 {
    font-size: clamp(2.25rem, 9.5vw, 3.15rem) !important;
    line-height: 1.3;
    letter-spacing: 0;
  }

  .sequence-section.td-process-autoplay .process-sequence-canvas,
  .sequence-section.td-process-autoplay #seq-canvas {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: clamp(.9rem, 4vw, 1.25rem);
    background: #050505;
    object-fit: contain;
    box-shadow: 0 1.5rem 4rem rgba(0,0,0,.34);
  }

  .sequence-section.td-process-autoplay .step-overlay {
    position: relative !important;
    inset: auto !important;
    z-index: 3;
    display: grid !important;
    width: calc(100% - 1rem) !important;
    margin: clamp(-1.5rem, -5vw, -1rem) auto 0;
    padding: clamp(1.15rem, 4.8vw, 1.45rem) !important;
    gap: 1.15rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: clamp(.9rem, 4vw, 1.2rem);
    background: rgba(8, 15, 18, .94) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    pointer-events: none;
  }

  .sequence-section.td-process-autoplay .step-info {
    width: 100%;
  }

  .sequence-section.td-process-autoplay .step-meta {
    margin-bottom: .55rem;
    font-size: .68rem;
  }

  .sequence-section.td-process-autoplay .step-title {
    max-width: 100%;
    margin: 0;
    font-size: clamp(1.55rem, 7vw, 2.05rem) !important;
    line-height: 1.08;
  }

  html[dir="rtl"] .sequence-section.td-process-autoplay .step-title {
    line-height: 1.42;
  }

  .sequence-section.td-process-autoplay .step-desc {
    max-width: 34rem;
    margin-top: .65rem;
    font-size: clamp(.88rem, 3.8vw, .98rem);
    line-height: 1.58;
  }

  .sequence-section.td-process-autoplay .step-rail {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
  }

  .sequence-section.td-process-autoplay .step-instruction {
    display: none !important;
  }

  .sequence-section.td-process-autoplay .step-dots {
    gap: .35rem;
    overflow: hidden;
  }

  .sequence-section.td-process-autoplay .step-dot {
    flex: 0 0 auto;
  }

  .sequence-section.td-process-autoplay .sequence-spacer {
    display: none !important;
    height: 0 !important;
  }

  .sequence-section.td-process-autoplay.td-process-sequence-unavailable .process-sequence-canvas {
    min-height: min(56vw, 14rem);
  }

  /* ---------- Operations: two controlled swipe galleries ---------- */
  .cargo-drift {
    position: relative;
    min-height: 0;
    padding: clamp(5rem, 17vw, 7rem) 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    overflow: hidden;
    background: #f4f4ef;
  }

  .cargo-drift::before {
    content: "OPERATIONS / BRAND IN MOTION";
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    margin: 0 var(--td-mobile-gutter) 0.25rem;
    background: none;
    color: #0b303b;
    font: 800 0.72rem/1 var(--ff-secondary, Arial, sans-serif);
    letter-spacing: 0.11em;
    opacity: 1;
  }

  html[dir="rtl"] .cargo-drift::before {
    content: "العمليات / الهوية في الحركة";
    letter-spacing: 0;
  }

  .cargo-drift::after,
  .cargo-drift-rail {
    display: none;
  }

  .cargo-drift-column {
    position: relative;
    inset: auto;
    width: 100%;
    display: flex;
    gap: 0.8rem;
    padding: 0 var(--td-mobile-gutter) 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--td-mobile-gutter);
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cargo-drift-column::-webkit-scrollbar { display: none; }

  .cargo-drift-column--left,
  .cargo-drift-column--right {
    transform: none;
  }

  .cargo-drift-card,
  .cargo-drift-card--compact,
  .cargo-drift-card--portrait,
  .cargo-drift-card--landscape,
  .cargo-drift-card--cinematic,
  .cargo-drift-card--inset {
    flex: 0 0 min(80vw, 20rem);
    width: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    margin: 0;
    border-radius: var(--td-mobile-radius);
    overflow: hidden;
    scroll-snap-align: start;
    transform: none;
  }

  .cargo-drift-card--landscape,
  .cargo-drift-card--cinematic {
    aspect-ratio: 4 / 3;
  }

  .cargo-drift-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .cargo-drift-center {
    position: relative;
    inset: auto;
    width: calc(100% - (var(--td-mobile-gutter) * 2));
    min-height: 0;
    margin: 0 var(--td-mobile-gutter);
    order: 2;
  }

  .cargo-drift-column--left { order: 1; }
  .cargo-drift-column--right { order: 3; }

  .cargo-drift-copy {
    width: 100%;
    min-height: clamp(16rem, 72vw, 24rem);
    padding: 2rem;
    display: grid;
    place-items: center;
    border-radius: var(--td-mobile-radius);
    background: #052d38;
    overflow: hidden;
  }

  .cargo-drift-container-visual {
    width: min(94%, 23rem);
    margin: 0;
  }

  .cargo-drift-container-visual img,
  .cargo-drift-container-visual svg {
    width: 100%;
    height: auto;
    filter: none;
  }

  /* ---------- Core offerings ---------- */
  .showroom {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    background: #052a34;
    color: #fff;
    overflow: hidden;
  }

  .showroom::before { display: none; }

  .showroom-image {
    position: relative;
    inset: auto;
    width: 100%;
    height: min(58svh, 31rem);
    min-height: 22rem;
  }

  .showroom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .showroom-content {
    position: relative;
    inset: auto;
    width: 100%;
    padding: clamp(2.5rem, 10vw, 3.6rem) var(--td-mobile-gutter) 1.5rem;
  }

  .showroom-header {
    margin-bottom: 2rem;
  }

  .showroom-title {
    display: block;
    max-width: 9em;
    font-size: clamp(2.35rem, 11vw, 3.6rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
  }

  html[dir="rtl"] .showroom-title {
    max-width: 10em;
    font-size: clamp(2rem, 9.4vw, 3.15rem);
    line-height: 1.38;
    letter-spacing: 0;
  }

  .showroom-wrapper {
    display: grid;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.17);
  }

  .showroom-item {
    min-height: 4.6rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding-block: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.17);
  }

  .showroom-item-title,
  .showroom-item-text {
    margin: 0;
  }

  .showroom-item-title {
    font-size: clamp(1.45rem, 6.3vw, 1.85rem);
    line-height: 1.1;
  }

  html[dir="rtl"] .showroom-item-title { line-height: 1.5; }

  .showroom-item-text {
    font-size: 0.72rem;
    color: rgba(255,255,255,.58);
    text-align: end;
  }

  .showroom-button {
    position: relative;
    inset: auto;
    width: calc(100% - (var(--td-mobile-gutter) * 2));
    min-height: 3.55rem;
    margin: 1.2rem var(--td-mobile-gutter) clamp(3.5rem, 13vw, 5rem);
    opacity: 1;
    transform: none;
  }

  /* ---------- Industries ---------- */
  .drivers {
    padding: clamp(5rem, 17vw, 7rem) var(--td-mobile-gutter);
  }

  .drivers-title {
    max-width: 8.5em;
    margin: 0 0 clamp(2.3rem, 9vw, 3.3rem);
    font-size: clamp(2.5rem, 11.8vw, 3.85rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
  }

  html[dir="rtl"] .drivers-title {
    max-width: 9.7em;
    font-size: clamp(2.15rem, 9.8vw, 3.35rem);
    line-height: 1.38;
    letter-spacing: 0;
  }

  .drivers-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .drivers-item {
    position: relative;
    min-height: 8.8rem;
    display: grid;
    grid-template-columns: 4.6rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0 1rem 2.6rem;
    border-top: 1px solid rgba(5,37,47,.14);
  }

  html[dir="rtl"] .drivers-item {
    grid-template-columns: 1fr 4.6rem;
    padding: 1rem 2.6rem 1rem 0;
  }

  .drivers-item:last-child {
    border-bottom: 1px solid rgba(5,37,47,.14);
  }

  .drivers-item::before {
    position: absolute;
    top: 1.18rem;
    inset-inline-start: 0;
    color: var(--td-mobile-orange);
    font: 800 0.68rem/1 var(--ff-secondary, Arial, sans-serif);
    letter-spacing: 0.08em;
  }

  .drivers-item:nth-child(1)::before { content: "01"; }
  .drivers-item:nth-child(2)::before { content: "02"; }
  .drivers-item:nth-child(3)::before { content: "03"; }

  .drivers-item-image {
    grid-column: 1;
    width: 4.6rem;
    height: 5.8rem;
    margin: 0;
    object-fit: cover;
    border-radius: 0.6rem;
  }

  html[dir="rtl"] .drivers-item-image { grid-column: 2; }

  .drivers-item-text {
    grid-column: 2;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  html[dir="rtl"] .drivers-item-text { grid-column: 1; }

  /* ---------- Quote ---------- */
  .td-laptop-quote {
    position: relative;
    height: auto;
    min-height: 0;
    padding: clamp(4.8rem, 16vw, 6.5rem) var(--td-mobile-gutter)
      calc(var(--td-mobile-safe-bottom) + clamp(4rem, 14vw, 6rem));
    background: #f6f6f2;
    overflow: clip;
  }

  .td-laptop-quote__sticky {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.7rem;
  }

  .td-laptop-quote__device {
    position: relative;
    inset: auto;
    width: min(116%, 31rem);
    margin: 0 -8%;
    transform: none;
  }

  .td-laptop-quote__device img,
  .td-laptop-quote__device svg {
    width: 100%;
    height: auto;
    transform: none;
  }

  .td-laptop-quote__cta {
    position: relative;
    inset: auto;
    width: 100%;
    padding: clamp(1.6rem, 7vw, 2.2rem);
    border-radius: var(--td-mobile-radius);
    background: #062b35;
    color: #fff;
    opacity: 1;
    transform: none;
  }

  .td-laptop-quote__cta p {
    margin: 0 0 0.55rem;
    color: rgba(255,255,255,.62);
    font-size: 0.86rem;
  }

  .td-laptop-quote__cta h2 {
    margin: 0 0 1.45rem;
    font-size: clamp(2.25rem, 10.8vw, 3.55rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
  }

  html[dir="rtl"] .td-laptop-quote__cta h2 {
    font-size: clamp(2rem, 9.3vw, 3.1rem);
    line-height: 1.35;
    letter-spacing: 0;
  }

  .td-laptop-quote__cta a {
    width: 100%;
    min-height: 3.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ---------- Landing footer ---------- */
  .td-footer-image {
    min-height: 0;
    padding: clamp(4.6rem, 16vw, 6.4rem) var(--td-mobile-gutter)
      calc(var(--td-mobile-safe-bottom) + 2.2rem);
    overflow: hidden;
  }

  .td-footer-image-background {
    object-position: 60% center;
  }

  .td-footer-image::before {
    background: linear-gradient(180deg, rgba(4,28,35,.72), rgba(4,28,35,.96));
  }

  .td-footer-image-inner {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 35rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .td-footer-image-wordmark {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.18em;
    margin: 0;
    font-size: clamp(4rem, 20vw, 6.8rem);
    line-height: 0.78;
    letter-spacing: -0.065em;
    direction: ltr;
  }

  .td-footer-image-contact {
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 1rem;
    background: rgba(255,255,255,.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .td-footer-image-contact p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .td-footer-image-contact > div {
    display: grid;
    gap: 0.55rem;
  }

  .td-footer-image-contact a {
    overflow-wrap: anywhere;
  }

  .td-footer-image-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.15);
  }

  .td-footer-image-nav a {
    min-height: 3.1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.15);
    font-size: 0.9rem;
  }

  .td-footer-image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    align-items: center;
    font-size: 0.75rem;
  }

  .back-to-top {
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 0.5rem);
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
  }

  html[dir="rtl"] .back-to-top {
    right: auto;
    left: max(1rem, env(safe-area-inset-left));
  }

  /* ---------- Service detail pages ---------- */
  .service-detail-page .sea-service-hero {
    min-height: 100svh;
    height: 100dvh;
    overflow: clip;
  }

  .service-detail-page .sea-service-hero .home-hero-copy {
    inset: auto 0 0;
    min-height: 100%;
    padding:
      calc(var(--td-mobile-safe-top) + 7.2rem)
      var(--td-mobile-gutter)
      calc(var(--td-mobile-safe-bottom) + 2rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.1rem;
  }

  .service-detail-page .sea-service-hero .home-hero-title {
    width: min(100%, 8.3em);
    margin: 0;
    font-size: clamp(3.1rem, 15vw, 4.9rem);
    line-height: 0.92;
    letter-spacing: -0.055em;
  }

  html[dir="rtl"] .service-detail-page .sea-service-hero .home-hero-title {
    width: min(100%, 9em);
    font-size: clamp(2.55rem, 11.8vw, 4.05rem);
    line-height: 1.32;
    letter-spacing: 0;
  }

  .service-detail-page .sea-service-hero .home-hero-actions {
    width: min(100%, 29rem);
    display: grid;
    gap: 0.9rem;
  }

  .service-detail-page .sea-service-hero .home-hero-summary {
    width: 100%;
    max-width: 29rem;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
  }

  .service-detail-page .sea-service-hero .home-hero-summary::before { display: none; }

  .service-detail-page .sea-service-hero .home-hero-cta {
    width: fit-content;
    min-width: 11.5rem;
    min-height: 3.4rem;
  }

  .service-detail-page .sea-advantage {
    padding: clamp(5rem, 17vw, 7rem) 0;
    overflow: hidden;
  }

  .service-detail-page .sea-advantage__header {
    margin-inline: var(--td-mobile-gutter);
  }

  .service-detail-page .sea-advantage__header h2 {
    max-width: 9em;
    font-size: clamp(2.35rem, 11vw, 3.7rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
  }

  html[dir="rtl"] .service-detail-page .sea-advantage__header h2 {
    max-width: 10em;
    font-size: clamp(2.05rem, 9.5vw, 3.2rem);
    line-height: 1.38;
    letter-spacing: 0;
  }

  .service-detail-page .sea-service-cards {
    width: 100%;
    display: flex;
    grid-template-columns: none;
    gap: 0.85rem;
    padding: 0 var(--td-mobile-gutter) 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--td-mobile-gutter);
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .service-detail-page .sea-service-cards::-webkit-scrollbar { display: none; }

  .service-detail-page .sea-service-card {
    flex: 0 0 min(84vw, 21.5rem);
    width: auto;
    min-width: 0;
    min-height: 32rem;
    height: auto;
    border-radius: var(--td-mobile-radius);
    scroll-snap-align: start;
    overflow: hidden;
  }

  .service-detail-page .sea-service-card > img,
  .service-detail-page .sea-service-card > svg {
    width: 100%;
    height: 17rem;
    object-fit: cover;
  }

  .service-detail-page .sea-service-card__body {
    min-height: 5rem;
    padding: 1rem;
  }

  .service-detail-page .sea-service-card__body span {
    font-size: clamp(1.25rem, 5.8vw, 1.65rem);
    line-height: 1.1;
  }

  html[dir="rtl"] .service-detail-page .sea-service-card__body span { line-height: 1.5; }

  .service-detail-page .sea-service-card > p {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .service-detail-footer {
    min-height: 5rem;
    padding: 1.25rem var(--td-mobile-gutter) calc(1.25rem + var(--td-mobile-safe-bottom));
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    align-items: center;
    justify-content: space-between;
  }

  /* ---------- Blog ---------- */
  .blog-page .blog-hero {
    min-height: 94svh;
    height: auto;
  }

  .blog-page .blog-hero__content {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    padding:
      calc(var(--td-mobile-safe-top) + 7rem)
      var(--td-mobile-gutter)
      calc(var(--td-mobile-safe-bottom) + 2rem);
  }

  .blog-page .blog-hero__content h1 {
    max-width: 8.5em;
    margin: 0 0 1rem;
    font-size: clamp(3rem, 14vw, 4.7rem);
    line-height: 0.94;
    letter-spacing: -0.055em;
  }

  html[dir="rtl"] .blog-page .blog-hero__content h1 {
    max-width: 9em;
    font-size: clamp(2.55rem, 11.3vw, 4rem);
    line-height: 1.32;
    letter-spacing: 0;
  }

  .blog-page .blog-hero__content p {
    max-width: 31rem;
    font-size: 1rem;
    line-height: 1.58;
  }

  .blog-library {
    padding: clamp(5rem, 17vw, 7rem) 0;
    overflow: hidden;
  }

  .blog-library__intro {
    margin-inline: var(--td-mobile-gutter);
  }

  .blog-library__intro h2 {
    font-size: clamp(2.55rem, 11.5vw, 3.8rem);
    line-height: 1;
  }

  html[dir="rtl"] .blog-library__intro h2 {
    font-size: clamp(2.2rem, 9.8vw, 3.3rem);
    line-height: 1.4;
  }

  .blog-library__grid {
    display: flex;
    grid-template-columns: none;
    gap: 0.8rem;
    padding: 0 var(--td-mobile-gutter) 0.8rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--td-mobile-gutter);
    scrollbar-width: none;
  }

  .blog-library__grid::-webkit-scrollbar { display: none; }

  .blog-library-card {
    flex: 0 0 min(84vw, 21.5rem);
    min-height: 23rem;
    scroll-snap-align: start;
    border-radius: var(--td-mobile-radius);
  }

  .blog-library-card h3 {
    font-size: clamp(1.7rem, 7.8vw, 2.3rem);
    line-height: 1.05;
  }

  html[dir="rtl"] .blog-library-card h3 { line-height: 1.45; }

  .blog-featured {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .blog-featured__media {
    min-height: 50svh;
  }

  .blog-featured__copy {
    padding: clamp(2.3rem, 9vw, 3.2rem) var(--td-mobile-gutter) clamp(4rem, 14vw, 5.5rem);
  }

  .blog-featured__copy h2 {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
    line-height: 1.02;
  }

  html[dir="rtl"] .blog-featured__copy h2 { line-height: 1.42; }

  .blog-reading {
    display: block;
    padding: clamp(4.5rem, 15vw, 6rem) 0;
  }

  .blog-reading__rail {
    position: relative;
    top: auto;
    width: 100%;
    display: flex;
    gap: 0.55rem;
    padding: 0 var(--td-mobile-gutter) 1.2rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .blog-reading__rail::-webkit-scrollbar { display: none; }

  .blog-reading__rail > span,
  .blog-reading__rail > a {
    flex: 0 0 auto;
    min-height: 2.7rem;
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(7,23,29,.12);
    border-radius: 999px;
  }

  .blog-article-list {
    width: 100%;
    max-width: none;
  }

  .blog-reading__article {
    padding: clamp(3.8rem, 13vw, 5rem) var(--td-mobile-gutter);
  }

  .blog-reading__article h2 {
    font-size: clamp(2.2rem, 10vw, 3.35rem);
    line-height: 1.02;
  }

  html[dir="rtl"] .blog-reading__article h2 { line-height: 1.42; }

  .blog-reading__article > p,
  .blog-section-note p {
    font-size: 1rem;
    line-height: 1.72;
  }

  .blog-section-note {
    padding-inline-start: 1rem;
    border-inline-start: 2px solid var(--blog-orange, #ff4b2c);
  }

  /* ---------- Smallest phones ---------- */
  @media (max-width: 22.5rem) {
    :root { --td-mobile-gutter: 0.95rem; }

    .home-hero-cta-row,
    .td-cargo-pills,
    .header-mobile-actions {
      grid-template-columns: 1fr;
    }

    .header-mobile-actions > a:last-child { grid-column: 1; }

    body:not(.service-detail-page):not(.blog-page) .home-hero .home-hero-title {
      font-size: clamp(2.75rem, 14.4vw, 3.3rem);
    }

    .td-talk-cta__title {
      font-size: clamp(2.05rem, 10.2vw, 2.5rem);
    }

    .td-talk-cta__word {
      font-size: 0.86em;
    }
  }

  /* ---------- Short phone landscape ---------- */
  @media (max-height: 31.25rem) and (orientation: landscape) {
    .header {
      min-height: 3.75rem;
      top: calc(var(--td-mobile-safe-top) + 0.35rem);
    }

    .header-nav-toggle {
      width: 2.75rem;
      min-width: 2.75rem;
      height: 2.75rem;
    }

    body:not(.service-detail-page):not(.blog-page) .home-hero-copy,
    .service-detail-page .sea-service-hero .home-hero-copy {
      padding-top: calc(var(--td-mobile-safe-top) + 5.4rem);
      padding-bottom: 1rem;
    }

    body:not(.service-detail-page):not(.blog-page) .home-hero .home-hero-title,
    .service-detail-page .sea-service-hero .home-hero-title {
      font-size: clamp(2.35rem, 8.5vw, 3.5rem);
      width: 70%;
    }

    .home-hero-actions {
      max-width: 48%;
      position: absolute;
      inset-inline-end: var(--td-mobile-gutter);
      bottom: 1rem;
    }

  }
}

/* ============================================================
   TABLET REFINEMENT — preserve more desktop richness.
   ============================================================ */
@media (min-width: 48rem) and (max-width: 63.98rem) {
  .header {
    margin-inline: clamp(1rem, 3vw, 2rem);
  }

  .home-hero-copy {
    padding-inline: clamp(2rem, 5vw, 4rem);
  }

  .home-hero .home-hero-title {
    font-size: clamp(4rem, 8.6vw, 6.4rem);
    max-width: 10em;
  }

  html[dir="rtl"] .home-hero .home-hero-title {
    font-size: clamp(3.5rem, 7.5vw, 5.5rem);
    line-height: 1.3;
  }

  .home-hero-actions {
    max-width: 34rem;
  }

  .trust-convictions-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .td-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .td-talk-cta__inner {
    padding-inline: clamp(2rem, 5vw, 4rem);
  }

  .td-talk-cta__title {
    font-size: clamp(4rem, 7.7vw, 5.7rem);
  }

  html[dir="rtl"] .td-talk-cta__title {
    font-size: clamp(3.5rem, 6.7vw, 5rem);
    line-height: 1.3;
  }

  .cargo-drift {
    padding-inline: clamp(1.2rem, 3vw, 2rem);
  }

  .showroom {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  }

  .showroom-image {
    min-height: 48rem;
  }

  .showroom-content {
    align-self: center;
    padding: clamp(2.5rem, 5vw, 4rem);
  }

  .drivers-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-detail-page .sea-service-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-library__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-glow,
  [data-cursor-glow],
  .td-cursor-glow {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-word,
  .td-b2b-scroll__truck {
    transition: none !important;
  }
}

/* Targeted cascade corrections for legacy mobile rules in the base bundle. */
@media (max-width: 47.98rem) {
  .td-b2b-scroll__truck,
  .td-b2b-scroll__truck.td-inlined-transparent-svg {
    display: block !important;
  }

  .trust-convictions-wrapper,
  .td-services-grid,
  .cargo-drift-column,
  .service-detail-page .sea-service-cards,
  .blog-page .blog-library__grid {
    display: flex !important;
  }

  .cargo-drift {
    overflow: hidden !important;
  }
}
@media (max-width: 47.98rem) {
  .td-b2b-scroll__truck,
  .td-b2b-scroll__truck.td-inlined-transparent-svg {
    aspect-ratio: 16 / 7;
    object-fit: contain;
  }
}

@media (max-width: 47.98rem) {
  /* Explicit mobile order for Core Offerings; legacy grid areas otherwise place
     the CTA before the media on some narrow widths. */
  .showroom {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
  }

  .showroom-image {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .showroom-content {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .showroom-button {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  /* Explicit footer reading order. */
  .td-footer-image-inner {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
  }

  .td-footer-image-wordmark {
    grid-column: 1 !important;
    grid-row: 1 !important;
    font-size: clamp(4rem, 20vw, 6.8rem) !important;
  }

  .td-footer-image-contact {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .td-footer-image-nav {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  .td-footer-image-meta {
    grid-column: 1 !important;
    grid-row: 4 !important;
  }
}

/* ============================================================
   Proven Safari/WebKit transparent SVG fallback support.
   svg-transparency-fix.js converts only affected external SVG <img>s to
   inline SVG on WebKit. These rules preserve the original sizing hooks.
   ============================================================ */
.td-inlined-transparent-svg {
  display: block;
  max-width: 100%;
  background: transparent !important;
  background-color: transparent !important;
  overflow: visible;
  color-scheme: light;
}

.td-webkit-svg-fix .td-b2b-scroll__truck,
.td-webkit-svg-fix .td-inlined-transparent-svg {
  -webkit-filter: none !important;
  filter: none !important;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}

.td-webkit-svg-fix .td-b2b-scroll__truck,
.td-webkit-svg-fix .td-section-truck,
.td-webkit-svg-fix .td-cargo-plane,
.td-webkit-svg-fix .td-laptop-quote__device {
  isolation: isolate;
}

.td-cargo-plane > .td-inlined-transparent-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.td-service-card > .td-inlined-transparent-svg {
  width: 82%;
  height: 190px;
  margin: 20px auto 0;
  object-fit: contain;
  transform: translateY(0) scale(1);
  transition: filter 300ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.td-service-card:hover > .td-inlined-transparent-svg,
.td-service-card:focus-within > .td-inlined-transparent-svg {
  filter: drop-shadow(0 1.5rem 1.1rem rgba(0, 33, 72, 0.18));
  transform: translateY(-0.35rem) scale(1.03);
}

.cargo-drift-container-visual > .td-inlined-transparent-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
}

.td-laptop-quote__device > .td-inlined-transparent-svg {
  display: block;
  width: min(760px, 56vw);
  height: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.sea-service-card > .td-inlined-transparent-svg {
  display: block;
  width: 100%;
  height: clamp(12rem, 16vw, 16rem);
  margin: 0 auto clamp(2rem, 4vw, 4rem);
  object-fit: contain;
  transform: translateY(0) scale(1);
  transition: filter 300ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sea-service-card:hover > .td-inlined-transparent-svg,
.sea-service-card:focus-within > .td-inlined-transparent-svg {
  filter: drop-shadow(0 1.6rem 1.25rem rgba(0, 33, 72, 0.18));
  transform: translateY(-0.35rem) scale(1.03);
}

@media (max-width: 47.98rem) {
  .td-service-card > .td-inlined-transparent-svg {
    width: 100%;
    height: min(68vw, 17rem);
    margin: 0;
    object-fit: contain;
  }

  .td-laptop-quote__device > .td-inlined-transparent-svg {
    width: 100%;
    height: auto;
  }

  .sea-service-card > .td-inlined-transparent-svg {
    width: 100%;
    height: 17rem;
    margin: 0;
    object-fit: cover;
  }
}

/* Fresh mobile final component corrections (phone only). */
@media (max-width: 47.98rem) {
  section[id],
  main[id],
  footer[id] {
    scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 6.5rem);
  }

  /* Service capability headings must wrap naturally; the legacy service
     stylesheet has a stronger narrow ch-width + !important font rule. */
  .service-detail-page .sea-advantage__header {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    overflow: visible;
  }

  .service-detail-page .sea-advantage__header h2 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    font-size: clamp(2.1rem, 9.8vw, 3.35rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.042em !important;
    white-space: normal !important;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }

  html[dir="rtl"] .service-detail-page .sea-advantage__header h2 {
    font-size: clamp(1.95rem, 8.8vw, 3rem) !important;
    line-height: 1.38 !important;
    letter-spacing: 0 !important;
    text-wrap: pretty;
  }
}

@media (max-width: 47.98rem) {
  /* The service shell is a legacy single-column grid. Its auto track was allowed
     to adopt the min-content width of the horizontal card rail, which made the
     whole capability section internally >1000px wide while the page itself was
     clipped. Force the track to be genuinely shrinkable. */
  .service-detail-page .service-detail-shell,
  .service-detail-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .service-detail-page .sea-advantage,
  .service-detail-page .sea-service-cards,
  .service-detail-page .sea-advantage__header {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .service-detail-page .sea-service-cards {
    box-sizing: border-box;
  }
}
@media (max-width: 47.98rem) {
  .service-detail-page .sea-advantage__header {
    width: auto !important;
    max-width: none !important;
  }
}

/* ============================================================
   MOBILE REFINEMENT — sticky JSON sequence, synced services,
   CTA fit and Safari/native-scroll stability.
   ============================================================ */
@media (max-width: 47.98rem) {
  html,
  body {
    -webkit-overflow-scrolling: touch;
  }

  /* Keep ordinary document scrolling native. Only the actual open drawer
     may lock the viewport. */
  html:not(.has-mobile-menu-open),
  html:not(.has-mobile-menu-open) body {
    overscroll-behavior-y: auto;
  }

  /* ---------- Talk CTA: actual phone composition ---------- */
  .td-talk-cta {
    min-height: 0;
    padding: clamp(4.25rem, 15vw, 5.6rem) var(--td-mobile-gutter)
      clamp(4.6rem, 16vw, 6rem);
    overflow: hidden;
  }

  .td-talk-cta::before {
    font-size: clamp(5.4rem, 26vw, 7.5rem);
    opacity: .032;
    bottom: -.02em;
  }

  .td-talk-cta__inner {
    width: 100%;
    max-width: 31rem;
    margin: 0 auto;
  }

  .td-talk-cta__pill {
    width: 100%;
    min-height: 3.15rem;
    padding: .7rem .8rem;
    grid-template-columns: auto minmax(0,1fr) auto;
    border-radius: .9rem;
  }

  .td-talk-cta__pill > span:nth-child(2) {
    display: none;
  }

  .td-talk-cta__pill strong {
    grid-column: 2;
    font-size: .8rem;
    line-height: 1.35;
    min-width: 0;
  }

  .td-talk-cta__content {
    margin-top: clamp(2.5rem, 9vw, 3.25rem);
  }

  .td-talk-cta__title {
    width: 100%;
    max-width: none;
    font-size: clamp(2rem, 9.2vw, 2.95rem);
    line-height: 1;
    letter-spacing: -.044em;
    text-wrap: balance;
  }

  html[dir="rtl"] .td-talk-cta__title {
    font-size: clamp(1.75rem, 7.6vw, 2.55rem);
    line-height: 1.48;
    letter-spacing: 0;
    text-wrap: pretty;
  }

  .td-talk-cta__title-line--dynamic {
    display: grid;
    gap: .08em;
    margin-top: .12em;
  }

  .td-talk-cta__word-shell {
    width: 100%;
    height: 1.28em;
    margin-top: 0;
    overflow: hidden;
  }

  html[dir="rtl"] .td-talk-cta__word-shell {
    height: 1.65em;
  }

  .td-talk-cta__word {
    width: 100%;
    max-width: 100%;
    padding-block: .02em .16em;
    font-size: .86em;
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[dir="rtl"] .td-talk-cta__word {
    padding-block-end: .24em;
    font-size: .9em;
    line-height: 1.5;
    overflow-wrap: normal;
    word-break: normal;
  }

  .td-talk-cta__footer {
    margin-top: clamp(2rem, 8vw, 2.7rem);
    gap: 1.25rem;
  }

  .td-talk-cta__description {
    max-width: 100%;
    margin: 0;
    font-size: .94rem;
    line-height: 1.58;
  }

  .td-talk-cta__actions {
    gap: .65rem;
  }

  .td-talk-cta__button {
    width: 100%;
    max-width: 100%;
    min-height: 3.45rem;
    padding: .85rem .95rem;
    border-radius: .75rem;
  }

  .td-talk-cta__route {
    width: 11rem;
    height: 56%;
    top: 30%;
    inset-inline-end: -5.5rem;
    opacity: .12;
  }

  html[dir="rtl"] .td-talk-cta__route {
    inset-inline-end: auto;
    inset-inline-start: -5.5rem;
  }
}

@media (max-width: 22.5rem) {
  .td-talk-cta__title {
    font-size: clamp(1.85rem, 8.8vw, 2.35rem);
  }
}


/* ============================================================
   MOBILE HERO JSON SEQUENCE — SINGLE SOURCE OF TRUTH
   ------------------------------------------------------------
   Goal: a normal 16:9 media frame that enters in document flow,
   pins without changing size or positioning mode, consumes scroll
   to scrub the JSON sequence, then releases naturally at the end.

   Important Safari rule: no ancestor of the sticky stage may become
   an overflow scroll-container. The legacy mobile stylesheet used
   overflow-x:hidden on .wrapper; that computes an overflow scrolling
   context in WebKit and breaks sticky geometry. Keep the document
   wrapper overflow-visible and let the root/body guard page overflow.
   ============================================================ */
@media (max-width: 47.98rem) {
  main.wrapper,
  .wrapper {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .hero-scroll-sequence,
  .hero-scroll-sequence[data-mobile-static="true"] {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 260svh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: clamp(1.5rem, 5vw, 2.25rem) 0 0 !important;
    overflow: visible !important;
    isolation: isolate;
    background:
      radial-gradient(circle at 85% 14%, rgba(255, 90, 47, 0.07), transparent 20rem),
      #062630;
    --hero-sequence-progress: 0%;
  }

  .hero-scroll-sequence::before,
  .hero-scroll-sequence::after {
    display: none !important;
  }

  .hero-scroll-sequence-sticky {
    position: sticky !important;
    top: calc(var(--td-mobile-safe-top) + 5.8rem) !important;
    inset-inline: auto !important;
    width: min(100%, 38rem) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 var(--td-mobile-gutter) 1.15rem !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-items: start;
    gap: .75rem;
    overflow: visible !important;
    transform: none !important;
    z-index: 2;
  }

  /* Eyebrow remains part of normal sticky layout. It no longer jumps
     because it is not absolutely positioned against a 100svh shell. */
  .hero-scroll-sequence-sticky::before {
    content: "END-TO-END  /  " attr(data-sequence-step) "—03";
    position: relative;
    inset: auto;
    display: block;
    grid-row: 1;
    width: 100%;
    min-height: 1rem;
    color: var(--td-mobile-orange);
    font: 800 .66rem/1.25 var(--ff-secondary, Arial, sans-serif);
    letter-spacing: .11em;
    text-transform: uppercase;
    pointer-events: none;
  }

  html[dir="rtl"] .hero-scroll-sequence-sticky::before {
    content: "من البداية إلى النهاية  /  " attr(data-sequence-step) "—03";
    font-family: var(--ff-arabic, "Noto Kufi Arabic", sans-serif);
    line-height: 1.65;
    letter-spacing: 0;
    text-transform: none;
  }

  .hero-scroll-sequence-canvas {
    display: block !important;
    position: relative !important;
    grid-row: 2;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: clamp(.72rem, 2.7vw, 1rem);
    background: #062630;
    box-shadow: 0 .9rem 2.6rem rgba(0, 0, 0, .22);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .hero-scroll-sequence-title {
    position: relative !important;
    inset: auto !important;
    grid-row: 3;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: clamp(4.15rem, 17vw, 5.5rem) !important;
    margin: 0 !important;
    color: #fff;
    text-align: start;
    transform: none !important;
    pointer-events: none;
  }

  .hero-scroll-sequence .hero-scroll-word {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    color: #fff;
    font-size: clamp(1.85rem, 8.1vw, 2.75rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.038em !important;
    white-space: normal;
    opacity: var(--word-opacity) !important;
    filter: blur(calc((1 - var(--word-opacity)) * 5px)) !important;
    transform: translate3d(0, calc((1 - var(--word-opacity)) * .48rem), 0) !important;
    transition: none !important;
    will-change: opacity, filter, transform;
  }

  .hero-scroll-sequence .hero-scroll-word-warehousing {
    color: var(--td-mobile-orange);
  }

  .hero-scroll-sequence .hero-scroll-word-supply {
    max-width: 16ch !important;
    font-size: clamp(1.52rem, 6.7vw, 2.18rem) !important;
    line-height: 1.07 !important;
  }

  html[dir="rtl"] .hero-scroll-sequence .hero-scroll-word {
    font-family: var(--ff-arabic, "Noto Kufi Arabic", sans-serif);
    font-size: clamp(1.58rem, 6.9vw, 2.3rem) !important;
    line-height: 1.52 !important;
    letter-spacing: 0 !important;
  }

  html[dir="rtl"] .hero-scroll-sequence .hero-scroll-word-supply {
    max-width: 100% !important;
    font-size: clamp(1.38rem, 6vw, 1.95rem) !important;
  }

  /* Progress rail participates in the sticky layout. Keeping it in flow
     avoids viewport-bar changes moving an absolutely positioned rail. */
  .hero-scroll-sequence-sticky::after {
    content: "";
    position: relative;
    inset: auto;
    grid-row: 4;
    display: block;
    width: 100%;
    height: 2px;
    margin-top: .05rem;
    background:
      linear-gradient(90deg,
        var(--td-mobile-orange) 0 var(--hero-sequence-progress),
        rgba(255,255,255,.18) var(--hero-sequence-progress) 100%);
    pointer-events: none;
  }

  html[dir="rtl"] .hero-scroll-sequence-sticky::after {
    background:
      linear-gradient(270deg,
        var(--td-mobile-orange) 0 var(--hero-sequence-progress),
        rgba(255,255,255,.18) var(--hero-sequence-progress) 100%);
  }

  .hero-scroll-sequence.is-sequence-loading .hero-scroll-sequence-canvas {
    opacity: .72;
  }

  .hero-scroll-sequence.is-sequence-ready .hero-scroll-sequence-canvas {
    opacity: 1;
    transition: opacity 160ms ease;
  }

  .hero-scroll-sequence.is-sequence-unavailable {
    height: auto !important;
    min-height: 70svh !important;
    padding-bottom: 3rem !important;
  }

  .hero-scroll-sequence.is-sequence-unavailable .hero-scroll-sequence-sticky {
    position: relative !important;
    top: auto !important;
  }
}

/* Small/short landscape phones keep the same sticky model, but use a
   two-column compact composition so the 16:9 frame never overflows vertically. */
@media (max-width: 47.98rem) and (max-height: 38rem) and (orientation: landscape) {
  .hero-scroll-sequence {
    height: 230svh !important;
    padding-top: .8rem !important;
  }

  .hero-scroll-sequence-sticky {
    top: calc(var(--td-mobile-safe-top) + 4.7rem) !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(11rem, .9fr);
    grid-template-rows: auto auto auto;
    column-gap: .85rem;
    row-gap: .45rem;
    align-items: center;
    padding-inline: max(.8rem, env(safe-area-inset-left)) max(.8rem, env(safe-area-inset-right)) !important;
  }

  .hero-scroll-sequence-sticky::before {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hero-scroll-sequence-canvas {
    grid-column: 1;
    grid-row: 2;
  }

  .hero-scroll-sequence-title {
    grid-column: 2;
    grid-row: 2;
    min-height: 4rem !important;
  }

  .hero-scroll-sequence-sticky::after {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .hero-scroll-sequence .hero-scroll-word {
    font-size: clamp(1.32rem, 4.2vw, 1.8rem) !important;
  }

  .hero-scroll-sequence .hero-scroll-word-supply {
    font-size: clamp(1.12rem, 3.55vw, 1.5rem) !important;
  }
}

@media (max-width: 47.98rem) and (prefers-reduced-motion: reduce) {
  .hero-scroll-sequence,
  .hero-scroll-sequence[data-mobile-static="true"] {
    height: auto !important;
    min-height: 70svh !important;
    padding-bottom: 3rem !important;
  }

  .hero-scroll-sequence-sticky {
    position: relative !important;
    top: auto !important;
  }

  .hero-scroll-sequence .hero-scroll-word {
    display: none !important;
    opacity: 0 !important;
    filter: none !important;
    transform: none !important;
  }

  .hero-scroll-sequence .hero-scroll-word-freight {
    display: block !important;
    opacity: 1 !important;
  }
}

/* ============================================================
   PROCESS AUTOPLAY — SMOOTH PLAYBACK + TEMPORARY TAP PAUSE
   Shared EN / AR behavior. Keeps native vertical scrolling intact.
   ============================================================ */
.sequence-section.td-process-autoplay .process-sequence-canvas,
.sequence-section.td-process-autoplay #seq-canvas {
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition: filter 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.sequence-section.td-process-autoplay .process-sequence-canvas:focus-visible,
.sequence-section.td-process-autoplay #seq-canvas:focus-visible {
  outline: 2px solid var(--td-mobile-orange, #ff5a2f);
  outline-offset: 4px;
}

.sequence-section.td-process-autoplay .sequence-sticky::after {
  content: "Paused · resuming shortly";
  position: absolute;
  z-index: 12;
  top: 50%;
  left: 50%;
  padding: .62rem .85rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(3, 8, 10, .82);
  color: #fff;
  font-family: var(--ff-secondary, sans-serif);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -42%) scale(.96);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html[dir="rtl"] .sequence-section.td-process-autoplay .sequence-sticky::after {
  content: "متوقف مؤقتًا · سيُستأنف تلقائيًا";
  letter-spacing: 0;
}

.sequence-section.td-process-autoplay.is-user-paused .sequence-sticky::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.sequence-section.td-process-autoplay.is-user-paused .process-sequence-canvas,
.sequence-section.td-process-autoplay.is-user-paused #seq-canvas {
  filter: brightness(.72) saturate(.9);
}

.sequence-section.td-process-autoplay .step-meta,
.sequence-section.td-process-autoplay .step-title,
.sequence-section.td-process-autoplay .step-desc {
  will-change: opacity, transform;
  transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}

@media (max-width: 47.98rem) {
  .sequence-section.td-process-autoplay .sequence-sticky::after {
    top: 44%;
    font-size: .68rem;
    padding: .58rem .75rem;
  }
}

/* ============================================================
   SECOND JSON SEQUENCE — MOBILE RENDER PERFORMANCE
   No visual redesign: removes GPU-expensive filter interpolation from the
   three changing labels and keeps the video frame on its own paint layer.
   ============================================================ */
@media (max-width: 47.98rem) {
  .hero-scroll-sequence-canvas {
    pointer-events: none;
    image-rendering: auto;
    contain: paint;
  }

  .hero-scroll-sequence .hero-scroll-word {
    filter: none !important;
    transition: none !important;
    will-change: opacity, transform !important;
  }
}


/* Mobile B2B truck is intentionally static. Do not reintroduce scroll/parallax motion. */
@media (max-width: 47.98rem) {
  .td-b2b-scroll__truck,
  .td-b2b-scroll__truck.td-inlined-transparent-svg {
    transform: none !important;
    translate: none !important;
    animation: none !important;
    will-change: auto !important;
  }
}

/* ============================================================
   IOS / WEBKIT — HERO JSON SEQUENCE RELIABILITY
   WebKit can intermittently blank a canvas that is both sticky and promoted
   to its own compositing/paint-contained layer, especially when SVG frames
   are redrawn during touch scroll. iPhone uses decoded DOM image frames for
   the same sequence instead of canvas compositing. Native scroll remains the
   scroll source; Safari toolbar height-only resize events are ignored in JS.
   ============================================================ */
@media (max-width: 47.98rem) {
  .hero-scroll-sequence-frame-host {
    display: none;
    position: relative;
    grid-row: 2;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: clamp(.72rem, 2.7vw, 1rem);
    background: #062630;
    box-shadow: 0 .9rem 2.6rem rgba(0, 0, 0, .22);
  }

  .hero-scroll-sequence-frame-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center;
    background: #062630;
  }

  .hero-scroll-sequence.is-ios-sequence .hero-scroll-sequence-frame-host {
    display: block;
  }

  .hero-scroll-sequence.is-ios-sequence .hero-scroll-sequence-canvas {
    display: none !important;
  }

  /* Do not promote/contain the sticky sequence on iOS. These optimizations
     are beneficial in Chromium but are a known source of blank sticky canvas
     layers in WebKit. */
  html.td-ios-webkit .hero-scroll-sequence-sticky,
  html.td-ios-webkit .hero-scroll-sequence-canvas,
  html.td-ios-webkit .hero-scroll-sequence-frame-host,
  html.td-ios-webkit .hero-scroll-sequence-frame-image {
    transform: none !important;
    -webkit-transform: none !important;
    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
    contain: none !important;
    will-change: auto !important;
  }

  html.td-ios-webkit .hero-scroll-sequence,
  html.td-ios-webkit .hero-scroll-sequence-sticky {
    touch-action: pan-y;
    -webkit-overflow-scrolling: auto;
  }
}

/* iPhone Safari: keep the first hero's document height stable while the
   browser chrome collapses. A 100dvh hero changes the second section's page
   offset mid-gesture and makes a correctly-sticky scrub feel like it jumps. */
@media (max-width: 47.98rem) {
  html.td-ios-webkit body:not(.service-detail-page):not(.blog-page) .home-hero {
    height: 100svh !important;
    min-height: 100svh !important;
  }
}

/* Apply stable small-viewport hero sizing from first paint on mobile WebKit,
   before the sequence script has had a chance to add its platform class. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 47.98rem) {
    body:not(.service-detail-page):not(.blog-page) .home-hero {
      height: 100svh !important;
      min-height: 100svh !important;
    }
  }
}
