/* ========================================================
   LANDING PAGE STYLES - ENGSPACE FRONTEND
   Modern, Clean, Responsive, Dark-Mode Aware & 1:1 Parity
   Ultra-Fast, Low-Memory & Low-End Device Optimized
   ======================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #10b981;
}

[x-cloak] {
    display: none !important;
}

html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

body.overflow-hidden,
html:has(body.overflow-hidden) {
    overflow: hidden !important;
}

html {
    overflow-y: auto;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Glassmorphism Effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass-panel {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Card Transitions & Hover Effects */
.card-hover-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.card-hover-lift:hover {
    transform: translateY(-4px);
}

/* Ambient Glow Blobs */
@keyframes floatBlob {
    0%, 100% {
        transform: translate(0px, 0px) scale(1);
    }
    50% {
        transform: translate(15px, -20px) scale(1.05);
    }
}

.animate-blob {
    animation: floatBlob 8s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Smooth Hardware-Accelerated Drawer Slide Animation */
.drawer-slide-panel {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease !important;
    will-change: transform;
    transform: translate3d(-100%, 0, 0) !important;
}

.drawer-slide-panel.drawer-open {
    transform: translate3d(0, 0, 0) !important;
}

.drawer-fade-backdrop {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: opacity;
    opacity: 0 !important;
    pointer-events: none;
}

.drawer-fade-backdrop.backdrop-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-drawer-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-panel {
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.mobile-drawer-panel.active {
    transform: translate3d(0, 0, 0);
}

/* Modal Animations */
.modal-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.25s ease-out, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Complete Full-Resolution Fluid Typography System (Scales smoothly from 280px to 2560px+) */
.stat-hero-number {
    font-size: clamp(0.92rem, 0.75rem + 1.8vw, 4.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-hero-unit {
    font-size: clamp(0.62rem, 0.5rem + 0.6vw, 1.6rem);
    font-weight: 700;
    line-height: 1;
}

.stat-hero-title {
    font-size: clamp(0.58rem, 0.48rem + 0.45vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.stat-hero-sub {
    font-size: clamp(0.58rem, 0.48rem + 0.45vw, 1.25rem);
    font-weight: 600;
    line-height: 1.2;
}

/* Anti-Clipping untuk Teks Gradient (Mencegah ekor huruf g, p, y, j, q terpotong) */
.bg-clip-text {
    padding-bottom: 0.18em;
    margin-bottom: -0.18em;
}

/* Animasi Transisi Konten Halaman Masuk */
@keyframes pageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-enter-active {
    animation: pageSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Indikator Loading Progress Bar */
#nav-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 99999;
    background: linear-gradient(90deg, #6366f1, #3b82f6, #10b981);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
    transition: width 0.25s ease-out, opacity 0.3s ease-in-out;
    pointer-events: none;
}

/* Line Clamp Utilities (Standard + Vendor Prefix) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================================
   LOW-END DEVICE & 60FPS SCROLL ACCELERATION (HP RAM 2GB)
   ======================================================== */



/* Aturan Khusus Layar Mobile & GPU Hemat Daya */
@media (max-width: 768px) {
    /* Matikan backdrop-filter blur berat yang bikin lag/stutter di GPU HP low-end tanpa merusak warna latar */
    .backdrop-blur-md,
    .backdrop-blur-sm,
    .backdrop-blur-xl {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .glass-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
    }

    .dark .glass-panel {
        background-color: rgba(15, 23, 42, 0.98) !important;
    }

    /* Reduksi blur blob ambient besar yang menguras memori GPU VRAM */
    .blur-3xl {
        filter: blur(16px) !important;
        opacity: 0.15 !important;
    }

    /* Matikan animasi looping tak terbatas yang membebani CPU background */
    .animate-blob {
        animation: none !important;
    }

    /* Transisi instan dan ringan */
    * {
        scroll-behavior: auto !important;
    }
}

/* Hemat Baterai & Preferensi Pengurangan Gerakan */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
   ANIMASI PERGESERAN SLIDE HALUS (MODE DESKTOP & SPA)
========================================================== */
@keyframes slideOutToLeft {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(-140px, 0, 0) scale(0.985);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translate3d(140px, 0, 0) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes slideOutToRight {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(140px, 0, 0) scale(0.985);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translate3d(-140px, 0, 0) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.anim-slide-out-left {
    animation: slideOutToLeft 0.20s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    pointer-events: none !important;
}

.anim-slide-in-right {
    animation: slideInFromRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.anim-slide-out-right {
    animation: slideOutToRight 0.20s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    pointer-events: none !important;
}

.anim-slide-in-left {
    animation: slideInFromLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
