/*
CSS Style
Version: 1.3.0
Datum: 06.07.2026
*/

/* Typography */

@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/satoshi.woff2?v=2026-07-01') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bitter';
    src: url('/assets/fonts/bitter.woff2?v=2026-07-01') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Custom Properties */

:root {
    /* Typography */
    --font-body: 'Satoshi', sans-serif;
    --font-heading: 'Bitter', serif;
    --font-size-body: 1.125rem;
    --font-size-heading-1: clamp(1.9rem, 6vw, 2.8rem);
    --font-size-heading-2: clamp(1.35rem, 4vw, 2rem);
    --font-weight-body: 450;

    /* Colors */
    --color-body: rgb(31, 31, 31);
    --color-footer: rgb(110, 110, 110);
    --color-link: rgb(0, 113, 255);

    /* Global Header */
    --global-header-background-color: rgba(0, 0, 0, 0.789);
    --global-header-backdrop-filter: saturate(1.789) blur(20px);
    --global-header-nav-width: 1024px;
    --global-header-nav-height: 50px;
    --global-header-nav-font-size: 1rem;
    --global-header-nav-font-weight: 550;
    --global-header-nav-color: #fff;
    --global-header-nav-menu-width: 1.5rem;
    --global-header-nav-menu-height: 1.25px;
    --global-header-transition-height-open: cubic-bezier(0.33, 1, 0.68, 1);
    --global-header-transition-height-close: cubic-bezier(0.4, 0, 0.2, 1);
    --global-header-nav-head-menu-transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Global Footer */
    --global-footer-font-size: .9rem;
    --global-footer-font-weight: 450;

    /* Main Content */
    --main-content-width: 1280px;
    --main-content-text-width: 70ch;
    --content-gap: 1rem;

    /* Portfolio */
    --portfolio-width: 1600px;

    /* Legal */
    --legal-title-font-size: clamp(1.9rem, 6vw, 2.8rem);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--global-header-nav-height) + 1rem);
}

body {
    padding-block-end: 25px;
    padding-left: max(env(safe-area-inset-left), 25px);
    padding-right: max(env(safe-area-inset-right), 25px);
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-body);
    color: var(--color-body);
}

h1 {
    font-family: var(--font-heading);
}

a {
    color: var(--color-body);
    text-decoration: underline solid 0.08em;
    text-underline-offset: 0.18em;
    transition: text-underline-offset 150ms ease;
}

@media (any-hover: hover) {
    a:hover {
        text-underline-offset: 0.25em;
    }
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Global Header */

.global-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    display: grid;
    justify-items: center;
    height: var(--global-header-nav-height);
    background: var(--global-header-background-color);
    -webkit-backdrop-filter: var(--global-header-backdrop-filter);
    backdrop-filter: var(--global-header-backdrop-filter);
    transition: height 300ms var(--global-header-transition-height-close);
}

.global-header-nav {
    display: flex;
    flex-direction: column;
    width: min(var(--global-header-nav-width), 100%);
    padding-left: max(env(safe-area-inset-left), 25px);
    padding-right: max(env(safe-area-inset-right), 25px);
    color: var(--global-header-nav-color);
}

.global-header-nav ul {
    padding-inline-start: 0;
    list-style: none;
}

.global-header-nav-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.global-header-nav a {
    color: var(--global-header-nav-color);
    font-size: var(--global-header-nav-font-size);
    font-weight: var(--global-header-nav-font-weight);
    text-decoration: none;
    transition: none;
}

.global-header-nav-list a[aria-current="page"] {
    text-decoration: underline 0.0789rem;
    text-underline-offset: 0.15rem;
}

@media (width < 768px) {

    body:has(.global-header-nav-head-menu-button[aria-expanded="true"]) {
        overflow: hidden;
    }

    .global-header:has(.global-header-nav-head-menu-button[aria-expanded="true"]) {
        height: 100dvh;
        transition: height 450ms var(--global-header-transition-height-open);
    }

    .global-header-nav-head-menu span {
        position: absolute;
        display: block;
        width: var(--global-header-nav-menu-width);
        height: var(--global-header-nav-menu-height);
        background: var(--global-header-nav-color);
        transform-origin: center;
    }

    .global-header-nav-head-menu-button {
        all: unset;
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--global-header-nav-menu-width);
        height: var(--global-header-nav-height);
        cursor: pointer;
    }

    .global-header-nav-head-menu-top {
        translate: 0 -6px;
    }

    .global-header-nav:has(.global-header-nav-head-menu-button[aria-expanded="true"]) .global-header-nav-head-menu-top {
        translate: 0 0;
        rotate: -45deg;
    }

    .global-header-nav-head-menu-center {
        opacity: 1;
        transition: opacity 150ms ease 150ms;
    }

    .global-header-nav:has(.global-header-nav-head-menu-button[aria-expanded="true"]) .global-header-nav-head-menu-center {
        opacity: 0;
        transition: opacity 100ms ease;
    }

    .global-header-nav-head-menu-bottom {
        translate: 0 6px;
    }

    .global-header-nav:has(.global-header-nav-head-menu-button[aria-expanded="true"]) .global-header-nav-head-menu-bottom {
        translate: 0 0;
        rotate: 45deg;
    }

    .global-header-nav-head-menu-top,
    .global-header-nav-head-menu-bottom {
        transition: rotate 150ms var(--global-header-nav-head-menu-transition), translate 150ms var(--global-header-nav-head-menu-transition) 150ms;
    }

    .global-header-nav:has(.global-header-nav-head-menu-button[aria-expanded="true"]) .global-header-nav-head-menu-top,
    .global-header-nav:has(.global-header-nav-head-menu-button[aria-expanded="true"]) .global-header-nav-head-menu-bottom {
        transition: translate 220ms var(--global-header-nav-head-menu-transition), rotate 220ms var(--global-header-nav-head-menu-transition) 220ms;
    }

    .global-header-nav-list-item {
        width: 100%;
        height: var(--global-header-nav-height);
        padding-block: .1rem;
        opacity: 0;
        visibility: hidden;
        translate: 0 -20px;
        transition: opacity 180ms var(--global-header-nav-head-menu-transition) var(--global-header-nav-list-item-transition-delay-close),
            translate 180ms var(--global-header-nav-head-menu-transition) var(--global-header-nav-list-item-transition-delay-close),
            visibility 0ms ease calc(var(--global-header-nav-list-item-transition-delay-close) + 180ms);
    }

    .global-header-nav-list-item:nth-child(1) {
        --global-header-nav-list-item-transition-delay-open: 150ms;
        --global-header-nav-list-item-transition-delay-close: 75ms;
    }

    .global-header-nav-list-item:nth-child(2) {
        --global-header-nav-list-item-transition-delay-open: 190ms;
        --global-header-nav-list-item-transition-delay-close: 50ms;
    }

    .global-header-nav-list-item:nth-child(3) {
        --global-header-nav-list-item-transition-delay-open: 230ms;
        --global-header-nav-list-item-transition-delay-close: 25ms;
    }

    .global-header-nav-list-item:nth-child(4) {
        --global-header-nav-list-item-transition-delay-open: 270ms;
        --global-header-nav-list-item-transition-delay-close: 0ms;
    }

    .global-header-nav:has(.global-header-nav-head-menu-button[aria-expanded="true"]) .global-header-nav-list-item {
        opacity: 1;
        visibility: visible;
        translate: 0 0;
        transition: opacity 280ms var(--global-header-nav-head-menu-transition) var(--global-header-nav-list-item-transition-delay-open),
            translate 280ms var(--global-header-nav-head-menu-transition) var(--global-header-nav-list-item-transition-delay-open),
            visibility 0ms ease;
    }

    .global-header-nav-list-item a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    .global-header-nav-list-item a::after {
        content: "";
        width: 10px;
        height: 10px;
        border-top: 1.5px solid var(--global-header-nav-color);
        border-right: 1.5px solid var(--global-header-nav-color);
        transform-origin: center;
        translate: -4px 0;
        rotate: 45deg;
    }
}

@media (width >=768px) {

    .global-header-nav {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    @media (any-hover: hover) {
        .global-header-nav a:hover {
            text-decoration: underline 0.0789rem;
            text-underline-offset: 0.15rem;
        }
    }

    .global-header-nav-head-menu {
        display: none;
    }

    .global-header-nav-list {
        display: flex;
        gap: 2.5rem;
    }

    .global-header-nav-list-item {
        width: auto;
        height: auto;
        padding-block: 0;
        opacity: 1;
        visibility: visible;
        translate: 0 0;
    }
}

/* Global Footer */

.global-footer {
    display: grid;
    place-items: center;
    color: var(--color-footer);
    font-size: var(--global-footer-font-size);
    font-weight: var(--global-footer-font-weight);
    text-align: center;
}

.global-footer-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding-inline-start: 0;
    padding-block-end: 10px;
    list-style: none;
}

@media (width < 320px) {
    .global-footer-nav-list {
        flex-direction: column;
        align-items: center;
        gap: .5rem;
    }
}

.global-footer-nav-list a {
    color: var(--color-footer);
    text-decoration: underline 0.08em;
    text-underline-offset: 0.18em;
}

@media (any-hover: hover) {
    .global-footer-nav-list a:hover {
        text-underline-offset: 0.25em;
    }
}

/* Main Content */

.main-content {
    min-width: 0;
    padding-block: calc(var(--global-header-nav-height) + 2rem) 2rem;
}

/* Home */

.home {
    width: min(var(--portfolio-width), 100%);
    margin-inline: auto;
    text-align: center;

    h1 {
        margin-block-start: var(--content-gap);
        font-size: var(--font-size-heading-1);
        line-height: 1.1;
    }

    h2 {
        font-size: var(--font-size-heading-2);
        font-weight: var(--font-weight-body);
        line-height: 1.2;
    }

    .home-hero-text {
        width: min(var(--main-content-text-width), 100%);
        margin-inline: auto;
    }

    .home-hero-text :is(h2, p)+* {
        margin-block-start: var(--content-gap);
    }
}

/* Portfolio */

.portfolio {
    padding-block-end: 1.5rem;

    header {
        width: min(var(--main-content-width), 100%);
        margin-inline: auto;
        font-size: 1rem;
        text-align: center;
        hyphens: auto;
    }

    h1 {
        padding-block-end: calc(var(--content-gap) * 2);
        font-size: var(--legal-title-font-size);
    }

    p {
        width: min(var(--main-content-text-width), 100%);
        margin-inline: auto;
        font-size: var(--font-size-body);
    }

    .portfolio-credits {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 2rem;
        padding-block-start: 1rem;
    }

    .portfolio-credits-item {
        display: flex;
        gap: 0.5em;
    }

    .portfolio-credits-item dt {
        font-weight: 600;
    }
}

.portfolio-featured,
.portfolio-category,
.portfolio-corporate {
    margin-block-start: 3rem;
}

.portfolio-featured {
    --portfolio-col-max: 600px;
}

.portfolio-category {
    --portfolio-col-max: 400px;
}

.portfolio-corporate {

    :is(header, p)+* {
        margin-block-start: var(--content-gap);
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(clamp(200px, 40vw, var(--portfolio-col-max, 400px)), 100%), 1fr));
    gap: 2.5rem;
    width: min(var(--portfolio-width), 100%);
    margin-inline: auto;
    margin-block-start: 1.5rem;
}

.portfolio-card {
    display: block;
    text-decoration: none;

    picture {
        overflow: hidden;
    }

    @media (prefers-reduced-motion: no-preference) {
        img {
            transition: scale 400ms ease;
        }
    }

    figcaption {
        display: flex;
        flex-direction: column;
        margin-block-start: 0.75rem;
    }

    .portfolio-card-title {
        font-weight: 600;
    }

    .portfolio-card-subtitle {
        font-size: .9rem;
    }

    .portfolio-card-cta {
        align-self: start;
        margin-block-start: 0.35rem;
        font-size: .9rem;
        text-decoration: underline solid 0.08em;
        text-underline-offset: 0.18em;
        transition: text-underline-offset 150ms ease;
    }

    @media (any-hover: hover) {
        &:hover .portfolio-card-cta {
            text-underline-offset: 0.25em;
        }

        @media (prefers-reduced-motion: no-preference) {
            &:hover img {
                scale: 1.01;
            }
        }
    }
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(clamp(200px, 40vw, 600px), 100%), 1fr));
    gap: 2.5rem;
    width: min(var(--portfolio-width), 100%);
    margin-inline: auto;
    margin-block-start: 2.5rem;

    img {
        width: 100%;
    }

    .portfolio-gallery-text {
        align-self: center;
    }

    .portfolio-gallery-landscape,
    .portfolio-figure,
    .portfolio-pair {
        grid-column: 1 / -1;
    }

    .portfolio-pair-images {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(clamp(200px, 40vw, 600px), 100%), 1fr));
        gap: 2.5rem;
    }

    figcaption {
        margin-block-start: 0.6rem;
        font-size: 0.9rem;

        .portfolio-figure-name {
            font-weight: 600;
        }

        .portfolio-figure-role {
            color: var(--color-footer);

            &::before {
                content: "·";
                padding-inline: 0.5em;
            }
        }
    }

    :is(h2, p)+* {
        margin-block-start: var(--content-gap);
    }
}

/* Walser Stories */

.walser-stories {

    h1 {
        padding-block-end: 0.25rem;
    }

    header h2 {
        font-family: var(--font-heading);
        font-size: var(--font-size-heading-2);
        line-height: 1.2;
    }

    .walser-stories-subtitle {
        font-family: var(--font-body);
        font-size: 1.15rem;
        font-weight: 500;
        color: var(--color-footer);
    }
}

.walser-stories + .walser-stories {
    margin-block-start: 4rem;
}

/* Text + Media */

.text-media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(32ch, 100%), 1fr));
    gap: 2.5rem;
    align-items: center;
    width: min(var(--main-content-width), 100%);
    margin-inline: auto;
}

.text-media img {
    width: 100%;
    height: auto;
}

.text-media-text {
    max-width: var(--main-content-text-width);
}

.text-media-text :is(h1, p)+* {
    margin-block-start: var(--content-gap);
}

/* Clients */

.clients ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0;
    margin-block-start: var(--content-gap);
    padding-inline-start: 0;
    list-style: none;
}

.clients li:not(:last-child)::after {
    content: "·";
    padding-inline: 0.5em;
}

/* Legal */

.legal {
    width: min(var(--main-content-text-width), 100%);
    margin-inline: auto;
    font-size: 1rem;
    hyphens: auto;

    h1 {
        padding-block-end: calc(var(--content-gap) * 2);
        font-family: var(--font-body);
        font-size: var(--legal-title-font-size);
    }

    section {
        padding-block-end: calc(var(--content-gap) * 2);
    }

    h2 {
        padding-block-end: calc(var(--content-gap) / 2);
    }

    ul {
        padding-inline-start: 1.5em;
        list-style: disc;
    }

    :is(p, ul, ol)+* {
        margin-block-start: var(--content-gap);
    }
}

/* Terms and Conditions */

.agb {
    counter-reset: section;
    --agb-col: 3rem;
    --agb-col-sub: 4rem;

    section {
        counter-reset: paragraph;

        h2 {
            counter-increment: section;
            display: grid;
            grid-template-columns: var(--agb-col) 1fr;
            align-items: baseline;

            &::before {
                content: counter(section) ".";
                white-space: nowrap;
                font-variant-numeric: tabular-nums;
            }
        }

        ol {
            padding-inline-start: 0;
            list-style: none;

            >li {
                counter-increment: paragraph;
                display: grid;
                grid-template-columns: var(--agb-col) 1fr;
                align-items: baseline;
                overflow-wrap: break-word;

                &::before {
                    content: counter(section) "." counter(paragraph);
                    white-space: nowrap;
                    font-weight: 700;
                    font-variant-numeric: tabular-nums;
                }

                +li {
                    margin-block-start: var(--content-gap);
                }

                >ol {
                    counter-reset: subitem;
                    grid-column: 2;
                    margin-block-start: var(--content-gap);

                    >li {
                        counter-increment: subitem;
                        grid-template-columns: var(--agb-col-sub) 1fr;

                        &::before {
                            content: counter(section) "." counter(paragraph) "." counter(subitem);
                        }
                    }
                }
            }

            ul {
                grid-column: 2;
                margin-block-start: var(--content-gap);
            }
        }
    }
}

/* Page Not Found */

.page-not-found {
    display: grid;
    place-content: center;
    width: 100%;
    padding-block-start: 4rem;
    text-align: center;
}

.page-not-found :is(h1, p)+* {
    margin-block-start: var(--content-gap);
}