/* Startup and error screens share the Extrafazant electric blue & ink theme. */
.fold { position: absolute; inset: 12% 5%; display: flex; transform: rotate(-12deg); pointer-events: none; }
.fold i { flex: 1; background: var(--electric-blue); clip-path: polygon(0 18%, 100% 0, 100% 82%, 0 100%); }
.fold i:nth-child(2) { background: var(--hot-magenta); clip-path: polygon(0 0, 100% 16%, 100% 100%, 0 82%); }
.fold i:nth-child(3) { background: var(--acid-yellow); clip-path: polygon(0 16%, 100% 0, 100% 84%, 0 100%); }

#studio-intro { display: none; }
html.intro #studio-intro {
  display: grid;
  place-items: center;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  isolation: isolate;
  animation: intro-out 520ms both;
}
html.intro #studio-intro::before,
html.intro #studio-intro::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51%;
  z-index: -1;
  background: var(--electric-blue);
  animation: curtain-left 520ms var(--ease) both;
}
html.intro #studio-intro::before { left: 0; }
html.intro #studio-intro::after { right: 0; animation-name: curtain-right; }
.intro-wordmark {
  color: #ffffff;
  font-family: var(--font-display), Impact, sans-serif;
  font-size: clamp(64px, 15vw, 140px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 6px 6px 0 #0a0a0a;
  animation: wordmark-out 520ms var(--ease) both;
}
@keyframes curtain-left { 0%, 30% { transform: none; } 100% { transform: translateX(-102%); } }
@keyframes curtain-right { 0%, 30% { transform: none; } 100% { transform: translateX(102%); } }
@keyframes wordmark-out { 0%, 25% { opacity: 1; transform: scale(1) rotate(-3deg); } 75%, 100% { opacity: 0; transform: scale(0.92) translateY(-16px); } }
@keyframes intro-out { 0%, 99% { visibility: visible; } 100% { visibility: hidden; } }

.error-page {
  min-height: 100svh;
  box-sizing: border-box;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-4);
  background: var(--paper);
  color: var(--ink);
  padding: 8vw;
  font-family: var(--font-sans), Arial, sans-serif;
}
.error-page .error-mark {
  position: relative;
  font-family: var(--font-display), Impact, sans-serif;
  font-size: clamp(5rem, 23vw, 18rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  margin-right: 1em;
  color: var(--electric-blue);
  text-shadow: 6px 6px 0 var(--ink);
}
.error-mark .fold { inset: 8% auto auto 110%; width: 0.8em; height: 0.5em; }
.error-mark i:last-child { transform: translate(12%, -18%); }
.error-page h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.04em; margin: 0; }
.error-page nav { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.error-page a { color: var(--electric-blue); font-weight: 700; padding: var(--space-3) 0; text-decoration: underline; }
.boot-contact { position: absolute; inset: 0; padding: 8vw; background: var(--paper); color: var(--ink); font-family: Arial, sans-serif; animation: boot-contact 1s step-end both; }
.boot-contact a { color: var(--electric-blue); }
@keyframes boot-contact { from { visibility: hidden; } to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { html.intro #studio-intro { display: none; } }
