/* Site-wide base, linked from every page by scripts/build.py.
 * The design sets the font on each page's container, so any section that ends up outside it
 * (e.g. after a stray closing tag in the export) fell back to the browser's serif. */
body {
  font-family: 'TT Commons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
}

/* Case heroes on phones: 70% of the screen height (the design's min(100svh, 125vw) left them
 * short on a phone, so the title covered the main image). The image fills the hero (cover). */
@media (max-width: 759px) {
  section[data-screen-label="Case hero"] {
    height: 70vh !important;
    min-height: 0 !important;
  }
  section[data-screen-label="Case hero"] > img,
  section[data-screen-label="Case hero"] > video,
  section[data-screen-label="Case hero"] > div > img[style*="inset: 0"],
  section[data-screen-label="Case hero"] > div > video {
    object-fit: cover !important;
  }
  section[data-screen-label="Case hero"] > div[style*="url("] {
    background-size: cover !important;
  }
}

/* Rustic Pines logo animation (case hero, Home/Work thumbnails, "More projects" cards): HEVC with
 * transparency, which only Safari shows; Chrome/Android draw its background black. Screen blending
 * turns the black into the image behind it. Set on the video's wrapper: it has z-index, so
 * blending on the video alone would stay inside it. */
:has(> video[data-skip-motion]), :has(> video[data-logo-vid]) {
  mix-blend-mode: screen;
}

/* Rustic Pines on phones: a slightly taller hero and the logo 100px above the centre, clear of the
 * title. Padding, not transform, so the logo animation's own styles are left alone. */
@media (max-width: 759px) {
  section[data-screen-label="Case hero"]:has(img[alt^="Rustic Pines"]) {
    height: 80vh !important;
  }
  section[data-screen-label="Case hero"]:has(img[alt^="Rustic Pines"]) > div:has(> video[data-skip-motion]) {
    padding-bottom: 200px !important;
  }
}
