:root {
  color-scheme: dark;
  --bg: #0a0d0c;
  --panel: rgba(19, 24, 22, 0.78);
  --panel-strong: #151a18;
  --line: rgba(226, 239, 232, 0.13);
  --text: #eef5f0;
  --muted: #9aa8a0;
  --lime: #c8ff62;
  --mint: #6fffc1;
  --orange: #ff9f5a;
  --red: #ff6f67;
  --blue: #72a9ff;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

.ambient-a {
  top: -18rem;
  right: -10rem;
  background: var(--lime);
}

.ambient-b {
  top: 48rem;
  left: -22rem;
  background: var(--blue);
}

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #0a0d0c;
  background: var(--lime);
  letter-spacing: 0;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 600 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(111, 255, 193, 0.09);
}

.hero {
  min-height: 630px;
  padding: 120px 0 80px;
  display: grid;
  align-content: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--lime);
  font: 700 0.72rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em;
}

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

h1 {
  max-width: 900px;
  margin-bottom: 30px;
  font-size: clamp(3.3rem, 8vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 245, 240, 0.56);
}

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

.stats {
  display: flex;
  gap: clamp(28px, 7vw, 88px);
  margin: 0;
}

.stats div {
  display: grid;
  gap: 8px;
}

.stats dt {
  font: 500 clamp(2.1rem, 5vw, 4rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stats dd {
  margin: 0;
  color: var(--muted);
  font: 700 0.66rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.15em;
}

.directory {
  padding: 100px 0 120px;
}

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.045em;
}

.search {
  width: min(100%, 340px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px 12px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 12, 11, 0.76);
}

.search:focus-within {
  border-color: rgba(200, 255, 98, 0.55);
  box-shadow: 0 0 0 3px rgba(200, 255, 98, 0.08);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: #6f7b74;
}

kbd {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font: 0.72rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filters button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}

.filters button:hover,
.filters button[data-active="true"] {
  color: #11150f;
  border-color: var(--lime);
  background: var(--lime);
}

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

.service-card {
  min-height: 264px;
  display: flex;
  flex-direction: column;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(200, 255, 98, 0.32);
  background: var(--panel-strong);
}

.card-top,
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.group-label,
.status {
  color: var(--muted);
  font: 700 0.62rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.11em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.04em;
}

.state-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.state-dot.online {
  background: var(--mint);
  box-shadow: 0 0 12px rgba(111, 255, 193, 0.48);
}

.state-dot.route {
  background: var(--orange);
}

.state-dot.restricted {
  background: var(--blue);
}

.state-dot.unverified {
  background: var(--red);
}

.service-card h3 {
  margin: 38px 0 12px;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.description {
  min-height: 50px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.card-bottom {
  align-items: end;
  margin-top: auto;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.card-bottom code {
  max-width: calc(100% - 58px);
  overflow: hidden;
  color: #b7c1bb;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-bottom a {
  color: var(--lime);
  font: 800 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.empty-state {
  padding: 80px 20px;
  color: var(--muted);
  text-align: center;
}

.legend {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.legend ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  list-style: none;
  color: var(--muted);
  line-height: 1.5;
}

.legend li {
  display: grid;
  grid-template-columns: 8px auto;
  column-gap: 10px;
}

.legend li strong {
  color: var(--text);
}

.legend .state-dot {
  margin-top: 7px;
  grid-row: span 2;
}

footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 600 0.65rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

footer p {
  margin: 0;
}

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

@media (max-width: 860px) {
  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legend {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 620px) {
  .topbar,
  main,
  footer {
    width: min(100% - 26px, 1180px);
  }

  .topbar-meta {
    display: none;
  }

  .hero {
    min-height: 600px;
    padding-top: 90px;
  }

  h1 {
    font-size: clamp(3.1rem, 17vw, 5rem);
  }

  .stats {
    gap: 24px;
  }

  .directory {
    padding: 72px 0 90px;
  }

  .directory-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .catalog,
  .legend ul {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 238px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
