:root {
  color-scheme: dark;
  --bg: #08090c;
  --surface: #101217;
  --surface-strong: #14171d;
  --line: #252932;
  --line-soft: rgba(255, 255, 255, 0.075);
  --text: #f4f5ed;
  --muted: #8f949e;
  --green: #baff35;
  --purple: #a267ff;
  --danger: #ff627d;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 18px;
  top: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--green);
  color: #08090c;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow: hidden;
  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: 36px 36px;
}

.page-shell::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(to bottom, transparent 48%, var(--bg) 91%);
  content: "";
  pointer-events: none;
}

.ambient {
  position: absolute;
  z-index: -2;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
}

.ambient-purple {
  right: -220px;
  top: -260px;
  background: var(--purple);
  opacity: 0.22;
}

.ambient-green {
  left: -250px;
  bottom: -340px;
  background: var(--green);
  opacity: 0.14;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  margin-right: 11px;
  transform: rotate(45deg);
  border: 1px solid var(--green);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  content: "";
}

.brand-mark::before {
  inset: 5px;
  border: 1px solid var(--purple);
}

.brand-mark::after {
  width: 5px;
  height: 5px;
  right: -3px;
  bottom: -3px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(186, 255, 53, 0.65);
}

.wordmark {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.wordmark em {
  color: var(--green);
  font-style: normal;
}

.brand-suffix {
  margin-left: 11px;
  color: #727782;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  white-space: nowrap;
  flex-shrink: 0;
}

.internal-label {
  color: #777c87;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a2a7b0;
}

.system-status i,
.mesh-label i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.system-status.is-online {
  color: var(--green);
}

.system-status.is-online i {
  box-shadow: 0 0 15px rgba(186, 255, 53, 0.8);
  animation: status-pulse 2.4s ease-out infinite;
}

.system-status.is-offline {
  color: var(--danger);
}

.header-enter {
  padding: 11px 14px;
  border: 1px solid var(--green);
  color: var(--green);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.header-enter:hover,
.header-enter:focus-visible {
  background: var(--green);
  box-shadow: 0 0 28px rgba(186, 255, 53, 0.2);
  color: var(--bg);
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.hero {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: clamp(44px, 7vw, 110px);
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(68px, 8vw, 112px) clamp(22px, 5vw, 72px) clamp(58px, 7vw, 88px);
  min-width: 0;
}

.hero-copy {
  min-width: 0;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 24px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.kicker span {
  width: 34px;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(186, 255, 53, 0.45);
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(58px, 7.4vw, 116px);
  font-weight: 950;
  letter-spacing: -0.078em;
  line-height: 0.84;
  text-transform: uppercase;
}

h1 .outlined {
  color: transparent;
  -webkit-text-stroke: 1px #737984;
}

h1 .signal {
  color: var(--green);
  text-shadow: 0 0 48px rgba(186, 255, 53, 0.14);
}

.intro {
  max-width: 630px;
  margin: 30px 0 32px;
  color: #959aa5;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.8;
}

.intro strong {
  color: #f0f1ea;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  padding: 0 23px;
  background: var(--green);
  box-shadow: 0 0 36px rgba(186, 255, 53, 0.2);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 46px rgba(186, 255, 53, 0.34);
}

.endpoint-copy {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #313640;
  background: rgba(12, 14, 18, 0.78);
  color: #b2b6bf;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.endpoint-copy:hover,
.endpoint-copy:focus-visible,
.endpoint-copy.is-copied {
  border-color: var(--purple);
  background: rgba(162, 103, 255, 0.08);
}

.endpoint-copy .method {
  color: var(--purple);
  font-weight: 850;
}

.copy-icon {
  color: #656a74;
  font-size: 8px;
}

.endpoint-copy.is-copied .copy-icon {
  color: var(--green);
}

.routing-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(19, 22, 28, 0.96), rgba(8, 9, 12, 0.92));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.32), 0 0 70px rgba(162, 103, 255, 0.07);
  clip-path: polygon(0 0, 94% 0, 100% 8%, 100% 100%, 6% 100%, 0 92%);
}

.routing-header {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: #777c86;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.mesh-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--purple);
}

.mesh-label i {
  box-shadow: 0 0 10px rgba(162, 103, 255, 0.75);
}

.routing-map {
  position: absolute;
  inset: 48px 0 0;
}

.radar-ring {
  position: absolute;
  left: 50%;
  top: 49%;
  border: 1px solid #2c313a;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-outer {
  width: 252px;
  height: 252px;
}

.ring-middle {
  width: 172px;
  height: 172px;
  opacity: 0.8;
}

.ring-inner {
  width: 94px;
  height: 94px;
  opacity: 0.65;
}

.radar-axis {
  position: absolute;
  left: 50%;
  top: 49%;
  background: #292e36;
  transform: translate(-50%, -50%);
}

.axis-horizontal {
  width: 92%;
  height: 1px;
}

.axis-vertical {
  width: 1px;
  height: 83%;
}

.core-node {
  position: absolute;
  left: 50%;
  top: 49%;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--green);
  background: #151a17;
  box-shadow: 0 0 28px rgba(186, 255, 53, 0.26);
}

.core-node span {
  width: 9px;
  height: 9px;
  background: var(--green);
  box-shadow: 0 0 17px rgba(186, 255, 53, 0.9);
}

.model-node {
  position: absolute;
  display: flex;
  width: 78px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border: 1px solid #353a44;
  background: #11141a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: #c3c6ce;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.model-node i {
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 10px rgba(162, 103, 255, 0.8);
}

.node-claude {
  left: 6%;
  top: 17%;
}

.node-openai {
  right: 5%;
  top: 24%;
}

.node-gemini {
  left: 10%;
  bottom: 13%;
}

.node-more {
  right: 8%;
  bottom: 14%;
}

.route {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 49%;
  width: 38%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--green), var(--purple), transparent);
  opacity: 0.62;
}

.route::after {
  position: absolute;
  width: 25%;
  height: 1px;
  background: white;
  box-shadow: 0 0 9px var(--green);
  content: "";
  animation: route-scan 2.8s linear infinite;
}

.route-one {
  transform: rotate(202deg);
}

.route-two {
  transform: rotate(338deg);
}

.route-three {
  transform: rotate(152deg);
}

.route-four {
  transform: rotate(25deg);
}

.route-two::after {
  animation-delay: -0.7s;
}

.route-three::after {
  animation-delay: -1.4s;
}

.route-four::after {
  animation-delay: -2.1s;
}

.gateway-readout {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  transform: translateX(-50%);
  color: #6f747e;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-align: center;
}

.readout-value {
  margin-bottom: 5px;
  color: #a8acb5;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.readout-value[data-state="online"] {
  color: var(--green);
}

.readout-value[data-state="offline"] {
  color: var(--danger);
}

.capability-strip {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  width: min(1440px, calc(100% - clamp(44px, 10vw, 144px)));
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.capability-strip > div,
.capability-strip > article {
  min-height: 112px;
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.capability-strip > div:first-child {
  padding-left: 0;
}

.capability-strip > article:last-child {
  border-right: 0;
}

.strip-label {
  margin: 0 0 13px;
  color: #686d77;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 850;
}

.channel-list span:nth-child(2) {
  color: var(--purple);
}

.channel-list span:nth-child(3) {
  color: var(--green);
}

.capability-strip h2 {
  margin: 0 0 7px;
  font-size: 14px;
  font-weight: 750;
}

.capability-strip article > p:last-child {
  margin: 0;
  color: #757a84;
  font-size: 10px;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px clamp(22px, 5vw, 72px);
  color: #4f545d;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.noscript-notice {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: 16px;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid var(--purple);
  background: #12141a;
  color: #d8d9de;
  font-size: 12px;
}

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

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
}

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(186, 255, 53, 0.58);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(186, 255, 53, 0);
  }
}

@keyframes route-scan {
  from {
    left: 0;
    opacity: 0;
  }
  15%,
  80% {
    opacity: 1;
  }
  to {
    left: 76%;
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .internal-label {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .routing-card {
    width: min(620px, 100%);
  }

  .capability-strip {
    grid-template-columns: 1fr 1fr;
  }

  .capability-strip > div,
  .capability-strip > article {
    border-bottom: 1px solid var(--line);
  }

  .capability-strip > :nth-child(2) {
    border-right: 0;
  }

  .capability-strip > div:first-child {
    padding-left: 22px;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 70px;
  }

  .brand-suffix,
  .header-enter {
    display: none;
  }

  .wordmark {
    font-size: 18px;
  }

  #system-status-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .system-status::after {
    content: "CHECK";
  }

  .system-status.is-online::after {
    content: "ONLINE";
  }

  .system-status.is-offline::after {
    content: "OFFLINE";
  }

  .hero {
    padding-top: 58px;
  }

  h1 {
    font-size: clamp(43px, 12.4vw, 49px);
    letter-spacing: -0.068em;
  }

  .intro {
    margin-top: 25px;
  }

  .hero-actions,
  .primary-action,
  .endpoint-copy {
    width: 100%;
  }

  .endpoint-copy {
    justify-content: center;
  }

  .routing-card {
    width: 100%;
    min-height: 340px;
    min-width: 0;
  }

  .ring-outer {
    width: 220px;
    height: 220px;
  }

  .ring-middle {
    width: 150px;
    height: 150px;
  }

  .ring-inner {
    width: 82px;
    height: 82px;
  }

  .model-node {
    width: 68px;
    font-size: 7px;
  }

  .capability-strip {
    grid-template-columns: 1fr;
  }

  .capability-strip > div,
  .capability-strip > article {
    min-height: 96px;
    padding: 21px 0;
    border-right: 0;
  }

  .capability-strip > div:first-child {
    padding-left: 0;
  }

  .site-footer {
    gap: 14px;
    flex-direction: column;
  }
}

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