:root {
  --bg: #030014;
  --ink: #eef6ff;
  --muted: #8ea0c4;
  --cyan: #3cf0ff;
  --magenta: #ff3d9a;
  --violet: #7c5cff;
  --gold: #f4c45a;
  --glass: rgba(10, 14, 40, 0.55);
  --line: rgba(60, 240, 255, 0.22);
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: radial-gradient(1200px 700px at 20% -10%, #1a0a48 0%, transparent 55%),
              radial-gradient(900px 600px at 110% 20%, #3a0a3a 0%, transparent 50%),
              var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor input,
body.has-cursor select,
body.has-cursor textarea {
  cursor: none;
}

img { max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

#starfield, #aurora {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#aurora { opacity: 0.55; mix-blend-mode: screen; }

.noise {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 50;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(60, 240, 255, 0.55);
  transition: width .2s, height .2s, background .2s, border-color .2s;
}

.cursor.is-hot {
  width: 56px;
  height: 56px;
  background: rgba(60, 240, 255, 0.08);
  border-color: var(--magenta);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: #020010;
  transition: opacity .7s ease, visibility .7s;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot__inner { width: min(520px, 88vw); }

.boot__brand {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.28em;
  font-size: 13px;
  color: var(--cyan);
}

.boot__brand span { color: var(--muted); letter-spacing: 0.08em; }

.boot__log {
  min-height: 132px;
  margin: 22px 0 18px;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #9ad7ff;
}

.boot__bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.boot__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 16px var(--cyan);
}

.boot__hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.nav, .hud, main, footer { position: relative; z-index: 2; }

.nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 6vw;
  backdrop-filter: blur(16px);
  background: rgba(3, 0, 20, 0.42);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  z-index: 9;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.22em;
  font-size: 14px;
}

.nav__mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  animation: pulse 2.2s infinite;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: color .2s;
}

.nav__links a:hover { color: var(--ink); }

.nav__cta {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cyan);
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.hud {
  position: fixed;
  right: 22px;
  top: 88px;
  display: grid;
  gap: 8px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  color: #8fd8ff;
  opacity: 0.72;
  z-index: 8;
}

.hud__item span { color: var(--gold); }

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 8vh 6vw 12vh;
  position: relative;
}

.hero__grid {
  position: absolute;
  inset: 10% 8%;
  background-image:
    linear-gradient(rgba(60,240,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60,240,255,0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.eyebrow {
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--cyan);
  margin-bottom: 16px;
}

.hero__title {
  font-family: Orbitron, sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 12vw, 132px);
  letter-spacing: 0.12em;
  line-height: 0.95;
}

.glitch {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 32px rgba(60, 240, 255, 0.35);
}

.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

.glitch::before {
  color: var(--magenta);
  transform: translate(2px, -1px);
  opacity: 0.55;
  animation: glitch 3.2s infinite;
}

.glitch::after {
  color: var(--cyan);
  transform: translate(-2px, 1px);
  opacity: 0.45;
  animation: glitch 2.4s infinite reverse;
}

.hero__sub {
  margin-top: 18px;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 500;
}

.hero__desc {
  max-width: 560px;
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 34px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  letter-spacing: 0.08em;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.btn--primary {
  background: linear-gradient(120deg, var(--cyan), #6d7bff 55%, var(--magenta));
  color: #061018;
  font-weight: 700;
  box-shadow: 0 0 28px rgba(60, 240, 255, 0.28);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn:hover { transform: translateY(-2px); }

.hero__stats {
  display: flex;
  gap: 42px;
  margin-top: 56px;
}

.hero__stats strong {
  display: block;
  font-family: Orbitron, sans-serif;
  font-size: 28px;
  color: var(--gold);
}

.hero__stats span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.scroll-hint span {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--cyan), transparent);
  animation: drip 1.6s infinite;
}

section { padding: 10vh 6vw; }

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: Orbitron, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  margin: 8px 0 14px;
}

.section-head p:last-child { color: var(--muted); line-height: 1.75; }

.orbit-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.orbit-stage {
  position: relative;
  aspect-ratio: 1;
  max-width: 560px;
  margin: 0 auto;
  perspective: 900px;
}

.sun {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 35%, #ff6b2c);
  box-shadow: 0 0 40px #ffb347, 0 0 90px rgba(255, 140, 60, 0.45);
  z-index: 3;
  cursor: none;
}

.ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border: 1px dashed rgba(142, 160, 196, 0.22);
  border-radius: 50%;
  animation: spin linear infinite;
}

.ring--1 { width: 38%; height: 38%; animation-duration: 14s; }
.ring--2 { width: 56%; height: 56%; animation-duration: 22s; animation-direction: reverse; }
.ring--3 { width: 74%; height: 74%; animation-duration: 32s; }
.ring--4 { width: 92%; height: 92%; animation-duration: 44s; animation-direction: reverse; }

.orbit-stage.is-paused .ring { animation-play-state: paused; }

.planet {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
}

.p-aether { background: radial-gradient(circle at 30% 30%, #fff, var(--cyan)); box-shadow: 0 0 16px var(--cyan); }
.p-ion { background: radial-gradient(circle at 30% 30%, #fff, var(--magenta)); box-shadow: 0 0 16px var(--magenta); width: 18px; height: 18px; }
.p-void { background: radial-gradient(circle at 30% 30%, #c9b6ff, var(--violet)); box-shadow: 0 0 16px var(--violet); width: 26px; height: 26px; }
.p-prism { background: radial-gradient(circle at 30% 30%, #fff4bf, #46ffb0); box-shadow: 0 0 16px #46ffb0; width: 16px; height: 16px; }

.planet:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.glass {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.dossier { padding: 32px; min-height: 320px; }

.dossier__code {
  font-family: "Share Tech Mono", monospace;
  color: var(--gold);
  letter-spacing: 0.16em;
  font-size: 12px;
}

.dossier h3 {
  font-family: Orbitron, sans-serif;
  margin: 12px 0 14px;
  font-size: 26px;
}

.dossier p { color: var(--muted); line-height: 1.8; }

.dossier__meta {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.dossier__meta li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 8px;
  color: var(--muted);
}

.dossier__meta b { color: var(--ink); font-weight: 500; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  padding: 26px 22px;
  background: linear-gradient(180deg, rgba(20, 18, 50, 0.7), rgba(8, 8, 24, 0.55));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  min-height: 240px;
  transform-style: preserve-3d;
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: rgba(60, 240, 255, 0.35);
  box-shadow: 0 0 32px rgba(60, 240, 255, 0.12);
}

.card__icon {
  font-size: 28px;
  color: var(--cyan);
  margin-bottom: 18px;
}

.card h3 { margin-bottom: 10px; font-size: 18px; }

.card p { color: var(--muted); line-height: 1.7; font-size: 14px; }

.card__tag {
  display: inline-block;
  margin-top: 20px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.lab__wrap {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

#labCanvas {
  display: block;
  width: 100%;
  height: 420px;
}

.lab__hud, .lab__keys {
  position: absolute;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  color: #b7e7ff;
}

.lab__hud {
  top: 16px;
  left: 20px;
  display: flex;
  gap: 22px;
}

.lab__hud b { color: var(--gold); }

.lab__keys {
  right: 20px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

kbd {
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--cyan);
}

.signal {
  display: grid;
  place-items: center;
}

.signal__panel {
  width: min(720px, 100%);
  padding: 42px;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.form__full { grid-column: 1 / -1; }

.form input, .form select, .form textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(60, 240, 255, 0.12);
}

.form .btn { justify-self: start; margin-top: 6px; }

.form__ok {
  margin-top: 16px;
  color: #7dffc3;
  font-family: "Share Tech Mono", monospace;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px 6vw 36px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise .9s forwards;
}

.hero .reveal:nth-child(3) { animation-delay: .1s; }
.hero .reveal:nth-child(4) { animation-delay: .22s; }
.hero .reveal:nth-child(5) { animation-delay: .34s; }
.hero .reveal:nth-child(6) { animation-delay: .46s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes glitch {
  0%, 90%, 100% { clip-path: inset(0 0 0 0); }
  92% { clip-path: inset(20% 0 40% 0); }
  94% { clip-path: inset(60% 0 10% 0); }
  96% { clip-path: inset(10% 0 70% 0); }
}

@media (max-width: 980px) {
  .orbit-layout, .cards, .form { grid-template-columns: 1fr; }
  .hud { display: none; }
  .nav__links { display: none; }
  .hero__stats { gap: 24px; }
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
  a, button, input, select, textarea { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
