/* --- 1. VARIABLES & GLOBAL RESET --- */
:root {
    --primary-blue: #0284c7; 
    --primary-cyan: #06b6d4; 
    --primary-hover: #0ea5e9;
    --accent-glow: rgba(2, 132, 199, 0.5);
    --bg-dark: #050b14; 
    --bg-card: #0f172a; 
    --text-light: #ffffff;
    --text-gray: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.02em; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- 2. NAVBAR --- */
.navbar {
    height: 80px;
    background: rgba(5, 11, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky; top: 0; z-index: 1000;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo img { height: 32px; width: auto; display: block; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-gray); font-weight: 500; font-size: 0.95rem; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -4px; left: 0; background: var(--primary-blue); transition: 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.menu-toggle { display: none; font-size: 1.5rem; color: #fff; cursor: pointer; }

/* --- 3. COMPONENTS (BUTTONS & BADGES) --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; gap: 10px;
    transition: all 0.3s ease; width: 100%; text-align: center; font-size: 0.95rem;
}
.btn i { transition: transform 0.3s ease; }
.btn:hover i { transform: translateX(5px); }
.btn-primary { 
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2563eb 100%); 
    color: #fff; border: none; box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}
.btn-primary:hover { box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.btn-outline:hover { border-color: var(--primary-blue); color: var(--primary-blue); background: rgba(2, 132, 199, 0.05); transform: translateY(-2px); }

/* --- 4. HERO & HOME PAGE STYLES --- */
.hero {
    position: relative; padding: 140px 0 100px; text-align: center;
    overflow: hidden; min-height: 90vh; display: flex; align-items: center;
    background-color: var(--bg-dark); 
}
.hero::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('BG.png'); background-size: cover; background-position: center;
    z-index: 0; opacity: 0.4; animation: move-bg 25s ease-in-out infinite alternate;
}
@keyframes move-bg {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-10px, -5px); }
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(5,11,20,0.5) 0%, rgba(5,11,20,1) 95%); z-index: 1;
}
.hero-header { max-width: 900px; margin: 0 auto 60px; position: relative; z-index: 2; padding: 0 10px; }
.hero-header h1 {
    font-size: 3.5rem; line-height: 1.2; margin-bottom: 25px; color: #fff;
    text-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.gradient-text {
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-header p { font-size: 1.2rem; color: #cbd5e1; max-width: 700px; margin: 0 auto; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

/* Ecosystem Grid */
.ecosystem-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; 
    width: 100%; margin-bottom: 80px; position: relative; z-index: 2;
}
.eco-card {
    background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 35px;
    text-align: left; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.eco-card:hover {
    transform: translateY(-10px); border-color: var(--primary-blue);
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.2); background: rgba(15, 23, 42, 0.95);
}
.card-badge {
    position: absolute; top: 20px; right: 20px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: #fff; letter-spacing: 1px;
}
.badge-new { background: var(--primary-blue); border-color: var(--primary-blue); box-shadow: 0 0 15px rgba(2, 132, 199, 0.5); }
.card-icon-box {
    width: 60px; height: 60px; margin-bottom: 25px;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; color: var(--primary-blue);
    position: relative; transition: 0.3s;
}
.eco-card:hover .card-icon-box { background: var(--primary-blue); color: #fff; transform: rotate(-5deg) scale(1.1); }
.eco-card h2 { font-size: 1.5rem; margin-bottom: 12px; color: #fff; min-height: 35px; }
.eco-card p { color: var(--text-gray); margin-bottom: 30px; font-size: 0.95rem; flex-grow: 1; line-height: 1.6; }

/* Tech Strip */
.tech-strip {
    padding: 40px 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.3); position: relative; z-index: 2;
}
.tech-container { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; align-items: center; }
.tech-item { 
    font-size: 0.85rem; font-weight: 600; color: #cbd5e1; display: flex; align-items: center; gap: 10px; 
    text-transform: uppercase; letter-spacing: 1px; opacity: 0.6; transition: 0.3s;
}
.tech-item img { height: 32px; width: auto; filter: grayscale(100%) brightness(1.2); transition: 0.3s; }
.tech-item:hover { opacity: 1; } .tech-item:hover img { filter: grayscale(0%) brightness(1); }

/* Showcase Section */
.showcase-section {
    padding: 100px 0; position: relative; overflow: hidden;
    background: radial-gradient(circle at 0% 50%, rgba(2, 132, 199, 0.08) 0%, transparent 50%);
}
.split-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.showcase-text h2 { font-size: 2.5rem; margin-bottom: 20px; color: #fff; line-height: 1.2; }
.showcase-text p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 30px; line-height: 1.7; }
.showcase-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; color: #e2e8f0; font-size: 1rem; font-weight: 500; }
.showcase-list li i { color: var(--primary-blue); background: rgba(2, 132, 199, 0.1); width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.9rem; }
.showcase-image img { 
    width: 100%; height: auto; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5); transition: 0.5s; cursor: zoom-in;
}
.showcase-image:hover img { transform: perspective(1000px) rotateY(-2deg) scale(1.02); border-color: var(--primary-blue); }

/* Docker Box */
.docker-cmd-box {
    background: #1e293b; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace; font-size: 0.9rem; color: #a5b4fc; box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: left;
}
.docker-cmd-box .cmd-line { display: block; margin-bottom: 10px; position: relative; padding-left: 15px; }
.docker-cmd-box .cmd-line::before { content: "$"; position: absolute; left: 0; color: var(--primary-cyan); }
.docker-cmd-box .highlight { color: #fff; }

/* Draggable Area (Academy) */
.draggable-area {
    position: relative; width: 100%; height: 500px;
    background: rgba(15, 23, 42, 0.3); border-radius: 20px; border: 1px dashed rgba(255,255,255,0.1); overflow: hidden;
}
.draggable-card {
    position: absolute; width: 280px; height: 180px;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5); overflow: hidden;
    background: #0f172a; cursor: grab; transition: transform 0.1s ease, box-shadow 0.2s ease; z-index: 1;
}
.draggable-card:active { cursor: grabbing; transform: scale(1.02); box-shadow: 0 25px 50px rgba(0,0,0,0.6); z-index: 100; border-color: var(--primary-blue); }
.draggable-card img { width: 100%; height: 100%; display: block; object-fit: cover; position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 1s ease-in-out; pointer-events: none; }
.draggable-card img.active { opacity: 1; }
.reverse-layout .draggable-area { order: -1; }

/* Broker Section */
.broker-section { padding: 100px 0; background: linear-gradient(180deg, #0b1120 0%, #050b14 100%); border-top: 1px solid rgba(255,255,255,0.05); }
.broker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.broker-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 30px; border-radius: 16px; transition: 0.3s; }
.broker-card:hover { background: rgba(255,255,255,0.05); border-color: var(--primary-blue); transform: translateY(-5px); }
.broker-card i { font-size: 2rem; color: var(--primary-blue); margin-bottom: 20px; }
.broker-card h3 { font-size: 1.2rem; color: #fff; margin-bottom: 10px; }
.broker-card p { color: var(--text-gray); font-size: 0.9rem; }
.center-btn { text-align: center; margin-top: 50px; }

/* --- 5. ANIMATIONS --- */
.hidden-el { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.show { opacity: 1; transform: translateY(0); }
.ecosystem-grid .eco-card:nth-child(1) { transition-delay: 0.1s; }
.ecosystem-grid .eco-card:nth-child(2) { transition-delay: 0.3s; }
.ecosystem-grid .eco-card:nth-child(3) { transition-delay: 0.5s; }

/* --- 6. DOCUMENTATION STYLES (TAB SWITCHING ENABLED) --- */
.docs-wrapper { background-color: var(--bg-dark); min-height: 100vh; }
.docs-layout {
    display: grid; grid-template-columns: 280px 1fr; gap: 60px;
    padding: 60px 20px 100px; max-width: 1300px; margin: 0 auto; position: relative;
}
.docs-sidebar {
    position: sticky; top: 100px; height: calc(100vh - 120px); overflow-y: auto; padding-right: 20px;
    scrollbar-width: thin; scrollbar-color: var(--primary-blue) transparent;
}
.docs-group-title {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-gray); margin-top: 30px; margin-bottom: 15px; font-weight: 700;
}
.docs-group-title:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; padding: 0; }
.docs-nav li { margin-bottom: 5px; }
.docs-nav a {
    display: block; padding: 8px 15px; color: #94a3b8; font-size: 0.95rem; border-radius: 6px; transition: 0.2s; border-left: 2px solid transparent;
}
.docs-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.03); border-left-color: var(--primary-cyan); }

/* STATE ACTIVE UNTUK SIDEBAR */
.docs-nav a.active {
    color: #fff; background: rgba(255, 255, 255, 0.08); border-left-color: var(--primary-cyan); font-weight: 600;
}

/* CONTENT AREA & SWITCHING LOGIC */
.docs-content { color: #e2e8f0; max-width: 900px; min-height: 500px; }

/* Sembunyikan semua section secara default */
.docs-content section {
    display: none; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease;
}
/* Tampilkan section yang active */
.docs-content section.active {
    display: block; opacity: 1; transform: translateY(0); animation: fadeInDoc 0.4s ease-out forwards;
}
@keyframes fadeInDoc {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.docs-content h1 { font-size: 2.5rem; margin-bottom: 10px; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.docs-intro { font-size: 1.2rem; color: var(--text-gray); margin-bottom: 50px; line-height: 1.6; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 30px; }
.docs-section h2 { font-size: 1.8rem; color: #fff; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.docs-section h2::before { content: '#'; color: var(--primary-blue); opacity: 0.5; font-size: 1.5rem; }
.docs-section h3 { font-size: 1.3rem; color: #fff; margin-top: 30px; margin-bottom: 15px; }
.docs-list li { margin-bottom: 10px; color: #cbd5e1; position: relative; padding-left: 10px; }
.docs-list li::before { content: "•"; color: var(--primary-cyan); font-weight: bold; position: absolute; left: -10px; }

/* Docs Elements */
.doc-code { background: #0f172a; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; margin: 25px 0; overflow: hidden; }
.code-header { background: rgba(255,255,255,0.03); padding: 8px 15px; font-size: 0.8rem; color: var(--text-gray); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.code-dots { display: flex; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.dot.red { background: #ef4444; } .dot.yellow { background: #f59e0b; } .dot.green { background: #10b981; }
.doc-code pre { padding: 20px; overflow-x: auto; font-family: 'Consolas', monospace; font-size: 0.9rem; color: #a5b4fc; line-height: 1.5; }
.doc-code .comment { color: #64748b; font-style: italic; } .doc-code .cmd { color: #fff; } .doc-code .var { color: var(--primary-cyan); }
.doc-callout { background: rgba(2, 132, 199, 0.1); border-left: 4px solid var(--primary-blue); padding: 20px; border-radius: 0 8px 8px 0; margin: 25px 0; }
.doc-callout h4 { margin-bottom: 10px; color: var(--primary-blue); display: flex; align-items: center; gap: 10px; }
.doc-callout p { margin-bottom: 0; color: #e2e8f0; font-size: 0.95rem; }
.doc-table-wrapper { overflow-x: auto; margin: 30px 0; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th { background: rgba(255,255,255,0.05); text-align: left; padding: 15px; color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); }
.doc-table td { padding: 15px; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,0.05); }
.doc-table tr:last-child td { border-bottom: none; }

/* --- 7. MODAL & LEGAL PAGES --- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); z-index: 9999; justify-content: center; align-items: center;
    backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    max-width: 85%; max-height: 85%; border-radius: 12px;
    box-shadow: 0 0 50px rgba(2, 132, 199, 0.5); transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 30px; right: 30px; color: #fff; font-size: 2rem; cursor: pointer;
    background: rgba(255,255,255,0.1); width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.modal-close:hover { background: var(--primary-blue); transform: rotate(90deg); }

.page-header { padding: 120px 0 60px; text-align: center; background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.15) 0%, transparent 70%); }
.page-header h1 { font-size: 3rem; margin-bottom: 20px; color: #fff; }
.legal-content, .contact-form { max-width: 800px; margin: 0 auto 100px; background: var(--bg-card); padding: 50px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.contact-container { max-width: 1000px; margin: 0 auto 100px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: start; }
.form-control { width: 100%; padding: 14px 16px; background: rgba(5, 11, 20, 0.6); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: #fff; margin-bottom: 20px; }

/* --- 8. FOOTER & RESPONSIVE --- */
footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 60px 0 30px; background: #020617; color: var(--text-gray); font-size: 0.9rem; text-align: center; }

@media (max-width: 1024px) {
    .ecosystem-grid { grid-template-columns: repeat(2, 1fr); }
    .ecosystem-grid .eco-card:nth-child(3) { grid-column: span 2; }
}
@media (max-width: 900px) {
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar { position: relative; top: 0; height: auto; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 80px; left: 0; width: 100%; background: rgba(5, 11, 20, 0.98); flex-direction: column; padding: 30px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); gap: 20px; z-index: 1001; }
    .nav-links.active { display: flex; }
    .nav-links a { width: 100%; text-align: center; }
    .hero-header h1 { font-size: 2.2rem; }
    .ecosystem-grid { grid-template-columns: 1fr; gap: 20px; }
    .ecosystem-grid .eco-card:nth-child(3) { grid-column: span 1; }
    .split-container { grid-template-columns: 1fr; gap: 40px; }
    .showcase-image, .draggable-area { order: -1; }
    .broker-grid, .contact-container { grid-template-columns: 1fr; }
    .tech-item { width: 40%; flex-direction: column; text-align: center; }
    
    .draggable-area { height: 600px; }
    .draggable-card { width: 90%; left: 5% !important; }
    .draggable-card:nth-child(1) { top: 20px !important; }
    .draggable-card:nth-child(2) { top: 210px !important; }
    .draggable-card:nth-child(3) { top: 400px !important; }
}