@font-face {
  font-family: "Mirta";
  src: url("../fonts/Mirta0.3-Light.woff2") format("woff2"),
    url("../fonts/Mirta0.3-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mirta";
  src: url("../fonts/Mirta0.3-Regular.woff2") format("woff2"),
    url("../fonts/Mirta0.3-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mirta";
  src: url("../fonts/Mirta0.3-Medium.woff2") format("woff2"),
    url("../fonts/Mirta0.3-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mirta";
  src: url("../fonts/Mirta0.3-Bold.woff2") format("woff2"),
    url("../fonts/Mirta0.3-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CF Arche Grotesk";
  src: url("../fonts/CFArcheGrotesk-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CF Arche Grotesk";
  src: url("../fonts/CFArcheGrotesk-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "CF Arche Grotesk";
  src: url("../fonts/CFArcheGrotesk-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CF Arche Grotesk";
  src: url("../fonts/CFArcheGrotesk-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f4f4;
  --text: #000000;
  --accent: #f93728;
  --font-serif: "Mirta", "Times New Roman", Times, serif;
  --font-sans: "CF Arche Grotesk", Arial, Helvetica, sans-serif;
  --nav-inset: 12.5vw;
  --project-margin: 20px;
  --step: 52vw;
}

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

html,
body {
  margin: 0;
  height: 100%;
}

html {
  font-size: 14px;
}

body {
  background-color: var(--bg);
  background-image: url("../bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.35;
  overflow: hidden;
  cursor: none;
}

body.is-touch,
body.is-overlay {
  cursor: auto;
}

body:not(.is-touch):not(.is-overlay) a,
body:not(.is-touch):not(.is-overlay) button {
  cursor: none;
}

img {
  max-width: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

.nav-title,
.nav-end {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  line-height: 1;
}

.nav-title {
  left: var(--nav-inset);
  z-index: 15;
  font-family: var(--font-serif);
  cursor: pointer;
}

.nav-end {
  right: var(--nav-inset);
  z-index: 40;
  display: flex;
  gap: 1.4rem;
  font-family: var(--font-sans);
}

.nav-btn {
  cursor: pointer;
  text-transform: lowercase;
  font-variant: small-caps;
}

.nav-btn[data-nav="index"].is-close {
  color: var(--accent) !important;
}

.home {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow: hidden;
}

.home,
.home__track,
.slide {
  cursor: none;
}

.home__track {
  display: flex;
  align-items: center;
  height: 100%;
  will-change: transform;
}

.slide {
  flex: 0 0 auto;
  width: var(--step);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 1.5rem;
}

.slide__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 100%;
}

.slide__media {
  transform-origin: 50% 50%;
  will-change: transform;
  overflow: hidden;
}

.media {
  position: relative;
  display: block;
  overflow: hidden;
  line-height: 0;
  clip-path: inset(0);
  transform: translateZ(0);
}

.media__lqip,
.media__full {
  pointer-events: none;
}

.media__lqip {
  display: block;
  filter: blur(24px);
  transform: scale(1.4);
  transform-origin: 50% 50%;
}

.media__full {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.media.is-loaded .media__full {
  opacity: 1;
}

.media.is-loaded .media__lqip {
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}

.slide__media .media__lqip {
  height: 70vh;
  width: auto;
  max-width: min(56vw, 820px);
}

.slide__media .media.is-landscape .media__lqip {
  width: min(56vw, 820px);
  height: auto;
  max-height: 70vh;
}

.slide__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
  pointer-events: none;
  color: #fff;
}

.slide__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

.slide__more {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 0.9286rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  pointer-events: auto;
  cursor: pointer;
  text-transform: lowercase;
  font-variant: small-caps;
}

body.is-index .home,
body.is-index .project {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body.is-project {
  background-image: none;
}

body.is-index .nav-title,
body.is-index .nav-end {
  visibility: hidden;
  pointer-events: none;
}

body.is-info .nav-title {
  visibility: hidden;
}

body.is-project .home {
  position: absolute;
  inset: 0 0 22vh;
  height: auto;
}

body.is-project .slide {
  padding-bottom: 0;
}

body.is-project .slide__caption {
  visibility: hidden;
  pointer-events: none;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  opacity: 0;
}

body.is-overlay .cursor,
body.is-touch .cursor {
  opacity: 0 !important;
}

.project {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  padding: var(--project-margin);
}

.project__info-btn,
.project__info-close {
  display: none;
}

.project__meta,
.project__back,
.project__strip,
.project__info-btn {
  pointer-events: auto;
}

.project__meta {
  position: absolute;
  top: var(--project-margin);
  left: var(--project-margin);
  width: min(20rem, 28vw);
}

.project__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.project__copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9286rem;
  line-height: 1.4;
}

.project__back {
  position: absolute;
  top: var(--project-margin);
  right: var(--project-margin);
  font-family: var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.project__strip {
  position: absolute;
  left: var(--project-margin);
  right: var(--project-margin);
  bottom: var(--project-margin);
  overflow: hidden;
  height: 18vh;
  min-height: 110px;
}

.project__strip-track {
  display: flex;
  align-items: flex-end;
  height: 100%;
  gap: 0.7rem;
  will-change: transform;
}

.strip-item {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  cursor: pointer;
}

.strip-item .media {
  height: 100%;
}

.strip-item .media__lqip {
  height: 100%;
  width: auto;
}

.strip-item__num {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.7857rem;
  line-height: 1;
  mix-blend-mode: difference;
  color: #fff;
}

.index {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  visibility: hidden;
  pointer-events: none;
}

.index.is-open {
  visibility: visible;
  pointer-events: auto;
}

.index-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.45rem;
  padding: 0 var(--nav-inset) 0 var(--project-margin);
}

.index__close {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.index__stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.index-row {
  width: 100%;
}

.index-row__label {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9286rem;
  line-height: 1;
}

.index-row__viewport {
  overflow: hidden;
  width: 100%;
}

.index-row__track {
  display: flex;
  gap: 0.55rem;
  will-change: transform;
}

.index-thumb {
  flex: 0 0 auto;
  height: 13vh;
  min-height: 80px;
  cursor: pointer;
}

.index-thumb .media {
  height: 100%;
}

.index-thumb .media__lqip {
  height: 100%;
  width: auto;
}

.index-row:nth-child(2) {
  position: relative;
  z-index: 2;
}

.info {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20;
  visibility: hidden;
  pointer-events: none;
}

.info.is-open {
  visibility: visible;
  pointer-events: auto;
}

.info__panel {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(244, 244, 244, 0.55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.info__text {
  width: min(36rem, 62vw);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.45;
  pointer-events: none;
  color: #000;
}

.info__text p {
  margin: 0 0 1rem;
}

.info__text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  :root {
    --nav-inset: 16px;
    --step: 78vw;
  }

  body {
    cursor: auto;
  }

  .slide__media .media__lqip {
    height: 58vh;
    max-width: min(78vw, 520px);
  }

  .slide__media .media.is-landscape .media__lqip {
    width: min(78vw, 520px);
    height: auto;
    max-height: 58vh;
  }

  .project__info-btn {
    display: block;
    position: absolute;
    top: var(--project-margin);
    left: var(--project-margin);
    z-index: 6;
    font-family: var(--font-sans);
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .project__meta {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    padding: 72px var(--project-margin) var(--project-margin);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: 30;
    font-family: var(--font-sans);
  }

  body.is-project-info .project__meta {
    display: block;
  }

  body.is-project-info .nav-title,
  body.is-project-info .nav-end,
  body.is-project-info .project__info-btn,
  body.is-project-info .project__back {
    visibility: hidden;
    pointer-events: none;
  }

  .project__info-close {
    display: block;
    position: absolute;
    top: var(--project-margin);
    right: var(--project-margin);
    font-size: 1.35rem;
    line-height: 1;
  }

  .index-row__head {
    padding-left: 16px;
  }

  .index-thumb {
    height: 9vh;
  }

  .info__text {
    width: calc(100% - 32px);
    font-size: 1rem;
  }
}

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