:root {
  --bg: #050816;
  --bg-deep: #0a1020;
  --ink: #eef5ff;
  --muted: #8193b4;
  --line: rgba(115, 144, 196, 0.2);
  --live: #67f2cd;
  --test: #ff9c67;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(103, 242, 205, 0.2), transparent 24%),
    radial-gradient(circle at 86% 14%, rgba(141, 151, 255, 0.2), transparent 28%),
    radial-gradient(circle at 50% 120%, rgba(255, 156, 103, 0.16), transparent 30%),
    linear-gradient(135deg, #030712 0%, var(--bg-deep) 42%, #050916 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: 0.14;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(130, 160, 210, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 160, 210, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 100%);
}

.beam {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.55;
}

.beam-a {
  top: 11%;
  left: -12%;
  width: 42vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 242, 205, 0.9), transparent);
  transform: rotate(-18deg);
}

.beam-b {
  right: -10%;
  bottom: 20%;
  width: 34vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 156, 103, 0.8), transparent);
  transform: rotate(16deg);
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 44px;
}

.portal-shell::before,
.portal-shell::after {
  content: "";
  position: absolute;
  inset: auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 242, 205, 0.5), transparent);
}

.portal-shell::before {
  top: 18px;
}

.portal-shell::after {
  bottom: 18px;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.brand-mark,
.signal-label,
.tile-code,
.tile-state,
.tile-action,
.tile-address {
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.brand-mark {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: rgba(238, 245, 255, 0.62);
}

.masthead h1 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(4rem, 11vw, 7rem);
  line-height: 0.88;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(141, 151, 255, 0.18);
}

.signal-panel {
  min-width: 220px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(12, 21, 38, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.signal-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.signal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.signal-dot {
  width: 12px;
  height: 12px;
  background: var(--live);
  box-shadow: 0 0 20px rgba(103, 242, 205, 0.72);
  animation: pulse 2.2s infinite;
}

.signal-value {
  font-size: 1.08rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.signal-meta {
  display: block;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.module-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 360px;
  padding: 24px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(23, 36, 64, 0.95) 0%, rgba(11, 18, 33, 0.98) 68%, rgba(7, 12, 22, 1) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  clip-path: polygon(0 18px, 18px 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 44px 100%, 0 calc(100% - 44px));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.module-tile:hover .tile-body h2,
.module-tile:focus-visible .tile-body h2 {
  transform: translateX(6px);
}

.module-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(255, 255, 255, 0.08) 58% 59%, transparent 59% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%);
  pointer-events: none;
}

.module-tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, transparent 0 50%, rgba(255, 255, 255, 0.08) 50% 100%);
  pointer-events: none;
}

.module-tile:hover,
.module-tile:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(196, 217, 255, 0.35);
  box-shadow: 0 34px 88px rgba(0, 0, 0, 0.52);
}

.module-tile:focus-visible {
  outline: none;
}

.tile-top,
.tile-body {
  position: relative;
  z-index: 1;
}

.tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tile-code {
  font-size: 0.76rem;
  color: var(--muted);
}

.tile-state {
  padding: 8px 12px;
  border: 1px solid currentColor;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.tile-body {
  display: grid;
  gap: 14px;
}

.tile-body h2 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 0.9;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.25s ease;
}

.tile-address {
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-word;
}

.tile-action {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid currentColor;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.live-tile .tile-state,
.live-tile .tile-action {
  color: var(--live);
}

.test-tile .tile-state,
.test-tile .tile-action {
  color: var(--test);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.78);
  }
}

@media (max-width: 760px) {
  .portal-shell {
    width: min(100% - 22px, 1220px);
    padding: 22px 0 30px;
  }

  .masthead,
  .launch-grid {
    grid-template-columns: 1fr;
  }

  .masthead {
    display: grid;
  }

  .signal-panel {
    min-width: 0;
  }

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

  .module-tile {
    min-height: 280px;
    padding: 20px;
  }

  .masthead h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }
}
