@charset "utf-8";

@import url("fonts.css");
@import url("variables.css");

/* === { *** } === */

*,
*::after,
*::before {
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    font-variation-settings: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
}

:focus-visible {
    outline: 2px solid oklch(from var(--color_foreground) l c h / 50%);;
    outline-offset: 2px;
}

img,
picture,
video {
    display: block;
    max-width: 100%;
}

/* === { *** } === */

html {
    font-size: 125%;
    font-family: "Instrument Sans", sans-serif;
    font-variation-settings: "wdth" 75;
    line-height: 1;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color_background);
    color: var(--color_foreground);
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

main {
    background-color: oklch(from var(--color_foreground) l c h / 2.5%);
    flex-grow: 1;
}

/* === { *** } === */

:where(h1, h2, h3, h4) {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    line-height: 1.25;
}

:where(h1, h2, h3, h4):not(:first-child) {
    margin-block-start: 1em;
}

h1 { font-size: 2.00rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.50rem; }
h4 { font-size: 1.25rem; }

hgroup {
    display: flex;
    flex-flow: column-reverse;
    gap: 0.25rem;
}

hgroup p {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- { *** } --- */

p {
    line-height: 1.5;
}

:where(b, strong) {
    font-weight: 600;
}

em {
    font-family: "Instrument Serif", serif;
}

/* --- { *** } --- */

dl {
    line-height: 1.5;
}

dl dt {
    font-weight: 600;
}

dl dt::after {
    content: ":";
}

dl dt:not(:first-child) {
    margin-block-start: 1rem;
}

dl dd {
    margin-inline-start: 2rem;
}

ul {
    line-height: 1.5;
    list-style-position: inside;
    list-style-type: square;
}

/* --- { *** } --- */

hr {
    align-items: center;
    align-self: stretch;
    background-color: var(--color_foreground);
    border: none;
    display: flex;
    height: 2px;
    justify-content: center;
    margin-block: 4rem;
    overflow: visible;
}

hr::after {
    background: var(--color_foreground) url("/static/images/logo.svg") no-repeat center / contain;
    content: "";
    height: 1rem;
    width: 1rem;
}

/* --- { *** } --- */

address {
    align-items: start;
    display: flex;
    flex-flow: column;
    font-style: normal;
    gap: 1rem;
    line-height: 1.5;
}

address .wrapper {
    display: flex;
    flex-flow: column;
}

address .social {
    display: flex;
    gap: 0.75rem;
    padding-block: 0.25rem;
}

address .social img {
    height: 1rem;
}

address .social img:hover {
    opacity: 75%;
}

/* --- { *** } --- */

a:where(:link, :visited) {
    color: inherit;
    text-decoration-thickness: 1px;
}

a:where(:hover, :active) {
    text-decoration-style: dotted;
}

span[title] {
    cursor: help;
    text-decoration: underline dotted 1px;
}

/* === { *** } === */

section {
    display: flex;
    flex-flow: column;
    justify-content: end;
    padding: 8rem 2rem;
    position: relative;
}

/* --- { *** } --- */

section .foreground {
    align-items: center;
    display: flex;
    flex-flow: column;
    gap: 4rem;
    position: relative;
    z-index: 200;
}

section .foreground .row {
    align-items: start;
    display: flex;
    gap: 4rem;
    width: min(100%, var(--page_max-width));
}

section .foreground .row .column {
    align-items: start;
    display: flex;
    flex-flow: column;
    gap: 1rem;
    inset-block-start: 8rem;
    position: sticky;
}

section .foreground .row .column:nth-child(1) { flex: 1 0 0; }
section .foreground .row .column:nth-child(2) { flex: 2 0 0; }

section .foreground .row .column figure {
    position: relative;
}

section .foreground .row .column figure figcaption {
    backdrop-filter: blur(1rem) brightness(105%);
    font-size: 0.75rem;
    inset-inline-start: 0.5em;
    inset-block-end: 0.5em;
    padding: 0.5em;
    position: absolute;
}

section .foreground .row .column .media {
    background: var(--color_background) url("/static/images/logo.svg") no-repeat center / 2rem;
    color: transparent;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

section .foreground .row .column .container {
    align-items: inherit;
    display: inherit;
    flex-flow: inherit;
    gap: inherit;
}

/* --- { *** } --- */

section:has(.background) {
    color: var(--color_background);
    min-height: 100dvh;
}

section .background {
    filter: brightness(50%);
    inset: 0;
    position: absolute;
    z-index: 100;
}

section .background :where(img, video) {
    background: var(--color_background) url("/static/images/logo.svg") no-repeat center / 2rem;
    color: transparent;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

/* --- { *** } --- */

#kontakt {
    background-color: oklch(from var(--color_foreground) l c h / 2.5%);
}

/* === { *** } === */

header {
    inset-inline: 0;
    padding-inline: 2rem;
    pointer-events: none;
    position: fixed;
    z-index: 900;
}

header .container {
    margin-inline: auto;
    width: min(100%, var(--page_max-width));
}

header .container nav {
    display: flex;
    pointer-events: auto;
}

header .container nav a {
    aspect-ratio: 1 / 1;
    height: 2rem;
}

header .container nav .logo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

header .container nav .contact {
    align-items: center;
    background-color: var(--color_background);
    display: flex;
    justify-content: center;
}

header .container nav .contact img {
    height: 50%;
}

/* --- { *** } --- */

footer {
    padding: 1rem 2rem;
}

footer .container {
    display: flex;
    gap: 2rem;
    margin-inline: auto;
    justify-content: space-between;
    width: min(100%, var(--page_max-width));
}

footer .container nav {
    display: flex;
    gap: 1rem;
}

footer .container nav a {
    text-decoration: none;
    text-transform: uppercase;
}

footer .container nav a:hover,
footer .container .copyright {
    opacity: 75%;
}

/* === { *** } === */

dialog[open] {
    border: none;
    display: flex;
    flex-flow: column;
    gap: 1rem;
    margin: auto;
    max-height: calc(100dvh - 2rem);
    max-width: calc(100dvw - 2rem);
    padding: 1rem;
    width: min(100%, calc(var(--page_max-width) / 2));
}

dialog[open]:focus-visible {
    outline: none;
}

dialog[open]::backdrop {
    backdrop-filter: blur(1rem) brightness(50%);
}

dialog[open] .content {
    align-items: start;
    display: flex;
    flex-flow: column;
    gap: 1rem;
}

/* === { *** } === */

[data-component="button"] {
    background: none;
    border: 2px solid currentColor;
    color: currentColor;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.25;
    margin-block-start: 1rem;
    padding: 0.5em 0.75em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

[data-component="button"]:hover {
    opacity: 75%;
}

/* --- { *** } --- */

[data-component="clients"] {
    align-self: stretch;
    display: grid;
    grid-auto-rows: 4rem;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

[data-component="clients"] img {
    filter: grayscale(100%);
    height: 100%;
    object-fit: contain;
    width: 100%;
}

[data-component="clients"] img:hover {
    filter: none;
}

/* === { *** } === */

@media (max-width: 840px) {
    section {
        padding-block: 4rem;
    }

    section:first-child {
        padding-block-start: 5rem;
    }

    section:has(.background) {
        min-height: unset;
    }

    section .foreground .row {
        flex-flow: column;
    }

    section .foreground .row .column {
        position: unset;
    }

    header .container nav a {
        height: 3rem;
    }

    footer .container {
        flex-flow: column-reverse;
    }

    footer .container nav {
        flex-flow: column;
    }

    [data-component="clients"] {
        grid-template-columns: repeat(2, 1fr);
    }

    [data-component="clients"] .client:last-child {
        display: none;
    }
}

@media (max-width: 560px) {
    dl dd {
        margin-inline-start: 1rem;
    }

    section,
    header,
    footer {
        padding-inline: 1rem;
    }
}
