/* Text column beside an image that bleeds to the edge. The layout gives #content no
   measure, which is what lets this section reach both sides of the window. */
[qcms-mod="cont.luca.hero"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  background: color-mix(in srgb, var(--color-bg), white 50%);

  > .text {
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3.5rem);
    justify-self: end;
    max-width: 34rem;
  }

  /* a video, once there is one, takes the picture's place; without, the slot stays empty */
  > .media:has(video) > cms-image { display: none }

  > .media :is(img, cms-image, video) {
    width: 100%;
    height: 100%;
    min-height: 24rem;
    /* a tall picture must not push the hero past the first screen: window minus the
       header bar (about 5rem); cms-image crops to fit */
    max-height: calc(100svh - 5rem);
    object-fit: cover;
    display: block;
  }

  /* The oversized opening line. Which face it wears is the site's business. */
  .lead {
    font-size: clamp(4rem, 11vw, 8.5rem);
    line-height: .85;
    margin-bottom: .35em;
  }
  .lead small { font-size: .42em; vertical-align: .9em }

  .claim {
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    text-align: center;
    padding-bottom: .5em;
    border-bottom: 2px solid var(--color);
    margin-bottom: .5em;
  }

  .sub {
    text-align: center;
    margin-bottom: 2rem;
  }

  .note {
    font-family: var(--font-hand, cursive);
    font-size: 1.3rem;
    line-height: 1.35;
    margin-top: 1.8rem;
  }

  /* The actions stand in a row; how a button looks is the site's (layout main.css). */
  [qcms-name=actions] p { margin: 0; display: flex; flex-wrap: wrap; gap: .9rem }

  @media (width < 48rem) {
    grid-template-columns: minmax(0, 1fr);
    > .text { justify-self: stretch; max-width: none }
    > .media :is(img, cms-image, video) { min-height: 16rem }
  }
}

/* An optional mark under the text — a signature, a seal, an award.
   Scoped to .text so the section's own picture is not caught by it — and to its children: the
   <img> inside <cms-image> would take the margin too and slide out of its clipping box. */
[qcms-mod="cont.luca.hero"] > .text > :is(img, cms-image) {
  display: block;
  margin-block: 1.2rem .4rem;
}
