@font-face { font-family: "Archivo Black"; src: url("fonts/archivo-black-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #000;
  --paper: #fff;
  --quiet: #707070;
  --line: #e4e4e4;
  --gutter: clamp(16px, 3vw, 36px);
  --display: "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --text: "Karla", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--text); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -40px; background: var(--ink); color: var(--paper); padding: 6px 10px; z-index: 10; }
.skip:focus { top: 8px; }

/* Header */
.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "mark nav info" "by nav info";
  align-items: baseline;
  column-gap: 32px;
  padding: 22px var(--gutter) 28px;
}
.wordmark { grid-area: mark; font: 22px/1.1 var(--display); letter-spacing: -0.01em; }
.wordmark:hover { text-decoration: none; }
.byline { grid-area: by; margin: 2px 0 0; color: var(--quiet); font-size: 15px; }
.filters { grid-area: nav; justify-self: end; display: flex; gap: 22px; flex-wrap: wrap; }
.filters a, .info-open { font-weight: 700; font-size: 15px; }
.filters a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.info-open { grid-area: info; }

@media (max-width: 720px) {
  .site-header { grid-template-columns: 1fr auto; grid-template-areas: "mark info" "by by" "nav nav"; row-gap: 0; padding-bottom: 20px; }
  .filters { justify-self: start; margin-top: 18px; gap: 18px; }
}

/* Grid */
.grid {
  list-style: none;
  margin: 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(12px, 1.6vw, 24px);
  row-gap: clamp(28px, 3.2vw, 48px);
}
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.tile[hidden] { display: none; }
.tile a { display: block; }
.tile a:hover { text-decoration: none; }
.frame { display: block; aspect-ratio: 16 / 9; background: #f2f2f2; overflow: hidden; }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.tile-brand { display: block; margin-top: 12px; font: 15px/1.25 var(--display); }
.tile-name { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; }
.tile a:hover .tile-brand { text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 0 var(--gutter); color: var(--quiet); }

/* Project page */
.project {
  width: min(100% - 2 * var(--gutter), max(84svh * var(--arw), 760px));
  margin: 0 auto;
}
.player {
  position: relative;
  width: min(100%, calc(84svh * var(--arw)));
  aspect-ratio: var(--ar);
  margin: 0 auto;
  background: #000;
  color: #fff;
  overflow: hidden;
  user-select: none;
}
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player:fullscreen { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; }

.pl-big {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: transparent; transition: opacity .2s;
}
.pl-big span {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: rgba(0, 0, 0, .45); border: 1.5px solid rgba(255, 255, 255, .9);
}
.pl-big svg { width: 26px; height: 26px; margin-left: 4px; }
.player.started .pl-big { opacity: 0; pointer-events: none; }

.pl-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 28px 16px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  font-size: 13px; font-variant-numeric: tabular-nums;
  transition: opacity .25s;
}
.player:not(.started) .pl-bar { opacity: 0; pointer-events: none; }
.player.idle .pl-bar { opacity: 0; }
.player.idle { cursor: none; }
.pl-bar button { display: grid; place-items: center; min-width: 28px; height: 28px; }
.pl-bar svg { width: 20px; height: 20px; }
.pl-hd { font-weight: 700; font-size: 12px; letter-spacing: .02em; opacity: .55; }
.pl-hd[aria-pressed="true"] { opacity: 1; }
.pl-time { white-space: nowrap; }
.pl-seek {
  flex: 1; height: 28px; margin: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; --p: 0%;
}
.pl-seek::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(#fff, #fff) 0 / var(--p) 100% no-repeat, rgba(255, 255, 255, .35); }
.pl-seek::-moz-range-track { height: 3px; background: rgba(255, 255, 255, .35); }
.pl-seek::-moz-range-progress { height: 3px; background: #fff; }
.pl-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #fff; border: 0; }
.pl-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.player :focus-visible { outline-color: #fff; }
@media (max-width: 560px) { .pl-bar { gap: 10px; padding-inline: 10px; } .pl-time { font-size: 12px; } }

.project-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: var(--gutter);
  margin-top: 28px;
}
.project-text h1 { grid-column: 1; margin: 0; font-weight: 400; }
.project-brand { display: block; font: clamp(22px, 2.6vw, 34px)/1.1 var(--display); letter-spacing: -0.01em; }
.project-name { display: block; margin-top: 6px; font: clamp(18px, 1.8vw, 22px)/1.25 var(--text); }
.project-meta { grid-column: 1; margin: 8px 0 0; color: var(--quiet); }
.credits, .more-credits { grid-column: 2; }
.credits { grid-row: 1 / span 3; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; align-content: start; }
.more-credits .credits { margin-top: 14px; }
.credits dt { color: var(--quiet); font-size: 14px; }
.credits dd { margin: 0; }
.more-credits { margin-top: 18px; }
.more-credits summary { font-weight: 700; cursor: pointer; width: max-content; }
@media (max-width: 720px) {
  .project-text { grid-template-columns: minmax(0, 1fr); }
  .credits, .more-credits { grid-column: 1; }
  .credits { grid-row: auto; margin-top: 22px; }
}

.pager {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line);
  font: 15px/1.25 var(--display);
}
.pager span { display: block; font: 400 14px var(--text); color: var(--quiet); margin-bottom: 4px; }
.pager .next { text-align: right; }
.pager em { display: block; font: 400 15px/1.35 var(--text); font-style: normal; margin-top: 2px; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: clamp(64px, 8vw, 120px);
  padding: 20px var(--gutter) 28px;
  font-size: 14px; color: var(--quiet);
}
.site-footer a { color: var(--ink); }

/* Info panel */
.info {
  margin: 0 0 0 auto; height: 100%; max-height: none; width: min(460px, 100%);
  padding: 0; border: 0; background: var(--paper); color: var(--ink);
  overflow-y: auto;
}
.info::backdrop { background: rgba(255, 255, 255, .7); }
.info[open] { animation: slide-in .28s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.info-inner { padding: 22px var(--gutter) 40px; border-left: 1px solid var(--line); min-height: 100%; }
.info-close { font-weight: 700; display: block; margin-left: auto; }
.info h2 { font: 22px/1.1 var(--display); margin: 28px 0 18px; }
.info h3 { font: 15px/1.25 var(--display); margin: 28px 0 6px; }
.info p { margin: 0 0 12px; max-width: 60ch; }
.portrait { margin: 0 0 20px; }
.portrait img { width: 100%; height: auto; }
.portrait figcaption { margin-top: 6px; font-size: 13px; color: var(--quiet); }
.clients { color: var(--ink); }
.links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 700; }

.notfound { padding: 40px var(--gutter); max-width: 60ch; }
.notfound h1 { font: 28px/1.1 var(--display); }
.notfound a { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
