/*
 * Happyberg Labs — shared theme
 *
 * Time-of-day aware. The default tokens are the daytime palette.
 * Apply class names to <body> to swap palettes (see /theme.js):
 *
 *   body.golden-hour   — early morning (06–08) or evening (17–21)
 *   body.night-mode    — late night (21–06)
 *
 * Page-specific layouts can override on top of this. The home keeps its
 * own inline copy of these rules + JS so it remains self-contained.
 */

:root {
    --ink: #0f2b3d;
    --stone: #44525f;
    --cloud: #f7f9fb;
    --paper: #ffffff;
    --warm: #faf7f5;
    --line: #e6edf3;
    --accent: #6b46c1;
    --radius: 16px;
}

/* Golden hour: subtle warm shift in background */
body.golden-hour {
    --warm: #fff5e6;
    --cloud: #ffecd2;
}

/* Night mode: full dark palette */
body.night-mode {
    --ink: #e8f0f8;
    --stone: #8fa8bc;
    --cloud: #0b1a2e;
    --paper: #102540;
    --warm: #0e2240;
    --line: #1e3a52;
}

/* ─── Reset ─────────────────────────────────────────────────────────── */

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

body {
    font: 400 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica Neue, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--warm), var(--cloud));
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background 1.2s ease;
}

/* ─── Layout ────────────────────────────────────────────────────────── */

.wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px clamp(20px, 4vw, 40px);
}

/* ─── Navigation ────────────────────────────────────────────────────── */

nav {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
}

nav a:hover { text-decoration: underline; }

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--stone);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--ink);
}

/* ─── Typography ────────────────────────────────────────────────────── */

h1 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 48px 0 16px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 48px 0 12px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 32px 0 8px;
}

p { margin-bottom: 12px; }

ul, ol {
    margin: 12px 0 16px;
    padding-left: 24px;
}

li { margin-bottom: 6px; }

strong { font-weight: 600; }

a { color: var(--accent); }

a:hover { text-decoration: underline; }

.lede {
    font-size: 19px;
    color: var(--stone);
    margin-bottom: 48px;
    line-height: 1.6;
}

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

.note {
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 32px 0;
    font-size: 15px;
    color: var(--stone);
}

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

footer {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    color: var(--stone);
    font-size: 13px;
    text-align: center;
    margin-top: 64px;
}

footer a {
    color: var(--stone);
    text-decoration: none;
}

footer a:hover { color: var(--ink); }

/* ─── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    h1 { margin-top: 32px; }
    .nav-links { gap: 16px; }
}
