@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-900.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #242529;
  --cream: #f7eadc;
  --tally: #bc2328;
  --warm-dark: #8b847b;
  --warm-light: #6f6962;
  --dark: #141216;
  --dark-raised: #1b181d;
  --page-bg: var(--dark);
  --page-text: var(--cream);
  --page-muted: #c8bbb0;
  --page-line: #4f4a4e;
  --header-bg: rgba(20, 18, 22, 0.94);
  --gutter: clamp(20px, 4vw, 72px);
  --header-height: 78px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

html[data-polarity="light"] {
  color-scheme: light;
  --page-bg: var(--cream);
  --page-text: var(--ink);
  --page-muted: var(--warm-light);
  --page-line: #b2a99e;
  --header-bg: rgba(247, 234, 220, 0.95);
}

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

html {
  min-width: 320px;
  background: var(--page-bg);
  color: var(--page-text);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--page-text);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

button {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 900;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--tally);
  color: var(--cream);
}

:focus-visible {
  outline: 3px solid var(--tally);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px var(--cream);
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  translate: 0 -180%;
  background: var(--cream);
  color: var(--ink);
  padding: 11px 15px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  translate: 0;
}

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(138px, 190px) 1fr auto;
  align-items: center;
  gap: clamp(18px, 3vw, 48px);
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--page-line);
  background: var(--header-bg);
  color: var(--page-text);
  backdrop-filter: blur(14px);
}

.brand-lockup,
.footer-brand {
  display: block;
  text-decoration: none;
}

.brand-lockup img,
.footer-brand img {
  width: 100%;
  height: auto;
}

.primary-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
}

.primary-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  text-decoration: underline;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.funnel-cta,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tally);
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
}

.funnel-cta,
.button-primary {
  background: var(--tally);
  color: var(--cream);
}

.funnel-cta:hover,
.button-primary:hover {
  border-color: var(--page-text);
  background: var(--page-text);
  color: var(--page-bg);
}

.polarity-toggle,
.menu-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid currentColor;
  background: transparent;
}

.polarity-toggle {
  display: grid;
  place-items: center;
}

.polarity-toggle span {
  width: 18px;
  height: 18px;
  display: block;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent 50%, currentColor 50%);
}

.menu-button,
.nav-polarity {
  display: none;
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  content: "";
  width: 22px;
  display: block;
  margin: 5px auto;
  border-top: 1px solid currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-button[aria-expanded="true"] span {
  opacity: 0;
}

.menu-button[aria-expanded="true"]::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-button[aria-expanded="true"]::after {
  transform: translateY(-6px) rotate(-45deg);
}

.page-main {
  padding-top: var(--header-height);
}

.chapter-index,
.status-label {
  margin: 0 0 18px;
  color: var(--page-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.paper {
  background: var(--cream);
  color: var(--ink);
}

.paper .chapter-index {
  color: var(--tally);
}

.work-intro {
  min-height: 80svh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: end;
  gap: clamp(50px, 8vw, 140px);
  padding: clamp(100px, 15svh, 180px) var(--gutter) 10svh;
}

.work-intro h1 {
  max-width: 1100px;
  margin-bottom: 0;
  font-size: clamp(4.2rem, 9.5vw, 9.5rem);
  letter-spacing: -0.076em;
  line-height: 0.8;
}

.work-intro > p {
  margin: 0;
  color: var(--page-muted);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.project-section {
  padding: 4svh var(--gutter) 12svh;
}

.project-index {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--page-line);
  list-style: none;
}

.project-index > li {
  border-bottom: 1px solid var(--page-line);
}

.project-link {
  display: grid;
  grid-template-columns: 44px minmax(270px, 0.75fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
  min-height: 290px;
  padding: 32px 0;
  text-decoration: none;
}

.project-link > span {
  align-self: start;
  padding-top: 4px;
  color: var(--page-muted);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.project-link h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5.6vw, 6.2rem);
  letter-spacing: -0.06em;
  line-height: 0.86;
}

.project-link div > p:last-child {
  color: var(--page-muted);
  font-size: 1.06rem;
}

.project-link figure {
  position: relative;
  aspect-ratio: 16 / 8;
  margin: 0;
  overflow: hidden;
  background: var(--dark-raised);
}

.project-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(0.84);
  transition: transform 500ms var(--ease), filter 240ms ease;
}

.project-link:hover img {
  transform: scale(1.025);
  filter: brightness(0.9) saturate(0.94);
}

.honesty-band {
  min-height: 58svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-top: 14px solid var(--tally);
  background: var(--cream);
  color: var(--ink);
  padding: clamp(80px, 12svh, 150px) var(--gutter);
}

.honesty-band .chapter-index {
  color: var(--tally);
}

.honesty-band h2 {
  max-width: 1200px;
  margin: 0;
  font-size: clamp(3.6rem, 7.8vw, 8rem);
  letter-spacing: -0.07em;
  line-height: 0.84;
}

.media-hero {
  position: relative;
  min-height: calc(94svh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: end;
  gap: clamp(40px, 7vw, 120px);
  overflow: hidden;
  background: var(--dark);
  color: var(--cream);
  padding: 12svh var(--gutter) 9svh;
}

.media-hero > img,
.media-hero > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(0.8);
}

.media-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 18, 22, 0.9), transparent 75%),
    linear-gradient(0deg, rgba(20, 18, 22, 0.94), transparent 65%);
}

.media-hero-title,
.media-hero > p {
  position: relative;
  z-index: 2;
}

.media-hero .chapter-index {
  color: #d0c4ba;
}

.media-hero h1 {
  max-width: 1050px;
  margin-bottom: 0;
  font-size: clamp(4rem, 9.8vw, 9.8rem);
  letter-spacing: -0.076em;
  line-height: 0.78;
}

.media-hero > p {
  margin: 0;
  color: #d6c9bd;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.case-section {
  padding: clamp(90px, 13svh, 160px) var(--gutter);
}

.case-heading,
.case-system {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  align-items: start;
  gap: clamp(50px, 8vw, 140px);
}

.case-heading h2,
.case-system h2,
.system-controls h2,
.motion-heading h2 {
  margin-bottom: 0;
  font-size: clamp(3.4rem, 7vw, 7.4rem);
  letter-spacing: -0.068em;
  line-height: 0.84;
}

.case-intro {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.case-intro p:first-child {
  margin-top: 0;
}

.case-intro p:last-child {
  color: var(--warm-light);
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 70px 0 0;
  border: 1px solid #9d958d;
  background: #9d958d;
}

.fact-strip > div {
  min-height: 112px;
  background: var(--cream);
  padding: 20px;
}

.fact-strip dt {
  color: var(--warm-light);
  font-size: 0.75rem;
  font-weight: 700;
}

.fact-strip dd {
  margin: 10px 0 0;
  font-weight: 700;
}

.editorial-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 70px 0 0;
  overflow: hidden;
  background: var(--dark);
}

.editorial-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-frame figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 430px;
  background: rgba(20, 18, 22, 0.92);
  color: var(--cream);
  padding: 16px 20px;
}

.system-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(34px, 5vw, 80px);
  padding: clamp(90px, 13svh, 160px) var(--gutter);
}

.system-visual {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: var(--dark-raised);
}

.system-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 220ms ease;
}

.slot-layer {
  opacity: 0;
}

.system-visual.show-slots .slot-layer {
  opacity: 1;
}

.system-visual.show-slots .base-layer {
  opacity: 0.25;
}

.camera-zone {
  position: absolute;
  left: 29%;
  bottom: 0;
  width: 33%;
  height: 62%;
  border: 2px solid var(--tally);
  opacity: 0;
}

.system-visual.show-camera .camera-zone {
  opacity: 1;
}

.system-visual.vertical-crop::after {
  content: "Vertical crop";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 36%;
  width: 28%;
  display: flex;
  align-items: flex-end;
  border: 2px solid var(--tally);
  background: rgba(20, 18, 22, 0.42);
  color: var(--cream);
  padding: 12px;
  font-size: 0.76rem;
  font-weight: 700;
}

.system-controls {
  align-self: end;
}

.system-controls > p:not(.chapter-index),
.system-lede {
  color: var(--page-muted);
  font-size: 1.12rem;
}

.layer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 30px;
}

.layer-buttons button {
  min-height: 50px;
  border: 1px solid var(--page-line);
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
}

.layer-buttons button[aria-pressed="true"] {
  border-color: var(--tally);
  background: var(--tally);
  color: var(--cream);
}

.layer-description {
  min-height: 54px;
  margin-top: 18px;
}

.process-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--page-line);
  list-style: none;
}

.paper .process-list {
  border-color: #9d958d;
}

.process-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 22px;
  border-bottom: 1px solid var(--page-line);
  padding: 24px 0;
}

.paper .process-list li {
  border-color: #9d958d;
}

.process-list span {
  color: var(--page-muted);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.paper .process-list span {
  color: var(--warm-light);
}

.process-list h3 {
  margin: 0 0 7px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.process-list p {
  margin: 0;
  font-size: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.button-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.button-dark:hover {
  border-color: var(--tally);
  background: var(--tally);
  color: var(--cream);
}

.button-outline,
.button-outline-dark {
  background: transparent;
}

.button-outline {
  border-color: var(--page-text);
  color: var(--page-text);
}

.button-outline:hover {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--ink);
}

.button-outline-dark {
  border-color: var(--ink);
  color: var(--ink);
}

.button-outline-dark:hover {
  border-color: var(--tally);
  background: var(--tally);
  color: var(--cream);
}

.motion-hero .media-toggle {
  margin-top: 24px;
}

.motion-chapter {
  background: var(--dark);
  color: var(--cream);
  padding: clamp(90px, 13svh, 160px) var(--gutter);
}

.motion-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: end;
  gap: clamp(50px, 8vw, 140px);
  margin-bottom: 70px;
}

.motion-heading .chapter-index {
  color: #c8bbb0;
}

.motion-heading > p {
  color: #c8bbb0;
  font-size: 1.12rem;
}

.motion-sequence {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 60svh 44svh;
  gap: 10px;
}

.motion-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--dark-raised) var(--poster) center / cover no-repeat;
}

.motion-frame:first-child {
  grid-row: span 2;
}

.motion-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.motion-frame figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(20, 18, 22, 0.9);
  color: var(--cream);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.site-footer {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr auto;
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
  border-top: 1px solid var(--page-line);
  background: var(--page-bg);
  color: var(--page-text);
  padding: 44px var(--gutter);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.site-footer nav a {
  text-decoration: none;
}

.site-footer nav a:hover,
.site-footer nav a[aria-current="page"] {
  text-decoration: underline;
}

.footer-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.footer-meta span {
  display: flex;
  gap: 14px;
  color: var(--page-muted);
}

.noscript-note {
  position: fixed;
  z-index: 120;
  right: 14px;
  bottom: 14px;
  max-width: 430px;
  margin: 0;
  border: 1px solid var(--cream);
  background: var(--dark);
  color: var(--cream);
  padding: 12px 14px;
}

.no-js .media-toggle {
  display: none;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: minmax(130px, 170px) 1fr auto;
    gap: 18px;
  }

  .primary-nav {
    gap: 15px;
  }

  .primary-nav a {
    font-size: 0.82rem;
  }

  .polarity-toggle {
    display: none;
  }
}

@media (max-width: 940px) {
  :root {
    --header-height: 68px;
  }

  .site-header {
    grid-template-columns: minmax(110px, 150px) 1fr;
    gap: 18px;
    padding-block: 10px;
  }

  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 0;
    display: none;
    align-content: start;
    justify-content: start;
    gap: 0;
    overflow-y: auto;
    background: var(--page-bg);
    color: var(--page-text);
    padding: 7svh var(--gutter);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .primary-nav a {
    min-height: 68px;
    border-bottom: 1px solid var(--page-line);
    font-size: clamp(1.8rem, 7vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
  }

  .nav-polarity {
    min-height: 56px;
    display: block;
    margin-top: 28px;
    border: 1px solid var(--page-line);
    background: transparent;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
  }

  .header-actions {
    justify-self: end;
  }

  .menu-button {
    display: block;
  }

  .work-intro,
  .media-hero,
  .case-heading,
  .case-system,
  .system-section,
  .motion-heading {
    grid-template-columns: 1fr;
  }

  .work-intro,
  .media-hero {
    align-content: end;
  }

  .project-link {
    grid-template-columns: 40px minmax(230px, 0.8fr) minmax(280px, 1.2fr);
  }

  .system-controls {
    order: -1;
  }

  .system-visual {
    min-height: 62vw;
  }

  .site-footer {
    grid-template-columns: minmax(180px, 250px) 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .site-header {
    grid-template-columns: minmax(94px, 112px) 1fr;
    gap: 10px;
    padding-inline: 12px;
  }

  .header-actions {
    gap: 7px;
  }

  .funnel-cta {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .menu-button {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .work-intro {
    min-height: 72svh;
    padding-block: 80px 70px;
  }

  .work-intro h1,
  .media-hero h1 {
    font-size: clamp(3.8rem, 18vw, 6.4rem);
  }

  .project-section {
    padding-bottom: 80px;
  }

  .project-link {
    grid-template-columns: 32px 1fr;
    gap: 12px;
    min-height: 0;
  }

  .project-link figure,
  .project-link div > p:last-child {
    grid-column: 2;
  }

  .project-link h2 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .honesty-band h2,
  .case-heading h2,
  .case-system h2,
  .system-controls h2,
  .motion-heading h2 {
    font-size: clamp(3.2rem, 15vw, 5.5rem);
  }

  .media-hero {
    min-height: calc(90svh - var(--header-height));
    padding-block: 80px 60px;
  }

  .case-section,
  .system-section,
  .motion-chapter {
    padding-block: 80px;
  }

  .fact-strip {
    grid-template-columns: 1fr 1fr;
    margin-top: 48px;
  }

  .editorial-frame {
    aspect-ratio: 4 / 5;
    margin-top: 48px;
  }

  .editorial-frame figcaption {
    left: 0;
  }

  .system-visual {
    min-height: 76svh;
  }

  .layer-buttons {
    grid-template-columns: 1fr;
  }

  .motion-sequence {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .motion-frame,
  .motion-frame:first-child {
    flex: 0 0 86vw;
    height: 68svh;
    scroll-snap-align: start;
  }

  .site-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-brand {
    width: min(230px, 70vw);
  }

  .footer-meta {
    grid-column: auto;
    display: grid;
    justify-content: start;
  }
}

@media (max-width: 370px) {
  .site-header {
    grid-template-columns: 92px 1fr;
  }

  .funnel-cta {
    font-size: 0.7rem;
    padding-inline: 7px;
  }

  .menu-button {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}

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

  .project-link img,
  .system-visual img,
  .menu-button span,
  .menu-button::before,
  .menu-button::after {
    transition: none;
  }

  .media-hero video,
  .motion-frame video {
    display: none;
  }

  .motion-hero {
    background: var(--dark) url("/assets/reel/reel-poster.jpg") center / cover no-repeat;
  }
}

@media (forced-colors: active) {
  .media-hero::after {
    background: transparent;
  }

  .funnel-cta,
  .button,
  .layer-buttons button[aria-pressed="true"] {
    border: 2px solid;
  }
}
