@font-face {
  font-family: "ABC Diatype";
  src: url("../assets/fonts/ABCDiatype-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --pad: 0.25rem;
  --gutter: 0.25rem;
  --rail: 11.5rem;
  --thumb-scale: 1.05;
  --thumb-h: calc(5.5rem + 16rem * var(--thumb-scale));
  --font: "ABC Diatype", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --copy: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --type: 0.875rem;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--paper);
}

body {
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--type);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff;
}

.intro img {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 132vh;
  width: auto;
  max-width: none;
  transform: translate(-50%, -50%);
}

@media (max-width: 820px) {
  .intro img {
    height: 112vh;
  }
}

.intro.is-out {
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.site-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 0 0.35rem;
  background: var(--paper);
}

.site-mark {
  display: block;
  width: min(22rem, 54vw);
  margin-top: -0.36rem;
}

.site-mark img {
  width: 100%;
  height: auto;
}

.site-head nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.55rem;
}

.scale {
  align-self: stretch;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0 var(--gutter);
  box-sizing: border-box;
}

.scale__track {
  position: relative;
  height: 2.4rem;
  touch-action: none;
  cursor: ew-resize;
}

.scale__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ink);
  opacity: 0.28;
  transform: translateY(-50%);
}

.scale__peace {
  --peace-stroke: 8;
  --peace-roll: 0deg;
  position: absolute;
  top: 50%;
  left: 40%;
  width: 2.55rem;
  height: 2.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  appearance: none;
  transform: translate(-50%, -50%) rotate(var(--peace-roll));
  cursor: grab;
  touch-action: none;
}

.scale__peace svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scale__peace circle,
.scale__peace path {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--peace-stroke);
}

.scale__peace:active,
.scale__peace.is-drag {
  cursor: grabbing;
}

.home-index {
  padding: 0.35rem var(--gutter) 4rem;
}

.folio__item--type {
  display: flex;
  align-items: flex-end;
  aspect-ratio: var(--ratio, 0.92);
  background: #f3f3f3;
}

.home-flow,
.folio {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.08rem;
  width: 100%;
}

.row-fit {
  display: flex;
  width: 100%;
  gap: 0.4rem;
}

.home-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.home-card img,
.home-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ratio, 1.4);
  object-fit: cover;
  background: #f3f3f3;
}

.home-card--type {
  display: flex;
  align-items: flex-end;
  aspect-ratio: var(--ratio, 0.92);
  background: #f3f3f3;
}

.home-card--type span {
  font-family: var(--copy);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.45rem;
}

.home-card span {
  display: block;
  margin-top: 0.1rem;
  margin-bottom: 0;
  font-size: 0.62rem;
  line-height: 1.05;
  text-transform: lowercase;
}

.home-card.is-progress,
.folio__item.is-progress {
  cursor: default;
}

.site-head nav a,
.index a {
  display: block;
  padding: 0.12rem 0;
}

.site-head a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-head a:hover,
.site-head a:focus-visible,
.index a:hover,
.index a:focus-visible,
.about a:hover,
.about a:focus-visible,
.project__copy a:hover,
.project__copy a:focus-visible,
.project__turn a:hover,
.project__turn a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.project__copy a {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.index,
.section,
.about {
  padding: 0.2rem var(--gutter) 5rem;
  max-width: none;
}

body:has([data-home-grid]) {
  overflow: hidden;
}

.home-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.home-grid:active {
  cursor: grabbing;
}

.home-grid .site-head,
.home-grid__item--menu {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  width: max-content;
  max-width: 12rem;
  background: var(--paper);
}

.home-grid__item {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: min(26vw, 16rem);
  will-change: transform;
  cursor: grab;
}

.home-grid__item--motion {
  z-index: 3;
  width: min(30vw, 18rem);
}

.home-grid__item--panel {
  z-index: 18;
  width: min(42rem, 78vw);
  max-width: 42rem;
  background: var(--paper);
  padding: var(--pad);
  cursor: grab;
}

.home-panel__scroll {
  max-height: min(78svh, 42rem);
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  cursor: auto;
}

.section--panel,
.about--panel {
  padding: 0;
  max-width: none;
}

.home-grid__item.is-drag {
  z-index: 40;
  cursor: grabbing;
}

.home-grid__item img,
.home-grid__item video {
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.home-grid__item--menu a {
  pointer-events: auto;
  cursor: pointer;
}

.about {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding-top: 0.35rem;
}

.about p + p {
  margin-top: 1em;
}

.about__copy {
  width: 100%;
}

.about__meta {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.about__photo {
  display: block;
  width: calc(100% + (2 * var(--gutter)));
  max-width: none;
  height: auto;
  margin: 0 calc(var(--gutter) * -1) 0.85rem;
}

.about p,
.about__meta,
.about__meta a {
  font-family: var(--copy);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
  max-width: none;
}

.work-board {
  max-width: none;
}

.work-board__scale {
  position: relative;
  width: min(16rem, 46vw);
  margin: 0 0 1.75rem;
  z-index: 1;
}

.work-board__track {
  position: relative;
  height: 1.15rem;
  touch-action: none;
  cursor: ew-resize;
}

.work-board__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ink);
  opacity: 0.22;
  transform: translateY(-50%);
}

.work-board__dot {
  position: absolute;
  top: 50%;
  left: 40%;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: inherit;
  appearance: none;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}

.work-board__dot:active,
.work-board__dot.is-drag {
  cursor: grabbing;
}

.folio {
  margin-bottom: 3.5rem;
}

.folio__item {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.folio__media {
  display: block;
  overflow: hidden;
  background: #efefef;
}

.folio__media img,
.folio__media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ratio, 1.4);
  object-fit: cover;
  object-position: center;
}

.folio__name {
  display: block;
  margin-top: 0.1rem;
  margin-bottom: 0;
  font-size: 0.62rem;
  line-height: 1.05;
  text-transform: lowercase;
}

.folio__item:hover .folio__name {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.folio__item.is-progress:hover .folio__name {
  text-decoration: none;
}

.film + .film {
  margin-top: 3.5rem;
}

.film__still {
  width: 100%;
  margin-bottom: 0.65rem;
}

.film__still img,
.film__still video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ratio, 1.4);
  object-fit: cover;
}

.entry + .entry {
  margin-top: 4rem;
}

.project__title,
.film__title,
.project__copy,
.film-meta,
.section > p {
  font-family: var(--copy);
  font-weight: 700;
  font-size: clamp(2.15rem, 4.8vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.project__title,
.film__title {
  max-width: 16em;
  margin-bottom: 1.6rem;
  text-transform: lowercase;
}

.project__copy {
  max-width: 18em;
  margin-bottom: 1.5rem;
}

.project__copy p + p {
  margin-top: 0.85em;
}

.film-meta {
  max-width: 18em;
  margin-bottom: 1.5rem;
}

.film-meta div {
  display: block;
  padding: 0.35rem 0;
}

.project-page__media {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.75rem;
}

.project-page__frame {
  width: calc(100% + (2 * var(--gutter)));
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
}

.project-page__frame img,
.project-page__frame video {
  width: 100%;
  height: auto;
  max-width: none;
  aspect-ratio: var(--ratio, auto);
  object-fit: cover;
}

.project__cover {
  width: 100%;
  max-width: 28rem;
}

.slides {
  max-width: 42rem;
}

.slides__stage {
  cursor: pointer;
}

.slides__item {
  display: none;
  margin: 0;
}

.slides__item.is-on {
  display: block;
}

.slides__item img,
.slides__item video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

.slides__bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  max-width: 18rem;
  padding-bottom: 0.65rem;
}

.slides__bar button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.18rem 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.slides__bar button:hover,
.slides__bar button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.project__turn {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 42rem;
  padding-top: 2.5rem;
}

@media (max-width: 820px) {
  .site-head {
    position: relative;
  }

  :root {
    --thumb-h: calc(4.4rem + 10rem * var(--thumb-scale));
  }

  .site-mark {
    width: min(16.5rem, 68vw);
    margin-top: -0.2rem;
  }

  .index,
  .section,
  .about {
    padding: 0 var(--pad) 5rem;
    max-width: none;
  }

  .home-grid__item {
    width: min(40vw, 12rem);
  }

  .home-grid__item--motion {
    width: min(44vw, 13.5rem);
  }
}

