/*
Theme Name: Huulic AI Canvas Theme
Theme URI: 
Author: Manus AI
Author URI: 
Description: A custom WordPress theme based on v21.html.
Version: 1.2
License: GNU General Public License v2 or later
Text Domain: huulic-theme
*/

/* --- CRITICAL SCROLL FIXES --- */
html { 
    /* 1. Reserve space for scrollbar to prevent Header Jump */
    scrollbar-gutter: stable; 
    
    /* 2. Smooth Scrolling */
    scroll-behavior: smooth;
}

/* 3. Prevent Double Scrollbars by forcing auto height */
html, body {
    height: auto !important;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    /* 4. Stop Horizontal Scrolling from animations */
    overflow-x: hidden; 
    width: 100%;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #FACC15; }

/* 3D Canvas Container */
#canvas-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: grab;
    touch-action: none; 
}
#canvas-container:active { cursor: grabbing; }

/* HERO SECTION STYLES */
.hero-wrapper {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px; 
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    z-index: 10;
    text-align: center;
    width: 100%;
    padding: 0 1rem;
    will-change: transform, opacity, filter;
    margin-bottom: 5vh; 
}

.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #FACC15;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none; 
    background: transparent; 
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #FACC15;
    cursor: pointer;
    margin-top: -5px; 
    border: 2px solid #fff;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #4B5563;
    border-radius: 2px;
}
input[type=range]:focus { outline: none; }

.stat-number { font-variant-numeric: tabular-nums; }

/* --- CREATIVE LOADER STYLES --- */
#loader-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    pointer-events: none;
}

.loader-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: #050505;
    z-index: 10;
    transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}

#panel-left { left: 0; border-right: 1px solid #1a1a1a; }
#panel-right { right: 0; border-left: 1px solid #1a1a1a; }

.loader-content {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loaded #panel-left { transform: translateX(-100%); }
.loaded #panel-right { transform: translateX(100%); }
.loaded .loader-content { opacity: 0; }

.loader-counter {
    font-size: 15vw; 
    line-height: 1;
    font-weight: 700;
    color: #FACC15;
    font-family: 'Space Grotesk', sans-serif;
    position: relative;
}
@media (min-width: 768px) { .loader-counter { font-size: 8rem; } }

.loader-counter::after {
    content: '%';
    font-size: 0.3em;
    position: absolute;
    top: 10%;
    right: -0.4em;
    color: #fff;
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
}
#mobile-menu.open { transform: translateX(0); }

/* Testimonial Marquee */
.testimonial-track {
    display: flex;
    gap: 2rem;
    width: max-content;
}
.testimonial-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 1rem;
    padding: 1.5rem;
    min-width: 300px;
    max-width: 400px;
    flex-shrink: 0;
}
.testimonial-card.large {
    min-width: 400px;
    padding: 2rem;
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}