/* ============================================================
   NEON HERO SNIPPET — Carousel with ThreeJS Tubes Background
   ============================================================ */

/* ---------- Container ---------- */
.s_neon_hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    overflow: hidden;
    background: #050510;
    color: white;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}

.s_neon_hero .nf-hero-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- ThreeJS Canvas ---------- */
.s_neon_hero .nf-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: auto;
    /* MUST be auto for mouse tracking & click color change */
    touch-action: none;
    mix-blend-mode: screen;
    display: block;
}

/* ---------- Background Image Slides ---------- */
.s_neon_hero .nf-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.s_neon_hero .nf-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    will-change: opacity;
}

.s_neon_hero .nf-slide.nf-slide-active {
    opacity: 1;
    /* Full opacity on the slide container */
}

.s_neon_hero .nf-slide .nf-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.35;
    /* Dimmed to not overpower the tubes. Single opacity source. */
    animation: s_neon_panZoom 20s linear infinite alternate;
}

/* Dark gradient for readability */
.s_neon_hero .nf-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(5, 5, 16, 0.5) 0%,
            rgba(5, 5, 16, 0.2) 30%,
            rgba(5, 5, 16, 0.15) 50%,
            rgba(5, 5, 16, 0.3) 70%,
            rgba(5, 5, 16, 0.6) 100%),
        radial-gradient(ellipse 60% 60% at 50% 50%, transparent 0%, rgba(5, 5, 16, 0.3) 100%);
    pointer-events: none;
}

/* ---------- Content Overlay ---------- */
.s_neon_hero .nf-content {
    position: relative;
    z-index: 3;
    pointer-events: none;
    /* Let clicks pass through to canvas */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

/* Make interactive elements clickable */
.s_neon_hero .nf-content .nf-badge,
.s_neon_hero .nf-content .nf-cta {
    pointer-events: auto;
}

/* ---------- Badge ---------- */
.s_neon_hero .nf-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 18px;
    margin-bottom: 1.5rem;
}

.s_neon_hero .nf-badge-text {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.45);
}

.s_neon_hero .nf-badge-icon {
    font-size: 0.5rem;
    color: #4ade80;
}

/* ---------- Title Wrap (the H1) ---------- */
.s_neon_hero .nf-title-wrap {
    position: relative;
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    /* Add spacing between title and tagline */
    overflow: visible;
    width: 100%;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: #fff !important;
    user-select: none;
}

/* ---------- Character Reveal Animation ---------- */
.s_neon_hero .nf-reveal-char {
    position: relative !important;
    display: inline-block !important;
    overflow: hidden;
    vertical-align: top;
    line-height: 1.1;
}

.s_neon_hero .nf-reveal-char .nfr-main {
    display: inline-block !important;
    opacity: 0;
    filter: blur(12px);
}

.s_neon_hero .nf-title-wrap.nf-title-active .nf-reveal-char .nfr-main {
    animation: s_neon_shutterBlur 0.7s ease-out forwards;
}

/* Decorative slices (stacked under main for reveal effect) */
.s_neon_hero .nf-reveal-char .nfr-slice {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
}

/* Slice 1 — Blue */
.s_neon_hero .nf-title-wrap.nf-title-active .nf-reveal-char .nfr-s1 {
    animation: s_neon_sliceLeft 0.55s ease-in-out forwards;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    color: #60a5fa;
}

/* Slice 2 — White/translucent */
.s_neon_hero .nf-title-wrap.nf-title-active .nf-reveal-char .nfr-s2 {
    animation: s_neon_sliceRight 0.55s 0.06s ease-in-out forwards;
    clip-path: polygon(0 33%, 100% 33%, 100% 66%, 0 66%);
    color: rgba(255, 255, 255, 0.5);
}

/* Slice 3 — Purple */
.s_neon_hero .nf-title-wrap.nf-title-active .nf-reveal-char .nfr-s3 {
    animation: s_neon_sliceLeft 0.55s 0.12s ease-in-out forwards;
    clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
    color: #a78bfa;
}

/* ---------- Tagline ---------- */
.s_neon_hero .nf-tagline {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 auto 2rem auto;
    transition: opacity 0.4s ease;
    user-select: none;
    max-width: 80%;
    text-align: center;
}

/* ---------- CTA Button ---------- */
.s_neon_hero .nf-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #fff !important;
    padding: 14px 36px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.s_neon_hero .nf-cta:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
    color: #fff !important;
    box-shadow: 0 4px 40px rgba(255, 255, 255, 0.06);
}

.s_neon_hero .nf-cta:active {
    transform: scale(0.97);
}

.s_neon_hero .nf-cta .fa {
    transition: transform 0.2s;
}

.s_neon_hero .nf-cta:hover .fa {
    transform: translateX(3px);
}

/* ---------- Progress Dots ---------- */
.s_neon_hero .nf-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
}

.s_neon_hero .nf-progress-dots {
    display: flex;
    gap: 15px;
}

.s_neon_hero .nf-dot {
    position: relative;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.3s;
    pointer-events: auto;
}

.s_neon_hero .nf-dot .nf-dot-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

.s_neon_hero .nf-dot.nf-dot-active {
    background: rgba(255, 255, 255, 0.1);
}

.s_neon_hero .nf-dot.nf-dot-active .nf-dot-fill {
    animation: s_neon_dotProgress 10s linear forwards;
}

/* ---------- Keyframes ---------- */
@keyframes s_neon_panZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

@keyframes s_neon_shutterBlur {
    from {
        opacity: 0;
        filter: blur(12px);
    }

    to {
        opacity: 1;
        filter: blur(0px);
    }
}

@keyframes s_neon_sliceLeft {
    0% {
        transform: translateX(-110%);
        opacity: 0;
    }

    35% {
        opacity: 1;
    }

    100% {
        transform: translateX(110%);
        opacity: 0;
    }
}

@keyframes s_neon_sliceRight {
    0% {
        transform: translateX(110%);
        opacity: 0;
    }

    35% {
        opacity: 1;
    }

    100% {
        transform: translateX(-110%);
        opacity: 0;
    }
}

@keyframes s_neon_dotProgress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* ---------- Scroll Down Arrow ---------- */
.s_neon_hero .nf-scroll-down {
    position: absolute;
    bottom: 25px;
    /* Moved up to ensure visibility above mobile browser chrome */
    bottom: max(25px, env(safe-area-inset-bottom));
    /* Support for modern notches/home bars */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: auto;
}

.s_neon_hero .nf-scroll-down a {
    transition: opacity 0.3s ease;
}

.s_neon_hero .nf-scroll-down a:hover {
    opacity: 1 !important;
}

@keyframes s_neon_bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

.s_neon_hero .animated-bounce {
    animation: s_neon_bounce 2s infinite;
    display: inline-block;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .s_neon_hero .nf-title-wrap {
        font-size: clamp(2rem, 6vw, 2.8rem);
        min-height: auto;
        line-height: 1.15;
    }

    .s_neon_hero .nf-tagline {
        font-size: 0.95rem;
        max-width: 95vw;
    }

    .s_neon_hero .nf-badge {
        padding: 5px 14px;
        margin-bottom: 1rem;
    }

    .s_neon_hero .nf-content {
        padding: 1.5rem;
    }

    .s_neon_hero .nf-controls {
        bottom: 85px;
        /* Shifted significantly higher to clear the scroll arrow */
    }

    .s_neon_hero .nf-dot {
        width: 25px;
        height: 3px;
    }
}

@media (max-width: 575.98px) {
    .s_neon_hero .nf-title-wrap {
        font-size: clamp(1.4rem, 8vw, 2rem);
        word-break: break-word;
        /* Ensure massive words don't cut off */
    }

    .s_neon_hero .nf-dot {
        width: 16px;
        /* Much smaller dots for mobile */
        height: 3px;
    }

    .s_neon_hero .nf-progress-dots {
        gap: 8px;
        /* Tighter gap */
    }

    .s_neon_hero .nf-cta {
        padding: 12px 28px;
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .s_neon_hero .nf-title-wrap {
        white-space: nowrap;
    }
}

@media (max-height: 500px) {
    .s_neon_hero .nf-content {
        padding: 0.5rem;
    }

    .s_neon_hero .nf-badge {
        margin-bottom: 0.5rem;
    }

    .s_neon_hero .nf-title-wrap {
        font-size: 1.8rem;
        min-height: 2.5rem;
    }

    .s_neon_hero .nf-tagline {
        margin-bottom: 0.75rem;
        font-size: 0.75rem;
    }

    .s_neon_hero .nf-scroll-down {
        bottom: 15px;
        /* Keeps arrow visible on very short screens */
    }

    .s_neon_hero .nf-controls {
        bottom: 50px;
        /* Compress the distance between dots and arrow */
    }
}