:root {
  color-scheme: dark;
  --void: #020303;
  --ink: #f1fdff;
  --cyan: #85f7ff;
  --cyan-dim: #1d8b94;
  --red: #ff2323;
  --red-dim: #7b0505;
  --line: rgba(133, 247, 255, 0.34);
  --line-hot: rgba(255, 35, 35, 0.72);
  --shadow-cyan: rgba(133, 247, 255, 0.42);
  --shadow-red: rgba(255, 35, 35, 0.48);
  --panel: rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--void);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(12, 52, 56, 0.22), transparent 34rem),
    linear-gradient(180deg, #030303 0%, #050101 58%, #020303 100%);
  color: var(--ink);
  font-family: "Courier New", Consolas, ui-monospace, monospace;
  letter-spacing: 0;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 50%, rgba(0, 0, 0, 0.16) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 255, 0.03), rgba(255, 0, 0, 0.05));
  background-size: 100% 4px, 8px 100%;
  mix-blend-mode: screen;
  opacity: 0.68;
}

body::after {
  background:
    radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.42) 72%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(255, 35, 35, 0.1), transparent 18%, transparent 82%, rgba(133, 247, 255, 0.09));
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 80;
  transform: translateY(-150%);
  border: 1px solid var(--cyan);
  background: #000;
  color: var(--ink);
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.signal-noise {
  position: fixed;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: screen;
}

.glitch-layer {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.glitch-slice {
  position: fixed;
  left: -2vw;
  right: -2vw;
  top: var(--slice-top);
  height: var(--slice-height);
  background-image: url("/landing-assets/yofuku-skull-crt.png");
  background-repeat: no-repeat;
  background-size: min(82rem, 112vw) auto;
  background-position: center var(--slice-bg-y);
  filter:
    contrast(1.45)
    saturate(1.25)
    drop-shadow(-10px 0 0 rgba(255, 0, 0, 0.34))
    drop-shadow(10px 0 0 rgba(0, 255, 255, 0.28));
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(var(--slice-shift));
  animation: slice-flicker var(--slice-duration) steps(1, end) forwards;
}

.portal {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
}

.asset {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  filter:
    contrast(1.24)
    saturate(1.12)
    drop-shadow(-8px 0 0 rgba(255, 0, 0, 0.18))
    drop-shadow(8px 0 0 rgba(0, 255, 255, 0.16));
}

.asset-skull {
  left: 50%;
  top: 46%;
  width: min(82rem, 112vw);
  max-width: none;
  opacity: 0.76;
  transform: translate(-50%, -50%);
}

.asset-figure {
  right: -8rem;
  bottom: -8rem;
  width: 31rem;
  opacity: 0.34;
  transform: translateY(2rem);
}

.scan-field {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255, 35, 35, 0.08) 9.2% 9.5%, transparent 9.7% 100%),
    repeating-linear-gradient(180deg, transparent 0 24px, rgba(133, 247, 255, 0.08) 25px, transparent 27px);
  opacity: 0.46;
}

.top-rail,
.bottom-rail,
.glyph-wall {
  position: fixed;
  z-index: 20;
  color: var(--red);
  font-size: 0.78rem;
  line-height: 1.55;
  text-shadow: 0 0 13px var(--shadow-red);
}

.top-rail,
.bottom-rail {
  left: 2rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.top-rail {
  top: 1.45rem;
}

.bottom-rail {
  bottom: 1.45rem;
}

.glyph-wall {
  top: 12vh;
  display: grid;
  gap: 1.1rem;
}

.glyph-wall span {
  display: block;
  min-width: 2.5rem;
  text-align: center;
}

.glyph-left {
  left: 3rem;
}

.glyph-right {
  right: 3rem;
}

.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2rem;
  padding: 7rem 2rem;
  text-align: center;
}

.hero-signal {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.eyebrow,
.subsignal {
  margin: 0;
  color: var(--red);
  font-size: 0.9rem;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-shadow: 0 0 12px var(--shadow-red);
}

.subsignal {
  max-width: 22rem;
}

h1 {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-size: 4.8rem;
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow:
    -0.08em 0 0 rgba(255, 35, 35, 0.76),
    0.08em 0 0 rgba(133, 247, 255, 0.66),
    0 0 34px rgba(133, 247, 255, 0.52);
  text-transform: uppercase;
}

h1::before,
h1::after {
  position: absolute;
  inset: 0;
  content: attr(data-glitch-text);
  opacity: 0;
  pointer-events: none;
}

h1::before {
  color: var(--red);
  transform: translate(-0.12em, 0);
}

h1::after {
  color: var(--cyan);
  transform: translate(0.12em, 0);
}

.portal.is-glitching h1::before,
.portal.is-glitching h1::after {
  animation: title-glitch 180ms steps(2, end) 2;
  opacity: 0.9;
}

.gate-grid {
  width: min(52rem, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gate {
  min-height: 6.4rem;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(133, 247, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.34));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 30px rgba(133, 247, 255, 0.08);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.gate:hover,
.gate:focus-visible {
  border-color: var(--line-hot);
  color: #fff;
  transform: translateY(-2px);
  background-color: rgba(255, 35, 35, 0.1);
  outline: none;
}

.gate:focus-visible {
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.9),
    0 0 0 5px var(--cyan),
    0 0 30px rgba(133, 247, 255, 0.2);
}

.gate-sigil {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 35, 35, 0.5);
  color: var(--red);
  font-size: 1.35rem;
  font-weight: 900;
  text-shadow: 0 0 16px var(--shadow-red);
}

.gate:hover .gate-sigil,
.gate:focus-visible .gate-sigil {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 16px var(--shadow-cyan);
}

.gate-copy {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.gate-label {
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 900;
}

.gate-meta {
  color: var(--cyan);
  font-size: 0.85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@keyframes title-glitch {
  0% {
    clip-path: inset(0 0 76% 0);
  }
  35% {
    clip-path: inset(38% 0 28% 0);
  }
  70% {
    clip-path: inset(72% 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes slice-flicker {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 0.88;
  }
  38% {
    opacity: 0.18;
  }
  58% {
    opacity: 0.76;
  }
  76% {
    opacity: 0.42;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .top-rail,
  .bottom-rail {
    left: 1rem;
    right: 1rem;
    font-size: 0.72rem;
  }

  .bottom-rail span:nth-child(2),
  .glyph-wall {
    display: none;
  }

  .stage {
    padding: 6rem 1rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  .gate-grid {
    grid-template-columns: 1fr;
  }

  .asset-skull {
    width: 64rem;
    opacity: 0.72;
  }

  .glitch-slice {
    background-size: 64rem auto;
  }

  .asset-figure {
    right: -11rem;
    width: 24rem;
    opacity: 0.26;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 2.05rem;
  }

  .subsignal {
    max-width: 17rem;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 1.95rem;
  }

  .eyebrow,
  .subsignal {
    font-size: 0.78rem;
  }

  .gate {
    grid-template-columns: 3.5rem 1fr;
    min-height: 5.4rem;
  }

  .gate-sigil {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1rem;
  }

  .gate-label {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .signal-noise {
    display: none;
  }

  .portal.is-glitching h1::before,
  .portal.is-glitching h1::after,
  .glitch-slice {
    animation: none;
    display: none;
  }
}
