@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&display=swap');

:root {
  --paper: #eeeae2;
  --ink: #171717;
  --red: #d0212b;
  --muted: #6d6a65;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  font-family: Arial,Helvetica,sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

.library-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px clamp(24px,5vw,76px);
  border-bottom: 1px solid rgba(17,17,17,.25);
  gap: 20px;
}

.library-brand {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.library-top nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.library-top nav a:hover {
  text-decoration: underline;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .15em;
  font-weight: 800;
  text-transform: uppercase;
}

.library-hero {
  max-width: 1460px;
  margin: 0 auto;
  padding: clamp(64px,9vw,135px) 6% 35px;
}

.library-hero h1 {
  font-size: clamp(68px,12vw,185px);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.105em;
  margin: 20px 0 45px;
  max-width: 1160px;
}

.library-hero h1 .square {
  color: var(--red);
  font-size: .32em;
  letter-spacing: -.15em;
  vertical-align: middle;
  margin-left: 8px;
}

.library-lede {
  max-width: 630px;
  font-size: clamp(17px,1.8vw,24px);
  line-height: 1.46;
  margin: 0;
  color: #403e3a;
}

.library-subline {
  padding: 30px 0 0;
  border-bottom: 1px solid #99918a;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 700;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: clamp(19px,3vw,46px);
  max-width: 1460px;
  margin: 0 auto;
  padding: 52px 6% 155px;
}

.book-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-card a {
  display: block;
  outline-offset: 6px;
}

.book-card .photo {
  aspect-ratio: 4/5;
  background: #ddd5c9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12%;
  box-shadow: 0 10px 22px #0000000d;
  transition: transform .26s ease,box-shadow .26s ease;
}

.book-card:nth-child(2) .photo {
  background: #d8d7d2;
}

.book-card:nth-child(3) .photo {
  background: #e2d7cd;
}

.book-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 7px 7px #0003);
}

.book-card a:hover .photo,.book-card a:focus-visible .photo {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 18px 24px #00000017;
}

.book-card .overline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  margin-top: 12px;
  color: #696661;
}

.book-card h2 {
  font-size: clamp(28px,3vw,45px);
  letter-spacing: -.07em;
  line-height: 1.03;
  margin: 3px 0;
  font-weight: 900;
}

.book-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #56524c;
  margin: 0;
  max-width: 330px;
}

.library-foot {
  background: #161616;
  color: #eeeae2;
  padding: 42px 6%;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  font-size: 13px;
}

.library-foot a {
  border-bottom: 1px solid #777;
  padding-bottom: 5px;
}

.detail-intro {
  max-width: 1460px;
  padding: clamp(52px,7vw,110px) 6% 25px;
  margin: 0 auto;
}

.detail-intro h1 {
  font-size: clamp(62px,9vw,138px);
  letter-spacing: -.095em;
  line-height: .9;
  font-weight: 900;
  margin: 16px 0 26px;
  max-width: 1050px;
}

.detail-intro h1 span {
  color: var(--red);
}

.detail-intro p {
  max-width: 680px;
  font-size: clamp(17px,1.75vw,22px);
  line-height: 1.5;
  color: #514d48;
  margin: 0 0 24px;
}

.detail-meta {
  margin-top: 50px;
  padding: 15px 0;
  border-top: 1px solid #9d9791;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 800;
}

.hero-photo {
  padding: 0 6%;
  margin: 0 auto;
  max-width: 1460px;
}

.hero-photo img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  background: #e4ded4;
  box-shadow: 0 16px 50px #0000000b;
}

.hero-photo figcaption {
  padding: 13px 0 0;
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 700;
  color: #666;
}

.gallery-heading {
  max-width: 1460px;
  margin: 105px auto 0;
  padding: 0 6%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.gallery-heading h2 {
  font-size: clamp(39px,5vw,75px);
  font-weight: 900;
  letter-spacing: -.08em;
  margin: 0;
}

.gallery-heading span {
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 700;
}

.archive-gallery {
  max-width: 1460px;
  margin: 0 auto;
  padding: 40px 6% 140px;
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: clamp(15px,2vw,30px);
  align-items: start;
}

.archive-gallery figure {
  grid-column: span 6;
  margin: 0;
}

.archive-gallery figure:nth-child(5n+2),.archive-gallery figure:nth-child(5n+3) {
  grid-column: span 5;
}

.archive-gallery figure:nth-child(5n+4) {
  grid-column: span 7;
}

.archive-gallery figure:nth-child(5n+5) {
  grid-column: span 12;
}

.archive-gallery figure img {
  width: 100%;
  height: auto;
  max-height: 710px;
  object-fit: contain;
  background: #e2ddd4;
  box-shadow: 0 10px 26px #00000010;
}

.archive-gallery figcaption {
  padding-top: 10px;
  font-size: 11px;
  line-height: 1.35;
  color: #6c6862;
}

@media (max-width:820px) {
  .book-grid {
    grid-template-columns: 1fr 1fr;
  }
  .book-card:nth-child(3) {
    max-width: 450px;
  }
  .book-card h2 {
    font-size: 32px;
  }
  .archive-gallery figure,.archive-gallery figure:nth-child(n) {
    grid-column: span 6;
  }
}

@media (max-width:570px) {
  .library-top nav {
    gap: 12px;
  }
  .library-top {
    padding: 21px 5%;
  }
  .library-top nav a {
    font-size: 11px;
  }
  .library-hero {
    padding: 70px 6% 24px;
  }
  .library-hero h1 {
    font-size: clamp(64px,17vw,115px);
  }
  .book-grid {
    grid-template-columns: 1fr;
    padding-bottom: 90px;
  }
  .book-card {
    max-width: 520px;
  }
  .book-card .photo {
    height: 470px;
    aspect-ratio: auto;
  }
  .library-foot {
    flex-direction: column;
    align-items: start;
  }
  .detail-meta {
    flex-direction: column;
    gap: 8px;
  }
  .archive-gallery figure,.archive-gallery figure:nth-child(n) {
    grid-column: span 12;
  }
  .archive-gallery {
    padding-bottom: 85px;
  }
  .gallery-heading {
    margin-top: 70px;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  .book-card .photo {
    transition: none;
  }
}

.detail-intro h1 span {
  display: inline-block;
  color: var(--red);
  font-size: .29em;
  vertical-align: middle;
  margin-left: 12px;
  line-height: 1;
}

.book-grid:has(> .book-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2,minmax(0,1fr));
  max-width: 1180px;
}

.book-grid:has(> .book-card:nth-child(2):last-child) .book-card .photo {
  aspect-ratio: 5/4;
  padding: 9%;
}

.fedora-title {
  padding-bottom: 50px;
}

.fedora-title h1 {
  max-width: 100%;
}

.fedora-section-label {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 32px;
  margin: 0 auto 26px;
  max-width: 1290px;
}

.fedora-section-label>span {
  font-size: 11px;
  letter-spacing: .15em;
  font-weight: 800;
  padding-top: 13px;
  white-space: nowrap;
}

.fedora-section-label h2 {
  font-size: clamp(38px,6vw,82px);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: 1;
  margin: 0 0 10px;
  text-align: right;
}

.fedora-section-label h2 span {
  color: var(--red);
  font-size: .27em;
  vertical-align: middle;
  margin-left: 10px;
}

.fedora-mood,.fedora-concept,.fedora-film,.fedora-closeups {
  padding: clamp(50px,8vw,105px) 6%;
}

.fedora-mood {
  padding-top: 25px;
}

.fedora-mood-hero {
  max-width: 1290px;
  margin: 0 auto;
}

.fedora-mood-hero img {
  width: 100%;
  max-height: 830px;
  object-fit: contain;
  background: #ddd9d2;
  box-shadow: 0 15px 40px #00000017;
}

.fedora-mood-hero figcaption {
  font-size: 11px;
  letter-spacing: .04em;
  margin-top: 15px;
  color: #66615c;
}

.fedora-concept {
  background: #e1ded7;
  border-top: 1px solid #d0ccc5;
  border-bottom: 1px solid #d0ccc5;
}

.concept-copy {
  max-width: 750px;
  margin: 36px max(0px,calc((100% - 1288px)/2)) 0 auto;
  padding-left: 3%;
  font-size: clamp(19px,2.2vw,27px);
  line-height: 1.55;
  letter-spacing: -.02em;
  color: #2d2d2b;
}

.concept-copy p {
  margin: 0 0 24px;
}

.concept-copy p:last-child {
  margin-bottom: 0;
}

.fedora-film {
  background: #191919;
  color: #f0eee8;
}

.fedora-film .fedora-section-label {
  color: #f0eee8;
}

.film-stage {
  max-width: 1290px;
  margin: 30px auto 0;
  min-height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #101010;
  padding: clamp(20px,4vw,65px);
}

.fedora-video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 76vh;
  aspect-ratio: 9/16;
  background: #0d0d0d;
  box-shadow: 0 12px 30px #0009;
}

.film-caption {
  font-size: 12px;
  line-height: 1.5;
  color: #b8b8b8;
  max-width: 1290px;
  margin: 19px auto 0;
}

.fedora-closeups {
  padding-bottom: 30px;
}

.fedora-details {
  padding: 28px 0 70px;
}

.fedora-details figure img {
  background: #d3cfc8;
  max-height: 740px;
}

.fedora-details figcaption {
  font-size: 11px;
  letter-spacing: .05em;
}

.footer-icon-link svg {
  width: 100%;
  height: 100%;
}

@media (max-width:820px) {
  .book-grid:has(> .book-card:nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:570px) {
  .book-grid:has(> .book-card:nth-child(2):last-child) {
    grid-template-columns: 1fr;
  }
  .fedora-section-label {
    display: block;
  }
  .fedora-section-label h2 {
    text-align: left;
    margin-top: 15px;
  }
  .concept-copy {
    padding-left: 0;
  }
  .fedora-film .fedora-section-label h2 {
    font-size: clamp(35px,10vw,56px);
  }
  .film-stage {
    padding: 14px;
  }
  .fedora-video {
    max-height: 68vh;
  }
}

body {
  background: #f0eee9;
  color: #171717;
}

.site-header {
  min-height: 100px;
}

.library-hero h1 .square,.detail-intro h1 .title-square,.fedora-section-label h2 .title-square {
  display: inline-block !important;
  width: .115em !important;
  height: .115em !important;
  background: #d0212b !important;
  vertical-align: baseline !important;
  line-height: 0 !important;
  margin: 0 0 .025em .09em !important;
  transform: none !important;
  border-radius: 0 !important;
  font-size: inherit !important;
}

.library-hero h1 .square {
  width: .12em !important;
  height: .12em !important;
}

.library-hero {
  padding-top: clamp(85px,10vw,150px);
  padding-bottom: 25px;
}

.library-hero h1 {
  line-height: .89 !important;
  margin-bottom: 35px;
}

.book-grid,.book-grid:has(> .book-card:nth-child(2):last-child) {
  grid-template-columns: repeat(3,minmax(0,1fr));
  max-width: 1500px;
  gap: clamp(22px,3.6vw,65px);
  padding: 45px 6% 150px;
}

.book-card .photo,.book-card:nth-child(2) .photo,.book-card:nth-child(3) .photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  aspect-ratio: auto !important;
  height: clamp(200px,26vw,430px);
  transition: transform .2s ease;
  transform-origin: center bottom;
}

.book-card .photo img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  filter: drop-shadow(4px 13px 12px #0003);
}

.book-card a:hover .photo,.book-card a:focus-visible .photo {
  transform: translateY(-7px) rotate(-.7deg);
  box-shadow: none !important;
}

.book-card .overline {
  margin-top: 23px;
}

.book-card h2 {
  font-size: clamp(24px,2.45vw,36px);
}

.book-card p {
  max-width: 400px;
}

.fedora-section-label h2 {
  text-align: left;
}

.fedora-section-label {
  display: block;
}

.fedora-section-label>span {
  display: block;
  padding: 0 0 12px;
}

.fedora-section-label h2 {
  font-size: clamp(36px,6.3vw,76px);
  line-height: .95;
}

.fedora-concept {
  background: #e7e5df;
  border: 0;
}

.concept-copy {
  margin: 24px auto 0;
  max-width: 780px;
  padding: 0;
}

.fedora-mood-hero img {
  background: transparent;
  box-shadow: none;
}

.film-stage {
  background: #111;
}

.fedora-film {
  background: #181818;
}

.library-foot {
  padding: 33px 6%;
  background: #161616;
}

.project-end-controls {
  display: flex;
  justify-content: flex-end;
  padding: 30px 6%;
  background: #f0eee9;
}

.fedora-closeups {
  padding-bottom: 0;
}

@media (max-width:850px) {
  .book-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 70px 30px;
  }
  .book-card .photo {
    height: 370px;
  }
}

@media (max-width:600px) {
  .book-grid {
    grid-template-columns: 1fr !important;
    padding-bottom: 85px;
  }
  .book-card .photo {
    height: 350px;
  }
  .book-card {
    max-width: 460px;
  }
  .site-header nav a {
    font-size: 14px !important;
  }
  .fedora-section-label h2 {
    text-align: left;
  }
}

.book-grid {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  max-width: 1180px !important;
  gap: clamp(25px,6vw,110px) !important;
}

.book-grid .book-card .photo {
  background: transparent !important;
  box-shadow: none !important;
}

.book-card .overline {
  display: block !important;
}

.book-card .overline span {
  display: none !important;
}

.detail-meta {
  display: none !important;
}

.fedora-section-label>span {
  display: none !important;
}

.fedora-section-label h2 {
  margin-bottom: 0 !important;
}

.fedora-concept {
  border: 0 !important;
}

.library-foot {
  display: none !important;
}

.project-end-controls {
  background: transparent !important;
  min-height: 105px !important;
  justify-content: flex-end !important;
}

@media (max-width:600px) {
  .book-grid {
    grid-template-columns: 1fr !important;
    gap: 75px !important;
  }
}

html {
  scroll-behavior: auto !important;
}

html.return-awaiting-position body {
  visibility: hidden;
}

.library-hero {
  padding-bottom: 0 !important;
}

.library-projects {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 6% 150px;
}

.library-projects-heading {
  margin: 0 0 35px;
}

.library-label {
  display: block;
  font: 800 10px/1.4 Arial,Helvetica,sans-serif;
  letter-spacing: .15em;
  margin: 0 0 17px;
}

.library-projects-heading h2 {
  font-size: clamp(50px,7vw,105px);
  line-height: .92;
  letter-spacing: -.09em;
  font-weight: 900;
  margin: 0;
}

.library-square {
  display: inline-block;
  width: .115em;
  height: .115em;
  background: #d0212b;
  vertical-align: baseline;
  margin: 0 0 .04em .12em;
}

.project-library-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: clamp(43px,5vw,86px) clamp(24px,3.5vw,65px);
  align-items: start;
}

.project-library-card {
  min-width: 0;
  max-width: 480px;
}

.project-library-card>a {
  display: block;
  color: #171717;
  text-decoration: none;
}

.project-library-picture {
  height: clamp(185px,27vw,350px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.project-library-picture img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(3px 10px 11px #0002);
  transition: transform .22s ease;
}

.project-library-card a:hover .project-library-picture img,.project-library-card a:focus-visible .project-library-picture img {
  transform: translateY(-7px) rotate(-.7deg);
}

.project-library-kind {
  display: block;
  font: 800 10px/1.5 Arial,Helvetica,sans-serif;
  letter-spacing: .13em;
  color: #77716b;
  margin-top: 20px;
}

.project-library-card h3 {
  font: 900 clamp(25px,2.65vw,39px)/1.04 Arial,Helvetica,sans-serif;
  letter-spacing: -.065em;
  margin: 6px 0 0;
}

.fedora-video {
  width: min(100%,1130px) !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 16/9 !important;
  box-shadow: 0 12px 30px #0007;
}

.film-stage {
  padding: clamp(12px,3vw,42px) !important;
}

@media (max-width:850px) {
  .project-library-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .library-projects {
    padding-bottom: 100px;
  }
}

@media (max-width:600px) {
  .project-library-grid {
    grid-template-columns: 1fr;
    row-gap: 64px;
  }
  .project-library-picture {
    height: 330px;
  }
  .library-projects {
    padding-bottom: 82px;
  }
  .project-library-card {
    max-width: 470px;
  }
}

/* ==========================================================
   Fedora in 3D
   ========================================================== */
.fedora-3d {
  position: relative;
  height: 1000vh;
  background: #e9e5de;
}

.fedora-3d-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.fedora-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.fedora-3d-hud {
  position: absolute;
  top: clamp(96px,13vh,120px);
  left: clamp(20px,5vw,80px);
  right: clamp(20px,5vw,80px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  pointer-events: none;
  font: 700 11px/1.3 Arial,Helvetica,sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #171717;
}

.fedora-3d-hud h2 {
  margin: 0;
  font: 900 clamp(28px,3.4vw,52px)/1 Arial,Helvetica,sans-serif;
  letter-spacing: -.06em;
  text-transform: none;
}

.fedora-3d-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  margin: 0;
  text-align: center;
  pointer-events: none;
  font: 700 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #77726b;
}

.fedora-3d-fallback {
  display: none;
}

.fedora-3d.is-unsupported {
  height: auto;
}

.fedora-3d.is-unsupported .fedora-3d-pin {
  position: static;
  height: auto;
  padding: 80px 8%;
}

.fedora-3d.is-unsupported canvas,
.fedora-3d.is-unsupported .fedora-3d-hint {
  display: none;
}

.fedora-3d.is-unsupported .fedora-3d-fallback {
  display: block;
}

@media (max-width:760px) {
  .fedora-3d { height: 800vh; }
  .fedora-3d-hint { font-size: 9px; padding: 0 14%; line-height: 1.5; }
}

/* one red square, the same everywhere: on the baseline, a small gap after the last letter */
html body .square, html body .library-square, html body .title-square {
  display: inline-block !important;
  width: .13em !important;
  height: .13em !important;
  min-width: 0 !important;
  margin: 0 0 0 .1em !important;
  padding: 0 !important;
  vertical-align: baseline !important;
  position: static !important;
  transform: none !important;
  translate: none !important;
  background: #D0212B !important;
  border: 0 !important;
}

/* Phone: one line menu */
@media (max-width:760px) {
  html body .site-header {
    align-items: center;
    min-height: 0;
  }
  html body .site-header nav {
    flex-wrap: nowrap;
    max-width: none;
    gap: 0 clamp(14px,4.6vw,22px);
    align-items: center;
  }
  html body .site-header nav a {
    font-size: 10px !important;
    letter-spacing: .1em;
    white-space: nowrap;
    padding: 3px 0;
  }
  .site-header .nav-x { display: none; }
}
