/* ============================================================
   Sabi Logistics — Cinematic Hero (Motion System)
   ============================================================ */

/* --- Global safety --- */
.hero-section,
.hero-section * {
    box-sizing: border-box;
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 108px;
    overflow: hidden;
    background: #0B1020;
    isolation: isolate;
}

.hero-section::before,
.hero-section::after {
    pointer-events: none !important;
}

/* All decorative layers — never capture clicks */
.hero-decor,
.hero-grid,
.hero-glow,
.hero-overlay,
.hero-bg,
.hero-animation,
.hero-route-animation,
.hero-lines,
.hero-particles,
.hero-motion,
.hero-motion__media,
.hero-motion__video,
.hero-motion__fallback,
.hero-motion__mesh,
.hero-motion__sheen,
.hero-motion__vignette,
.hero-motion__cursor,
.hero-lines__svg,
.hero-lines__layer,
.hero-route,
svg.hero-edge-border,
svg.hero-content__border,
.hero-edge-border,
.hero-content__border,
.hero-content__border-path,
.hero-btn__shine {
    pointer-events: none !important;
}

.hero-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none !important;
}

/* ── Motion layers (behind content) ── */
.hero-motion {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-motion__media {
    position: absolute;
    inset: -2%;
    will-change: transform;
}

.hero-motion__video,
.hero-motion__fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-motion__fallback {
    background:
        linear-gradient(155deg, #0B1020 0%, #141b30 45%, #0B1020 100%),
        radial-gradient(ellipse 70% 55% at 72% 38%, rgba(63, 67, 165, 0.14) 0%, transparent 58%);
}

.hero-motion__mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    mix-blend-mode: screen;
    opacity: 0.55;
    will-change: transform;
}

.hero-motion__mesh--1 {
    width: 55vw;
    max-width: 680px;
    height: 55vw;
    max-height: 680px;
    top: -8%;
    left: 55%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(63, 67, 165, 0.5) 0%, transparent 68%);
}

.hero-motion__mesh--2 {
    width: 42vw;
    max-width: 520px;
    height: 42vw;
    max-height: 520px;
    bottom: -12%;
    left: 8%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.2) 0%, transparent 70%);
    opacity: 0.4;
}

.hero-motion__mesh--3 {
    width: 38vw;
    max-width: 460px;
    height: 30vw;
    max-height: 340px;
    top: 38%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(107, 111, 212, 0.3) 0%, transparent 72%);
    opacity: 0.32;
}

.hero-motion__sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        118deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 45%,
        transparent 70%
    );
    mix-blend-mode: overlay;
    opacity: 0.5;
    will-change: transform, opacity;
}

.hero-motion__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 80% at 50% 48%, transparent 20%, rgba(11, 16, 32, 0.5) 100%);
}

.hero-motion__cursor {
    position: absolute;
    width: 480px;
    height: 480px;
    margin: -240px 0 0 -240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 67, 165, 0.14) 0%, transparent 68%);
    opacity: 0;
    will-change: transform;
    z-index: 3;
}

.hero-section.is-cursor-active .hero-motion__cursor {
    opacity: 1;
}

/* Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse 95% 82% at 50% 42%, rgba(11, 16, 32, 0.38) 0%, rgba(11, 16, 32, 0.74) 78%),
        linear-gradient(to top, rgba(11, 16, 32, 0.68) 0%, transparent 48%);
}

/* Route lines */
.hero-lines {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
}

.hero-lines__svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 165%;
    min-width: 100%;
    height: 118%;
    transform: translate(-50%, -50%);
    opacity: 0.72;
    mix-blend-mode: screen;
}

.hero-lines__layer {
    transform-box: fill-box;
}

.hero-route {
    vector-effect: non-scaling-stroke;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-route--glow {
    opacity: 0.55;
}

.hero-lines__orbit {
    transform-origin: 720px 450px;
}

/* Edge border */
.hero-edge-border {
    position: absolute;
    inset: 20px;
    z-index: 4;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    opacity: 0.35;
}

.hero-edge-border__path {
    vector-effect: non-scaling-stroke;
}

/* Content — always above all decorative layers */
.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 108px);
    padding-block: clamp(48px, 6vw, 88px);
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: 1250px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content__border {
    position: absolute;
    inset: -32px -40px;
    width: calc(100% + 80px);
    height: calc(100% + 64px);
    opacity: 0;
    z-index: 0;
}

.hero-content__border-path {
    vector-effect: non-scaling-stroke;
}

.hero-content > :not(.hero-content__border) {
    position: relative;
    z-index: 1;
}

.hero-label {
    display: block;
    max-width: 640px;
    margin: 0 auto 28px;
    font-family: var(--font-ui, 'Poppins', sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #FF6B00;
}

.hero-heading {
    margin: 0 auto 32px;
    max-width: 100%;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(56px, 6vw, 76px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
    color: #fff;
    overflow: visible;
    padding: 0 0.06em 0.1em;
    text-wrap: balance;
}

.hero-heading__line {
    display: block;
}

.hero-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    margin-right: 0.24em;
    padding-right: 0.05em;
    padding-bottom: 0.14em;
}

.hero-word:last-child {
    margin-right: 0;
    padding-right: 0.1em;
}

.hero-word-inner {
    display: inline-block;
    will-change: transform, opacity;
    padding-right: 0.02em;
}

.hero-word-inner.is-accent {
    color: #FF6B00;
    -webkit-text-fill-color: #FF6B00;
}

.hero-desc,
.hero-text {
    max-width: 620px;
    margin: 0 auto 44px;
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.86);
    text-wrap: pretty;
}

.hero-buttons {
    position: relative;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.hero-primary-btn,
.hero-secondary-btn,
.hero-btn {
    position: relative;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 17px 36px;
    border-radius: 999px;
    font-family: var(--font-ui, 'Poppins', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    pointer-events: auto !important;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hero-primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #ff8129, #FF6B00, #e05500);
    box-shadow: 0 8px 32px rgba(255, 107, 0, 0.35);
}

.hero-btn__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
    transform: translateX(-120%);
}

.hero-btn__text {
    position: relative;
    z-index: 1;
}

.hero-secondary-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hero-label,
.hero-heading,
.hero-desc,
.hero-text,
.hero-buttons,
.hero-word-inner {
    opacity: 1;
}

/* --- Content width scaling --- */
@media (max-width: 1440px) {
    .hero-content {
        max-width: 920px;
    }
}

@media (max-width: 1200px) {
    .hero-content {
        max-width: 860px;
    }

    .hero-container {
        min-height: clamp(520px, 82vh, 720px);
    }
}

@media (max-width: 1024px) {
    .hero-content {
        max-width: 720px;
    }

    .hero-section {
        min-height: clamp(560px, 88vh, 820px);
        padding-top: clamp(96px, 12vw, 120px);
    }

    .hero-container {
        min-height: auto;
        padding-block: clamp(40px, 6vw, 64px) clamp(48px, 7vw, 72px);
    }

    .hero-heading {
        font-size: clamp(44px, 6.5vw, 62px);
        line-height: 1;
        letter-spacing: -2px;
    }

    .hero-motion__media {
        inset: 0;
        max-height: 62vh;
        aspect-ratio: 16 / 10;
    }

    .hero-lines__svg {
        width: 130%;
        opacity: 0.6;
    }
}

/* --- Desktop wide --- */
@media (min-width: 1600px) {
    .hero-lines__svg {
        width: min(145%, 2200px);
        height: 112%;
    }

    .hero-edge-border {
        inset: clamp(16px, 1.25vw, 28px);
        width: calc(100% - 2 * clamp(16px, 1.25vw, 28px));
        height: calc(100% - 2 * clamp(16px, 1.25vw, 28px));
    }

    .hero-motion__mesh--1 {
        left: 50%;
    }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-top: 140px;
        padding-bottom: 90px;
    }

    .hero-container {
        min-height: auto;
        padding-block: 0;
    }

    .hero-content {
        max-width: 100%;
        padding-inline: 20px;
    }

    .hero-heading {
        font-size: clamp(40px, 11vw, 58px);
        line-height: 1;
        letter-spacing: -2px;
        margin-bottom: 24px;
    }

    .hero-desc,
    .hero-text {
        font-size: 16px;
        line-height: 1.8;
        margin-bottom: 32px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        align-items: center;
    }

    .hero-primary-btn,
    .hero-secondary-btn,
    .hero-btn {
        width: 100%;
        max-width: 320px;
        min-height: 56px;
    }

    .hero-content__border {
        display: none;
    }

    .hero-motion__cursor {
        display: none;
    }

    .hero-edge-border {
        inset: 12px;
        width: calc(100% - 24px);
        height: calc(100% - 24px);
        opacity: 0.22;
    }

    .hero-lines__svg {
        width: 100%;
        max-width: 100%;
        opacity: 0.5;
    }

    .hero-motion__mesh {
        filter: blur(56px);
        opacity: 0.32;
    }

    .hero-motion__media {
        inset: 0;
        max-height: 50vh;
        aspect-ratio: 16 / 11;
    }

    .hero-overlay {
        background:
            radial-gradient(ellipse 100% 80% at 50% 40%, rgba(11, 16, 32, 0.55) 0%, rgba(11, 16, 32, 0.92) 100%),
            linear-gradient(to top, rgba(11, 16, 32, 0.78) 0%, transparent 45%);
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: clamp(120px, 28vw, 140px);
        padding-bottom: clamp(72px, 16vw, 90px);
    }

    .hero-label {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-label,
    .hero-heading,
    .hero-desc,
    .hero-text,
    .hero-buttons,
    .hero-word-inner {
        opacity: 1 !important;
    }

    .hero-motion__mesh,
    .hero-motion__media,
    .hero-word-inner {
        animation: none !important;
        transform: none !important;
    }
}
