@font-face {
  font-family: "Instrument Sans";
  src: url("./assets/InstrumentSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0a0b0b;
  --ink: #efeee9;
  --secondary: #aaaba7;
  --quiet: rgba(239, 238, 233, 0.2);
  --brass: #c09559;
  --page-x: clamp(24px, 4.7vw, 76px);
  --compare: 0;
  --compare-copy: 0;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 280px;
  min-height: 100%;
  margin: 0;
  background: var(--ground);
}

html { overflow-x: clip; }

body {
  overflow-x: clip;
  color: var(--ink);
  font-family: "Instrument Sans", Arial, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--ground);
}

.edge-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.66);
}

.navigation {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  height: 72px;
  padding: 0 var(--page-x);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(239, 238, 233, 0.16);
  color: var(--secondary);
  font-size: 11px;
  text-transform: uppercase;
}

.navigation a {
  text-decoration: none;
  transition: color 220ms ease;
}

.navigation a:hover,
.navigation a:focus-visible { color: var(--ink); }

.navigation__identity {
  justify-self: start;
  color: var(--ink);
  font-weight: 560;
}

.navigation__return {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-self: end;
}

.navigation__return i,
.project__action i {
  font-style: normal;
  transition: transform 260ms ease;
}

.navigation__return:hover i,
.navigation__return:focus-visible i,
.project__action:hover i,
.project__action:focus-visible i {
  transform: translate(3px, -3px);
}

.work {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  padding: 100px var(--page-x) 30px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.project-rail {
  display: flex;
  justify-content: space-between;
  color: var(--secondary);
  font-size: 10px;
  text-transform: uppercase;
}

.project {
  display: grid;
  min-height: 0;
  padding: clamp(36px, 5vh, 68px) 0 clamp(28px, 4vh, 54px);
  grid-template-columns: minmax(360px, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(42px, 6vw, 106px);
  align-items: center;
}

.project__copy {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(24px);
  animation: copy-in 900ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
}

.project__eyebrow {
  margin: 0 0 18px;
  color: var(--brass);
  font-size: 12px;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(72px, 8.2vw, 132px);
  font-weight: 440;
  line-height: 0.81;
}

.project__summary {
  width: min(480px, 100%);
  margin: clamp(30px, 4vh, 50px) 0 0;
  color: #cdcec9;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.5;
}

.project__action {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  margin-top: 30px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--brass);
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
}

.project__action i { animation: scroll-pulse 1500ms ease-in-out infinite; }

.project__visual {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: 0;
  color: var(--secondary);
  text-decoration: none;
}

.project__image-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #050606;
  clip-path: inset(0 100% 0 0);
  overflow: hidden;
  animation: aperture-open 1200ms cubic-bezier(0.72, 0, 0.18, 1) 260ms forwards;
}

.project__image-wrap::before,
.project__image-wrap::after {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(239, 238, 233, 0.34);
  content: "";
  pointer-events: none;
}

.project__image-wrap::before { top: 0; }
.project__image-wrap::after { bottom: 0; }

.project__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.04);
  transform: scale(1.035) translate3d(var(--image-x, 0), var(--image-y, 0), 0);
  transition: filter 500ms ease;
  will-change: transform;
}

.project__visual:hover img,
.project__visual:focus-visible img { filter: saturate(1) contrast(1.06); }

.project__visual-label {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0;
  animation: label-in 700ms ease 1160ms forwards;
}

.project-facts {
  display: grid;
  margin: 0;
  padding: 18px 0 0;
  grid-template-columns: 1.15fr 1fr 1fr;
  border-top: 1px solid rgba(239, 238, 233, 0.22);
}

.project-facts div {
  min-width: 0;
  padding-right: clamp(22px, 4vw, 70px);
}

.project-facts div + div {
  padding-left: clamp(20px, 3vw, 50px);
  border-left: 1px solid rgba(239, 238, 233, 0.14);
}

.project-facts dt {
  margin-bottom: 10px;
  color: var(--brass);
  font-size: 10px;
  text-transform: uppercase;
}

.project-facts dd {
  max-width: 330px;
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.45;
}

.comparison-story,
.system-story,
.outcome {
  position: relative;
  z-index: 2;
  background: var(--ground);
}

.comparison-story { height: 300svh; }
.system-story {
  height: auto;
  min-height: 100svh;
}

.comparison-stage,
.system-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  min-height: 640px;
  padding: 94px var(--page-x) 30px;
  overflow: hidden;
}

.story-header {
  position: absolute;
  top: 88px;
  right: var(--page-x);
  left: var(--page-x);
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(239, 238, 233, 0.2);
  color: var(--secondary);
  font-size: 10px;
  text-transform: uppercase;
}

.comparison-copy {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: var(--page-x);
  width: min(390px, 29vw);
  transform: translateY(-50%);
  will-change: opacity, transform;
}

.comparison-copy--before {
  opacity: clamp(0, calc((0.45 - var(--compare-copy)) * 10), 1);
  transform: translateY(calc(-50% - var(--compare-copy) * 22px));
}

.comparison-copy--after {
  opacity: clamp(0, calc((var(--compare-copy) - 0.55) * 10), 1);
  transform: translateY(calc(-50% + (1 - var(--compare-copy)) * 22px));
}

.comparison-copy > p,
.system-copy > p,
.outcome__copy > p {
  margin: 0 0 16px;
  color: var(--brass);
  font-size: 11px;
  text-transform: uppercase;
}

.comparison-copy h2,
.system-copy h2,
.outcome__copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(52px, 5.8vw, 88px);
  font-weight: 430;
  line-height: 0.94;
}

.comparison-copy > span,
.outcome__copy > span {
  display: block;
  max-width: 360px;
  margin-top: 26px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.55;
}

.comparison-frame {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: var(--page-x);
  width: min(60vw, 980px);
  height: min(66vh, 700px);
  margin: 0;
  background: #edf0f5;
  overflow: hidden;
  transform: translateY(-50%);
}

.comparison-frame > img,
.comparison-frame__after,
.comparison-frame__after img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.comparison-frame img {
  object-fit: cover;
  object-position: center top;
}

.comparison-frame__before { filter: saturate(0.78) contrast(0.98); }

.comparison-frame__after {
  clip-path: inset(0 calc((1 - var(--compare)) * 100%) 0 0);
  overflow: hidden;
  will-change: clip-path;
}

.comparison-frame__after img { object-position: center; }

.comparison-frame__line {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: calc(var(--compare) * 100%);
  width: 1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
  transform: translateX(-1px);
  will-change: left;
}

.comparison-frame__label {
  position: absolute;
  z-index: 4;
  bottom: 12px;
  padding: 6px 8px;
  background: rgba(10, 11, 11, 0.84);
  color: var(--ink);
  font-size: 9px;
  text-transform: uppercase;
}

.comparison-frame__label--before { left: 12px; }
.comparison-frame__label--after { right: 12px; }

.story-progress {
  position: absolute;
  right: var(--page-x);
  bottom: 24px;
  display: grid;
  width: min(60vw, 980px);
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--secondary);
  font-size: 9px;
  text-transform: uppercase;
}

.story-progress > i {
  height: 1px;
  background: rgba(239, 238, 233, 0.22);
}

.story-progress b {
  display: block;
  width: calc(var(--compare) * 100%);
  height: 100%;
  background: var(--brass);
}

.system-stage {
  position: relative;
  top: auto;
  min-height: 100svh;
  isolation: isolate;
}

.system-copy {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: var(--page-x);
  width: clamp(128px, 15vw, 280px);
  transform: translateY(-50%);
}

.system-copy h2 {
  font-size: clamp(28px, 3vw, 52px);
  line-height: 0.98;
}

.system-frame {
  position: absolute;
  z-index: 2;
  top: 52%;
  right: var(--page-x);
  width: min(74vw, 1260px);
  margin: 0;
  transform: translate3d(0, -50%, 0);
  transform-origin: 68% 48%;
}

.system-frame::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(239, 238, 233, 0.26);
  content: "";
  pointer-events: none;
}

.system-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.system-frame figcaption {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 9px;
  text-transform: uppercase;
}

.system-notes {
  position: absolute;
  z-index: 4;
  right: var(--page-x);
  bottom: 32px;
  left: var(--page-x);
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  opacity: 1;
}

.system-notes li {
  padding: 14px clamp(18px, 2.4vw, 38px) 0 0;
  border-top: 1px solid rgba(239, 238, 233, 0.24);
}

.system-notes li + li { padding-left: clamp(18px, 2.4vw, 38px); }

.system-notes span {
  display: block;
  margin-bottom: 14px;
  color: var(--brass);
  font-size: 9px;
}

.system-notes p {
  max-width: 320px;
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.5;
}

.outcome {
  display: grid;
  min-height: 100svh;
  padding: 100px var(--page-x) 32px;
  grid-template-rows: auto 1fr auto;
}

.outcome__index {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(239, 238, 233, 0.2);
  color: var(--secondary);
  font-size: 10px;
  text-transform: uppercase;
}

.outcome__copy {
  align-self: center;
  justify-self: center;
  width: min(980px, 82vw);
  text-align: center;
}

.outcome__copy h2 { font-size: clamp(66px, 8vw, 126px); }

.outcome__copy > span { margin-right: auto; margin-left: auto; }

.outcome__link {
  display: flex;
  justify-content: space-between;
  padding: 18px 0 0;
  border-top: 1px solid rgba(239, 238, 233, 0.28);
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.outcome__link i { font-style: normal; transition: transform 260ms ease; }
.outcome__link:hover i,
.outcome__link:focus-visible i { transform: translate(3px, -3px); }

@keyframes copy-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes aperture-open {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes label-in {
  to { opacity: 1; }
}

@keyframes scroll-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 5px;
}

@media (max-width: 980px) {
  .work { padding-top: 92px; }
  .project {
    padding-top: 34px;
    grid-template-columns: minmax(280px, 0.8fr) minmax(400px, 1.2fr);
    gap: 34px;
  }
  h1 { font-size: clamp(64px, 9.6vw, 94px); }
  .project__summary { font-size: 14px; }
}

@media (max-width: 760px) {
  :root { --page-x: 18px; }
  .navigation {
    height: 58px;
    grid-template-columns: 1fr auto;
    font-size: 9px;
  }
  .navigation > span { display: none; }
  .navigation__return span { display: none; }
  .navigation__return i { font-size: 16px; }
  .work {
    display: block;
    min-height: 100svh;
    padding-top: 78px;
  }
  .project-rail { font-size: 9px; }
  .project {
    display: flex;
    padding: 54px 0 34px;
    flex-direction: column;
    gap: 42px;
    align-items: stretch;
  }
  h1 { font-size: clamp(66px, 21vw, 102px); }
  .project__summary { width: min(360px, 92%); }
  .project__visual { order: 2; }
  .project__image-wrap { aspect-ratio: 4 / 3; }
  .project__visual img { object-position: 50% 50%; }
  .project-facts {
    padding-top: 0;
    grid-template-columns: 1fr;
  }
  .project-facts div {
    padding: 18px 0 22px;
    border-top: 1px solid rgba(239, 238, 233, 0.18);
  }
  .project-facts div + div {
    padding-left: 0;
    border-left: 0;
  }
  .comparison-story { height: 260svh; }
  .system-story {
    height: auto;
    min-height: 100svh;
  }
  .comparison-stage,
  .system-stage {
    min-height: 590px;
    padding: 76px 18px 24px;
  }
  .story-header {
    top: 70px;
    right: 18px;
    left: 18px;
    font-size: 8px;
  }
  .comparison-copy {
    top: 19%;
    left: 18px;
    width: calc(100% - 36px);
    transform: none;
  }
  .comparison-copy--before {
    transform: translateY(calc(var(--compare-copy) * -14px));
  }
  .comparison-copy--after {
    transform: translateY(calc((1 - var(--compare-copy)) * 14px));
  }
  .comparison-copy h2 { font-size: clamp(40px, 12vw, 58px); line-height: .94; }
  .comparison-copy > span { max-width: 330px; margin-top: 14px; font-size: 12px; }
  .comparison-frame {
    top: calc(61% + 30px);
    right: 18px;
    width: calc(100% - 36px);
    height: min(38vh, 390px);
  }
  .story-progress {
    right: 18px;
    bottom: 22px;
    width: calc(100% - 36px);
  }
  .system-frame {
    top: 46%;
    right: -18px;
    width: calc(100% + 36px);
    transform-origin: 70% 50%;
  }
  .system-frame figcaption { padding: 0 18px; }
  .system-stage { min-height: 844px; }
  .system-copy {
    top: 114px;
    right: 18px;
    left: 18px;
    width: auto;
    transform: none;
  }
  .system-copy > p { margin-bottom: 10px; font-size: 9px; }
  .system-copy h2 {
    max-width: 350px;
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 0.96;
  }
  .system-notes {
    top: 64%;
    right: 18px;
    bottom: auto;
    left: 18px;
    grid-template-columns: 1fr;
  }
  .system-notes li { padding: 9px 0; }
  .system-notes li + li { padding-left: 0; }
  .system-notes span { display: inline-block; width: 26px; margin: 0; }
  .system-notes p { display: inline; font-size: 10px; }
  .outcome {
    padding: 78px 18px 24px;
  }
  .outcome__index { font-size: 8px; }
  .outcome__copy { width: 100%; }
  .outcome__copy h2 { font-size: clamp(54px, 16vw, 78px); }
  .outcome__copy > span { font-size: 12px; }
}

@media (max-height: 760px) and (min-width: 761px) {
  .navigation { height: 58px; }
  .work { padding-top: 78px; }
  .project { padding-top: 26px; padding-bottom: 24px; }
  .project__summary { margin-top: 22px; }
  .project__action { margin-top: 20px; }
  h1 { font-size: clamp(68px, 7.4vw, 106px); }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --compare: 1;
    --compare-copy: 1;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
