@font-face {
  font-family: "Mojave";
  src: url("fonts/Mojave.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #000000;
  --orange: #e3dac9;
  --orange-dim: #7d776b;
  --white: #f5f2ec;
  --tile: #0d0d0d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--orange);
  font-family: "IBM Plex Mono", monospace;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 64px 0;
}

.logo {
  font-family: "Mojave", "UnifrakturMaguntia", serif;
  font-size: 44px;
  color: var(--orange);
  text-decoration: none;
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 56px;
  margin-left: auto;
  justify-content: flex-end;
  align-items: baseline;
}

.nav-link {
  color: var(--orange);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-link.active {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-link:hover,
.nav-drop-trigger:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.logo:hover {
  opacity: 0.85;
}

/* Dropdown menus */
.nav-item {
  position: relative;
}

.nav-drop-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

.nav-drop-trigger .caret {
  display: inline-block;
  margin-left: 7px;
  font-size: 10px;
  opacity: 0.6;
  transform: translateY(-1px);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: -22px;
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 18px 22px 20px;
  background: rgba(10, 10, 10, 0.94);
  min-width: 150px;
  z-index: 30;
}

.nav-item:hover .dropdown,
.nav-item.open .dropdown,
.nav-item:focus-within .dropdown {
  display: flex;
}

/* Frames gallery */
.frames-gallery {
  column-count: 3;
  column-gap: 36px;
  padding: 120px 64px 84px;
  max-width: 1680px;
  margin: 0 auto;
}

/* frames.js wraps each img in a .frame-shell so the hover push-in stays
   clipped to the frame instead of spilling over the column gaps. The shell
   carries the column layout; the img just fills it. */
.frames-gallery .frame-shell {
  margin-bottom: 36px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  overflow: hidden;
}

.frames-gallery img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  /* Same treatment as the gallery tiles: frames dissolve in as they load
     rather than snapping into the column on scroll. */
  opacity: 0;
  transition: opacity 0.7s ease, scale 1.4s cubic-bezier(0.16, 0.7, 0.25, 1);
}

.frames-gallery img.is-loaded {
  opacity: 1;
}

.frames-gallery img:hover {
  scale: 1.055;
}

/* After the hover rule, so the no-motion override wins at equal specificity. */
@media (prefers-reduced-motion: reduce) {
  .frames-gallery img {
    transition: none;
  }

  .frames-gallery img:hover {
    scale: none;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  cursor: pointer;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  cursor: default;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 46px;
  line-height: 1;
  padding: 18px 22px;
  cursor: pointer;
}

.lightbox-nav:hover {
  color: var(--white);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--orange-dim);
  font-size: 12px;
  letter-spacing: 0.24em;
}

@media (max-width: 1200px) {
  .frames-gallery {
    column-count: 2;
    column-gap: 28px;
    padding: 96px 40px 72px;
  }

  .frames-gallery .frame-shell {
    margin-bottom: 28px;
  }
}

/* Blank placeholder pages */
.placeholder-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-note {
  color: var(--orange-dim);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* Landing / home */
body.landing {
  height: 100dvh;
  overflow: hidden;
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.hero {
  position: fixed;
  inset: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.05) 30%,
    rgba(0, 0, 0, 0.05) 70%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 40px);
  text-align: center;
  color: var(--white);
  font-family: "Mojave", "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: clamp(26px, 4.4vw, 74px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

a.hero-text {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a.hero-text:hover {
  opacity: 0.72;
}

.hero-logo {
  height: 1.65em;
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4));
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  row-gap: 64px;
  padding: 200px 64px 120px;
  max-width: 1680px;
  margin: 0 auto;
}

.project {
  display: block;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
  padding: 0;
  /* Held back until app.js confirms the artwork is ready, then eased up. The
     script always adds .is-ready, on a failsafe timer if nothing else. */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.project.is-ready {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .project {
    transition: none;
    transform: none;
  }

}

.thumb-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--tile);
  /* The picture dissolves out of the empty tile once it loads. Separate from
     the tile's own fade so a lazy image far down the page still arrives
     softly rather than snapping in when you scroll to it. */
  opacity: 0;
  transition: opacity 0.7s ease;
}

.thumb-frame.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .thumb-frame {
    transition: none;
  }
}

.project .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--tile);
  pointer-events: none; /* a <video> tile must not swallow the tile's click */
  /* Slow push-in on hover; .thumb-frame's overflow:hidden clips it. The
     `scale` property, not `transform`, so it multiplies with the inline
     letterbox-crop transform app.js puts on some thumbs instead of being
     beaten by it. */
  transition: scale 1.4s cubic-bezier(0.16, 0.7, 0.25, 1);
}

.project:hover .thumb {
  scale: 1.055;
}

/* After the hover rule, so the no-motion override wins at equal specificity. */
@media (prefers-reduced-motion: reduce) {
  .project .thumb {
    transition: none;
  }

  .project:hover .thumb {
    scale: none;
  }
}

.project .thumb-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--tile);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project .thumb-empty span {
  color: var(--orange-dim);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.project .title {
  margin-top: 22px;
  color: var(--orange);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.project.placeholder {
  cursor: default;
}

.project.placeholder .title {
  color: var(--orange-dim);
}

.gallery-status {
  grid-column: 1 / -1;
  color: var(--orange-dim);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 80px 0;
}

/* Combined work page — every category in one grid, narrowed by the filter row */
.work-page {
  max-width: 1680px;
  margin: 0 auto;
  /* No page title above it, so this padding is the whole gap under the header. */
  padding: 120px 64px 0;
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(227, 218, 201, 0.16);
}

.work-filter {
  background: none;
  border: none;
  padding: 0 0 6px;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease;
}

.work-filter:hover {
  color: var(--orange);
}

.work-filter.active {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* Doubled class so the page-level .gallery rules further down do not win */
.gallery.work-gallery {
  padding: 72px 0 120px;
  max-width: none;
}

/* [hidden] alone loses to .project's display, so the filter needs this */
.work-gallery .project[hidden] {
  display: none;
}

.work-gallery .subtitle {
  margin-top: 8px;
  color: var(--orange-dim);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .work-page {
    padding: 56px 24px 0;
  }

  .work-filters {
    gap: 24px;
  }

  .work-filter {
    font-size: 12px;
  }

  .gallery.work-gallery {
    padding: 44px 0 80px;
  }

  .work-gallery .subtitle {
    font-size: 11px;
  }
}

/* Video player overlay */
.player {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.player[hidden] {
  display: none;
}

.player-inner {
  width: min(1400px, 100%);
}

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

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-title {
  margin-top: 20px;
  color: var(--orange);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player-close {
  position: absolute;
  top: 28px;
  right: 40px;
  background: none;
  border: none;
  color: var(--orange);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

.player-close:hover {
  color: var(--white);
}

@media (max-width: 900px) {
  .site-header {
    padding: 28px 24px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .logo {
    font-size: 36px;
  }

  .site-nav {
    gap: 32px;
  }

  .gallery {
    grid-template-columns: 1fr;
    row-gap: 48px;
    padding: 72px 24px 80px;
  }

  .project .title {
    margin-top: 14px;
    font-size: 13px;
  }

  .hero-title {
    white-space: normal;
    flex-direction: column;
    gap: 20px;
    font-size: 24px;
    letter-spacing: 0.14em;
    line-height: 1.7;
  }

  .hero-logo {
    height: 72px;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .frames-gallery {
    column-count: 1;
    padding: 48px 24px 48px;
  }

  .frames-gallery .frame-shell {
    margin-bottom: 32px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-nav {
    font-size: 34px;
    padding: 14px 10px;
  }

  .lightbox-prev {
    left: 0;
  }

  .lightbox-next {
    right: 0;
  }

  .player {
    padding: 16px;
  }

  .player-close {
    top: 14px;
    right: 14px;
  }
}

/* Screen-reader-only headings for pages whose design carries no visible title */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* About */
.about-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 64px 120px;
}

.about-lead {
  color: var(--white);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.55;
  letter-spacing: 0.04em;
  max-width: 34ch;
}

.about-body p {
  margin-top: 30px;
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: var(--orange);
}

.about-body p:first-child {
  margin-top: 56px;
}

.about-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 24px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid rgba(227, 218, 201, 0.16);
}

.about-contact a {
  color: var(--orange);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-contact a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.about-contact .sep {
  color: var(--orange-dim);
  font-size: 14px;
}

/* About — additional credits */
.about-credits {
  margin-top: 88px;
  padding-top: 28px;
  border-top: 1px solid rgba(227, 218, 201, 0.16);
}

.about-credits h2 {
  color: var(--white);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.credits-note {
  margin-top: 10px;
  color: var(--orange-dim);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.09em;
}

.credits-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin-top: 40px;
}

.credits-grid img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--tile);
  filter: grayscale(35%) brightness(0.85);
  transition: filter 0.3s ease;
}

.credits-grid li:hover img {
  filter: none;
}

.credits-title {
  display: block;
  margin-top: 12px;
  color: var(--orange);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.credits-role {
  display: block;
  margin-top: 4px;
  color: var(--orange-dim);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.credits-grid li:hover .credits-title {
  color: var(--white);
}

/* Gear */
.gear-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 110px 64px 120px;
}

/* Left rail of behind-the-scenes stills. The column only opens up once the
   rail actually has an image in it, so an empty rail costs no gutter. */
.gear-layout {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 72px;
  align-items: start;
}

.gear-layout:has(.gear-rail img) {
  grid-template-columns: minmax(0, 300px) 1fr;
}

.gear-rail {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gear-rail img {
  width: 100%;
  height: auto;
  display: block;
}

/* Heading sits left of its own rule and list, per the reference layout */
.gear-group {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  column-gap: 64px;
  align-items: start;
  padding-bottom: 72px;
}

.gear-group:last-child {
  padding-bottom: 40px;
}

.gear-group h2 {
  color: var(--white);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gear-body {
  border-top: 1px solid rgba(227, 218, 201, 0.4);
  padding-top: 56px;
}

.gear-list {
  list-style: none;
}

.gear-list > li {
  margin-top: 14px;
  color: var(--white);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.gear-list > li:first-child {
  margin-top: 0;
}

.gear-sub {
  list-style: none;
  margin-top: 8px;
  padding-left: 22px;
}

.gear-sub li {
  color: var(--orange-dim);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.09em;
}

.gear-note {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid rgba(227, 218, 201, 0.16);
  color: var(--orange-dim);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gear-note a {
  color: var(--orange);
  text-decoration: none;
}

.gear-note a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 900px) {
  .about-page {
    padding: 56px 24px 80px;
  }

  .about-lead {
    max-width: none;
    font-size: 20px;
  }

  .about-body p:first-child {
    margin-top: 40px;
  }

  .about-contact {
    margin-top: 52px;
  }

  .about-credits {
    margin-top: 56px;
  }

  .credits-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
  }

  .gear-page {
    padding: 56px 24px 80px;
  }

  .gear-layout,
  .gear-layout:has(.gear-rail img) {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .gear-group {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 22px;
    padding-bottom: 44px;
  }

  .gear-group h2 {
    font-size: 13px;
  }

  .gear-body {
    padding-top: 26px;
  }

  .gear-list > li {
    font-size: 15px;
  }
}
