:root {
  --ink: #171717;
  --paper: #f3f0e8;
  --muted: #68645d;
  --line: #cbc6ba;
  --accent: #ffe252;
  --accent-strong: #f4cb00;
  --blue: #91ddff;
  --screen: #0f0f10;
  --card-shadow: 0 10px 25px rgb(35 31 23 / 9%);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 300px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 5%, rgb(145 221 255 / 35%), transparent 24rem),
    linear-gradient(rgb(23 23 23 / 4%) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 100% 32px, auto;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6.5rem) clamp(1.25rem, 5vw, 4.5rem) 2.5rem;
}

.eyebrow {
  grid-column: 1 / -1;
  width: max-content;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--ink);
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}

.header-copy h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3rem, 9vw, 7.4rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 4.5rem) 5rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--ink);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.5vw, 2rem);
  padding-top: 2rem;
}

.film-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.film-card:hover {
  transform: translateY(-5px);
  box-shadow: 8px 10px 0 var(--ink);
}

.film-card:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 3px;
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: var(--screen);
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 250ms ease;
}

.film-card:hover .thumb-wrap img {
  transform: scale(1.025);
}

.play-chip {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  font-size: 0.9rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.film-card-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 1rem 1.05rem 1.1rem;
}

.film-card-copy h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: -0.025em;
}

.card-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

footer {
  padding: 1.5rem clamp(1.25rem, 5vw, 4.5rem) 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

footer a {
  color: inherit;
  font-weight: 700;
}

.player-dialog {
  width: min(1080px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid #474747;
  border-radius: 0;
  background: #1b1b1d;
  color: #f8f8f4;
  box-shadow: 0 30px 90px rgb(0 0 0 / 55%);
}

.player-dialog::backdrop {
  background: rgb(10 10 10 / 82%);
  backdrop-filter: blur(8px);
}

.player-shell {
  padding: clamp(0.9rem, 2.5vw, 1.5rem);
}

.player-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1rem 0 1rem;
}

.player-header h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}

.player-kicker {
  color: #a4a4a4;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid #5f5f61;
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
}

.icon-button:hover {
  border-color: white;
  background: #313134;
}

.close-button span {
  margin-top: -0.13em;
  font-size: 1.9rem;
  font-weight: 200;
}

.screen-wrap {
  position: relative;
  display: grid;
  min-height: 320px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #4a4a4d;
  background:
    radial-gradient(circle, #2d2d30 1px, transparent 1px),
    #101011;
  background-size: 12px 12px;
}

.screen {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 320px;
  place-items: center;
  padding: clamp(0.5rem, 2vw, 1.25rem);
}

.screen img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(65vh, 650px);
  border: 1px solid #57575a;
  background: white;
  object-fit: contain;
  image-rendering: pixelated;
  box-shadow: 0 12px 45px rgb(0 0 0 / 45%);
}

.cue-hotspot {
  position: absolute;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  line-height: 1;
  cursor: pointer;
}

.cue-hotspot[hidden] {
  display: none;
}

.cue-hotspot.is-rendered-part {
  border: max(1px, var(--part-border, 1px)) solid #000;
  border-radius: var(--part-radius, 5px);
  background: #fff;
  box-shadow: var(--part-shadow, 2px) var(--part-shadow, 2px) 0 #000;
  font-family: Helvetica, Arial, sans-serif;
  font-size: var(--part-font-size, 12px);
  white-space: nowrap;
}

.cue-hotspot:focus-visible {
  outline: 2px solid #1682ff;
  outline-offset: 2px;
}

.loading-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  background: rgb(15 15 16 / 92%);
  text-align: center;
}

.loading-panel strong {
  font-size: clamp(1.3rem, 4vw, 2.3rem);
  letter-spacing: -0.035em;
}

.loading-panel span {
  margin-top: 0.45rem;
  color: #bcbcbc;
  font-size: 0.84rem;
}

.spinner {
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 1.1rem;
  border: 3px solid #4c4c4f;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-track {
  width: min(300px, 70vw);
  height: 4px;
  margin-top: 1rem;
  overflow: hidden;
  background: #4c4c4f;
}

.loading-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 100ms linear;
}

.loading-panel[hidden] {
  display: none;
}

.timeline-row {
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0 0.65rem;
  color: #a6a6a8;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
}

.timeline-row span:last-child {
  text-align: right;
}

#timeline {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-button,
.play-button {
  height: 2.55rem;
  border: 1px solid #5f5f62;
  background: #28282b;
  color: white;
  cursor: pointer;
}

.control-button {
  width: 2.55rem;
  padding: 0;
  font-size: 1.4rem;
}

.play-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 8.3rem;
  justify-content: center;
  padding: 0 1rem;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.control-button:hover,
.play-button:hover {
  border-color: white;
  background: white;
  color: var(--ink);
}

.control-button:disabled,
.play-button:disabled,
#timeline:disabled {
  cursor: wait;
  opacity: 0.45;
}

.frame-readout {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #a6a6a8;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.fps-badge {
  padding: 0.35rem 0.5rem;
  border: 1px solid #5f5f62;
  color: #dedede;
  font-weight: 700;
}

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

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .section-heading span {
    display: none;
  }

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

  .player-dialog {
    width: 100vw;
    max-width: none;
    max-height: 100vh;
    margin: 0;
    border: 0;
  }

  .screen-wrap,
  .screen {
    min-height: 250px;
  }

  .controls {
    align-items: start;
    flex-direction: column;
  }

  .frame-readout {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-card,
  .thumb-wrap img,
  .loading-track i {
    transition: none;
  }
}
