/*
 * Opryskownik – style bazowe
 * Kolejność plików: app.css (zmienne, reset, typografia) → layout.css → components.css → pages.css
 */

/* ---------- Fonty (self-hosted, bez Google Fonts – RODO) ---------- */
@font-face {
    font-family: 'Plex Sans';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-wght-normal-RssxsJZ.woff2") format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plex Sans';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-ext-wght-normal-6jrsEWt.woff2") format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Serif';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-wght-normal-jg6Byvd.woff2") format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Serif';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-ext-wght-normal-djyBhpt.woff2") format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Serif';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-wght-italic-oITo-LT.woff2") format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Serif';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-ext-wght-italic-xMV4wwq.woff2") format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-500-normal-QJNNIVc.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-ext-500-normal-Uqu9TNw.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Zmienne ---------- */
:root {
    /* papier i tusz */
    --paper: #f5f2ea;
    --paper-deep: #ece6d7;
    --surface: #fffdf8;
    --ink: #1b231d;
    --ink-soft: #435046;
    --ink-muted: #6b746b;
    --line: #dcd4c2;
    --line-strong: #bfb5a0;

    /* zieleń pola */
    --green-950: #102217;
    --green-900: #16301f;
    --green-800: #1d3f28;
    --green-700: #245030;
    --green-600: #2d6239;
    --green-200: #c9d8c1;
    --green-100: #e2eadb;
    --green-50: #eff3ea;

    /* rzepak – akcent, używany oszczędnie */
    --rape-500: #e2b030;
    --rape-400: #ebc455;
    --rape-100: #f7ecc7;

    /* stany */
    --danger: #a3402a;
    --danger-bg: #f8e6df;
    --success: #2d6239;
    --success-bg: #e2eadb;
    --warning-bg: #f7ecc7;

    --font-sans: 'Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-serif: 'Source Serif', Georgia, 'Times New Roman', serif;
    --font-mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --radius-sm: 3px;
    --radius: 5px;
    --radius-lg: 8px;

    --container: 1200px;
    --gutter: clamp(20px, 4vw, 40px);

    --focus: 0 0 0 3px rgba(226, 176, 48, .55);
    --shadow-window: 0 1px 0 rgba(27, 35, 29, .04), 0 18px 40px -18px rgba(22, 48, 31, .35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    font-feature-settings: 'kern', 'liga';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--green-900); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

::selection { background: var(--rape-400); color: var(--ink); }

/* ---------- Typografia ---------- */
.h-display,
.h1, .h2, .h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -.012em;
    text-wrap: balance;
}

.h-display { font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -.02em; }
.h1 { font-size: clamp(2.2rem, 4vw, 3.1rem); line-height: 1.08; }
.h2 { font-size: clamp(1.75rem, 2.8vw, 2.35rem); line-height: 1.15; }
.h3 { font-size: 1.3rem; line-height: 1.3; }

.h-display em, .h1 em, .h2 em { font-style: italic; font-weight: 500; color: var(--green-700); }

.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); max-width: 38em; text-wrap: pretty; }

.kicker {
    display: block;
    margin-bottom: 14px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--green-700);
}

.muted { color: var(--ink-muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-family: var(--font-serif); font-size: 1.75rem; line-height: 1.2; font-weight: 600; margin-top: 2.2em; letter-spacing: -.01em; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--green-600); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: 12px; top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }
