/*
 * SPDX-License-Identifier: MIT
 * Copyright (c) 2026 Egon Kastelijn
 * File: static/css/site.css
 */

:root {
    color-scheme: light;

    --color-background: #ffffff;
    --color-background-muted: #f2f5f1;
    --color-surface: #ffffff;
    --color-text: #1f2922;
    --color-text-muted: #526057;
    --color-primary: #315c3b;
    --color-primary-dark: #23442b;
    --color-primary-light: #dce8dc;
    --color-border: #d8e0d8;
    --color-header: #18251b;
    --color-header-text: #ffffff;
    --color-shadow: rgb(24 37 27 / 12%);

    --content-width: 72rem;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--color-background);
    color: var(--color-text);

    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 20rem;

    background: var(--color-background);
}

a {
    color: var(--color-primary);

    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--color-primary-dark);
}

a:focus-visible {
    outline: 0.2rem solid var(--color-primary);
    outline-offset: 0.25rem;
}

/*
 * Site header
 */

.site-header {
    background: var(--color-header);
    color: var(--color-header-text);

    box-shadow: 0 0.1rem 0.6rem var(--color-shadow);
}

.site-header__content,
.site-footer__content,
.content,
.hero__content {
    width: min(
        calc(100% - 2rem),
        var(--content-width)
    );

    margin-inline: auto;
}

.site-header__content {
    padding-block: 1rem;
}

.site-title {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;

    color: var(--color-header-text);

    font-size: 1rem;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.site-title strong {
    font-size: 1.35rem;
    letter-spacing: 0.06em;
}

.site-title span {
    color: var(--color-primary-light);
}

.site-title:hover {
    color: var(--color-header-text);
}

.site-title:focus-visible {
    outline-color: var(--color-header-text);
}

/*
 * Hero
 */

.hero {
    display: grid;
    align-items: center;

    min-height: clamp(
        24rem,
        55vw,
        38rem
    );

    background:
        radial-gradient(
            circle at 82% 25%,
            rgb(118 158 126 / 55%) 0,
            rgb(118 158 126 / 0%) 34%
        ),
        radial-gradient(
            circle at 72% 85%,
            rgb(67 111 76 / 75%) 0,
            rgb(67 111 76 / 0%) 40%
        ),
        linear-gradient(
            135deg,
            #182b1d 0%,
            #315c3b 50%,
            #58785f 100%
        );

    color: #ffffff;
}

.hero__content {
    padding-block: 5rem;
}

.hero__eyebrow {
    margin: 0 0 0.75rem;

    color: var(--color-primary-light);

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 17ch;
    margin: 0;

    font-size: clamp(
        2.4rem,
        7vw,
        5.25rem
    );

    line-height: 1.02;
    text-wrap: balance;
}

.hero__introduction {
    max-width: 44rem;
    margin: 1.75rem 0 0;

    color: #edf4ee;

    font-size: clamp(
        1.05rem,
        2.5vw,
        1.35rem
    );

    line-height: 1.55;
}

/*
 * Content
 */

.content-section {
    padding-block: 4.5rem;
}

.content-section--muted {
    background: var(--color-background-muted);
}

.content {
    max-width: 56rem;
}

.content h2 {
    margin: 0 0 1.5rem;

    color: var(--color-primary-dark);

    font-size: clamp(
        1.75rem,
        4vw,
        2.4rem
    );

    line-height: 1.15;
    text-wrap: balance;
}

.content p {
    margin-block: 0 1.25rem;
}

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

.notice {
    margin-top: 2rem;

    padding: 1.25rem 1.5rem;

    border: 1px solid var(--color-border);
    border-left: 0.35rem solid var(--color-primary);
    border-radius: 0.3rem;

    background: var(--color-surface);

    box-shadow:
        0 0.15rem 0.7rem var(--color-shadow);
}

.notice strong {
    display: block;

    margin-bottom: 0.3rem;

    color: var(--color-primary-dark);
}

/*
 * Footer
 */

.site-footer {
    background: var(--color-header);
    color: var(--color-header-text);
}

.site-footer__content {
    padding-block: 2rem;

    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

.site-footer p + p {
    margin-top: 0.3rem;

    color: var(--color-primary-light);
}

/*
 * Narrow screens
 */

@media (max-width: 44rem) {
    .site-header__content,
    .site-footer__content,
    .content,
    .hero__content {
        width: min(
            calc(100% - 1.5rem),
            var(--content-width)
        );
    }

    .site-title {
        display: block;
    }

    .site-title strong,
    .site-title span {
        display: block;
    }

    .site-title span {
        margin-top: 0.15rem;
    }

    .hero {
        min-height: 26rem;
    }

    .hero__content {
        padding-block: 3.75rem;
    }

    .content-section {
        padding-block: 3.25rem;
    }

    .notice {
        padding: 1rem 1.1rem;
    }
}

/*
 * Very narrow screens
 */

@media (max-width: 24rem) {
    .hero h1 {
        font-size: 2.2rem;
    }
}

/*
 * Respect user motion preferences.
 */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
