/* Shared project heroes: full-bleed canvas and aligned project facts. */
html.project-page {
  --pj-hero-position: var(--pj-hero-desktop-position, center);
}
/* flow-root keeps the last section's bottom margin inside the white page instead of leaking past it. */
html.project-page main { display: flow-root; background: var(--paper, #fff); }
.pj-hero-img { object-position: var(--pj-hero-position); }
.pj-hero-picture { display: contents; }
.pj-hero-meta {
  grid-template-columns: var(--pj-facts-columns, minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, 1.2fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: start;
}
.pj-hero-meta > div { min-width: 0; }
.pj-hero-meta dd { line-height: 1.4; overflow-wrap: break-word; }

@media (max-width: 760px) {
  html.project-page {
    --pj-hero-position: var(--pj-hero-mobile-position, var(--pj-hero-desktop-position, center));
  }
  /* Runs past the bottom of the screen so the photo fills the area under Safari's floating toolbar (same as the
     home hero); the copy stays at the bottom of what is visible. Checked by tests/site.spec.mjs. */
  .pj-hero {
    display: grid;
    align-items: end;
    height: auto;
    min-height: calc(100vh + 140px);
    min-height: calc(100lvh + 140px);
    padding: calc(100px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + 140px + 100lvh - 100svh + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  /* Safari on iPhone paints the strip behind the status bar with the page (html/body) background. While the hero
     is on screen it is the colour at the top of the photo (--pj-hero-color, set per page on <html>), so the photo
     reads as running to the top edge; past the hero (project-hero.js adds .past-hero) it is the site's dark again. */
  html.project-page:not(.past-hero), html.project-page:not(.past-hero) body { background: var(--pj-hero-color, #080808); }
  .pj-hero-bottom {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    min-width: 0;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .pj-name {
    font-size: clamp(30px, 8.3vw, 42px);
    line-height: 1.06;
    text-wrap: balance;
  }
  .pj-kicker { margin-bottom: 12px; }
  /* Services / Location / Industry are already in the overview below. */
  .pj-hero-meta { display: none; }
}
