:root {
  color-scheme: dark;
  --bg: #0d0d0a;
  --panel: #171712;
  --panel-2: #202015;
  --ink: #f5f0dd;
  --muted: #aaa084;
  --line: rgba(245, 240, 221, 0.16);
  --green: #a7ff5a;
  --cyan: #6ee7d8;
  --amber: #f2b84b;
  --red: #ff6259;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(167, 255, 90, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(245, 240, 221, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 15% 10%, rgba(242, 184, 75, 0.15), transparent 32%),
    radial-gradient(circle at 90% 5%, rgba(110, 231, 216, 0.12), transparent 28%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.hero {
  display: grid;
  min-height: min(690px, calc(100vh - 76px));
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 6vw, 74px);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero__visual {
  position: relative;
  display: grid;
  min-height: 440px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(167, 255, 90, 0.09), transparent 45%),
    linear-gradient(315deg, rgba(255, 98, 89, 0.09), transparent 36%),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero__visual::before,
.hero__visual::after {
  position: absolute;
  content: "";
  border: 1px solid var(--line);
}

.hero__visual::before {
  width: 72%;
  aspect-ratio: 1;
  transform: rotate(9deg);
}

.hero__visual::after {
  inset: 24px;
  border-style: dashed;
  opacity: 0.6;
}

.hero__visual img {
  position: relative;
  z-index: 2;
  width: min(235px, 52vw);
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.45));
  animation: lock-in 700ms ease both;
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 47%,
    rgba(167, 255, 90, 0.16) 50%,
    transparent 53%,
    transparent 100%
  );
  animation: scan 4.6s linear infinite;
}

.hero__copy {
  padding: 36px 0;
}

.eyebrow,
.label,
.status-label {
  margin: 0;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  margin-top: 14px;
  font-size: clamp(4.5rem, 13vw, 11rem);
  line-height: 0.76;
}

.lede {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.74;
}

.repo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 23, 18, 0.76);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

code {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: 600 0.88rem/1 "IBM Plex Mono", ui-monospace, monospace;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 255, 90, 0.6);
}

.button--primary {
  border-color: transparent;
  background: var(--green);
  color: #14140e;
}

.button--ghost {
  background: rgba(245, 240, 221, 0.045);
}

.icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(13, 13, 10, 0.12);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 26px 0 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.status-strip > div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.status-strip > div:last-child {
  border-right: 0;
}

.status-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
}

.package-section {
  padding-bottom: 40px;
}

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

h2 {
  margin-top: 8px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.86;
}

.packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.package-card,
.empty-state {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(245, 240, 221, 0.035), transparent), var(--panel);
}

.package-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.package-card__top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.08;
}

.package-id,
.description,
dt {
  color: var(--muted);
}

.package-id {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.version {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(110, 231, 216, 0.42);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.76rem;
}

.description {
  margin: 18px 0 22px;
  line-height: 1.62;
}

dl {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
}

dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

dt,
dd {
  margin: 0;
  font-size: 0.82rem;
}

dd {
  text-align: right;
}

.empty-state {
  display: grid;
  grid-column: 1 / -1;
  min-height: 240px;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.empty-state p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 23, 18, 0.92);
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scan {
  0% {
    transform: translateY(-105%);
  }
  100% {
    transform: translateY(105%);
  }
}

@keyframes lock-in {
  from {
    opacity: 0;
    transform: scale(0.94) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-bottom: 26px;
  }

  .hero__visual {
    min-height: 300px;
  }

  .repo-panel,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .status-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-strip > div:last-child {
    border-bottom: 0;
  }

  .actions {
    flex-wrap: wrap;
  }

  .button {
    flex: 1 1 160px;
  }

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

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

  h1 {
    font-size: clamp(4.1rem, 25vw, 6rem);
  }

  .hero__copy {
    padding-top: 12px;
  }

  .repo-panel {
    padding: 14px;
  }
}

@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;
  }
}
