/* the-gpl redesign — design tokens + shared components.
   Light, minimal theme. No shadows. See public/css/initial/ for the old theme. */

:root {
    --bg: #f7f6f3;
    --panel: #ffffff;
    --panel-alt: #fbfaf8;
    --footer-bg: #f2f1ec;
    --ink: #1a1c22;
    --muted: #6b6f76;
    --faint: #9a9ea3;
    --border: #e6e4de;
    --border-input: #d9d7d0;
    --hairline: #f0efea;
    --accent: #0d8a86;
    --accent-hover: #0a6d6a;
    --accent-tint: #eaf4f3;

    /* dark code panel */
    --code-bg: #14161b;
    --code-key: #5fb8b4;
    --code-sep: #5c6069;
    --code-val: #c9ccd1;

    --radius-sm: 7px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;

    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --ui: "Helvetica Neue", Helvetica, Arial, sans-serif;

    --stripes: repeating-linear-gradient(135deg, #f0efea 0 10px, #f7f6f3 10px 20px);
}

/* ---- reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { border: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: #fff; }

/* main fills between sticky header and footer */
main[role="main"] { flex: 1 0 auto; width: 100%; }

/* ---- headings / type scale ---- */
h1, h2, h3, h4 {
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
    font-weight: 700;
}
h1 { font-size: clamp(30px, 5vw, 52px); letter-spacing: -0.03em; }
h2 { font-size: clamp(22px, 3vw, 30px); }
.hero-title { font-size: clamp(34px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.03em; }
p { margin: 0; line-height: 1.5; }

/* ---- layout ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-960 { max-width: 960px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-900 { max-width: 900px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-820 { max-width: 820px; margin: 0 auto; padding: 0 24px; width: 100%; }

.section { padding: clamp(40px, 6vw, 72px) 24px; }
.fade-up { animation: fadeUp 0.4s ease both; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- shared components ---- */
.kicker {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}
.lede {
    font-size: 17px;
    color: var(--muted);
    max-width: 60ch;
    line-height: 1.5;
}

/* back link to the demos gallery (demo detail + post data pages) */
.demo-back {
    display: inline-block;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 22px;
}
.demo-back:hover { color: var(--accent); }

/* buttons / links styled as buttons */
.btn {
    display: inline-block;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 22px;
    font-family: var(--ui);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.15s, color 0.15s;
}
.btn-dark   { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; background: #2a2d35; }
.btn-light  { background: var(--panel); color: var(--ink); border: 1px solid var(--border-input); }
.btn-light:hover { color: var(--ink); background: var(--panel-alt); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }

/* chip / pill */
.chip {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    background: var(--hairline);
    border-radius: 20px;
    padding: 6px 12px;
    border: none;
    cursor: pointer;
}
.chip:hover { color: var(--ink); }

/* badges */
.badge {
    font-family: var(--mono);
    font-size: 11px;
    border-radius: var(--radius-sm);
    padding: 3px 8px;
}
.badge-route { color: var(--faint); background: var(--panel); border: 1px solid var(--border); }
.badge-tag   { color: var(--accent); background: var(--accent-tint); }

/* cards */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* dark code panel (headers dump) */
.code-panel {
    background: var(--code-bg);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.9;
    color: var(--code-val);
}
.code-panel .k { color: var(--code-key); }
.code-panel .sep { color: var(--code-sep); }
.code-panel .v { color: var(--code-val); }

/* striped placeholder */
.stripes { background-image: var(--stripes); }

/* ---- demo cards (home strip + /demos gallery) ---- */
.demo-grid { display: grid; gap: 16px; }
.demo-card {
    text-align: left;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: inherit;
}
.demo-card:hover { color: inherit; border-color: var(--accent); }
.demo-card-preview {
    position: relative;
    height: 130px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
    overflow: hidden;
}
.demo-card-preview-center { align-items: center; justify-content: center; }
.demo-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.demo-card-badge { position: relative; z-index: 1; }
.demo-card-plain { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.demo-card-body { padding: 16px; }
.demo-card-body-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.demo-card-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.demo-card-short { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
