:root {
  --bg: #07080c;
  --bg-glow: #131a26;
  --fg: #eef2f7;
  --muted: #8a94a6;
  --accent-a: #22d3ee; /* cyan  */
  --accent-b: #f43f7f; /* magenta */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--bg-glow) 0%, var(--bg) 58%),
    var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

/* Scanline overlay + vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  animation: scan-drift 8s linear infinite;
}

@keyframes scan-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 3px, 0 0; }
}

/* Layout */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding-inline: 24px;
  padding-block: 48px;
  text-align: center;
}

/* Title */
.glitch {
  position: relative;
  margin: 0;
  font-size: clamp(2.4rem, 13vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.05;
  white-space: nowrap;
  text-transform: uppercase;
  /* the wordmark is rendered in caps, so the scramble glyphs match */
  text-indent: 0.08em; /* balance the trailing letter-spacing */
  text-shadow:
    0.5px 0 0 rgba(244, 63, 127, 0.35),
    -0.5px 0 0 rgba(34, 211, 238, 0.35);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform, clip-path, opacity;
}

.glitch::before {
  color: var(--accent-a);
  animation: glitch-a 6s steps(1, end) infinite;
}

.glitch::after {
  color: var(--accent-b);
  animation: glitch-b 6s steps(1, end) infinite;
}

@keyframes glitch-a {
  0%   { opacity: 0;    transform: translate3d(0, 0, 0);      clip-path: inset(0 0 100% 0); }
  1%   { opacity: 0.9;  transform: translate3d(-4px, -2px, 0); clip-path: inset(8% 0 68% 0); }
  3%   { opacity: 0.9;  transform: translate3d(5px, 1px, 0);   clip-path: inset(42% 0 36% 0); }
  5%   { opacity: 0.9;  transform: translate3d(-3px, 2px, 0);  clip-path: inset(70% 0 10% 0); }
  7%   { opacity: 0.9;  transform: translate3d(4px, -1px, 0);  clip-path: inset(24% 0 54% 0); }
  9%   { opacity: 0.9;  transform: translate3d(-2px, 0, 0);    clip-path: inset(55% 0 28% 0); }
  11%  { opacity: 0;    transform: translate3d(0, 0, 0);       clip-path: inset(0 0 100% 0); }
  100% { opacity: 0;    transform: translate3d(0, 0, 0);       clip-path: inset(0 0 100% 0); }
}

@keyframes glitch-b {
  0%   { opacity: 0;    transform: translate3d(0, 0, 0);      clip-path: inset(0 0 100% 0); }
  2%   { opacity: 0.9;  transform: translate3d(4px, 2px, 0);   clip-path: inset(30% 0 48% 0); }
  4%   { opacity: 0.9;  transform: translate3d(-5px, -1px, 0); clip-path: inset(62% 0 20% 0); }
  6%   { opacity: 0.9;  transform: translate3d(3px, -2px, 0);  clip-path: inset(14% 0 70% 0); }
  8%   { opacity: 0.9;  transform: translate3d(-4px, 1px, 0);  clip-path: inset(48% 0 32% 0); }
  10%  { opacity: 0.9;  transform: translate3d(2px, 0, 0);     clip-path: inset(78% 0 6% 0); }
  12%  { opacity: 0;    transform: translate3d(0, 0, 0);       clip-path: inset(0 0 100% 0); }
  100% { opacity: 0;    transform: translate3d(0, 0, 0);       clip-path: inset(0 0 100% 0); }
}

/* Tagline */
.tagline {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(0.85rem, 3vw, 1.05rem);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  line-height: 1.7;
  text-transform: uppercase;
  animation: fade-up 1.1s 0.5s ease-out both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    animation: none;
    background: radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  }

  .glitch::before,
  .glitch::after {
    animation: none;
    display: none;
  }

  .glitch {
    text-shadow: none;
  }

  .tagline {
    animation: none;
  }
}
