/* ============================================================
   bayarclaudepro.com — design system
   Dark-first, terminal/IDE aesthetic.
   Tokens: lihat PLAN.md §3.2
   ============================================================ */

:root {
    color-scheme: dark;
    --bg: #0d1117;
    --bg-alt: #010409;
    --surface: #161b22;
    --surface-2: #1c2129;
    --border: #30363d;
    --border-subtle: #21262d;
    --text: #e6edf3;
    --muted: #8b949e;
    --faint: #6e7681;
    --accent: #ff8a5c;
    --accent-strong: #e8825f;
    --accent-dim: rgba(255, 138, 92, 0.12);
    --green: #3fb950;
    --green-dim: rgba(63, 185, 80, 0.12);
    --red: #f85149;
    --yellow: #d29922;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', var(--font-body);
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0d1117; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

.mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-accent { color: var(--accent); }

/* ── Header ─────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.site-header .inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .prompt { color: var(--accent); }
.brand .tld { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.btn-primary { color: #0d1117; }
.site-nav a.btn-primary:hover { color: #0d1117; }
.site-nav a.btn-secondary { color: var(--text); }
.site-nav a.btn-secondary:hover { color: var(--text); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 7px 12px;
    cursor: pointer;
}

@media (max-width: 800px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px 20px;
        gap: 16px;
    }
    .site-nav.open { display: flex; }
    .nav-toggle { display: block; }
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--accent);
    color: #0d1117 !important;
    box-shadow: 0 0 24px rgba(255, 138, 92, 0.25);
}
.btn-primary:hover {
    background: var(--accent-strong);
    box-shadow: 0 0 32px rgba(255, 138, 92, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text) !important;
    border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--faint); background: var(--surface-2); }

.btn-wa {
    background: var(--green);
    color: #0d1117 !important;
}
.btn-wa:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

#btn-back {
    color: var(--muted);
    background: transparent;
    border: none;
}
#btn-back:hover {
    color: var(--text);
    background: transparent;
    text-decoration: underline;
}

/* ── Sections ───────────────────────────────────────────── */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }

.section-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}
.section-label::before { content: "// "; color: var(--faint); }

.section-title { font-size: clamp(26px, 4vw, 38px); margin-bottom: 14px; }
.section-desc { color: var(--muted); font-size: 17px; max-width: 640px; }

/* ── Hero ───────────────────────────────────────────────── */

.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 10%, rgba(255, 138, 92, 0.07), transparent),
        radial-gradient(ellipse 50% 40% at 20% 90%, rgba(63, 185, 80, 0.04), transparent);
    pointer-events: none;
}
.hero .inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    position: relative;
}
@media (max-width: 900px) {
    .hero .inner { grid-template-columns: 1fr; gap: 40px; }
}

.hero h1 {
    font-size: clamp(30px, 4.6vw, 46px);
    margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent); }

.hero .lede { color: var(--muted); font-size: 18px; margin-bottom: 30px; max-width: 540px; }
.hero .lede strong { color: var(--text); }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
}
.trust-strip span::before { content: "✓ "; color: var(--green); }

/* ── Terminal window ────────────────────────────────────── */

.terminal {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.85;
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-subtle);
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.terminal-bar .title {
    margin-left: 8px;
    font-size: 12px;
    color: var(--faint);
}
.terminal-body { padding: 18px 20px 22px; min-height: 210px; }
.terminal-body .line { display: block; white-space: pre-wrap; word-break: break-word; }
.terminal-body .prompt { color: var(--accent); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .out { color: var(--muted); }
.terminal-body .ok { color: var(--green); }
.terminal-body .dim { color: var(--faint); }

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--accent);
    vertical-align: -2px;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Cards ──────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Step cards (how it works) */
.step-num {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.card h3 { font-size: 17.5px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
}
.badge .pulse {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
}
.badge-accent { color: var(--accent); border-color: rgba(255, 138, 92, 0.35); background: var(--accent-dim); }

/* ── Kalkulator / invoice ───────────────────────────────── */

.calc {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.calc-tabs { display: flex; border-bottom: 1px solid var(--border); }
.calc-tab {
    flex: 1;
    background: var(--surface);
    border: none;
    border-right: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.calc-tab:last-child { border-right: none; }
.calc-tab.active { background: var(--bg-alt); color: var(--accent); }
.calc-tab:hover:not(.active) { color: var(--text); }

.calc-body { padding: 26px; font-family: var(--font-mono); font-size: 14px; }
.calc-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    color: var(--muted);
}
.calc-row .val { color: var(--text); text-align: right; }
.calc-divider { border: none; border-top: 1px dashed var(--border); margin: 12px 0; }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 2px; }
.calc-total .label { color: var(--text); font-weight: 600; }
.calc-total .val { color: var(--accent); font-size: 26px; font-weight: 700; }
.calc-note { font-size: 12px; color: var(--faint); margin-top: 12px; font-family: var(--font-body); }
.calc-cta { padding: 0 26px 26px; }

/* ── Tables ─────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
table.cmp th, table.cmp td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
table.cmp thead th {
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp td { color: var(--muted); }
table.cmp td:first-child { color: var(--text); font-weight: 500; }
table.cmp .hl { background: rgba(255, 138, 92, 0.05); }
table.cmp .yes { color: var(--green); }
table.cmp .no { color: var(--red); }

/* ── FAQ ────────────────────────────────────────────────── */

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 600;
    font-size: 15.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }
.faq .answer a { color: var(--accent); }

/* ── Prose (blog & halaman legal) ───────────────────────── */

.prose { font-size: 16.5px; }
.prose h2 { font-size: 26px; margin: 44px 0 16px; }
.prose h3 { font-size: 20px; margin: 32px 0 12px; }
.prose p { margin-bottom: 18px; color: #c9d1d9; }
.prose ul, .prose ol { margin: 0 0 18px 24px; color: #c9d1d9; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 18px;
    margin: 0 0 18px;
    color: var(--muted);
}
.prose pre {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    overflow-x: auto;
    margin: 0 0 20px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.7;
    color: #c9d1d9;
}
.prose code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1.5px 6px;
    color: var(--accent);
}
.prose pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0 0 20px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border: 1px solid var(--border); }
.prose th { background: var(--surface); font-family: var(--font-mono); font-size: 13px; }
.prose td { color: var(--muted); }
.prose .table-scroll { overflow-x: auto; margin-bottom: 20px; }
.prose .table-scroll table { margin-bottom: 0; min-width: 560px; }

/* ── Blog cards ─────────────────────────────────────────── */

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-card > a.cover { position: absolute; inset: 0; z-index: 1; }
.post-card .tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 12px;
}
.post-card .tag::before { content: "# "; color: var(--faint); }
.post-card h3, .post-card h2 { font-size: 17.5px; margin-bottom: 10px; line-height: 1.35; }
.post-card p { color: var(--muted); font-size: 14px; flex-grow: 1; }
.post-card .meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--faint);
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
    margin-top: 16px;
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 36px; }
.filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--faint); }
.filter-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ── Callouts ───────────────────────────────────────────── */

.callout {
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--muted);
}
.callout strong { color: var(--text); }
.callout-green { border-left-color: var(--green); }
.callout-yellow { border-left-color: var(--yellow); }

.cta-box {
    background: linear-gradient(135deg, rgba(255, 138, 92, 0.09), rgba(255, 138, 92, 0.02));
    border: 1px solid rgba(255, 138, 92, 0.35);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 36px 0;
}
.cta-box h3 { font-size: 20px; margin-bottom: 8px; }
.cta-box p { color: var(--muted); margin-bottom: 18px; }

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border-subtle);
    padding: 56px 0 36px;
    font-size: 14px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    margin-bottom: 14px;
}
.site-footer h4::before { content: "## "; color: var(--faint); }
.site-footer p { color: var(--muted); max-width: 380px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: var(--muted); }
.site-footer li a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--faint);
}

/* ── Order page ─────────────────────────────────────────── */

.order-wrap { max-width: 480px; margin: 0 auto; padding: 48px 20px 80px; }

@media (min-width: 768px) {
    .order-wrap { max-width: 860px; }
}

#step-plan {
    max-width: 480px;
    margin: 0 auto;
}

.order-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 768px) {
    .order-grid {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 36px;
        align-items: start;
    }
    .order-col-left {
        position: sticky;
        top: 84px;
    }
}

.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.order-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 22px 26px; }
.order-head .label { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.order-head h1 { font-size: 21px; }
.order-body { padding: 26px; }
.qr-frame {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    width: fit-content;
    margin: 0 auto 8px;
    min-height: 200px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-frame img, .qr-frame canvas { display: block; border-radius: 4px; }

.steps-inline {
    counter-reset: step;
    list-style: none;
    font-size: 13.5px;
    color: var(--muted);
}
.steps-inline li { counter-increment: step; margin-bottom: 8px; padding-left: 30px; position: relative; }
.steps-inline li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 1px;
    width: 20px; height: 20px;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

/* ── Utilities ──────────────────────────────────────────── */

.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; } .mt-6 { margin-top: 56px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 36px; }
.center { text-align: center; }
.hidden { display: none; }

/* Reveal-on-scroll hanya aktif bila JS jalan (html.js di-set oleh site.js head snippet) */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
html.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html.js .reveal { opacity: 1; transform: none; transition: none; }
    .cursor { animation: none; }
}
