/**************************************************** RESET ****************************************************/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
    box-sizing: border-box;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

button {
    appearance: none;
    font-weight: inherit;
    font-family: inherit;
}

html {
    background-color: #000;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: "";
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/**************************************************** FONTS ****************************************************/

@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../fonts/NHaasGroteskDSPro-75Bd.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/**************************************************** VARIABLE ****************************************************/

:root {
    --padding-s: 0.75vw; 
    --padding-m: calc(var(--padding-s) * 2);

    --animationspeed: 600ms;

    --font-family: 'NHaasGrotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --fontsize-s: 1vw;
    --fontsize-m: 3vw;
    --fontsize-l: 6vw;

    --lineheight-s: 1.0;
    --lineheight-m: 1.2;
    --lineheight-l: 2.0;

}

/**************************************************** BASIC ****************************************************/

* {
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-style: normal;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    touch-action: manipulation;
    -ms-overflow-style: none;
    scrollbar-width: none;
    font-size: inherit;
    line-height: inherit;
}

body {
    font-family: var(--font-family);
    font-size: var(--fontsize-s);
    line-height: var(--lineheight-m);
    font-weight: normal;
}

html, body {
    overflow-x:clip;
}

/**************************************************** LINK ****************************************************/

a {
    color:inherit;
    text-decoration:underline;
    text-underline-position: under;
    text-decoration-thickness: 0.15vw;
}

a:hover {
    text-decoration:none;
}

a strong {
    text-decoration:underline !important;
    text-underline-position:auto !important;
    text-decoration-thickness: 0.4vw !important;   
}

a:hover strong {
    text-decoration:none !important;
}

.text-max a {
    text-decoration:underline !important;
    text-underline-position:auto !important;
    text-decoration-thickness: 2vw !important;   
}

.text-max a:hover {
    text-decoration:none !important;
}

nav a,
footer a,
nav a strong,
footer a strong {
    text-decoration:none !important;
}

nav a:hover,
footer a:hover {
    text-decoration:underline !important;
    text-underline-position: under !important;
    text-decoration-thickness: 0.15vw !important;
}

nav a:hover strong,
footer a:hover strong {
    text-decoration:underline !important;
    text-underline-position:auto !important;
    text-decoration-thickness: 0.4vw !important;   
}

nav .logo a {
    text-decoration:none !important;
}


.nav-dark * {
    color: black !important;
}


/**************************************************** TYPE ****************************************************/

.text-s {
    font-size: var(--fontsize-s);
    line-height: var(--lineheight-m);
    font-weight: normal;
}

.text-m {
    font-size: var(--fontsize-m);
    line-height: var(--lineheight-s);
    font-weight: normal;
}

.text-l {
    font-size: var(--fontsize-l);
    line-height: var(--lineheight-s);
    font-weight: normal;
}

.text-max {
    white-space: nowrap;
    /* Fallback für Firefox/alten Safari */
    margin-block-start: calc((1cap - 1lh) / 2.5);
    margin-block-end: calc((1cap - 1lh) / 2.5);
    
    /* Native trim überschreibt das, wo verfügbar */
    @supports (text-box-trim: trim-both) {
        margin-block: 0;
        text-box-edge: cap alphabetic;
        text-box-trim: trim-both;
    }
}

.case-upper,
.case-upper * {
    text-transform: uppercase;
}

sup {
    vertical-align:top;
    font-size: var(--fontsize-s);
    position: relative;
    top: 0.2vw;
}

.text-max sup {
    top: calc( var(--padding-m) - 0.2vw);
    position: absolute;
}

.text-s strong {
    font-size: var(--fontsize-m);
    line-height: var(--lineheight-s);
}

.text-m strong {
    font-size: var(--fontsize-l);
    line-height: var(--lineheight-s);
}

.color-white {
    color: white;
}

.color-black {
    color: black;
}

/**************************************************** PADDING ****************************************************/

.padding-s {
    padding:var(--padding-s);
}

.padding-m {
    padding:var(--padding-m);
}

/**************************************************** GRID ****************************************************/

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    width: 100%;
    align-items: start;
}

.w-1-12 {
    grid-column: span 1;
}

.w-2-12 {
    grid-column: span 2;
}

.w-3-12 {
    grid-column: span 3;
}

.w-4-12 {
    grid-column: span 4;
}

.w-5-12 {
    grid-column: span 5;
}

.w-6-12 {
    grid-column: span 6;
}

.w-7-12 {
    grid-column: span 7;
}

.w-8-12 {
    grid-column: span 8;
}

.w-9-12 {
    grid-column: span 9;
}

.w-10-12 {
    grid-column: span 10;
}

.w-11-12 {
    grid-column: span 11;
}

.w-12-12 {
    grid-column: span 12;
}

.w-auto {
    grid-column: auto;
}

/**************************************************** POSITION ****************************************************/

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
    z-index: 100;
}

.position-fixed {
    position: fixed;
    z-index: 100;
}

.position-sticky {
    position: sticky;
    z-index: 100;
}

/**************************************************** MEDIA ****************************************************/

img,
video,
picture,
figure {
    width: 100%;
    display: block;
}

/**************************************************** RATIO ****************************************************/

.ratio-16-9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ratio-3-4 {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.ratio-1-1 {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ratio-3-2 {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/**************************************************** ALIGN ****************************************************/

.align-center {
    justify-items: center;
    text-align: center;
}

.align-left {
    justify-items: start;
    text-align: left;
}

.align-right {
    justify-items: end;
    text-align: right;
}

/**************************************************** PROJECT ****************************************************/

.image-container > * {
    grid-row: 1;
    grid-column: 1 / -1;
}

.image-container {
    color:white;
}

.image-container .text {
    position: sticky;
    top: 0;
    z-index: 2;
    pointer-events: none;
}

.image-container .overlay-top {
    grid-column-end: 7 !important;
}

.image-container .overlay-mid {
    align-self: center;
    grid-column-end: 7 !important;
}

.image-container .overlay-bottom {
    align-self: end;
    grid-column-end: 7 !important;
}

.hover-reveal .text {
    opacity: 0;
}

.hover-reveal:hover .text {
    opacity: 1;
}

.page-homepage .project {
    margin-top:-1px;
}

/**************************************************** MASONRY ****************************************************/

.masonry {
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.masonry.masonry-ready {
    opacity: 1;
}

.masonry-item {
    width: 33.333%;
    position: relative;
    overflow: hidden;
}

@media (orientation: portrait) {
    .masonry-item {
        width: 100%;
    }
}

.masonry-item .text {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 2;
    pointer-events: none;
}

.masonry-item .overlay-top {
    top: 0;
    padding-bottom: var(--padding-m);
}

.masonry-item .overlay-mid {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.masonry-item .overlay-bottom { 
    bottom: 0 !important;
    top: auto !important;
}

.masonry-item figure {
    width: 100%;
    margin: 0;
}

.masonry-item picture {
    overflow: hidden;
}

.masonry-item img,
.masonry-item video {
    width: 100%;
    height: auto;
    display: block;
    transition: ease-in-out var(--animationspeed); 
}

picture {
    overflow: hidden;
}

img.lazyload {
    filter: blur(20px);
    transform: scale(1.05);
    transition: filter 0.5s ease, transform 0.5s ease;
    overflow: hidden;
}

img.lazyloaded {
    filter: blur(0);
    transform: scale(1);
    overflow: hidden;
}

.masonry-item a:hover img {
    transform: scale(1.03);
}

/**************************************************** NAV ****************************************************/

nav {
    top: 0;
    right:0px;
    z-index: 100;
    color:white;
}

nav .navitems {
    position: absolute;
    top:-0.3vw;
    right:0px;
    display: flex;
}

.nav-dark {
    clip-path: inset(100% 0 0 0);
    color: black !important;
}

footer {
    background-color: white;
}

/**************************************************** ORIENTATION ****************************************************/

@media (orientation: portrait) {
    .show-desktop {
        display: none !important;
    }

    .masonry {
        height: auto !important;
    }

    .masonry-item {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
    }
}

@media (orientation: landscape) {
    .show-mobile {
        display: none !important;
    }
}

/**************************************************** MODULES ****************************************************/

.block-type-image > div > * {
    grid-row: 1;
    grid-column: 1 / -1;
}

.text-container {
    background:white;
}

.text-container > * {
    grid-column-end: 8 !important;
}

.text-container .text {
    position: sticky;
    top: 0;
}

/**************************************************** MOBILE ****************************************************/

.page-homepage .overlay-bottom.text-s {
    font-size:0px !important; 
}

@media screen and (max-width: 768px) {

    :root {
        --padding-s: 1vw; 

        --fontsize-s: 2.5vw;
        --fontsize-m: 4.5vw;
        --fontsize-l: 24vw;

    }

    .image-container .overlay-top {
        /* grid-column-end: 13 !important; */
        /* overflow: hidden; */
    }

    .image-container .overlay-mid {
        align-self: center;
        grid-column-end: 7 !important;
        opacity:1 !important;
    }

    .image-container .overlay-bottom {
        align-self: end;
        grid-column-end: 7 !important;
    }

    .text-container > * {
        grid-column-end: 7 !important;
    }

    footer {
        overflow:hidden; 
    }

    nav {
        /* position: absolute !important; */
    }

    .navitems {
        gap:1vw;
    }

    .navitem {
        margin-top:-0.5vw;
    }

    .logo {
        margin-top:0.5vw;
    }

    .masonry-item {
        position: relative !important;
        overflow: clip !important;
    }

    .masonry-item .text {
        position: sticky !important;
        left: 0;
    }

    .masonry-item .overlay-mid {
        top:0px !important;
        transform: none !important;
    }

    .masonry-item .overlay-bottom {
        opacity:1;
    }

    .page-homepage .overlay-bottom.text-s {
        font-size:0px !important; 
    }

}