/* =========================================================
   ALL GUD FILMS
   Mobile first. Black background, cream type.
   ========================================================= */

:root {
  --gutter: 16px;
  --display: "Noto Serif Display", "Bodoni Moda", Didot, Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --wipe: 1100ms;
  --ease: cubic-bezier(.72, 0, .18, 1);

  --bg: #0b0b0a;
  --fg: #f1ede5;
  --muted: rgba(241, 237, 229, .46);
  --faint: rgba(241, 237, 229, .14);
  --tile: #171716;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

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

.site-header {
  position: relative;
  z-index: 3;
  padding: calc(var(--gutter) - 2px) var(--gutter) 0;
}

/* Logo masthead: fills the width on phones; on wider screens it is
   capped by height and centred, and the menu spans the logo's width. */
.masthead {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.wordmark { display: block; }

.wordmark img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - var(--gutter) * 2);
  max-height: 24vh;
}
.home .wordmark img { max-height: 30vh; }

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.nav a { transition: opacity .25s; }
.nav a[aria-current="page"] { opacity: .42; }
.nav a:hover { opacity: .6; }

@media (min-width: 900px) {
  :root { --gutter: 24px; }
  .nav {
    justify-content: space-between;
    font-size: 14px;
    margin-top: 14px;
  }
}

/* ---------- Home ---------- */

body.home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reel {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  overflow: hidden;
}

.reel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(100% 0 0 0);
}

.reel video.is-active,
.reel video.is-entering.go { clip-path: inset(0 0 0 0); }
.reel video.is-entering { z-index: 2; transition: clip-path var(--wipe) var(--ease); }
.reel video.is-active { z-index: 1; }

/* scrims keep the type readable over bright footage */
.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  z-index: 3;
  pointer-events: none;
}
.reel::before { top: 0; height: 48%; background: linear-gradient(rgba(0,0,0,.58), rgba(0,0,0,.22) 55%, rgba(0,0,0,0)); }
.reel::after { bottom: 0; height: 22%; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.4)); }

.home .site-header { color: #f1ede5; }

.reel-caption {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 0 var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  color: #f1ede5;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.reel-ticks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.reel-ticks button {
  height: 14px;
  position: relative;
}
.reel-ticks button::before,
.reel-ticks button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: currentColor;
  opacity: .32;
}
.reel-ticks button::after { opacity: 1; transform-origin: left; transform: scaleX(0); }
.reel-ticks button.done::after { transform: scaleX(1); }
.reel-ticks button.now::after { animation: tick var(--slide, 7000ms) linear forwards; }
@keyframes tick { to { transform: scaleX(1); } }

.reel-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.reel-meta a { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reel-meta .count { opacity: .6; margin-right: 14px; font-variant-numeric: tabular-nums; }
.reel-meta a:hover .title { opacity: .7; }
.reel-meta .cat { opacity: .6; white-space: nowrap; }


/* ---------- Inner pages ---------- */

.page main {
  padding: 48px var(--gutter) 72px;
}

@media (min-width: 900px) {
  .page main { padding-top: 72px; }
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Work ---------- */

.work-list {
  display: grid;
  gap: 44px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .work-list { grid-template-columns: 1fr 1fr; gap: 56px 24px; }
}

.film { display: block; }

.film-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tile);
  overflow: hidden;
}

.film-media img,
.film-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-media video { opacity: 0; transition: opacity .4s; }
.film.previewing .film-media video { opacity: 1; }

.film-media .soon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.film-meta {
  display: grid;
  grid-template-columns: 2.4em 1fr auto;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.film-meta .num,
.film-meta .cat {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.film-meta .title {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 80%;
  font-variation-settings: "wdth" 80;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.film.is-placeholder { pointer-events: none; }
.film.is-placeholder .title { color: var(--muted); }

/* ---------- Overview ---------- */

.index {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.index li a,
.index .index-head {
  display: grid;
  grid-template-columns: 2.6em 1fr auto;
  gap: 10px;
  padding: 9px 0;
  align-items: baseline;
}

.index .index-head { color: var(--fg); padding-bottom: 14px; }
.index li a { color: var(--muted); transition: color .2s; }
.index li a:hover,
.index li a:focus-visible { color: var(--fg); }
.index li.is-placeholder a { opacity: .55; pointer-events: none; }

.index .sub { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: .14em; opacity: .75; }
.index .c-cat, .index .c-time { display: none; }
.index .c-year { text-align: right; }

@media (min-width: 900px) {
  .index { font-size: 13.5px; }
  .index li a,
  .index .index-head {
    grid-template-columns: 16% 43% 17% 1fr auto;
    gap: 0;
    padding: 6px 0;
  }
  .index .sub { display: none; }
  .index .c-cat, .index .c-time { display: block; }
}

.peek {
  position: fixed;
  z-index: 20;
  width: 300px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  left: 0; top: 0;
}
.peek.on { opacity: 1; }

/* ---------- About ---------- */

.about {
  display: grid;
  gap: 32px;
}

.portrait {
  aspect-ratio: 4 / 5;
  background: var(--tile);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.about h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 62.5%;
  font-variation-settings: "wdth" 62.5;
  font-size: clamp(56px, 17vw, 150px);
  line-height: .86;
  letter-spacing: -.03em;
}

.about .bio {
  max-width: 33em;
  margin-top: 28px;
  font-size: 17px;
  line-height: 1.6;
}
.about .bio p { margin: 0 0 1em; }

.contact {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--faint);
}
.contact li { border-bottom: 1px solid var(--faint); }
.contact a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
}
.contact .label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.contact .value { color: var(--muted); transition: color .2s; overflow-wrap: anywhere; text-align: right; }
.contact a:hover .value { color: var(--fg); }

@media (min-width: 900px) {
  .about {
    grid-template-columns: 5fr 7fr;
    gap: 4vw;
    align-items: start;
  }
  .portrait { position: sticky; top: 24px; }
  .about .text { padding-top: 4px; }
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer a:hover { color: var(--fg); }

/* ---------- Player ---------- */

.player {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 6, 6, .96);
  color: #f1ede5;
  display: none;
  flex-direction: column;
}
.player.open { display: flex; }
.player-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: var(--gutter);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.player-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter) calc(var(--gutter) * 2);
  min-height: 0;
}
.player video { width: 100%; max-height: 100%; background: #000; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .reel video.is-entering { transition: none; }
  .reel-ticks button.now::after { animation: none; transform: scaleX(1); }
}

/* keep the logo and menu legible over bright footage */
.home .wordmark img { filter: drop-shadow(0 2px 24px rgba(0, 0, 0, .28)); }
.home .nav, .reel-caption { text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }

/* home caption: now playing on the left, contact on the right */
.reel-meta .now-playing { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reel-meta .now-playing .cat { margin-left: 14px; }
.reel-meta .touch {
  flex: none;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
}
.reel-meta .touch:hover { opacity: .7; }
@media (max-width: 520px) { .reel-meta .now-playing .cat { display: none; } }

.footer-links { display: flex; gap: 22px; }

/* 404 */
body.lost {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--gutter);
}
.lost .wordmark img { max-width: min(520px, 80vw); max-height: none; margin: 0 auto 40px; }
.lost h1 {
  margin: 10px 0 28px;
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 80%;
  font-variation-settings: "wdth" 80;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.1;
}
.lost-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.lost-links a { border-bottom: 1px solid var(--faint); padding-bottom: 3px; }
.lost-links a:hover { border-color: currentColor; }
@media (max-width: 520px) { .reel-meta .count { display: none; } }

/* ---------- Work filter ---------- */
.filters {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  margin: 0 calc(var(--gutter) * -1) 30px;
  padding: 0 var(--gutter) 2px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
          mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none;
  padding: 6px 0 5px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.filters button:hover { color: var(--fg); }
.filters button[aria-pressed="true"] { color: var(--fg); border-color: currentColor; }
.work-list li[hidden] { display: none; }

@media (min-width: 900px) {
  .filters {
    flex-wrap: wrap;
    gap: 10px 30px;
    margin: 0 0 40px;
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .filters button { font-size: 12.5px; }
}
@media (max-width: 759px) {
  .film-meta { grid-template-columns: 2.4em 1fr; row-gap: 4px; }
  .film-meta .cat { grid-column: 2; }
}
