@font-face {
  font-family: "Jost";
  src: url("/assets/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #060606;
  --ink: #f4f0ea;
  --ink-soft: rgba(244, 240, 234, 0.68);
  --line: rgba(244, 240, 234, 0.15);
  --gold: #e6bd8e;
  --pad: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.45 "Jost", system-ui, sans-serif;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
img, svg, video { display: block; }
h1, h2, p { margin: 0; font-weight: inherit; }

/* Hero: one shot, four tall windows onto it */

.hero {
  position: relative;
  height: calc(100svh - 64px);
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

.hero__still img,
.hero__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__film { opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__film.is-on { opacity: 1; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(6, 6, 6, 0.6) 0%,
    rgba(6, 6, 6, 0.16) 34%,
    rgba(6, 6, 6, 0) 52%,
    rgba(6, 6, 6, 0.5) 74%,
    rgba(6, 6, 6, 0.92) 100%
  );
}

.hero__title {
  position: absolute;
  z-index: 3;
  top: var(--pad);
  left: var(--pad);
  right: var(--pad);
  pointer-events: none;
  animation: rise 1.5s var(--ease) both;
}

.wordmark { width: 100%; height: auto; }

.hero__title p {
  margin-top: clamp(12px, 1.5vw, 20px);
  font-size: clamp(17px, 1.5vw, 22px);
  color: var(--ink);
}

.platforms {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.platform {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: end;
  column-gap: 12px;
  padding: var(--pad);
  border-left: 1px solid var(--line);
  animation: rise 1.3s var(--ease) both;
}

.platform:first-child { border-left: 0; }
.platform:nth-child(2) { animation-delay: 0.08s; }
.platform:nth-child(3) { animation-delay: 0.16s; }
.platform:nth-child(4) { animation-delay: 0.24s; }

.platform::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, 0.62);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

.platform > * { position: relative; }

.platforms:hover .platform:not(:hover)::before,
.platforms:has(.platform:focus-visible) .platform:not(:focus-visible)::before { opacity: 1; }

.platform:focus-visible { outline-offset: -8px; }

.platform__icon { grid-column: 1 / -1; display: block; width: 22px; height: 22px; margin-bottom: 18px; }
.platform__icon svg { width: 100%; height: 100%; fill: currentColor; }

.platform__name {
  font-size: clamp(30px, 2.9vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.platform__meta {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-soft);
}

.platform__go {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--ease), color 0.5s var(--ease);
}

.platform__go svg, .more svg { width: 100%; height: 100%; }

.platform:hover .platform__go { transform: translate(4px, -4px); color: var(--gold); }

/* Latest work, on the same four columns */

.row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.row__label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: var(--pad);
}

.row__label h2 {
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.15;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-soft);
  transition: color 0.4s var(--ease);
}

.more svg { width: 12px; height: 12px; }
.more:hover { color: var(--gold); }

.card {
  display: block;
  padding: var(--pad);
  border-left: 1px solid var(--line);
}

.card__frame {
  display: block;
  overflow: hidden;
  background: #111;
}

.card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.card:hover .card__frame img { transform: scale(1.03); }

.card--film .card__frame { aspect-ratio: 16 / 9; }
.card--short .card__frame { aspect-ratio: 9 / 16; }

.card__title {
  display: block;
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.3;
}

.card__date {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: var(--pad);
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
}

.foot nav { display: flex; gap: 24px; }
.foot a { transition: color 0.4s var(--ease); }
.foot a:hover { color: var(--ink); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Phones and narrow windows: the four windows become four rows */

@media (max-width: 820px) {
  .hero { height: 100svh; min-height: 640px; }

  .hero::after {
    background: linear-gradient(
      to bottom,
      rgba(6, 6, 6, 0.66) 0%,
      rgba(6, 6, 6, 0.1) 26%,
      rgba(6, 6, 6, 0) 42%,
      rgba(6, 6, 6, 0.78) 62%,
      rgba(6, 6, 6, 0.95) 100%
    );
  }

  .platforms {
    inset: auto 0 0;
    display: block;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .platform {
    display: grid;
    grid-template-columns: 24px 1fr 16px;
    align-items: center;
    column-gap: 16px;
    min-height: 74px;
    padding: 12px var(--pad);
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .platform:first-child { border-top: 1px solid var(--line); }

  .platform__icon { grid-column: 1; grid-row: 1 / span 2; width: 24px; height: 24px; margin: 0; }
  .platform__name { grid-column: 2; grid-row: 1; font-size: 24px; }
  .platform__meta {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 0;
    font-size: 15px;
  }

  .platform__go {
    grid-column: 3;
    grid-row: 1 / span 2;
    width: 16px;
    height: 16px;
  }

  .platform:hover .platform__go { transform: none; }
  .platform:active { background: rgba(244, 240, 234, 0.06); }

  .row { display: block; }

  .row__label {
    flex-direction: row;
    align-items: baseline;
    padding-bottom: 8px;
  }

  .card { padding: 12px var(--pad) var(--pad); border-left: 0; }
  .card + .card { padding-top: var(--pad); border-top: 1px solid var(--line); }

  /* Shorts: a row of three that still fits a phone */
  .row--shorts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 10px;
    padding: 0 var(--pad) var(--pad);
  }

  .row--shorts .row__label { grid-column: 1 / -1; padding: var(--pad) 0 12px; }
  .row--shorts .card { padding: 0; border: 0; }
  .row--shorts .card + .card { padding: 0; border: 0; }
  .row--shorts .card__title { margin-top: 10px; font-size: 15px; line-height: 1.25; }
  .row--shorts .card__date { display: none; }
}

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