/* ============================================
   PT. Marutek Jaya Nusantara — Custom Styles
   Futuristic Industrial Theme
   ============================================ */

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A1628; }
::-webkit-scrollbar-thumb { background: #F59E0B; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #D97706; }

/* --- Base --- */
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: #0A1628;
    color: #E2E8F0;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* --- Parallax --- */
.parallax-hero {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
}
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,22,40,0.92) 0%, rgba(15,29,50,0.85) 50%, rgba(10,22,40,0.75) 100%);
    z-index: 1;
}

/* --- Particle Grid Background --- */
.particle-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}
.particle-grid::before {
    content: '';
    position: absolute;
    inset: -50%;
    background-image:
        radial-gradient(circle, rgba(245,158,11,0.15) 1px, transparent 1px),
        radial-gradient(circle, rgba(59,130,246,0.08) 1px, transparent 1px);
    background-size: 60px 60px, 90px 90px;
    background-position: 0 0, 30px 30px;
    animation: particleFloat 20s linear infinite;
}
@keyframes particleFloat {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* --- Glassmorphism --- */
.glass {
    background: rgba(26, 42, 74, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 158, 11, 0.1);
}
.glass-dark {
    background: rgba(10, 22, 40, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-card {
    background: rgba(26, 42, 74, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    background: rgba(26, 42, 74, 0.5);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.1), 0 0 40px rgba(245, 158, 11, 0.05);
}

/* --- Glowing Borders --- */
.glow-border {
    position: relative;
    overflow: hidden;
}
.glow-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, #F59E0B, transparent, #3B82F6, transparent);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: glowRotate 4s linear infinite;
}
.glow-border:hover::after {
    opacity: 1;
}
@keyframes glowRotate {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* --- Stagger delay for children --- */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* --- Section Divider --- */
.section-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, #F59E0B, #3B82F6, transparent);
    margin: 0 auto;
    max-width: 200px;
}
.section-divider-wide {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245,158,11,0.3), transparent);
}

/* --- Amber Glow Button --- */
.btn-glow {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #0A1628;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 14px 36px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}
.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4), 0 0 60px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}
.btn-glow:hover::before {
    transform: translateX(100%);
}

.btn-outline {
    border: 2px solid #F59E0B;
    color: #F59E0B;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 12px 32px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    background: transparent;
}
.btn-outline:hover {
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

/* --- Navbar --- */
.nav-main {
    transition: all 0.3s ease;
}
.nav-main.scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.nav-link {
    position: relative;
    color: #E2E8F0;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #F59E0B;
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active {
    color: #F59E0B;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* --- Dropdown --- */
.nav-dropdown {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}
.nav-dropdown > div {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.nav-item:hover .nav-dropdown > div {
    transform: translateY(0);
}

/* --- Futuristic: Scanline Effect --- */
.scanline-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(245, 158, 11, 0.015) 2px,
        rgba(245, 158, 11, 0.015) 4px
    );
}

/* --- Futuristic: Neon Pulse --- */
@keyframes neonPulse {
    0%, 100% { text-shadow: 0 0 5px rgba(245,158,11,0.5), 0 0 20px rgba(245,158,11,0.2); }
    50% { text-shadow: 0 0 15px rgba(245,158,11,0.8), 0 0 40px rgba(245,158,11,0.3), 0 0 60px rgba(245,158,11,0.1); }
}
.neon-text {
    animation: neonPulse 3s ease-in-out infinite;
}

/* --- Futuristic: Tech Corner Decorations --- */
.tech-corners {
    position: relative;
}
.tech-corners::before,
.tech-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(245, 158, 11, 0.4);
    border-style: solid;
    pointer-events: none;
}
.tech-corners::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}
.tech-corners::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* --- Futuristic: Data Stream --- */
@keyframes dataStream {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}
.data-stream {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(245,158,11,0.3), transparent);
    background-size: 1px 200%;
    animation: dataStream 3s linear infinite;
}

/* --- Futuristic: HUD Border --- */
.hud-border {
    border: 1px solid rgba(245, 158, 11, 0.15);
    position: relative;
}
.hud-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #F59E0B, transparent);
}

/* --- Futuristic: Glitch Text --- */
@keyframes glitchClip {
    0%   { clip-path: inset(40% 0 61% 0); }
    20%  { clip-path: inset(92% 0 1% 0); }
    40%  { clip-path: inset(43% 0 1% 0); }
    60%  { clip-path: inset(25% 0 58% 0); }
    80%  { clip-path: inset(54% 0 7% 0); }
    100% { clip-path: inset(58% 0 43% 0); }
}

/* --- Enhanced Card Hover --- */
.glass-card:hover {
    background: rgba(26, 42, 74, 0.5);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-6px);
    box-shadow: 
        0 20px 60px rgba(245, 158, 11, 0.1), 
        0 0 40px rgba(245, 158, 11, 0.05),
        inset 0 1px 0 rgba(245, 158, 11, 0.1);
}

/* --- Hero Typing Effect --- */
.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: #F59E0B;
    margin-left: 4px;
    animation: blink 0.7s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* --- Counter --- */
.counter-value {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1;
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Image Card / Gallery --- */
.img-card {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}
.img-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.img-card:hover img {
    transform: scale(1.08);
}
.img-card .img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,22,40,0.85) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.img-card:hover .img-overlay {
    opacity: 1;
}

/* --- Lightbox --- */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.lightbox-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-backdrop img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.2);
}

/* --- Logo Carousel --- */
@keyframes scrollLogos {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.logo-track {
    display: flex;
    gap: 4rem;
    animation: scrollLogos 30s linear infinite;
    width: max-content;
}
.logo-track:hover {
    animation-play-state: paused;
}

/* --- Mobile Menu --- */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(10, 22, 40, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.mobile-menu.open {
    transform: translateX(0);
}

/* --- Breadcrumb --- */
.breadcrumb-separator {
    color: #F59E0B;
    margin: 0 0.5rem;
}

/* --- Grid Decoration Lines --- */
.grid-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.grid-lines::before,
.grid-lines::after {
    content: '';
    position: absolute;
    background: rgba(245, 158, 11, 0.04);
}
.grid-lines::before {
    width: 1px;
    height: 100%;
    left: 25%;
    top: 0;
}
.grid-lines::after {
    width: 1px;
    height: 100%;
    right: 25%;
    top: 0;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
    min-height: 50vh;
    position: relative;
    display: flex;
    align-items: center;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,22,40,0.93) 0%, rgba(10,22,40,0.8) 100%);
}

/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
    .parallax-hero,
    .parallax-section,
    .page-hero {
        background-attachment: scroll;
    }
    .counter-value {
        font-size: 2.5rem;
    }
}
