/* FreqNC video work. Palette from an edit bay: neutral graphite ground (colour-critical rooms are
   grey, not black), NLE clip-label colours for the two categories, playhead red for progress. */
:root {
  --bay: #2b2c2f;
  --panel: #35363a;
  --line: #48494e;
  --ink: #eeede9;
  --ink-2: #b3b2ad;
  --mango: #e9a23b;
  --cerulean: #5d9fd8;
  --tan: #a89878;
  --playhead: #e8483b;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Segoe UI", sans-serif;
  --r: 6px;
  --gut: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bay);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}
img, video { display: block; max-width: 100%; -webkit-user-drag: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0; }

.chip { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.chip.mango { background: var(--mango); }
.chip.cerulean { background: var(--cerulean); }
.chip.raw { background: var(--tan); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gut);
  background: var(--bay);
  border-bottom: 1px solid var(--line);
}
.mark { font: 700 26px/1 var(--font-display); text-decoration: none; letter-spacing: 0.01em; }
.mark span { font: 500 15px var(--font-body); color: var(--ink-2); margin-left: 10px; letter-spacing: 0; }
.top nav { display: flex; gap: 6px; }
.top nav a {
  text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: var(--r);
  transition: background 0.15s;
}
.top nav a:hover { background: var(--panel); }
.top nav b { font-weight: 500; color: var(--ink-2); margin-left: 4px; font-variant-numeric: tabular-nums; }

/* Intro */
.intro { padding: clamp(40px, 8vw, 96px) var(--gut) clamp(32px, 5vw, 56px); max-width: 1100px; }
.intro h1 { font-size: clamp(44px, 7.5vw, 104px); font-weight: 700; letter-spacing: -0.01em; }
.intro p { max-width: 58ch; color: var(--ink-2); font-size: 18px; margin: 20px 0 0; }

/* Category track */
.track { padding: 0 var(--gut) clamp(56px, 8vw, 96px); }
.track-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; padding-top: 28px; border-top: 3px solid var(--label); }
.track-head h2 { font-size: clamp(34px, 4.5vw, 54px); }
.track-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }

/* Timeline strip: every video is a clip block sized by its runtime */
.strip {
  display: flex; gap: 2px; margin: 22px 0 32px; height: 34px;
  padding-top: 8px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 24px) top / 100% 6px no-repeat;
}
.clip {
  flex-basis: 0; min-width: 6px; display: block; overflow: hidden;
  background: var(--label); color: #1d1d1f; border-radius: 2px;
  font: 600 12px/26px var(--font-body); text-align: left; text-decoration: none; padding: 0 6px;
  opacity: 0.82; transition: opacity 0.15s;
}
.clip span { white-space: nowrap; }
.clip:hover, .clip:focus-visible { opacity: 1; }

/* Faceless grid */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 32px 16px; grid-auto-flow: dense;
}
.tile.land { grid-column: span 2; }
.poster {
  position: relative; display: block; width: 100%;
  aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--panel);
}
.tile.land .poster { aspect-ratio: auto; height: calc(100% - 0px); }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease-out; }
.poster:hover img { transform: scale(1.03); }
.poster::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 0 var(--label); transition: box-shadow 0.15s;
  border-radius: inherit;
}
.poster:hover::after, .poster:focus-visible::after { box-shadow: inset 0 0 0 3px var(--label); }
.tc {
  position: absolute; left: 8px; bottom: 8px;
  font: 600 13px/1 var(--font-body); font-variant-numeric: tabular-nums;
  background: rgb(20 20 22 / 0.78); padding: 5px 7px; border-radius: 3px;
}
.tile .client, .pair .client { margin: 10px 0 2px; font-size: 14px; color: var(--ink-2); }
.tile h3 { font-size: 21px; font-weight: 600; }
.tile.land { display: grid; grid-template-rows: 1fr auto auto; }
.tile.land .poster { aspect-ratio: auto; min-height: 220px; }

/* Raw vs Edited */
.pairs { display: grid; gap: clamp(40px, 6vw, 72px); }
.pair { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 24px 40px; align-items: start; }
.pair-head { position: sticky; top: 84px; }
.pair h3 { font-size: clamp(26px, 3vw, 36px); }
.delta { color: var(--ink-2); margin: 10px 0 18px; }
.both {
  border: 1px solid var(--cerulean); color: var(--ink);
  padding: 9px 16px; border-radius: var(--r); font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.both:hover, .both[aria-pressed="true"] { background: var(--cerulean); color: #16191d; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; }
.duo figure { margin: 0; min-width: 0; }
.duo figcaption { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 8px; }

/* Player */
.stage {
  position: relative; aspect-ratio: 9 / 16; background: #1b1c1e;
  border-radius: var(--r); overflow: hidden;
}
.duo .stage.land { aspect-ratio: 9 / 16; }
/* A pair shot and delivered in landscape stacks the two 16:9 players */
.pair.land .duo { grid-template-columns: 1fr; max-width: 820px; }
.pair.land .duo .stage.land { aspect-ratio: 16 / 9; }
.stage video { width: 100%; height: 100%; object-fit: contain; background: #1b1c1e; }
.stage .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .shield { position: absolute; inset: 0; }
.stage .big {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgb(20 20 22 / 0.72); display: grid; place-items: center;
  transition: transform 0.15s, opacity 0.2s;
}
.stage .big:hover { transform: scale(1.06); }
.stage.playing .big { opacity: 0; pointer-events: none; }
.stage svg { width: 22px; height: 22px; fill: var(--ink); }
.stage .wm {
  position: absolute; right: 10px; top: 10px; pointer-events: none;
  font: 600 12px var(--font-body); color: rgb(255 255 255 / 0.42);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}
.stage .wait { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px; border: 3px solid rgb(255 255 255 / 0.25); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.8s linear infinite; display: none; }
.stage.loading .wait { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.ctl {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px; padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgb(15 15 17 / 0.85));
  opacity: 0; transition: opacity 0.2s;
}
.stage:hover .ctl, .stage.paused.started .ctl, .stage:focus-within .ctl { opacity: 1; }
.ctl button { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 4px; }
.ctl button svg { width: 18px; height: 18px; }
.ctl .t { font: 500 12px var(--font-body); font-variant-numeric: tabular-nums; color: var(--ink); flex: none; }
.bar { flex: 1; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.bar i { position: relative; display: block; width: 100%; height: 4px; background: rgb(255 255 255 / 0.25); border-radius: 2px; }
.bar b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--playhead); border-radius: 2px; }
.bar b::after { content: ""; position: absolute; right: -1px; top: -5px; width: 2px; height: 14px; background: var(--playhead); }
.stage:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }

/* Viewer dialog */
dialog#viewer {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  max-width: none; max-height: none; width: 100%; height: 100%;
}
dialog#viewer::backdrop { background: rgb(22 22 24 / 0.92); }
dialog#viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.viewer-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; width: min(100%, var(--vw, 420px)); }
.viewer-head .client { margin: 0; color: var(--ink-2); font-size: 14px; }
.viewer-head h3 { font-size: 24px; }
.close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--panel); flex: none; }
.close svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; fill: none; }
#vStage { height: min(78vh, 760px); width: auto; }
#vStage.land { aspect-ratio: 16 / 9; height: auto; width: min(100%, 1100px); }

/* Footer */
.foot { padding: 28px var(--gut) 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }

@media (max-width: 760px) {
  .mark span { display: none; }
  .top nav a { padding: 8px; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .tile h3 { font-size: 18px; }
  .pair { grid-template-columns: 1fr; }
  .pair-head { position: static; }
  .clip span { display: none; }
  #vStage { height: min(72vh, 680px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; }
}
