/* Dispatch Hero ----------------------------------------------------------- */
.dispatchhero-block {
    position: relative;
    overflow: hidden;
    background: var(--secondary);
    padding: 96px 0 104px;
    isolation: isolate;
}

.dispatchhero-media,
.dispatchhero-media::after {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.dispatchhero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 50%;
}

/* Optional background video: sits over the photo, under the night overlay.
   Same object-position as .dispatchhero-bg, so a first-frame poster lines up exactly. */
.dispatchhero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 50%;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.dispatchhero-video.is-playing {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .dispatchhero-video {
        display: none;
    }
}

/* Pause / play for the looping video (WCAG 2.2.2). Bottom-right, out of the copy's way. */
.dispatchhero-videotoggle {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 14px 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(10, 28, 63, 0.6);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.dispatchhero-videotoggle[hidden] {
    display: none;
}

.dispatchhero-videotoggle:hover {
    background: rgba(10, 28, 63, 0.85);
    border-color: #fff;
}

.dispatchhero-videotoggle:focus-visible {
    outline: 3px solid var(--tertiary);
    outline-offset: 2px;
}

/* Pause icon: two bars. Pressed (paused) state: a play triangle. */
.dispatchhero-videotoggle-icon {
    width: 10px;
    height: 12px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.dispatchhero-videotoggle[aria-pressed="true"] .dispatchhero-videotoggle-icon {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid currentColor;
    border-right: 0;
}

/* Night overlay: heavy on the text side, letting the road show on the right. */
.dispatchhero-media::after {
    content: "";
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(10, 28, 63, 0.94) 0%, rgba(10, 28, 63, 0.82) 42%, rgba(10, 28, 63, 0.35) 75%, rgba(10, 28, 63, 0.55) 100%),
        linear-gradient(0deg, rgba(10, 28, 63, 0.7) 0%, rgba(10, 28, 63, 0) 40%);
}

.dispatchhero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 72px;
    align-items: center;
    min-height: 560px;
}

.dispatchhero-copy {
    max-width: 720px;
}

.dispatchhero-heading {
    margin: 0;
    color: #fff;
    font-size: 5.25rem;
    line-height: 0.96;
    letter-spacing: -0.03em;
}

/* Long headlines (over 48 characters) step down so they stay at about four lines. */
.dispatchhero-heading.is-long {
    font-size: 3.6rem;
    line-height: 1.02;
}

.dispatchhero-sub {
    max-width: 600px;
    margin: 28px 0 0;
    color: #D7DEE8;
    font-size: 1.3rem;
    line-height: 1.5;
}

.dispatchhero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 40px;
}

.dispatchhero-actions .btn {
    padding: 18px 30px;
    font-size: 18px;
}

.dispatchhero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 0;
    margin: 44px 0 0;
    padding: 0;
    list-style: none;
}

.dispatchhero-proof li {
    margin: 0;
    padding: 0 20px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    border-left: 2px solid var(--tertiary);
}

.dispatchhero-proof li:first-child {
    padding-left: 14px;
}

/* The dispatch panel ------------------------------------------------------ */
.dispatchhero-panel {
    background: #fff;
    border-top: 6px solid var(--tertiary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.dispatchhero-panel-head {
    padding: 26px 28px 20px;
    border-bottom: 1px solid var(--steel-light);
}

.dispatchhero-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #0F7A49;
    font-size: 15px;
    font-weight: 800;
}

.dispatchhero-time {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}

.dispatchhero-time time {
    font-variant-numeric: tabular-nums;
}

.dispatchhero-routes {
    margin: 0;
    padding: 8px 0;
    list-style: none;
}

.dispatchhero-routes li {
    margin: 0;
}

.dispatchhero-routes a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 52px 14px 28px;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.15s ease-out;
}

.dispatchhero-routes a::after {
    content: "";
    position: absolute;
    right: 28px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -5px;
    border-right: 2px solid var(--primary);
    border-top: 2px solid var(--primary);
    transform: rotate(45deg);
    transition: transform 0.15s ease-out;
}

.dispatchhero-routes a:hover {
    background: var(--lane);
}

.dispatchhero-routes a:hover::after {
    transform: translateX(3px) rotate(45deg);
}

.dispatchhero-route-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    background: var(--navy-tint);
    color: var(--primary);
}

.dispatchhero-route-icon svg {
    width: 24px;
    height: 24px;
}

.dispatchhero-route-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dispatchhero-route-text strong {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.dispatchhero-route-text span {
    color: #5B6778;
    font-size: 15px;
    line-height: 1.3;
}

.dispatchhero-call {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 18px 28px 22px;
    background: var(--secondary);
    color: #C9D1DD;
    font-size: 15px;
}

.dispatchhero-call a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 900;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.dispatchhero-call a svg {
    width: 22px;
    height: 22px;
    color: var(--tertiary);
}

.dispatchhero-call a:hover {
    color: var(--tertiary);
}

/* First-load sequence (the site's one orchestrated motion moment). */
@media (prefers-reduced-motion: no-preference) {
    .dispatchhero-animate .dispatchhero-heading,
    .dispatchhero-animate .dispatchhero-sub,
    .dispatchhero-animate .dispatchhero-actions,
    .dispatchhero-animate .dispatchhero-proof {
        animation: dispatchhero-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
    .dispatchhero-animate .dispatchhero-sub { animation-delay: 0.08s; }
    .dispatchhero-animate .dispatchhero-actions { animation-delay: 0.16s; }
    .dispatchhero-animate .dispatchhero-proof { animation-delay: 0.24s; }

    .dispatchhero-animate .dispatchhero-panel {
        animation: dispatchhero-panel 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
    }
}

@keyframes dispatchhero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes dispatchhero-panel {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

/* Tablet - 1199px and below */
@media (max-width: 1199px) {
    .dispatchhero-block {
        padding: 72px 0 80px;
    }

    .dispatchhero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: 0;
    }

    .dispatchhero-heading {
        font-size: 4rem;
    }

    .dispatchhero-heading.is-long {
        font-size: 3.4rem;
    }

    .dispatchhero-panel {
        max-width: 560px;
    }

    .dispatchhero-media::after {
        background: linear-gradient(180deg, rgba(10, 28, 63, 0.88) 0%, rgba(10, 28, 63, 0.8) 55%, rgba(10, 28, 63, 0.95) 100%);
    }
}

/* Mobile - 767px and below */
@media (max-width: 767px) {
    .dispatchhero-block {
        padding: 48px 0 56px;
    }

    .dispatchhero-heading {
        font-size: 2.85rem;
        line-height: 1;
    }

    .dispatchhero-heading.is-long {
        font-size: 2.35rem;
        line-height: 1.04;
    }

    .dispatchhero-sub {
        margin-top: 20px;
        font-size: 1.1rem;
    }

    .dispatchhero-actions {
        margin-top: 28px;
    }

    .dispatchhero-proof {
        margin-top: 32px;
        gap: 12px 0;
    }

    .dispatchhero-proof li {
        flex: 0 0 50%;
        padding: 0 12px;
        font-size: 15px;
    }

    .dispatchhero-proof li:first-child {
        padding-left: 12px;
    }

    .dispatchhero-panel-head,
    .dispatchhero-call {
        padding-left: 20px;
        padding-right: 20px;
    }

    .dispatchhero-routes a {
        padding-left: 20px;
        padding-right: 44px;
    }

    .dispatchhero-routes a::after {
        right: 20px;
    }
}
