/**
* @license
*
* Font Family: Satoshi
* Designed by: Deni Anggara
* URL: https://www.fontshare.com/fonts/satoshi
* © 2025 Indian Type Foundry
*/
@font-face {
    font-family: "SatoshiVariable";
    src: url("../fonts/Satoshi-Variable.woff2") format("woff2");
    font-weight: 300 900;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: "SatoshiVariable-Italic";
    src: url("../fonts/Satoshi-VariableItalic.woff2") format("woff2");
    font-weight: 300 900;
    font-display: swap;
    font-style: italic;
}

@font-face {
    font-family: "PilcrowRounded-Regular";
    src: url("../fonts/PilcrowRounded-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}

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

@media (max-width: 800px) { [data-desktop] { display: none } }
@media (min-width: 800px) { [data-mobile] { display: none } }

strong, b, h3 {
    font-weight: 600 !important;
}
i {
    font-style: italic;
}

.note {
    display: block;
    background: hsl(90.67, 100%, 91.18%);
    box-shadow: var(--box-shadow);
    transform: rotate(-.4deg);
    padding: 1rex 2rex;
}

.nobreak {
    white-space: nowrap;
}

:root {
    --content-width: 800px;
    --box-shadow: 0px 4px 18px #00000020, 0px 2.025px 7.84688px rgba(0,0,0,0.027), 0px 0.8px 2.925px #00000005, 0px 0.175px 1.04062px rgba(0,0,0,0.013);
}

html {
    position: relative;
    --background: hsla(61.43, 100%, 97.3%,  1);
    --pattern:    hsla(61.43, 100%, 20.6%,  .2);
    --paper:      hsla(61.43, 100%, 91.76%, 1);
    --text:  hsla(61.43, 100%, 7.76%,  0.9);
    --hyperlink: hsl(215, 100%, 45%);

    font-family: SatoshiVariable;
    overflow-x: hidden;
    color: var(--text);
}

a {
    color: var(--hyperlink);

    &:hover {
        text-decoration: none;
    }

    &.download::before {
        content: "↓";
        padding-right: 1ex;
    }

    &.download[href$="pdf"]::after {
        content: " (PDF)";
    }
}


body {
    overflow-x: clip;
    width: 100%;
    display: grid;
    grid-template-areas: "nav main";
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
}

@media (min-width: 800px) {
    body::before {
        margin: 2rem;
        margin-left: 0;
        grid-area: main;
        content: "";
        box-shadow: inset 0 0 0 1px var(--pattern);
        background: var(--background);
        opacity: 1;
        z-index: -1;
        position: sticky;
        top: 2rem;
        height: calc(100vh - 4rem);
    }
    body::after {
        margin: 2rem;
        margin-left: 0;
        grid-area: main;
        content: "";
        box-shadow: inset 0 0 0 1px var(--pattern);
        background: url(../img/noise.webp);
        mix-blend-mode: multiply;
        z-index: -1;
        opacity: .2;
        position: sticky;
        top: 2rem;
        height: calc(100vh - 4rem);
    }
}

@media (max-width: 800px) {
    body::before {
        content: "";
        background: var(--background);
        opacity: 1;
        z-index: -1;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        height: auto;
    }
    body::after {
        content: "";
        background: url(/storchennest/img/noise.webp);
        mix-blend-mode: multiply;
        z-index: -1;
        opacity: .2;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        height: auto;
    }
}
svg {
    display: none;
}

@media (max-width: 800px) {
    body {
        display: flex;
        flex-direction: column;
    }
}

menu {
    grid-area: nav;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 800px) {
    dialog {
        all: unset;
        display: contents;

        &::backdrop {
            background: hsl(0, 0%, 0%, .5);
        }
    }

    menu {
        margin: 1rem;
        height: 50vh;
        opacity: 0;
        background: var(--paper);
        position: fixed;
        bottom: 0;
        z-index: 9;
        left: 0;
        right: 0;
        border-radius: 1rem;
        overflow-y: scroll;
        *transition: all 128ms ease-in-out;

        &:not(:has(nav[aria-expanded="true"])) {
            pointer-events: none;
        }
        &:has(nav[aria-expanded="true"]) {
            height: 70vh;
            opacity: 1;
        }
    }
}

nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;

    a {
        color: inherit;
    }

    html[data-sticky-nav="true"] & {
        position: sticky;
        top: 0rem;
    }

    a, button {
        cursor: pointer;
        white-space: nowrap;
        text-decoration: none;

        font-size: 1.25em;
        line-height: 1.32em;
        &::before { content: ""; margin-bottom: -0.3em; display: table }
        &::after { content: ""; margin-top: -0.3em; display: table }

        & {
            opacity: .6;
        }

        &:hover {
            opacity: 1;
        }
        &[aria-current] {
            text-decoration: underline;
            opacity: 1;
        }
    }

    li {
        display: flex;
        flex-direction: column;
        gap: 1em;

        ol {
            display: flex;
            flex-direction: column;
            gap: .8em;
        }
    }
}

#closebttn, #navbttn { display: none }
@media (max-width: 800px) {
    nav {
        padding-bottom: 0;
        gap: 0;

        & > li:not(:last-of-type) {
            margin-bottom: 2rem;
        }

        a:focus {
            outline: none;
        }

        a {
            padding: 1rex 0;
        }
    }
    #closebttn, #navbttn {
        all: unset;
        position: sticky;
        bottom: 2rem;
        margin: 2rem 0;
        background: white;
        color: black;
        z-index: 9999;
        font-family: inherit;
        align-self: center;
        border-radius: .8rem;
        box-shadow: var(--box-shadow);

        font-size: 1.25rem;
        line-height: 1.42754em;

        &::before { content: ""; margin-bottom: -0.35em; display: table }
        &::after { content: ""; margin-top: -0.35em; display: table }
    } 

    #navbttn {
        padding: 0 5ex;
        height: 3rem;
    }

    #closebttn {
        padding: 1rem 5ex;
        box-sizing: border-box;
        width: 100%;
        text-align: center;
    }
}

.nav_header {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    opacity: 1;
    cursor: default;

    font-size: 0.875rem;
    line-height: 1.1rem;
    &::before { content: ""; margin-bottom: -0.4307em; display: table }
    &::after { content: ""; margin-top: -0.4007em; display: table }
}

dialog {
    display: contents;
}

header {
    position: relative;
    margin-bottom: -3rem;
    width: 100%;
    max-width: var(--content-width);

    #photo {
        width: 80%;
        transform: translate3d(-2rem, 0, 0) rotate(-2deg);
        box-shadow: var(--box-shadow);
        object-fit: cover;
        height: auto;
    }

    #logo {
        position: absolute;
        bottom: 0;
        right: 0;
        transform: translate3d(7rem, -1.2rem, 0) rotate(4deg);
        z-index: 9;
    }
} 

@media (max-width: 800px) {
    header {
        padding-top: 1rem;

        #photo {
            height: max(300px, 30vw);
        }

        #logo {
            transform: translate3d(5rem, -1.2rem, 0) rotate(4deg) scale(.9);
            transform-origin: bottom center;
        }
    }
} 

main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#content_wrapper {
    width: 100%;
    max-width: var(--content-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

section {
    & > img {
        border-radius: var(--border-radius);
    }

    width: 100%;
    z-index: 1;
    background: var(--paper);
    padding: 3rem 3rem;
    box-shadow: var(--box-shadow);

    &[data-skiplinks] {
        background: hsl(90.67, 100%, 91.18%);
        align-self: flex-end;
        transform: rotate(1deg);
        width: auto;

        & * {
            color: hsl(215, 100%, 45%);
            text-decoration-style: dotted;
        }
    }

    & > :last-child {
        margin-bottom: 0;
    }

    & > ol:last-child li:last-child {
        margin-bottom: 0;
    }

    & > dl:last-child > dd:last-child p {
        margin-bottom: 0;
    }

    dd {
        padding-left: 2em;
    }

    dt p {
        font-weight: 500;
        margin-bottom: .7em;
    }

    .line_table {
        display: grid;
        grid-template-columns: auto auto;
    }

    :is(p, li, figcaption) {
        margin-bottom: 1.4em;
        font-weight: 450;
        letter-spacing: -0.05ex;
        color: var(--text);

        font-feature-settings: "ss02", "ss03";
        font-size: 1.25rem;
        line-height: 1.5em;
        &::before { content: ""; margin-bottom: -0.395em; display: table }
        &::after { content: ""; margin-top: -0.365em; display: table }

        &:has(+ section) {
            margin-bottom: 2.4em;
        }
    }

    p:has(+ ol) {
        margin-bottom: 1em;
    }

    li {
        list-style-type: none;
        margin-left: 1.5em;

        &:not(:last-of-type), ol > ol > &:last-of-type {
            margin-bottom: .7em;
        }

        i:first-of-type {
            font-style: normal;
            &.hl::before { content: "→" }
            &::before { content: "○" }
            ol ol &::before { content: "□" }
            [data-skiplinks] &::before { content: "↓" }

            margin-left: -1.5em;
            width: 1.5em;
            display: inline-block;
        }
    }

    & > ol > ol {
        margin-left: 4ch;
    }

    figure {
        display: flex;
        flex-direction: column;
        gap: 2ex;
        margin-bottom: 1em;

        @media (any-hover: hover) {
            mix-blend-mode: luminosity;

            &:hover {
                mix-blend-mode: initial;
            }
        }

        figcaption {
            font-family: SatoshiVariable-Italic;
            font-style: italic;
            font-size: 1rem;
            line-height: 1.5em;
            &::before { content: ""; margin-bottom: -0.395em; display: table }
            &::after { content: ""; margin-top: -0.365em; display: table }
        }
    }
}

@media (min-width: 800px) {
    main {
        padding-bottom: 5rem;
    }
}

@media (max-width: 800px) {
    main {
        margin-bottom: 0;
    }

    #content_wrapper {
        gap: 1em;
        padding: 0 1ex;

        section {
            padding: 1.4rem 1.2rem;
        }
    }
}

h1 {
    max-width: var(--content-width);
    hyphens: none;
    font-family: "PilcrowRounded-Regular";
    font-weight: 400;
    color: var(--text);
    letter-spacing: -.009em;
    margin-bottom: 2em;
    scroll-margin-top: 3rem;

    font-size: 3.125rem;
    line-height: 1em;
    &::before { content: ""; margin-bottom: -0.162em; display: table }
    &::after { content: ""; margin-top: -0.17em; display: table }
}

@media (max-width: 800px) {
    h1 {
        margin-top: .2em;
        margin-bottom: 2em;
        
        font-size: 1.5rem;
        line-height: 1.2em;
        &::before { content: ""; margin-bottom: -0.262em; display: table }
        &::after { content: ""; margin-top: -0.27em; display: table }
    } 
}

h2 {
    margin-bottom: 1em;
    font-weight: 650;
    hyphens: none;
    color: var(--text);

    * + & { margin-top: 3rem }

    font-size: 1.25rem;
    line-height: 1.5em;
    &::before { content: ""; margin-bottom: -0.395em; display: table }
    &::after { content: ""; margin-top: -0.365em; display: table }
}

h3 {
    margin-bottom: 1ex;
}

@media (max-width: 800px) {
    h2 {
        * + & { margin-top: 2em }

    }
}

.fixed_table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1em;

}

@media (min-width: 768px) {
    .fixed_table {
        grid-template-columns: 1fr 1fr;

        & > div > :last-child {
            margin-bottom: 0;
        }
    }
}

@media (max-width: 768px) {
    .fixed_table {
        grid-template-columns: 1fr;

        & > div:last-of-type > :last-child {
            margin-bottom: 0;
        }
    }
}

.table {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1em;
}

@media (min-width: 768px) {
    .table:last-child {
        & > :last-child,
        & > :nth-last-child(2) {
            margin-bottom: 0;
        }
    }
}
@media (max-width: 768px) {
    .table {
        
        grid-template-columns: 1fr;
        &:last-child > :last-child {
            margin-bottom: 0;
        }

        & > :nth-child(2n) {
            padding-left: 1rem;
        }
    }
}

#footer a {
    color: inherit;
}
