/* stylelint-disable selector-class-pattern */

/*
Hero style 1: full height image with a big headline over it (left, vertically centered).

WPBakery structure (same column):
  .p-hero-style1__image (single image, + u-misc-image-full-height)
  .p-hero-style1__text  (text block with the headline)

One word per line. Split long words with spaces in the text (e.g. HUNG OVER AFTER NOONS!) to break them like the design.

Sizing: the text block covers the image and is a size container, so the headline's font size is computed from
the space actually available (cqh / cqw): it always fits, at any resolution (small laptops, landscape phones, ...).
*/

.wpb_wrapper:has(> .p-hero-style1__text) {
  position: relative;
}

.p-hero-style1__image {
  margin-bottom: 0;
}

.p-hero-style1__text {
  /* number of lines in the headline (one word per line) */
  --p-hero-style1-lines: 8;
  /* part of the available height the headline uses */
  --p-hero-style1-fill: 0.9;
  /* width of the longest word, in em (NOONS! / SUNNY in Inter Bold ~ 4em) */
  --p-hero-style1-word: 4.2;
  --p-hero-style1-line-height: 0.95;

  container-type: size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  margin: 0;
  padding: clamp(1rem, 5svh, 4rem) max(var(--v-layout-container-padding), 3.5vw);
  font-family: var(--v-font-family-alt2);
  font-weight: var(--v-font-weight-bold);
  pointer-events: none;
}

.p-hero-style1__text :is(h1, h2, h3, p) {
  /* one word per line: width = longest word, and a huge word spacing so no two words fit on one line */
  width: min-content;
  word-spacing: 100vw;
  margin: 0;
  color: var(--v-color-2);
  font-family: inherit;
  font-weight: inherit;
  font-size: min(
    100cqh * var(--p-hero-style1-fill) / (var(--p-hero-style1-lines) * var(--p-hero-style1-line-height)),
    100cqw / var(--p-hero-style1-word)
  );
  line-height: var(--p-hero-style1-line-height);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  /* Discreet layered shadow (in em, scales with the font): crisp edge + soft depth + wide light halo for bright backgrounds */
  text-shadow:
    0 0.01em 0.03em rgb(0 0 0 / 18%),
    0 0.03em 0.15em rgb(0 0 0 / 16%),
    0 0 0.6em rgb(0 0 0 / 14%);
}
