:root {
  color-scheme: dark;
  --ink: #e5ddce;
  --ink-soft: #b9ae9c;
  --ink-faint: #797166;
  --ground: #0b0a08;
  --ground-raised: #12100d;
  --line: rgba(229, 221, 206, 0.17);
  --line-faint: rgba(229, 221, 206, 0.1);
  --underline: rgba(229, 221, 206, 0.38);
  --hover: #fff7e8;
  --accent: #c3a879;
  --glow: rgba(122, 99, 63, 0.08);
  --sheen: rgba(255, 255, 255, 0.018);
  --grain-opacity: 0.23;
  --shadow: rgba(0, 0, 0, 0.34);
  --veil: 11, 10, 8; /* the ground as an RGB triple, for overlays on the photo */
  --title-shadow: 0 0.2em 1.2em rgba(0, 0, 0, 0.5);
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: "Helvetica Neue", "Neue Haas Grotesk Text Pro", Arial, sans-serif;
}

/* Light theme: follows the system unless the visitor picked one (data-theme). */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #1f1c18;
  --ink-soft: #4f483f;
  --ink-faint: #6b6358;
  --ground: #ece6da;
  --ground-raised: #e2dacb;
  --line: rgba(31, 28, 24, 0.18);
  --line-faint: rgba(31, 28, 24, 0.1);
  --underline: rgba(31, 28, 24, 0.35);
  --hover: #000;
  --accent: #8a5f2a;
  --glow: rgba(195, 150, 90, 0.16);
  --sheen: rgba(255, 255, 255, 0.35);
  --grain-opacity: 0.12;
  --shadow: rgba(60, 45, 25, 0.22);
  --veil: 236, 230, 218;
  --title-shadow: 0 0.1em 1em rgba(236, 230, 218, 0.6);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ink: #1f1c18;
    --ink-soft: #4f483f;
    --ink-faint: #6b6358;
    --ground: #ece6da;
    --ground-raised: #e2dacb;
    --line: rgba(31, 28, 24, 0.18);
    --line-faint: rgba(31, 28, 24, 0.1);
    --underline: rgba(31, 28, 24, 0.35);
    --hover: #000;
    --accent: #8a5f2a;
    --glow: rgba(195, 150, 90, 0.16);
    --sheen: rgba(255, 255, 255, 0.35);
    --grain-opacity: 0.12;
    --shadow: rgba(60, 45, 25, 0.22);
    --veil: 236, 230, 218;
    --title-shadow: 0 0.1em 1em rgba(236, 230, 218, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 7%, var(--glow), transparent 29rem),
    linear-gradient(115deg, var(--sheen), transparent 38%),
    var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(91deg, transparent 0 2px, rgba(255,255,255,.035) 3px, transparent 4px),
    repeating-linear-gradient(1deg, transparent 0 3px, rgba(0,0,0,.15) 4px, transparent 5px);
  background-size: 13px 17px, 19px 11px;
}

a {
  color: inherit;
  text-decoration-color: var(--underline);
  text-underline-offset: 0.22em;
}

a:hover,
a:focus-visible {
  color: var(--hover);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}

.site-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line-faint);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  letter-spacing: 0.16em;
}

.wordmark span {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.wordmark small,
.site-header nav,
.eyebrow,
.study figcaption span,
.study figcaption p,
.copyright {
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.wordmark small {
  color: var(--ink-faint);
}

.site-header nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.75rem);
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(8rem, 18vh, 12rem) clamp(1.25rem, 6vw, 7rem) clamp(2rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
}

.hero h1,
h2,
.study h3 {
  font-family: var(--serif);
  font-weight: 400;
}

.hero h1 {
  align-self: center;
  max-width: 13ch;
  margin: 4rem 0;
  font-size: clamp(3.8rem, 9.5vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(16rem, 34rem) auto;
  justify-content: space-between;
  align-items: end;
  gap: 3rem;
  color: var(--ink-soft);
}

.hero-foot p {
  margin: 0;
}

.edition-mark {
  font-family: var(--serif);
  font-style: italic;
}

.process,
.inquiries {
  display: grid;
  grid-template-columns: minmax(4rem, 0.55fr) minmax(18rem, 2fr) minmax(16rem, 1.25fr);
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 6vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.section-number {
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 1.1rem;
}

h2 {
  margin: 1rem 0 2rem;
  font-size: clamp(2.5rem, 5.2vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.process-copy > p:last-child,
.studies-intro > p:last-child,
.vault-copy,
.inquiries p {
  max-width: 38rem;
  color: var(--ink-soft);
}

.facts {
  align-self: end;
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.studies {
  padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.studies-intro {
  width: min(100%, 68rem);
  margin: 0 auto clamp(4rem, 8vw, 8rem);
}

.study-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.82fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.study {
  min-width: 0;
}

.study-b {
  margin-top: clamp(5rem, 16vw, 15rem);
}

.study-c {
  width: 78%;
  margin: clamp(2rem, 6vw, 6rem) 0 0 12%;
}

.study figure {
  margin: 0;
}

.surface {
  position: relative;
  overflow: hidden;
  min-height: 28rem;
  background-color: var(--ground-raised);
  background-position: center;
  background-size: cover;
  box-shadow: 0 2rem 6rem var(--shadow);
}

.surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(227, 199, 151, 0.11), transparent 42%, rgba(0,0,0,.25));
  pointer-events: none;
}

.surface-linen {
  aspect-ratio: 4 / 3;
  background-image: url("./assets/linen.webp");
}

.surface-paper {
  min-height: 38rem;
  aspect-ratio: 3 / 4;
  background-image: url("./assets/paper.webp");
}

.surface-canvas {
  aspect-ratio: 16 / 10;
  background-image: url("./assets/canvas.webp");
}

.study figcaption {
  display: grid;
  grid-template-columns: minmax(6rem, 0.35fr) 1fr;
  gap: 0.25rem 1.5rem;
  padding-top: 1.25rem;
}

.study figcaption span,
.study figcaption p {
  color: var(--ink-faint);
}

.study h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 3.2rem);
  line-height: 1.06;
}

.study figcaption p {
  grid-column: 2;
  margin: 0.65rem 0 0;
}

.vault {
  padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 6vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.vault-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1.6fr) minmax(17rem, 0.8fr);
  gap: clamp(3rem, 7vw, 9rem);
  align-items: end;
}

.vault h2 {
  max-width: 12ch;
}

.vault-copy p {
  margin: 0 0 1.5rem;
}

.inquiries {
  grid-template-columns: minmax(4rem, 0.55fr) minmax(18rem, 2fr);
}

.inquiries h2 {
  margin-bottom: 1.4rem;
}

.email {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 4rem);
}

footer {
  padding: 3rem clamp(1.25rem, 4vw, 4.5rem) 2rem;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.footer-main p,
.disclosure p,
.copyright {
  margin: 0;
}

.disclosure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 6rem);
  padding: 2rem 0 4rem;
  color: var(--ink-faint);
  font-size: 0.8rem;
  line-height: 1.7;
}

.copyright {
  color: var(--ink-faint);
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.visible {
  animation: reveal-in 900ms cubic-bezier(.2,.7,.2,1) both;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
  }

  .site-header nav a:first-child {
    display: none;
  }

  .hero {
    padding-top: 8.5rem;
  }

  .hero h1 {
    margin: 5rem 0 4rem;
  }

  .hero-foot,
  .process,
  .inquiries,
  .vault-grid,
  .study-grid,
  .disclosure {
    grid-template-columns: 1fr;
  }

  .edition-mark {
    text-align: left;
  }

  .process,
  .inquiries {
    gap: 2.5rem;
  }

  .facts {
    margin-top: 1rem;
  }

  .study-b,
  .study-c {
    width: 100%;
    margin: 2rem 0 0;
  }

  .surface,
  .surface-paper {
    min-height: 24rem;
  }

  .study figcaption {
    grid-template-columns: 1fr;
  }

  .study figcaption p {
    grid-column: 1;
  }

  .footer-main {
    flex-direction: column;
  }
}

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

  .reveal {
    animation: none;
  }
}

.mark {
  display: inline-block;
  width: 2.8rem;
  height: 2.8rem;
  flex: none;
  background: currentColor;
  -webkit-mask: url("./assets/mark.svg") center / contain no-repeat;
  mask: url("./assets/mark.svg") center / contain no-repeat;
}

.wordmark {
  align-items: center;
}

/* The studio photo is a generated illustration, labelled by .hero-credit. */
.hero-photo {
  grid-template-rows: auto 1fr auto auto;
  background:
    linear-gradient(90deg, rgba(var(--veil), 0.25) 0%, rgba(var(--veil), 0.1) 35%, rgba(var(--veil), 0.72) 62%, rgba(var(--veil), 0.9) 100%),
    linear-gradient(180deg, rgba(var(--veil), 0.92) 0%, rgba(var(--veil), 0.55) 24%, transparent 40%, transparent 55%, var(--ground) 100%),
    url("./assets/studio.webp") 20% 50% / cover no-repeat,
    var(--ground);
}

.hero-photo h1 {
  justify-self: end;
  max-width: 11ch;
  text-align: right;
  text-shadow: var(--title-shadow);
}

.hero-photo .hero-foot {
  color: var(--ink);
}

.hero-credit {
  margin: 1.5rem 0 0;
  color: var(--ink-faint);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.built-with {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.built-with .mark {
  width: 1.72rem;
  height: 1.72rem;
  color: var(--accent);
}

.built-with a {
  color: var(--accent);
}

@media (max-width: 760px) {
  .wordmark small {
    display: none;
  }

  .hero-photo {
    background:
      linear-gradient(180deg, rgba(var(--veil), 0.85) 0%, rgba(var(--veil), 0.45) 25%, rgba(var(--veil), 0.7) 45%, rgba(var(--veil), 0.8) 70%, var(--ground) 100%),
      url("./assets/studio.webp") 28% 50% / cover no-repeat,
      var(--ground);
  }

  .hero-photo h1 {
    justify-self: start;
    text-align: left;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--hover);
}

.theme-toggle::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* The film */
.film {
  padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.film-intro,
.film-grid,
.transcript {
  width: min(100%, 90rem);
  margin-left: auto;
  margin-right: auto;
}

.film-intro {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.film-intro > p:last-child {
  max-width: 38rem;
  color: var(--ink-soft);
}

.film-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(15rem, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: start;
}

.film-player {
  margin: 0;
  min-width: 0;
}

.film-player video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ground-raised);
  border: 1px solid var(--line);
  box-shadow: 0 2rem 6rem var(--shadow);
}

.film-player figcaption,
.film-download span {
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.film-player figcaption {
  margin-top: 1rem;
}

.film-side {
  min-width: 0;
}

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

.chapters li {
  border-bottom: 1px solid var(--line);
}

.chapters button {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 0.6rem 0.25rem 0.6rem 0.85rem;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.chapters button:hover,
.chapters button:focus-visible {
  color: var(--hover);
}

.chapters button:focus-visible {
  outline-offset: -2px;
}

.chapters time {
  min-width: 2.6rem;
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.chapters button[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent);
}

.chapters button[aria-current="true"] time {
  color: var(--accent);
}

.film-download {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.film-download a {
  width: fit-content;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.transcript {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.transcript summary {
  width: fit-content;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.transcript summary:hover,
.transcript summary:focus-visible {
  color: var(--hover);
}

.transcript[open] summary {
  margin-bottom: 1.5rem;
}

.transcript section {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line-faint);
}

.transcript h4 {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.transcript h4 time {
  margin-right: 0.75rem;
  color: var(--accent);
}

.transcript p {
  max-width: 44rem;
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .film-grid {
    grid-template-columns: 1fr;
  }

  .chapters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
}

@media (max-width: 760px) {
  .film {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .chapters {
    grid-template-columns: 1fr;
  }

  .transcript section {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* The interview: a second film-style section, set apart by its fiction note. */
.interview {
  border-top: 1px solid var(--line, rgba(229, 221, 206, 0.17));
}
.interview-note {
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--accent, #c3a879);
  background: color-mix(in srgb, var(--accent, #c3a879) 8%, transparent);
  font-size: 0.95em;
}
.transcript .who {
  font-weight: 600;
  margin-right: 0.4em;
}
