:root {
  --bg0: #05070c;
  --bg1: #0a1018;
  --ink: #e8f4ff;
  --muted: #7a93a8;
  --line: rgba(0, 240, 255, 0.18);
  --cyan: #00f0ff;
  --magenta: #ff2d95;
  --accent: var(--cyan);
  --accent-ink: #031018;
  --glow-c: rgba(0, 240, 255, 0.35);
  --glow-m: rgba(255, 45, 149, 0.28);
  --font-display: "Orbitron", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans JP", "Segoe UI", "Yu Gothic UI", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, Consolas, monospace;
  --shell: min(1080px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg0);
  line-height: 1.6;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 50% -10%, var(--glow-c), transparent 55%),
    radial-gradient(700px 480px at 85% 30%, var(--glow-m), transparent 50%),
    radial-gradient(600px 400px at 15% 70%, rgba(0, 240, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #05070c 0%, #0a1018 45%, #05080f 100%);
}
.grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -8%;
  height: 55%;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.11) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(520px) rotateX(58deg);
  transform-origin: center top;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  animation: grid-drift 28s linear infinite;
}
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
}
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 240, 255, 0.05) 48%,
    transparent 52%
  );
  background-size: 100% 220%;
  animation: scan-sweep 7s ease-in-out infinite;
}
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
  padding: 0 0 48px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 18px var(--glow-c);
}
nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  transition: color 160ms ease, text-shadow 160ms ease;
}
nav a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--glow-c);
}

main { padding: 0 0 40px; }

.hero {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0 72px;
  animation: rise 700ms ease-out both;
}
.signal {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--magenta);
  text-shadow: 0 0 14px var(--glow-m);
  animation: blink-soft 2.8s ease-in-out infinite;
}
.brand-hero {
  position: relative;
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.6rem, 12vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow:
    0 0 24px var(--glow-c),
    0 0 60px rgba(0, 240, 255, 0.25);
}
.brand-hero::before,
.brand-hero::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.brand-hero::before {
  color: var(--cyan);
  clip-path: inset(0 0 55% 0);
  transform: translate(-2px, 0);
  opacity: 0.7;
  animation: glitch-a 4.5s steps(2, end) infinite;
}
.brand-hero::after {
  color: var(--magenta);
  clip-path: inset(45% 0 0 0);
  transform: translate(2px, 0);
  opacity: 0.65;
  animation: glitch-b 3.8s steps(2, end) infinite;
}
.hero h1 {
  margin: 0 0 16px;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  letter-spacing: 0.06em;
  line-height: 1.45;
}
.lead {
  margin: 0 auto 32px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.btn.primary {
  background: linear-gradient(120deg, var(--cyan), #7dfff0 55%, var(--cyan));
  color: var(--accent-ink);
  box-shadow: 0 0 28px var(--glow-c), 0 0 48px rgba(255, 45, 149, 0.12);
  animation: pulse-glow 2.6s ease-in-out infinite;
}
.btn.primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.sec-tag {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--glow-c);
}

.strip,
.howto,
.topology {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 48px;
  text-align: center;
  animation: rise 800ms ease-out 120ms both;
}
.strip h2,
.roles h2,
.howto h2,
.topology h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}
.strip p,
.roles p,
.howto li,
.topo-lead {
  color: var(--muted);
}
.facts {
  list-style: none;
  padding: 0;
  margin: 22px auto;
  max-width: 420px;
  display: grid;
  gap: 0;
  text-align: left;
}
.facts li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong {
  color: var(--cyan);
  margin-right: 12px;
  font-weight: 400;
}
.note { font-size: 0.9rem; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--cyan);
}

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  max-width: 860px;
  margin: 0 auto 36px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  animation: rise 850ms ease-out 180ms both;
}
.howto ol {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 520px;
  text-align: left;
  counter-reset: step;
}
.howto li {
  position: relative;
  margin: 0;
  padding: 14px 0 14px 52px;
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.howto li:last-child { border-bottom: 1px solid var(--line); }
.howto li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--font-mono);
  color: var(--magenta);
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px var(--glow-m);
}

.topo-lead {
  margin: 0 auto 32px;
  max-width: 38rem;
}
.topo {
  margin: 0 auto 40px;
  padding: 0;
  max-width: 640px;
}
.topo figcaption {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  justify-items: center;
}
.topo figcaption strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.topo figcaption span {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
}
.topo figcaption em {
  font-style: normal;
  color: var(--magenta);
  font-weight: 600;
  text-shadow: 0 0 10px var(--glow-m);
}
.topo-svg {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.12));
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 0 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  border-top: 1px solid var(--line);
}
.brand-foot {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--glow-c);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 48px, 48px 0; }
}
@keyframes scan-sweep {
  0%, 100% { background-position: 0 -40%; }
  50% { background-position: 0 140%; }
}
@keyframes blink-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 24px var(--glow-c), 0 0 40px rgba(255, 45, 149, 0.1); }
  50% { box-shadow: 0 0 36px var(--glow-c), 0 0 56px rgba(255, 45, 149, 0.22); }
}
@keyframes glitch-a {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  91% { transform: translate(-3px, 1px); opacity: 0.75; }
  93% { transform: translate(2px, -1px); opacity: 0.55; }
  95% { transform: translate(-1px, 0); opacity: 0.7; }
}
@keyframes glitch-b {
  0%, 88%, 100% { transform: translate(0); opacity: 0; }
  89% { transform: translate(3px, -1px); opacity: 0.7; }
  92% { transform: translate(-2px, 1px); opacity: 0.5; }
  94% { transform: translate(1px, 0); opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .grid-floor,
  .scanlines::after,
  .signal,
  .btn.primary,
  .brand-hero::before,
  .brand-hero::after {
    animation: none;
  }
}

@media (max-width: 720px) {
  :root { --shell: min(100% - 28px, 1080px); }
  .roles { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 56px; }
  nav { gap: 10px; }
  .top { flex-direction: column; align-items: flex-start; }
}
