/* lpdf.io — custom styles */

/* ── Theme tokens ── */
:root {
    color-scheme: light;
    --bg: #fcfcfc;
    --bg-elev: #ffffff;
    --bg-sunken: #f6f6f4;
    --border: #e8e8e5;
    --text: #0a0a09;
    --text-muted: #6b6b66;
    --text-subtle: #95958f;
    --brand: oklch(62% 0.14 250);
    --success: oklch(58% 0.12 155);
    --nav-h: 60px;
}
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a0a09;
    --bg-elev: #141413;
    --bg-sunken: #0f0f0e;
    --border: #232321;
    --text: #f5f5f2;
    --text-muted: #9a9a94;
    --text-subtle: #66665f;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
html, body { height: 100%; margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--rl-font-sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* ── Logo dark/light — CSS-driven so it works regardless of load order ── */
[data-theme="dark"]  .logo-light { display: none; }
[data-theme="dark"]  .logo-dark  { display: block; }
[data-theme="light"] .logo-dark  { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: color-mix(in oklch, var(--bg) 65%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 2rem; }
.nav-logo img { height: 28px; width: auto; display: block; }
.nav-links a { font-size: 0.9375rem; color: var(--text-muted); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 500; }
.nav-section-label { font-size: 0.875rem; color: var(--text-subtle); letter-spacing: 0.08em; text-transform: uppercase; padding-left: 1rem; border-left: 1px solid var(--border); }
.nav-back { display: flex; align-items: center; color: var(--text-muted); transition: color .15s; }
.nav-back:hover { color: var(--text); }
.theme-btn {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: none; background: none; cursor: pointer;
    border-radius: 7px; color: var(--text-muted);
    transition: color .15s, background .15s;
}
.theme-btn:hover { color: var(--text); background: var(--bg-sunken); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; font-size: 0.9375rem; font-weight: 500;
    border-radius: 7px; border: none; cursor: pointer;
    font-family: var(--rl-font-sans);
    transition: opacity .15s, transform .08s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:hover { opacity: .88; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-secondary { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); }
.btn-lg { padding: 0.75rem 1.375rem; font-size: 1rem; border-radius: 8px; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.875rem; border-radius: 6px; }

/* ── Page scroll offset for fixed nav ── */
main { padding-top: var(--nav-h); }

/* ── Sections ── */
.section { padding: 5.5rem 2rem; border-top: 1px solid var(--border); }
.section-sunken { background: var(--bg-sunken); }
.container { max-width: 1120px; margin: 0 auto; }

/* ── Section header ── */
.section-label { font-family: var(--rl-font-mono); font-size: 0.8125rem; color: var(--text-subtle); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 0.75rem; }
.section-title { font-size: clamp(1.8125rem, 4vw, 2.5625rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.section-body { font-size: 1.0625rem; color: var(--text-muted); line-height: 1.6; max-width: 40rem; }

/* ── Placeholder blocks ── */
.placeholder {
    background: var(--bg-sunken);
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-subtle);
    font-size: 0.875rem;
    font-family: var(--rl-font-mono);
    min-height: 8rem;
}

/* ── Footer ── */
footer { border-top: 1px solid var(--border); }
.footer-logo img { height: 1.5rem; width: auto; display: block; }
.footer-links a { font-size: 0.875rem; color: var(--text-subtle); }
.footer-links a:hover { color: var(--text-muted); }

/* ── Badge ── */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; font-size: 0.8125rem; font-weight: 500;
    border-radius: 999px; line-height: 1.5; letter-spacing: .01em;
    background: var(--bg-sunken); color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--success); flex-shrink: 0; }

/* ── Code window ── */
.code-window {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 24px 48px -12px rgba(0,0,0,.1), 0 8px 16px -4px rgba(0,0,0,.05);
    overflow: hidden;
}
[data-theme="dark"] .code-window {
    box-shadow: 0 24px 48px -12px rgba(0,0,0,.6), 0 8px 16px -4px rgba(0,0,0,.3);
}
.code-titlebar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    background: var(--bg-sunken);
}
.code-dot { width: 10px; height: 10px; border-radius: 99px; flex-shrink: 0; }
.code-filename { font-family: var(--rl-font-mono); font-size: 0.8125rem; color: var(--text-subtle); margin-left: 10px; }
.code-body {
    font-family: var(--rl-font-mono); font-size: 0.875rem;
    line-height: 1.75; padding: 22px 24px;
    overflow-x: auto; white-space: pre; color: var(--text);
}

/* ── Syntax tokens ── */
.t-tag  { color: color-mix(in oklch, var(--brand) 85%, var(--text-muted)); }
.t-attr { color: var(--text-muted); }
.t-val  { color: oklch(60% 0.14 145); }
.t-cmt  { color: var(--text-subtle); }

/* ── Feature cells ── */
.feat-cell { background: var(--bg-elev); padding: 2rem 1.75rem; }
.feat-icon {
    width: 32px; height: 32px; border-radius: 7px;
    background: var(--bg-sunken); border: 1px solid var(--border);
    display: grid; place-items: center; margin-bottom: 1.125rem; color: var(--text);
}
.feat-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.375rem; letter-spacing: -.01em; }
.feat-body  { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.55; }

/* ── Format traits ── */
.format-point { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.format-point:last-child { border-bottom: none; }
.format-point-icon {
    width: 28px; height: 28px; border-radius: 6px;
    background: var(--bg-sunken); border: 1px solid var(--border);
    display: grid; place-items: center; flex-shrink: 0; color: var(--text); margin-top: 2px;
}
.format-point-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 4px; }
.format-point-body  { font-size: 0.90625rem; color: var(--text-muted); line-height: 1.5; }

/* ── Document-type cards ── */
.doc-card {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem;
    display: flex; flex-direction: column; gap: 0.625rem;
}
.doc-card-icon {
    width: 36px; height: 36px; background: var(--bg-sunken);
    border: 1px solid var(--border); border-radius: 8px;
    display: grid; place-items: center; color: var(--text);
}
.doc-card-title { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.doc-card-body  { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.55; flex: 1; }

/* ── Capability chips ── */
.cap-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; font-size: 0.875rem; font-weight: 500;
    border-radius: 999px; background: var(--bg-sunken);
    border: 1px solid var(--border); color: var(--text-muted);
}
.cap-chip svg { color: var(--success); flex-shrink: 0; }

/* ── Platform cards ── */
.plat-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; width: 5.5rem; padding: 1.25rem 0.5rem;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-elev); transition: border-color .15s;
}
.plat-card:hover { border-color: var(--text-subtle); }
.plat-name { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }

/* ── Comparison table ── */
.cmp-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th {
    padding: 12px 16px; font-size: 0.6875rem; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-subtle); background: var(--bg-sunken);
    border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.cmp-table th:first-child { text-align: left; }
.cmp-table th.cmp-h-lpdf {
    background: color-mix(in oklch, var(--brand) 8%, var(--bg-sunken));
    color: var(--brand);
    border-bottom: 2px solid color-mix(in oklch, var(--brand) 40%, transparent);
}
.cmp-table td {
    padding: 13px 16px; font-size: 0.84375rem;
    border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle;
}
.cmp-table td:first-child { text-align: left; font-weight: 500; color: var(--text); }
.cmp-table td.cmp-d-lpdf { background: color-mix(in oklch, var(--brand) 4%, var(--bg-elev)); }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr:hover td { background: var(--bg-sunken); }
.cmp-table tr:hover td.cmp-d-lpdf { background: color-mix(in oklch, var(--brand) 7%, var(--bg-sunken)); }
.cmp-yes     { color: var(--success); }
.cmp-no      { color: var(--text-subtle); }
.cmp-partial { color: oklch(68% 0.13 70); }
.cmp-lib { font-size: 0.6875rem; color: var(--text-subtle); display: block; font-weight: 400; margin-top: 2px; font-family: var(--rl-font-mono); }
