/* The first screen. A full-bleed indigo band, split down the middle:
   the argument on the left, the workfloor on the right.

   The photograph fills its half completely -- flush with the top and
   bottom of the band and running off the right edge of the screen.
   That is deliberate: an image floating inside a band with indigo
   above it reads as a gap, not as composition. Because the text
   column decides the band's height, the image is cropped with
   object-fit rather than letterboxed; the scale, the screen and the
   printer sit in the middle of the frame and survive that crop.

   overflow-x: clip on the band absorbs the difference between 100vw
   and the real content width when a scrollbar is present, so the
   bleed can never cause a horizontal scrollbar.

   Below 62rem everything is one column, the image keeps its own
   aspect ratio, and it gets the same radius, hairline and shadow as
   the application screens further down the page. */

@layer components {
  .hero {
    position: relative;
    overflow-x: clip;
    padding-block: var(--space-xl);
    background: var(--color-deep);
    color: var(--color-on-deep);
    background-image: radial-gradient(
      120% 90% at 82% 8%,
      color-mix(in oklch, var(--color-berry) 42%, transparent) 0%,
      transparent 62%
    );
  }

  .hero__inner {
    display: grid;
    gap: var(--space-l);
    align-items: center;
  }

  .hero__label {
    color: var(--color-muted-on-deep);
  }

  /* De titel is een hele zin geworden in plaats van vier woorden, dus
     een stap kleiner en op een bredere maat: op --step-5 viel hij op
     een laptop over zeven regels uit. */
  .hero__title {
    max-inline-size: 22ch;
    margin-block-start: var(--space-xs);
    font-size: var(--step-4);
    font-weight: 700;
    font-stretch: var(--width-display);
    line-height: var(--leading-display);
    letter-spacing: var(--tracking-display);
    text-wrap: balance;
  }

  /* Het slot van de zin in een opgelicht koraal: bordeaux en koraal
     zijn op indigo allebei te donker voor tekst. */
  .hero__statement-accent {
    color: var(--color-accent-on-deep);
  }

  .hero__lead {
    max-inline-size: 42ch;
    margin-block-start: var(--space-m);
    font-size: var(--step-1);
    color: var(--color-muted-on-deep);
  }

  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    max-inline-size: none;
    margin-block-start: var(--space-l);
  }

  .hero__figure {
    margin: 0;
  }

  .hero__image {
    inline-size: 100%;
    border: 1px solid var(--color-line-on-deep);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
  }

  @media (min-width: 62rem) {
    .hero {
      padding-block: var(--space-xl) 0;
    }

    /* Twelve columns need a twelve-column gutter. At --space-xl the
       eleven gaps ate almost the whole container on a 1024 screen and
       the text column collapsed to 348px. The air between the two
       halves comes from the column spans, not from the gap. */
    .hero__inner {
      grid-template-columns: repeat(12, minmax(0, 1fr));
      column-gap: var(--space-m);
      row-gap: var(--space-l);
      align-items: stretch;
    }

    .hero__text {
      grid-column: 1 / 6;
      align-self: center;
      padding-block-end: var(--space-xl);
    }

    /* Pulled up by the band's own top padding, stretched to its
       bottom, and pushed past the right edge of the screen. */
    .hero__figure {
      position: relative;
      grid-column: 6 / 13;
      margin-block-start: calc(var(--space-xl) * -1);
      margin-inline-end: calc(
        -1 * max(var(--gutter), (100vw - var(--container-wide)) / 2)
      );
      min-block-size: 24rem;
    }

    .hero__image {
      position: absolute;
      inset: 0;
      inline-size: 100%;
      block-size: 100%;
      object-fit: cover;
      object-position: 30% 50%;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }
  }
}
