:root {
  color-scheme: dark;
  --bg: #080d0c;
  --surface: #101715;
  --surface-strong: #17201d;
  --line: #2a3833;
  --text: #f1f5f2;
  --muted: #9cacA6;
  --green: #5be2a7;
  --coral: #dd5a2d;
  --amber: #f6b946;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 12, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 27px;
  height: 27px;
  border: 1px solid #50645c;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  content: "";
  background: var(--green);
}

.brand-mark::before {
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
}

.brand-mark::after {
  right: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
}

.brand-mark span {
  top: 12px;
  left: 10px;
  width: 9px;
  height: 1px;
  transform: rotate(-45deg);
  transform-origin: center;
}

.top-status,
.service-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c8d3cf;
  font-size: 13px;
}

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

.account-button {
  min-width: 70px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #50645c;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.account-button:hover,
.account-button:focus-visible {
  border-color: var(--green);
  background: var(--surface-strong);
  outline: none;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(91, 226, 167, 0.12);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 98px);
  align-content: space-between;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
  background-image: url("assets/server-network.png");
  background-position: center;
  background-size: cover;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(8, 13, 12, 0.16);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(620px, 90vw);
  padding: 13vh 5vw 64px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  max-width: 560px;
  margin-bottom: 20px;
  font-size: 68px;
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 460px;
  margin-bottom: 40px;
  color: #bdc9c4;
  font-size: 20px;
}

.endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(390px, 100%);
  min-height: 72px;
  padding: 12px 12px 12px 18px;
  border: 1px solid #3b4b45;
  border-left: 3px solid var(--coral);
  background: rgba(12, 18, 16, 0.9);
}

.endpoint-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.endpoint strong {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  font-weight: 600;
}

.copy-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #50645c;
  border-radius: 4px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--green);
  background: #1d2a26;
  outline: none;
}

.copy-button span {
  font-size: 21px;
  line-height: 1;
}

.node-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0 5vw;
  border-top: 1px solid var(--line);
  background: rgba(8, 13, 12, 0.88);
}

.node-facts > div {
  min-height: 96px;
  padding: 20px 30px;
  border-right: 1px solid var(--line);
}

.node-facts > div:first-child {
  padding-left: 0;
}

.node-facts > div:last-child {
  border-right: 0;
}

.node-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.node-facts dd {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.services {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 2fr);
  gap: 7vw;
  padding: 88px 5vw 104px;
  background: #0b110f;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.service-list {
  border-top: 1px solid #42534c;
}

.service-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 108px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.service-index {
  color: var(--coral);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.service-item h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.service-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.service-item-muted {
  opacity: 0.56;
}

.service-link {
  color: var(--text);
  text-decoration: none;
  transition: background-color 160ms ease;
}

.service-link:hover,
.service-link:focus-visible {
  background: rgba(91, 226, 167, 0.05);
  outline: none;
}

.service-link .service-state {
  justify-content: flex-end;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 5vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  padding: 10px 14px;
  border: 1px solid #466a5b;
  border-radius: 4px;
  background: #17231f;
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.login-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #42534c;
  border-radius: 6px;
  background: #101715;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.login-dialog::backdrop {
  background: rgba(3, 7, 6, 0.78);
  backdrop-filter: blur(3px);
}

.login-form {
  padding: 30px;
}

.dialog-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-topline .kicker {
  margin-bottom: 0;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  border-color: var(--green);
  color: var(--text);
  outline: none;
}

.login-form h2 {
  margin: 20px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.dialog-copy {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

.login-form label {
  display: block;
  margin: 0 0 7px;
  color: #c8d3cf;
  font-size: 13px;
}

.login-form input {
  width: 100%;
  height: 46px;
  margin: 0 0 18px;
  padding: 0 12px;
  border: 1px solid #3b4b45;
  border-radius: 4px;
  background: #0a100e;
  color: var(--text);
  font-size: 15px;
}

.login-form input:focus {
  border-color: var(--green);
  outline: 2px solid rgba(91, 226, 167, 0.12);
}

.form-error {
  min-height: 21px;
  margin: -4px 0 12px;
  color: #ff9a78;
  font-size: 13px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #07100d;
  font-weight: 800;
  cursor: pointer;
}

.login-submit:hover,
.login-submit:focus-visible {
  background: #7cebbd;
  outline: 2px solid rgba(91, 226, 167, 0.25);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.64;
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 20px;
  }

  .topbar .top-status {
    display: none;
  }

  .topbar-actions {
    gap: 0;
  }

  .hero {
    min-height: calc(100vh - 82px);
    background-position: 58% center;
  }

  .hero::before {
    background: rgba(8, 13, 12, 0.44);
  }

  .hero-content {
    width: 100%;
    padding: 11vh 20px 52px;
  }

  h1 {
    font-size: 48px;
  }

  .lead {
    max-width: 320px;
    font-size: 17px;
  }

  .endpoint {
    width: calc(100vw - 40px);
    max-width: 100%;
  }

  .node-facts {
    grid-template-columns: 1fr 1fr;
    width: 100vw;
    padding: 0 20px;
  }

  .node-facts > div {
    min-width: 0;
    min-height: 78px;
    padding: 15px 16px;
  }

  .node-facts > div:nth-child(2) {
    border-right: 0;
  }

  .node-facts > div:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .services {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 70px 20px 78px;
  }

  .service-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .login-form {
    padding: 24px;
  }

  footer {
    flex-direction: column;
    padding: 24px 20px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
