/* awy.studio
   Light table (light grey) for reading, the screen (near black) for watching.
   Burn-in yellow is the timecode colour from the contact sheets: playhead, highlights, the one button. */

:root {
  --table: #E8E9E5;
  --ink: #0F1012;
  --graphite: #55585F;
  --rule: rgb(15 16 18 / .16);
  --screen: #0B0C0E;
  --screen-2: #17191C;
  --screen-ink: #E8E9E5;
  --screen-dim: #8E9298;
  --screen-rule: rgb(232 233 229 / .14);
  --burn: #FFE433;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --section: clamp(72px, 11vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.6vw, 4.25rem); font-stretch: 112%; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.eyebrow,
figcaption,
.readout {
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.5;
  letter-spacing: .04em;
}
.eyebrow { text-transform: uppercase; letter-spacing: .1em; color: var(--graphite); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.work :focus-visible, .foot :focus-visible { outline-color: var(--burn); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--burn); padding: .5em 1em; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Header ---------------------------------------------------------------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 20px;
}
.brand {
  font-weight: 800; font-stretch: 125%; font-size: 1.25rem; letter-spacing: -.02em;
  text-decoration: none;
}
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-size: .9375rem; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Language switch: the current language in ink, the other one in graphite. */
.lang { display: flex; align-items: center; gap: .4em; font-family: var(--mono); font-size: .8125rem; letter-spacing: .04em; color: var(--graphite); }
.lang a:not([aria-current]) { color: var(--graphite); }
.lang a:not([aria-current]):hover { color: var(--ink); }

/* Hero ------------------------------------------------------------------ */

.hero { padding-top: clamp(40px, 8vw, 112px); padding-bottom: var(--section); }
.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.4rem, 6.6vw, 6.9rem);
  font-stretch: 112%;
  line-height: .95;
  letter-spacing: -.025em;
}
.lead { max-width: 46ch; margin-top: clamp(28px, 4vw, 48px); font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--graphite); }

/* Contact sheet: dark print on the light table, the "current" frame steps on the bar */
.sheet { margin: clamp(48px, 7vw, 88px) 0 0; }
.sheet-grid {
  list-style: none; margin: 0; padding: 6px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  background: var(--ink);
}
.sheet-grid button {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: #000; cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden;
}
.sheet-grid img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.sheet-grid button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--burn); transition: box-shadow .12s;
}
.sheet-grid button:hover::after,
.sheet-grid button.is-now::after { box-shadow: inset 0 0 0 3px var(--burn); }
.tc {
  position: absolute; left: 0; top: 0;
  padding: 2px 6px;
  font-family: var(--mono); font-size: .6875rem; font-weight: 500; line-height: 1.4;
  background: rgb(0 0 0 / .72); color: var(--burn);
}
.is-now .tc, button:hover .tc { background: var(--burn); color: var(--ink); }
.sheet figcaption {
  display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
  margin-top: 12px; color: var(--graphite);
}
.beat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.beat i {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: transparent;
}
.beat i.on { background: var(--ink); }
.beat i.on:first-child { background: var(--burn); }
@media (max-width: 760px) {
  .sheet-grid { grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; }
  .tc { font-size: .625rem; padding: 1px 4px; }
}

/* Work: the screening room ---------------------------------------------- */

.work {
  background: var(--screen); color: var(--screen-ink);
  padding-block: var(--section);
}
.work .eyebrow { color: var(--screen-dim); }
.work-head {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 64px; align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.work-head h2 { margin-top: 16px; }
.work-lede { margin-top: 24px; max-width: 58ch; color: var(--screen-dim); }
.work-head .eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.work .tag {
  padding: 2px 8px;
  border: 1px solid var(--burn); border-radius: 2px; color: var(--burn);
}
.disclaimer { margin-top: 14px; max-width: 58ch; font-family: var(--mono); font-size: .75rem; line-height: 1.5; color: var(--screen-dim); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; margin: 0; }
.meta div { border-top: 1px solid var(--screen-rule); padding-top: 10px; }
.meta dt { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--screen-dim); }
.meta dd { margin: 4px 0 0; font-weight: 600; }
@media (max-width: 900px) {
  .work-head { grid-template-columns: 1fr; }
}

.film { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* Score: scenes over the spectrogram, beat grid on top, one playhead for both */
.score {
  --total: 15;
  position: relative; margin-top: 2px;
  display: grid; grid-template-rows: 40px clamp(64px, 9vw, 112px);
  background: var(--screen-2);
  cursor: pointer; touch-action: none; user-select: none;
}
.score:focus-visible { outline-offset: 4px; }
.score-scenes {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--total), 1fr);
}
.score-scenes li {
  grid-column: span var(--bars);
  display: flex; align-items: center; min-width: 0;
  padding-inline: 8px;
  border-left: 1px solid var(--screen-rule);
  font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--screen-dim);
  transition: background-color .12s, color .12s;
}
.score-scenes li span { overflow: hidden; white-space: nowrap; }
.score-scenes li.is-cramped span { visibility: hidden; }
.score-scenes li.is-now { background: var(--burn); color: var(--ink); }
.score-spec { width: 100%; height: 100%; object-fit: fill; opacity: .9; }
.score-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgb(255 255 255 / .28) 1px, transparent 1px) 0 0 / calc(100% / var(--total)) 100%,
    linear-gradient(to right, rgb(255 255 255 / .1) 1px, transparent 1px) 0 0 / calc(100% / (var(--total) * 4)) 100%;
}
.score-head, .score-hover {
  position: absolute; top: -6px; bottom: 0; left: 0; width: 2px; margin-left: -1px;
  pointer-events: none; will-change: transform;
}
.score-head { background: var(--burn); box-shadow: 0 0 0 1px rgb(0 0 0 / .35); }
.score-head::before {
  content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0;
  border: 6px solid transparent; border-top: 7px solid var(--burn); border-bottom: 0;
}
.score-hover { background: rgb(255 255 255 / .5); opacity: 0; transition: opacity .12s; }
.score:hover .score-hover { opacity: 1; }

.readout {
  display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: baseline;
  margin-top: 14px; color: var(--screen-dim); font-size: .8125rem;
}
.readout-tc { color: var(--burn); font-weight: 700; font-variant-numeric: tabular-nums; }
.readout-scene { text-transform: uppercase; letter-spacing: .08em; color: var(--screen-ink); }

@media (max-width: 640px) {
  .score { grid-template-rows: 28px 64px; }
  .score-scenes li span { display: none; }
}

/* Process --------------------------------------------------------------- */

.process { padding-block: var(--section); }
.steps { list-style: none; margin: clamp(32px, 5vw, 64px) 0 0; padding: 0; }
.step {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 80px);
  padding-block: clamp(32px, 4.5vw, 56px);
  border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step-n { display: block; font-family: var(--mono); font-size: .8125rem; font-weight: 500; color: var(--graphite); margin-bottom: 14px; }
.step h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); font-stretch: 106%; margin-bottom: 14px; }
.step p { color: var(--graphite); max-width: 52ch; }
.step figure { margin: 0; }
.step figcaption { margin-top: 10px; color: var(--graphite); }
.zoom { display: block; cursor: zoom-in; background: var(--ink); }
.zoom img { width: 100%; transition: opacity .2s; }
.zoom:hover img { opacity: .88; }
@media (max-width: 900px) {
  .step { grid-template-columns: minmax(0, 1fr); }
}

/* v1 vs v2 on one time axis: a cell is one bar */
.versions { margin-top: 28px; max-width: 52ch; }
.ver { display: grid; grid-template-columns: 9.5em 1fr; align-items: center; gap: 12px; margin-bottom: 8px; }
.ver-label { font-family: var(--mono); font-size: .75rem; color: var(--ink); white-space: nowrap; }
.strip {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(15, 1fr); gap: 2px;
}
.strip li {
  grid-column: span var(--bars);
  height: 22px; display: grid; place-items: center;
  background: rgb(15 16 18 / .1); border: 1px solid rgb(15 16 18 / .22);
  font-family: var(--mono); font-size: .625rem; color: var(--graphite);
}
.strip li.grew { background: var(--burn); border-color: var(--ink); color: var(--ink); }
.ver-note { margin-top: 10px; font-family: var(--mono); font-size: .75rem; color: var(--graphite); }
.ver-note i {
  display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px;
  background: var(--burn); border: 1px solid var(--ink);
}

/* Project index on the home page --------------------------------------- */

.index { padding-bottom: var(--section); }
.cards {
  list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px);
}
.card a { display: block; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink); outline: 6px solid var(--ink); outline-offset: -6px; }
.card a:hover img { outline-color: var(--burn); }
.card-text { display: block; margin-top: 16px; }
.card-meta { display: block; font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; color: var(--graphite); }
.card-title { display: block; margin-top: 6px; font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 800; font-stretch: 106%; line-height: 1.1; }
.card a:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.card-desc { display: block; margin-top: 8px; max-width: 52ch; color: var(--graphite); }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* Project page (counter-strike/) ---------------------------------------- */

.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.project-head { padding-top: clamp(40px, 8vw, 112px); padding-bottom: var(--section); }
.project-head .work-head { margin-bottom: 0; align-items: start; }
.project-head h1 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 8.4vw, 8.75rem); font-stretch: 112%; line-height: .92; letter-spacing: -.03em;
}
.nowrap { white-space: nowrap; }
.project-head .eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.project-head .work-lede { margin-top: clamp(24px, 3vw, 36px); font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--graphite); }
.project-head .disclaimer { color: var(--graphite); }
.tag { padding: 2px 8px; border-radius: 2px; background: var(--burn); color: var(--ink); }
.meta.on-table div { border-top-color: var(--rule); }
.meta.on-table dt { color: var(--graphite); }
.sheet-grid.years { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 760px) { .sheet-grid.years { grid-template-columns: repeat(3, 1fr); } }

.work-bare { padding-block: clamp(32px, 5vw, 64px) var(--section); }

/* Code and terminal panels in the process steps */
.code {
  margin: 0; padding: clamp(16px, 2.4vw, 28px);
  background: var(--screen); color: var(--screen-ink);
  font-family: var(--mono); font-size: clamp(.75rem, 1.05vw, .875rem); line-height: 1.65;
  overflow-x: auto; tab-size: 2;
}
.code .c { color: var(--screen-dim); }
.code .k { color: var(--burn); }
.code .s { color: #B9E3A1; }

/* Versions: one frame, one chip per version on a 1-14 axis */
.vrow {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(32px, 5vw, 80px);
  padding-block: clamp(32px, 4.5vw, 56px);
  border-top: 1px solid var(--screen-rule);
}
.vrow h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); font-stretch: 106%; margin-bottom: 14px; }
.vrow > div > p { color: var(--screen-dim); max-width: 44ch; }
.vers { margin: 0; }
.vers-frame { display: grid; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.vers-frame img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s; }
.vers-frame img.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .vers-frame img { transition: none; } }
.vers-bar {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 2px; margin-top: 2px;
  background: linear-gradient(to right, var(--screen-2) calc(100% - 2px), transparent 0) 0 0 / calc((100% + 2px) / 14) 100%;
}
.vers-bar button {
  grid-row: 1; grid-column: var(--v);
  min-width: 0; padding: 9px 0; border: 0; border-radius: 0; cursor: pointer;
  background: #2A2D32; color: var(--screen-ink);
  font-family: var(--mono); font-size: .8125rem; font-weight: 700;
}
.vers-bar button:hover { background: #3A3E45; }
.vers-bar button[aria-pressed="true"] { background: var(--burn); color: var(--ink); }
.vers-bar button:focus-visible { outline-offset: 2px; }
.vers-axis { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: .6875rem; color: var(--screen-dim); }
.vers figcaption { font-family: var(--display); font-size: 1rem; letter-spacing: 0; line-height: 1.6; }
.vers-note { margin-top: 18px; max-width: 62ch; }
.vers-note p { color: var(--screen-ink); }
@media (max-width: 900px) { .vrow { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .vers-bar button { font-size: .6875rem; letter-spacing: -.04em; } }

.stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 32px;
  margin: clamp(40px, 6vw, 72px) 0 0;
}
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; border-top: 1px solid var(--screen-rule); padding-top: 12px; }
.stats dd { margin: 0; font-size: clamp(2rem, 4.4vw, 3.75rem); font-weight: 800; font-stretch: 112%; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats dt { margin-top: 8px; font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; color: var(--screen-dim); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Making-of */
.more { padding-block: var(--section); }
.clip {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 80px);
  margin-top: clamp(32px, 5vw, 64px);
  padding-block: clamp(32px, 4.5vw, 56px);
  border-block: 1px solid var(--rule);
}
.clip p { color: var(--graphite); max-width: 52ch; }
.clip .meta { margin-top: 28px; }
.clip video { width: 100%; background: #000; }
@media (max-width: 900px) { .clip { grid-template-columns: minmax(0, 1fr); } }

/* Footer ---------------------------------------------------------------- */

.foot { background: var(--screen); color: var(--screen-dim); font-family: var(--mono); font-size: .9rem; font-weight: 700; }
.foot .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
  padding-block: 24px 32px; border-top: 1px solid var(--screen-rule);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--burn); }

/* Lightbox -------------------------------------------------------------- */

.lightbox {
  width: min(96vw, 2000px); max-width: none; max-height: 94vh;
  padding: 0; border: 0; background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgb(11 12 14 / .92); }
.lightbox img { width: 100%; max-height: 94vh; object-fit: contain; }
.lightbox-close {
  position: absolute; right: 0; top: -40px;
  padding: 6px 12px; cursor: pointer;
  background: var(--burn); color: var(--ink); border: 0; border-radius: 2px;
  font-family: var(--mono); font-size: .8125rem; font-weight: 700;
}
