@layer uaplus-reset-styles {
    *,
    *::after,
    *::before {
        box-sizing: border-box;
    }

    :focus-visible {
        outline-offset: 3px;
    }

    html {
        -webkit-text-size-adjust: none;
        text-size-adjust: none;

        line-height: 1.2;
        scrollbar-gutter: stable;
        scroll-behavior: smooth;
    }

    body {
        -webkit-font-smoothing: antialiased;
    }

    h1 {
        font-size: 2em;
        margin-block: 0.67em;
    }

    h1, h2, h3 {
        line-height: 1.2;
    }

    abbr[title] {
        cursor: help;
        text-decoration-line: underline;
        text-decoration-style: dotted;
    }

    @media (forced-colors: active) {
        mark {
            color: HighlightText;
            background-color: Highlight;
        }
    }

    audio,
    iframe,
    img,
    svg,
    video {
        max-block-size: 100%;
        max-inline-size: 100%;
    }

    fieldset {
        min-inline-size: 0;
    }

    label:has(+ :where(input:not([type="radio"], [type="checkbox"]), select, textarea)) {
        display: block;
    }

    textarea:not([rows]) {
        min-block-size: 6em;
    }

    button,
    input,
    select,
    textarea {
        font-family: inherit;
        font-size: inherit;
    }

    :disabled {
        cursor: not-allowed;
    }

    /**
   * Normalize search input styles
   *
   * Remove the rounded corners of search inputs on macOS and IOS
   * and normalize the background color
   */
    [type="search"] {
        -webkit-appearance: textfield;
    }

    /* iOS only */
    @supports (-webkit-touch-callout: none) {
        [type="search"] {
            border: 1px solid -apple-system-secondary-label;
            background-color: canvas;
        }
    }

    input:where([type="tel"], [type="url"], [type="email"], [type="number"]):not(:placeholder-shown) {
        direction: ltr;
    }

    table {
        border-collapse: collapse; /* 1 */
        border: 1px solid; /* 1 */
        font-variant-numeric: tabular-nums lining-nums slashed-zero; /* 2 */
    }

    th,
    td {
        border: 1px solid;
        padding: 0.25em 0.5em;
        vertical-align: top;
    }

    dialog::backdrop {
        background: oklch(0% 0 0 / 0.5);
    }

    /**
   * Fading dialogs
   *
   * Add fade in and fade out transitions for the dialog element
   * and backdrops
   */
    /* Transition property for dialogs */
    dialog {
        --_dialog-transition-speed: 150ms;
        --_dialog-transition: var(--_dialog-transition-speed);
    }

    /* Set it 0 for Safari when fading out because of a bug that occurs when you transition display */
    dialog:not(:modal) {
        --_dialog-transition: 0;
    }

    /* Reset the pervious change for Chromium browsers */
    dialog:-internal-dialog-in-top-layer {
        --_dialog-transition: var(--_dialog-transition-speed);
    }

    dialog,
    [popover],
    dialog::backdrop {
        opacity: 0;
        transition: opacity var(--_dialog-transition) ease-out, display var(--_dialog-transition) allow-discrete,
        overlay var(--_dialog-transition) allow-discrete;
    }

    dialog[open],
    :popover-open,
    dialog[open]::backdrop {
        opacity: 1;
    }

    @starting-style {
        dialog[open],
        :popover-open,
        dialog[open]::backdrop {
            opacity: 0;
        }
    }


    [hidden]:not([hidden="until-found"]) {
        display: none !important;
    }

    img, video {
        display: block;
        width: 100%;
        height: auto;
    }

    figure{
        margin: 0;
    }

    summary {
        cursor: default;
    }

    iframe {
        border: none;
    }

    @supports (position-area: end) {
        [popover] {
            margin: 0;
            position-area: end span-end;
            position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
        }
    }

    a {
        color: inherit;
    }

    h1, h2, h3, h4, h5, h6 {
        font-weight: normal;
        font-size: unset;
    }

    h1, h2, h3, h4, h5, h6, p, ul, ol {
        margin: 0;
        padding: 0;
    }
}

@layer anto {
    @font-face {
        font-family: "PP Lettra Mono";
        src: url("/assets/PPLettraMono-Medium.woff2") format("woff2");
        font-weight: normal;
        font-style: normal;
        font-display: swap;
    }

    html {
        --padding: max( 2.5vw, 1rem );
        --color: #11fa50;
        --bg: #001c00;

        --font-size-factor: 0.7;
        --header-height: calc(var(--padding) * 2 + 1lh);
        --btn-width: 4rem;

        @media (width <= 50rem ){
            --font-size-factor: 0.6;

            --btn-width: 3rem;
        }
    }

    body {
        margin: 0;
        background-color: var(--bg);
        color: var(--color);

        font-family: "PP Lettra Mono", monospace;
        font-size: max(2vw, 1.2rem);
    }

    #skip-to-content-link {
        position: fixed;
        top: 0;

        background: black;
        color: white;
        left: 50%;
        padding: 8px;

        transform: translate(-50%, -150%);
        transition: transform 0.3s;
        z-index: 100;

        border-bottom-left-radius: 3px;
        border-bottom-right-radius: 3px;

        &:focus {
            transform: translate(-50%, 0);
        }
    }

    button{
        padding: 0;
        background: none;
        border-radius: 0;
        border: none;
    }

    .visually-hidden:not(:focus):not(:active) {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;

        &.smartphone-shown{
            @media (width <= 50rem){
                clip: initial;
                clip-path: initial;
                height: initial;
                overflow: initial;
                position: initial;
                white-space: initial;
                width: initial;
            }
        }
    }

    @property --gradient-color {
        syntax: "<color>";
        inherits: true;
        initial-value: transparent;
    }

    #main-header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 5;

        line-height: 1;

        width: 100%;
        height: 100dvh;
        padding: var(--padding);
        pointer-events: none;

        display: flex;
        flex-direction: column;
        justify-content: space-between;

        --gradient-color: var(--bg);

        .top,
        .bottom {
            position: relative;
            transition: color 0.3s, --gradient-color 0.3s;

            &.over-light {
                --gradient-color: var(--color);
                color: var(--bg);
            }
        }

        &.scrolled {
            .bottom::before {
                opacity: 1;
            }
        }

        --gradient-height: -.5lh;

        .top {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            align-items: center;

            text-decoration: none;
            pointer-events: auto;

            span:nth-child(2) {
                text-align: center;
            }

            span:nth-child(3) {
                text-align: end;
            }

            &:hover, &:focus{
                text-transform: uppercase;
            }
        }

        .bottom {
            pointer-events: auto;

            @media (width <= 50rem){
                position: fixed;
                top: 0;
                bottom: 0;
                left: 0;
                width: 100%;

                display: none;

                background-color: var(--bg);
                color: var(--color);
                transition: 0.4s ease-out;

                @starting-style {
                    translate: 100%;
                }
            }

            &::before {
                content: "";
                position: absolute;
                inset-inline: calc(-1 * var(--padding));
                z-index: -1;
                pointer-events: none;

                inset-block-start: var(--gradient-height);
                inset-block-end: calc(-1 * var(--padding));
                background: linear-gradient(to top, var(--gradient-color) 30%, transparent);

                opacity: 0;
                transition: opacity 0.3s;

                @media (width <= 50rem){
                    display: none;
                }
            }

            ul {
                display: flex;
                gap: 1rem;
                justify-content: space-between;

                list-style-type: "";

                li::marker{
                    content: "";
                }

                @media (width <= 50rem){
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    height: 100%;
                    color: var( --color );
                    gap: 2rem;
                }
            }

            a {
                text-decoration: underline;
                text-decoration-color: transparent;

                &.active{
                    text-decoration-color: currentColor;
                }
            }
        }
    }

    #menu-toggle{
        display: none;
        position: fixed;
        bottom: var( --padding );
        right: var( --padding );
        width: var( --btn-width );
        pointer-events: auto;
        z-index: 2;

        @media (width <= 50rem){
            display: block;
        }

        svg{
            width: 100%;
            display: block;
        }

        .close-svg{
            display: none;
        }
    }

    .open-nav{
        #main-header{
            .bottom{
                display: block;
            }
        }

        #menu-toggle{
            svg:not(.close-svg){
                display: none;
            }

            .close-svg{
                display: block;
            }
        }
    }

    .close-svg{
        display: block;

        rect{
            stroke: var(--color);
            fill: var( --bg );
        }

        polygon{
            fill: var(--color);
        }
    }

    #intro {
        padding-inline: var(--padding);
        padding-block: var( --header-height );

        min-height: 100dvh;
        position: relative;

        display: flex;
        flex-direction: column;
        justify-content: space-between;

        pointer-events: none;

        a{
            pointer-events: auto;
        }

        [data-waves] {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100dvh;
            z-index: -1;
        }

        .termine {
            width: 60ch;
            max-width: 80%;
            margin-inline-start: auto;
            margin-inline-end: 10vw;

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

            pointer-events: auto;

            @media (width <= 50rem) {
                width: 100%;
                max-width: 100%;
                margin: 2rem 0 0;
            }

            h2 {
                font-size: 1em;
            }

            ul {
                p{
                    display: inline;
                }

                + h2 {
                    margin-top: 1lh;
                }
            }
        }

        .intro-text{
            -webkit-text-stroke-width: 0.025em;
        }
    }


    #projektliste {
        --cols: 5;

        display: grid-lanes;
        grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
        gap: 1em;

        padding: 5rem var(--padding);

        @media (width <= 64rem){
            --cols: 4;
        }

        @media (width <= 50rem){
            --cols: 3;


            h2{
                padding-bottom: 2lh;
            }
        }

        @media (width <= 40rem){
            --cols: 2;
        }

        @media (width <= 30rem){
            --cols: 1;
        }


        h3 {
            border: 1px solid currentColor;
            text-align: center;
            border-radius: 0.3em;
            padding: 0.1em;
            min-height: calc( 2lh + 0.2em );

            display: grid;
            place-content: center;
            margin-bottom: 1lh;
        }

        h4 {
            &:not(:first-child) {
                margin-top: 1lh;
            }
        }

        .kat{
            padding-bottom: 2lh;
        }

    }

    #kontakt {
        --cols: 2;
        background: var(--color);
        color: var(--bg);

        display: grid;
        grid-template-columns: repeat(var( --cols ), minmax(0, 1fr));
        gap: 3rem;

        padding: 5rem var(--padding);

        @media (width <= 50rem) {
            --cols: 1;
        }

        .bild {
            float: left;
            width: 10rem;
            margin-inline-start: calc( var( --padding ) * -1 );
            margin-inline-end: 1em;
            margin-block-end: 0.5em;
        }

        .member-awards {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 2rem;

            margin-top: 2lh;

            ul + h3{
                margin-top: 1lh;
            }

            .impressum-awards{
                h3{
                    margin-top: 2lh;
                }
            }
        }
    }

    p + p {
        margin-top: 1lh;
    }

    ul {
        list-style-position: inside;

        li::marker{
            content: "●";
        }
    }

    a{
        text-decoration-skip-ink: none;

        &:hover, &:focus {
            text-transform: uppercase;
        }

        &.invert{
            text-transform: uppercase;
            display: inline-block;

            &:hover, &:focus {
                text-transform: lowercase;
            }
        }
    }

    .font-size-20 {
        font-size: calc( 1.25rem * var( --font-size-factor ) );
    }

    .font-size-25 {
        font-size: calc( 1.56rem * var( --font-size-factor ) );
    }

    .font-size-30 {
        font-size: calc( 1.875rem * var( --font-size-factor ) );
    }

    .font-size-47 {
        font-size: clamp( 1.4rem, 2.4vw, 10rem);
    }

    .font-size-50 {
        font-size: calc( 3.125rem * var( --font-size-factor ) );
    }

    .wide-o, i{
        font-feature-settings: "ss02";
    }

    i{
        font-style: normal;
    }

    #arbeiten{

        h2{
            padding-inline: var(--padding);
            margin-top: 2lh;
        }

        /* JS-driven: vertical page scroll moves the gallery horizontally */
        &.scroll-pin{
            .featured{
                position: sticky;
                top: 0;
            }

            .scroll{
                overflow-x: hidden;
                scroll-behavior: auto; /* JS sets scrollLeft; keep it instant */
            }
        }
    }

    .featured{
        height: 100svh;
        width: 100%;
        overflow: clip;
        padding-block: 3rem;

        @media ( orientation: portrait ) {
            height: 70svh;
        }

        .scroll{
            height: 100%;
            display: grid;
            grid-template-rows: repeat( 10, minmax(0,1fr));

            gap: 1rem;
            align-items: start;

            padding-inline: var( --padding );
            overflow-x: auto;
        }


        article{
            aspect-ratio: var( --aspect-ratio, 1 );
            position: relative;
            height: 100%;

            a:hover,
            a:focus{
                .hover-field{
                    opacity: 1;
                }

                text-transform: none;
            }

            &.audio{

                a{
                    display: block;
                    height: 100%;
                    aspect-ratio: var( --aspect-ratio, 2 );
                    background: var(--color);
                    position: relative;
                }

                .waveform{
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    right: 0;

                    rect{
                        fill: var( --bg );
                    }
                }
            }
        }

        .preview-title{
            position: absolute;
            color: var( --bg );
        }

        .hover-field{
            position: absolute;
            inset: 0;
            z-index: 1;
            background: var(--color);
            color: var(--bg);
            opacity: 0;
            transition: opacity 0.3s;

            pointer-events: none;

            .projekt-infos{
                display: flex;
                flex-direction: column;
                height: 100%;
            }

            .beschreibung{
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: var(--line-clamp, 1);
                line-clamp: var(--line-clamp, 1);
                overflow: hidden;
            }
        }

        .hoehe-2{ grid-row-end: span 2; }
        .hoehe-3{ grid-row-end: span 3; }
        .hoehe-4{ grid-row-end: span 4; }
        .hoehe-5{ grid-row-end: span 5; }
        .hoehe-6{ grid-row-end: span 6; }
        .hoehe-7{ grid-row-end: span 7; }
        .hoehe-8{ grid-row-end: span 8; }
        .hoehe-9{ grid-row-end: span 9; }
        .hoehe-10{ grid-row-end: span 10; }

        .versatz-x-minus3{ margin-inline-start: -9rem; }
        .versatz-x-minus2{ margin-inline-start: -6rem; }
        .versatz-x-minus1{ margin-inline-start: -3rem; }
        .versatz-x-0{ margin-inline-start: 0; }
        .versatz-x-1{ margin-inline-start: 3rem; }
        .versatz-x-2{ margin-inline-start: 6rem; }
        .versatz-x-3{ margin-inline-start: 9rem; }

        .versatz-y-0{ grid-row-start: 1; }
        .versatz-y-1{ grid-row-start: 2; }
        .versatz-y-2{ grid-row-start: 3; }
        .versatz-y-3{ grid-row-start: 4; }
        .versatz-y-4{ grid-row-start: 5; }
        .versatz-y-5{ grid-row-start: 6; }
        .versatz-y-6{ grid-row-start: 7; }
        .versatz-y-7{ grid-row-start: 8; }
        .versatz-y-8{ grid-row-start: 9; }
    };

    .projekt-infos{
        display: block;

        .jahr{
            margin-inline-start: 2em;
            margin-block: 1lh;
        }
    }

    .hyphens{
        hyphens: auto;
        hyphenate-limit-chars: 10 4 4;
    }

    .close-btn{
        display: block;
        width: var( --btn-width );
        aspect-ratio: 1;

        svg{
            display: block;
            width: 100%;

            rect, polygon{
                transition: 0.2s ease-out;
            }

            rect{
                fill: var( --bg );
                stroke: var( --color );
            }

            polygon{
                fill: var( --color );
            }
        }

        &:hover, &:focus {
            svg{
                rect{
                    fill: var( --color );
                    stroke: var( --bg );
                }

                polygon{
                    fill: var( --bg );
                }
            }
        }
    }

    .projekt{
        #back-btn{
            position: fixed;
            top: calc( var( --header-height ) + 1rem );
            right: calc( var(--padding) + 1rem );
            z-index: 3;
            width: var( --btn-width );

            @media (width < 50rem ){
                right: var(--padding);
                top: auto;
                bottom: calc( var(--padding) + var( --btn-width ) + 0.5rem);
            }
        }

        .projekt-grid{
            --cols: 3;
            display: grid-lanes;
            grid-template-columns: repeat(var( --cols ), minmax(0,1fr));
            gap: 1rem;

            padding: var( --header-height ) var(--padding);

            &.audio{
                --cols: 2;

                @media (width <= 40rem){
                    --cols: 1;
                }
            }

            @media (width <= 60rem){
                --cols: 2;
            }

            @media (width <= 40rem){
                --cols: 1;
            }
        }

        .title, .subtitle{
            padding-right: 4rem;
        }

        .jahr{
            margin-inline-start: 2em;
            margin-block: 1lh;
        }

        .projekt-infos{
            background-color: var(--color);
            color: var( --bg );

            grid-column-start: 3;

            @media (width <= 60rem){
                grid-column-start: 2;
            }

            @media (width <= 50rem){
                grid-column-start: initial;
            }
        }

        .vorschau{
            display: none;

            @media (width <= 50rem){
                display: block;
            }
        }
    }

    .trim-above{
        text-box-trim: trim-start;
        text-box-edge: cap;

        @supports not (text-box-trim: trim-start) {
            margin-block-start: -0.2em;
        }
    }

    .waveform-player{
        display: flex;
        flex-direction: column;
        gap: 1rem;

        audio{
            display: none;
        }

        .waveform-toggle{
            order: 2;

            flex: none;
            width: 6rem;
            align-self: stretch;

            display: grid;
            place-items: center;
            cursor: pointer;
            color: inherit;

            border: 1px solid currentColor;

            svg{
                width: 40%;
                height: auto;
                fill: currentColor;
            }

            .icon-pause{
                display: none;
            }
        }

        &.is-playing .waveform-toggle{
            .icon-play{
                display: none;
            }

            .icon-pause{
                display: block;
            }
        }

        .waveform-wrapper{
            background: var(--color);
            color: var( --bg );
        }

        .waveform-graphic{
            flex: 1;
            position: relative;
            width: 100%;
            cursor: pointer;
            touch-action: none; /* let pointer-drag scrub instead of scroll */
            aspect-ratio: 6;

            .waveform{
                display: block;
                position: absolute;
                inset: 0;
                width: 100%;
                height: 100%;
            }

            .waveform-base{
                opacity: 0.6;
            }

            .waveform-progress{
                clip-path: inset(0 calc((1 - var(--progress, 0)) * 100%) 0 0);
            }
        }
    }
}