/* Bloxnari shared design tokens and base styles */

/* Fonts are served by Bloxnari itself (no third-party requests). SIL Open Font License, see /assets/fonts. */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Blue and white brand: one primary blue (#1d5bd6, white text on it 5.97:1). Dark tokens are navy. */
  --bg: #0a1226;
  --bg-raised: #0e1830;
  --surface: #13203d;
  --surface-2: #1a294a;
  --surface-3: #223358;
  --border: #263a63;
  --border-strong: #34497a;
  --text: #eef3ff;
  --text-2: #c3cfe6;
  --muted: #8fa3c9;
  --accent: #1d5bd6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(29, 91, 214, 0.2);
  --brand-blue: #1d5bd6;
  --brand-grad: linear-gradient(120deg, #1747b0 0%, #1d5bd6 55%, #2f8cf0 100%);
  --accent-2: #5aa2ff;
  --accent-2-soft: rgba(90, 162, 255, 0.14);
  --danger: #ff5d6c;
  --danger-soft: rgba(255, 93, 108, 0.12);
  --warn: #ffc145;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

[hidden] {
  display: none !important;
}

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

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.brand b {
  color: var(--accent-2);
  font-weight: 800;
}
.brand .logo-mark {
  width: 34px;
  height: auto;
}
.brand .wordmark {
  font-weight: 680;
  font-size: 20px;
  font-stretch: 114%;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand .tld {
  color: var(--accent-2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: #174ab8;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
}
.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Code blocks with copy button */
.code {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 52px 14px 16px;
  overflow-x: auto;
  color: var(--text-2);
  margin: 0;
}
.code .prompt-sign {
  color: var(--accent-2);
  user-select: none;
  margin-right: 8px;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-2);
  font: 500 12px var(--font-body);
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--text);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.dot.on {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.dot.busy {
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-soft);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* The full "B | Bloxnari" logo (web/assets/brand/bloxnari-logo.png) in each page's top bar. */
.logo-full {
  display: block;
  width: auto;
  height: 36px;
}
@media (max-width: 560px) {
  .logo-full {
    height: 30px;
  }
}
