@font-face {
  font-family: "Tannenberg Bold";
  src: url("fonts/Tannenberg-Bold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Tannenberg Contour";
  src: url("fonts/Tannenberg-Contour.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Tannenberg Shadow";
  src: url("fonts/Tannenberg-Shadow.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/BodoniModa-Variable-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Cascadia Mono Web";
  src: url("fonts/CascadiaMono-Regular-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --font-display: "Bodoni Moda", "Bodoni MT", Didot, serif;
  --font-mono: "Cascadia Mono Web", Consolas, monospace;
  --black: #050505;
  --bone: #dedbd2;
  --ash: #8b8b85;
  --blood: #75101a;
  --acid: #c8d64a;
  --progress: 0%;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: clip;
  color: var(--bone);
  background: var(--black);
  font-family: var(--font-mono);
}

button,
input { font: inherit; }

button { color: inherit; }

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

.masthead,
.footer {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(18px, 2.7vw, 52px);
  pointer-events: none;
  font: 8px var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.masthead { top: 0; height: 70px; }
.footer { bottom: 0; height: 58px; color: rgba(222, 219, 210, .48); }
.masthead p,
.footer p { margin: 0; }

.name {
  color: var(--bone);
  text-decoration: none;
  pointer-events: auto;
}

.gallery {
  position: relative;
  display: flex;
  width: 100vw;
  height: 100svh;
  min-height: 360px;
  overflow: hidden;
  background: #080808;
}

.film-card {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  overflow: hidden;
  transition: flex-basis .85s cubic-bezier(.22, .78, .18, 1), filter .55s ease;
}

.gallery:has(.film-card:hover) .film-card:not(:hover) {
  flex-basis: 41%;
  filter: brightness(.58);
}

.gallery:has(.film-card:hover) .film-card:hover { flex-basis: 59%; }

.film-entry {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #090909;
  text-align: left;
  cursor: pointer;
}

.film-entry > img {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  filter: saturate(.68) contrast(1.1) brightness(.74);
  transform: scale(1.02);
  transition: transform 1.4s cubic-bezier(.2, .8, .2, 1), filter .8s ease;
}

.milkshake img { object-position: center 43%; }
.throat img { object-position: 53% center; }

.film-entry:hover > img,
.film-entry:focus-visible > img {
  filter: saturate(.92) contrast(1.04) brightness(.88);
  transform: scale(1.075);
}

.film-entry:focus-visible { outline: 1px solid var(--bone); outline-offset: -12px; }

.veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, .65), transparent 28%, transparent 54%, rgba(5, 5, 5, .9)),
    radial-gradient(circle at 50% 45%, transparent 0 26%, rgba(0, 0, 0, .5) 100%);
  mix-blend-mode: multiply;
}

.veil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: repeating-linear-gradient(89deg, transparent 0 5px, rgba(255, 255, 255, .035) 6px, transparent 7px 13px);
  animation: abrasion .38s steps(2) infinite;
}

@keyframes abrasion { 50% { transform: translateX(4px); } }

.index {
  position: absolute;
  top: clamp(86px, 13svh, 142px);
  left: clamp(20px, 3.2vw, 62px);
  color: rgba(222, 219, 210, .56);
  font: 10px var(--font-mono);
  letter-spacing: .16em;
}

.film-copy {
  position: absolute;
  left: clamp(20px, 3.2vw, 62px);
  right: clamp(20px, 3.2vw, 62px);
  bottom: clamp(70px, 11svh, 124px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.film-copy small,
.film-copy em {
  font: 8px var(--font-mono);
  letter-spacing: .2em;
}

.film-copy small {
  margin-bottom: clamp(14px, 3svh, 24px);
  color: var(--bone);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}

.film-copy strong {
  position: relative;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 24;
  font-weight: 400;
  font-size: clamp(40px, min(6.7vw, 12svh), 128px);
  line-height: .68;
  letter-spacing: -.065em;
  text-transform: uppercase;
  text-shadow: 0 5px 38px #000;
}

.throat .film-copy strong { font-size: clamp(36px, min(5.9vw, 10.5svh), 112px); }

.film-copy em {
  margin-top: clamp(14px, 3.5svh, 28px);
  color: rgba(222, 219, 210, .62);
  font-style: normal;
}

.film-entry:hover .film-copy small,
.film-entry:focus-visible .film-copy small { opacity: 1; transform: none; }

.milkshake .veil {
  background:
    linear-gradient(180deg, rgba(20, 2, 4, .7), transparent 28%, transparent 54%, rgba(25, 2, 5, .94)),
    radial-gradient(circle at 50% 42%, transparent 0 22%, rgba(63, 3, 10, .48) 100%);
}

.milkshake .film-copy strong {
  font-family: "Tannenberg Bold", sans-serif;
  letter-spacing: .015em;
  line-height: .64;
}

.milk-title span { display: block; }
.milk-title span:first-child { color: #a6111d; text-shadow: 0 0 30px rgba(166, 17, 29, .24); }
.milk-title span:last-child { margin-left: .07em; color: #eeeae1; font-family: "Tannenberg Contour", sans-serif; }

.milk-title::after {
  content: attr(data-text);
  position: absolute;
  z-index: -1;
  inset: 15% auto auto 11%;
  color: #4b1118;
  opacity: .34;
  font-family: "Tannenberg Shadow", sans-serif;
  font-size: .52em;
  letter-spacing: .03em;
  transform: scaleY(2.2) skewX(-12deg);
  filter: blur(1px);
}

.throat .film-copy strong::first-line { color: #b8c1bf; }

.spine {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: min(176px, 30svh);
  transform: translate(-50%, -50%);
  background: rgba(5, 5, 5, .88);
  border: 1px solid rgba(222, 219, 210, .25);
  backdrop-filter: blur(12px);
  pointer-events: none;
  transition: transform .85s cubic-bezier(.22, .78, .18, 1);
}

/* The hovered card grows to 59%, so the seam moves 9% of the gallery (100vw) either way. */
.gallery:has(.milkshake:hover) .spine { transform: translate(calc(-50% + 9vw), -50%); }
.gallery:has(.throat:hover) .spine { transform: translate(calc(-50% - 9vw), -50%); }

.spine span {
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: .18em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.spine i {
  position: absolute;
  bottom: 18px;
  width: 1px;
  height: 24px;
  background: var(--blood);
}

.viewer {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  padding: 0;
  border: 0;
  color: var(--bone);
  background: #000;
  opacity: 0;
  transition: opacity .45s ease, display .45s allow-discrete, overlay .45s allow-discrete;
}

.viewer[open] { opacity: 1; }

@starting-style { .viewer[open] { opacity: 0; } }

.viewer::backdrop { background: #000; }

.viewer-frame { position: relative; width: 100%; height: 100%; overflow: hidden; }

.viewer video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.viewer-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .66), transparent 24%, transparent 70%, rgba(0, 0, 0, .84));
  opacity: .72;
  transition: opacity .3s ease;
}

.viewer.playing:not(.controls-visible) .viewer-shade { opacity: 0; }

.viewer-head {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(18px, 2.8vw, 50px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
}

.viewer.controls-visible .viewer-head,
.viewer:not(.playing) .viewer-head { opacity: 1; transform: none; }

.viewer-head p { display: grid; gap: 6px; margin: 0; }
.viewer-head span { color: var(--ash); font: 8px var(--font-mono); letter-spacing: .22em; }
.viewer-head strong { font: 400 clamp(22px, 3vw, 46px) var(--font-display); font-variation-settings: "opsz" 24; letter-spacing: -.02em; }

.viewer-head button,
.controls button {
  border: 0;
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font: 8px var(--font-mono);
  letter-spacing: .16em;
}

.viewer-head button { padding: 10px; }
.viewer-head button:hover,
.viewer-head button:focus-visible,
.controls button:hover,
.controls button:focus-visible { outline: 1px solid rgba(222, 219, 210, .55); }

.controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(20px, 4vh, 54px);
  display: grid;
  grid-template-columns: 42px minmax(180px, 620px) 92px 82px 48px;
  align-items: center;
  gap: 10px;
  width: min(980px, calc(100vw - 40px));
  padding: 11px;
  transform: translate(-50%, 10px);
  border: 1px solid rgba(222, 219, 210, .24);
  background: rgba(5, 5, 5, .76);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.viewer.controls-visible .controls,
.viewer:not(.playing) .controls { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.timeline { position: relative; height: 32px; cursor: pointer; }
.timeline input { position: absolute; z-index: 2; inset: 0; width: 100%; margin: 0; opacity: 0; cursor: pointer; }
.timeline i { position: absolute; left: 0; right: 0; top: 15px; height: 1px; background: rgba(222, 219, 210, .3); }
.timeline b { display: block; width: var(--progress); height: 100%; background: linear-gradient(90deg, var(--blood), var(--bone)); }

#time {
  color: var(--ash);
  font: 8px var(--font-mono);
  letter-spacing: .08em;
  text-align: center;
}

.viewer-note {
  position: absolute;
  left: clamp(18px, 2.8vw, 50px);
  bottom: clamp(22px, 4vh, 56px);
  margin: 0;
  color: rgba(222, 219, 210, .42);
  font: 7px var(--font-mono);
  letter-spacing: .2em;
  opacity: 0;
  transition: opacity .25s ease;
}

.viewer.controls-visible .viewer-note,
.viewer:not(.playing) .viewer-note { opacity: 1; }

/* Short screens and landscape phones: the seal moves up into the masthead row, out of the titles' way. */
@media (min-width: 761px) and (max-height: 560px) {
  .masthead { height: 56px; }
  .footer { height: 46px; }
  .index { top: 64px; }
  .film-copy { bottom: 54px; }
  .spine { top: 28px; width: 104px; height: 32px; }
  .spine span { font-size: 14px; writing-mode: horizontal-tb; }
  .spine i { left: 14px; bottom: auto; width: 16px; height: 1px; }
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .masthead { height: 54px; }
  .footer { display: none; }
  .gallery { display: block; height: auto; min-height: 100svh; overflow: visible; }
  .film-card { width: 100%; height: 50svh; min-height: 340px; }
  .gallery:has(.film-card:hover) .film-card,
  .gallery:has(.film-card:hover) .film-card:hover { filter: none; }
  .film-entry > img { inset: 0; width: 100%; height: 100%; }
  .index { top: 70px; }
  .film-copy { bottom: 34px; }
  .film-copy small { display: none; }
  .film-copy strong,
  .throat .film-copy strong { font-size: clamp(42px, 14vw, 76px); }
  .film-copy em { margin-top: 18px; font-size: 7px; }
  .spine { position: absolute; top: 50%; width: 128px; height: 38px; }
  .gallery:has(.film-card:hover) .spine { transform: translate(-50%, -50%); }
  .spine span { font-size: 16px; writing-mode: horizontal-tb; }
  .spine i { left: 17px; bottom: auto; width: 20px; height: 1px; }
  .controls { grid-template-columns: 38px 1fr 72px; width: calc(100vw - 24px); bottom: 12px; gap: 4px; }
  #sound,
  #fullscreen { display: none; }
  .viewer-note { display: none; }
  .viewer-head { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
