/* Z reveal: the logo Z rises right behind the section above, fills on the
   way up, then zooms out from its centre until the next section fills the
   screen. What it opens onto is the real section, headline at the top and
   content straight under it.

   z-reveal.js builds this around every <section data-z-from="...">:

     .z-scene            background = colour of the section above
       .z-pin            sticky, holds the section still while the Z opens
         svg.z-outline   the outline Z
         .z-window       clipped to the Z, scaled up by the script
           .z-fill       the rising fill
             section     the real section, untouched
             .z-pad      extends a short section to the foot of the screen
             .z-tint     optional colour wash (data-z-tint)
       .z-travel         how far you scroll while the Z opens

   None of this exists unless the script runs, so without it (or with
   reduced motion) the page is the plain stacked sections. */

:root { --z-travel: 45vh; }

.z-scene {
  position: relative;
  pointer-events: none;
  /* Pulled up so the Z sits just under the section above. The strip that
     overlaps that section stays see-through. */
  margin-top: calc(-1 * var(--z-ov, 0px));
  background: linear-gradient(to bottom, transparent var(--z-ov, 0px), var(--z-from) var(--z-ov, 0px));
}
.z-from-navy  { --z-from: var(--navy);  --z-stroke: var(--mint); }
.z-from-white { --z-from: var(--white); --z-stroke: var(--navy); }
.z-from-paper { --z-from: var(--paper); --z-stroke: var(--navy); }

.z-pin {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}
.z-travel { height: var(--z-travel); }

.z-outline {
  position: absolute;
  overflow: visible;
  color: var(--z-stroke);
}
.z-outline polygon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: miter;
}

.z-window {
  position: relative;
  pointer-events: auto;
  will-change: clip-path;
}
.z-fill { position: relative; }
.z-fill > section { will-change: transform; }

.z-pad {
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 0;
  pointer-events: none;
}
.z-pad-back { background: var(--z-from); }

.z-tint {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 100vh;
  pointer-events: none;
}
.z-tint-mint { background: linear-gradient(140deg, var(--mint-light) 0%, var(--mint) 48%, var(--teal) 100%); }
.z-tint-navy { background: var(--navy); }

/* The section above a Z ends close to it, so the Z comes up sooner. */
.z-on .z-before { padding-bottom: 28px; }

/* The hero fills the first screen, so the first Z stays out of sight until
   you scroll. */
.z-on .top { min-height: 100vh; display: flex; flex-direction: column; }
.z-on .top .hero { flex: 1 0 auto; display: flex; align-items: center; }

/* Measures the full screen height, including under a phone's address bar. */
.z-probe {
  position: fixed; top: 0; left: 0; width: 0;
  height: 100vh;
  visibility: hidden; pointer-events: none;
}
@supports (height: 100lvh) {
  .z-on .top { min-height: 100lvh; }
  .z-probe { height: 100lvh; }
  .z-tint { height: 100lvh; }
}
