/* --- VARIABLE SYSTEM --- */
:root {
    /* Palette Premium */
    --bg-surface: #f8f9fc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --primary-600: #4f46e5;
    --primary-500: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- BACKGROUND FX --- */
.main-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
}

/* Grid mirip kertas grafik/matematika */
.grid-pattern {
    position: absolute;
    width: 100%; height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 { width: 400px; height: 400px; background: var(--accent-purple); top: -10%; right: -5%; }
.orb-2 { width: 300px; height: 300px; background: var(--primary-500); bottom: -10%; left: -5%; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 18px 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; }
.logo-icon { width: 32px; height: 32px; background: var(--text-primary); color: white; border-radius: 8px; display: grid; place-items: center; font-size: 14px; }
.dot { color: var(--primary-600); }

.nav-menu { display: flex; gap: 32px; align-items: center; }
.nav-item { text-decoration: none; color: var(--text-secondary); font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav-item:hover, .nav-item.active { color: var(--text-primary); }

.btn-login {
    background: var(--text-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); color: white; }
.mobile-toggle { display: none; cursor: pointer; font-size: 1.2rem; }

/* --- HERO SECTION --- */
.hero-section {
    padding-top: 160px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

/* Left Content */
.badge-capsule {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.badge-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }

.display-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-600), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 90%;
}

/* --- THE INPUT PANEL (FORM) --- */
.input-panel {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 
        0 20px 40px -10px rgba(0,0,0,0.08),
        0 0 0 1px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden; /* For success overlay */
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.icon-slot {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1.1rem;
    pointer-events: none;
}

input[type="url"] {
    width: 100%;
    padding: 18px 20px 18px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-primary);
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="url"]:focus {
    outline: none;
    background: white;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.control-row { margin-bottom: 24px; }
.toggles { display: flex; gap: 24px; }

/* Custom Switch */
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-switch input { display: none; }
.slider {
    width: 36px; height: 20px;
    background: #cbd5e1;
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}
.slider::before {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px; left: 2px;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .slider { background: var(--primary-600); }
.toggle-switch input:checked + .slider::before { transform: translateX(16px); }
.label-text { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }

/* Main Button */
.cta-button {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: var(--text-primary);
    color: white;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    background: #1e293b;
}

.cta-button:disabled { opacity: 0.8; cursor: not-allowed; }

.btn-content { display: flex; justify-content: center; align-items: center; gap: 10px; }

/* Loader */
.loader-ring {
    width: 24px; height: 24px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    top: 50%; left: 50%;
    margin-top: -12px; margin-left: -12px;
}

/* Result Overlay (Seamless Transition) */
.result-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.4s ease;
}

.result-content { text-align: center; width: 100%; padding: 20px; }
.success-icon { 
    width: 60px; height: 60px; 
    background: #d1fae5; color: #10b981; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.8rem; margin: 0 auto 16px;
}
.result-text h3 { color: var(--text-primary); margin-bottom: 5px; }
.result-text p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }

.download-trigger {
    display: inline-block;
    width: 100%;
    padding: 16px;
    background: var(--primary-600);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.error-toast {
    margin-top: 15px;
    padding: 12px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
    font-weight: 500;
}

.trust-badges { margin-top: 30px; display: flex; align-items: center; gap: 15px; color: var(--text-tertiary); font-size: 0.9rem; font-weight: 600; }
.avatars-stack { display: flex; align-items: center; }
.avatars-stack img { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--bg-surface); margin-left: -10px; }
.avatars-stack img:first-child { margin-left: 0; }
.plus-more { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; color: var(--text-secondary); display: grid; place-items: center; border: 3px solid var(--bg-surface); margin-left: -10px; font-size: 0.75rem; font-weight: 700; }

/* --- RIGHT VISUALS (FLOATING UI) --- */
.hero-visuals { position: relative; height: 600px; display: grid; place-items: center; }
.composition-container { position: relative; width: 100%; height: 100%; perspective: 1000px; }

.float-card {
    position: absolute;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
    animation: floatAnim 6s ease-in-out infinite;
    border: 1px solid rgba(255,255,255,0.8);
}
.float-card:hover { transform: scale(1.05) translateY(-5px) !important; z-index: 10; }

/* Card 1: Main (Center Right) */
.card-main {
    top: 20%; right: 10%;
    width: 320px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    z-index: 2;
}
.card-top { display: flex; justify-content: space-between; margin-bottom: 20px; color: var(--text-tertiary); }
.tag-pill { background: #e0e7ff; color: var(--primary-600); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.card-heading { margin-bottom: 20px; font-size: 1.25rem; }
.stat-row { display: flex; gap: 24px; margin-bottom: 20px; }
.stat-item { display: flex; flex-direction: column; }
.stat-item .label { font-size: 0.75rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-item .value { font-weight: 700; font-size: 1.1rem; }
.progress-bar-bg { height: 6px; background: #f1f5f9; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { width: 75%; height: 100%; background: linear-gradient(90deg, var(--primary-600), var(--accent-purple)); }
.progress-label { font-size: 0.8rem; color: var(--text-tertiary); }

/* Card 2: Notification (Top Left of Visuals) */
.card-notification {
    top: 10%; left: 0;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px 12px 12px;
    animation-delay: 1.5s;
    border-radius: 100px;
}
.avatar-circle { width: 44px; height: 44px; border-radius: 50%; }
.notif-content .notif-title { font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.notif-content .notif-desc { font-size: 0.8rem; color: var(--text-tertiary); }
.status-dot { width: 8px; height: 8px; background: #3b82f6; border-radius: 50%; }

/* Card 3: Dark Code (Bottom Center) */
.card-dark {
    bottom: 20%; left: 15%;
    background: #1e293b;
    color: white;
    padding: 16px 24px;
    display: flex; align-items: center; gap: 16px;
    animation-delay: 3s;
}
.icon-square { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 10px; display: grid; place-items: center; color: #10b981; }
.dark-title { font-weight: 700; }
.dark-sub { font-size: 0.8rem; opacity: 0.6; }

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- FEATURES GRID --- */
.features-section { padding: 80px 0; border-top: 1px solid rgba(0,0,0,0.05); }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 60px; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.section-header p { color: var(--text-secondary); }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.bento-card {
    background: white; padding: 32px; border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s;
}
.bento-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.icon-box { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; margin-bottom: 20px; }
.ib-blue { background: #eff6ff; color: #3b82f6; }
.ib-purple { background: #f5f3ff; color: #8b5cf6; }
.ib-green { background: #ecfdf5; color: #10b981; }

.bento-card h3 { font-size: 1.1rem; margin-bottom: 10px; font-weight: 700; }
.bento-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

/* --- FOOTER --- */
footer { padding: 40px 0; text-align: center; color: var(--text-tertiary); font-size: 0.85rem; }

/* --- UTILS --- */
.hidden { display: none !important; }

/* --- MOBILE --- */
@media (max-width: 992px) {
    .hero-wrapper { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-visuals { display: none; /* Hide complex visuals on tablet/mobile for focus */ }
    .nav-menu { display: none; }
    .mobile-toggle { display: block; }
    .display-title { font-size: 2.5rem; }
    .input-panel { margin: 0 auto; max-width: 500px; }
    .trust-badges { justify-content: center; }
}

@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; }
    .hero-section { padding-top: 120px; }
}
