* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: #f2efe8; overflow: hidden; -webkit-font-smoothing: antialiased;
  font-family: "Courier Prime", "Courier New", monospace; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* 16:9 player scaled to cover the viewport, oversized to crop YouTube's chrome.
   Graded like a worn print: crushed, desaturated, a little warm, with gate weave. */
.video { position: fixed; inset: 0; overflow: hidden; animation: weave 5s steps(10) infinite;
  filter: contrast(1.25) saturate(.7) sepia(.12) brightness(.92); }
.video iframe, #player {
  position: absolute; top: 50%; left: 50%;
  width: max(100vw, 177.78vh); height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%) scale(1.18); pointer-events: none; border: 0;
}
@keyframes weave { 0%,100% { transform: none; } 20% { transform: translate(1px,-1px); } 40% { transform: translate(-1px,1px); }
  60% { transform: translate(0,1px); } 80% { transform: translate(1px,0); } }

.shade { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 45%, rgba(0,0,0,.8) 100%),
              linear-gradient(0deg, rgba(0,0,0,.75) 0%, transparent 35%);
  animation: flicker .18s infinite; }
@keyframes flicker { 0%,100% { opacity: 1; } 50% { opacity: .93; } }
.grain { position: fixed; inset: -100%; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .5s steps(5) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-8%,5%)} 40%{transform:translate(6%,-9%)} 60%{transform:translate(-4%,8%)} 80%{transform:translate(9%,3%)} }

/* Between clips: a hard black frame with the title slammed on it. */
.cut { position: fixed; inset: 0; z-index: 5; background: #000; display: grid; place-items: center; pointer-events: none;
  opacity: 0; }
.cut span { font-family: "Anton", Impact, sans-serif; font-size: clamp(3rem, 13vw, 12rem); line-height: .9; text-transform: uppercase;
  text-align: center; padding: 0 4vw; color: #f2efe8; }
.cut.on { opacity: 1; }

.tap { position: fixed; inset: 0; z-index: 2; cursor: pointer; }

.mark {
  position: fixed; z-index: 3; pointer-events: none;
  left: 50%; top: 42%; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: "Anton", Impact, sans-serif; font-weight: 400; text-align: center;
  font-size: clamp(4.5rem, min(16vw, 26vh), 14rem); line-height: .82; letter-spacing: -.01em; color: #f2efe8;
  transition: all .5s cubic-bezier(.7,0,.2,1);
}
body.on .mark { left: 1.25rem; top: 1.1rem; transform: none; font-size: 1.3rem; text-align: left; opacity: .85; }

.hint { position: fixed; z-index: 3; left: 50%; bottom: 10vh; transform: translateX(-50%); pointer-events: none;
  text-align: center; text-transform: uppercase; white-space: nowrap; }
.h-go { font-weight: 700; letter-spacing: .12em; font-size: .9rem; animation: blink 1.1s steps(1) infinite; }
.keys { margin-top: 1rem; font-size: .8rem; letter-spacing: .08em; opacity: .75; }
.keys b { display: inline-block; margin: 0 .35rem 0 1rem; padding: .1rem .45rem; border: 1px solid rgba(242,239,232,.5); font-weight: 700; }
.keys b:first-child { margin-left: 0; }
.keys-touch { display: none; }
@media (pointer: coarse) { .keys-desk { display: none; } .keys-touch { display: block; } }
body.on .hint { display: none; }
@keyframes blink { 50% { opacity: 0; } }

.cap { position: fixed; z-index: 3; left: 1.25rem; bottom: 1.25rem; right: 24rem; pointer-events: none;
  opacity: 0; padding-bottom: env(safe-area-inset-bottom); }
body.on .cap { opacity: 1; }
.c-title { font-family: "Anton", Impact, sans-serif; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .95; text-transform: uppercase; }
.c-sub { margin-top: .4rem; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.c-fact { margin-top: .6rem; max-width: 56ch; font-size: .95rem; line-height: 1.4; text-wrap: pretty; }
.c-src { pointer-events: auto; position: relative; z-index: 5; color: inherit; opacity: .55; font-size: .8rem;
  text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.c-src:hover { opacity: 1; }
body:not(.on) .c-src { pointer-events: none; }

.mute, .share { position: fixed; z-index: 4; top: .8rem; height: 44px; padding: 0 .4rem;
  font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; opacity: 0; }
.mute { right: 1rem; }
.share { right: 11rem; }
body.on .mute, body.on .share { opacity: .75; }
.mute:hover, .share:hover { opacity: 1 !important; }
body:not(.on) .share, body:not(.on) .rate { pointer-events: none; }
.mute::before { content: "[ sound: on ]"; }
body.muted .mute::before { content: "[ sound: off ]"; }

/* The whole point: tell it what fires you up. */
.rate { position: fixed; z-index: 4; right: 1rem; bottom: 1rem; display: flex; gap: .5rem; opacity: 0;
  margin-bottom: env(safe-area-inset-bottom); }
body.on .rate { opacity: 1; }
.rate button { height: 48px; padding: 0 .9rem; font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.nah { opacity: .6; }
.nah:hover { opacity: 1; }
.fire { background: #f2efe8; color: #000; }
.fire:hover { background: #fff; }
body.fired .fire { background: #b3120e; color: #f2efe8; }

.stamp { position: fixed; z-index: 6; left: 50%; top: 42%; pointer-events: none; opacity: 0;
  font-family: "Anton", Impact, sans-serif; font-size: clamp(3rem, 11vw, 9rem); line-height: 1; white-space: nowrap;
  color: #b3120e; border: .08em solid #b3120e; padding: .05em .25em; mix-blend-mode: screen;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); }
.stamp.show { animation: stamp 1.1s cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.8); }
  12% { opacity: .95; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  70% { opacity: .95; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
}

.toast { position: fixed; z-index: 6; left: 50%; top: 1.2rem; transform: translateX(-50%); padding: .5rem .8rem;
  background: #f2efe8; color: #000; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em;
  opacity: 0; pointer-events: none; }
.toast.show { opacity: 1; }

@media (max-width: 600px) {
  .cap { right: 1.25rem; bottom: 4.2rem; }
  .c-fact { font-size: .88rem; }
  .share { right: 9.5rem; }
  .rate { left: 1rem; right: 1rem; }
  .rate button { flex: 1; }
  .mark { font-size: clamp(4rem, 24vw, 12rem); }
  .keys b { margin-left: .6rem; }
  body.on .mark { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .video, .shade, .grain, .hint { animation: none; } }
