/* ==========================================================
   SKRIPSI AI — Design tokens
   Arah visual: white + blue gradient, academic, modern, clean.
   Display: Fraunces (serif, kredibilitas akademik)
   Body/UI : Plus Jakarta Sans
   Mono    : JetBrains Mono (dipakai utk DOI/skor/label data,
             menegaskan "jawaban AI berbasis sumber terverifikasi")
   ========================================================== */

:root {
    --white: #ffffff;
    --bg-soft: #f8fafc;
    --bg-blue-50: #eff6ff;
    --bg-blue-100: #dbeafe;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --indigo-600: #4f46e5;
    --ink: #0f172a;
    --ink-soft: #475569;
    --ink-faint: #94a3b8;
    --line: #e2e8f0;
    --success: #16a34a;

    --gradient-primary: linear-gradient(135deg, var(--blue-600), var(--indigo-600));
    --gradient-soft: linear-gradient(180deg, #ffffff 0%, #f0f6ff 60%, #eaf2ff 100%);
    --gradient-hero-bg: radial-gradient(circle at 15% 20%, #dbeafe 0%, transparent 45%),
                         radial-gradient(circle at 85% 10%, #e0e7ff 0%, transparent 40%),
                         linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(37, 99, 235, 0.08);
    --shadow-lift: 0 12px 32px rgba(37, 99, 235, 0.16);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --font-display: "Fraunces", "Georgia", serif;
    --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
    --white: #0b1220;
    --bg-soft: #0f172a;
    --bg-blue-50: #111c33;
    --bg-blue-100: #16213d;
    --ink: #f1f5f9;
    --ink-soft: #cbd5e1;
    --ink-faint: #64748b;
    --line: #1e293b;
    --gradient-soft: linear-gradient(180deg, #0b1220 0%, #0f1b30 60%, #0f172a 100%);
    --gradient-hero-bg: radial-gradient(circle at 15% 20%, #16213d 0%, transparent 45%),
                         radial-gradient(circle at 85% 10%, #1b2547 0%, transparent 40%),
                         linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .font-display { font-family: var(--font-display); letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--font-mono); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-600);
    font-weight: 600;
}
.section-title { font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; margin: 10px 0 14px; color: var(--ink); }
.section-sub { font-size: 17px; color: var(--ink-soft); max-width: 640px; line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    font-family: var(--font-body);
}
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-lift); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24); }
.btn-secondary { background: var(--white); color: var(--blue-600); border-color: var(--bg-blue-100); }
.btn-secondary:hover { background: var(--bg-blue-50); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Cards / glass ---------- */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}
.card-pad { padding: 28px; }
.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ---------- Nav ---------- */
.navbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-display); font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--ink-soft); }
.nav-links a:hover { color: var(--blue-600); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--gradient-hero-bg); overflow: hidden; padding: 88px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(34px, 4.6vw, 56px); font-weight: 600; line-height: 1.08; color: var(--ink); }
.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 18px; color: var(--ink-soft); margin: 20px 0 30px; line-height: 1.65; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 34px; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--ink-faint); }

.hero-visual { position: relative; }
.dashboard-mock {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    padding: 20px;
    position: relative;
    z-index: 2;
}
.dashboard-mock-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dashboard-row { display: flex; gap: 14px; margin-bottom: 14px; }
.mini-stat { flex: 1; background: var(--bg-blue-50); border-radius: var(--radius-sm); padding: 14px; }
.mini-stat .num { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--blue-600); }
.mini-stat .label { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.mock-chat-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px dashed var(--line); }
.mock-avatar { width: 26px; height: 26px; border-radius: 8px; background: var(--gradient-primary); flex-shrink: 0; }
.mock-bubble { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* Signature element: floating verified-source chips around the hero mock */
.source-chip {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--bg-blue-100);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: var(--shadow-soft);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}
.source-chip .check {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--success); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; flex-shrink: 0;
}
.chip-1 { top: -18px; right: -10px; animation-delay: 0s; }
.chip-2 { bottom: 40px; left: -28px; animation-delay: 1.4s; }
.chip-3 { bottom: -22px; right: 40px; animation-delay: 2.8s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
    .source-chip { animation: none; }
    html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .source-chip { display: none; }
}

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.feature-card { padding: 26px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.feature-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--gradient-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin: 0 0 8px; font-weight: 600; }
.feature-card p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }

@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.step-card { position: relative; padding: 26px 22px; background: var(--bg-blue-50); border-radius: var(--radius-lg); }
.step-num { font-family: var(--font-mono); color: var(--blue-600); font-size: 13px; font-weight: 700; }
.step-card h4 { margin: 10px 0 8px; font-size: 16px; }
.step-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Split sections (image/mock + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-visual { order: 2; }
.split-visual { border-radius: var(--radius-lg); background: var(--bg-blue-50); padding: 28px; border: 1px solid var(--bg-blue-100); }
.split ul { padding: 0; margin: 20px 0 0; list-style: none; }
.split ul li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 15px; color: var(--ink-soft); }
.split ul li .check { color: var(--blue-600); flex-shrink: 0; margin-top: 2px; }
.citation-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--white); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px; border: 1px solid var(--line); }
.citation-line .doi { font-family: var(--font-mono); color: var(--blue-600); font-size: 11.5px; }
@media (max-width: 900px) {
    .split, .split.reverse { grid-template-columns: 1fr; }
    .split.reverse .split-visual { order: 0; }
}

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.price-card { border-radius: var(--radius-lg); padding: 26px; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.price-card.featured { background: var(--gradient-primary); color: #fff; border: none; box-shadow: var(--shadow-lift); transform: translateY(-8px); }
.price-card .plan-name { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.price-card .plan-price { font-size: 30px; font-weight: 700; margin: 10px 0; font-family: var(--font-display); }
.price-card .plan-price span { font-size: 13px; font-weight: 400; opacity: 0.7; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0; flex: 1; }
.price-card ul li { font-size: 13.5px; padding: 6px 0; opacity: 0.9; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } .price-card.featured { transform: none; } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.testimonial-card { padding: 24px; border-radius: var(--radius-lg); background: var(--bg-blue-50); }
.testimonial-card p { font-size: 14.5px; color: var(--ink); line-height: 1.6; margin: 0 0 16px; }
.testimonial-who { display: flex; align-items: center; gap: 10px; }
.avatar-fallback { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.who-name { font-size: 13.5px; font-weight: 600; }
.who-role { font-size: 12px; color: var(--ink-soft); }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--blue-600); font-size: 20px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--ink-soft); font-size: 14.5px; margin: 12px 0 0; line-height: 1.6; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--gradient-primary); border-radius: var(--radius-lg); padding: 56px; text-align: center; color: #fff; margin: 0 24px; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); margin: 0 0 12px; }
.cta-band p { opacity: 0.9; margin: 0 0 26px; }
.cta-band .btn-secondary { background: #fff; color: var(--blue-600); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cbd5e1; padding: 56px 0 28px; margin-top: 40px; }
.footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer h5 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; font-family: var(--font-mono); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; font-size: 14px; }
.footer ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 22px; font-size: 13px; color: #64748b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================
   APP SHELL (dashboard, chat, projects — halaman setelah login)
   ========================================================== */
.app-shell { display: flex; min-height: 100vh; background: var(--bg-soft); }
.app-sidebar {
    width: 248px; flex-shrink: 0; background: var(--white);
    border-right: 1px solid var(--line); padding: 22px 16px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-sidebar .brand { padding: 0 8px; margin-bottom: 28px; }
.side-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 14.5px; color: var(--ink-soft); font-weight: 500;
    margin-bottom: 4px;
}
.side-link:hover { background: var(--bg-blue-50); color: var(--blue-600); }
.side-link.active { background: var(--bg-blue-50); color: var(--blue-600); font-weight: 600; }
.side-section-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--ink-faint); letter-spacing: 0.08em; margin: 18px 8px 8px; }

.app-main { flex: 1; min-width: 0; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.app-content { padding: 28px; max-width: 1160px; }

.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.stat-card .num { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--blue-600); }
.stat-card .label { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.progress-track { height: 8px; border-radius: 99px; background: var(--bg-blue-100); overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient-primary); border-radius: 99px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-control {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); font-size: 14.5px; font-family: var(--font-body);
    background: var(--white); color: var(--ink);
}
.form-control:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Auth layout */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gradient-hero-bg); padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-lift); padding: 36px 32px; }

/* Chat UI */
.chat-shell { display: grid; grid-template-columns: 260px 1fr; height: calc(100vh - 65px); }
.chat-side { border-right: 1px solid var(--line); background: var(--white); padding: 18px; overflow-y: auto; }
.chat-main { display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; }
.chat-bubble { max-width: 640px; margin-bottom: 16px; padding: 14px 16px; border-radius: var(--radius-md); font-size: 14.5px; line-height: 1.6; }
.chat-bubble.user { background: var(--gradient-primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.assistant { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-input-bar { padding: 16px 24px; border-top: 1px solid var(--line); background: var(--white); display: flex; gap: 10px; }
.chat-input-bar textarea { flex: 1; resize: none; border-radius: var(--radius-md); border: 1px solid var(--line); padding: 12px 14px; font-family: var(--font-body); font-size: 14.5px; }
.citation-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.citation-chip { font-size: 12.5px; color: var(--ink-soft); background: var(--bg-blue-100); border-radius: 8px; padding: 6px 10px; }
.citation-chip .mono { color: var(--blue-600); font-weight: 600; margin-right: 6px; }
@media (max-width: 860px) { .chat-shell { grid-template-columns: 1fr; } .chat-side { display: none; } }

/* Mobile bottom nav (user app) */
.mobile-bottom-nav { display: none; }
@media (max-width: 860px) {
    .app-sidebar { display: none; }
    .mobile-bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: var(--white); border-top: 1px solid var(--line);
        justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
        z-index: 40;
    }
    .mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--ink-soft); padding: 4px 10px; }
    .mobile-bottom-nav a.active { color: var(--blue-600); }
    .app-content { padding-bottom: 90px; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Data table (Literature Review Matrix, dsb) */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 900px; }
.data-table th { text-align: left; background: var(--bg-soft); color: var(--ink-soft); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); max-width: 220px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.muted { color: var(--ink-faint); font-style: italic; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.checkbox-row:last-child { border-bottom: none; }
.checkbox-row input[type="checkbox"] { margin-top: 3px; }
.badge-basis-abstract { font-size: 10.5px; background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.badge-basis-metadata { font-size: 10.5px; background: var(--bg-soft); color: var(--ink-faint); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
