:root {
  color-scheme: dark;
  --bg: #020706;
  --panel: rgba(3, 13, 12, 0.82);
  --panel-strong: rgba(4, 18, 16, 0.94);
  --text: #e9fff8;
  --muted: #87a9a1;
  --line: rgba(102, 255, 204, 0.18);
  --line-hot: rgba(102, 255, 204, 0.52);
  --accent: #48f5a8;
  --accent-2: #45c8ff;
  --accent-strong: #f8c963;
  --danger: #ff5c7a;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(72, 245, 168, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(72, 245, 168, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 76% 18%, rgba(69, 200, 255, 0.12), transparent 25rem),
    radial-gradient(circle at 14% 28%, rgba(72, 245, 168, 0.12), transparent 24rem),
    linear-gradient(145deg, #010504 0%, #04100e 44%, #08110f 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 0;
  background:
    linear-gradient(transparent 50%, rgba(72, 245, 168, 0.025) 50%),
    linear-gradient(90deg, transparent, rgba(69, 200, 255, 0.06), transparent);
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
  animation: scanlines 7s linear infinite;
}

body::after {
  z-index: 1;
  border: 1px solid rgba(72, 245, 168, 0.1);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.8);
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  min-height: 58vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
  align-items: end;
  gap: clamp(28px, 6vw, 72px);
  padding: 44px 0 64px;
}

.hero-copy-block {
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  font-family: var(--mono);
}

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

h1 {
  max-width: 820px;
  margin-bottom: 0;
  color: #f1fff9;
  font-size: clamp(3rem, 8vw, 7.3rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(72, 245, 168, 0.22), 0 0 70px rgba(69, 200, 255, 0.12);
}

.hero-copy {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.logo-plate {
  position: relative;
  z-index: 2;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(72, 245, 168, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  object-fit: cover;
  padding: 22px;
  filter: drop-shadow(0 0 28px rgba(72, 245, 168, 0.4));
  animation: logoPulse 5.5s ease-in-out infinite;
}

.radar {
  position: absolute;
  z-index: 1;
  inset: 12px;
  border: 1px solid rgba(72, 245, 168, 0.16);
  border-radius: 8px;
  overflow: hidden;
  pointer-events: none;
}

.radar span {
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(72, 245, 168, 0.22);
  border-radius: 8px;
}

.radar span:nth-child(2) {
  inset: 28%;
  border-color: rgba(69, 200, 255, 0.22);
}

.radar span:nth-child(3) {
  top: 50%;
  left: 50%;
  width: 48%;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: sweep 3.4s linear infinite;
  transform-origin: left center;
}

.demo-section {
  position: relative;
  overflow: hidden;
  padding: 0 28px 28px;
  border: 1px solid rgba(72, 245, 168, 0.24);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: panelGlow 6s ease-in-out infinite;
}

.demo-section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(72, 245, 168, 0.09), transparent 36%),
    linear-gradient(315deg, rgba(69, 200, 255, 0.07), transparent 40%);
  content: "";
}

.panel-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -28px 26px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(72, 245, 168, 0.18);
  background: rgba(0, 0, 0, 0.3);
}

.panel-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--danger);
}

.panel-bar span:nth-child(2) {
  background: var(--accent-strong);
}

.panel-bar span:nth-child(3) {
  background: var(--accent);
}

.panel-bar p {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0;
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(72, 245, 168, 0.3);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.26);
  font: inherit;
  font-family: var(--mono);
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 20px rgba(72, 245, 168, 0.05);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--line-hot);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(72, 245, 168, 0.18), inset 0 0 20px rgba(72, 245, 168, 0.08);
  outline: none;
}

.status {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
}

.status[hidden] {
  display: none;
}

.status[data-variant="error"] {
  color: #ffd1d1;
  border-color: rgba(255, 111, 111, 0.42);
}

.status[data-variant="empty"] {
  color: #ffe1a8;
  border-color: rgba(255, 191, 71, 0.42);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.demo-card {
  position: relative;
  min-height: 138px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 18px 18px 48px;
  border: 1px solid rgba(72, 245, 168, 0.18);
  border-radius: 8px;
  background: var(--panel-strong);
  text-decoration: none;
  box-shadow: inset 0 0 32px rgba(72, 245, 168, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.demo-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(72, 245, 168, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  opacity: 0;
  content: "";
  transition: opacity 160ms ease;
}

.demo-card::after {
  position: absolute;
  right: 16px;
  bottom: 15px;
  color: rgba(72, 245, 168, 0.5);
  content: attr(data-slug);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.demo-card:hover,
.demo-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-hot);
  background: rgba(4, 25, 21, 0.98);
  box-shadow: 0 0 32px rgba(72, 245, 168, 0.14), inset 0 0 32px rgba(72, 245, 168, 0.06);
  outline: none;
}

.demo-card:hover::before,
.demo-card:focus-visible::before {
  opacity: 1;
}

.demo-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #001611;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(72, 245, 168, 0.22);
  font-family: var(--mono);
  font-weight: 900;
}

.demo-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.demo-name {
  overflow-wrap: anywhere;
  color: #f4fffb;
  font-size: 1.12rem;
  font-weight: 800;
}

.demo-path {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.demo-action {
  position: absolute;
  left: 18px;
  bottom: 15px;
  z-index: 1;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.matrix-field span {
  position: absolute;
  display: block;
  top: -45vh;
  left: var(--x);
  width: 1.1rem;
  color: rgba(93, 255, 178, 0.32);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.3;
  text-orientation: upright;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-shadow: 0 0 10px rgba(72, 245, 168, 0.8);
  animation: matrixFall var(--speed) linear infinite;
  animation-delay: var(--delay);
}

@keyframes matrixFall {
  0% {
    opacity: 0;
    top: -45vh;
  }

  8%,
  88% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    top: 115vh;
  }
}

@keyframes sweep {
  from {
    transform: rotate(0deg);
  }

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

@keyframes scanlines {
  from {
    background-position: 0 0, -40vw 0;
  }

  to {
    background-position: 0 28px, 40vw 0;
  }
}

@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 18px rgba(72, 245, 168, 0.34));
  }

  50% {
    filter: drop-shadow(0 0 42px rgba(69, 200, 255, 0.45));
  }
}

@keyframes panelGlow {
  0%,
  100% {
    border-color: rgba(72, 245, 168, 0.22);
    box-shadow: var(--shadow);
  }

  50% {
    border-color: rgba(72, 245, 168, 0.48);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), 0 0 34px rgba(72, 245, 168, 0.11);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding: 16px 0 28px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 12px 0 36px;
  }

  .hero-visual {
    width: min(82vw, 300px);
    min-height: 0;
    aspect-ratio: 1;
    justify-self: center;
    order: -1;
  }

  .logo-plate {
    width: 72%;
    padding: 14px;
  }

  .radar {
    width: 100%;
    height: 100%;
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .radar span {
    inset: 12%;
  }

  .radar span:nth-child(2) {
    inset: 26%;
  }

  .radar span:nth-child(3) {
    top: 50%;
    left: 50%;
    width: 48%;
  }

  h1 {
    font-size: clamp(3rem, 13vw, 4.4rem);
    line-height: 0.92;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .demo-section {
    padding: 0 18px 18px;
  }

  .panel-bar {
    margin: 0 -18px 22px;
  }

  .section-heading,
  .demo-card {
    align-items: stretch;
  }

  .section-heading {
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }

  .demo-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .demo-action {
    grid-column: auto;
  }
}
