@font-face {
  font-display: swap;
  font-family: "Aileron Cover";
  font-style: normal;
  font-weight: 800;
  src: url("/fonts/aileron-heavy.ttf") format("truetype");
}

:root {
  --ink: #efeee9;
  --muted: #aaa9a4;
  --surface: #181818;
  --surface-soft: #202020;
  --paper: #f2f0e8;
  --red: #bd1d22;
  --cover-berry: #c82550;
  --cover-white: #ffffff;
  --line: rgba(239, 238, 233, 0.22);
  --page-ratio: 1.2941176471;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.045), transparent 35%),
    var(--surface);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

.site-header,
footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.17em;
  padding: 28px clamp(22px, 5vw, 76px);
  text-transform: uppercase;
}

.site-header {
  position: relative;
  z-index: 10;
}

.artist-link,
footer a {
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
}

.artist-names {
  align-items: center;
  display: flex;
  gap: 12px;
}

.artist-names > span {
  color: var(--muted);
  font-size: 0.7rem;
}

.project-mark {
  display: flex;
  font-size: 0.7rem;
  gap: 28px;
}

main {
  margin: 0 auto;
  max-width: 1600px;
}

.viewer-section {
  min-height: calc(100vh - 82px);
  padding: 20px clamp(16px, 4vw, 64px) 60px;
}

.viewer-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 22px;
  max-width: 1450px;
}

.eyebrow {
  color: var(--cover-berry);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

h1,
h2 {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.97;
  margin: 0;
}

h1 {
  color: var(--cover-white);
  font-family: "Aileron Cover", Arial, Helvetica, sans-serif;
  font-size: clamp(3.4rem, 7vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.76;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.4rem);
  max-width: 850px;
}

.viewer-note {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 8px;
}

.book-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 1540px;
  min-height: min(72vw, 780px);
  overflow: hidden;
  perspective: 2400px;
  position: relative;
}

.book-stage::after {
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.65), transparent 70%);
  bottom: 1.5%;
  content: "";
  height: 10%;
  left: 13%;
  pointer-events: none;
  position: absolute;
  right: 13%;
}

.book {
  display: flex;
  filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.42));
  justify-content: center;
  position: relative;
  transform-style: preserve-3d;
  transition:
    filter 520ms ease,
    transform 520ms cubic-bezier(0.22, 0.7, 0.2, 1);
  width: min(94vw, 1450px);
  z-index: 2;
}

.book.is-single {
  width: min(49vw, 725px);
}

.book.turn-next {
  filter: drop-shadow(-20px 28px 24px rgba(0, 0, 0, 0.5));
  transform: rotateX(0.8deg) translateX(-0.6%);
}

.book.turn-previous {
  filter: drop-shadow(20px 28px 24px rgba(0, 0, 0, 0.5));
  transform: rotateX(0.8deg) translateX(0.6%);
}

.book.turn-settle {
  animation: book-settle 260ms cubic-bezier(0.2, 0.72, 0.3, 1);
}

.leaf {
  aspect-ratio: var(--page-ratio);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.3), transparent 4%),
    var(--paper);
  overflow: hidden;
  isolation: isolate;
  position: relative;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition:
    filter 500ms cubic-bezier(0.3, 0.04, 0.18, 1),
    transform 500ms cubic-bezier(0.3, 0.04, 0.18, 1);
  width: 50%;
}

.is-single .leaf {
  width: 100%;
}

.leaf.left {
  box-shadow:
    inset -18px 0 28px -26px rgba(0, 0, 0, 0.95),
    inset 0 0 18px rgba(110, 90, 55, 0.06);
  transform-origin: right center;
}

.leaf.right {
  box-shadow:
    inset 18px 0 28px -26px rgba(0, 0, 0, 0.95),
    inset 0 0 18px rgba(110, 90, 55, 0.06);
  transform-origin: left center;
}

.book.turn-next .leaf.right {
  filter: brightness(0.82) drop-shadow(-22px 7px 12px rgba(0, 0, 0, 0.42));
  transform: rotateY(-82deg) skewY(0.35deg);
  z-index: 12;
}

.book.turn-previous .leaf.left {
  filter: brightness(0.82) drop-shadow(22px 7px 12px rgba(0, 0, 0, 0.42));
  transform: rotateY(82deg) skewY(-0.35deg);
  z-index: 12;
}

.book.turn-next .leaf.right::before,
.book.turn-previous .leaf.left::before {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.18),
    rgba(55, 47, 38, 0.25) 52%,
    rgba(255, 255, 255, 0.08)
  );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 20;
}

.leaf img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transform: translateZ(0);
  width: 100%;
}

.leaf.rice .under-image {
  filter: saturate(0.8) contrast(0.9);
  opacity: 0.16;
}

.leaf.rice .main-image {
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.leaf.opaque .main-image {
  opacity: 1;
}

.leaf::after {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(95, 72, 36, 0.055) 0 0.6px, transparent 0.9px),
    radial-gradient(circle at 80% 70%, rgba(95, 72, 36, 0.04) 0 0.5px, transparent 0.8px);
  background-size: 7px 7px, 9px 9px;
  content: "";
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.65;
  pointer-events: none;
  position: absolute;
}

.leaf.acetate {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.28), transparent 20% 72%, rgba(255, 255, 255, 0.12)),
    rgba(235, 239, 239, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.leaf.acetate::after {
  background: linear-gradient(105deg, transparent 0 44%, rgba(255,255,255,0.18) 48%, transparent 53%);
  opacity: 0.5;
}

.layer-stack {
  background: var(--paper);
  height: 100%;
  isolation: isolate;
  position: relative;
  transform: translateZ(0);
  width: 100%;
}

.layer-stack .rice-background,
.layer-stack .acetate-layer {
  inset: 0;
  object-fit: cover;
  position: absolute;
}

.layer-stack .rice-background {
  mix-blend-mode: multiply;
  opacity: 0.88;
}

.layer-stack .acetate-layer {
  filter: drop-shadow(-5px 4px 3px rgba(0, 0, 0, 0.12));
  opacity: 0.97;
  transition: opacity 300ms ease, transform 450ms ease;
}

.layer-stack .layer-one {
  transform: translate(1px, -1px);
}

.layer-stack .layer-two {
  transform: translate(-1px, 1px);
}

.layer-stack.stage-1 .layer-one,
.layer-stack.stage-2 .layer-one {
  opacity: 0;
  transform: rotateY(-18deg) translateX(-22%);
}

.layer-stack.stage-2 .layer-two {
  opacity: 0;
  transform: rotateY(-18deg) translateX(-22%);
}

.binding-shadow {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.25), transparent);
  bottom: 0;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 26px;
  z-index: 8;
}

.page-zone {
  background: transparent;
  border: 0;
  bottom: 0;
  cursor: pointer;
  position: absolute;
  top: 0;
  width: 23%;
  z-index: 6;
}

.page-zone-left {
  left: 0;
}

.page-zone-right {
  right: 0;
}

.viewer-controls {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 14px auto 0;
}

.control-button,
.text-button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.control-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  height: 40px;
  width: 40px;
}

.control-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.control-button:not(:disabled):hover,
.control-button:not(:disabled):focus-visible {
  border-color: var(--cover-berry);
  color: var(--cover-berry);
}

.text-button {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  padding: 10px 0;
  text-transform: uppercase;
}

.text-button:hover,
.artist-link:hover,
footer a:hover {
  color: var(--cover-berry);
}

.control-divider {
  background: var(--line);
  height: 28px;
  width: 1px;
}

.page-status {
  color: var(--cover-berry);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
  min-width: 118px;
  text-align: center;
}

.spreads-section,
.project-section,
.process-section,
.credits-section {
  border-top: 1px solid var(--line);
  margin: 0 clamp(22px, 5vw, 76px);
  padding: clamp(46px, 7vw, 100px) 0;
}

.section-rule {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 34px;
}

.section-rule h2 {
  font-size: clamp(1.8rem, 3vw, 3.6rem);
  text-transform: uppercase;
}

.spreads-grid {
  display: grid;
  gap: 28px 18px;
  grid-template-columns: repeat(2, 1fr);
}

.spread-thumb {
  margin: 0;
}

.spread-thumb img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 50%;
}

.spread-thumb-pages {
  align-items: center;
  aspect-ratio: 22 / 8.5;
  background: #101010;
  display: flex;
  justify-content: center;
  width: 100%;
}

.spread-thumb-single .spread-thumb-pages img {
  width: 50%;
}

.spread-thumb figcaption {
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  margin-top: 8px;
  text-transform: uppercase;
}

.project-section {
  display: grid;
  gap: clamp(44px, 8vw, 150px);
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.6fr);
}

.project-meta {
  display: grid;
  gap: 28px;
  grid-auto-rows: min-content;
}

.project-meta p,
.credits-section p {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.project-copy > p:not(.eyebrow) {
  font-size: clamp(1.05rem, 1.5vw, 1.38rem);
  line-height: 1.48;
  margin: 32px 0 0;
  max-width: 840px;
}

.process-section {
  max-width: 1380px;
  scroll-margin-top: 32px;
}

.process-heading {
  align-items: end;
  display: grid;
  gap: clamp(30px, 7vw, 120px);
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  margin-bottom: clamp(48px, 7vw, 92px);
}

.process-heading h2 {
  color: var(--cover-white);
  font-family: "Aileron Cover", Arial, Helvetica, sans-serif;
  font-size: clamp(2.8rem, 5.8vw, 6.2rem);
  letter-spacing: -0.055em;
  line-height: 0.82;
  max-width: 850px;
  text-transform: uppercase;
}

.process-heading h2::before {
  background: var(--cover-berry);
  content: "";
  display: block;
  height: 7px;
  margin-bottom: 20px;
  width: clamp(72px, 9vw, 138px);
}

.process-heading p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 4px;
  max-width: 440px;
}

.process-grid {
  display: grid;
  gap: clamp(34px, 4vw, 58px) clamp(18px, 2.5vw, 34px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.process-group {
  margin-top: clamp(64px, 9vw, 120px);
}

.process-group-label {
  border-top: 1px solid var(--cover-berry);
  color: var(--cover-berry);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 24px;
  padding-top: 11px;
  text-transform: uppercase;
}

.process-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.process-grid-three .process-slot img,
.process-grid-four .process-slot img {
  aspect-ratio: 1;
  object-fit: cover;
}

.process-grid-compact-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-inline: auto;
  max-width: 1080px;
  width: 100%;
}

.process-grid-four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-inline: auto;
  max-width: 1120px;
  width: 100%;
}

.process-grid-four .process-slot-panorama {
  grid-column: span 2;
}

.process-grid-four .process-slot-panorama img {
  aspect-ratio: 2 / 1;
}

.process-grid-four .process-slot {
  overflow: hidden;
}

.process-grid-four .process-slot > img {
  transform: scale(1.012);
}

.process-slot {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
}

.process-slot-wide {
  grid-column: 1 / -1;
}

.process-slot img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.process-slot-natural img {
  aspect-ratio: auto;
  background: #101010;
  max-height: 620px;
  object-fit: contain;
}

.process-image-frame {
  aspect-ratio: 4 / 3;
  background: #101010;
  overflow: hidden;
  position: relative;
}

.process-image-frame img {
  height: 100%;
  max-height: none;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.process-scanner .process-image-frame img {
  background: #181818;
  height: 100%;
  left: 0;
  object-fit: contain;
  object-position: center;
  top: 0;
  width: 100%;
}

.process-binding .process-image-frame img {
  height: 155%;
  left: -27.5%;
  object-position: 60% 18%;
  top: -13%;
  width: 155%;
}

.process-physical-archive .process-image-frame img {
  height: 104%;
  left: -2%;
  object-position: center 52%;
  top: -2%;
  width: 104%;
}

.process-display-frame {
  aspect-ratio: 2.25 / 1;
  background: #101010;
  margin-inline: auto;
  max-width: 920px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.process-display-frame img {
  height: 112%;
  left: -1%;
  max-height: none;
  object-fit: cover;
  object-position: center 64%;
  position: absolute;
  top: -10%;
  width: 102%;
}

.process-holder-frame {
  aspect-ratio: 1;
  background: #101010;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.process-holder-frame img {
  height: 112%;
  left: 50%;
  max-height: none;
  object-fit: contain;
  position: absolute;
  top: -6%;
  transform: translateX(-50%);
  width: auto;
}

.process-video {
  margin-inline: auto;
  max-width: 980px;
  width: min(100%, 980px);
}

.process-video-frame {
  aspect-ratio: 16 / 9;
  background: #101010;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.process-slot video {
  display: block;
  height: 106%;
  left: -3%;
  object-fit: cover;
  position: absolute;
  top: -3%;
  width: 106%;
}

.process-slot figcaption {
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.35;
  margin: 0;
  min-height: 3.2em;
  order: -1;
  padding: 10px 0 12px;
  text-transform: uppercase;
}

.process-book {
  border-top: 7px solid var(--cover-berry);
  margin-top: clamp(76px, 11vw, 160px);
  padding-top: clamp(46px, 7vw, 90px);
}

.process-book-heading {
  margin-bottom: clamp(42px, 6vw, 76px);
}

.process-book-heading h3 {
  font-family: "Aileron Cover", Arial, Helvetica, sans-serif;
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  letter-spacing: -0.055em;
  line-height: 0.84;
  margin: 0;
  text-transform: uppercase;
}

.process-book-cover {
  margin: 0 auto clamp(60px, 8vw, 110px);
  max-width: 485px;
  width: min(48%, 485px);
}

.process-book-cover img,
.process-book-pages img {
  display: block;
  height: auto;
  width: 100%;
}

.process-book-label {
  border-top: 1px solid var(--cover-berry);
  color: var(--cover-berry);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: clamp(48px, 7vw, 82px) 0 24px;
  padding-top: 11px;
  text-transform: uppercase;
  width: 100%;
}

.process-book-pages {
  align-items: start;
  display: grid;
  gap: clamp(22px, 3vw, 42px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-inline: auto;
  max-width: 1320px;
  width: 100%;
}

.process-book-pages-three {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1120px;
}

.process-book-pages-three img:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 21px);
}

.process-book-pages img {
  background: #111;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.credits-section {
  display: flex;
  gap: 42px;
  justify-content: space-between;
  padding-bottom: 54px;
  padding-top: 30px;
}

footer {
  background: #101010;
  border-top: 1px solid var(--line);
  font-size: 0.62rem;
}

footer p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

@keyframes book-settle {
  0% {
    filter: drop-shadow(0 30px 28px rgba(0, 0, 0, 0.5));
    transform: translateY(-3px) scale(1.002);
  }
  55% {
    transform: translateY(1px) scale(0.999);
  }
  100% {
    filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.42));
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .site-header,
  footer {
    padding: 22px 18px;
  }

  .project-mark span:first-child {
    display: none;
  }

  .artist-names {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .artist-names > span {
    display: none;
  }

  .viewer-section {
    min-height: auto;
    padding: 30px 10px 52px;
  }

  .viewer-heading {
    align-items: start;
    display: block;
    padding: 0 10px;
  }

  h1 {
    font-size: clamp(3.1rem, 16vw, 5.6rem);
    line-height: 0.78;
  }

  .viewer-note {
    margin-top: 12px;
  }

  .book-stage {
    min-height: min(84vw, 500px);
  }

  .book {
    width: 96vw;
  }

  .book.is-single {
    width: min(90vw, 520px);
  }

  .viewer-controls {
    gap: 10px;
    flex-wrap: wrap;
  }

  .control-divider {
    display: none;
  }

  .spreads-grid,
  .project-section,
  .process-heading,
  .process-grid,
  .process-grid-three,
  .process-grid-compact-pair,
  .process-grid-four,
  .process-book-pages,
  .process-book-pages-three {
    grid-template-columns: 1fr;
  }

  .process-grid-compact-pair {
    max-width: none;
  }

  .process-grid-four .process-slot-panorama {
    grid-column: auto;
  }

  .process-grid-four .process-slot-panorama img {
    aspect-ratio: 1;
  }

  .process-book-cover {
    max-width: 320px;
    width: 76%;
  }

  .process-book-pages-three img:last-child {
    grid-column: auto;
    width: 100%;
  }

  .process-heading {
    align-items: start;
    gap: 22px;
  }

  .process-slot-wide {
    grid-column: auto;
  }

  .process-slot-wide img {
    aspect-ratio: 4 / 3;
  }

  .project-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .credits-section,
  footer {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
}

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

  .book,
  .leaf,
  .layer-stack .acetate-layer {
    transition: none;
  }

  .book.turn-settle {
    animation: none;
  }
}
