/* JB-WEB V66 (from V65) — align the title and immediate description in the principal
   project pages to the Stranger Things hero composition.
   Stranger Things itself is the reference and is intentionally untouched.
   Only the heading/caption position is affected: no image/media dimensions,
   animations, galleries, project summaries or footer positioning is changed. */

/* Keep the V65 vertical geometry. Horizontal alignment now follows the
   actual centered project-summary container, so h1 and caption begin at
   precisely the same x coordinate as the first Brief column on wide screens.
   At 1440px this is 82px, exactly matching Stranger Things. */
@media (min-width: 701px) {
  body.jb-main-hero-aligned-v65 .hero > .hero-copy,
  body.jb-main-hero-aligned-v65 .hero > .hero-heading {
    left: 0 !important;
    right: 0 !important;
    width: min(calc(100% - 2 * var(--gutter)), 1276px) !important;
    margin-inline: auto !important;
    bottom: 2.1528vw !important;
  }
  /* Meta's brief uses the same layout with a 1270px max-width. */
  body.jb-main-hero-aligned-v65 .hero > .hero-heading {
    width: min(calc(100% - 2 * var(--gutter)), 1270px) !important;
  }
  body.jb-main-hero-aligned-v65 .hero :is(.hero-title) {
    line-height: 1.203 !important;
  }
  body.jb-main-hero-aligned-v65 .hero :is(.hero-caption, .hero-subtitle) {
    line-height: 27px !important;
    margin-top: 0 !important;
  }

  /* Logos & Titles has no film/image hero. Reserve the equivalent hero area
     and anchor its intro heading at the same vertical position as Stranger
     Things, instead of leaving it up near the site header. This also makes
     its overview start after the title, in the usual project rhythm. */
  body.jb-main-hero-aligned-v65 .project-intro {
    padding-top: 0 !important;
  }
  body.jb-main-hero-aligned-v65 .project-intro > .intro-heading {
    min-height: calc(max(56.25vw, 100dvh) - 2.1528vw);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
  }
  body.jb-main-hero-aligned-v65 .intro-heading .project-title {
    line-height: 1.203 !important;
  }
  body.jb-main-hero-aligned-v65 .intro-heading .intro-caption {
    line-height: 27px !important;
    margin-top: 0 !important;
  }
}

/* Stranger Things mobile artboard: 393px wide, the caption finishes around
   y=369px (15px above the 384px hero edge), with a 30px left gutter.
   Use these scaled viewport coordinates instead of applying an arbitrary
   fixed bottom to heroes with different heights (Yung Rappa, Carnivo...). */
@media (max-width: 700px) {
  body.jb-main-hero-aligned-v65 .hero > .hero-copy,
  body.jb-main-hero-aligned-v65 .hero > .hero-heading {
    left: 7.6336vw !important;
    right: 7.6336vw !important;
    bottom: calc(100% - 93.8931vw) !important;
  }
  body.jb-main-hero-aligned-v65 .hero .hero-title {
    line-height: .9 !important;
  }
  body.jb-main-hero-aligned-v65 .hero :is(.hero-caption, .hero-subtitle) {
    line-height: 6.3613vw !important;
    margin-top: 2.799vw !important;
  }

  /* Match the two-line Logos & Titles heading to the two-line Stranger
     Things mobile composition: title begins near y=200px, caption near y=319px
     on the 393px design width. */
  body.jb-main-hero-aligned-v65 .project-intro {
    padding-top: 0 !important;
    padding-left: 7.6336vw !important;
    padding-right: 7.6336vw !important;
  }
  body.jb-main-hero-aligned-v65 .project-intro > .intro-heading {
    min-height: 93.8931vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
  }
  body.jb-main-hero-aligned-v65 .intro-heading .project-title {
    line-height: .9 !important;
  }
  body.jb-main-hero-aligned-v65 .intro-heading .intro-caption {
    line-height: 6.3613vw !important;
    margin-top: 2.799vw !important;
  }
}
