/* CanggihApps — public site styles */
:root {
    --primary: #0ea5e9;
    --primary-strong: #0284c7;
    --secondary: #6366f1;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;

    --bg: #f8fafc;
    --bg-elev: #ffffff;
    --bg-soft: #f1f5f9;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --ring: rgba(14, 165, 233, .35);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
    --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .25);
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --grad: linear-gradient(135deg, var(--primary), var(--secondary));

    --radius-sm: .5rem;
    --radius: .875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;
    --container: 1180px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1120;
        --bg-elev: #111a2e;
        --bg-soft: #0f172a;
        --text: #f1f5f9;
        --text-soft: #cbd5e1;
        --muted: #94a3b8;
        --border: #1e293b;
        --border-strong: #334155;
        --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
        --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
        --code-bg: #020617;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0b1120;
    --bg-elev: #111a2e;
    --bg-soft: #0f172a;
    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --muted: #94a3b8;
    --border: #1e293b;
    --border-strong: #334155;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    --code-bg: #020617;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.025em; margin: 0 0 .75rem; font-weight: 800; text-wrap: balance; }
p { margin: 0 0 1rem; color: var(--text-soft); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; }
.section-sm { padding: 3.5rem 0; }
.section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.075rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--primary); margin-bottom: .9rem;
}
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
    display: grid; place-items: center; color: #fff; font-size: 1rem; font-weight: 900;
    box-shadow: 0 8px 20px -8px var(--primary);
}
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
    padding: .5rem .85rem; border-radius: 999px; font-weight: 600; font-size: .93rem; color: var(--text-soft);
    transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-soft); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.lang-switch {
    display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
}
.lang-switch a { padding: .25rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.lang-switch a.active { background: var(--text); color: var(--bg); }
.icon-btn {
    width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev);
    color: var(--text); display: inline-grid; place-items: center; cursor: pointer; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.menu-toggle { display: none; }

@media (max-width: 860px) {
    .menu-toggle { display: inline-grid; }
    .nav-links {
        position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        padding: .75rem 1rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--border);
        display: none; box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .8rem 1rem; border-radius: var(--radius); }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: .95rem; line-height: 1.2;
    border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
    white-space: nowrap; font-family: inherit;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 24px -12px var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px var(--primary); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--bg-elev); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { color: var(--text-soft); }
.btn-ghost:hover { color: var(--text); background: var(--bg-soft); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.02rem; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 6.5rem 0 5rem; overflow: hidden; text-align: center; }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto; height: 640px; z-index: -1;
    background:
        radial-gradient(40% 50% at 30% 30%, rgba(14, 165, 233, .22), transparent 70%),
        radial-gradient(35% 45% at 70% 20%, rgba(99, 102, 241, .22), transparent 70%);
    filter: blur(10px);
}
.hero-grid {
    position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
.pill {
    display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .9rem .35rem .4rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
    font-size: .85rem; font-weight: 600; color: var(--text-soft); box-shadow: var(--shadow-sm); margin-bottom: 1.75rem;
}
.pill-badge { background: var(--grad); color: #fff; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 800; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); letter-spacing: -.045em; margin-bottom: 1.25rem; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 640px; margin: 0 auto 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; margin-top: 3.5rem; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.hero-stats span { color: var(--muted); font-size: .88rem; }

.notice {
    display: flex; gap: .9rem; align-items: flex-start; text-align: left;
    max-width: 680px; margin: 3rem auto 0; padding: 1rem 1.25rem; border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border)); background: color-mix(in srgb, var(--warning) 7%, var(--bg-elev));
}
.notice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 20%, transparent); margin-top: .5rem; flex-shrink: 0; }
.notice strong { display: block; font-size: .95rem; margin-bottom: .15rem; }
.notice p { margin: 0; font-size: .87rem; color: var(--muted); line-height: 1.55; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Product cards (home) ---------- */
.product-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.product-card-visual {
    position: relative; aspect-ratio: 16 / 9; background: var(--grad); overflow: hidden;
    display: grid; place-items: center; color: #fff;
}
.product-card-visual::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, .28), transparent 55%);
}
.product-card-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.product-card-visual .emoji { font-size: 4.5rem; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .25)); position: relative; z-index: 1; }
.product-card-visual.terminal { background: #0b1120; place-items: stretch; padding: 1.25rem; }
.product-card-body { padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.product-card-title { display: flex; align-items: center; gap: .75rem; }
.product-icon {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem;
    background: var(--bg-soft); border: 1px solid var(--border); flex-shrink: 0;
}
.product-card h3 { font-size: 1.45rem; margin: 0; }
.product-card .tagline { margin: 0; color: var(--muted); font-size: .92rem; }
.product-card p.desc { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px;
    background: var(--bg-soft); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--text-soft);
}
a.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); }
.product-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: .5rem; }

/* Fake terminal */
.term { font-family: var(--font-mono); font-size: .8rem; color: #cbd5e1; line-height: 1.7; width: 100%; text-align: left; position: relative; z-index: 1; }
.term-bar { display: flex; gap: 6px; margin-bottom: .9rem; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.term-bar i:nth-child(1) { background: #f43f5e; } .term-bar i:nth-child(2) { background: #f59e0b; } .term-bar i:nth-child(3) { background: #10b981; }
.term .g { color: #34d399; } .term .c { color: #38bdf8; } .term .m { color: #64748b; }
.term .w { color: #e2e8f0; }

/* ---------- Demo mdwn ---------- */
.demo-wrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 860px) { .demo-wrap { grid-template-columns: 1fr; } }
.demo-term { background: #0b1120; border: 1px solid #1e293b; border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; min-height: 420px; }
.demo-path { margin-bottom: .9rem; }
.demo-screen { font-size: .8rem; }
.demo-title { color: #34d399; margin-bottom: .75rem; }
.demo-line, .demo-sep { color: #334155; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .2rem .9rem; }
.demo-opt {
    display: flex; align-items: center; gap: .35rem; width: 100%; text-align: left; font: inherit; cursor: pointer;
    background: none; border: 0; color: #cbd5e1; padding: .22rem .5rem; border-radius: 7px; transition: background .15s, color .15s;
}
.demo-opt:hover, .demo-opt:focus-visible { background: rgba(56, 189, 248, .14); color: #e2e8f0; outline: none; }
.demo-opt .demo-num { color: #fbbf24; flex-shrink: 0; }
.demo-opt .demo-count { margin-left: auto; font-size: .68rem; color: #64748b; background: rgba(148, 163, 184, .12); border-radius: 999px; padding: 0 .45rem; }
.demo-tip { color: #64748b; margin: .9rem 0 0; }
.demo-empty { color: #f87171; }
.demo-back {
    margin-top: 1rem; font: inherit; cursor: pointer; background: none; border: 1px solid #334155; color: #cbd5e1;
    padding: .35rem .8rem; border-radius: 8px; transition: border-color .15s, color .15s;
}
.demo-back:hover { border-color: #64748b; color: #f1f5f9; }
.demo-start, .demo-end { color: #fbbf24; }
.demo-run .demo-note { color: #94a3b8; margin: .5rem 0; }
.demo-press { color: #64748b; margin-top: .6rem; }
.demo-steps { color: #cbd5e1; margin: .6rem 0; padding-left: 1.2rem; }
.demo-steps li { margin-bottom: .2rem; }
.demo-side { display: flex; flex-direction: column; gap: 1rem; }
.demo-search { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--text-soft); }
.demo-search input {
    font: inherit; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-elev); color: var(--text);
}
.demo-search input:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); border-color: var(--primary); }
.demo-hint { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.demo-hint strong { display: block; font-size: .88rem; margin-bottom: .3rem; }
.demo-hint p { margin: 0; font-size: .84rem; color: var(--muted); }
.demo-hint code { font-family: var(--font-mono); font-size: .82em; }
.demo-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.demo-cat { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: .85rem 1rem; }
.demo-cat summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .4rem; color: var(--text); }
.demo-cat summary .demo-num { color: var(--primary); }
.demo-cat summary .demo-count { margin-left: auto; font-size: .72rem; color: var(--muted); font-weight: 500; }
.demo-cat ul { margin: .75rem 0 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .2rem; }
.demo-cat li { font-size: .88rem; color: var(--text-soft); font-family: var(--font-mono); }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.feature { padding: 1.25rem; display: flex; gap: .9rem; align-items: flex-start; }
.feature-icon { font-size: 1.35rem; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); flex-shrink: 0; }
.feature h4 { font-size: .98rem; margin: .55rem 0 0; font-weight: 700; letter-spacing: -.01em; }

/* ---------- Product detail ---------- */
.product-hero { padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.product-hero::before {
    content: ""; position: absolute; inset: -30% -20% auto; height: 520px; z-index: -1;
    background: radial-gradient(40% 60% at 70% 30%, rgba(99, 102, 241, .16), transparent 70%), radial-gradient(40% 60% at 20% 20%, rgba(14, 165, 233, .16), transparent 70%);
}
.product-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 900px) { .product-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.product-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.04em; }
.product-hero .lead { font-size: 1.12rem; color: var(--muted); }
.product-shot { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--grad); }
.product-shot img { width: 100%; }
.product-shot.terminal { background: #0b1120; padding: 1.5rem; }
.product-shot.placeholder { aspect-ratio: 4 / 3; display: grid; place-items: center; color: #fff; font-size: 6rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------- Downloads ---------- */
.downloads { padding: 2rem; }
@media (max-width: 600px) { .downloads { padding: 1.25rem; } }
.tabs { display: flex; gap: .25rem; box-shadow: inset 0 -1px 0 var(--border); margin-bottom: 1.75rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab {
    background: none; border: 0; border-bottom: 2px solid transparent; padding: .75rem 1rem;
    font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--text); border-color: var(--primary); }
.tab-panel[hidden] { display: none; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem; }
.platform {
    display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.25rem 1rem; border-radius: var(--radius);
    background: var(--bg-soft); border: 1.5px solid var(--border); cursor: pointer; font: inherit; color: var(--text);
    transition: border-color .2s, background .2s, transform .2s;
}
.platform:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.platform[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--bg-elev)); }
.platform .os-icon { font-size: 2rem; }
.platform strong { font-size: 1rem; }
.platform small { color: var(--muted); font-size: .78rem; }
.download-box {
    margin-top: 1.5rem; padding: 1.75rem; border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--primary) 55%, var(--border));
    background: color-mix(in srgb, var(--primary) 5%, var(--bg-elev)); display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.download-box[hidden] { display: none; }
.download-meta { min-width: 0; }
.download-meta .label { font-size: .82rem; color: var(--muted); margin: 0 0 .2rem; }
.download-meta h4 { font-size: 1.35rem; margin: 0 0 .35rem; }
.download-meta .file { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); word-break: break-all; }
.download-meta .changelog { margin: .6rem 0 0; font-size: .9rem; }
.source-note { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); margin-top: 1rem; }
.source-note svg { width: 14px; height: 14px; }

.timeline { display: flex; flex-direction: column; gap: 1.25rem; }
.timeline-item { position: relative; padding-left: 1.6rem; border-left: 2px solid var(--border); padding-bottom: .25rem; }
.timeline-item::before {
    content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%;
    background: var(--border-strong); box-shadow: 0 0 0 4px var(--bg-elev);
}
.timeline-item.latest::before { background: var(--primary); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.timeline-head strong { font-size: 1.05rem; }
.badge { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); }
.badge-primary { background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: transparent; color: var(--primary); }
.timeline-item p { margin: 0; font-size: .92rem; }
.timeline-item a.link { font-size: .85rem; font-weight: 600; color: var(--primary); }

/* Code block / install */
.codeblock { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(148, 163, 184, .15); }
.codeblock-head { display: flex; justify-content: space-between; align-items: center; padding: .55rem .9rem; border-bottom: 1px solid rgba(148, 163, 184, .15); font-size: .78rem; color: #94a3b8; font-family: var(--font-mono); }
.codeblock pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--font-mono); font-size: .86rem; line-height: 1.75; }
.copy-btn {
    background: rgba(148, 163, 184, .12); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, .2); border-radius: 6px;
    padding: .25rem .6rem; font-size: .75rem; cursor: pointer; font-family: var(--font);
}
.copy-btn:hover { background: rgba(148, 163, 184, .22); }

.support-card {
    padding: 2rem; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--bg-elev)), color-mix(in srgb, var(--secondary) 10%, var(--bg-elev)));
}
.support-card h3 { margin-bottom: .35rem; }
.support-card p { margin: 0; color: var(--muted); max-width: 560px; }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.post-cover { aspect-ratio: 16 / 9; background: var(--grad); overflow: hidden; position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .95); padding: 1.5rem; text-align: center; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.post-cover-fallback::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .3), transparent 50%); }
.post-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .8rem; color: var(--muted); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.post-card h3 { font-size: 1.2rem; margin: 0; line-height: 1.3; letter-spacing: -.02em; }
.post-card h3 a:hover { color: var(--primary); }
.post-card p { margin: 0; font-size: .93rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { margin-top: auto; font-weight: 700; font-size: .88rem; color: var(--primary); display: inline-flex; align-items: center; gap: .3rem; }

.featured-post { display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden; margin-bottom: 2.5rem; }
.featured-post .post-cover { aspect-ratio: auto; min-height: 320px; }
.featured-post .post-body { padding: 2.25rem; justify-content: center; gap: .9rem; }
.featured-post h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.featured-post p { -webkit-line-clamp: 4; font-size: 1rem; }
@media (max-width: 820px) { .featured-post { grid-template-columns: 1fr; } .featured-post .post-cover { min-height: 0; aspect-ratio: 16 / 9; } }

.blog-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.search { position: relative; flex: 1; max-width: 360px; min-width: 220px; }
.search input {
    width: 100%; padding: .75rem 1rem .75rem 2.6rem; border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-elev); color: var(--text); font: inherit; font-size: .93rem;
}
.search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.search svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }

.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty .emoji { font-size: 2.75rem; margin-bottom: .75rem; }

.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 .8rem; display: inline-grid; place-items: center; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-elev); font-weight: 600; font-size: .9rem;
}
.pagination .current { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination .disabled { opacity: .45; }

/* Article */
.article-head { padding: 3.5rem 0 2rem; text-align: center; }
.article-head h1 { font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.04em; max-width: 880px; margin: 0 auto 1rem; }
.article-head .lead { font-size: 1.15rem; color: var(--muted); max-width: 700px; margin: 0 auto 1.5rem; }
.article-head .post-meta { justify-content: center; font-size: .88rem; }
.author { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 800; }
.article-cover { max-width: 1000px; margin: 0 auto 3rem; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 4rem; max-width: 1040px; margin: 0 auto; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .toc { display: none; } }
.toc { position: sticky; top: 92px; align-self: start; font-size: .87rem; }
.toc h5 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: .3rem 0 .3rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); }
.toc li.lvl-3 a { padding-left: 1.75rem; font-size: .83rem; }
.toc li a:hover, .toc li a.active { color: var(--text); border-left-color: var(--primary); }
.lang-note {
    display: flex; gap: .6rem; align-items: center; padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 2rem;
    background: var(--bg-soft); border: 1px solid var(--border); font-size: .88rem; color: var(--muted);
}

.prose { font-size: 1.075rem; line-height: 1.8; color: var(--text-soft); max-width: 720px; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.65rem; margin: 2.75rem 0 1rem; color: var(--text); scroll-margin-top: 90px; }
.prose h3 { font-size: 1.3rem; margin: 2rem 0 .75rem; color: var(--text); scroll-margin-top: 90px; }
.prose h4 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; color: var(--text); }
.prose p { margin: 0 0 1.35rem; }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.35rem; }
.prose li { margin: .35rem 0; }
.prose li::marker { color: var(--primary); }
.prose blockquote {
    margin: 1.75rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--primary); background: var(--bg-soft);
    border-radius: 0 var(--radius) var(--radius) 0; color: var(--text);
}
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: var(--radius); margin: 2rem auto; border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-soft); border: 1px solid var(--border); padding: .12em .4em; border-radius: 6px; color: var(--text); }
.prose pre { position: relative; background: var(--code-bg); color: var(--code-text); padding: 1.15rem 1.25rem; border-radius: var(--radius); overflow-x: auto; margin: 1.5rem 0; font-size: .88rem; line-height: 1.7; border: 1px solid rgba(148, 163, 184, .15); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose pre .copy-btn { position: absolute; top: .6rem; right: .6rem; opacity: 0; transition: opacity .2s; }
.prose pre:hover .copy-btn { opacity: 1; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .6rem .8rem; text-align: left; }
.prose th { background: var(--bg-soft); color: var(--text); }
.heading-anchor { display: block; position: relative; top: -90px; visibility: hidden; }

.article-foot { max-width: 720px; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1.5rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.share span { font-weight: 700; font-size: .9rem; margin-right: .25rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-nav a { padding: 1.1rem 1.25rem; }
.post-nav small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: .2rem; }
.post-nav strong { font-size: .95rem; line-height: 1.35; display: block; }
.post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: auto; } }

/* ---------- CTA & footer ---------- */
.cta {
    position: relative; overflow: hidden; padding: 3.5rem 2rem; text-align: center; border-radius: var(--radius-xl);
    background: var(--grad); color: #fff;
}
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 0%, rgba(255, 255, 255, .25), transparent 45%); pointer-events: none; }
.cta h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); color: #fff; }
.cta p { color: rgba(255, 255, 255, .88); max-width: 560px; margin: 0 auto 1.75rem; }
.cta .btn { background: #fff; color: #0f172a; position: relative; z-index: 1; }
.cta .btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }

.site-footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid h5 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-grid ul a { color: var(--text-soft); font-size: .93rem; }
.footer-grid ul a:hover { color: var(--primary); }
.footer-grid p { color: var(--muted); font-size: .92rem; max-width: 320px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }

/* ---------- Animations ---------- */
.reveal { transition: opacity .6s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.pending { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .reveal.pending { opacity: 1; transform: none; transition: none; }
    .btn, .card, .platform { transition: none; }
}

@media (max-width: 600px) {
    .container { padding: 0 1rem; }
    .section { padding: 4rem 0; }
    .hero { padding: 4.5rem 0 3.5rem; }
    .hero-stats { gap: 1.5rem; }
    .product-card-body { padding: 1.35rem; }
    .lang-switch a { padding: .25rem .5rem; }
}
.prose pre code.hljs { padding: 0; background: none; }

/* ---------- Timeline Dunia ---------- */
.tl-wrap { max-width: 900px; }
.tl-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.25rem; }
.tl-toolbar .search { max-width: none; flex: 1 1 220px; }
.tl-input {
    padding: .6rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev);
    color: var(--text); font: inherit; font-size: .88rem; min-width: 0;
}
.tl-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.tl-year { width: 150px; }
.tl-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; font-weight: 600; color: var(--text-soft); cursor: pointer; }
.tl-check input { accent-color: var(--primary); width: 16px; height: 16px; }
.tl-eras { margin-bottom: 1.75rem; }
.tl-eras small { font-weight: 500; }
.tl-hint { font-size: .8rem; margin: 0 0 1rem; }

.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 1.05rem; top: .5rem; bottom: .5rem; width: 2px; background: linear-gradient(var(--primary), var(--secondary)); opacity: .35; border-radius: 2px; }
.tl-era { position: relative; margin: 2rem 0 1rem; }
.tl-era:first-child { margin-top: 0; }
.tl-era span {
    display: inline-block; padding: .3rem .85rem; border-radius: 999px; font-size: .74rem; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--grad);
}
/* content-visibility melewati render item di luar layar; ikon harus di dalam kotak item (paint containment) */
.tl-item { position: relative; padding-left: 2.6rem; margin-bottom: 1rem; content-visibility: auto; contain-intrinsic-size: auto 130px; }
.tl-dot {
    position: absolute; left: 0; top: .9rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
    display: grid; place-items: center; font-size: .95rem; background: var(--bg-elev); border: 2px solid var(--border-strong);
}
.tl-item.imp-4 .tl-dot, .tl-item.imp-5 .tl-dot { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.tl-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; transition: border-color .2s; }
.tl-card:hover { border-color: var(--border-strong); }
.tl-item.imp-5 .tl-card { border-left: 3px solid var(--primary); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.tl-date { font-family: var(--font-mono); font-weight: 600; font-size: .85rem; color: var(--primary); }
.tl-region { font-size: .75rem; color: var(--muted); }
.tl-card h3 { font-size: 1.08rem; margin: 0; line-height: 1.4; }
.tl-card h3 a:hover { color: var(--primary); }
.tl-item.imp-5 .tl-card h3 { font-size: 1.2rem; }
.tl-card p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-more { text-align: center; margin-top: 2rem; }
.tl-more .btn.is-loading { opacity: .6; pointer-events: none; }

.tl-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tl-dates .card { padding: 1.1rem 1.25rem; }
.tl-dates small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.tl-dates strong { font-size: 1.15rem; }
.tl-note { font-size: .8rem; margin: .75rem 0 0; }
.tl-refs { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.tl-refs h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.tl-refs ol { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .75rem; }
.tl-refs li { font-size: .9rem; line-height: 1.6; color: var(--text-soft); padding-left: .25rem; overflow-wrap: anywhere; }
.tl-refs li a { color: var(--primary); }
.tl-ref-type { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0 .45rem; margin-right: .25rem; vertical-align: 1px; }

@media (max-width: 680px) {
    .tl-item { padding-left: 2.2rem; }
    .tl::before { left: .85rem; }
    .tl-dot { width: 1.8rem; height: 1.8rem; font-size: .8rem; }
    .tl-year { width: 100%; }
    .tl-toolbar select { flex: 1 1 100%; }
    .tl-dates { grid-template-columns: 1fr; }
}
