:root {
    color-scheme: dark;
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --muted: #a1a1aa;
    --border: #27272a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: Inter, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, #09090b 0%, #09090b 58%, #18181b 100%);
    opacity: .9;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
    z-index: -1;
}

a { color: inherit; }

.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(39, 39, 42, .8);
    background: rgba(9, 9, 11, .86);
    backdrop-filter: blur(14px);
}

.site-nav__inner,
.legal-shell,
.site-footer {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.site-nav__inner {
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand,
.back-link,
.eyebrow,
.site-footer {
    font-family: "Space Mono", monospace;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.brand,
.back-link {
    font-size: .72rem;
    text-decoration: none;
}

.back-link { color: var(--muted); }
.back-link:hover { color: var(--foreground); }

.legal-shell { padding-block: 5rem 7rem; }

.legal-header {
    max-width: 54rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.eyebrow {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: .7rem;
}

.legal-header h1 {
    margin: 0;
    font-family: Lora, serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: .98;
    letter-spacing: -.04em;
}

.legal-header p {
    max-width: 42rem;
    margin: 1.5rem 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.legal-copy {
    max-width: 54rem;
    padding-top: 3rem;
    font-family: Lora, serif;
    font-size: 1rem;
    line-height: 1.85;
}

.legal-copy h2,
.legal-copy h3 {
    color: var(--foreground);
    font-family: Lora, serif;
    line-height: 1.25;
    text-wrap: balance;
    scroll-margin-top: 6rem;
}

.legal-copy h2 {
    margin: 4rem 0 1.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    font-size: clamp(1.6rem, 4vw, 2.35rem);
}

.legal-copy h3 {
    margin: 2.5rem 0 1rem;
    font-size: 1.25rem;
}

.legal-copy p { margin: 0 0 1.15rem; }

.legal-copy ol,
.legal-copy ul {
    margin: 0 0 1.5rem;
    padding-left: 1.6rem;
}

.legal-copy li { margin-bottom: .7rem; padding-left: .35rem; }
.legal-copy li > p { margin-bottom: .55rem; }
.legal-copy li::marker { color: var(--muted); font-family: "Space Mono", monospace; font-size: .78em; }

.legal-copy blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 2px solid var(--foreground);
    background: rgba(24, 24, 27, .7);
}

.legal-copy blockquote p:last-child { margin-bottom: 0; }

.legal-copy a {
    text-decoration-color: #71717a;
    text-underline-offset: .2em;
}

.legal-copy a:hover { text-decoration-color: var(--foreground); }

.legal-copy u { text-underline-offset: .2em; }

.legal-copy .legal-toc {
    margin-bottom: 4rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    background: rgba(24, 24, 27, .45);
}

.legal-copy .legal-toc::before {
    content: "Spis treści";
    display: block;
    margin-bottom: 1rem;
    color: var(--muted);
    font-family: "Space Mono", monospace;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal-copy .legal-toc p { margin: 0; border-top: 1px solid var(--border); }
.legal-copy .legal-toc p:first-of-type { border-top: 0; }
.legal-copy .legal-toc a { display: block; padding: .65rem 0; text-decoration: none; }
.legal-copy .legal-toc a:hover { color: var(--muted); }

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-block: 2rem 3rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .65rem;
}

.site-footer p { margin: 0; }
.site-footer a { text-underline-offset: .25em; }
.site-footer a:hover { color: var(--foreground); }

@media (max-width: 42rem) {
    .site-nav__inner { min-height: 3.75rem; }
    .brand { max-width: 12rem; line-height: 1.35; }
    .legal-shell { padding-block: 3.5rem 5rem; }
    .legal-copy { font-size: .96rem; line-height: 1.75; }
    .legal-copy h2 { margin-top: 3rem; }
    .legal-copy ol, .legal-copy ul { padding-left: 1.25rem; }
}
