:root {
  color-scheme: dark;
  --ink: #f1f7f3;
  --muted: #a7b7ad;
  --coal: #081013;
  --panel: rgba(9, 22, 24, 0.72);
  --line: rgba(222, 247, 255, 0.18);
  --mint: #20d6a5;
  --acid: #c8ff4d;
  --coral: #ff6b4a;
  --sky: #6ee7ff;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 15%, rgba(32, 214, 165, 0.16), transparent 32rem),
    radial-gradient(circle at 84% 12%, rgba(255, 107, 74, 0.12), transparent 28rem),
    linear-gradient(135deg, #081013 0%, #0b1718 42%, #151411 100%);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
}

#flux-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar,
.hero,
.launchpad {
  border: 1px solid var(--line);
  background: rgba(8, 16, 19, 0.48);
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px 10px 16px;
  border-radius: 8px;
}

.brand,
.status,
.button,
.tile {
  color: inherit;
  text-decoration: none;
}

.brand,
.status,
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-family: "Bahnschrift", "Aptos Display", "Segoe UI", sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--mint);
  border-radius: 50%;
  background:
    radial-gradient(circle at 70% 35%, var(--acid) 0 9%, transparent 10%),
    linear-gradient(135deg, transparent 34%, var(--coral) 35% 45%, transparent 46%),
    linear-gradient(45deg, transparent 42%, var(--mint) 43% 56%, transparent 57%);
  box-shadow: 0 0 26px rgba(32, 214, 165, 0.65);
}

.status {
  min-width: 132px;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(200, 255, 77, 0.28);
  border-radius: 999px;
  color: var(--acid);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 16px var(--acid);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.82fr);
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 124px);
  margin-top: 18px;
  padding: clamp(28px, 7vw, 76px);
  border-radius: 8px;
  align-items: center;
}

.kicker {
  margin: 0 0 16px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Baskerville", "Georgia", serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(3rem, 7.2vw, 6.25rem);
  line-height: 0.94;
}

.lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.32rem);
  line-height: 1.58;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.tile:focus-visible {
  outline: 3px solid rgba(110, 231, 255, 0.62);
  outline-offset: 3px;
}

.primary {
  border-color: rgba(32, 214, 165, 0.58);
  background: linear-gradient(135deg, var(--mint), #0a8069);
  color: #03110e;
  box-shadow: 0 16px 40px rgba(32, 214, 165, 0.22);
}

.ghost {
  background: rgba(255, 255, 255, 0.05);
}

.button-icon {
  font-size: 1.25rem;
}

.instrument {
  width: min(100%, 420px);
  justify-self: end;
}

.instrument-screen {
  position: relative;
  display: grid;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(110, 231, 255, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(110, 231, 255, 0.24), transparent 32%),
    linear-gradient(145deg, rgba(241, 247, 243, 0.12), rgba(255, 255, 255, 0.02));
  place-items: center;
}

.instrument-screen::before,
.instrument-screen::after {
  position: absolute;
  inset: 44px;
  content: "";
  border: 1px solid rgba(200, 255, 77, 0.28);
  border-radius: 50%;
  animation: breathe 8s ease-in-out infinite;
}

.instrument-screen::after {
  inset: 88px;
  border-color: rgba(255, 107, 74, 0.32);
  animation-delay: -2.5s;
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(200, 255, 77, 0.18), transparent);
  animation: scan 4.8s linear infinite;
}

.orbital {
  position: relative;
  width: 220px;
  height: 220px;
  animation: rotate 18s linear infinite;
}

.orbital span {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 38px var(--sky);
}

.orbital span:nth-child(1) {
  top: 0;
  left: 50%;
}

.orbital span:nth-child(2) {
  right: 10%;
  bottom: 12%;
  background: var(--coral);
  box-shadow: 0 0 38px var(--coral);
}

.orbital span:nth-child(3) {
  bottom: 24%;
  left: 0;
  background: var(--acid);
  box-shadow: 0 0 38px var(--acid);
}

.readout {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 19, 0.68);
}

.readout span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.readout strong {
  color: var(--acid);
  font-size: 2.4rem;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}

.meter-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.meter-row span {
  position: relative;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.meter-row span::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--level);
  content: "";
  background: linear-gradient(to top, var(--coral), var(--acid));
}

.launchpad {
  margin-top: 18px;
  padding: clamp(24px, 5vw, 52px);
  border-radius: 8px;
}

.section-heading {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

h2 {
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 0.98;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  min-height: 214px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 231, 255, 0.42);
  background: rgba(255, 255, 255, 0.075);
}

.tile-index {
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
}

.tile strong {
  margin-top: auto;
  font-family: "Bahnschrift", "Aptos Display", sans-serif;
  font-size: 1.25rem;
}

.tile span:last-child {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.tile.active {
  border-color: rgba(32, 214, 165, 0.46);
  background: linear-gradient(145deg, rgba(32, 214, 165, 0.16), rgba(255, 255, 255, 0.045));
}

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

@keyframes scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@keyframes breathe {
  50% {
    transform: scale(0.88);
    opacity: 0.45;
  }
}

@media (max-width: 900px) {
  .hero,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .instrument {
    justify-self: stretch;
    width: 100%;
  }

  .instrument-screen {
    min-height: 320px;
  }

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

@media (max-width: 560px) {
  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .status {
    width: 100%;
  }

  .hero {
    padding: 24px 18px;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4.3rem);
  }

  .actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: center;
  }

  .orbital {
    width: 174px;
    height: 174px;
  }

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

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