/* Default design: JavaScript only overrides these custom properties. */
:root {
    --serif: "League Spartan", sans-serif;
    --sans: system-ui, sans-serif;
    --title-size: 100px;
    --lead-size: 28px;
    --brand-size: 23px;
    --nav-size: 18px;
    --schedule-size: 14px;
    --eyebrow-size: 12px;
    --intro-size: 28px;
    --body-size: 18px;
    --heading-size: 36px;
    --subheading-size: 20px;
    --portrait-label-size: 25px;
    --quote-size: 26px;
    --caption-size: 15px;
    --button-size: 15px;
    --toc-size: 14px;
    --footer-size: 14px;
    --paper: #f8f6f0;
    --ink: #283a34;
    --muted: #52665d;
    --accent: #a56543;
    --line: #d9ded4;
    --panel: #e7ece3;
    --title-color: #F4BDA2;
    --hero-height: 92svh;
    --image-y: 50%;
    --shade: 0;
    --portrait-size: 190px;
    --line-height: 1.75;
    --section-space: 50px;
    --radius: 0px;
    --image-x: 50%;
    --opacity: 80%;
    --content-width: 100%;
    --align: center;
    --text-align: center;
    --vertical: center;
    --nav-height: 80px;
    --barshade: 0.2;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-size: var(--body-size);
    line-height: var(--line-height);
    font-family: var(--sans);
    background: #415b5b;
    isolation: isolate;
}

a {
    color: inherit;
    text-underline-offset: .22em;
}

a:focus-visible {
    outline: 3px solid #bc865c;
    outline-offset: 5px;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.15;
}

h2 {
    font-size: clamp(28px,3vw,42px);
}

h3 {
    font-size: var(--subheading-size);
    font-weight: 600;
    margin: 2rem 0 .6rem;
}

p {
    margin-bottom: 1.15em;
}

.hero {
    min-height: var(--hero-height);
    position: relative;
    display: flex;
    flex-direction: column;
    color: #fff;
    /* background: #415b5b url("pictures/20200802_061022.jpg") center / cover no-repeat;
    background-position: var(--image-x) var(--image-y); */
}

.hero:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(17, 32, 33, var(--shade));
    pointer-events: none;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 6%;
    border-bottom: 1px solid #ffffff38;
    width: 100%;
    background-color: rgba(0,0,0, var(--barshade));
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    text-shadow: 0 1px 8px #142b2b;
    flex-wrap: wrap;
    position: relative;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--serif);
    font-size: var(--brand-size);
    overflow-wrap: anywhere;
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: var(--nav-size);
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.navlinks a {
    text-decoration: none;
    transition: color .2s,background .2s;
    overflow-wrap: anywhere;
}

.navcta {
    border: 1px solid #ffffff90;
    border-radius: 40px;
    padding: 9px 18px;
}

.hero-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: var(--align);
    justify-content: var(--vertical);
    text-align: var(--text-align);
    padding: 70px 24px;
    text-shadow: 4px 4px 5px #142b2b80;
    position: relative;
    overflow-wrap: anywhere;
}

.eyebrow {
    font-size: var(--eyebrow-size);
    font-weight: 650;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: min(var(--title-size), 15vw);
    letter-spacing: -.045em;
    margin: 0 0 20px;
    color: var(--title-color);
    font-weight: 700;
}

.lead {
    font-family: var(--serif);
    font-size: var(--lead-size);
    max-width: 650px;
    line-height: 1.4;
}

.button {
    display: inline-flex;
    gap: 28px;
    align-items: center;
    background: var(--paper);
    color: var(--ink);
    padding: 13px 25px;
    border-radius: 40px;
    text-decoration: none;
    font-size: var(--button-size);
    text-shadow: none;
    margin-top: 15px;
    transition: background .2s;
}

.button:hover {
    background: #e2e7dc;
}

.hero-bottom {
    text-align: center;
    padding: 22px;
    font-size: var(--schedule-size);
    letter-spacing: .08em;
    background-color: rgba(0,0,0,var(--barshade));
    border-top: 1px solid #ffffff38;
    position: relative;
}

.hero-bottom span {
    margin: 0 12px;
}

.welcome {
    max-width: 1200px;
    margin: auto;
    padding: 90px 6%;
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 70px;
    align-items: center;
}

.portrait {
    text-align: center;
}

.portrait img {
    width: var(--portrait-size);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 8px #fff,0 10px 40px #283a341a;
}

.portrait h2 {
    font-size: var(--portrait-label-size);
    margin: 20px 0 0;
}

.intro-text {
    font-family: var(--serif);
    font-size: var(--intro-size);
    line-height: 1.55;
}

.welcome .eyebrow {
    color: var(--accent);
}

.textlink {
    font-size: var(--button-size);
    font-weight: 600;
    color: var(--muted);
}

.reading {
    max-width: 1350px;
    margin: auto;
    padding: 0 6% 90px;
    display: grid;
    grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
    gap: clamp(20px, 5vw, 70px);
    border-top: 1px solid var(--line);
}

aside nav {
    position: sticky;
    top: 32px;
    display: grid;
    gap: 12px;
    padding: 50px 0;
    font-size: var(--toc-size);
    line-height: 1.5;
}

aside a {
    text-decoration: none;
    color: var(--muted);
    border-left: 2px solid var(--line);
    padding-left: 14px;
}

aside a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.chapter {
    padding: 50px 0;
    border-bottom: 1px solid var(--line);
    padding-block: var(--section-space);
}

.chapter h2 {
    margin-bottom: 24px;
    font-size: var(--heading-size);
}

.chapter:last-child {
    border: 0;
    background: var(--panel);
    padding: 38px;
    border-radius: var(--radius);
    margin-top: 40px;
    overflow-wrap: anywhere;
}

.chapter:last-child p {
    line-height: 2;
}

blockquote {
    margin: 35px 0;
    padding: 30px 5%;
    background: var(--panel);
    border-left: 3px solid #8b9d8b;
    font: italic 26px/1.5 var(--serif);
    text-align: center;
    font-size: var(--quote-size);
}

figure {
    margin: 32px 0;
    padding: 20px;
    background: white;
}

figure img {
    display: block;
    margin: auto;
}

figcaption {
    font-size: var(--caption-size);
    color: var(--muted);
    text-align: center;
    margin-top: 16px;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 40px 6%;
    background: var(--ink);
    color: var(--paper);
    font-size: var(--footer-size);
}

/* .navlinks a:hover {
    color: var(--title-color);
} */

main {
    width: 100%;
    margin: auto;
    background: var(--paper);
    container-type: inline-size;
    background: color-mix(in srgb, var(--paper) var(--opacity), transparent);
    width: var(--content-width);
    border-radius: var(--radius);
}

body.no-toc .reading {
    grid-template-columns: 1fr;
}

body.static-toc aside nav {
    position: static;
}

body.portrait-top .welcome {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
}

body.portrait-right .portrait {
    order: 2;
}

body.entry-locked {
    overflow: hidden;
    height: 100svh;
}

body.entry-locked .hero {
    height: 100svh;
    min-height: 100svh;
}

body.entry-locked main,
body.entry-locked footer {
    visibility: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("pictures/20200802_061022.jpg") var(--image-x) var(--image-y) / cover no-repeat;
    z-index: -1;
    pointer-events: none;
}

body.no-toc aside {
    display: none;
}

body.sticky-nav .nav-slot {
    height: var(--nav-height);
    flex: none;
}

body.sticky-nav .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 10;
    background-color: rgba(0,0,0, var(--barshade));
    /* background: transparent; */
}

body.sticky-nav .topbar.scrolled {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 2px 12px #0002;
    text-shadow: none;
}

html.sticky-nav {
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body.sticky-nav aside nav {
    top: calc(var(--nav-height) + 24px);
}

html.entry-locked {
    overflow: hidden;
}

body.portrait-right .welcome {
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
}

.nav-slot {
    position: relative;
    z-index: 10;
}

/* Narrow content areas: also applies to a narrow desktop text panel. */
@container (max-width: 780px) {
    .reading {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    aside nav,
    body.sticky-nav aside nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        padding: 25px 0;
        border-bottom: 1px solid var(--line);
    }

    .welcome,
    body.portrait-right .welcome {
        grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
        gap: 35px;
        padding: 60px 6%;
    }

    body.portrait-top .welcome {
        grid-template-columns: 1fr;
    }
}

@container (max-width: 600px) {
    .welcome,
    body.portrait-right .welcome {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 55px 6%;
        gap: 30px;
    }

    body.portrait-right .portrait {
        order: 0;
    }

    .reading {
        padding: 0 6% 50px;
    }

    .chapter {
        padding-block: calc(var(--section-space) * 0.68);
        overflow-wrap: anywhere;
    }

    .chapter:last-child {
        padding: 24px 18px;
    }

    figure {
        padding: 10px;
    }
}

/* Mobile: keep the text full width and only show the practical link. */
@media (max-width: 600px) {
    body main {
        width: 100%;
        border-radius: 0;
    }

    .topbar {
        padding: 18px 5%;
        gap: 10px;
    }

    .navlinks {
        gap: 8px;
    }

    .navlinks a:not([href="#praktisch"]) {
        display: none;
    }

    .navcta {
        padding: 5px 9px;
    }

    .hero-copy {
        padding: 50px 18px;
    }

    .hero h1 {
        font-size: min(var(--title-size), 13vw);
    }

    .hero-bottom {
        letter-spacing: 0;
    }

    .portrait img {
        max-width: 65vw;
    }

    footer {
        flex-wrap: wrap;
    }
}

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

    * {
        transition: none !important;
    }
}
