
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--stage-bg);
    color: var(--text-inverse-soft);
    font: var(--type-body);
    -webkit-font-smoothing: antialiased;
  }
  img { max-width: 100%; }
  .sr-only {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
  }

  /* ===================== THE OPENING ===================== */
  .open {
    position: relative;
    min-height: 100svh;
    display: grid; place-items: center;
    overflow: hidden;
    padding: var(--space-6) var(--space-4);
  }
  /* light behind the object and under it */
  .open__bloom, .open__floor { position: absolute; left: 50%; pointer-events: none; }
  .open__bloom {
    top: 38%;
    width: min(140vw, calc(var(--seed-size) * 4));
    aspect-ratio: 3 / 2;
    translate: -50% -50%;
    background: radial-gradient(50% 50% at 50% 50%, var(--stage-bloom) 0%, var(--mask-clear) 70%);
  }
  .open__floor {
    top: 62%;
    width: min(90vw, calc(var(--seed-size) * 2.4));
    aspect-ratio: 5 / 1;
    translate: -50% 0;
    background: radial-gradient(50% 50% at 50% 50%, var(--stage-floor) 0%, var(--mask-clear) 72%);
  }

  .open__stage {
    position: relative;
    perspective: var(--seed-perspective);
    display: grid; place-items: center;
    min-height: calc(var(--seed-size) * 1.8);   /* no mirror under it any more */
  }

  /* The rig holds the fixed tilt. The spin inside it turns anticlockwise, which
     is a negative yaw, so the animation runs in reverse. */
  .rig {
    position: relative;
    width: var(--seed-size); height: var(--seed-size);
    transform-style: preserve-3d;
    transform: rotateX(var(--seed-pitch));
  }
  /* A single particle layer shares the cube's stage, perspective and scale. */
  .h8-fireflies {
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    pointer-events: none;
  }
  .h8-firefly-travel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: calc(var(--z-raised) + 1);
    pointer-events: none;
  }
  .h8-firefly-target { position: relative; }
  .h8-firefly-target > :not(.h8-firefly-reservoir):not(.h8-firefly-corner) {
    position: relative;
    z-index: 1;
  }
  .h8-firefly-reservoir {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
  }
  .h8-firefly-corner { position: absolute; width: 0; height: 0; pointer-events: none; }
  .h8-firefly-corner:nth-of-type(1) { left: 0; top: 0; }
  .h8-firefly-corner:nth-of-type(2) { right: 0; top: 0; }
  .h8-firefly-corner:nth-of-type(3) { right: 0; bottom: 0; }
  .h8-firefly-corner:nth-of-type(4) { left: 0; bottom: 0; }
  .spin {
    position: absolute; inset: 0;
    transform-style: preserve-3d;
    animation: yaw var(--seed-spin) linear infinite reverse;
    will-change: transform;      /* one element, not the hundred and sixty-two */
  }
  /* Nothing to composite while it is off screen. */
  .open:not(.is-seen) .spin { animation-play-state: paused; }
  @keyframes yaw { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }


  /* ---- the seed: the middle cube, a logo on every side ----
     It is one cell, exactly like the other twenty-six, and shares their rules.
     The big cube you see land is this one scaled up for the drop; it returns to
     its own size afterwards. Nothing is compensated, so nothing can drift. */
  .seed {
    position: absolute; top: 50%; left: 50%;
    width: var(--seed-cell); height: var(--seed-cell);
    margin: calc(var(--seed-cell) / -2);
    transform-style: preserve-3d;
  }

  /* ---- the twenty-seven it divides into ---- */
  .bit {
    position: absolute; top: 50%; left: 50%;
    width: var(--seed-cell); height: var(--seed-cell);
    margin: calc(var(--seed-cell) / -2);
    transform-style: preserve-3d;
    visibility: hidden;
  }
  .bit__face, .seed__face {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: var(--seed-face);
    border: 1px solid var(--seed-edge);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 var(--space-4) var(--seed-glow);
  }
  /* a little shading by which way a side points, so a glass box still reads
     as a box rather than as six identical panes */
  .bit__face--left, .bit__face--right,
  .seed__face--left, .seed__face--right {
    box-shadow: 0 0 var(--space-4) var(--seed-glow), inset 0 0 0 var(--seed-cell) var(--seed-shade-side);
  }
  .bit__face--bottom, .seed__face--bottom {
    box-shadow: 0 0 var(--space-4) var(--seed-glow), inset 0 0 0 var(--seed-cell) var(--seed-shade-under);
  }
  .bit__face--front, .seed__face--front  { transform: translateZ(calc(var(--seed-cell) / 2)); }
  .bit__face--back, .seed__face--back   { transform: rotateY(180deg) translateZ(calc(var(--seed-cell) / 2)); }
  .bit__face--right, .seed__face--right  { transform: rotateY(90deg)  translateZ(calc(var(--seed-cell) / 2)); }
  .bit__face--left, .seed__face--left   { transform: rotateY(-90deg) translateZ(calc(var(--seed-cell) / 2)); }
  .bit__face--top, .seed__face--top    { transform: rotateX(90deg)  translateZ(calc(var(--seed-cell) / 2)); }
  .bit__face--bottom, .seed__face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--seed-cell) / 2)); }

  /* The middle logo cube restores its solid white fill and original shading. */
  .seed__face {
    display: grid; place-items: center;
    background: var(--seed-core-face);
    border-color: var(--seed-core-edge);
  }
  .seed__face img { width: 78%; height: auto; display: block; }

  /* ---- the technology icons on the stickers ----
     White, one per outward face. They arrive in a shuffled order, a few at a
     time, all inside a two-second window that opens a second after the cube
     has closed. The delay rides on --d, the face's position in the shuffle. */
  .bit__icon {
    width: 46%; height: 46%;
    fill: var(--icon-ink);
    opacity: 0;
  }
  .open.is-run .bit__icon {
    animation: icon-in var(--icon-in-dur) var(--ease-out)
                 calc(var(--seed-drop-dur) + var(--seed-hold) + var(--seed-split-dur) + var(--seed-apart) + var(--seed-gather-dur)
                      + var(--icon-wait) + var(--d) * (var(--icon-window) - var(--icon-in-dur)) / 53) forwards;
  }
  @keyframes icon-in {
    from { opacity: 0; transform: scale(var(--scale-enter)); }
    to   { opacity: 1; transform: none; }
  }


  /* It arrives at the size it keeps. Nothing grows and nothing shrinks: the
     cube that lands is the same cube that ends up in the middle. */
  .open.is-run .seed {
    animation: seed-drop var(--seed-drop-dur) var(--ease-spring) both;
  }
  @keyframes seed-drop {
    0%   { visibility: hidden; transform: translateY(calc(var(--seed-fall) * -1)); }
    2%   { visibility: visible; }
    100% { transform: none; }
  }

  .open.is-run .bit {
    animation: bit-out var(--seed-split-dur) var(--ease-spring)
      calc(var(--seed-drop-dur) + var(--seed-hold)) both,
      bit-in var(--seed-gather-dur) var(--ease-spring)
      calc(var(--seed-drop-dur) + var(--seed-hold) + var(--seed-split-dur) + var(--seed-apart)) forwards;
  }
  @keyframes bit-out {
    0%   { visibility: hidden; transform: translate3d(0, 0, 0) scale(var(--bit-tucked)); }
    2%   { visibility: visible; }
    100% {
      visibility: visible;
      transform: translate3d(
        calc(var(--x) * var(--seed-step) * var(--seed-explode)),
        calc(var(--y) * var(--seed-step) * var(--seed-explode) * -1),
        calc(var(--z) * var(--seed-step) * var(--seed-explode)))
        scale(1);
    }
  }
  /* Held open for two seconds, then the gaps narrow. They come close, not
     together: at one step they would touch and read as a single block, so they
     stop just short and the seams between them stay visible. */
  @keyframes bit-in {
    from {
      transform: translate3d(
        calc(var(--x) * var(--seed-step) * var(--seed-explode)),
        calc(var(--y) * var(--seed-step) * var(--seed-explode) * -1),
        calc(var(--z) * var(--seed-step) * var(--seed-explode)));
    }
    to {
      transform: translate3d(
        calc(var(--x) * var(--seed-step) * var(--seed-packed)),
        calc(var(--y) * var(--seed-step) * var(--seed-packed) * -1),
        calc(var(--z) * var(--seed-step) * var(--seed-packed)));
    }
  }


/* Homepage 6 uses a plain, normally scrolling hero with no scene transitions. */
.open { min-height: 100vh; min-height: 100svh;
  background-color: var(--h5-hero-surround); }
.open::before, .h5-backdrop { content: ''; position: absolute; inset: 0;
  max-width: var(--h5-hero-background-width); margin-inline: auto;
  transform: scale(var(--h5-hero-background-scale));
  transform-origin: var(--h5-hero-background-position);
  pointer-events: none;
  background-image: var(--h5-hero-edge-fade), var(--h5-scene-image, var(--h5-hero-background));
  background-position: var(--h5-hero-background-position);
  background-size: var(--h5-hero-image-width, 100%) 100%, var(--h5-hero-background-size);
  background-repeat: no-repeat;
  -webkit-mask-image: var(--h5-hero-edge-mask);
  mask-image: var(--h5-hero-edge-mask);
  -webkit-mask-size: var(--h5-hero-image-width, 100%) 100%;
  mask-size: var(--h5-hero-image-width, 100%) 100%;
  -webkit-mask-position: var(--h5-hero-background-position);
  mask-position: var(--h5-hero-background-position);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat; }
.h5-backdrop { opacity: 0; }
.h5-backdrop--1 { --h5-scene-image: var(--h5-background-mountains); }
.h5-backdrop--2 { --h5-scene-image: var(--h5-background-blossoms); }
.h5-backdrop--3 { --h5-scene-image: var(--h5-background-desert); }
.open__stage { transform: translateY(calc(var(--h5-platform-offset, 0px) + var(--h5-hero-content-drop))) scale(var(--h5-fit-scale, 1)); }
.open .rig {
  transform: rotateX(calc(var(--h5-cube-pitch) + var(--h7-pointer-pitch, 0deg)))
    rotateY(calc(var(--h5-cube-yaw) + var(--h7-pointer-yaw, 0deg)));
}
.open.is-paused .spin, .open.is-paused .seed,
.open.is-paused .bit, .open.is-paused .bit__icon { animation-play-state: paused; }

  .open.is-static .seed { animation: none; transform: none; }
  .open.is-static .bit { animation: none; visibility: visible;
    transform: translate3d(calc(var(--x) * var(--seed-step) * var(--seed-packed)),
      calc(var(--y) * var(--seed-step) * var(--seed-packed) * -1),
      calc(var(--z) * var(--seed-step) * var(--seed-packed))); }
  .open.is-static .bit__icon { animation: none; opacity: 1; transform: none; }

.open.is-static .spin { animation: none; }
@media (max-width: 560px) { .open { padding: var(--space-5) var(--space-3); } }
@media (prefers-reduced-motion: reduce) {
  .open .rig { transform: rotateX(var(--h5-cube-pitch)) rotateY(var(--h5-cube-yaw)); }
  .open .spin { animation: none; }

  .open.is-run .seed { animation: none; transform: none; }
  .open.is-run .bit { animation: none; visibility: visible;
    transform: translate3d(calc(var(--x) * var(--seed-step) * var(--seed-packed)),
      calc(var(--y) * var(--seed-step) * var(--seed-packed) * -1),
      calc(var(--z) * var(--seed-step) * var(--seed-packed))); }
  .open.is-run .bit__icon { animation: none; opacity: 1; transform: none; }
}
