@font-face {
  font-family: "Inter";
  src: url("./inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #05070b;
  --ink: #eceef2;
  --muted: #a3a9b5;
  --teal: #5fd4bf;
  --hot: #ff3d8b;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.stage {
  position: fixed;
  inset: 0;
  background: var(--bg) center / cover no-repeat;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s ease-out;
}
.live #scene { opacity: 1; }

/* Without WebGL (or without JavaScript) the page shows one frame of the same scene. */
.still .stage { background-image: url("./still.jpg"); }
.still #scene { display: none; }
.still-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tube-screen lines and darker corners over the scene. */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 15% at 50% 21%, rgba(3, 5, 9, 0.6), transparent 72%),
    radial-gradient(ellipse 120% 90% at 50% 46%, transparent 52%, rgba(2, 3, 6, 0.62) 100%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
}

.mark {
  position: fixed;
  top: 16vh;
  top: 16svh;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  font-size: clamp(2.5rem, 8.6vw, 6.75rem);
  font-weight: 250;
  line-height: 1;
  letter-spacing: 0.012em;
  font-feature-settings: "cv11", "ss03";
  color: var(--ink);
  /* light split into its two neon parts, then a soft halo */
  text-shadow:
    -0.014em 0 0 rgba(255, 61, 139, 0.7),
    0.014em 0 0 rgba(95, 212, 191, 0.75),
    0 0 0.5em rgba(95, 212, 191, 0.35);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, 0.62) 2px 3px);
  mask-image: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, 0.62) 2px 3px);
  pointer-events: none;
  user-select: none;
  animation: power-on 1.25s 1.1s both, glitch 11s 6s infinite;
}
.mark-dot { color: var(--hot); text-shadow: 0 0 0.35em rgba(255, 61, 139, 0.9); }

@keyframes power-on {
  0% { opacity: 0; transform: scaleY(0.04); filter: brightness(3); }
  9% { opacity: 1; transform: scaleY(0.04); }
  20% { opacity: 0.25; transform: none; }
  27% { opacity: 1; }
  33% { opacity: 0.15; }
  41% { opacity: 0.9; filter: brightness(1.6); }
  52% { opacity: 0.55; }
  60%, 100% { opacity: 1; transform: none; filter: none; }
}

@keyframes glitch {
  0%, 96.4%, 100% { transform: none; opacity: 1; }
  96.6% { transform: translateX(-0.03em) skewX(-8deg); opacity: 0.75; }
  97.2% { transform: translateX(0.04em); opacity: 1; }
  97.8% { transform: translateX(-0.012em) skewX(5deg); opacity: 0.6; }
  98.4% { transform: none; opacity: 1; }
}

.by {
  position: fixed;
  left: max(22px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  padding: 14px 4px;
  font-size: 0.8125rem;
  font-weight: 450;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.82;
  transition: color 0.2s, opacity 0.2s;
  animation: fade-in 1.2s 2.6s both;
}
.by:hover, .by:focus-visible { color: var(--teal); opacity: 1; }
.by:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

@keyframes fade-in { from { opacity: 0; } }

/* Tall screens: the planet sits lower, so the name comes down toward it. */
@media (max-aspect-ratio: 4/5) {
  .mark { top: 25vh; top: 25svh; }
}

@media (prefers-reduced-motion: reduce) {
  .mark, .by { animation: none; }
  #scene { transition: none; }
}
