/* Shared styles for every page of elementalfoundation.eu: colour tokens (light
   and dark), page and panel layout, type, the sub-page top bar, the footer and
   the components more than one page uses. Page-specific rules stay in each
   page's own <style> block, which comes after this file and can override it.
   No framework: one root size for every page, 16 px on phone, 18 px from
   768 px up. */

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

@media (min-width: 768px) {
    html { font-size: 112.5%; }
}

:root {
    --bg: #f3f0ea;
    --surface: rgba(255, 252, 248, 0.9);
    --border: rgba(76, 66, 58, 0.17);
    --text: #241d17;
    --muted: #65584d;
    --accent: #a64a15;
    --accent-soft: rgba(180, 83, 26, 0.10);
    --green: #0f6e56;
    --green-soft: rgba(15, 110, 86, 0.08);
    --red: #a32d2d;
    --warm: #854f0b;
    --shadow: 0 22px 58px rgba(56, 45, 35, 0.12);
    --glow-one: rgba(232, 135, 30, 0.10);
    --glow-two: rgba(203, 170, 121, 0.10);
    --panel-radius: 22px;
    --svg-text: #241d17;
    --svg-muted: #65584d;
    --svg-accent: #a64a15;
    --svg-green: #085041;
    --svg-green-light: #0f6e56;
    --svg-red: #a32d2d;
    --svg-red-light: #993c1d;
    --svg-warm: #633806;
    --svg-warm-light: #854f0b;
    --svg-primary: #4c423a;
    --svg-primary-light: #65584d;
    --svg-line: #9e9588;
    --svg-box-neutral: rgba(241,239,232,0.5);
    --svg-box-warm: rgba(250,238,218,0.6);
    --svg-box-red: rgba(250,236,231,0.6);
    --svg-box-green: rgba(225,245,238,0.6);
    --svg-box-accent: rgba(180,83,26,0.08);
    --svg-box-primary: rgba(76,66,58,0.06);
    --svg-box-red-dashed: rgba(250,236,231,0.4);
    --status-color: #0a7a5a;
    --status-border: rgba(15, 110, 86, 0.3);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12100d;
        --surface: rgba(22, 19, 17, 0.9);
        --border: rgba(209, 197, 183, 0.12);
        --text: #f0e9df;
        --muted: #baa99a;
        --accent: #e8871e;
        --accent-soft: rgba(232, 135, 30, 0.12);
        --green-soft: rgba(15, 110, 86, 0.10);
        --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
        --glow-one: rgba(232, 135, 30, 0.08);
        --glow-two: rgba(214, 176, 118, 0.08);
        --svg-text: #f0e9df;
        --svg-muted: #baa99a;
        --svg-accent: #e8871e;
        --svg-green: #4fd1a8;
        --svg-green-light: #3ab090;
        --svg-red: #e06060;
        --svg-red-light: #c05050;
        --svg-warm: #d4a44a;
        --svg-warm-light: #b8873a;
        --svg-primary: #d8cdbf;
        --svg-primary-light: #baa99a;
        --svg-line: #5F5E5A;
        --svg-box-neutral: rgba(241,239,232,0.06);
        --svg-box-warm: rgba(133,79,11,0.12);
        --svg-box-red: rgba(163,45,45,0.12);
        --svg-box-green: rgba(15,110,86,0.12);
        --svg-box-accent: rgba(232,135,30,0.12);
        --svg-box-primary: rgba(241,239,232,0.06);
        --svg-box-red-dashed: rgba(163,45,45,0.08);
        --status-color: #4fd1a8;
        --status-border: rgba(15, 110, 86, 0.3);
    }
}

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

/* Slim bar that stays at the top while scrolling: logo and name go home, plus an explicit link. */
.topbar {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1.1rem 0.5rem 0.8rem;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.topbar a { text-decoration: none; }

.topbar a:hover { text-decoration: underline; }

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* The D1 mark only (no wordmark, the name sits next to it), the same files as
   the homepage header. The mark is about 1.4 times wider than tall. */
.topbar img { width: 50px; height: auto; display: block; }

.topbar .brand span { white-space: nowrap; }

/* Padding lifts the tap target well past the 24 px minimum. */
.topbar .home { color: var(--accent); font-size: 0.9rem; white-space: nowrap; padding: 0.5rem 0; }

/* Right-hand side of the bar: the language switch, then the way home. */
.topbar-end { display: flex; align-items: center; gap: 1rem; }

/* EN | NL: the current language in plain text, the other one a link. The link
   goes through /lang/<code>/<page>, where Caddy stores the choice in a cookie. */
.lang { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }

.lang .current { color: var(--text); }

.lang .sep { color: var(--muted); font-weight: 400; }

.lang a { color: var(--accent); padding: 0.5rem 0.15rem; }

@media (max-width: 480px) {
    .topbar { padding-right: 0.9rem; }
    .topbar-end { gap: 0.7rem; }
    .topbar .brand { font-size: 0.85rem; gap: 0.5rem; }
}

/* The switch and the home link need the room on a phone: the name shortens to "Elemental". */
@media (max-width: 480px) {
    .topbar .brand .long { display: none; }
}

.topbar .logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
    .topbar .logo-light { display: none; }
    .topbar .logo-dark { display: block; }
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(ellipse at 20% 0%, var(--glow-one), transparent 40rem),
        radial-gradient(ellipse at 80% 100%, var(--glow-two), transparent 50rem),
        var(--bg);
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
}

.panel {
    container-type: inline-size;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

h1 {
    color: var(--text);
    /* Scale with the panel (container) width, not the viewport, so the
       heading always tracks its fixed-width card and can never outgrow it
       and wrap — even when the browser's default font size is large. The
       rem cap only limits the size on a normal-sized root font. */
    font-size: min(2.4rem, 7.5cqi);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: clamp(1.15rem, 4.5cqi, 1.4rem);
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

p { margin-bottom: 1rem; color: var(--muted); font-size: 0.95rem; }

p:last-child { margin-bottom: 0; }

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.highlight { color: var(--text); font-weight: 500; }

a { color: var(--accent); text-decoration: none; font-weight: 500; }

a:hover { text-decoration: underline; }

.svg-container { margin: 1.5rem 0; }

.svg-container svg { width: 100%; height: auto; display: block; }

blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.8rem 1.2rem;
    margin: 1.5rem 0;
    background: var(--accent-soft);
    border-radius: 0 8px 8px 0;
}

blockquote p { color: var(--text); font-style: italic; }

.status-badge {
    display: inline-block;
    background: var(--green-soft);
    border: 1px solid var(--status-border);
    color: var(--status-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.status-badge.draft { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* The three editions: one card each, side by side when the panel is wide enough. */
.editions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1.5rem 0 0; }

.edition { border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.1rem 1.2rem; background: var(--accent-soft); }

.edition svg { width: 44px; height: 44px; display: block; margin-bottom: 0.6rem; }

.edition h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 0.15rem; }

.edition .for { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.7rem; }

.edition ul { padding-left: 1.1rem; margin: 0 0 0.9rem; color: var(--muted); font-size: 0.88rem; }

.edition li { margin-bottom: 0.35rem; }

.edition .stage { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 5px; color: var(--svg-warm); background: var(--svg-box-warm); }

.plain-list { padding-left: 1.2rem; color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }

.plain-list li { margin-bottom: 0.5rem; }

/* A call-to-action button: the accent colour, white text. */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn:hover { text-decoration: none; filter: brightness(1.1); }

.action { margin-top: 1.1rem; margin-bottom: 0; }

@media (prefers-color-scheme: dark) {
    .btn { color: #1a1208; }
}
