/* The intro: a glyph-field loader that fills as the page loads, lifts away in
   columns, and the first screen builds in behind it. Off under reduced motion. */

.loader { display: none; }
.intro .loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 200;
  color: var(--white);
  cursor: crosshair;
  user-select: none;
}
.loader__cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.loader__cols span { background: var(--black); margin-right: -1px; }
.loader__field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.loader__mark,
.loader__who,
.loader__count,
.loader__hint { position: absolute; margin: 0; pointer-events: none; }
.loader__mark { top: 22px; left: var(--edge); font: 800 22px/1 var(--kn-display); font-stretch: 75%; }
.loader__who { top: 20px; right: var(--edge); text-align: right; font: 500 13.5px/1.5 var(--mono); }
.loader__who span { color: var(--ink-2); font-weight: 400; }
.loader__count {
  left: var(--edge);
  bottom: clamp(8px, 2vw, 24px);
  font: 700 clamp(120px, 24vw, 340px)/0.9 var(--black-letter);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.loader__count span { display: inline-block; min-width: 2.4ch; }
.loader__hint { right: var(--edge); bottom: clamp(20px, 3vw, 40px); font-size: 13px; color: var(--ink-2); }
@media (hover: none) { .loader__hint { display: none; } }

/* Leaving: text and field fade, then the black columns lift one after another. */
.intro-out .loader { pointer-events: none; }
.intro-out .loader__field,
.intro-out .loader__mark,
.intro-out .loader__who,
.intro-out .loader__count,
.intro-out .loader__hint { transition: opacity 0.2s ease; opacity: 0; }
.intro-out .loader__cols span {
  transform: translateY(-101%);
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.intro-out .loader__cols span:nth-child(1) { transition-delay: 0s; }
.intro-out .loader__cols span:nth-child(2) { transition-delay: 0.04s; }
.intro-out .loader__cols span:nth-child(3) { transition-delay: 0.08s; }
.intro-out .loader__cols span:nth-child(4) { transition-delay: 0.12s; }
.intro-out .loader__cols span:nth-child(5) { transition-delay: 0.16s; }
.intro-out .loader__cols span:nth-child(6) { transition-delay: 0.2s; }

/* ---------- The first screen builds in ---------- */

.hero__name .ln { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__name .ln > span { display: inline-block; }

.intro [data-in] { opacity: 0; }
.intro .hero__name .ln > span { transform: translateY(112%); }
.intro .nav { opacity: 0; }
.intro .hero__lines .lead { stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro .hero__lines .pin,
.intro .hero__lines .ring { opacity: 0; }

.intro-play [data-in] { animation: in-rise 0.95s cubic-bezier(0.16, 0.84, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 260ms); }
.intro-play .hero__face[data-in] { animation-name: in-fade; animation-duration: 0.7s; animation-delay: 0s; } /* the face is there as the columns lift */
.intro-play .hero__name .ln > span { animation: in-line 1.05s cubic-bezier(0.16, 0.84, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 230ms); }
.intro-play .nav { animation: in-fade 0.8s ease both 0.32s; }
/* The leader lines draw from each label to the face, then the pins land. */
.intro-play .hero__lines .lead { animation: in-stroke 0.8s cubic-bezier(0.65, 0, 0.35, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 700ms); }
.intro-play .hero__lines .pin,
.intro-play .hero__lines .ring { animation: in-pop 0.45s ease both; animation-delay: calc(var(--i, 0) * 110ms + 1250ms); }

@keyframes in-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes in-line { from { transform: translateY(112%); } to { transform: none; } }
@keyframes in-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes in-pop { from { opacity: 0; } to { opacity: var(--o, 1); } }

.foot__actions { display: inline-flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.foot__replay {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 0.25em;
}
.foot__replay:hover { color: var(--white); text-decoration-style: solid; }

@media (prefers-reduced-motion: reduce) {
  .foot__replay { display: none; }
}
