/* Trang chủ: máy bay (dưới header) + tàu/sóng (đáy viewport). PNG nền đen: blend để hòa nền. */
/* Chu kỳ máy bay và tàu độc lập (không calc chéo); animation-delay âm để mỗi thứ chạy ngay, không chờ nhau. */

:root {
    /* Một vòng bay (máy bay) — tách biệt với tàu */
    --lp-plane-cycle: 32s;
    /* Một vòng lướt (tàu), chậm hơn mặc định ~30% so với 36s gốc */
    --lp-ship-cycle: calc(36s * 1.3);
    --lp-wave-cycle: 10s;
    /* Mặt nước (gợn sóng) — cách đáy vùng biển; tàu neo theo biến này */
    --lp-sea-surface: 5.5rem;
}

.landing-page .lp-deco {
    position: fixed;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 45;
}

/* Cho phép bấm máy bay / tàu (cuộn tới #services); sóng không chặn click */
.landing-page .lp-deco-plane-unit,
.landing-page .lp-deco-ship-unit {
    pointer-events: auto;
    cursor: pointer;
}

/* --- Máy bay + khói (ngay dưới header) — khoảng ×5 --- */
.landing-page .lp-deco--plane {
    top: var(--vm-header-h, 76px);
    height: 14rem;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(224, 236, 248, 0.55) 45%,
        rgba(244, 246, 249, 0) 100%
    );
}

.landing-page .lp-deco-plane-loop {
    position: relative;
    width: 100%;
    height: 100%;
}

.landing-page .lp-deco-plane-unit {
    position: absolute;
    top: 50%;
    left: 0;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 1rem;
    transform: translate3d(-30vw, -50%, 0);
    will-change: transform;
    animation: lp-plane-cross var(--lp-plane-cycle) linear -7s infinite;
}

.landing-page .lp-deco-plane-img {
    display: block;
    height: 13.25rem;
    width: auto;
    max-width: min(55rem, 92vw);
    object-fit: contain;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.75));
}

.landing-page .lp-deco-plane-smoke {
    display: block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.65);
    filter: blur(1px);
    opacity: 0.85;
    animation: lp-smoke-puff 1.6s ease-in-out infinite;
}

.landing-page .lp-deco-plane-smoke--1 {
    width: 2.75rem;
    height: 2.75rem;
    animation-delay: 0s;
}

.landing-page .lp-deco-plane-smoke--2 {
    width: 3.5rem;
    height: 3.5rem;
    animation-delay: 0.25s;
}

.landing-page .lp-deco-plane-smoke--3 {
    width: 4.25rem;
    height: 4.25rem;
    animation-delay: 0.5s;
}

@keyframes lp-plane-cross {
    0% {
        transform: translate3d(-25vw, -50%, 0);
    }
    100% {
        transform: translate3d(115vw, -50%, 0);
    }
}

@keyframes lp-smoke-puff {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.85);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.05);
    }
}

/* --- Biển: nền sâu phía dưới, sóng + tàu phía trên (tàu chạy trên mặt nước) --- */
.landing-page .lp-deco--sea {
    bottom: 0;
    height: 12rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-sizing: content-box;
    isolation: isolate;
    background: linear-gradient(
        180deg,
        rgba(125, 211, 252, 0.35) 0%,
        rgba(14, 165, 233, 0.55) 18%,
        rgba(2, 132, 199, 0.75) 42%,
        rgba(8, 47, 73, 0.95) 78%,
        rgba(6, 40, 62, 1) 100%
    );
}

.landing-page .lp-deco-wave {
    position: absolute;
    left: 0;
    right: 0;
    height: 2rem;
    background-repeat: repeat-x;
    background-size: 200px 100%;
    opacity: 0.85;
    will-change: background-position;
    z-index: 2;
    pointer-events: none;
}

.landing-page .lp-deco-wave--back {
    bottom: calc(var(--lp-sea-surface) + 0.35rem);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 16' preserveAspectRatio='none'%3E%3Cpath fill='%2338bdf8' fill-opacity='0.55' d='M0 10 Q35 2 70 10 T140 10 L140 16 L0 16Z'/%3E%3C/svg%3E");
    animation: lp-wave-drift var(--lp-wave-cycle) linear infinite;
}

.landing-page .lp-deco-wave--front {
    bottom: var(--lp-sea-surface);
    height: 2.2rem;
    opacity: 0.95;
    background-size: 160px 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 18' preserveAspectRatio='none'%3E%3Cpath fill='%237dd3fc' fill-opacity='0.65' d='M0 11 Q27 3 55 11 T110 11 L110 18 L0 18Z'/%3E%3C/svg%3E");
    animation: lp-wave-drift calc(var(--lp-wave-cycle) * 0.75) linear infinite reverse;
}

@keyframes lp-wave-drift {
    from {
        background-position-x: 0;
    }
    to {
        background-position-x: 280px;
    }
}

.landing-page .lp-deco-ship-track {
    position: absolute;
    inset: 0;
    overflow: visible;
    z-index: 4;
    pointer-events: none;
}

/* Chỉ trượt ngang; đáy khớp mặt nước (trên sóng, không chìm xuống lớp nước đậm) */
.landing-page .lp-deco-ship-unit {
    position: absolute;
    left: 0;
    bottom: var(--lp-sea-surface);
    display: flex;
    align-items: flex-end;
    height: 10.75rem;
    transform: translate3d(-32vw, 0, 0);
    will-change: transform;
    animation: lp-ship-cross-x var(--lp-ship-cycle) linear -19s infinite;
}

.landing-page .lp-deco-ship-img {
    display: block;
    height: 10.75rem;
    width: auto;
    max-width: min(90rem, 96vw);
    object-fit: contain;
    object-position: bottom center;
    mix-blend-mode: screen;
    filter: drop-shadow(0 3px 8px rgba(0, 20, 40, 0.5));
}

@keyframes lp-ship-cross-x {
    0% {
        transform: translate3d(-35vw, 0, 0);
    }
    100% {
        transform: translate3d(120vw, 0, 0);
    }
}

@media (max-width: 640px) {
    :root {
        --lp-sea-surface: 4.25rem;
    }

    .landing-page .lp-deco--plane {
        height: 11rem;
    }

    .landing-page .lp-deco-plane-img {
        height: 10.5rem;
        max-width: 96vw;
    }

    .landing-page .lp-deco-plane-smoke--1 {
        width: 2rem;
        height: 2rem;
    }

    .landing-page .lp-deco-plane-smoke--2 {
        width: 2.5rem;
        height: 2.5rem;
    }

    .landing-page .lp-deco-plane-smoke--3 {
        width: 3rem;
        height: 3rem;
    }

    .landing-page .lp-deco--sea {
        height: 10rem;
    }

    .landing-page .lp-deco-ship-unit {
        height: 8.5rem;
    }

    .landing-page .lp-deco-ship-img {
        height: 8.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-page .lp-deco-plane-unit,
    .landing-page .lp-deco-plane-smoke,
    .landing-page .lp-deco-wave,
    .landing-page .lp-deco-ship-unit {
        animation: none !important;
    }

    .landing-page .lp-deco-plane-unit {
        transform: translate3d(42vw, -50%, 0);
    }

    .landing-page .lp-deco-ship-unit {
        transform: translate3d(38vw, 0, 0);
    }

    .landing-page .lp-deco-wave--back,
    .landing-page .lp-deco-wave--front {
        animation: none !important;
    }
}
