@font-face { font-family: 'BlackOps'; src: url('/feral/blackops.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'OCRA'; src: url('/art/fonts/OCRA2.woff') format('woff'); font-display: swap; }
:root { --rust: #c8643a; --amber: #e8a046; --bone: #e9dcc6; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #070403; overflow: hidden; }
body {
  font-family: 'OCRA', 'OCR A Extended', ui-monospace, monospace; color: var(--bone);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 1px dashed var(--amber); outline-offset: 6px; }


/* ---------- HUD ---------- */
.hud {
  position: fixed; left: 0; right: 0; z-index: 6; display: flex; gap: 1.4em; align-items: center;
  padding: max(14px, env(safe-area-inset-top)) 18px 14px; font-size: 11px; letter-spacing: .22em;
  color: rgba(250,242,228,.92); text-shadow: 0 1px 3px rgba(40,22,10,.75); text-transform: uppercase; pointer-events: none;
}
.hud a { color: inherit; text-decoration: none; pointer-events: auto; }
.hud-top { top: 0; }
.hud-bottom { bottom: 0; padding: 14px 18px max(14px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.hud-bottom h1 { margin: 0; font-size: inherit; font-weight: 400; letter-spacing: inherit; }
.hud-bottom .lede { margin: 3px 0 0; font-size: 10px; letter-spacing: .06em; text-transform: none; max-width: 52ch; line-height: 1.4; }
.hud-right { margin-left: auto; }
.hud-dim { color: rgba(255,214,160,.85); }
.hud-node::before { content: '\25A0  '; color: var(--rust); animation: blink 1.4s infinite steps(1); }
@keyframes blink { 50% { opacity: 0 } }


/* ---------- landing: Michael's start frame, ambient loop (locked camera) ---------- */
/* .scene is sized/positioned by feral.js so it covers the screen at the video's exact aspect;
   the hand hotspot and glitch layers are % boxes inside it, so they stay pinned to the painted hand. */
.scene { position: fixed; left: 0; top: 0; width: 100vw; height: 66.1vw; z-index: 0; overflow: hidden; background: #cdbb9f url('/feral/poster.webp') center / 100% 100% no-repeat; }
.scene video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; }
.dim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(40,24,12,.42) 0%, transparent 13%, transparent 84%, rgba(40,24,12,.48) 100%);
}
/* hand hotspot: box of the painted hand on the tank (in % of the 1280x846 frame) */
.hand {
  position: absolute; left: 67.578%; top: 29.905%; width: 18.984%; height: 28.723%;
  cursor: pointer; z-index: 2; border-radius: 30%;
}
.hand .g { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; pointer-events: none; }
.hand .g-m { background: url('/feral/hand-cut.webp') 0 0 / 100% 100% no-repeat; }
.hand .g-r, .hand .g-a { -webkit-mask: url('/feral/hand-cut.webp') 0 0 / 100% 100% no-repeat; mask: url('/feral/hand-cut.webp') 0 0 / 100% 100% no-repeat; mix-blend-mode: screen; }
.hand .g-r { background: #ff2a12; }
.hand .g-a { background: #ffa21a; }
.hand .g-t1, .hand .g-t2 { background: url('/feral/hand-cut.webp') 0 0 / 100% 100% no-repeat; }
/* glitch on: hover (mouse), .glitch (touch / click / idle micro-burst) */
.hand.glitch .g, .hand:hover .g { opacity: 1; }
.hand.glitch .g-m, .hand:hover .g-m { animation: gJit .42s infinite steps(1); }
.hand.glitch .g-r, .hand:hover .g-r { opacity: .55; animation: gR .37s infinite steps(1); }
.hand.glitch .g-a, .hand:hover .g-a { opacity: .45; animation: gA .45s infinite steps(1); }
.hand.glitch .g-t1, .hand:hover .g-t1 { animation: gT1 .53s infinite steps(1); }
.hand.glitch .g-t2, .hand:hover .g-t2 { animation: gT2 .61s infinite steps(1); }
.hand.micro .g { opacity: 1; }
.hand.micro .g-r { opacity: .35; transform: translateX(-2px); }
.hand.micro .g-a { opacity: .3; transform: translateX(2px); }
.hand.micro .g-m, .hand.micro .g-t2 { opacity: 0; }
.hand.micro .g-t1 { clip-path: inset(46% 0 44% 0); transform: translateX(5px); }
@keyframes gJit { 0%,100% { transform: none } 20% { transform: translate(2px,-1px) } 40% { transform: translate(-3px,1px) } 60% { transform: translate(1px,0) } 80% { transform: translate(-1px,-1px) } }
@keyframes gR { 0%,100% { transform: translate(-4px,0) } 30% { transform: translate(-8px,1px); clip-path: inset(12% 0 60% 0) } 55% { transform: translate(-3px,-1px); clip-path: none } 80% { transform: translate(-10px,0); clip-path: inset(58% 0 18% 0) } }
@keyframes gA { 0%,100% { transform: translate(4px,0) } 25% { transform: translate(7px,-1px); clip-path: inset(35% 0 40% 0) } 50% { transform: translate(2px,1px); clip-path: none } 75% { transform: translate(9px,0); clip-path: inset(70% 0 8% 0) } }
@keyframes gT1 { 0%,100% { clip-path: inset(20% 0 72% 0); transform: translateX(12px) } 33% { clip-path: inset(48% 0 41% 0); transform: translateX(-14px) } 66% { clip-path: inset(66% 0 26% 0); transform: translateX(9px) } }
@keyframes gT2 { 0%,100% { clip-path: inset(5% 0 86% 0); transform: translateX(-9px) } 50% { clip-path: inset(80% 0 10% 0); transform: translateX(13px) } }
.hint {
  position: fixed; left: 0; right: 0; bottom: max(58px, 9vh); margin: 0; z-index: 3; text-align: center;
  font-size: 12px; letter-spacing: .4em; color: rgba(255,240,220,.95); text-shadow: 0 1px 3px rgba(40,20,8,.9), 0 0 12px rgba(40,20,8,.6);
  animation: hintPulse 2.6s ease-in-out infinite; pointer-events: none;
}
@keyframes hintPulse { 0%,100% { opacity: .55 } 50% { opacity: 1 } }
body.leaving .hint, body.leaving .hud-bottom { opacity: 0; transition: opacity .25s; }
body { cursor: default; }

/* ---------- film section: zoom-out transition -> girl loop ---------- */
/* #stage is a 16:9 box sized/positioned by feral.js (it animates from the landing framing to cover-on-her);
   both videos fill it exactly, and the desktop CTA is anchored in its % coordinates. */
.reel { position: fixed; inset: 0; z-index: 5; background: transparent; }
.reel[hidden] { display: none; }
#stage { position: absolute; left: 0; top: 0; width: 100vw; height: 56.25vw; --sw: 100vw; }
#stage video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; }
#stage.hold { background: url('/feral/film0.webp') 0 0 / 100% 100% no-repeat; }
#film { z-index: 1; opacity: 0; }
#film.live { opacity: 1; }
#zoom { z-index: 2; opacity: 0; transition: opacity .13s linear; }
#zoom.on { opacity: 1; }
#zoom.gone { opacity: 0; transition: none; }
.back { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.reel.settled .back { opacity: 1; pointer-events: auto; }
/* ---------- "TEXT IF YOU DARE" + number: small black stencil, set into the scene ---------- */
/* desktop: on the sand just below the hand-painted tank (right), in the video's coordinate space */
.cta {
  position: absolute; z-index: 5; left: 85%; top: 61.5%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--sw) * .004);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity 1s ease;
}
.reel.settled .cta { opacity: 1; }
.cta-top, .cta-num {
  position: relative; margin: 0; font-family: 'BlackOps', 'Stencil', 'Impact', sans-serif; text-transform: uppercase; white-space: nowrap;
  color: #160c06;  /* fallback if background-clip:text is unsupported */
  background: linear-gradient(180deg, rgba(10,5,2,.92), rgba(10,5,2,.82)), url('/feral/rust.webp') 0 0 / 90px;
  background-blend-mode: multiply;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 1px rgba(255,240,215,.55)) drop-shadow(0 0 6px rgba(255,236,205,.45));
}
.cta-top { font-size: max(10px, calc(var(--sw) * .0095)); letter-spacing: .3em; padding-left: .3em; animation: ctaFlicker 4.1s infinite steps(1); }
.cta-num {
  font-size: max(16px, calc(var(--sw) * .0175)); letter-spacing: .03em; line-height: 1; text-decoration: none; pointer-events: auto;
  padding: .15em .2em; animation: ctaFlicker 5.7s infinite steps(1) .8s;
}
.cta-num:focus-visible { outline: 1px dashed #3a1a0a; outline-offset: 4px; }
/* subtle RGB tear: rust/amber copies slip sideways on a slice for a frame or two */
.cta-top::before, .cta-top::after, .cta-num::before, .cta-num::after {
  content: attr(data-t); position: absolute; inset: 0; padding: inherit; -webkit-text-fill-color: currentColor;
  background: none; opacity: 0; pointer-events: none;
}
.cta-top::before, .cta-num::before { color: rgba(170,40,14,.8); animation: ctaTearR 3.3s infinite steps(1); }
.cta-top::after, .cta-num::after { color: rgba(150,90,20,.7); animation: ctaTearA 4.4s infinite steps(1); }
@keyframes ctaTearR { 0%,100% { opacity: 0 } 37% { opacity: 1; transform: translateX(-3px); clip-path: inset(18% 0 55% 0) } 39% { opacity: 1; transform: translateX(2px); clip-path: inset(60% 0 12% 0) } 41% { opacity: 0 } }
@keyframes ctaTearA { 0%,100% { opacity: 0 } 66% { opacity: 1; transform: translateX(3px); clip-path: inset(40% 0 35% 0) } 68% { opacity: 0 } }
@keyframes ctaFlicker { 0%,100% { opacity: 1; transform: none } 44% { opacity: .7 } 45% { opacity: 1 } 81% { transform: translateX(1px) } 82% { transform: none } }
/* phones: her body fills the crop, so the block sits low, below her waist */
body.portrait .cta {
  position: fixed; left: 50%; top: auto; bottom: calc(max(44px, 6.5vh) + env(safe-area-inset-bottom)); transform: translateX(-50%); gap: 4px;
}
body.portrait .cta-top { font-size: 11px; }
body.portrait .cta-num { font-size: 26px; }

.sound {
  position: fixed; z-index: 8; top: max(10px, env(safe-area-inset-top)); right: 14px; font-size: 10px; letter-spacing: .22em;
  padding: 7px 9px; color: #f3e6d0; text-shadow: 0 1px 2px rgba(30,15,6,.8);
  background: linear-gradient(180deg, rgba(255,220,170,.18), rgba(0,0,0,.25)), url('/feral/rust.webp') 0 0 / 120px;
  border: 1px solid rgba(60,30,12,.8); box-shadow: inset 0 0 0 1px rgba(255,200,140,.18), 0 2px 6px rgba(0,0,0,.45);
}
.sound[aria-pressed="false"] { filter: saturate(.4) brightness(.8); }
.sound:hover { filter: brightness(1.15); }
.back {
  position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; z-index: 2; font-size: 11px; letter-spacing: .25em;
  color: rgba(233,220,198,.75); padding: 8px 10px; border: 1px solid rgba(200,100,58,.45); background: rgba(0,0,0,.35);
}
.back:hover { color: #fff; border-color: var(--amber); }


@media (max-width: 760px), (orientation: portrait) {
  .hud { font-size: 9px; letter-spacing: .14em; }
  .hint { font-size: 10px; letter-spacing: .3em; }
  .hud-bottom .hud-right { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hint, .cta-top, .cta-num, .hand .g { animation: none !important; }
  #zoom { transition: none; }
  .cta-top::before, .cta-top::after, .cta-num::before, .cta-num::after { display: none; }
}

/* the girl in the film links to ARMOR BY THE HAND (?piece=white). Box = her body in the 16:9 frame. */
.girl { position: absolute; z-index: 4; left: 18%; top: 0; width: 41%; height: 100%; cursor: default; pointer-events: none; -webkit-tap-highlight-color: transparent; }
.girl.hot { cursor: pointer; }
/* her talking clip (once per visit): sits over the loop, crossfades in, cuts out on loop frame 0 */
#stage #talk { z-index: 1; opacity: 0; transition: opacity .25s linear; pointer-events: none; }
#stage #talk.on { opacity: 1; }
#stage #talk.cut { transition: none; }
.reel.settled .girl { pointer-events: auto; }
.girl:focus-visible { outline: 1px dashed rgba(255,255,255,.6); outline-offset: 2px; }

/* hover: the armor itself lights up (traced per frame from feral.mp4, armor-mask.json); no text.
   click: ARMOR BY THE HAND + a pink hand appear beside her, then /armor. */
.armor-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; mix-blend-mode: screen; pointer-events: none; opacity: 0; transition: opacity .16s ease; }
.armor-fx.on { opacity: 1; }
.abh-tag { position: fixed; z-index: 6; left: 0; top: 0; margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 9px 6px 7px; background: rgba(0,0,0,.55); color: #f2eee8; font: 12px 'OCRA', ui-monospace, monospace; letter-spacing: .08em; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .16s, transform .16s; }
.abh-tag.on { opacity: 1; transform: none; }
.abh-hand { width: 22px; height: 22px; flex: none; background: #ff2a6d; -webkit-mask: url('/armor/hand-black.webp') center / contain no-repeat; mask: url('/armor/hand-black.webp') center / contain no-repeat; }
