/* A landscape revealed underneath the page, rather than another homepage. */
body > main { position: relative; z-index: 2; background: #141414; }
body > .site-header, body > .lab-header { z-index: 100; }
.world-end {
  position: relative;
  min-height: 110svh;
  color: #f3efe6;
  background: transparent;
  font-family: "Inter Tight", Arial, sans-serif;
  isolation: auto;
}
.world-end-stage {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
  padding: clamp(24px,3vw,48px);
  background: #141414;
  opacity: 0;
  pointer-events: none;
}
.world-end[data-visible="1"] .world-end-stage { opacity: 1; pointer-events: auto; }
.world-end-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom,transparent,black 12%,black 85%,transparent);
}
.world-end[data-visible="0"] .world-end-art {
  /* Let the engine's observer suspend rendering without rebuilding its canvas. */
  transform: translateY(200vh);
}
.world-end-art ascii-art {
  display: block;
  width: var(--scene-render-width, min(100vw,200svh));
  transform: scale(var(--scene-scale,1));
  transform-origin: center;
  flex: none;
  opacity: 0;
  transition: opacity 650ms cubic-bezier(.22,1,.36,1);
}
.world-end[data-ready="1"] ascii-art { opacity: 1; }
.world-end-art canvas { display: block; width: 100%; }
.world-end-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,rgba(20,20,20,.8),transparent 22%,transparent 72%,rgba(20,20,20,.94));
}
.world-end-heading, .world-end-bottom, .world-end-status { position: relative; z-index: 2; }
.world-end-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding-top: 60px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body[data-page="home"] .world-end-heading { padding-top: 0; }
.world-end-index { color: #c8b7e8; white-space: nowrap; }
.world-end-name { color: #f3efe6; }
.world-end button { appearance: none; font: inherit; color: inherit; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.world-end-motion {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-height: 44px;
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.world-end button:hover, .world-end a:hover { color: #c8b7e8; }
.world-end :is(a,button):focus-visible { outline: 2px solid #c8b7e8; outline-offset: 5px; }
.world-end-status { margin: auto; color: #aaa69e; font-size: 14px; text-align: center; }
.world-end-status:empty { display: none; }
.world-end-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr 44px;
  align-items: center;
  gap: 24px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(243,239,230,.2);
  font-size: 13px;
  line-height: 1.5;
}
.world-end a { color: #f3efe6; text-decoration: none; transition: color 300ms ease; }
.world-end-links { display: flex; align-items: center; gap: 24px; }
.world-end-credit { justify-self: end; color: #bdb9b1 !important; font-size: 11px; }
.world-end-credit:hover { color: #c8b7e8 !important; }
.world-end-top { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.world-end-space { height: 110svh; min-height: 540px; pointer-events: none; }
.world-end-noscript { position: relative; z-index: 2; margin: 0; padding: 40px; background: #141414; }
@media (max-width: 760px) {
  .world-end-stage { padding: 24px 20px max(24px,env(safe-area-inset-bottom)); }
  .world-end-heading { gap: 12px; font-size: 9px; padding-top: 60px; }
  .world-end-art ascii-art { width: var(--scene-render-width,150vw); max-width: 1000px; }
  .world-end-art { mask-image: linear-gradient(to bottom,transparent,black 18%,black 80%,transparent); }
  .world-end-bottom { grid-template-columns: minmax(0,1fr) 44px; gap: 20px; }
  .world-end-links { grid-row: 1; grid-column: 1; gap: 20px; flex-wrap: wrap; }
  .world-end-copy { grid-row: 2; grid-column: 1; font-size: 11px; color: #bdb9b1; }
  .world-end-credit { grid-row: 3; grid-column: 1; justify-self: start; }
  .world-end-top { grid-column: 2; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .world-end-art ascii-art, .world-end a { transition: none; }
}
@media print {
  .world-end { display: none !important; }
}
