/* dydact brand tokens — shared across api.dydact.io subpages.
   Mirrors the aesthetic from portal/src/app/platform/page.tsx:
   mint accent #85e0ce, understated card grid, tiered white opacities. */

:root {
  --bg: #05070f;
  --bg-2: #0a0e1f;
  --mint: #85e0ce;
  --emerald: #10b981;
  --blue: #3b82f6;
  --violet: #a78bfa;
  --amber: #f59e0b;
  --rose: #f87171;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.02);
  --card-hover: rgba(255, 255, 255, 0.04);
  --text: rgba(255, 255, 255, 0.9);
  --text-soft: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);
  --text-faint: rgba(255, 255, 255, 0.25);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
code, pre, .mono { font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: white; }

nav.top {
  position: sticky; top: 0; z-index: 50;
  padding: 16px 24px;
  background: rgba(5, 7, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
nav.top .brand { display: flex; align-items: center; gap: 10px; }
nav.top .brand img { height: 22px; width: auto; opacity: 0.9; }
nav.top .brand .tag {
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-muted);
}
nav.top .links { display: flex; gap: 24px; font-size: 13px; }
nav.top .links a { color: var(--text-soft); }
nav.top .links a:hover { color: white; }
nav.top .links a.active { color: var(--mint); }

section { padding: 96px 24px; max-width: 1100px; margin: 0 auto; }
section.hero { padding-top: 120px; }
.eyebrow {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 24px;
}
h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 24px;
}
h1 .soft { color: rgba(255, 255, 255, 0.35); }
h2 {
  font-size: 24px; font-weight: 500; letter-spacing: -0.01em;
  margin: 0 0 20px;
}
h3 {
  font-size: 15px; font-weight: 500;
  margin: 0 0 8px;
}
.lede {
  font-size: 18px; line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  max-width: 640px;
  margin: 0 0 48px;
}
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 16px;
}
.section-label .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.emerald { background: var(--emerald); }
.dot.blue { background: var(--blue); }
.dot.violet { background: var(--violet); }
.dot.amber { background: var(--amber); }
.dot.rose { background: var(--rose); }
.dot.mint { background: var(--mint); }
p.copy { font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, 0.45); max-width: 640px; margin: 0 0 24px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  transition: all 0.2s;
}
.card:hover { background: var(--card-hover); border-color: var(--border-strong); }
.card .label { font-size: 14px; color: rgba(255, 255, 255, 0.75); margin-bottom: 6px; font-weight: 500; }
.card .detail { font-size: 12px; color: rgba(255, 255, 255, 0.35); line-height: 1.55; }
.card .value { font-size: 28px; font-weight: 600; margin-bottom: 4px; color: rgba(255, 255, 255, 0.85); }

pre.code {
  margin: 16px 0;
  padding: 18px 20px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  overflow-x: auto;
  white-space: pre;
}
pre.code .c { color: rgba(255, 255, 255, 0.35); font-style: italic; }
pre.code .k { color: var(--violet); }
pre.code .s { color: var(--mint); }
pre.code .n { color: var(--amber); }

footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}
footer .links { display: flex; justify-content: center; gap: 18px; margin-bottom: 16px; }
footer .links a { font-size: 12px; }

/* Docs-specific */
.docs-layout {
  display: grid; gap: 32px;
  grid-template-columns: 220px 1fr;
}
@media (max-width: 720px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-sidebar {
  position: sticky; top: 80px;
  align-self: start;
  font-size: 13px;
}
.docs-sidebar h4 {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted); margin: 20px 0 8px;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar a {
  display: block; padding: 4px 0;
  color: var(--text-soft);
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -12px;
}
.docs-sidebar a:hover { color: white; border-color: var(--border-strong); }
.docs-sidebar a.active { color: var(--mint); border-color: var(--mint); }
.docs-content h3 { margin-top: 32px; font-size: 18px; }
.docs-content h4 { font-size: 13px; color: var(--text-muted); margin-top: 20px; }
.docs-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 13px;
}
.docs-content th, .docs-content td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.docs-content th { color: var(--text-muted); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.docs-content td code { background: rgba(255,255,255,0.04); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.tier-badge {
  display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px;
  font-family: "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--border-strong);
  margin-left: 6px; vertical-align: middle;
}
.tier-badge.academic { color: var(--emerald); border-color: rgba(16, 185, 129, 0.3); }
.tier-badge.corporate { color: var(--mint); border-color: rgba(133, 224, 206, 0.3); }
.tier-badge.enterprise { color: var(--amber); border-color: rgba(245, 158, 11, 0.3); }

@media (max-width: 640px) {
  section { padding: 64px 18px; }
  nav.top { padding: 14px 18px; }
  nav.top .links { gap: 14px; font-size: 12px; }
}
