/* ============================================================
   VOTV Found Footage Archive
   Black and white, content first. Figtree for reading,
   IBM Plex Mono only for small metadata. Bootstrap Icons (CDN).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg:        #000000;
  --bg-soft:   #0e0e0e;
  --text:      #f4f4f4;
  --muted:     #9a9a9a;
  --faint:     #6a6a6a;
  --line:      rgba(255,255,255,0.10);
  --line-2:    rgba(255,255,255,0.20);

  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --r:    9px;
  --r-sm: 6px;
  --wrap: 1180px;
  --pad:  28px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #fff; color: #000; }
.bi { line-height: 1; vertical-align: -0.05em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,0.86);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; gap: 20px;
}
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; letter-spacing: -0.01em; }
.wordmark .dot { width: 8px; height: 8px; border-radius: 2px; background: #fff; flex: none; }
.wordmark .wm-main { font-weight: 700; }
.wordmark .wm-sub { font-weight: 400; color: var(--muted); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a {
  padding: 7px 12px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--muted);
  transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--text); }
.navtoggle { display: none; margin-left: auto; color: var(--muted); padding: 8px; font-size: 20px; }

/* ------------------------------------------------------------ page intro */
main { padding: 26px 0 72px; }
.lede {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.lede h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.lede p { color: var(--muted); font-size: 15px; max-width: 56ch; margin-top: 4px; }
.lede__note { color: var(--faint); font-size: 13.5px; }
.viewall { color: var(--muted); font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.viewall:hover { color: var(--text); }
.viewall .bi { transition: transform .15s; }
.viewall:hover .bi { transform: translateX(3px); }

/* ------------------------------------------------------------ recordings grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 30px 26px;
}
.card { display: block; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r);
  overflow: hidden; background: #060606;
}
.thumb img, .thumb__img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(0.82) contrast(1.05);
  transition: filter .25s ease, transform .4s ease;
}
.card:hover .thumb img, .card:hover .thumb__img { filter: grayscale(1) brightness(1.02) contrast(1.06); transform: scale(1.025); }
.thumb__state {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 7px;
  color: var(--muted); font-size: 12.5px; letter-spacing: 0.02em; background: #0a0a0a;
}
.thumb__state .bi { font-size: 19px; color: var(--muted); }
.thumb.is-error .thumb__state { display: flex; }
.thumb.is-error .thumb__img { display: none; }
.thumb.is-error .thumb__play, .thumb.is-error .thumb__rt { display: none; }
.thumb__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transition: opacity .2s ease;
}
.card:hover .thumb__play { opacity: 1; }
.thumb__play span {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  border: 1px solid rgba(255,255,255,0.6);
  display: grid; place-items: center; color: #fff; font-size: 20px;
}
.thumb__play .bi { margin-left: 2px; }
.thumb__rt {
  position: absolute; right: 8px; bottom: 8px;
  font-family: var(--mono); font-size: 11.5px; color: #fff;
  background: rgba(0,0,0,0.7); padding: 2px 7px; border-radius: 4px;
}
.card__title {
  margin-top: 11px; font-size: 15.5px; font-weight: 500; line-height: 1.35;
  color: var(--text); transition: color .15s;
}
.card:hover .card__title { color: #fff; }
.card__meta {
  margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--faint);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.card__meta .sep { opacity: .5; }
.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--faint); font-size: 15px; }

/* ------------------------------------------------------------ recordings page controls */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.searchfield {
  flex: 1 1 260px; display: flex; align-items: center; gap: 9px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px;
}
.searchfield .bi { color: var(--faint); font-size: 15px; flex: none; }
.searchfield input { flex: 1; background: none; border: none; outline: none; padding: 11px 0; font-size: 15px; color: var(--text); }
.searchfield input::placeholder { color: var(--faint); }
.searchfield:focus-within { border-color: var(--line-2); }
.sortwrap { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sortwrap .bi { color: var(--faint); }
.sortwrap select {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 30px 10px 12px; font-size: 14px; color: var(--text); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' stroke='%239a9a9a' fill='none' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
}
.sortwrap select:focus { border-color: var(--line-2); outline: none; }

/* ------------------------------------------------------------ single recording */
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.back:hover { color: var(--text); }
.rec { display: grid; grid-template-columns: minmax(0,1fr) 268px; gap: 34px; align-items: start; }
.player { border-radius: var(--r); overflow: hidden; background: #000; position: relative; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__fallback {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px;
}
.player__fallback.show { display: flex; }
.player__fallback .bi { font-size: 26px; color: var(--faint); margin-bottom: 4px; }
.player__fallback .msg { font-size: 15px; color: var(--muted); font-weight: 500; }
.player__fallback .sub { font-size: 13px; color: var(--faint); }
.rec__case { font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: 0.03em; }
.rec__title { font-size: 25px; font-weight: 600; line-height: 1.22; letter-spacing: -0.01em; margin: 7px 0 0; }
.rec__body { margin-top: 22px; max-width: 64ch; }
.rec__body h2 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 22px 0 7px; }
.rec__body p { color: #d8d8d8; margin-top: 8px; }
.rec__body p:first-of-type { margin-top: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.tag { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 100px; padding: 4px 11px; }

.facts { margin-top: 4px; }
.facts dl { display: grid; gap: 0; }
.fact { display: grid; grid-template-columns: 18px 1fr; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: none; padding-top: 0; }
.fact .bi { color: var(--faint); font-size: 14px; margin-top: 3px; }
.fact dt { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.fact dd { font-family: var(--mono); font-size: 13.5px; color: var(--text); margin-top: 3px; }

/* ------------------------------------------------------------ about / prose */
.prose { max-width: 60ch; }
.prose h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; }
.prose h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 26px 0 8px; }
.prose p { color: #d8d8d8; margin-top: 10px; }
.prose p:first-of-type { margin-top: 0; }
.prose .quiet { color: var(--faint); font-size: 14px; }

/* ---- redaction: physical white bars over text ---- */
.redact { position: relative; white-space: nowrap; color: var(--text); }
.redact::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 0.06em; bottom: 0.1em;
  background: #fff; transform-origin: right center;
}
/* revealed bits: the bar retracts (width shrinks to nothing) on load */
.redact--reveal::after {
  animation: unredact .7s cubic-bezier(.22,.7,.2,1) forwards;
  animation-delay: var(--d, .3s);
}
@keyframes unredact { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* permanently redacted bits stay covered; hide the text under them too */
.redact--blocked { color: transparent; user-select: none; }
@media (prefers-reduced-motion: reduce) { .redact--reveal::after { display: none; } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) { .rec { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 620px) {
  :root { --pad: 18px; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 12px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 0; border-radius: 0; }
  .navtoggle { display: inline-flex; }
  .site-head__inner { position: relative; }
  .wordmark .wm-sub { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 24px 18px; }
  .rec__title { font-size: 22px; }
}
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- back-to-original corner logo (neal.fun style) ---- */
.backhome {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  line-height: 0; display: block;
  opacity: 0.4; transform: rotate(-9deg);
  transition: opacity .28s ease, transform .28s ease;
}
.backhome:hover, .backhome:focus-visible {
  opacity: 1; transform: rotate(0deg); outline: none;
}
.backhome img { width: 200px; height: auto; display: block; }
@media (max-width: 620px) {
  .backhome { left: 12px; bottom: 12px; }
  .backhome img { width: 66px; }
}