/* styles.css */

/* body */

body {
    width: 100vw;
    height: auto;

    min-height: 100vh;

    min-width: 320px;
    max-width: 1920px;

    margin: 0 auto;
    
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    background-color: hsl(0, 0%, 100%);

    container-type: inline-size;
}

/* fonts */

@font-face {
    font-family: 'Geist';
    src: 
        /* local('Geist'),*/
        url("../fonts/Geist-Regular.woff2") format("woff2"),
        url("../fonts/Geist-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

h1, h2, h3, p {
    width: auto;
    height: auto;

    font-family: 'Geist', serif;
    font-weight: 400;
    font-style: normal;

    line-height: 1;
    letter-spacing: -0.02em;

    color: hsl(0, 0%, 0%);
}

h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

p {
    width: 100%;

    font-size: 14px;
    line-height: 1.25;
}

/* component classes */

header {
    width: 100%;
    height: auto;

    padding: 32px 16px 24px 16px;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

footer {
    position: relative;

    width: 100%;
    height: auto;
    
    padding: 32px 16px 32px 16px;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;

    z-index: 100;
}

footer::after {
    display: none;

    content: '';

    position: absolute;
    bottom: 99%;
    right: 0;

    width: 100%;
    height: 128px;
    
    background: linear-gradient(transparent, hsla(0, 0%, 100%, 1) 99%);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    mask-image: linear-gradient(transparent, black);
    -webkit-mask-image: linear-gradient(transparent, black);

    pointer-events: none;
    
    z-index: 99;
}

section {
    width: 100%;
    height: auto;

    padding: 8px;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

section.grid {
    padding: 8px 8px 8px 8px;

    display: grid;
    grid-template-columns: 1fr;
}

section.work {
    padding: 64px 8px 8px 8px;

    flex-direction: column;

    align-items: center;
    justify-content: center;
}

img {
    width: 100%;
    height: auto;

    aspect-ratio: 3/2;
    overflow: hidden;
    object-fit: contain;
}

video {
    width: 100%;
    height: auto;

    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);

    aspect-ratio: 3/2;
    overflow: hidden;
    object-fit: contain;
}

a {
    width: auto;
    height: auto;
}

/* component classes, custom */

.container {
    width: 100%;
    height: auto;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

.container.grid {
    display: none;

    flex: 1;
}

.container.work {
    max-width: calc(504px - 16px);

    flex-direction: column;
}

.container.annotation {
    display: none;
}

.card {
    width: 100%;
    height: auto;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    
    border-radius: 24px;
    
    overflow: hidden;
}

.card .card {
    border-radius: 16px;
}

.card.stroke {
    box-shadow: inset 0 0 0 1px hsl(0, 0%, 90%);
}

/* utility classes */

.wh-auto { width: auto; height: auto; }

.w-auto { width: auto; }
.w-100 { width: 100%; }
.h-auto { height: auto; }
.h-100 { height: 100%; }

.row { flex-direction: row; }
.column { flex-direction: column; }

.center { align-items: center; justify-content: center; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.space { justify-content: space-between;}

.flex-start { align-items: flex-start; justify-content: flex-start; }
.flex-end { align-items: flex-end; justify-content: flex-end; }

.flex { flex: 1; }

.m-8 { margin: 8px; }
.m-16 { margin: 16px; }
.m-24 { margin: 24px; }
.m-32 { margin: 32px; }

.mt-8 { margin: 8px 0px 0px 0px; }
.mt-16 { margin: 16px 0px 0px 0px; }
.mt-24 { margin: 24px 0px 0px 0px; }
.mt-32 { margin: 32px 0px 0px 0px; }
.mb-8 { margin: 0px 0px 8px 0px; }
.mb-16 { margin: 0px 0px 16px 0px; }
.mb-24 { margin: 0px 0px 24px 0px; }
.mb-32 { margin: 0px 0px 32px 0px; }

.p-8 { padding: 8px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }

.px-8 { padding: 0px 8px; }
.px-16 { padding: 0px 16px; }
.px-24 { padding: 0px 24px; }
.px-32 { padding: 0px 32px; }
.py-8 { padding: 8px 0px; }
.py-16 { padding: 16px 0px; }
.py-24 { padding: 24px 0px; }
.py-32 { padding: 32px 0px; }

.gap-2 { gap: 2px; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-32 { gap: 32px; }
.gap-64 { gap: 64px; }

.c-100 { color: hsl(0, 0%, 100%); }
.c-80 { color: hsl(0, 0%, 80%); }
.c-60 { color: hsl(0, 0%, 60%); }
.c-40 { color: hsl(0, 0%, 40%); }
.c-0 { color: hsl(0, 0%, 0%); }

/* breakpoints */

@container (min-width: 504px) {
    section.grid {
        padding: 8px;

        grid-template-columns: repeat(2, 1fr);
    }

    .container.grid {
        display: flex;
    }
} /* 480 + 24 */

@container (min-width: 992px) {
    section.grid {
        grid-template-columns: repeat(3, 1fr);
    }
} /* 960 + 32 */

@media (min-width: 504px) {
    footer {
        position: sticky;

        bottom: 0;
        right: 0;

        background-color: hsl(0, 0%, 100%);
    }

    footer::after {
        display: block;
    }

    body.home footer::after {
        display: none;
    }

    section.work {
        padding: 64px 8px 128px 8px;
    }
}

@media (min-width: 992px) {
    p {
    font-size: 16px;
    }

    .container.work {
        max-width: calc(720px - 16px);
    } /* 480 720 960 */
}