.project-page {
  color: var(--ink);
  background: var(--ink);
}

.project-page .site-header {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
}

.project-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 92svh;
  padding: 9rem 3.5vw 3.3rem;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
  isolation: isolate;
}

.project-hero::before {
  position: absolute;
  z-index: -3;
  inset: -2rem;
  background: var(--hero-image) center / cover no-repeat;
  content: "";
  filter: blur(24px) brightness(0.48) saturate(0.82);
  opacity: 0.8;
  transform: scale(1.06);
}

.project-hero__image,
.project-hero__veil {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-hero__image {
  object-fit: contain;
  object-position: center;
}

.project-hero__veil {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.25) 0%, rgba(5, 5, 5, 0.03) 34%, rgba(5, 5, 5, 0.9) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.36), transparent 56%);
}

.project-back {
  position: absolute;
  top: 7.2rem;
  left: 3.5vw;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease;
}

.project-back:hover {
  color: var(--ink);
  background: var(--acid);
  border-color: var(--acid);
}

.project-hero__copy {
  width: min(78rem, 91vw);
}

.project-hero__copy .eyebrow {
  margin: 0 0 0.8rem;
  color: var(--acid);
}

.project-hero h1 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.6rem, 11.5vw, 11.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.76;
  text-transform: uppercase;
  text-wrap: balance;
}

.project-hero h1 > span {
  display: block;
}

.project-hero__artist {
  max-width: 28ch;
  margin-top: 0.75rem;
  font-family: var(--body);
  font-size: clamp(0.9rem, 1.55vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.15;
}

.project-hero__international {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-style: italic;
}

.project-hero__international:empty {
  display: none;
}

.project-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-top: 1.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-hero__meta span:not(:last-child)::after {
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.9rem;
  background: var(--acid);
  border-radius: 50%;
  content: "";
}

.project-hero__scroll {
  position: absolute;
  right: 3.5vw;
  bottom: 3.4rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-summary {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(16rem, 4fr);
  gap: clamp(3rem, 8vw, 9rem);
  padding: clamp(5rem, 10vw, 10rem) 3.5vw;
  background: var(--paper);
}

.project-summary__lead .eyebrow {
  margin: 0 0 1.2rem;
}

.project-logline {
  max-width: 23ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.9vw, 6.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.94;
  text-wrap: pretty;
}

.project-facts {
  align-self: end;
  margin: 0;
  border-top: 1px solid var(--line);
}

.project-facts div {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.project-facts dt,
.project-facts dd {
  margin: 0;
}

.project-facts dt {
  color: #686868;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-facts dd {
  font-size: 0.82rem;
  font-weight: 600;
}

.project-video,
.project-gallery,
.project-record {
  padding: clamp(4.5rem, 8vw, 8rem) 3.5vw;
}

.project-video {
  color: var(--white);
  background: var(--ink);
}

.project-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.project-section-heading .eyebrow,
.project-section-heading h2 {
  margin: 0;
}

.project-section-heading h2 {
  font-family: var(--display);
  font-size: clamp(3.4rem, 7vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.78;
  text-align: right;
  text-transform: uppercase;
}

.project-section-heading--dark .eyebrow {
  color: var(--acid);
}

.project-video__frame {
  position: relative;
  width: min(100%, 100rem);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #151515;
}

.project-video__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.project-video__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.project-video__actions[hidden] {
  display: none;
}

.project-gallery {
  background: var(--paper);
}

.project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.8rem);
  align-items: start;
}

.project-gallery__grid figure {
  grid-column: span 7;
  align-self: start;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.project-gallery__grid figure:nth-child(4n + 2),
.project-gallery__grid figure:nth-child(4n + 3) {
  grid-column: span 5;
}

.project-gallery__grid figure:nth-child(4n + 3) {
  margin-top: clamp(2rem, 5vw, 6rem);
}

.project-gallery__grid figure:nth-child(4n + 4) {
  margin-top: clamp(1rem, 2vw, 3rem);
}

.project-gallery__grid img {
  width: 100%;
  height: auto;
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.project-gallery__grid figure:hover img {
  transform: scale(1.025);
}

.project-record {
  display: grid;
  grid-template-columns: minmax(14rem, 3fr) minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 6rem);
  color: var(--white);
  background: var(--ink);
}

.project-record:has(.project-poster[hidden]) {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.project-record:has(.project-poster[hidden]) .project-festivals[hidden] + .project-credits {
  grid-column: 1 / -1;
  width: min(100%, 58rem);
  margin-left: auto;
}

.project-poster img {
  width: 100%;
  height: auto;
}

.project-record .project-section-heading {
  display: block;
  margin-bottom: 1.5rem;
}

.project-record .project-section-heading h2 {
  max-width: 100%;
  margin-top: 0.8rem;
  font-size: clamp(3.2rem, 4vw, 5rem);
  text-align: left;
}

.project-festivals__note {
  max-width: 34rem;
  margin: 0 0 1.5rem;
  color: #a9a9a9;
  font-size: 0.72rem;
  line-height: 1.5;
}

.project-festivals ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: festival;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.project-festivals li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  counter-increment: festival;
}

.project-festivals li::before {
  color: var(--acid);
  content: counter(festival, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 700;
}

.project-credits dl {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.project-credits dl div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.6fr);
  gap: 1.2rem;
  padding: 0.74rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.project-credits dt,
.project-credits dd {
  margin: 0;
  font-size: 0.76rem;
}

.project-credits dt {
  color: #9d9d9d;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-next {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 19rem;
  padding: clamp(3rem, 6vw, 6rem) 3.5vw;
  color: var(--ink);
  background: var(--acid);
  transition: color 180ms ease, background 180ms ease;
}

.project-next > span:first-child {
  grid-column: 1 / -1;
  align-self: start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-next strong {
  align-self: end;
  max-width: 12ch;
  font-family: var(--display);
  font-size: clamp(4rem, 9vw, 9rem);
  letter-spacing: -0.05em;
  line-height: 0.78;
  text-transform: uppercase;
}

.project-next strong > span {
  display: block;
}

.project-next__artist {
  margin-top: 0.65rem;
  font-family: var(--body);
  font-size: clamp(0.85rem, 1.4vw, 1.25rem);
  letter-spacing: 0.055em;
  line-height: 1.2;
}

.project-next__arrow {
  align-self: end;
  font-family: var(--display);
  font-size: clamp(4rem, 8vw, 8rem);
  line-height: 0.7;
}

.project-next:hover {
  color: var(--acid);
  background: var(--ink);
}

.project-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 3.5vw;
  color: #b5b5b5;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-footer a {
  color: var(--white);
}

.project-missing {
  min-height: 100svh;
  padding: 12rem 3.5vw 5rem;
  color: var(--white);
  background: var(--ink);
}

.project-missing h1 {
  max-width: 10ch;
  margin: 1rem 0 3rem;
  font-family: var(--display);
  font-size: clamp(5rem, 13vw, 12rem);
  letter-spacing: -0.05em;
  line-height: 0.76;
}

@media (max-width: 1000px) {
  .project-record,
  .project-record:has(.project-poster[hidden]) {
    grid-template-columns: minmax(13rem, 4fr) minmax(0, 8fr);
  }

  .project-credits {
    grid-column: 2;
  }

  .project-record:has(.project-poster[hidden]) .project-credits,
  .project-record:has(.project-poster[hidden]) .project-festivals {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .project-hero {
    min-height: 80svh;
  }

  .project-summary {
    grid-template-columns: 1fr;
  }

  .project-logline {
    max-width: 27ch;
  }

  .project-facts {
    width: min(100%, 38rem);
    margin-left: auto;
  }
}

@media (max-width: 680px) {
  .project-hero {
    display: block;
    min-height: 0;
    padding: 5rem 0 0;
  }

  .project-hero::before,
  .project-hero__veil {
    display: none;
  }

  .project-hero__image {
    position: relative;
    z-index: 0;
    inset: auto;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .project-hero__copy {
    width: auto;
    padding: 2rem 1.25rem 2.5rem;
  }

  .project-back {
    z-index: 2;
    top: 6rem;
    left: 1.25rem;
  }

  .project-hero h1 {
    font-size: clamp(3.8rem, 19vw, 6.3rem);
    line-height: 0.79;
  }

  .project-hero__meta {
    display: grid;
    gap: 0.38rem;
  }

  .project-hero__meta span:not(:last-child)::after {
    display: none;
  }

  .project-hero__scroll {
    display: none;
  }

  .project-summary,
  .project-video,
  .project-gallery,
  .project-record {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .project-logline {
    font-size: clamp(2.3rem, 10.5vw, 3.8rem);
  }

  .project-section-heading {
    display: block;
  }

  .project-section-heading h2 {
    margin-top: 0.8rem;
    text-align: left;
  }

  .project-gallery__grid {
    display: block;
  }

  .project-gallery__grid figure,
  .project-gallery__grid figure:nth-child(4n + 2),
  .project-gallery__grid figure:nth-child(4n + 3),
  .project-gallery__grid figure:nth-child(4n + 4) {
    margin: 0 0 1rem;
  }

  .project-gallery__grid img {
    min-height: 0;
  }

  .project-record,
  .project-record:has(.project-poster[hidden]) {
    display: block;
  }

  .project-poster {
    width: min(78vw, 22rem);
    margin: 0 auto 4.5rem;
  }

  .project-festivals {
    margin-bottom: 4.5rem;
  }

  .project-credits dl div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .project-next {
    grid-template-columns: minmax(0, 1fr);
    min-height: 15rem;
    padding: 2.5rem 1.25rem;
  }

  .project-next strong {
    max-width: none;
    min-width: 0;
    font-size: clamp(3rem, 12vw, 4.5rem);
    overflow-wrap: anywhere;
  }

  .project-next__arrow {
    display: none;
  }

  .project-footer {
    display: grid;
    padding: 1.5rem 1.25rem;
  }
}

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