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

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

ul {
    list-style: none;
}

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

p > a {
    background-color: white;
    border: 1px solid black;
    padding: 0.8rem 2.2rem;
    display: inline-block;
    margin-top: 1rem;
}

button {
    all: unset;
    box-sizing: border-box;
    &:focus-visible {
        outline: revert;
    }
}

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

/* Custom Properties */

:root {
    font-size: 62.5%;
    --clr-1: white;
    --clr-2: black;
    --clr-3: lightgrey;
    --font-size-xs: 0.8rem;
    --font-size-s: 1.2rem;
    --font-size-m: 1.4rem;
    --font-size-l: 2rem;
    --font-size-xl: 6rem;
    --gap-1: clamp(1rem, 0.1857rem + 2.1714vw, 2.8rem);
    --padding-1: 3.5rem;
    --sticky: 20rem;
}
@media screen and (width < 850px) {
    :root {
        --padding-1: 1rem;
        --font-size-m: 1.3rem;
        --font-size-xl: 3.3rem;
    }
}

/* Font Styles */

h2 {
    font-family: "Helvetica Neue";
    font-weight: 500;
    /* letter-spacing: -0.26rem; */
    font-size: var(--font-size-xl);
    margin-bottom: 3rem;
    padding-top: 3rem;
    text-transform: uppercase;
}

#geschichte h2 {
    margin-bottom: 0rem;
    padding-top: 0rem;
    align-self: center;
}

@media screen and (width < 800px) {
    h2:not(#geschichte h2) {
        padding-top: 0.5rem;
    }
    #mietflaechen h2 {
        margin-bottom: 1rem;
    }
}

.font-nav {
    font-family: "Helvetica Neue";
    font-weight: bold;
    font-size: var(--font-size-s);
}

.font-text-regular,
p {
    font-family: "Helvetica Neue";
    font-weight: normal;
    font-size: var(--font-size-m);
    line-height: 130%;
    letter-spacing: 0.032rem;
}

.font-text-large {
    font-family: "Helvetica Neue";
    font-weight: normal;
    font-size: var(--font-size-l);
}

/* Utility */

.no-scroll {
    overflow: hidden;
}

/* General Styling */

html:not(.left-images) {
    @media (prefers-reduced-motion: no-preference) {
        scroll-behavior: smooth;
    }
}

html {
    overscroll-behavior: none;
}

body {
    font-size: 1.6rem;
    font-family: "Helvetica Neue";
    overflow-x: hidden;
}

/* Header & Navigation */

.header-desktop {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--clr-1);
    display: block;
}

.header-mobile {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--clr-1);
    border-bottom: 1px solid var(--clr-2);
    display: none;
}

.navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding-block: 1.5rem;
    margin-inline: var(--padding-1);
    border-bottom: 1px solid var(--clr-2);
}

.navigation ul {
    display: flex;
    gap: var(--gap-1);
    text-transform: uppercase;
}

.navigation ul li a {
    cursor: pointer;
}
.navigation ul li a:hover {
    color: lightgrey;
}

.imprint-header {
    padding-block: 2rem;
    margin-inline: var(--padding-1);
    border-bottom: 1px solid var(--clr-2);
}

    .nav_left {
        justify-self: start;
    }
    .logo {
        justify-self: center;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    .logo.visible {
        opacity: 1;
    }
    .logo img {
        min-width: 15rem;
    }
    .nav_right {
        justify-self: end;
    }


.nav_right_lang:not(.active) {
    color: var(--clr-3);
}

.expose_dl {
    display: block;
    position: sticky;
    width: max-content;
    background-color: white;
    border: 1px solid black;
    left: 100%;
    top: calc(var(--headerHeightDesktop) + 1rem);
    margin-right: var(--padding-1);
    margin-block: 1rem;
    padding: 0.8rem 2.2rem;
    z-index: 100;
}

.mobile_nav {
    position: fixed;
    top: var(--headerHeightMobile);
    left: 0;
    height: calc(100dvh - var(--headerHeightMobile));
    width: 100vw;
    background-color: var(--clr-1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 120;
    margin-top: -0.5px;
}

@media screen and (width < 1050px) {
    .header-desktop {
        display: none;
    }
    .expose_dl {
        top: calc(var(--headerHeightMobile) + 1rem);
        z-index: 100;
    }
    .header-mobile {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        padding: 1.5rem var(--padding-1);
    }
    .logo {
        grid-column: 2;
    }
    /* .logo img {
        margin-top: -0.5rem;
    } */
    .menu_button {
        grid-column: 3;
        justify-self: end;
        align-self: center;
        text-transform: uppercase;
        font-weight: 600;
        font-size: var(--font-size-s);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease-in-out;
    }
    .menu_button.show-menu-button {
        opacity: 1;
        pointer-events: all;
    }

    .mobile_nav.visible {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
    .mobile_nav ul {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }
    .mobile_nav ul li {
        font-weight: 600;
        font-size: var(--font-size-l);
        text-transform: uppercase;
    }
}

/* Section */

.main_imprint {
    padding-inline: var(--padding-1);
    padding-top: 5rem;
    min-height: 100vh;
    width: 50vw;
}

@media screen and (width < 800px) {
    .main_imprint {
        width: 100%;
    }
}

.section:not(#geschichte) {
    display: flex;
    gap: 5rem;
}

.section:not(#lage) {
    min-height: 100vh;
    border-bottom: 1px solid var(--clr-2);
}

.section > div {
    flex: 1
}

.section:not(#landing_section):not(#geschichte) {
    margin-inline: var(--padding-1);
    padding-bottom: 5rem;
}

#geschichte .section {
    padding-bottom: 0;
}
.geschichte-entries {
    margin-bottom: 3rem;
}
.geschichte-images {
    margin-bottom: 1rem;
}

/* Section Left Structure */

.section_left {
    height: calc(100vh - var(--headerHeightDesktop));
    position: sticky;    
    top: var(--headerHeightDesktop);
    display: flex;
    flex-direction: column;
}

/* Section Right Structure */

.section_right {
    min-height: 150vh;
    padding-top: 4.9rem;
}

.section_right img {
    width: 100%;
}

.section_right p {
    padding-block: 0.5rem;
}

.section_right img:not(:last-child) {
    margin-bottom: 1rem;
}
.section_right > section img {
    margin-bottom: 1rem;
}

@media screen and (width < 800px) {
    .section {
        flex-direction: column;
    }
    #mietflaechen .section_left {
        top: var(--headerHeightMobile);
        background-color: var(--clr-1);
    }
    .section_left:not(#mietflaechen .section_left) {
        /* top: var(--headerHeightMobile);  */
        position: relative;
        /* margin-inline: var(--padding-1); */
    }
}

/* Slider Komponente */

.landing_scrollWrapper {
  position: relative;
  height: 100vh;
  width: 100vw;
  margin-bottom: calc(var(--headerHeightDesktop) * -1);
}

.comparisonSection {
  position: relative;
  width: 100vw;
  /* height: calc(100vh - var(--headerHeightDesktop)); */
  height: 100vh;
  overflow: hidden;
}

.comparisonImage {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.comparisonImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Remove horizontal transforms */
.afterImage {
  overflow: hidden;
  z-index: 2;
}

.landing_logo {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 1000;
}

.landing_logo img {
    width: 20vw;
}

.cta_button {
    position: absolute;
    z-index: 1000;
    left: 50%;
    top: 85%;
    transform: translateX(-50%);
    transition: top 0.35s ease;
}

.cta_button:hover {
    top: 86%;
}

.cta_button img {
    width: 3vw;
    min-width: 50px;
}

/* PROJEKT SECTION */

#projekt .section_left > div:nth-of-type(1) {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--clr-2);
}

#projekt .section_left > div:nth-of-type(2) {
    padding-top: 0.5rem;
}

#projekt .section_left > div:nth-of-type(3) {
    margin-top: 6rem;
}

/* MIETFLÄCHEN SECTION */

#mietflaechen .section_left > div:nth-child(3) {
    width: 50%;
    /* aspect-ratio: 4/2.93; */
    overflow: hidden;
}

#mietflaechen .section_left > div:nth-child(3) img {
    width: 100%;
    aspect-ratio: 1;
} 

/* #mietflaechen .section_right > section {
    margin-top: -14.3rem; 
    padding-top: 14.3rem;
} */

.flaeche {
   height: 100%;
}

.left-images > div > div {
    margin-block: 1.5rem;
}

.cover_image {
    display: none;
}

@media screen and (width < 800px) {
    .cover_image {
        display: block;
    }
}

.anchor-menu {
    text-transform: uppercase;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--clr-2);
}

.anchor-menu a.active {
  font-weight: bold;
}

.left-images {
    margin-top: 1.5rem;
    display: block;
}

@media screen and (width < 800px) {
    .left-images {
        display: none;
    }
}

/* GESCHICHTE OVERLAY */

#geschichte {
    background-color: white;
    left: 0;
    width: calc(100vw - 2 * (var(--padding-1)));
    inset-inline: var(--padding-1);
    display: grid;
    grid-template-rows: max-content 0fr;
    margin-inline: var(--padding-1);
    transition: grid-template-rows 0.3s ease-in-out;
    /* margin-top: calc(-1 * var(--headerHeightDesktop));
    padding-top: var(--headerHeightDesktop); */
    scroll-margin-top: var(--headerHeightDesktop);
}

.open_button {
    align-self: center;
    display: grid;
}

.open_button svg {
    padding-block: 1rem;
    width: 9rem;
    transition: transform 0.2s ease-in-out;
}


/* Prevent iOS tap highlight */
svg, .open_button {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}

/* Ensure no background flashes in parent */
.open_button {
  background-color: transparent;
  -webkit-backface-visibility: hidden; /* Optional, helps with some render issues */
  backface-visibility: hidden;
}

/* Remove focus ring if applied */
svg:focus, .open_button:focus {
  outline: none;
}

@media screen and (width < 800px) {
    .open_button svg {
        width: 5rem;
    }
}

#geschichte.open {
    grid-template-rows: max-content 1fr;
}

#geschichte.open .open_button svg {
    transform: rotate(45deg);
}

.section:not(#geschichte .section) {
    min-height: auto;
    border-bottom: 1px solid var(--clr-2);
}

#geschichte > div:first-child {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

#geschichte > div:last-child {
    overflow: hidden;
}

#geschichte p {
    padding: 0.5rem;
}

#geschichte img {
    width: 100%;
}

@media screen and (width < 800px) {
    #geschichte h2 {
        align-self: center;
    }
    #geschichte {
        top: var(--headerHeightMobile);
        inset-inline: 0;
        border-inline: none;
        /* margin-top: calc(-1 * var(--headerHeightMobile));
        padding-top: var(--headerHeightMobile); */
        scroll-margin-top: var(--headerHeightMobile);
    }
}

/* LAGE */

#lage .section {
    height: max-content;
    border-bottom: none;
}

#lage h2 {
    margin-bottom: 1.5rem;
}

#lage p {
    margin-bottom: 3rem;
    font-weight: 400;
}

.section_fullWidth img {
    width: 100%;
}

@media screen and (width < 800px) {
    .section_fullWidth img {
        width: 100%;
        /* aspect-ratio: 1; */
        object-fit: cover;
    }
}

#lage,
#kontakt {
    position: sticky;
    top: var(--headerHeightDesktop);
    background-color: white;
    height: calc(100dvh - var(--headerHeightDesktop));
}

@media screen and (width < 800px) {
    #lage,
    #kontakt {
        top: var(--headerHeightMobile);
    }
}

#kontakt {
    border-top: 1px solid var(--clr-2);
}

/* KONTAKT */

#kontakt .section_fullWidth {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media screen and (width < 800px) {
    #lage,
    #kontakt {
        height: calc(100dvh - var(--headerHeightMobile));
    }
}

#kontakt p {
    text-transform: uppercase;
    font-weight: 600;
}

/* FOOTER */

.footer {
    margin-inline: var(--padding-1);
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    padding-block: 1rem;
    z-index: 100000;
    position: relative;
    background: white;
}

.image-description {
    margin-bottom: 1.2rem;
}


/* Hero Section */

/* The pinning container */
.landing_scrollWrapper {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* The inner section */
.comparisonSection {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Common styles for both image containers */
.comparisonImage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Make sure actual images act like background-cover */
.comparisonImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Place the After image completely over the Before image */
.afterImage {
    z-index: 2;
    /* We start with the image completely hidden via a bottom clip-path */
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

/* UI Elements layer tracking */
.landing_logo, .cta_button {
    position: absolute;
    z-index: 10;
}

