/* The live logo. logo.js builds .logo__halo, .logo__light, .logo__glow and .logo__cells inside div#logo and sizes them.
   #logo is positioned but is not a stacking context (no z-index, opacity, transform, filter or will-change),
   so the halo, the light and the glow, at z-index -1, paint in main#column's stacking context: above the sky,
   behind the tagline and the headline that follow. */

#logo.logo--live {
  position: relative;
  display: block;
  margin-inline: auto;
  width: var(--logo-w);
  height: calc(var(--logo-p) * 45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.logo__cells,
.logo__glow,
.logo__light,
.logo__halo {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  pointer-events: none;
}

.logo__cells {
  image-rendering: pixelated;
}

/* A blurred copy of the spectrum cells only. The brief's blur radius 3.5p is the canvas shadowBlur of the
   reference runtime, which is a Gaussian of standard deviation 1.75p; CSS blur() takes the deviation. */
.logo__glow {
  z-index: -1;
  filter: blur(calc(var(--logo-p) * 1.75));
  opacity: 0.45;
  will-change: opacity;
  animation: logo-breath 8s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* The ivory light round the wordmark and the star (Aaron, 2 Dec 2026): baked and blurred once per layout by
   logo.js, the cells' own boxes cut out of it so the dots stay crisp. No CSS filter: only its opacity moves,
   breathing deeper than the spectrum glow (0.35 to 0.75) so the breath can be seen at a glance. */
.logo__light {
  z-index: -1;
  opacity: 0.35;
  will-change: opacity;
  animation: logo-light-breath 8s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* A disc 115p across, centred on the star, clear at its edge (so no corner is ever seen). */
.logo__halo {
  z-index: -1;
  background: radial-gradient(
    circle closest-side,
    rgba(245, 245, 247, 0.22) 0%,
    rgba(34, 211, 238, 0.08) 40%,
    rgba(34, 211, 238, 0) 100%
  );
  opacity: 0.45;
  transform-origin: 50% 50%;
  will-change: opacity, transform;
  animation: logo-breath 8s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* The breath, 0.5 - 0.5 cos(2 pi t / 8s): low at 0, high at 4s. The sine ease between the turning points
   follows the cosine to within a percent. logo.js aligns it to the clock from the tick count. */
@keyframes logo-breath {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes logo-light-breath {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.75;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo__light {
    animation: none;
    opacity: 0.55;
    will-change: auto;
  }

  .logo__glow,
  .logo__halo {
    animation: none;
    opacity: 0.45;
    will-change: auto;
  }
}
