/* Hiệu ứng Menu Overlay */
.menu-overlay {
    opacity: 0;
    pointer-events: none;
    transition: all 0.7s cubic-bezier(0.85, 0, 0.15, 1);
    clip-path: circle(0% at 90% 10%);
    /* Hiệu ứng mở rộng từ góc nút */
    background: #020617;
    /* Slate 950 */
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
    clip-path: circle(150% at 90% 10%);
}

/* Typography lạ mắt cho Menu */
.menu-link {
    font-size: 7vw;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    color: transparent;
    transition: all 0.4s ease;
    display: inline-block;
}

.menu-link:hover {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 1);
    color: white;
    transform: translateX(20px);
}

/* Nền lưới kỹ thuật chuyển động */
.menu-grid {
    background-size: 80px 80px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    animation: grid-slide 30s linear infinite;
}

@keyframes grid-slide {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(80px);
    }
}

/* Hiệu ứng dải Brand chạy ngang */
.marquee-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100vw;
    overflow: hidden;
    white-space: nowrap;
    z-index: 5;
    /* Nằm dưới menu link nhưng trên Grid */
    pointer-events: none;
    opacity: 0.1;
    /* Làm mờ để tạo chiều sâu */
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-size: 15vw;
    font-weight: 900;
    text-transform: uppercase;
    -webkit-text-stroke: 2px white;
    color: transparent;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Thêm hiệu ứng Grain (nhiễu hạt) để giao diện trông điện ảnh hơn */
.menu-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.animate-scan {
    position: absolute;
    animation: scan 3s linear infinite;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.marquee-group {
    position: absolute;
    width: 100%;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.marquee-line {
    display: flex;
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

/* Dải 1 chạy qua trái */
.marquee-1 {
    animation: marquee-left 40s linear infinite;
}

/* Dải 2 chạy qua phải */
.marquee-2 {
    animation: marquee-right 40s linear infinite;
}

.marquee-item {
    font-size: 15vw;
    font-weight: 900;
    text-transform: uppercase;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.04);
    color: transparent;
    padding-right: 100px;
    transition: -webkit-text-stroke 0.5s;
}

/* Hiệu ứng tương tác: Khi di chuột vào Main, dải chữ hiện rõ hơn một chút */
main:hover .marquee-item {
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.08);
}

/* Hiệu ứng bàn tay chỉ vào nhẹ nhàng */
.hand-icon {
    animation: point-hit 1.5s infinite ease-in-out;
}

@keyframes point-hit {

    0%,
    100% {
        transform: translateX(0) scale(1);
    }

    50% {
        transform: translateX(5px) scale(1.1);
    }
}

/* Hiệu ứng thanh bar cam co giãn (như một mũi tên đang chỉ) */
.bar-bounce {
    animation: bar-expand 2s infinite ease-in-out;
}

@keyframes bar-expand {

    0%,
    100% {
        width: 1.25rem;
        opacity: 1;
    }

    /* 20px (w-5) */
    50% {
        width: 2rem;
        opacity: 0.6;
    }

    /* 32px (w-8) */
}

/* Hiệu ứng lướt qua các link menu */
.menu-link {
    position: relative;
    display: inline-block;
}

.menu-link::after {
    content: ' ➔';
    /* Mũi tên xuất hiện khi hover vào link */
    font-family: serif;
    font-size: 0.5em;
    opacity: 0;
    margin-left: -20px;
    transition: all 0.4s ease;
}

.menu-link:hover::after {
    opacity: 1;
    margin-left: 20px;
}