/** 
Globale Variablen (überall gültig!) 
 */

:root {
    --text-default: #15161a;
    --text-reduced: hsl(215, 8%, 50%);
    --text-light: #c0c0c0;
    --text-link: hsl(213, 58%, 30%);

    --bg-default: hsl(213, 58%, 98%);
    --bg-lessons: hsl(213, 58%, 94%);
    --bg-box-light: #fff;

    --shape-color1: #c94a4a;
    --shape-color2: #4a8cc9;
    --shape-color3: #4ac95b;
    --shape-color4: #f3e28b;

    --font-basic: "Courier";
    --font-basic-default: "monospace";
    --font-headlines: "Georgia";
    --font-headlines-default: "serif";
    --font-code: "Courier";
    --font-code-default: "monospace";
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg-default);
    color: var(--text-default);

    font-family: var(--font-basic), var(--font-basic-default);
    font-size: 1.2rem;
}

.lesson {
    background: var(--bg-lessons);
}

h1 {
    font-family: var(--font-headlines), var(--font-headlines-default);
    font-size: clamp(3em, 8vw, 5em);
    font-weight: 700;
    line-height: 1;
    margin: 0.5rem 0 3rem -0.1em;
}

h2 {
    font-family: var(--font-headlines), var(--font-headlines-default);
    font-size: clamp(1.5em, 3vw, 2em);
    font-weight: 700;
    line-height: 1.2;
    margin: 0.3rem 0 2rem -0.08em;
}

p {
    max-width: 65ch;
    margin-bottom: 1.2em;
    font-size: 1.15em;
    line-height: 1.5;
}

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

button {
    font-family: var(--font-basic), var(--font-basic-default);
}

a {
    color: inherit;
}

code {
    font-family: var(--font-code), var(--font-code-default);
    text-transform: lowercase;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo,
nav,
.hero h1,
.hero .circle,
.lesson-text h2,
.lesson-link,
.square,
.button,
.pulse .inner-box {
    filter: url("filter/filter.svg#ink");
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.5rem;
    border-bottom: 1.5px dashed var(--text-light);
    background: var(--bg-box-light);
}

.logo {
    font-family: var(--font-headlines), var(--font-headlines-default);
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-default);
    text-decoration: none;
}


nav ul {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

nav .home-link {
    padding: 0 0.5rem;
}

.lesson-nr a {
    padding: 0.6rem 1rem;
    border: 2px solid var(--text-reduced);
}

nav a {
    display: inline-block;
    padding-bottom: 2px;
    border-bottom: 1.5px solid var(--text-reduced);
    font-size: 1em;
    color: var(--text-reduced);
    text-decoration: none;
    transition: color 0.15s;
}

nav a:hover,
nav a:focus-visible,
.current a {
    color: var(--text-default);
    border-color: var(--text-default);
}

main {
    padding: 10vh 0 4em;
    max-width: 1280px;
    margin: 0 auto 6rem;
}

.hero {
    margin-bottom: 5rem;
    padding: 1rem 2.5em;
}

.teaser {
    margin: 1rem auto 5rem;
}

.lessons {
    padding: 0 1.5em;
}

.lesson-block {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    /*    align-items: center;*/
    padding: 2.5rem;
    margin-bottom: 4em;
    border: 1.5px dashed var(--text-light);
    background-color: var(--bg-lessons);
}

.home .lesson-block:nth-of-type(even) {
    flex-direction: row-reverse;
}

.lesson .lesson-block {
    flex-direction: column;
    margin-bottom: 8em;
}

.resources .lesson-block {
    padding: 4rem;
    background-color: var(--bg-box-light);
}

.lesson-text {
    flex: 2 1;
    min-width: 28ch;
    padding: 1rem;
}

.lesson-block ul {
    list-style: none;
    padding: 0;
}

.lesson-block li {
    margin-bottom: 2.5em;
    padding-top: 0.6em;
    border-top: 1.5px dashed var(--text-light);
}

.lesson-tag {
    display: inline-block;
    font-family: var(--font-basic), var(--font-basic-default);
    font-size: 0.9em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-reduced);
    margin-bottom: 0.5rem;
}

.hero p a,
.lesson-block p a,
.lesson-block li a {
    color: var(--text-link);
    text-decoration: none;
}

.resources .lesson-block a {
    display: inline-block;
    margin-bottom: 0.4em;
    font-size: 1.5em;
}

.lesson-link {
    display: inline-block;
    margin-top: 1em;
    padding: 0.8em 1.6em;
    font-size: 0.9em;
    /*  font-weight:700; */
    color: var(--text-reduced);
    border: 1.5px solid;
    text-decoration: none;
    transition:
        background-color 0.15s,
        color 0.15s;
}

.lesson-link:hover,
.lesson-link:focus-visible {
    /* background: var(--bg-box-light); */
    color: var(--text-default);
}

.home figure {
    background: var(--bg-box-light);
}

.show {
    margin: 3em 0 5em;
    padding: 1.5rem;
    background-color: var(--bg-box-light);
}

.home .lesson-image,
.img-placeholder {
    position: relative;
    min-width: 320px;
    min-height: 320px;

    flex: 1 1; /* flex-grow flex-shrink flex-basis */
    border: 2px solid var(--text-light);
    background-color: #c94a4a;
}

.home .lesson-image img,
.img-placeholder img {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
}

.home .lesson-image figcaption,
.img-placeholder figcaption {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 0.75em;
    color: var(--text-light);
}

.inner-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    min-height: 400px;
    border: 1px dashed var(--text-light);
}

.lesson figcaption {
    padding: 1.5rem 1rem;
    color: var(--text-reduced);
    line-height: 1.4;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    padding: 2rem 2.5rem;
    border-top: 1.5px dashed var(--text-light);
}

.site-footer p {
    font-size: 0.95em;
    color: var(--text-reduced);
    margin: 0;
}



@media (max-width: 42rem) {
    
    .site-header {
        padding: 0.8rem 1.6rem;
    }

    main {
        padding: 1.6rem 0 3rem;
    }

    .hero {
        padding: 1rem 2.5rem 0;
    }
    
    .site-footer {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }
}
