.intro-screen {
  --intro-play: paused;
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: #000;
  color: #fff;
  animation: intro-curtain .60s 2.08s cubic-bezier(.55, .03, .34, 1) both;
  animation-play-state: var(--intro-play);
}

.intro-screen.running { --intro-play: running; }
.intro-screen.complete { visibility: hidden; pointer-events: none; }

.intro-layer { position: absolute; inset: 0; display: grid; place-items: center; }
.intro-light { color: #111116; background: #eceee5; }
.intro-dark {
  color: #fff;
  background: #000;
  animation: intro-color-wipe .78s .38s cubic-bezier(.55, .04, .34, 1) both;
  animation-play-state: var(--intro-play);
}

.intro-lockup { width: min(84vw, 720px); text-align: center; }

.intro-tagline {
  position: relative;
  display: inline-grid;
  margin: 0;
  font: italic 400 clamp(22px, 4.8vw, 60px)/1.16 Georgia, "Times New Roman", serif;
  letter-spacing: -.038em;
  animation: intro-tagline-sequence 2.25s linear both;
  animation-play-state: var(--intro-play);
}

.intro-tagline-accessible, .intro-tagline-text { grid-area: 1 / 1; }
.intro-tagline-accessible { opacity: 0; }
.intro-tagline-text {
  animation: intro-clean-text .72s .9s steps(1, end) 2;
  animation-play-state: var(--intro-play);
}
.intro-tagline-slice {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: intro-slice-glitch .72s .9s steps(1, end) 2;
  animation-play-state: var(--intro-play);
}

.intro-tagline-slice:nth-last-child(4) { clip-path: inset(0 0 74%); --shift: .12em; }
.intro-tagline-slice:nth-last-child(3) { clip-path: inset(26% 0 54%); --shift: -.21em; }
.intro-tagline-slice:nth-last-child(2) { clip-path: inset(46% 0 28%); --shift: .19em; }
.intro-tagline-slice:last-child { clip-path: inset(72% 0 0); --shift: -.11em; }

.intro-word { white-space: nowrap; }
.intro-character { position: relative; display: inline-block; }
.intro-character::before { content: attr(data-letter); visibility: hidden; }
.intro-character::after {
  content: attr(data-current);
  position: absolute;
  inset-block-start: 0;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes intro-color-wipe {
  from { clip-path: ellipse(145% 100% at 50% 205%); }
  to { clip-path: ellipse(145% 114% at 50% 61%); }
}

@keyframes intro-curtain {
  from { clip-path: ellipse(180% 145% at 50% 0%); }
  to { clip-path: ellipse(180% 145% at 50% -152%); }
}

@keyframes intro-clean-text {
  0%, 48%, 100% { opacity: 1; }
  29% { opacity: 0; }
}

@keyframes intro-slice-glitch {
  0%, 48%, 100% { opacity: 0; transform: none; }
  29% { opacity: 1; transform: translateX(var(--shift)); }
  35% { opacity: 1; transform: translateX(calc(var(--shift) * -.75)); }
  41% { opacity: 1; transform: translateX(calc(var(--shift) * .55)); }
}

@keyframes intro-tagline-sequence {
  0%, 4% { opacity: 0; clip-path: inset(0); }
  14%, 91% { opacity: 1; clip-path: inset(-8% -10%); }
  97% { opacity: 1; clip-path: inset(46% 72% 49% 0); }
  100% { opacity: 0; clip-path: inset(49% 95% 50% 0); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-screen, .intro-tagline, .intro-tagline-text, .intro-tagline-slice { animation: none; }
  .intro-light { background: #000; color: #fff; }
  .intro-dark { display: none; }
  .intro-tagline-slice { display: none; }
}
