/* 
    Custom Stylesheet for Pedang Pora lp2
    Mostly handled by Tailwind CSS, this file contains specific micro-animations 
    and custom component styling that are better kept separate.
*/

:root {
    --gold: #D6A863;
    --fi-accent: var(--gold);
    --fi-duration: 5s;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar for a premium feel */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FDFBF7; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C29148; }

/* Details Accordion */
details { transition: all 0.3s ease; }
details > summary::-webkit-details-marker { display: none; }
details[open] { border-color: rgba(214, 168, 99, 0.5); box-shadow: 0 4px 15px rgba(214, 168, 99, 0.05); }

/* ============================================
   Feature Item Slider
   ============================================ */
.fi {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fi .fi-icon    { color: #9ca3af; transition: color 0.3s; }
.fi .fi-title   { color: #6b7280; transition: color 0.3s; } /* High contrast gray on white background for readability */
.fi .fi-desc    { color: #9ca3af; transition: color 0.3s; } /* Clear readable description gray when inactive */
.fi .fi-bar     { width: 0%; transition: none; }

/* Active state — toggled via JS (White card with glowing premium gold borders) */
.fi.is-active {
    border-color: rgba(214, 168, 99, 0.45) !important; /* border-gold/45 */
    box-shadow: 0 10px 30px -10px rgba(214, 168, 99, 0.15), 0 4px 12px -5px rgba(214, 168, 99, 0.1) !important;
}
.fi.is-active .fi-icon  { color: var(--fi-accent); }
.fi.is-active .fi-title { color: #0A0A0A; }
.fi.is-active .fi-desc  { color: #4b5563; } /* High contrast active description */

/* Progress bar grows from 0 → 100% over fi-duration */
@keyframes fi-progress {
    from { width: 0%; }
    to   { width: 100%; }
}
.fi.is-active .fi-bar {
    animation: fi-progress var(--fi-duration) linear forwards;
}

/* iframe wrapper no scrollbar */
.preview-iframe-wrapper { scrollbar-width: none; }
.preview-iframe-wrapper::-webkit-scrollbar { display: none; }

/* Dotted background pattern */
.bg-dots {
    background-image: radial-gradient(#dcdad5 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}

/* Mockup simulator fades */
.preview-panel {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}
.preview-panel.is-active-panel {
    opacity: 1;
}

/* Premium modal entry animations */
@keyframes modal-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-modal-in {
    animation: modal-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Scroll Reveal Animation Engine (GPU-Optimized & Ultra-Smooth)
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform; /* Hardware Acceleration */
}

/* Variasi arah transisi */
.scroll-reveal.reveal-left {
    transform: translateX(-40px);
}

.scroll-reveal.reveal-right {
    transform: translateX(40px);
}

.scroll-reveal.reveal-zoom {
    transform: scale(0.94) translateY(15px);
}

/* Status aktif ketika masuk viewport */
.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* Staggered Delay */
.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }
.delay-4 { transition-delay: 320ms; }
.delay-5 { transition-delay: 400ms; }
.delay-6 { transition-delay: 480ms; }
.delay-7 { transition-delay: 560ms; }
.delay-8 { transition-delay: 640ms; }

/* Preview Loading Spinner Overlay */
.preview-iframe-loader.loading {
    display: flex !important;
}

/* ==========================================================================
   Header Navbar Premium & Sticky Effect (lp2)
   ========================================================================== */

/* Scroll background transition */
.navbar.scrolled {
    background: rgba(10, 10, 10, 0.82) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(214, 168, 99, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Animasi Hamburger Toggle */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 2px;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* WhatsApp Mobile (Tanpa Outline, Tanpa Underline, Polos) */
.btn-wa-mobile {
    color: var(--gold) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto;
    height: auto;
}
.btn-wa-mobile:hover {
    color: #fff !important;
    transform: scale(1.1);
}

/* Mobile responsive menu */
@media (max-width: 1023px) {
    /* Navbar background di mobile agar melayang premium */
    .navbar {
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(214, 168, 99, 0.15);
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }

    .nav-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .nav-toggle {
        margin: 0 !important;
        outline: none !important;
    }
    
    .nav-links {
        display: none; /* Sembunyikan default */
    }
    
    /* Active menu dropdown drawer */
    .nav-links.active {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(214, 168, 99, 0.2);
        flex-direction: column;
        align-items: flex-start; /* Rata Kiri */
        padding: 25px 20px;
        gap: 12px;
        z-index: 999;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active a {
        font-size: 15px;
        font-weight: 500;
        color: #EFEFEF;
        width: 100%;
        text-align: left; /* Rata Kiri */
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: block;
    }
    
    /* Sembunyikan tombol Konsultasi WA di mobile dropdown */
    .nav-links.active .btn-wa {
        display: none !important;
    }

    header#beranda {
        padding-top: 120px !important;
    }
}

