:root {
    --emma-red: #EC5629;
    --white: #fefefe;
    --black: #222;
    --pitch-black: #111;
    --content-padding: 5vmax;
    --carousel-marker-size: 8px;
    --body-font-size: clamp(12pt, 4vmin, 28pt);
    --footer-font-size: clamp(12pt, 3vmin, 22pt);
    --title-font: 'Josefin Sans Variable', sans-serif;
    --body-font: 'Chivo Mono Variable', monospace;
}

.title-font {
    font-family: var(--title-font);
}

.body-font {
    font-family: var(--body-font);
}

svg#icons {
    display: none;
}

svg {
    width: 1em;
    height: 1em;
    line-height: 1;
    display: inline-block;
}

.black-white {
    color: var(--black);
    background-color: var(--white);
}

.black-white a {
    color: var(--emma-red);
}

.black-white a:hover {
    color: var(--emma-red);
}

.black {
    color: var(--black);
    background-color: none;
}

.black a {
    color: var(--emma-red);
}

.black a:hover {
    color: var(--emma-red);
}

.white-black {
    color: var(--white);
    background-color: var(--pitch-black);
}

.white-black a {
    color: var(--emma-red);
}

.white-black a:hover {
    color: var(--emma-red);
}

.white {
    color: var(--white);
    background-color: none;
}

.white a {
    color: var(--emma-red);
}

.white a:hover {
    color: var(--white);
}

html,
body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

a {
    color: var(--emma-red);
    transition: color 0.5s;
}

a:hover {
    color: var(--white);
}

#menu {
    width: 40px;
    height: 30px;
    top: 20px;
    right: 20px;
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

#menu a.open {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 1;
    z-index: 11;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#menu a.close {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 12;
    pointer-events: none;
}

#menu:target a.close {
    pointer-events: all;
}

#menu:target>a.open>span {
    transform: translate(0, 12px) rotate(45deg);
}

#menu:target:target>a.open>span+span {
    opacity: 0;
}

#menu:target>a.open>span+span+span {
    opacity: 1 !important;
    transform: translate(0, -12px) rotate(-45deg);
}

#menu>a.open span {
    background: white;
    border-radius: 6px;
    height: 6px;
    width: 95%;
    display: block;
    transition: 0.5s;
    z-index: 12;
    box-shadow: 0 0 10px 0 rgb(0 0 0 / 50%);
}

#menu:target>a.open span {
    box-shadow: none;
}

#menu nav {
    width: 100vw;
    max-width: 100%;
    height: 100vh;
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 8;
    opacity: 0;
    transition: 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: rgb(0 0 0 / 50%);
    pointer-events: none;
}

#menu:target nav {
    opacity: 1;
    pointer-events: all;
}

#menu nav ul {
    font-weight: 500;
    font-size: 32pt;
    text-transform: uppercase;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 50vh;
    justify-content: space-around;
}

#menu nav a {
    color: white;
    text-decoration: none;
    border-bottom: 2px solid rgb(255 255 255 / 0%);
    transition: 0.5s;
}

#menu nav a:hover {
    border-bottom: 2px solid rgb(255 255 255 / 100%);
}

section {
    font-family: var(--body-font);
    font-size: var(--body-font-size);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100vw;
    height: 100vh;
    scroll-behavior: smooth;
    padding: var(--content-padding);
    scroll-snap-align: start;
    justify-content: space-between;
    background: var(--bg, "white");
    background-size: cover;
    background-position: center;
}

section.no-fill {
    height: auto;
}

section p {
    background-color: var(--text-bg, "white");
    padding: 1ch;
}

section.work-header {
    height: auto;
    padding: 1ch var(--content-padding);
}

section.work-header h1  {
    padding: 0 1ch;
    background-color: white;
}

section.work-header h1 ,
section.work-header h1  a {
    font-style: italic;
    color: black !important;
}

main.work-body {
    height: max-content;
    padding: 0;
    background-color: white;
}

main.work-body > section {
    justify-content: space-evenly;
}

main.work-body > section p {
    height: auto;
    background-color: var(--text-bg, white);
}

main.work-body > section[black] p {
    background-color: black;
    color: white;
}

main.work-body > section[white] p {
    background-color: white;
    color: black;
}

main.work-body > section[caption] {
    justify-content: flex-end;
}

main.work-body > section[caption] p {
    font-size: 0.6em;
}

main.work-body > section {
    height: 100vh;
    background-position: center center;
    background-size: cover;
    display: flex;
}

main.work-body > iframe {
    height: 100vh;
    width: 100vw;
}

main.work-body > p {
    height: 100vh;
    width: 100vw;
}

main.work-body > video,
main.work-body > p > img {
    height: 100vh;
    width: 100vw;
    object-fit: cover;
    display: block;
}

main.work-body section[carousel] {
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-marker-group: after;
    anchor-name: --carousel-anchor;
}

main.work-body section[carousel]::scroll-marker-group {
    position: absolute;
    position-anchor: --carousel-anchor;
    top: calc(anchor(bottom) + var(--carousel-marker-size) * -4);
    width: 100%;
    height: calc(var(--carousel-marker-size) * 2);
    z-index: 2;
    display: flex;
    gap: var(--carousel-marker-size);
    justify-content: center;
    align-items: center;
    justify-self: center;
}

main.work-body section[carousel] > p {
    height: 100vh;
    width: max-content;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0;
}

main.work-body section[carousel] > p > * {
    position: static;
    height: 100vh;
    width: 100vw;
    z-index: 1;
    object-fit: cover;
    /* max-width: none;
    display: block;
    padding: 0; */
    scroll-snap-align: start;
}

main.work-body section[carousel] > p > *::scroll-marker {
    content: "";
    width: var(--carousel-marker-size);
    height: var(--carousel-marker-size);
    background-color: transparent;
    border: 2px solid white;
    border-radius: 100%;
    display: block;
    transition: background-color 0.25s;
}

main.work-body section[carousel] > p > *::scroll-marker:target-current {
    background-color: white;
}

section.slides {
    overflow-x: auto;
    box-sizing: border-box;
    scrollbar-width: none;
    display: flex;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

section.slides .slide {
    position: absolute;
}

section.slides>.slide+.slide {
    left: 100vw;
}

section#home {
    text-transform: uppercase;
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 0;
}

section#home img {
    width: 40vmin;
    height: 40vmin;
}

section#home div.left {
    background: url("/assets/home/emma.png") center center;
    background-size: contain;
    width: 50vw;
    height: 100%;
}

section#home div.right {
    width: 50vw;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

section#home div.right video {
    min-height: 100vh;
}

section#home div.title {
    font-weight: 800;
    position: absolute;
    top: calc(50vh - 5);
    left: calc(12.5vw * 2);
    width: calc(12.5vw * 4);
    font-size: 5vw;
    background-color: white;
    padding: 5vw;
    padding-bottom: 3vw;
    box-sizing: border-box;
}

section h1 {
    font-family: var(--title-font);
    font-weight: 500;
    text-transform: uppercase;
}

section.auto {
    height: auto;
    gap: var(--content-padding);
}

section.about {
    background: var(--image) center center;
    background-size: cover;
}

section.about .nav a,
section.about {
    color: var(--black);
}

section.about a {
    color: var(--emma-red);
    text-decoration: underline;
    transition: color 0;
}

section.about a:hover {
    color: var(--emma-red);
    text-decoration: underline;
}

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

section.about h1::before {
    content: "About / ";
}

section.about h1 {
    font-weight: 500;
    font-style: italic;
    color: var(--black);
    background: var(--white);
    padding: 1ch 1ch 0.7ch;
}

section.about p {
    font-style: italic;
    text-align: center;
    margin: 0;
    background-color: var(--white);
    padding: 1ch;
}

section img,
section video {
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    z-index: -1;
}

cite {
    display: block;
    z-index: 20;
    height: auto;
    position: absolute;
    right: 0;
    bottom: 0;
    text-align: right;
    box-sizing: border-box;
    padding: calc(var(--content-padding) * 0.5);
    color: var(--white);
    font-style: italic;
    font-size: 0.5em;
}

section.work h1 {
    font-weight: 500;
    font-style: italic;
    color: var(--white);
    background: var(--pitch-black);
    padding: 1ch 1ch 0.7ch;
}

section.work-index {
    height: 50vh;
    justify-content: space-evenly;
}

section.work-index video {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

section.work-index h1 {
    padding: 1ch;
    background-color: white;
}

section.work-index h1 a {
    color: black !important;
}

section.work-index p {
    padding: 1ch;
    background-color: white;
}

section h1 a {
    color: var(--white) !important;
}

section h1 a:hover {
    color: var(--emma-red);
}

section.work p {
    color: var(--white);
    box-sizing: border-box;
    padding: 1ch;
    background: var(--pitch-black);
}

section.members {
    position: relative;
    color: var(--white);
}

section.members p {
    padding: 0;
}

section.members h1::before {
    content: "Members / ";
}

section.members h1 {
    font-weight: 500;
    font-style: italic;
}

section.members ul {
    display: flex;
    gap: 1ch;
}

section.members p a,
section.members ul a {
    color: var(--white);
    fill: var(--white);
    transition: color 0.5s;
    transition: fill 0.5s;
}

section.members p a:hover,
section.members ul a:hover {
    color: var(--emma-red);
    fill: var(--emma-red);
}

img.high-contrast {
    filter: contrast(200%) brightness(50%);
}

section#contact {
    padding: 0;
}

section#contact ul {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

section#contact ul li {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    place-content: center;
    align-items: center;
    color: var(--black);
    fill: var(--black);
    background-color: var(--white);
    transition: color 0.5s;
    transition: fill 0.5s;
    transition: background-color 0.5s;

}

section#contact ul a {
    color: var(--black);
    fill: var(--black);
    text-align: center;
    transition: none;
}

section#contact ul svg {
    display: inline-block;
    position: relative;
    top: 0.2em;
}

section#contact ul li:hover {
    background-color: var(--emma-red);
    color: var(--white);
    fill: var(--white);
}

section#contact ul li:hover a {
    color: var(--white);
    fill: var(--white);
}

section#pacbi em {
    font-style: italic;
}

section#pacbi a:hover {
    color: var(--emma-red);
}

section iframe.vimeo {
    width: 100%;
    height: 100%;
}

footer {
    font-family: var(--title-font);
    font-size: var(--footer-font-size);
    width: 100vw;
    max-width: 100%;
    height: 10vh;
    background-color: var(--emma-red);
    text-align: center;
    box-sizing: border-box;
    padding: 20;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
}

footer a {
    color: black;
    display: inline;
}