/* =====================================================
   NEPLEN — Arooth-Inspired Warm Aesthetic
   Warm cream backgrounds, clean animations, refined feel
   ===================================================== */

/* ===== GLOBAL BODY STATES ===== */
body.is-loading {
    overflow: hidden;
}

::selection {
    background: rgba(43, 0, 212, 0.2);
    color: #fff;
}

/* ===== SECTION GLOW — ambient gradient ===== */
body {
    --section-glow-color: transparent;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 100%, var(--section-glow-color), transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: background 1s ease;
    opacity: 0.5;
}

/* ===== CUSTOM CURSOR ===== */
.cursor-wrap {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #1a1a2e;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(26, 26, 46, 0.35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                border-color 0.3s,
                background 0.3s;
}

.cursor-label {
    position: fixed;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #1a1a2e;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

/* Cursor states */
.cursor-wrap.link .cursor-dot {
    width: 10px;
    height: 10px;
    background: #6C4FFF;
}

.cursor-wrap.link .cursor-ring {
    width: 50px;
    height: 50px;
    border-color: rgba(108, 79, 255, 0.4);
}

.cursor-wrap.hover .cursor-ring {
    width: 100px;
    height: 100px;
    background: rgba(43, 0, 212, 0.1);
    border-color: rgba(108, 79, 255, 0.4);
}

.cursor-wrap.hover .cursor-dot {
    width: 0;
    height: 0;
}

.cursor-wrap.hover .cursor-label {
    opacity: 1;
}

@media (hover: none), (pointer: coarse) {
    .cursor-wrap {
        display: none !important;
    }
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* Hide noise overlay on mobile for better performance */
@media (max-width: 768px) {
    .noise-overlay { display: none; }
}

/* ===== HERO ORBS (warm gradient tones) ===== */
.hero-orb-1 { background: radial-gradient(circle, rgba(43, 0, 212, 0.08) 0%, transparent 70%); }
.hero-orb-2 { background: radial-gradient(circle, rgba(108, 79, 255, 0.06) 0%, transparent 70%); }

/* ===== HERO BANNER ===== */
.hero-banner-inner {
    overflow: hidden;
    border-radius: inherit;
}

.hero-banner-reveal {
    will-change: transform;
}

.hero-banner-inner img {
    will-change: transform;
    transition: filter 0.6s ease;
}

/* ===== HEADER STATES (warm cream glass) ===== */
#header.scrolled {
    background: rgba(245, 240, 235, 0.92);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 12px;
    padding-bottom: 12px;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
}

#header.scrolled .py-5 {
    padding-top: 0;
    padding-bottom: 0;
}

#header.hidden {
    transform: translateY(-100%);
}

/* ===== MOBILE MENU ===== */
#fullscreenMenu.active {
    visibility: visible;
    pointer-events: auto;
}

#fullscreenMenu.active .menu-bg {
    opacity: 1;
}

#fullscreenMenu.active .fullscreen-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#fullscreenMenu.active .fullscreen-link:nth-child(1) { transition-delay: 0.1s; }
#fullscreenMenu.active .fullscreen-link:nth-child(2) { transition-delay: 0.2s; }
#fullscreenMenu.active .fullscreen-link:nth-child(3) { transition-delay: 0.3s; }
#fullscreenMenu.active .fullscreen-link:nth-child(4) { transition-delay: 0.4s; }
#fullscreenMenu.active .fullscreen-link:nth-child(5) { transition-delay: 0.5s; }

#fullscreenMenu.active .menu-footer {
    opacity: 1;
}

/* Menu toggle animation */
#menuToggle.active .menu-lines span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#menuToggle.active .menu-lines span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuToggle.active .menu-lines span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===== SCROLL PROGRESS ===== */
#scrollProgress.visible {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* ===== NAV ACTIVE STATE ===== */
.nav-link.active {
    color: #1a1a2e;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: #6C4FFF;
    border-radius: 50%;
    margin: 4px auto 0;
}

/* ===== FAQ ACCORDION ===== */
.faq-item .faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.active .faq-content {
    max-height: 200px;
}

.faq-item.active .faq-icon {
    background: #2B00D4;
    border-color: #2B00D4;
    transform: rotate(45deg);
}

.faq-item.active .faq-icon svg {
    color: #fff;
}

.faq-item.active .faq-trigger span:nth-child(2) {
    color: #2B00D4;
}

/* ===== SERVICE ITEM TOP BORDER ===== */
.service-item:first-child::before {
    content: '';
    display: block;
    height: 1px;
    background: rgba(0,0,0,0.06);
}

/* ===== WILL-CHANGE HINTS FOR GSAP ===== */
.hero-title-line {
    will-change: transform;
}

.marquee-section {
    will-change: transform;
}

.cta-line {
    will-change: transform, opacity;
}

/* ===== SMOOTH SCROLLBAR ===== */
html {
    scroll-behavior: auto;
    overflow-x: hidden;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== WORK ITEM HOVER OVERLAY ===== */
.work-item .relative::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.work-item:hover .relative::after {
    opacity: 1;
}

/* ===== TESTIMONIAL DRAG SCROLL ===== */
.testimonials-track {
    cursor: grab;
    user-select: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.testimonials-track::-webkit-scrollbar {
    display: none;
}

.testimonials-track:active {
    cursor: grabbing;
}

/* ===== HORIZONTAL SCROLL WORK SECTION ===== */
.work-horizontal-track {
    display: flex;
    gap: 2rem;
    padding-right: 15vw;
    will-change: transform;
}

.work-horizontal-track .work-item {
    flex-shrink: 0;
    width: clamp(320px, 40vw, 560px);
}

.work-horizontal-track .work-item .work-img-wrap {
    overflow: hidden;
    border-radius: 1rem;
}

.work-horizontal-track .work-item img {
    will-change: transform;
    transition: filter 0.6s ease;
}

.work-horizontal-track .work-item:hover img {
    filter: brightness(1.05) contrast(1.05);
}

/* Work item info overlay */
.work-horizontal-track .work-item .work-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.85), transparent);
    border-radius: 0 0 1rem 1rem;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 2;
}

.work-horizontal-track .work-item:hover .work-item-info {
    transform: translateY(0);
    opacity: 1;
}

/* ===== SPLIT CHARACTER ANIMATION ===== */
.split-char {
    display: inline-block;
    will-change: transform, opacity;
}

.split-word {
    display: inline-block;
    will-change: transform, opacity;
}

/* ===== SECTION SCALE REVEAL ===== */
[data-scale-reveal] {
    will-change: transform, opacity;
    overflow: hidden;
}

/* ===== PARALLAX DEPTH ===== */
[data-parallax] {
    will-change: transform;
}

/* ===== REVEAL ELEMENTS ===== */
[data-reveal] {
    will-change: transform, opacity;
}

/* ===== MARQUEE BAND ===== */
.marquee-band {
    will-change: transform;
    overflow: hidden;
}

.marquee-band-track {
    display: flex;
    width: max-content;
    animation: marquee-band 25s linear infinite;
}

.marquee-band-track.reverse {
    animation-direction: reverse;
}

@keyframes marquee-band {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== LOGO CAROUSEL ===== */
.logo-carousel-wrap {
    position: relative;
    overflow: hidden;
}

.logo-carousel {
    animation: logo-scroll 30s linear infinite;
}

.logo-carousel:hover {
    animation-play-state: paused;
}

.logo-carousel-fade-left,
.logo-carousel-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel-fade-left {
    left: 0;
    background: linear-gradient(to right, #F5F0EB, transparent);
}

.logo-carousel-fade-right {
    right: 0;
    background: linear-gradient(to left, #F5F0EB, transparent);
}

@keyframes logo-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== RESPONSIVE ===== */

/* Mobile-first touch improvements */
@media (max-width: 480px) {
    /* Very small phones */
    .hero-banner {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
        border-radius: 1rem;
    }

    .hero-banner-inner img {
        height: 30vh;
        min-height: 200px;
    }

    /* Service items - simplify grid on tiny screens */
    .service-item .grid {
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
    }

    /* CTA background text - reduce on mobile */
    .cta-bg-text {
        display: none;
    }

    /* Services background text - reduce on mobile */
    .services-bg-text {
        display: none;
    }

    /* Testimonials track gap */
    .testimonials-track {
        gap: 0.75rem;
    }

    /* Work item info padding */
    .work-horizontal-track .work-item .work-item-info {
        padding: 1.25rem;
    }

    /* FAQ content padding on tiny screens */
    .faq-item .faq-content .pb-6 {
        padding-left: 2.5rem;
    }
}

@media (max-width: 767px) {
    .hero-scroll-indicator {
        display: none !important;
    }

    .work-horizontal-track {
        gap: 1rem;
        padding-right: 20vw;
    }

    .work-horizontal-track .work-item {
        width: 75vw;
    }

    /* Marquee band - reduce size on mobile */
    .marquee-band-track span {
        font-size: clamp(28px, 7vw, 84px);
    }

    /* Improve touch targets */
    .faq-trigger {
        min-height: 56px;
    }

    /* Testimonial drag scroll - better touch */
    .testimonials-track {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .testimonial-card {
        scroll-snap-align: start;
    }
}

@media (max-width: 1024px) {
    .hero-visual-col {
        display: none;
    }

    .work-horizontal-track .work-item {
        width: clamp(280px, 75vw, 450px);
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 5rem;
        padding-bottom: 2rem;
    }

    .hero-banner-inner img {
        height: 40vh;
    }

    #fullscreenMenu .fullscreen-link span:last-child {
        font-size: 2rem;
    }

    #fullscreenMenu nav {
        margin-bottom: 2rem;
    }
}

/* ===== PARTICLES.JS ===== */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(ellipse 60% 50% at 70% 30%, rgba(108, 79, 255, 0.06), transparent 60%),
        radial-gradient(ellipse 50% 60% at 20% 70%, rgba(43, 0, 212, 0.04), transparent 50%);
}

#particles-js canvas {
    display: block;
    pointer-events: none;
}

/* ===== ROTATING WORD ===== */
#rotating-word-wrapper {
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    vertical-align: baseline;
    position: relative;
}

#rotating-word {
    display: inline-block;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.55s cubic-bezier(0.25, 1, 0.5, 1),
                filter 0.55s cubic-bezier(0.25, 1, 0.5, 1),
                letter-spacing 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
    letter-spacing: normal;
    background: linear-gradient(135deg, #2B00D4 0%, #6C4FFF 50%, #818CF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#rotating-word.rotating-word-out {
    transform: translateY(-115%) scale(0.95);
    opacity: 0;
    filter: blur(8px);
    letter-spacing: -0.03em;
}

#rotating-word.rotating-word-in {
    animation: rotatingWordIn 0.55s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes rotatingWordIn {
    0% {
        transform: translateY(115%) scale(0.95);
        opacity: 0;
        filter: blur(8px);
        letter-spacing: 0.05em;
    }
    60% {
        filter: blur(1px);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
        letter-spacing: normal;
    }
}
