/* GDB.gg — black & white + globe home */

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --border: #1a1a1a;
  --text: #ffffff;
  --muted: #888888;
  --muted-2: #555555;
  --nav-h: 64px;
  --radius-sm: 6px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --maxw: 1200px;
  --ease: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  height: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  background: var(--bg);
}

body.page-home {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 3px;
}

.container {
  width: min(var(--maxw), calc(100% - 40px));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  line-height: 1;
  color: var(--text);
}

.site-logo__mark-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
}

.site-logo__text {
  display: inline-flex;
  align-items: baseline;
}

.site-logo__mark { color: var(--text); }
.site-logo__tld {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

.site-nav > a,
.nav-dropdown__trigger {
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
  font-family: inherit;
  line-height: 1.25;
}

.site-nav > a:hover,
.site-nav > a.is-active,
.nav-dropdown__trigger:hover,
.nav-dropdown.is-open .nav-dropdown__trigger {
  color: var(--text);
}

.site-nav > a.is-active {
  box-shadow: inset 0 -1px 0 #fff;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-dropdown__trigger svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  transition: transform var(--ease);
}

.nav-dropdown.is-open .nav-dropdown__trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  z-index: 120;
}

.nav-dropdown.is-open .nav-dropdown__menu {
  display: block;
}

.nav-dropdown__menu a,
.nav-dropdown__menu span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.nav-dropdown__menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown__menu .nav-dropdown__meta {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.nav-dropdown__menu .is-disabled {
  color: var(--muted-2);
  cursor: default;
}

.nav-dropdown__menu .is-disabled .nav-dropdown__meta {
  color: #777;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.social-links {
  display: none;
  align-items: center;
  gap: 6px;
}

.footer-brand .social-links { display: flex; }

.social-links a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}

.social-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 99;
  padding: 24px;
  background: rgba(0, 0, 0, 0.96);
  border-top: 1px solid var(--border);
}

.mobile-nav.is-open { display: block; }

.mobile-nav a,
.mobile-nav .mobile-nav__label {
  display: block;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a.is-active { color: var(--text); }

.mobile-nav__section {
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav__section-title {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.mobile-nav__section a,
.mobile-nav__section span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0;
  font-size: 0.9375rem;
  color: var(--text);
}

.mobile-nav__section .is-disabled {
  color: var(--muted-2);
}

.mobile-nav__meta {
  font-size: 0.6875rem;
  color: var(--muted-2);
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .social-links { display: flex; }
  .nav-toggle { display: none; }
  .site-header__actions { margin-left: 0; }
}

/* ---------- Globe stage ---------- */

.globe-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
  cursor: grab;
}

.page-home .site-footer {
  position: relative;
  z-index: 5;
}

.globe-stage:active { cursor: grabbing; }

.globe-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, transparent 35%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.55) 100%);
}

#globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.globe-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  margin: 0;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  pointer-events: none;
  user-select: none;
}

/* ---------- Inner pages (stubs / legal) ---------- */

.coming-soon {
  max-width: 520px;
  margin: 24px auto 40px;
  text-align: center;
  padding: 48px 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.coming-soon__eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.coming-soon__title {
  margin: 0 0 14px;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.coming-soon__desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: #fff;
  color: #000;
}

.btn--primary:hover { background: #e5e5e5; }

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: #333;
  background: rgba(255, 255, 255, 0.04);
}

.section { padding: 88px 0; }

.section-label {
  display: block;
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title {
  margin: 0 0 16px;
  font-size: clamp(1.625rem, 3.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-lede {
  margin: 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 1rem;
}

.page-hero {
  padding: calc(var(--nav-h) + 48px) 0 32px;
  border-bottom: 1px solid var(--border);
}

.page-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-hero__desc {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.page-content {
  padding: 48px 0 80px;
}

.page-content h2 {
  margin: 40px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.page-content p,
.page-content li {
  color: var(--muted);
  line-height: 1.7;
}

.page-content ul,
.page-content ol { padding-left: 1.25rem; }

.page-content a:not(.btn):not(.feature-card):not(.network-card) {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice {
  margin: 0 0 28px;
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .capability-list { grid-template-columns: repeat(2, 1fr); }
}

.capability-item {
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.capability-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.capability-item p {
  margin: 0;
  font-size: 0.875rem;
}

.card-grid {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.feature-card,
.network-card,
.why-card,
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color var(--ease);
}

a.feature-card:hover,
a.network-card:hover {
  border-color: #333;
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.feature-card__icon svg { width: 20px; height: 20px; }

.feature-card__title,
.network-card__name,
.why-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.feature-card__desc,
.network-card__desc,
.why-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.feature-card__link { font-size: 0.8125rem; font-weight: 600; color: #fff; }

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

.network-card--muted { opacity: 0.55; pointer-events: none; }

.badge {
  display: inline-flex;
  padding: 3px 9px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid #333;
  color: var(--muted);
}

.badge--live { color: #fff; border-color: #fff; }
.badge--dev { color: var(--muted); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-list li {
  padding: 4px 10px;
  font-size: 0.6875rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
}

.stat-card { text-align: center; padding: 20px 16px; }

.stat-card__value {
  display: block;
  margin-bottom: 6px;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card__label {
  font-size: 0.75rem;
  color: var(--muted-2);
}

.endpoint-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
}

.endpoint-row__method { font-weight: 700; min-width: 3rem; }
.endpoint-row__path { color: var(--text); }
.endpoint-row__desc {
  margin-left: auto;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--muted-2);
  display: none;
}

@media (min-width: 640px) {
  .endpoint-row__desc { display: block; }
}

.code-block {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.code-block__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-block__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.code-block__copy:hover,
.code-block__copy.is-copied { color: var(--text); }

.code-block__copy svg { width: 14px; height: 14px; }

.code-block pre {
  margin: 0;
  padding: 18px 16px;
  overflow-x: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--muted);
}

.token-method,
.token-key { color: #fff; font-weight: 600; }
.token-string { color: #bbb; }
.token-number { color: #ddd; }

.api-showcase {
  display: grid;
  gap: 16px;
}

@media (min-width: 860px) {
  .api-showcase { grid-template-columns: 1fr 1fr; }
}

.docs-layout {
  display: grid;
  gap: 32px;
}

@media (min-width: 860px) {
  .docs-layout {
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
  }
}

.docs-sidebar {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.docs-sidebar__title {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-sidebar a {
  padding: 8px 10px;
  font-size: 0.875rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
}

.docs-sidebar a:hover,
.docs-sidebar a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.status-banner__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

.status-banner__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.status-banner__meta {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.9375rem;
}

.status-list li:last-child { border-bottom: 0; }
.status-list__ok { font-size: 0.75rem; font-weight: 600; color: #fff; }

.legal-doc {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.legal-doc h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.legal-doc h2 {
  margin: 28px 0 12px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.legal-doc h3 {
  margin: 20px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.legal-doc p,
.legal-doc li,
.legal-doc span[data-custom-class="body_text"],
.legal-doc div[data-custom-class="body_text"],
.legal-doc .MsoNormal {
  color: var(--muted) !important;
  font-size: 0.9375rem;
  line-height: 1.7;
  font-family: var(--font), Inter, sans-serif !important;
}

.legal-doc strong { color: var(--text); }

.legal-doc a,
.legal-doc a[data-custom-class="link"],
.legal-doc [data-custom-class="link"] {
  color: #fff !important;
  word-break: break-word;
}

.legal-doc a:hover { text-decoration: underline; }

.legal-doc ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 12px 0;
}

.legal-doc li { margin: 6px 0; }

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.legal-doc th,
.legal-doc td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
}

.legal-doc th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

/* ---------- Footer (inner pages) ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: #050505;
}

.footer-grid {
  display: grid;
  gap: 36px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

.footer-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  line-height: 1;
  color: var(--text);
}

.footer-brand__logo .site-logo__mark-icon {
  width: 24px;
  height: 24px;
}

.footer-brand__logo .site-logo__tld { color: var(--muted); }

.footer-brand__desc {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 260px;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.8125rem;
  color: var(--muted);
  transition: color var(--ease);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-2);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom .heart { color: #fff; }

.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 (prefers-reduced-motion: reduce) {
  .globe-hint { display: none; }
}
