:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: rgba(12, 18, 27, 0.82);
  --panel-strong: rgba(15, 24, 36, 0.96);
  --line: rgba(180, 218, 255, 0.18);
  --text: #f4f8fb;
  --muted: #aab8c5;
  --red: #ff4a3d;
  --gold: #f7d36c;
  --lime: #9dff9f;
  --cyan: #71d7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 74, 61, 0.18), transparent 25%),
    radial-gradient(circle at 88% 10%, rgba(113, 215, 255, 0.18), transparent 23%),
    radial-gradient(circle at 52% 0%, rgba(247, 211, 108, 0.12), transparent 22%),
    linear-gradient(145deg, #05070b 0%, #0b121a 48%, #06080d 100%);
  color: var(--text);
  font: 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 18%, rgba(113, 215, 255, 0.08) 18.4%, transparent 19.4%),
    radial-gradient(circle at 50% 48%, transparent 0 29%, rgba(247, 211, 108, 0.07) 29.3%, transparent 30.3%),
    radial-gradient(circle at 50% 48%, transparent 0 42%, rgba(255, 74, 61, 0.06) 42.3%, transparent 43.3%);
  animation: radarPulse 7s ease-in-out infinite;
}

.motion-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.beam {
  position: absolute;
  width: 70vw;
  height: 12vw;
  border-radius: 999px;
  filter: blur(28px);
  mix-blend-mode: screen;
  opacity: 0.42;
  animation: beamDrift 12s ease-in-out infinite;
}

.beam-red {
  top: 8%;
  left: -28%;
  background: linear-gradient(90deg, transparent, rgba(255, 74, 61, 0.68), transparent);
}

.beam-gold {
  top: 24%;
  right: -30%;
  background: linear-gradient(90deg, transparent, rgba(247, 211, 108, 0.62), transparent);
  animation-delay: -4s;
}

.beam-cyan {
  bottom: 18%;
  right: -22%;
  background: linear-gradient(90deg, transparent, rgba(113, 215, 255, 0.62), transparent);
  animation-delay: -7s;
}

.beam-lime {
  bottom: 4%;
  left: -22%;
  background: linear-gradient(90deg, transparent, rgba(157, 255, 159, 0.58), transparent);
  animation-delay: -2s;
}

.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px currentColor;
  animation: particleFloat 10s linear infinite;
}

.particle-1 {
  left: 12%;
  top: 70%;
  color: var(--cyan);
}

.particle-2 {
  left: 32%;
  top: 22%;
  color: var(--gold);
  animation-delay: -3s;
}

.particle-3 {
  right: 18%;
  top: 64%;
  color: var(--lime);
  animation-delay: -5s;
}

.particle-4 {
  right: 9%;
  top: 28%;
  color: var(--red);
  animation-delay: -8s;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.gate-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.gate-nav,
.hero,
.dashboard,
.proof-strip article,
.path-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.gate-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 8px;
}

.brand,
.nav-links,
.hero-actions,
.launch-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.brand span,
.brand small {
  display: grid;
}

.brand small,
.nav-links a,
.lede,
.path-card p,
.proof-strip span {
  color: var(--muted);
}

.nav-links a {
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  margin-top: 18px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 8px;
  min-height: min(720px, calc(100vh - 116px));
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p,
ol {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.lede {
  max-width: 68ch;
  margin-bottom: 24px;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button-primary {
  border-color: rgba(157, 255, 159, 0.6);
  background: linear-gradient(135deg, rgba(157, 255, 159, 0.98), rgba(113, 215, 255, 0.9));
  color: #061014;
}

.boot-panel {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  padding: 18px;
  border: 1px solid rgba(113, 215, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 74, 61, 0.2), transparent 26%),
    radial-gradient(circle at 50% 38%, rgba(113, 215, 255, 0.2), transparent 34%),
    rgba(3, 8, 14, 0.86);
}

.gate-tunnel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.48;
  pointer-events: none;
}

.gate-tunnel span {
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(113, 215, 255, 0.22);
  border-radius: 8px;
  transform: rotate(45deg) scale(0.28);
  animation: tunnelPulse 5.5s ease-in-out infinite;
}

.gate-tunnel span:nth-child(2) {
  border-color: rgba(247, 211, 108, 0.24);
  animation-delay: -1.2s;
}

.gate-tunnel span:nth-child(3) {
  border-color: rgba(157, 255, 159, 0.24);
  animation-delay: -2.4s;
}

.gate-tunnel span:nth-child(4) {
  border-color: rgba(255, 74, 61, 0.22);
  animation-delay: -3.6s;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
}

.terminal-top span:nth-child(2) {
  background: var(--gold);
}

.terminal-top span:nth-child(3) {
  background: var(--lime);
}

.terminal-top strong {
  margin-left: auto;
}

.identity-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: min(320px, 78vw);
  aspect-ratio: 1;
  margin: 34px auto 24px;
  border: 1px solid rgba(247, 211, 108, 0.3);
  border-radius: 999px;
  background:
    conic-gradient(from 180deg, rgba(255, 74, 61, 0.1), rgba(247, 211, 108, 0.5), rgba(113, 215, 255, 0.35), rgba(157, 255, 159, 0.5), rgba(255, 74, 61, 0.1));
  animation: rotateGate 18s linear infinite;
}

.identity-ring::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background: #05090f;
}

.identity-ring img {
  position: relative;
  z-index: 1;
  width: 72%;
  border-radius: 8px;
  object-fit: cover;
  clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%);
  animation: counterRotate 18s linear infinite;
}

.orbit-node {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.orbit-node-1 {
  top: 9%;
  color: var(--cyan);
}

.orbit-node-2 {
  right: 11%;
  bottom: 22%;
  color: var(--gold);
}

.orbit-node-3 {
  left: 16%;
  bottom: 17%;
  color: var(--lime);
}

.boot-log {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.boot-log li {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #cfe3f4;
}

.path-grid,
.mission-grid,
.proof-strip {
  display: grid;
  gap: 14px;
}

.path-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.path-card {
  position: relative;
  min-height: 220px;
  padding: 18px;
  border-radius: 8px;
  overflow: hidden;
  transform: translateY(0);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.path-card::before,
.security-system::before,
.mission-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.12) 48%, transparent 56%);
  transform: translateX(-130%);
  animation: scannerSweep 8s ease-in-out infinite;
  pointer-events: none;
}

.path-card:hover {
  transform: translateY(-4px);
  border-color: rgba(113, 215, 255, 0.52);
}

.path-card.is-active {
  border-color: rgba(157, 255, 159, 0.7);
  background: linear-gradient(180deg, rgba(157, 255, 159, 0.13), rgba(12, 18, 27, 0.88));
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.security-system {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.82);
  box-shadow: var(--shadow);
}

.security-system span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.security-system strong {
  display: block;
  margin: 16px 0 8px;
  font-size: 1.16rem;
}

.security-system p {
  color: var(--muted);
}

.movement-lock,
.sentry-matrix {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 74, 61, 0.1), transparent 34%),
    linear-gradient(225deg, rgba(113, 215, 255, 0.12), transparent 34%),
    rgba(12, 18, 27, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.movement-lock {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.movement-copy {
  display: grid;
  align-content: center;
}

.movement-copy h2 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.94;
}

.movement-copy p,
.lock-stack p,
.matrix-grid p {
  color: var(--muted);
}

.lock-stack,
.matrix-grid {
  display: grid;
  gap: 12px;
}

.lock-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lock-stack article,
.matrix-grid article {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.045);
}

.lock-stack article::before,
.matrix-grid article::before {
  content: "";
  position: absolute;
  inset: auto 14px 14px auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(157, 255, 159, 0.28);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(157, 255, 159, 0.14);
  animation: nodePulse 3.5s ease-in-out infinite;
}

.lock-stack span,
.matrix-grid span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lock-stack strong,
.matrix-grid strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--text);
}

.matrix-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-sentry {
  border-color: rgba(113, 215, 255, 0.3);
}

.system-red {
  border-color: rgba(255, 74, 61, 0.3);
}

.system-engineer {
  border-color: rgba(157, 255, 159, 0.3);
}

.system-maintenance {
  border-color: rgba(247, 211, 108, 0.3);
}

.path-card span {
  color: var(--gold);
  font-weight: 900;
}

.icon-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0;
  cursor: pointer;
}

.icon-button::before {
  content: ">";
  font-size: 1.2rem;
  font-weight: 900;
}

.dashboard {
  margin-top: 18px;
  padding: 22px;
  border-radius: 8px;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.session-pill {
  padding: 8px 10px;
  border: 1px solid rgba(157, 255, 159, 0.36);
  border-radius: 999px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
}

.mission-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mission-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.mission-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.mission-card p {
  color: var(--muted);
}

.launch-row {
  margin-top: 16px;
}

.proof-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.proof-strip article {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border-radius: 8px;
}

@keyframes rotateGate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes counterRotate {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes beamDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-9deg) scale(0.9);
    opacity: 0.2;
  }
  50% {
    transform: translate3d(18vw, 5vh, 0) rotate(8deg) scale(1.08);
    opacity: 0.55;
  }
}

@keyframes particleFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(0.8);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate3d(12vw, -72vh, 0) scale(1.2);
    opacity: 0;
  }
}

@keyframes radarPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.03);
  }
}

@keyframes tunnelPulse {
  0% {
    transform: rotate(45deg) scale(0.22);
    opacity: 0;
  }
  35% {
    opacity: 0.78;
  }
  100% {
    transform: rotate(45deg) scale(1.18);
    opacity: 0;
  }
}

@keyframes scannerSweep {
  0%,
  45% {
    transform: translateX(-130%);
  }
  72%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

body.is-booting .boot-panel {
  border-color: rgba(157, 255, 159, 0.6);
  box-shadow: 0 0 44px rgba(157, 255, 159, 0.18), var(--shadow);
}

body.is-booting .identity-ring {
  animation-duration: 4s;
}

body.is-booting .gate-tunnel span {
  animation-duration: 2.2s;
}

body.is-booting .movement-lock,
body.is-booting .sentry-matrix {
  border-color: rgba(157, 255, 159, 0.5);
}

@media (max-width: 980px) {
  .hero,
  .path-grid,
  .security-grid,
  .movement-lock,
  .lock-stack,
  .matrix-grid,
  .mission-grid,
  .proof-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .gate-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .gate-nav,
  .dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.7rem, 18vw, 4.4rem);
  }

  .boot-panel {
    min-height: 420px;
  }
}
