/* --- Variabel & Reset --- */
:root {
    --bg-main: #050505;
    --bg-card: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #888888;
    --border-color: #1f1f1f;
    --accent-glow: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    /* Memberikan tekstur radial gradient agar background tidak polosan hitam */
    background-image: radial-gradient(circle at 50% 0%, #151515 0%, transparent 50%);
}

/* --- Navbar / Header --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid var(--border-color);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img-small {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)); /* Efek glow pada logo */
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

/* Hover Efek Kekinian di Navbar (Garis bawah muncul) */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-main);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }

/* --- Tombol --- */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animasi memantul 3D */
    cursor: pointer;
    display: inline-block;
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    background: var(--text-main);
    color: var(--bg-main);
    transform: translateY(-3px); /* Efek terangkat 3D */
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-main);
    border: 1px solid var(--text-main);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: #555;
    transform: translateY(-3px);
}

/* --- Hero Section (Centered) --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 80px;
    min-height: 80vh;
    position: relative;
}

/* Aksen cahaya putih besar di belakang hero */
.glow-effect {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content.centered {
    text-align: center;
    max-width: 800px;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 50px;
}

.trust-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 0.9rem;
    color: #666;
}

/* --- Projects Section --- */
.projects-section {
    padding: 100px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
}

/* --- Efek Hover Logo di Card (FIXED 16:9 & ANTI MELAR) --- */
.card-image-gallery { 
    position: relative; 
    width: 100%;
    aspect-ratio: 16 / 9; /* Wajib 16:9 agar elegan */
    background: #050505; 
    overflow: hidden; 
}

.cover-img { 
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ini mantra anti-gepeng */
    display: block;
    transition: filter 0.4s ease, transform 0.4s ease; 
}

/* Efek saat card di-hover, gambar map meredup & membesar dikit */
.project-card:hover .cover-img { 
    filter: brightness(0.3) blur(2px); 
    transform: scale(1.05); 
}

/* Posisi Logo Onblox */
.hover-logo {
    position: absolute; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    max-width: 90px; 
    opacity: 0; 
    z-index: 10; 
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.project-card:hover .hover-logo { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
}


/* --- Desain Popup Project Modal --- */
.project-modal-box {
    max-width: 900px !important; /* Diperlebar agar muat gambar dan teks */
    padding: 0 !important;
    overflow: hidden;
    background: var(--bg-main) !important;
}

.project-modal-content {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .project-modal-content { flex-direction: row; }
}

/* --- PERBAIKAN TOMBOL SILANG (X) BIAR TENGAH --- */
.close-project-modal {
    position: absolute; 
    top: 15px; 
    right: 15px; /* Jarak aman dari pojok */
    background: rgba(0,0,0,0.8); /* Gelapkan sedikit biar jelas */
    border: 1px solid #333; 
    color: white;
    font-size: 1.6rem; /* Ukuran silang X kita pas-kan */
    border-radius: 50%; /* Bulat sempurna */
    width: 40px; 
    height: 40px;
    cursor: pointer; 
    z-index: 100; /* Pastikan selalu di paling depan */
    transition: 0.3s;
    
    /* === RAHASIA AGAR X DI TENGAH: Pakai Flexbox === */
    display: flex; 
    align-items: center; /* Rata tengah secara vertikal */
    justify-content: center; /* Rata tengah secara horizontal */
}

.close-project-modal:hover { 
    background: #ff4444; 
    border-color: #ff4444;
}

/* Supaya badge di dalam modal tidak ditabrak oleh tombol X */
.project-info {
    flex: 1; 
    padding: 40px; 
    padding-top: 60px; /* Tambah jarak atas agar aman dari tombol X */
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

/* Area Kiri: Slider */
.project-slider {
    flex: 1.5; position: relative; background: #050505;
    min-height: 300px; display: flex; align-items: center; justify-content: center;
}
.project-slider img {
    width: 100%; height: 100%; object-fit: cover; position: absolute;
    animation: fadeIn 0.4s ease-in-out;
}

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.6); color: white; border: none;
    padding: 15px 20px; cursor: pointer; font-size: 1.5rem;
    transition: background 0.3s; z-index: 10;
}
.slider-btn:hover { background: var(--text-main); color: black; }
.slider-btn.left { left: 0; border-radius: 0 8px 8px 0; }
.slider-btn.right { right: 0; border-radius: 8px 0 0 8px; }

/* Area Kanan: Info */
.project-info {
    flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Quick Utilities Grid --- */
.quick-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.quick-tool-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-tool-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #555;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.tool-icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 15px;
    flex-shrink: 0;
}

.tool-info h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.tool-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* --- 3D Hover Cards Kekinian --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 60px; /* Ini yang memberi jarak antar section! */
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    /* Transisi mulus untuk efek 3D */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Efek saat card di-hover (Terangkat & Glow) */
.project-card:hover {
    transform: translateY(-12px) scale(1.02); /* Naik dan sedikit membesar */
    box-shadow: 0 25px 50px rgba(255, 255, 255, 0.05); /* Bayangan putih halus */
    border-color: #444; /* Border sedikit menyala */
}

/* Efek gambar di dalam card saat di-hover */
.project-card:hover .card-image {
    filter: brightness(1.2);
}

.card-image {
    height: 220px;
    position: relative;
    background-size: cover;
    background-position: center;
    transition: filter 0.4s ease;
}

/* --- Modal / Popup System --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); /* Efek kaca blur */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    padding: 25px;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.modal-header h3 { font-size: 1.3rem; color: var(--text-main); }

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover { color: #ff4444; }

/* Input & Result di dalam Modal */
.modal-input {
    width: 100%; padding: 12px; margin-bottom: 15px;
    background: #111; border: 1px solid #333;
    color: #fff; border-radius: 8px; outline: none;
    font-family: monospace; font-size: 1rem;
}
.modal-input:focus { border-color: var(--text-main); }

.result-box {
    margin-top: 15px; padding: 15px;
    background: rgba(255,255,255,0.05); border-radius: 8px;
    border-left: 3px solid #4ade80;
    word-break: break-all; font-family: monospace;
    display: none; /* Sembunyikan sebelum ada hasil */
}

/* Placeholder Warna Gradient Elegant */
.placeholder-img-1 { background: linear-gradient(135deg, #1a1a1a, #0d0d0d); }
.placeholder-img-2 { background: linear-gradient(135deg, #222, #050505); }
.placeholder-img-3 { background: linear-gradient(135deg, #111, #000); }

/* --- Warna Status Badge Dinamis --- */
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

/* Ini yang bikin warnanya menyala sesuai kategori */
.status-badge.s-completed { color: #4ade80; background: rgba(74, 222, 128, 0.15); border: 1px solid #4ade80; }
.status-badge.s-ongoing { color: #facc15; background: rgba(250, 204, 21, 0.15); border: 1px solid #facc15; }
.status-badge.s-concept { color: #60a5fa; background: rgba(96, 165, 250, 0.15); border: 1px solid #60a5fa; }

.card-content { padding: 30px; }
.card-content h3 { font-size: 1.5rem; margin-bottom: 12px; }
.card-content p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsif HP */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .hero-buttons { flex-direction: column; }
    .trust-stats { flex-direction: column; gap: 15px; }
    .nav-links { display: none; } /* Sembunyikan menu di HP sementara */
}