@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@400;500;600&display=swap');

@font-face {
    font-family: "HKGrotesk";
    src: url("../fonts/HKGrotesk-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "HKGrotesk";
    src: url("../fonts/HKGrotesk-SemiBold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "HKGrotesk";
    src: url("../fonts/HKGrotesk-Bold.otf") format("opentype");
    font-weight: 800;
    font-style: normal;
}



* {
    box-sizing: border-box;
}

::-moz-selection {
    background-color: #0000FF99;
}

::selection {
    background-color: #0000FF99;
}

body {
    font-family: "HKGrotesk", sans-serif;
    font-size: 16px;
    hyphens: auto;
    overflow-wrap: break-word;
    line-height: 1.25em;
    color: #0e1111;
    margin: 0px;
    background-color: #f5f5f5;
    overflow-y: scroll;
    -webkit-font-smoothing: subpixel-antialiased;
    -webkit-text-size-adjust: 100%;
}

/*FONTSSTYLE*/
h1 {
    font-family: "HKGrotesk-bold", sans-serif;
    font-weight: 800;
    font-size: 1.5em;
    line-height: 1.25em;
    margin: 0;
}

.pagetitel {
    font-family: "IBM Plex Serif", serif;
    font-weight: 600;
    font-size: 1.5em;
    line-height: 1.25em;
    margin: 0;
}

h2 {
    font-family: "IBM Plex Serif", serif;
    font-weight: 600;
    font-size: 1.25em;
    line-height: 1.25em;
    margin: 0;
}

h3 {
    font-family: "IBM Plex Serif", serif;
    font-weight: 400;
    font-size: 1.125em;
    line-height: 1.25em;
    margin: 0;
}

h4 {
    font-family: "IBM Plex Serif", serif;
    font-weight: 400;
    font-size: 1.125em;
    line-height: 1.5em;
    margin: 0;
}

p {
    font-family: "HKGrotesk", sans-serif;
    font-weight: 400;
    font-size: 1.125em;
    line-height: 1.5em;
    margin: 0;
}

a {
    color: #0000ff;
    text-decoration: none;
}

/*HEADER*/
header {
    display: inline;
    box-sizing: border-box;
    width: 100%;
    padding: 24px 16px 36px;
    overflow: hidden;
    height: auto;
    float: left;
}


.title a {
    font-family: HKGrotesk-Regular;
    font-size: 1.125em;
    line-height: 1.25em;
    float: left;
    color: #0e1111;
    text-align: left;
    text-decoration: none;
}

p a {
    color: #0000FF;
    text-decoration: none
}

p a:hover {
    color: #0000FF;
    text-decoration: underline;
}

.hover {
    transition: background-size .4s ease;
    background: linear-gradient(to bottom, transparent 70%, #0000FF 0) center left/0% 100% no-repeat;
    cursor: pointer;
}

.hover:hover {
    background-size: 100% 100%;
}



/*Index*/
.projectcontainer,
.pagecontainer {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    gap: 48px;
}

.introtext {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.topic {
    box-sizing: content-box;
    width: 100%;
    display: grid;
    gap: 24px;
}

.aboutGrid {
    grid-template-columns: 1fr;
}

.caseGrid {
    box-sizing: content-box;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.card {
    display: flex;
    flex-direction: column;
}

.caseGrid .card {
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.caseGrid .card img {
    transition: transform 0.4s ease;
}

.caseGrid .card:hover img {
    transform: scale(1.05);
}


.caseGrid .card .headline {
    color: #0e1111;
    display: inline-block;
    width: max-content;
    background-image: linear-gradient(#00f, #00f);
    background-repeat: no-repeat;
    background-size: 0% 6px;
    background-position: 0 90%;
    transition: background-size 0.4s ease;
    text-decoration: none;
}

.caseGrid .card:hover .headline {
    background-size: 100% 6px;
}

.card img,
.aboutGrid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Timeline */
.timeline-section h3 {
    margin: 2rem 0 1rem 0;
    padding: 0;
}

.timeline {
    position: relative;
}

.timeline.single .line {
    display: none;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 2rem;
}

.dot {
    width: 1.125rem;
    height: 1.125rem;
    background: #0e1111;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    top: 0.2rem;
}

.timeline-content {
    margin-left: 1rem;
}

.timeline-content p:nth-of-type(2) {
    color: #7b7b7b;
}

.line {
    position: absolute;
    left: 0.45rem;
    top: calc(0.4rem + 0.5rem);
    bottom: calc(2rem + 2rem);
    width: 2px;
    background: #0e1111;
}

/*Projectpage*/
.textcontainer {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

.textcontainer p+ul {
    margin-top: 0.6em;
}

.textcontainer p+p {
    margin-top: 1.2em;
}

 /* .headline h1 {
    margin: 500px auto
 } */


.headline {
    font-family: "HkGrotesk", serif;
    font-weight: 500;
    font-size: 1.25em;
    margin: 8px 0;
}

.subheadline {
    font-size: 1.25em;
    line-height: 1.75em;
    font-weight: 600;
}

/*Layout bilder*/
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.image-item {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.image-item .img-block {
    flex: 1 1 100%;
}

hr {
    width: 100%;
    color: #0e1111;
    opacity: 0.25;
    height: 1px;
}

.img-block {
    display: flex;
    flex-direction: column;
}

.img-block video,
.img-block img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

.caption {
    margin-top: 8px;
    font-size: 1em;
    color: #7b7b7b;
}

.img-block .textcontainer {
    margin-top: 1.5em;
    margin-bottom: 2em;
}

.footer {
    opacity: 40%;
    padding: 24px 8px 36px;
    position: relative;
    left: 0;
    bottom: 0;
    width: 100%;
}

.footer a {
    text-decoration: underline;
    color: #0e1111
}

.footer a:visited {
    color: #0e1111;
}


.onhover {
    color: #0000FF;

}

.onhover:hover {
    color: #0000FF;
    text-decoration: underline;
}

.onhover:hover~.pic {
    transition: opacity .8s ease;
    opacity: 1;
    overflow: hidden;
}

.mailto {
    color: #0000FF;
    text-decoration: none;
}

.mailto:hover {
    text-decoration: underline;
}

li {
    font-size: 1.125em;
    line-height: 1.5em;
    padding: 4px 0;
}

ul {
    display: block;
    list-style-type: disc;
    margin-block-start: 0em;
    margin-block-end: 1em;
    padding-inline-start: 1em;
    unicode-bidi: isolate;
}



/*TABLET*/
@media screen and (min-width: 640px) {

    .title {
        float: left;
        display: inline;
    }

    h1 {
        font-size: 2em;
        line-height: 1.5em;
    }

    .pagetitel {
        font-size: 2em;
        line-height: 1.5em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.25em;
    }

    header a {
        font-size: 1.35em;
    }

    .aboutGrid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    .caseGrid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .projectcontainer {
        gap: 48px;
    }

    .timeline-section h3 {
        margin: 0 0 1rem 0;
    }

    .textcontainer {
        max-width: 700px;
    }

    /* Wenn 2 Bilder drin sind → 2 Spalten */
    .image-item:has(.img-block:nth-child(2)):not(:has(.img-block:nth-child(3))) .img-block {
        flex: 1 1 calc(50% - 12px);
    }

    /* Wenn 3 oder mehr Bilder drin sind → 3 Spalten */
    .image-item:has(.img-block:nth-child(3)) .img-block {
        flex: 1 1 calc(33.333% - 16px);
    }

}

/*DESKTOP*/
@media screen and (min-width: 1024px) {
    header {
        padding: 24px 24px 36px;
    }

    .footer {
        padding: 24px;
    }

    .pagecontainer {
        gap: 72px;
    }

    .caseGrid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}