@font-face {
    font-family: "Alte Haas Grotesk";
    src: url(fonts/alte-haas-grotesk.woff2) format("woff2"), url(fonts/alte-haas-grotesk.woff) format("woff");
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: "Alte Haas Grotesk", Helvetica Neue, Helvetica, Arial, sans-serif;
    font-weight: normal;
    font-variant-ligatures: none;
    list-style: none;
    text-decoration: none;
}

html {
    background: var(--color-background);
}

body {
    min-height: calc(100vh - 32px);
    padding: 16px;
    background: var(--color-background);
    color: var(--color-text);
}

:root {
    --color-primary: rgb(66, 84, 176);
    --color-text: rgb(24, 26, 28);
    --color-text-60: rgba(24, 26, 28, 0.6);
    --color-text-20: rgba(24, 26, 28, 0.2);
    --color-element-08: rgba(24, 26, 28, 0.08);
    --color-element-border-02: rgba(24, 26, 28, 0.02);
    --color-button: rgba(209, 209, 209, 0.4);
    --color-background-light: rgb(237, 237, 237);
    --color-background: rgb(255, 255, 255);
    --border-radius: 8px;
    --archive-number: 4; /* Adjust depending on the number of projects */
}

::selection, .text-highlight {
    color: var(--color-primary);
    background: rgba(66, 84, 176, 0.06);
}

/* @media (prefers-color-scheme: dark) {

    :root {
    --color-primary: rgb(255, 240, 110);
    --color-text: rgba(255, 255, 255);
    --color-text-60: rgba(255, 255, 255, 0.6);
    --color-text-20: rgba(255, 255, 255, 0.2);
    --color-element-08: rgba(255, 255, 255, 0.08);
    --color-element-border-02: rgba(255, 255, 255, 0.02);
    --color-button: rgba(68, 68, 68, 0.4);
    --color-background-light: rgb(41, 41, 41);
    --color-background: rgb(22, 22, 22);
    }

    ::selection, .text-highlight {
        background: rgba(255, 240, 110, 0.06);
    }

} */


/* ---Fonts--- */

h1 {
    font-size: 1.25rem;
    line-height: 1.375rem;
}

h2, p, a {
    font-size: 0.875rem;
    line-height: 1.375rem;
}

h3, footer p, footer a {
    font-size: 0.75rem;
    line-height: 1.375rem;
}

h4 {
    font-size: 0.625rem;
    line-height: 0.875rem;
}

#archive-number::after {
    content: "4"; /* Adjust depending on the number of projects */
    line-height: 0.9375rem;
}

.asterisk-s {
    font-size: 0.625rem;
    line-height: 0.5625rem;
}

.asterisk-m {
    font-size: 0.875rem;
    line-height: 1rem;
}

button {
    font-size: 0.875rem;
    line-height: 0.625rem;
}


/* ---Links--- */

a {
    color: var(--color-text);
    text-decoration: underline;
}

header a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

a:hover .outbound-link {
    fill: var(--color-background);
    background: var(--color-primary);
}


/* ------------Main------------ */


main {
    display: grid;
    align-content: flex-start;
    grid-template-rows: auto auto 1fr;
    gap: 44px;
    min-height: calc(100vh - 32px);
}


/* ---Header--- */

header {
    display: grid;
    gap: 22px;
}

header p:last-child::first-letter {
    color: var(--color-primary);
}


/* ------------Nav------------ */


/* ---Label--- */

#case-studies {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    color: var(--color-text-60);
}


/* ---Projects--- */

.project {
    position: relative;
    display: grid;
    align-content: center;
    align-items: center;
    gap: 4px;
    height: 66px;
    padding-bottom: 1px;
}

.project-info {
    display: flex;
    justify-content: space-between;
    padding-top: 2px;
}

.scope {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.project-button, .archive-button {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    z-index: 1;
}


/* ---Archive--- */

#archive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 44px;
    padding-bottom: 1px;
}

#archive-label {
    display: flex;
    align-items: start;
    gap: 1px;
}

#archive-label h2 {
    margin-right: 1px;
}


/* ------------Footer------------ */


footer {
    align-self: flex-end;
    display: grid;
    gap: 22px;
    padding-top: 32px;
}

footer h3 {
    color: var(--color-text-60);
}

footer > p {
    color: var(--color-text-20);
}

#footer-info {
    display: flex;
}

#footer-info > div {
    flex: 1;
}

footer a {
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    cursor: pointer;
}


/* ------------Project Page------------ */

#scroll-container {
    display: none;
}

.project-page {
    display: grid;
    align-content: start;
    gap: 44px;
    top: 0;
    left: 0;
    min-height: 100%;
    min-width: 100%;
    padding: 16px;
    background: var(--color-background);
    z-index: 2;
}


/* ---Info--- */

.project-page-header, .project-page-info {
    display: grid;
    gap: 22px;
}

.project-page-info > div {
    padding-bottom: 21px;
    border-bottom: 1px solid var(--color-element-08);
}

.project-page-info > div > div {
    display: flex;
}

.project-page-details {
    width: 90px;
    color: var(--color-text-60);
}

.project-page-details + div {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}


/* ---Link--- */

.project-page-details + a {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.outbound-link {
    border-radius: 2px;
    background: var(--color-element-08);
    fill: var(--color-text);
}


/* ---Media--- */

img, video {
    display: block;
    height: auto;
    width: 100%;
    border-radius: var(--border-radius);
    background: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

video {
    border-radius: 4px;
}

.image-frame {
    display: grid;
    gap: 2px;
}

.image-frame.split-horizontal {
    grid-auto-flow: column;
}

.image-frame.split-vertical {
    grid-auto-flow: row;
}

.image-padding {
    display: grid;
    padding: 4.4% 8.8%;
    height: 100%;
    border-radius: var(--border-radius);
}

.background-light {
    background: var(--color-element-08);
    box-shadow: 0px 0px 0px 1px var(--color-element-border-02) inset;
}


/* ---Text--- */

.text-frame {
    display: grid;
    align-content: flex-start;
    gap: 8px;
}

.text-frame h2 {
    color: var(--color-text-60);
}

.container {
    gap: 44px;
}

.container .text-frame {
    padding: 0;
}


/* ---Back Button--- */

.back-button {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: fixed;
    height: 40px;
    padding-right: 20px;
    border: none;
    border-radius: var(--border-radius);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    z-index: 2;
}

.back-button .chevron-left {
    position: absolute;
}


/* ---Next Button--- */

.next-button {
    display: none;
}

@media screen and (min-width: 442px) {

    body {
        min-height: calc(100vh - 48px);
        padding: 24px;
    }


   /* ---------Main--------- */


    main {
        gap: 0;
        min-height: calc(100vh - 48px);
    }


    /* ---Header--- */

    header {
        padding-bottom: 44px;
    }


    /* ---------Project Page--------- */

    .project-page {
        padding: 24px;
    }


    /* ---Text--- */

    .text-frame {
        padding: 0 0 88px;
    }

}


@media screen and (min-width: 696px) {

    /* ---Fonts--- */

    h1 {
        margin-right: 30px;
        font-size: 1.5rem;
        line-height: 1.71875rem;
    }


    /* ---------Main--------- */


    main {
        max-height: calc(100vh - 48px);
        width: 344px;
        overflow-x: hidden;
        overflow-y: scroll;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    main::-webkit-scrollbar {
        display: none;
    }


    /* ---Header--- */

    header {
        position: sticky;
        top: 0;
        background: var(--color-background);
        z-index: 2;
    }


    /* ---------Nav--------- */


    #case-studies {
        position: sticky;
        top: 242px;
        background: var(--color-background);
        z-index: 1;
    }

    #case-studies.border {
        border-bottom: 1px solid var(--color-element-08);
    }


    /* ---------Project Page--------- */


    .project-page-header {
        display: flex;
        justify-content: space-between;
    }


    /* ---Text--- */

    .project-page-info, .text-frame p {
        max-width: 416px;
    }

    .text-frame {
        justify-content: flex-end;
    }

}


@media screen and (min-width: 982px) { 
    
    body {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 24px;
        overflow: hidden;
    }


    /* ---Fonts--- */

    h1 {
        flex: 1;
        max-height: 22px;
        min-width: 182px;
        max-width: 416px;
        margin-right: 0;
        line-height: 1.625rem;
    }


    /* ---------Project Page--------- */

    #scroll-container {
        display: block;
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        height: calc(100vh - 48px);
        border-radius: var(--border-radius);
        overflow-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    #scroll-container::-webkit-scrollbar {
        display: none;
    }

    #scroll-container::after {
        content: "";
        display: block;
        height: calc(100vh + 100px);
        width: 100%;
    }

    .project-page {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        gap: 0;
        min-height: auto;
        min-width: auto;
        padding: 0;
        border-radius: var(--border-radius);
        overflow-y: scroll;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .project-page::-webkit-scrollbar {
        display: none;
    }

    .project-page-header {
        flex-wrap: wrap;
        justify-content: end;
        gap: 22px 52px;
        padding: 88px 0 88px 86px;
    }


    /* ---Text--- */

    .text-frame {
        padding: 44px 0 110px;
    }


    /* ---Back Button--- */

    .back-button {
        display: none;
    }


    /* ---Next Button--- */
    
    .next-button {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 40px;
        width: 352px;
        margin: 88px auto;
        border: none;
        border-radius: var(--border-radius);
        backdrop-filter: blur(8px);
        overflow: hidden;
        cursor: pointer;
        z-index: 1;
    }

}


@media screen and (min-width: 1320px) {

    /* ---Fonts--- */

    h1 {
        max-height: 68px;
        min-width: auto;
        font-size: 2.125rem;
        line-height: 2.125rem;
    }


    /* ---------Project Page--------- */

    .project-page-header {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 132px 44px 88px 92px;
    }


    /* ---Text--- */

    .text-frame {
        padding: 88px 44px 220px;
    }

}