/* index-next.html — the homepage hero at the content column's width.

   Loaded after main.css and overrides only the desktop hero. The panel now
   spans the page's content column, from the header logo's left edge to the
   nav's right edge (--page-gutter in from each side, so 1140 wide at 1440),
   instead of sitting as a 1076-wide box in the middle of the window.

   hero-panel.svg can't simply be stretched: it is drawn at 1076x810 and
   scaling it unevenly would distort the stepped notch and its 8 radii. So the
   panel becomes a plain rounded rectangle, and the notch is cut out of its
   bottom-left with a mask. The notch is 771.5x272 (y=538 down), cut around
   the hero copy: each step sits ~10 past its line's measured width at 1440
   (189 / 628 / 737 / 752, so steps at 199 / 638.5 / 747.5 / 763.5; the
   last step is exactly two radii, so its corners meet in an S), with an
   8 radius on every corner, including the rounded one where the panel's left
   edge turns into the first step. Change the hero copy and these widths have
   to be re-measured, or the lines run out of the notch.

   Everything inside keeps its --u measurements and its anchors (intro bottom
   left, CTA bottom right), so the composition is unchanged — the panel is
   only wider. */

@media (min-width: 861px) {
  :root {
    /* One design pixel, scaled off the stage's own width (1140 at 1440)
       rather than the window's. The stage loses a fixed 300 to the gutters,
       so it narrows faster than 100vw; scaling off the window let the CTA
       run into the 780-wide intro below ~1000px. */
    --u: min(1px, (100vw - 2 * var(--page-gutter)) / 1140, (100vh - 160px) / 810);
  }

  .hero {
    padding: 20px var(--page-gutter);
  }

  .hero__stage {
    width: 100%;
    height: calc(810 * var(--u));
    aspect-ratio: auto;
  }

  .hero__panel {
    background: var(--gray);
    border-radius: calc(8 * var(--u));
    /* Top layer: the whole panel, XORed with the notch below it. */
    -webkit-mask-image: linear-gradient(#000 0 0),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 771.5 272' preserveAspectRatio='none'%3E%3Cpath d='M771.5 272C767.082 272 763.5 268.418 763.5 264V214C763.5 209.582 759.918 206 755.5 206C751.082 206 747.5 202.418 747.5 198V148C747.5 143.582 743.918 140 739.5 140H646.5C642.082 140 638.5 136.418 638.5 132V82C638.5 77.582 634.918 74 630.5 74H207C202.582 74 199 70.418 199 66V16C199 11.582 195.418 8 191 8H8C3.582 8 0 4.418 0 0V272Z'/%3E%3C/svg%3E");
    mask-image: linear-gradient(#000 0 0),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 771.5 272' preserveAspectRatio='none'%3E%3Cpath d='M771.5 272C767.082 272 763.5 268.418 763.5 264V214C763.5 209.582 759.918 206 755.5 206C751.082 206 747.5 202.418 747.5 198V148C747.5 143.582 743.918 140 739.5 140H646.5C642.082 140 638.5 136.418 638.5 132V82C638.5 77.582 634.918 74 630.5 74H207C202.582 74 199 70.418 199 66V16C199 11.582 195.418 8 191 8H8C3.582 8 0 4.418 0 0V272Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%, calc(771.5 * var(--u)) calc(272 * var(--u));
    mask-size: 100% 100%, calc(771.5 * var(--u)) calc(272 * var(--u));
    -webkit-mask-position: 0 0, 0 100%;
    mask-position: 0 0, 0 100%;
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }

  /* The textured gray from the Work hero (js/hero-texture.js). It sits inside
     the panel, so the mask cuts the notch out of it too; overflow clips it
     to the panel's rounded corners, which the mask alone does not. The
     panel's flat gray stays underneath for no JS or no WebGL. */
  .hero__panel {
    overflow: hidden;
  }

  .hero__canvas {
    display: block;
    width: 100%;
    height: 100%;
  }

  /* Wide enough for the longest line (752). The lines are clipped to this
     box by their reveal clip-path, so a narrower one cuts the text off. */
  .hero__intro {
    width: calc(780 * var(--u));
  }

  /* The white block was only ever page-coloured fill for the notch, which
     the mask now leaves open. */
  .hero__knockout {
    display: none;
  }
}



