:root {
  --ink: #f4efe6;
  --paper: #090807;
  --muted: rgba(244, 239, 230, 0.64);
  --line: rgba(244, 239, 230, 0.18);
}

* {
  box-sizing: border-box;
  font-stretch: inherit;
  font-width: inherit;
  font-variation-settings: inherit;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 32%),
    var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-stretch: 150%;
  font-width: 150%;
  font-variation-settings: "wdth" 150;
  letter-spacing: 0;
}

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

.project-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 7, 0.78);
  backdrop-filter: blur(16px);
  text-transform: uppercase;
}

.wordmark {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
}

.project-topbar nav {
  display: flex;
  gap: clamp(16px, 2vw, 30px);
  color: var(--muted);
  font-size: 11px;
}

.project-shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.project-intro {
  margin-bottom: 26px;
  text-transform: uppercase;
}

.project-intro p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.project-intro h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(42px, 8.6vw, 118px);
  line-height: 0.86;
}

.flipbook {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  perspective: 1800px;
}

.book-page {
  position: relative;
  margin: 0;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.65, 0, 0.35, 1), opacity 560ms ease;
}

.book-page.is-forward {
  transform: rotateY(-12deg) translateX(-12px);
  opacity: 0.42;
}

.book-page.is-back {
  transform: rotateY(12deg) translateX(12px);
  opacity: 0.42;
}

.book-page img {
  display: block;
  width: 100%;
  max-height: calc(100svh - 245px);
  object-fit: contain;
  border: 1px solid var(--line);
  background: #111;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.56);
}

.book-page figcaption {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 4px 7px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(244, 239, 230, 0.72);
  font-size: 10px;
  text-transform: uppercase;
}

.book-button,
.book-controls button {
  border: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}

.book-button {
  height: min(58vh, 520px);
}

.book-button:hover,
.book-controls button:hover {
  background: rgba(244, 239, 230, 0.13);
}

.book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 18px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.book-controls button {
  padding: 10px 14px;
}

.page-strip {
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 4px 0 10px;
  overflow-x: auto;
}

.page-strip button {
  flex: 0 0 54px;
  height: 38px;
  border: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.04);
  color: rgba(244, 239, 230, 0.6);
  font-size: 10px;
  cursor: pointer;
}

.page-strip button.is-active {
  border-color: rgba(244, 239, 230, 0.82);
  color: var(--ink);
}

@media (max-width: 760px) {
  .project-topbar {
    align-items: flex-start;
    padding: 18px;
  }

  .project-topbar nav {
    display: grid;
    gap: 8px;
    text-align: right;
  }

  .project-shell {
    width: min(100vw - 18px, 760px);
    padding-top: 28px;
  }

  .flipbook {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .book-button {
    display: none;
  }

  .book-page img {
    max-height: calc(100svh - 260px);
  }
}
