/* Film pages use their title as a full-screen threshold into the image. */
.project-page .type-project-opening {
  display: block;
  min-height: 0;
  background: #f7f5ef;
  color: #151515;
}

.type-project-gate {
  --gate-bg: #f4f1e9;
  --gate-ink: #181716;
  --gate-accent: #d9282e;
  box-sizing: border-box;
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(24px, 5vh, 58px);
  overflow: hidden;
  padding: clamp(28px, 3.4vw, 58px) clamp(20px, 4.6vw, 86px) clamp(30px, 4.2vw, 70px);
  background: var(--gate-bg);
  color: var(--gate-ink);
}

.type-project-gate-top,
.type-project-gate-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.type-project-gate .back-link {
  margin: 0;
  border-color: currentColor;
  color: inherit;
}

.type-project-year {
  flex: none;
  font-size: clamp(13px, 1.25vw, 19px);
  font-weight: 800;
  letter-spacing: -.025em;
}

.type-project-title-block {
  min-width: 0;
  align-self: center;
}

.type-project-title-block .eyebrow {
  margin: 0 0 clamp(16px, 2.5vw, 35px);
  color: var(--gate-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.type-project-title {
  max-width: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: clamp(80px, 13.6vw, 220px);
  font-weight: 900;
  line-height: .81;
  letter-spacing: -.105em;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: none;
}

.type-project-gate-bottom {
  align-items: end;
}

.type-project-gate-bottom > div {
  max-width: 520px;
}

.type-project-gate-bottom .project-subtitle {
  margin: 0 0 10px;
  color: var(--gate-accent);
}

.type-project-gate-bottom .project-lead {
  margin: 0;
  color: inherit;
  font-size: clamp(17px, 1.55vw, 24px);
  line-height: 1.3;
}

.type-project-image-cue {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(51px, 5vw, 76px);
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--gate-accent);
  font-size: clamp(25px, 2.7vw, 41px);
  line-height: 1;
}

.project-page .type-project-opening .project-art {
  height: min(100svh, 1050px);
  min-height: 560px;
  border-top: 1px solid rgba(18, 18, 18, .12);
}

/* The single words are intentionally almost edge to edge. */
.type-project--vampires .type-project-gate {
  --gate-bg: #0a0908;
  --gate-ink: #f4f0e7;
  --gate-accent: #e8d8c5;
}

.type-project--vampires .type-project-title,
.type-project--strass .type-project-title {
  position: relative;
  left: 50%;
  width: max-content;
  max-width: none;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
}

.type-project--vampires .type-project-title {
  font-size: clamp(90px, 23vw, 390px);
  letter-spacing: -.115em;
  line-height: .73;
}

.type-project--strass .type-project-gate {
  --gate-bg: #d9272d;
  --gate-ink: #fff8ed;
  --gate-accent: #ffe7b1;
}

.type-project--strass .type-project-title {
  font-size: clamp(110px, 29vw, 470px);
  line-height: .74;
}

.type-project--jadore-le-cinema .type-project-gate {
  --gate-bg: #ad2a24;
  --gate-ink: #fff6e9;
  --gate-accent: #f5d4b0;
}

.type-project--little-glory .type-project-gate {
  --gate-bg: #aabed0;
  --gate-ink: #17242e;
  --gate-accent: #2f475a;
}

.type-project--little-glory .type-project-title {
  font-size: clamp(80px, 17vw, 260px);
}

.type-project--les-ames-de-papier .type-project-gate {
  --gate-bg: #dfd6c5;
  --gate-ink: #2a2722;
  --gate-accent: #7c5445;
}

.type-project--les-ames-de-papier .type-project-title {
  font-size: clamp(78px, 12vw, 188px);
}

.type-project--au-nom-du-fils .type-project-gate {
  --gate-bg: #292722;
  --gate-ink: #f1e9d9;
  --gate-accent: #ef977e;
}

/* Series and digital work retain the film/image split, with a stronger title
   hierarchy instead of another full-screen title card. */
.project-page .type-project-opening--series {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  min-height: calc(100svh - 72px);
}

.type-project-opening--series .project-heading {
  position: relative;
  isolation: isolate;
  background: #e4e4df;
}

.type-project-opening--series .project-heading::before {
  content: "2016";
  position: absolute;
  z-index: -1;
  right: 3%;
  bottom: 5%;
  color: rgba(12, 18, 22, .055);
  font-size: clamp(115px, 17vw, 270px);
  font-weight: 900;
  line-height: .7;
  pointer-events: none;
}

.type-project-opening--series .type-project-inline-title {
  font-size: clamp(86px, 11vw, 190px);
  font-weight: 900;
  line-height: .76;
  letter-spacing: -.118em;
  text-wrap: balance;
  overflow-wrap: normal;
}

.type-project-opening--series .project-lead {
  max-width: 490px;
  font-size: clamp(18px, 1.6vw, 25px);
}

.project-page .type-project-opening--digital {
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  min-height: calc(84svh - 72px);
}

.type-project-opening--digital .project-heading {
  background: #f3f1ec;
}

.type-project-opening--digital .project-heading .eyebrow {
  color: #c5262d;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.type-project-opening--digital .type-project-inline-title {
  font-size: clamp(76px, 8.8vw, 147px);
  font-weight: 900;
  line-height: .79;
  letter-spacing: -.105em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: normal;
}

.type-project-opening--digital .type-project-inline-title--compact {
  font-size: clamp(70px, 7.4vw, 124px);
}

.type-project-opening--digital .project-lead {
  max-width: 460px;
  font-size: clamp(18px, 1.55vw, 24px);
}

.project-page .type-project-opening--documentary {
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  min-height: calc(90svh - 72px);
}

.type-project-opening--documentary .project-heading {
  background: #e4ded1;
}

.type-project-opening--documentary .project-heading .eyebrow {
  color: #955244;
}

.type-project-opening--documentary .type-project-inline-title {
  font-size: clamp(86px, 10vw, 172px);
  font-weight: 900;
  line-height: .79;
  letter-spacing: -.105em;
  text-wrap: balance;
  overflow-wrap: normal;
}

.type-project-opening--documentary .project-lead {
  max-width: 470px;
  font-size: clamp(18px, 1.55vw, 25px);
}

@media (prefers-reduced-motion: no-preference) {
  .type-project-title-block {
    animation: type-project-enter .85s cubic-bezier(.18, .73, .14, 1) both;
  }

  @keyframes type-project-enter {
    from { opacity: .15; transform: translateY(4vh) scale(.965); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (max-width: 760px) {
  .project-page .type-project-opening { display: block; }

  .type-project-gate {
    min-height: calc(100svh - 64px);
    gap: 20px;
    padding: 27px 18px 29px;
  }

  .type-project-gate-top { gap: 14px; }
  .type-project-gate .back-link { max-width: 75%; font-size: 10px; }
  .type-project-year { font-size: 13px; }
  .type-project-title-block .eyebrow {
    max-width: 85%;
    margin-bottom: 20px;
    font-size: 9px;
    line-height: 1.4;
  }

  .type-project-title {
    font-size: clamp(65px, 17vw, 118px);
    line-height: .84;
    letter-spacing: -.108em;
  }

  .type-project--vampires .type-project-title {
    font-size: clamp(82px, 27vw, 170px);
  }

  .type-project--strass .type-project-title {
    font-size: clamp(88px, 30vw, 185px);
  }

  .type-project--little-glory .type-project-title {
    font-size: clamp(78px, 18vw, 132px);
  }

  .type-project--les-ames-de-papier .type-project-title {
    font-size: clamp(68px, 15vw, 105px);
  }

  .type-project-gate-bottom { gap: 12px; }
  .type-project-gate-bottom > div { max-width: 75%; }
  .type-project-gate-bottom .project-subtitle { font-size: 20px; }
  .type-project-gate-bottom .project-lead { font-size: 16px; line-height: 1.3; }
  .type-project-image-cue { width: 49px; font-size: 27px; }

  .project-page .type-project-opening .project-art {
    height: min(82svh, 750px);
    min-height: 370px;
  }

  .project-page .type-project-opening--series,
  .project-page .type-project-opening--digital,
  .project-page .type-project-opening--documentary {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .type-project-opening--series .project-heading { min-height: 540px; }
  .type-project-opening--digital .project-heading { min-height: 500px; }
  .type-project-opening--documentary .project-heading { min-height: 520px; }

  .type-project-opening--series .type-project-inline-title {
    font-size: clamp(62px, 19vw, 118px);
  }

  .type-project-opening--digital .type-project-inline-title {
    font-size: clamp(62px, 17vw, 110px);
  }

  .type-project-opening--digital .type-project-inline-title--compact {
    font-size: clamp(54px, 15vw, 96px);
  }

  .type-project-opening--documentary .type-project-inline-title {
    font-size: clamp(70px, 18vw, 117px);
  }
}

@media (max-height: 620px) and (min-width: 761px) {
  .type-project-gate { min-height: 620px; }
}
