:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #2555E5;
  color: #FFFFFF;
  font-family: 'Kode Mono', monospace;
  overflow: hidden;
  position: relative;
}

/* ---------- FX layers ---------- */

/* Phosphor dot grid */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.22) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.16;
  z-index: 9996;
  pointer-events: none;
}

/* Scan sweep */
html::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.055), transparent);
  transform: translateY(-120px);
  animation: scan-sweep 8s linear infinite;
  z-index: 9995;
  pointer-events: none;
}

/* CRT scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.065) 2px,
    rgba(0,0,0,0.065) 4px
  );
  z-index: 9998;
  pointer-events: none;
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 42%, rgba(0,0,25,0.52) 100%);
  z-index: 9997;
  pointer-events: none;
}

@keyframes scan-sweep {
  from { transform: translateY(-120px); }
  to { transform: translateY(100vh); }
}

/* Boot flash bar */
#boot-flash {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  height: 0;
  transform: translateY(-50%);
  background: #FFFFFF;
  box-shadow: 0 0 28px 6px rgba(255,255,255,0.85);
  z-index: 99999;
  pointer-events: none;
}

.booting #boot-flash {
  animation: boot-flash 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boot-flash {
  0%   { height: 0; }
  18%  { height: 3px; }
  60%  { height: 2px; }
  100% { height: 0; }
}

/* ---------- Boot clip-path reveal ---------- */

#page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  clip-path: inset(0% 0 0% 0);
}

#page-wrap.booting {
  animation: boot-reveal 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boot-reveal {
  0%   { clip-path: inset(50% 0 50% 0); }
  18%  { clip-path: inset(49.8% 0 49.8% 0); }
  100% { clip-path: inset(0% 0 0% 0); }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}

.glyph {
  font-family: 'UnifrakturMaguntia', cursive;
  font-weight: 400;
  font-size: clamp(18rem, 55vw, 44rem);
  line-height: 1;
  margin: 0;
  color: #FFFFFF;
  position: relative;
  text-shadow:
    -2px 0 rgba(255, 55, 55, 0.28),
    2px 0 rgba(55, 196, 255, 0.28);
  filter:
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.55))
    drop-shadow(0 0 48px rgba(90, 170, 255, 0.55));
  will-change: transform, filter;
}

.hero-meta {
  font-family: 'Kode Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.hero-meta span {
  display: inline-block;
}

.hero-meta span + span::before {
  content: '//';
  display: inline-block;
  margin: 0 0.75em;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }

  html::after {
    animation: none !important;
    opacity: 0;
  }

  #page-wrap.booting {
    animation: none !important;
    clip-path: inset(0% 0 0% 0) !important;
  }

  .booting #boot-flash {
    animation: none !important;
    height: 0 !important;
  }
}
