@font-face {
  font-family: "AA Narrow";
  src: url("./assets/fonts/AA-Narrow.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "AA Narrow Italic";
  src: url("./assets/fonts/AA-NarrowItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: block;
}

:root {
  --paper: #FFFFFF;
  --ink: #333333;
  --highlight: #F0E24B;
  --copy-font: "AA Narrow", "Times New Roman", Times, serif;
  --rail-left: 15px;
  --page-edge: 16px;
  --content-left: 397px;
  --content-width: 850px;
  --display-size: 88px;
  --display-leading: 0.965;
  --selection-caption-space: 26px;
  --gallery-height: min(850px, calc(100vh - 40px - var(--selection-caption-space)));
  --work-card-width: min(590px, calc(var(--gallery-height) * 0.69164));
  --work-landscape-width: min(
    calc(var(--gallery-height) * 1.44578),
    calc(100vw - var(--content-left) - var(--page-edge))
  );
  --gallery-gap: 40px;
  --gallery-extra-scroll: 620px;
  --gallery-shift: 0px;
  --scroll-large-noise-x: 0em;
  --scroll-large-noise-y: 0em;
  --scroll-large-noise-blur: 0px;
  --scroll-small-noise-x: 0em;
  --scroll-small-noise-y: 0em;
  --scroll-small-noise-blur: 0px;
  --section-gap: 104px;
  --work-pin-top: max(20px, calc((100vh - var(--gallery-height)) / 2));
  --mobile-rail-height: 0px;
  --portrait-end-space: max(80px, calc(50vh - 201px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--copy-font);
  font-weight: 400;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

body.is-preloading {
  overflow: hidden;
}

body.is-preloading .site-rail,
body.is-preloading .page-shell,
body.is-preloading .rail-clock {
  opacity: 0;
}

body:not(.is-preloading) .site-rail,
body:not(.is-preloading) .page-shell,
body:not(.is-preloading) .rail-clock {
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

a:hover {
  background-color: var(--highlight);
  text-decoration: none;
}

button {
  font: inherit;
}

.text-texture-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-preloader-exiting .preloader {
  opacity: 0;
  pointer-events: none;
}

body:not(.is-preloading) .preloader {
  display: none;
}

.preloader-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  min-height: 100svh;
  font-family: var(--copy-font);
  font-size: clamp(560px, 132svh, 1440px);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.preloader-mark span {
  grid-area: 1 / 1;
  display: block;
  margin-right: -0.07em;
}

.preloader-mark-grain {
  opacity: 1;
  filter: url("#preloader-grain") blur(var(--preloader-noise-blur, 2px));
  transform: translate3d(
    var(--preloader-noise-x, -0.014em),
    var(--preloader-noise-y, 0.006em),
    0
  ) scale(var(--preloader-noise-scale, 0.992));
  will-change: filter, opacity, transform;
}

.site-rail {
  position: fixed;
  inset: 13px auto 18px var(--rail-left);
  z-index: 10;
  display: flex;
  width: 200px;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  font-size: 14px;
  line-height: 22px;
}

.brand,
.rail-nav h2 {
  display: inline-block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
  text-transform: uppercase;
}

.site-title {
  margin: 0;
  font: inherit;
}

.rail-top p {
  margin: 0;
}

.rail-heading {
  display: block;
}

.rail-info-toggle {
  display: none;
}

.rail-nav {
  position: absolute;
  top: 84px;
  left: 0;
}

.rail-nav section + section {
  margin-top: 40px;
}

.rail-nav ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-nav li,
.rail-top p {
  font-size: 14px;
  line-height: 22px;
}

.rail-nav a {
  display: inline;
  text-decoration: underline;
}

.rail-nav a:hover,
.brand:hover {
  color: var(--ink);
}

.rail-nav a:hover {
  text-decoration: none;
}

.rail-more a {
  position: relative;
}

.rail-more a::after {
  content: "";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%);
  background: url("./assets/arrow.svg") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .rail-more a:hover::after {
    opacity: 1;
  }
}

.rail-clock {
  position: fixed;
  bottom: 18px;
  left: var(--rail-left);
  z-index: 10;
  display: grid;
  gap: 0;
  margin: 0;
  font-family: "AA Narrow Italic", Arial, sans-serif;
  font-style: italic;
  font-size: 12px;
  line-height: 20px;
}

.rail-clock span {
  display: block;
}

body.is-text-grain-active .intro-section p,
body.is-text-grain-active .case-section p {
  filter: url("#grainy-text-large") blur(var(--scroll-large-noise-blur));
  transform: translate3d(var(--scroll-large-noise-x), var(--scroll-large-noise-y), 0);
  will-change: filter, transform;
}

body.is-text-grain-active .brand,
body.is-text-grain-active .rail-top p,
body.is-text-grain-active .rail-nav h2,
body.is-text-grain-active .rail-nav li,
body.is-text-grain-active .rail-clock,
body.is-text-grain-active .statement-section p,
body.is-text-grain-active .portrait figcaption,
body.is-text-grain-active .rail-info-toggle {
  filter: url("#grainy-text-small") blur(var(--scroll-small-noise-blur));
  transform: translate3d(var(--scroll-small-noise-x), var(--scroll-small-noise-y), 0);
  will-change: filter, transform;
}

.page-shell {
  position: relative;
  min-height: 5026px;
  overflow: clip;
  padding-bottom: var(--portrait-end-space);
}

.intro-section,
.statement-section,
.case-section {
  width: calc(100vw - var(--content-left) - var(--page-edge));
  margin-left: var(--content-left);
}

.intro-section {
  padding-top: 13px;
}

.intro-section p,
.case-section p {
  margin: 0;
  font-size: 144px;
  font-weight: 400;
  line-height: 128px;
  letter-spacing: -4px;
  overflow-wrap: break-word;
}

.statement-section p {
  max-width: 50%;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0;
  overflow-wrap: normal;
  border: 1px solid #333;
  padding: 16px;
}

.statement-section {
  margin-top: var(--section-gap);
  overflow: hidden;
}

.statement-section--title {
  text-transform: uppercase;
}

.work-section {
  position: relative;
  margin-top: var(--section-gap);
  margin-left: var(--content-left);
  width: calc(100vw - var(--content-left) - var(--page-edge));
  height: calc(var(--gallery-height) + var(--selection-caption-space) + var(--gallery-extra-scroll));
}

.work-pin {
  position: sticky;
  top: var(--work-pin-top);
  z-index: 1;
  height: calc(var(--gallery-height) + var(--selection-caption-space));
  overflow: visible;
}

.work-track {
  display: flex;
  gap: var(--gallery-gap);
  align-items: center;
  width: max-content;
  height: var(--gallery-height);
  transform: translate3d(var(--gallery-shift), 0, 0);
  transition: transform 80ms linear;
  will-change: transform;
}

.work-item {
  position: relative;
  flex: 0 0 auto;
  height: auto;
  overflow: visible;
  display: grid;
  place-items: stretch;
  background: var(--paper);
}

.selection-caption {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  margin: 0;
  font-family: var(--copy-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
}

.work-item-landscape {
  width: var(--work-landscape-width);
  aspect-ratio: 1920 / 1328;
}

.work-item-portrait {
  width: var(--work-card-width);
  aspect-ratio: 1920 / 2776;
}

.work-item img,
.work-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.work-item video {
  background: var(--paper);
}

.case-section {
  margin-top: var(--section-gap);
}

.case-section a {
  text-decoration: underline;
}

.case-section a:hover {
  text-decoration: none;
}

.portrait {
  width: min(250px, calc(100vw - var(--page-edge) * 2));
  max-width: 250px;
  margin: 415px 0 0 774px;
  outline: 0;
}

.portrait:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 8px;
}

.portrait img {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  aspect-ratio: 780 / 1115;
  object-fit: cover;
}

.portrait figcaption {
  display: grid;
  gap: 2px;
  margin-top: 23px;
  color: var(--ink);
  font-size: 14px;
  line-height: 22px;
}

@media (min-width: 1600px) {
  :root {
    --content-left: 440px;
  }

  .portrait {
    margin-left: 860px;
  }
}

@media (max-width: 1440px) {
  :root {
    --section-gap: 80px;
  }
}

@media (max-width: 1600px) {
  .intro-section p,
  .case-section p {
    font-size: 120px;
    line-height: 104px;
    letter-spacing: -1px;
  }
}

@media (max-width: 1380px) {
  :root {
    --content-left: 360px;
    --content-width: 780px;
    --display-size: 78px;
  }

  .intro-section p,
  .case-section p {
    font-size: 104px;
    line-height: 96px;
    letter-spacing: -1px;
  }

  .statement-section p {
    max-width: 90%;
  }
}

@media (max-width: 1180px) {
  :root {
    --content-left: 280px;
    --content-width: 760px;
    --display-size: 70px;
  }

  .portrait {
    margin-left: calc(var(--content-left) + 380px);
  }

  .intro-section p,
  .case-section p {
    font-size: 80px;
    line-height: 72px;
    letter-spacing: -1px;
  }

  .statement-section p {
    max-width: 90%;
  }
}

@media (max-width: 820px) {
  :root {
    --page-edge: 16px;
    --content-left: 16px;
    --content-width: calc(100vw - 32px);
    --display-size: 44px;
    --display-leading: 1.02;
    --gallery-height: min(460px, calc(100vh - 160px));
    --mobile-work-item-height: min(88vw, 557px, var(--gallery-height));
    --section-gap: 48px;
    --work-pin-top: max(16px, calc((100vh - var(--gallery-height)) / 2));
    --mobile-rail-height: 76px;
    --portrait-end-space: max(100px, calc(50vh - 151px));
  }

  html {
    scroll-padding-top: var(--mobile-rail-height);
  }

  .preloader-mark {
    width: min(84vw, 420px);
    min-height: min(64vh, 560px);
    font-size: clamp(166px, 48vw, 250px);
    line-height: 0.78;
  }

  .site-rail {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    overflow: visible;
    background: transparent;
    font-size: 14px;
    line-height: 1.25;
  }

  .site-rail.is-rail-open::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 39;
    background: var(--paper);
  }

  body.is-text-grain-active .intro-section p,
  body.is-text-grain-active .case-section p,
  body.is-text-grain-active .brand,
  body.is-text-grain-active .rail-top p,
  body.is-text-grain-active .rail-nav h2,
  body.is-text-grain-active .rail-nav li,
  body.is-text-grain-active .rail-clock,
  body.is-text-grain-active .statement-section p,
  body.is-text-grain-active .portrait figcaption,
  body.is-text-grain-active .rail-info-toggle {
    filter: none;
    transform: none;
    will-change: auto;
  }

  .rail-heading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 41;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px 0;
    background: transparent;
  }

  .site-rail.is-rail-open .rail-heading {
    padding-bottom: 16px;
    background: var(--paper);
  }

  .brand {
    margin-bottom: 0;
    font-size: 14px;
  }

  .rail-info-toggle {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    line-height: 1;
    text-decoration: underline;
    text-transform: uppercase;
    cursor: pointer;
  }

  .rail-info-toggle:hover,
  .rail-info-toggle:focus-visible {
    color: var(--ink);
  }

  .rail-info-toggle:focus-visible {
    outline: 1px solid var(--ink);
    outline-offset: 4px;
  }

  .rail-top {
    display: grid;
    gap: 8px;
    padding-top: 22px;
  }

  .rail-nav {
    position: fixed;
    top: var(--mobile-rail-height);
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    gap: 46px;
    align-content: start;
    align-items: start;
    justify-items: start;
    height: 0;
    max-height: 0;
    margin-top: 0;
    padding: 0 16px;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.38;
    transition:
      height 360ms cubic-bezier(0.22, 1, 0.36, 1),
      max-height 360ms cubic-bezier(0.22, 1, 0.36, 1),
      padding-top 360ms cubic-bezier(0.22, 1, 0.36, 1),
      padding-bottom 360ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 220ms ease;
  }

  .site-rail.is-rail-open .rail-nav {
    height: calc(100svh - var(--mobile-rail-height));
    max-height: calc(100svh - var(--mobile-rail-height));
    margin-top: 0;
    padding-top: 42px;
    padding-bottom: 42px;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    background: var(--paper);
  }

  .rail-nav section {
    min-width: 0;
  }

  .rail-nav section + section {
    margin-top: 0;
  }

  .rail-nav h2 {
    margin-bottom: 14px;
    font-size: 14px;
  }

  .rail-nav a {
    max-width: none;
    margin-bottom: 4px;
  }

  .rail-clock {
    position: static;
    display: grid;
    margin: 0 0 16px 16px;
  }

  .page-shell {
    min-height: auto;
    margin-top: 0;
  }

  .intro-section,
  .statement-section,
  .case-section {
    width: var(--content-width);
    margin-left: var(--content-left);
  }

  .intro-section {
    padding-top: 32px;
  }

  .intro-section p,
  .case-section p {
    font-size: 48px;
    line-height: 48px;
    letter-spacing: -1px;
  }

  .statement-section p {
    max-width: none;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0;
  }

  .statement-section {
    margin-top: var(--section-gap);
  }

  .case-section {
    margin-top: var(--section-gap);
  }

  .work-section {
    width: 100vw;
    height: calc(var(--gallery-height) + var(--selection-caption-space) + var(--gallery-extra-scroll));
    margin-top: var(--section-gap);
    margin-left: 0;
    overflow: visible;
    padding-bottom: 0;
  }

  .work-pin {
    position: sticky;
    top: var(--work-pin-top);
    height: calc(var(--gallery-height) + var(--selection-caption-space));
    overflow: hidden;
  }

  .work-track {
    align-items: flex-start;
    gap: var(--gallery-gap);
    padding-left: 16px;
    transform: translate3d(var(--gallery-shift), 0, 0);
    transition: transform 80ms linear;
  }

  .work-item {
    height: var(--mobile-work-item-height);
  }

  .work-item-landscape {
    width: calc(var(--mobile-work-item-height) * 1.44578);
    aspect-ratio: 1920 / 1328;
  }

  .work-item-portrait {
    width: calc(var(--mobile-work-item-height) * 0.69164);
    aspect-ratio: 1920 / 2776;
  }

  .work-item img,
  .work-item video {
    width: 100%;
    height: 100%;
  }

  .portrait {
    width: 180px;
    max-width: 250px;
    margin: 130px auto 0;
  }

  .portrait img {
    max-width: 250px;
  }
}

@media (max-width: 520px) {
  :root {
    --display-size: 32px;
    --mobile-work-item-height: min(93.2vw, var(--gallery-height));
  }

  .rail-nav {
    font-size: 14px;
  }

}

@media (max-width: 380px) {
  :root {
    --display-size: 29px;
  }
}

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

  .preloader {
    transition-duration: 180ms;
  }

  .preloader-mark-grain {
    opacity: 1;
    filter: url("#preloader-grain") blur(1px);
    transform: translate3d(0, 0, 0);
  }

  .work-section {
    height: calc(var(--gallery-height) + var(--selection-caption-space));
    margin-bottom: 0;
  }

  .work-pin {
    position: static;
  }

  .work-track {
    transform: none;
    transition: none;
  }
}
