:root {
  --paper: #ffffff;
  --ink: #111111;
  --body: #4a4a4a;
  --caption: #8a8a8a;
  --muted: #9a9a9a;
  --line: #e6e6e6;
  --display: "Geist Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Geist Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-snap-type: y proximity;
}

html,
body,
#root {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 380;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: none;
}

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

a {
  color: inherit;
}

figure {
  margin: 0;
}

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

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 16px;
  top: -48px;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 0.8rem;
}

.skip:focus {
  top: 12px;
}

.seo-identity {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 22px 28px 18px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
}

.header nav {
  margin-left: auto;
  min-width: 0;
}

.brand {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 0.84rem;
  letter-spacing: 0;
  text-decoration: none;
  line-height: 1;
  color: var(--ink);
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.mail-inline {
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0;
}

.mail-inline:hover,
.mail-inline:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mail {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1;
  max-width: calc(100vw - 160px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail:hover,
.mail:focus-visible {
  border-color: var(--ink);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color 240ms ease;
}

.nav a.is-active {
  color: var(--ink);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: draw 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thesis {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14vh 7vw 10vh;
  scroll-snap-align: start;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.eyebrow::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin-top: 14px;
  background: var(--ink);
  transform-origin: left;
  animation: draw 900ms 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.72fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: end;
  will-change: transform, opacity;
}

.thesis h1,
.detail h1,
.word {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.thesis h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.15;
  max-width: 28ch;
  animation: rise 1000ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.lede {
  margin: 0;
  max-width: 34ch;
  color: var(--body);
  font-size: 1.08rem;
  line-height: 1.6;
  font-weight: 380;
  animation: rise 1000ms 140ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cue {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  animation: rise 1000ms 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cue i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--ink), transparent);
  transform-origin: top;
  animation: pulse 2.4s ease-in-out infinite;
}

.cue:hover {
  color: var(--ink);
}

.reel {
  position: relative;
  height: calc(100dvh * 6);
}

.beats {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.beats span {
  flex: 1;
  scroll-snap-align: start;
}

.sticky {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.stage {
  width: min(1180px, calc(100% - 72px));
  height: min(62vh, 620px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px) minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 36px);
  align-items: center;
}

.side {
  position: relative;
  height: 100%;
  min-width: 0;
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  will-change: transform, opacity;
}

.kicker {
  margin: 0;
  align-self: end;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--caption);
}

.frame {
  width: min(100%, 380px);
  aspect-ratio: 5 / 4;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  background: var(--wash, #f6f6f6);
  border: 1px solid var(--line);
}

.frame::after {
  content: none;
}

.frame.has-image::after {
  display: none;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.logo {
  width: min(100%, 380px);
  height: auto;
  display: block;
}

.caption {
  margin: 0;
  align-self: start;
  max-width: 30ch;
  color: var(--caption);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 380;
}

.mid {
  position: relative;
  height: 100%;
  width: 100%;
  min-width: 0;
  container-type: inline-size;
}

.wheel {
  height: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 22%,
    #000 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 22%,
    #000 78%,
    transparent 100%
  );
}

.track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  will-change: transform;
}

.word {
  margin: 0;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.15rem, 3.2vw, 1.85rem);
  font-size: clamp(1.15rem, 9.5cqi, 2rem);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.dock {
  position: relative;
  height: 44px;
  width: min(1180px, calc(100% - 72px));
}

.more {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 2px 2px;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
  will-change: opacity;
}

.more .arrow {
  display: inline-block;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.more:hover .arrow,
.more:focus-visible .arrow {
  transform: translateX(5px);
}

.rail {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 132px;
  background: var(--line);
}

.rail span {
  position: absolute;
  left: -2px;
  top: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.detail {
  padding: 20vh 0 12vh;
}

.copy {
  width: min(680px, calc(100% - 12vw));
  margin: 0 auto;
}

.detail h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.05;
  animation: rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dek {
  margin: 22px 0 0;
  max-width: 28ch;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--body);
  animation: rise 900ms 90ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.prose {
  margin-top: 28px;
  animation: rise 900ms 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.prose p {
  margin: 0 0 14px;
  max-width: 46ch;
  color: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
}

.quote-box {
  margin: 36px 0;
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  background: #fafafa;
  animation: rise 900ms 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.quote-box p {
  margin: 0 0 14px;
  max-width: none;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.7;
}

.quote-box p:last-of-type {
  margin-bottom: 18px;
}

.quote-box cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}

.thesis-box .thesis-line {
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.thesis-box .out-link {
  margin: 0;
  color: var(--body);
  font-size: 0.92rem;
}

.out-link {
  margin-top: 22px;
}

.out-link a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plates {
  width: min(1080px, calc(100% - 10vw));
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  animation: rise 900ms 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.plates .frame {
  width: 100%;
  border-radius: 0;
}

.plate-caption {
  margin: 10px 0 0;
  text-align: center;
  color: var(--caption);
  font-size: 0.88rem;
}

.plate {
  min-width: 0;
}

.thread-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  animation: rise 900ms 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thread-jump a {
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 220ms ease;
}

.thread-jump a:hover,
.thread-jump a:focus-visible {
  color: var(--ink);
}

.threads {
  width: min(680px, calc(100% - 12vw));
  margin: 64px auto 0;
  display: flex;
  flex-direction: column;
}

.thread {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
  animation: rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thread:nth-child(1) { animation-delay: 120ms; }
.thread:nth-child(2) { animation-delay: 180ms; }
.thread:nth-child(3) { animation-delay: 240ms; }
.thread:nth-child(4) { animation-delay: 300ms; }

.thread-index {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0;
  color: var(--muted);
}

.thread h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.thread .prose {
  margin-top: 0;
  animation: none;
}

.next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.next em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.next strong {
  font-family: var(--display);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  letter-spacing: 0;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.next .arrow {
  display: inline-block;
  font-style: normal;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.next:hover .arrow,
.next:focus-visible .arrow {
  transform: translateX(6px);
}

.missing {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20vh 8vw;
  text-align: center;
}

.missing h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  margin: 0 0 16px;
}

.missing a {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.75rem;
  text-underline-offset: 4px;
}

.reel-static {
  display: none;
  padding: 8vh 8vw 16vh;
  gap: 64px;
}

.reel-static article {
  display: grid;
  gap: 10px;
  max-width: 640px;
  scroll-snap-align: start;
}

.reel-static .more {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: fit-content;
  margin-top: 8px;
}

.reel-static h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.35;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes sheen {
  0%,
  100% {
    transform: translateX(-8%);
  }
  50% {
    transform: translateX(8%);
  }
}

@media (max-width: 980px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px 18px 12px;
  }

  .header nav {
    width: 100%;
    margin-left: 0;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .nav a {
    font-size: 0.52rem;
    letter-spacing: 0;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .thesis {
    padding: 18vh 22px 12vh;
  }

  .thesis-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
  }

  .thesis h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .stage {
    width: min(520px, calc(100% - 36px));
    height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mid {
    order: -1;
    width: 100%;
    height: 26dvh;
    min-height: 168px;
    min-width: 0;
  }

  .word {
    height: 64px;
    font-size: clamp(1.15rem, 6.4vw, 1.55rem);
  }

  .side-left {
    height: 250px;
  }

  .side-right {
    display: none;
  }

  .frame {
    width: min(72vw, 300px);
    aspect-ratio: 16 / 10;
  }

  .frame.has-image {
    aspect-ratio: 5 / 4;
  }

  .dock {
    width: min(520px, calc(100% - 36px));
  }

  .rail {
    right: 10px;
    height: 96px;
  }

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

  .sticky {
    padding-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }

  .reel {
    display: none;
  }

  .reel-static {
    display: grid;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.home-float {
  position: fixed;
  top: 22px;
  left: 28px;
  z-index: 20;
}

.chip {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 30;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1;
}

.chip:hover,
.chip:focus-visible {
  background: var(--ink);
  color: #fff;
}

.game,
.games {
  min-height: 100dvh;
  padding: 18vh 8vw 12vh;
}

.game h1,
.games h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.game-note,
.games p {
  margin: 0;
  color: var(--caption);
  max-width: 42ch;
}

.game-list {
  margin-top: 36px;
  display: grid;
  gap: 0;
  max-width: 520px;
  border-top: 1px solid var(--line);
}

.game-list a {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.game-list strong {
  font-weight: 400;
  color: var(--ink);
}

.game-list span {
  color: var(--caption);
  font-size: 0.82rem;
}

.game-list a:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status {
  min-height: 1.4em;
  margin: 18px 0;
  color: var(--ink);
}

.score {
  margin: 14px 0 0;
  color: var(--caption);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.game-btn,
.pad,
.dir {
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 8px 12px;
  cursor: pointer;
}

.game-btn:hover,
.dir:hover,
.pad:hover {
  background: var(--ink);
  color: #fff;
}

.game-btn:disabled,
.pad:disabled {
  opacity: 0.35;
  cursor: default;
  background: #fff;
  color: var(--ink);
}

.game-btn[hidden] {
  display: none;
}

.hand {
  display: flex;
  gap: 8px;
  min-height: 78px;
  align-items: center;
  margin: 8px 0 16px;
}

.card {
  width: 48px;
  height: 68px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 6px 6px;
  line-height: 1;
  flex: 0 0 auto;
}

.card.red {
  color: #d0122d;
}

.card .rank {
  font-size: 13px;
}

.card .suit {
  align-self: flex-end;
  font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif;
  font-size: 15px;
}

.card.back {
  background: repeating-linear-gradient(
    -45deg,
    #111 0 1px,
    #fff 1px 5px
  );
}

.card.back .rank,
.card.back .suit {
  visibility: hidden;
}

.seat {
  color: var(--caption);
  font-size: 0.78rem;
  margin: 0;
}

.board {
  display: grid;
  grid-template-columns: repeat(16, 15px);
  gap: 1px;
  width: max-content;
  background: #dedede;
  border: 1px solid #111;
  margin-top: 16px;
}

.cell {
  width: 15px;
  height: 15px;
  background: #fff;
}

.cell.on {
  background: #111;
}

.cell.food {
  background: #fff;
  box-shadow: inset 0 0 0 4px #111;
}

.dirs {
  display: grid;
  grid-template-columns: 44px 44px 44px;
  grid-template-areas:
    ". up ."
    "left down right";
  gap: 6px;
  margin-top: 16px;
  width: max-content;
}

.dir.up { grid-area: up; }
.dir.left { grid-area: left; }
.dir.down { grid-area: down; }
.dir.right { grid-area: right; }

.pads {
  display: grid;
  grid-template-columns: 88px 88px;
  gap: 8px;
  margin-top: 16px;
}

.pad {
  height: 88px;
  padding: 0;
}

.pad.lit {
  background: #111;
  color: #fff;
}
