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

:root {
    font-size: 62.5%;
    --margin-1: 2rem;
    --padding: 0.5rem;
    --headerHeight: 3.7rem;
    --naviMargin: 0.2rem;
    --header-inline-padding: 2.5rem;
    --header-inline-right: 1.5rem;
    --width-content: 250px;
}
@media screen and (width < 600px) {
    :root {
        --margin-1: 2rem;
        --width-button: calc(45vw - var(--margin-1));
        --width-content: calc(55vw - var(--margin-1));
        --padding: 1rem;
        --header-inline-right: 1rem;
    }
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

em {
    padding-inline: 0.28rem;
}

html,
body {
    overscroll-behavior: none;
    scroll-behavior: auto !important;
}

@font-face {
    font-family: "TNR";
    src: url('/assets/fonts/TNR.ttf') format('truetype');
}

body {
    font-size: 1rem;
    font-family: "TNR";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; 
    text-rendering: optimizeLegibility;
}

strong {
    font-weight: inherit;
}

/* KRAM */

.project_overview,
.overlay,
.project_section {
    /* Dem Browser sagen, dass sich das hier verändern wird */
    will-change: transform, opacity; 
    /* Ein bewährter Hack, um die GPU-Ebene sofort zu erzwingen */
    transform: translateZ(0); 
}

/* Header */

.header {
    position: fixed;
    width: 100%;
    top: var(--margin-1);
    display: flex;
    justify-content: center;
    z-index: 100;
}

.header_wrapper_outer {
    display: grid;
    grid-template-rows: max-content 0fr;
    transition: grid-template-rows 0.15s;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6.2px);
    -webkit-backdrop-filter: blur(6.2px);
    width: calc(var(--width-content) + var(--width-button) + var(--padding) + var(--padding));
    margin-inline: auto;
    transition: width 0.4s ease;
}
.header_wrapper_outer.open {
    grid-template-rows: max-content 1fr;
    /* transition: grid-template-rows 0.15s; */
}

@media screen and (width < 600px) {
    .header_wrapper_outer {
        width: calc(100vw - (var(--margin-1) * 2));
        margin-inline: var(--margin-1);
        transition: width 0.4s, grid-template-rows 0.2s;
    }
}

.header_wrapper_inner {
    display: flex;
    gap: 2.5rem;
    width: calc(var(--width-content) + var(--width-button) + var(--padding) + var(--padding));
    height: var(--headerHeight);
    overflow: hidden;
    margin-inline: auto;
    transition: width 0.4s ease;
}
@media screen and (width < 600px) {
    .header_wrapper_inner {
        gap: 2.5rem;
        /* width: 100%; */
        width: calc(100vw - (var(--margin-1) * 2));
        margin-inline: auto;
        transition: width 0.4s ease;
    }
}

.expandable {
    overflow: hidden;
    color: rgb(211, 211, 211);
    height: 0; 
    opacity: 0;
    transition: height 0.2s, opacity 0.3s;
    background: rgba(0, 0, 0, 0.2);
    margin-inline: var(--naviMargin);
}

.header_wrapper_outer.open .expandable {
    height: calc(var(--headerHeight) - var(--naviMargin));
    margin-bottom: var(--naviMargin);
    opacity: 1;
}

.expandable_inner {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.expandable_item span {
    height: calc(var(--headerHeight) - var(--naviMargin));
    display: flex;
    align-items: center;
    padding-inline: var(--header-inline-padding);
    line-height: 1.1rem;
    letter-spacing: -4%;
    /* white-space: nowrap; */
}

/* Expandable */

.radio_button_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    gap: 1rem;
    color: white;
    padding-left: var(--header-inline-padding);
}

.radio_button {
    display: flex;
    gap: 0.5rem;
}
.radio_button label:hover {
    cursor: pointer;
}

.info_wrapper {
    width: var(--width-content);
    display: grid;
    justify-content: space-between;
    transform: translateX(0);
    align-items: center;
    white-space: nowrap;
    padding-right: var(--header-inline-right);
    grid-template-columns: 1fr 1fr;
    opacity: 1;
    transition: translate 0.3s, opacity 1s, width 0.4s;
}

@media screen and (width < 600px) {
    .info_wrapper {
        width: 100%;
        padding-right: 1.8rem;
    }
}

.project_info_wrapper {
  height: var(--headerHeight); 
  overflow: hidden;
  position: relative;
  justify-self: start;
}

.project_info_inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.04s ease;
}

.project_info_item_wrapper span {
    display: block;
    perspective: 1px;
}
.project_info_item_wrapper span:first-child {
     margin-top: -0.1rem;
}
.project_info_item_wrapper span:last-child {
    margin-top: -0.2rem;
}

.project_info_item {
  height: var(--headerHeight); 
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* text-transform: capitalize; */
}

.title {color:white}
.filter {color: darkgrey}

.icon_switch {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-self: end;
}
.icon_switch svg {
    width: 1.1rem;
    height: 1.1rem;
}
.icon_switch > span {
    display: flex;
}
.icon_switch > span:hover {
    cursor: pointer;
}
.icon_switch_dot:hover svg rect {
    fill: white;
}
.icon_switch_grid:hover svg rect {
    stroke: white;
}
body:has(.header_wrapper_outer.open) .icon_switch_dot svg rect {
    fill: white;
}
body:has(.project_overview.visible) .icon_switch_grid svg rect {
    stroke: white;
}
.icon_switch_dot,
.icon_switch_grid {
  -webkit-tap-highlight-color: transparent;
}

.header_wrapper_inner:has(#text:checked) {
    width: calc(var(--width-button) + var(--header-inline-padding));
    background: rgba(0, 0, 0, 0.5);
    transition: width 0.4s ease;
    backdrop-filter: blur(6.2px);
    -webkit-backdrop-filter: blur(6.2px);
}

.header_wrapper_inner:has(#text:checked) .radio_button_wrapper {
    white-space: nowrap;
    width: var(--width-button);
}

.header_wrapper_inner:has(#text:checked) .info_wrapper {
    transform: translateX(110%);
    width: 0px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.1s, width 0.4s, translate 0.5s;
}
.header_wrapper_inner:has(#text:checked) {
    gap: 0rem;
}
.header_wrapper_outer:has(#text:checked) {
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: calc(var(--width-button) + var(--header-inline-padding));
}

.project_info span {
    display: block;
    transition: transform 0.3s ease, opacity 0.2s ease;
    text-transform: capitalize;
}
.project_info span:first-child {
    color: white;
}
.project_info span:last-child {
    color: darkgrey
}
input[type="radio"]:focus-visible {
  outline: none;
}
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid white;
  border-radius: 50%;
  background: transparent;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* dot */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid white;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  
  padding: 0;
  margin: 0;
  line-height: 0; 
  box-sizing: border-box;
  vertical-align: middle;
}

input[type="radio"]::after {
  content: "";
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  
  transform: scale(0);
  transition: transform 0.15s ease;
  
  margin: 0; 
  flex-shrink: 0;
}

input[type="radio"]:hover::after {
  transform: scale(1);
}

input[type="radio"]:checked::after {
  transform: scale(2);
}

/* Overlay */

.overlay {
  position: fixed;
  height: 100dvh;
  width: 100vw;
  overflow-y: scroll;
  background-color: rgba(255,255,255,0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 50;
  scroll-behavior: smooth;
}
.overlay_content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.overlay_info {
    grid-column: 1;
    width: 25vw;
    font-size: 1.6rem;
    line-height: 1.6rem;
    letter-spacing: -0.03rem;
    padding: 2rem;
}
.overlay_imprint {
    height: 100dvh;
    font-size: 1.6rem;
    line-height: 1.6rem;
    letter-spacing: -4%;
    width: 40vw;
    grid-column: 2;
    padding: 2rem;
    justify-self: end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    will-change: opacity, visibility;
}
.overlay_imprint.visible {
    opacity: 1;
    visibility: visible;
    transition: all 0.2s;
}

@media screen and (width < 600px) {
    .overlay_content {
        grid-template-columns: 1fr;
        width: 100%;
        margin-top: calc(var(--margin-1) + var(--headerHeight) + var(--margin-1));
        padding-top: 0rem;
    }
    .overlay_info {
        grid-column: 1;
        width: 100%;
    }
    .overlay_imprint{
        grid-column: 1;
        width: 100%;
        justify-self: start;
        display: none;
        height: auto;
    }
    .overlay_imprint.visible {
        display: block;
    }
}

/* Main & Fullpage Anpassungen */

.main {
    width: 100vw;
    height: 100dvh;
    overflow: hidden; 
    position: relative;
}
body:has(.overlay_imprint.visible) .main {
    pointer-events: none;
}

.project_section {
    will-change: transform;
}

.project_info_inner, .expandable_inner {
    transition: transform 0.8s cubic-bezier(1, -0.003, 0.24, 0.955) !important;
    will-change: transform;
}

section.project.section {
    height: 100dvh !important; 
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: clip; */
    box-sizing: border-box;
}

section.project .fp-overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh !important; 
}

/* Image Sizes Start */

picture {
  display: contents;
}

section .img-swap,
section picture,
section img,
section video {
  max-width: 100%;
  object-fit: cover;
}

.desktop-fullheight .img-swap,
.desktop-fullheight picture,
.desktop-fullheight img,
.desktop-fullheight video {
  height: 100dvh;
  max-width: 100%;
}

.desktop-fullviewport .img-swap,
.desktop-fullviewport picture,
.desktop-fullviewport img,
.desktop-fullviewport video {
  height: 100dvh;
  width: 100vw;
  object-fit: cover;
}

.desktop-height80 .img-swap,
.desktop-height80 picture,
.desktop-height80 img,
.desktop-height80 video {
  height: 80dvh;
  max-width: 100%;
}

.project-container {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.blur-up-img {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  width: 100%;
  height: 100%;
}

.blur-up-img.is-loaded {
  opacity: 1;
}

@media (max-width: 600px) {
    .mobile-fullheight .img-swap,
    .mobile-fullheight picture,
    .mobile-fullheight img,
    .mobile-fullheight video {
        height: 100%;
        max-width: 100vw;
    }

    .mobile-fullviewport .img-swap,
    .mobile-fullviewport picture,
    .mobile-fullviewport img,
    .mobile-fullviewport video {
        height: 100dvh;
        width: 100vw;
    }

    .mobile-width80 .img-swap,
    .mobile-width80 picture,
    .mobile-width80 img,
    .mobile-width80 video {
        width: 80vw;
        height: auto;
    }
}

/* Image Sizes Ende */

/* Project Overview Grid */
.project_overview {
    position: fixed;
    top: calc(1rem + var(--headerHeight) + var(--margin-1));
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    height: calc(100dvh - calc(var(--margin-1) + var(--headerHeight)));
    width: calc(var(--width-content) + var(--width-button) + var(--padding) + var(--padding));
    z-index: 100;
    transition: transform 0.4s, opacity 0.3s;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6.2px);
    -webkit-backdrop-filter: blur(6.2px);
    padding: 1rem;
    padding-bottom: 2rem;
    overflow-y: auto;
    opacity: 0;
}

@media screen and (width < 600px) {
    .project_overview {
        width: calc(100% - var(--margin-1) - var(--margin-1));
    }
}

.project_overview.visible {
    transform: translateX(-50%) translateY(0);
    transition: transform 0.2s, opacity 0.3s;
    opacity: 1;
}

.project_list_item {
    display: grid;
    grid-template-columns: 6rem 1fr;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    transition: background-color 0.2s ease;
    height: 8rem;
    margin-bottom: 1rem;
}
.project_list_item.is-active {
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.35s ease;
}
@media (hover: hover) {
    .project_list_item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transition: background-color 0.35s ease;
    }
}
.project_list_item_image {
    display: flex;
    justify-content: center;
}
.project_list_item_image img,
.project_list_item_image video {
    max-height: 6rem;
    max-width: 6rem;
    object-fit: cover;
}
.project_list_item_text {
    display: flex;
    flex-direction: column;
}

.imprint_button {
    display: block;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    appearance: inherit;
    -webkit-appearance: none; /* Safari specific */
}

.imprint_button:hover{
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.project_section.is-skipping .project:not(.source-node):not(.target-node) {
    visibility: hidden !important;
    opacity: 0 !important;
}

.project_section.is-skipping .project.source-node,
.project_section.is-skipping .project.target-node {
    visibility: visible !important;
    opacity: 1 !important;
}

.project_section.is-skipping .project {
    will-change: auto !important;
    backface-visibility: hidden;
}

.fp-watermark {
    display: none !important;
}

/* IMAGE SWAP */

/* Ensure the wrapper fills the section container */

picture.blur-up-wrapper {
  display: inline-block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.blur-up-img {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blur-up-img.is-loaded {
  opacity: 1;
}