:root {
  color-scheme: dark;
  --bg: #050807;
  --panel: rgba(7, 18, 16, 0.74);
  --panel-strong: rgba(5, 15, 13, 0.9);
  --text: #eefcf6;
  --muted: #9eb7ad;
  --line: rgba(0, 255, 0, 0.28);
  --green: #00ff00;
  --cyan: #52d7ff;
  --amber: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(0, 255, 0, 0.18), transparent 31rem),
    linear-gradient(145deg, rgba(3, 13, 10, 0.98), rgba(1, 5, 8, 0.98));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.welcome-active {
  overflow: hidden;
}

a {
  color: inherit;
}

#matrix-rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(1, 8, 7, 0.45);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.72));
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

body.welcome-active .page-shell {
  visibility: hidden;
}

.welcome-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 34px;
  min-height: 100svh;
  padding: clamp(28px, 6vw, 72px);
  background: #000;
  text-align: center;
}

.welcome-gate.is-exiting {
  pointer-events: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 420ms ease, transform 420ms ease;
}

.welcome-copy {
  display: grid;
  justify-items: center;
  max-width: 820px;
}

.welcome-copy h1 {
  max-width: 15ch;
  font-size: clamp(3rem, 9vw, 6.6rem);
  text-shadow: 0 0 30px rgba(0, 255, 0, 0.34);
}

.welcome-copy p:not(.eyebrow) {
  max-width: 54ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

.pill-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: clamp(16px, 4vw, 42px);
  width: min(100%, 620px);
}

.pill-button {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 168px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 12, 10, 0.78);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.pill-button:hover,
.pill-button:focus-visible {
  transform: translateY(-4px);
  outline: none;
}

.blue-pill:hover,
.blue-pill:focus-visible {
  border-color: rgba(82, 215, 255, 0.88);
  box-shadow: 0 22px 70px rgba(82, 215, 255, 0.24);
}

.red-pill:hover,
.red-pill:focus-visible {
  border-color: rgba(255, 47, 80, 0.9);
  box-shadow: 0 22px 70px rgba(255, 47, 80, 0.24);
}

.pill-shape {
  display: block;
  width: 112px;
  height: 52px;
  border-radius: 999px;
  transform: rotate(-16deg);
}

.blue-pill .pill-shape {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.92), transparent 12%),
    linear-gradient(135deg, #9be8ff 0%, #1977ff 48%, #071d8f 100%);
  box-shadow: 0 0 34px rgba(82, 215, 255, 0.62);
}

.red-pill .pill-shape {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), transparent 12%),
    linear-gradient(135deg, #ff9cad 0%, #ff244f 48%, #780016 100%);
  box-shadow: 0 0 34px rgba(255, 47, 80, 0.58);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin: 16px 0 40px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 14, 12, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(0, 255, 0, 0.52);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(0, 255, 0, 0.2), rgba(82, 215, 255, 0.12));
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav a {
  min-height: 40px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: rgba(0, 255, 0, 0.14);
  color: var(--text);
  outline: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 28px;
  min-height: calc(100vh - 144px);
  padding: 46px 0 80px;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 22px 0 10px;
  font-size: 1.18rem;
}

.hero-copy,
.section-copy {
  max-width: 68ch;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.hero-copy {
  margin: 28px 0 0;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  background: var(--green);
  color: #02120c;
}

.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.status-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.status-panel div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 4px 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.status-panel strong,
.status-panel small {
  grid-column: 2;
}

.status-panel small {
  color: var(--muted);
}

.status-dot {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(0, 255, 0, 0.95);
}

.status-dot.alt {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(82, 215, 255, 0.75);
}

.status-dot.warm {
  background: var(--amber);
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.75);
}

.content-band {
  padding: 84px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 6px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.feature-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-index {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.music-player {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 34px;
}

.player-main,
.playlist-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.player-main {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.track-meta {
  display: grid;
  gap: 8px;
}

.track-label {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.track-meta strong {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.track-meta small {
  color: var(--muted);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.play-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-button {
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
}

.play-button {
  width: 64px;
  height: 64px;
  background: var(--green);
  color: #02120c;
  font-size: 1.45rem;
}

.icon-button:hover,
.icon-button:focus-visible,
.play-button:hover,
.play-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 0, 0.62);
  outline: none;
}

.icon-button:disabled,
.play-button:disabled,
.timeline-row input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.timeline-row,
.volume-row {
  display: grid;
  align-items: center;
  gap: 12px;
}

.timeline-row {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.volume-row {
  grid-template-columns: auto minmax(0, 1fr);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.timeline-row input,
.volume-row input {
  width: 100%;
  accent-color: var(--green);
}

.playlist-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
}

.playlist-panel h3 {
  margin: 0;
}

.file-picker {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed rgba(0, 255, 0, 0.44);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.file-picker input {
  width: 100%;
  max-width: 100%;
  color: var(--muted);
}

.playlist {
  display: grid;
  gap: 8px;
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.playlist button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}

.playlist button small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.playlist button:hover,
.playlist button:focus-visible,
.playlist button.is-active {
  border-color: rgba(0, 255, 0, 0.52);
  background: rgba(0, 255, 0, 0.12);
  color: var(--text);
  outline: none;
}

.playlist-empty {
  padding: 12px;
  color: var(--muted);
}

.split-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
}

.workflow-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.workflow-list strong,
.workflow-list span {
  display: block;
}

.workflow-list span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.contact-band {
  padding-bottom: 84px;
}

.legal-band {
  padding-top: 72px;
}

.legal-copy {
  max-width: 48ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.75;
}

.legal-copy a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.legal-copy a:hover,
.legal-copy a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--green);
  outline: none;
}

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

  .hero-section {
    min-height: auto;
    padding-top: 24px;
  }

  .status-panel {
    max-width: 520px;
  }

  .playlist-panel {
    max-width: 620px;
  }

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

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 22px, 1160px);
  }

  .site-header {
    align-items: flex-start;
    min-height: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(3, 12, 10, 0.94);
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    width: 100%;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .pill-choice {
    grid-template-columns: 1fr;
  }

  .pill-button {
    min-height: 132px;
  }

  .player-controls {
    justify-content: center;
  }

  .volume-row {
    grid-template-columns: 1fr;
  }

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

  .feature-card {
    min-height: 190px;
  }

  .content-band {
    padding: 64px 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
