/* ==========================================================================
   bit.io — base.css
   Tokens, reset, typography
   ========================================================================== */

:root {
  /* -- Brand gradient (sampled from the bit.io hexagon) -- */
  --grad-orange: #ff7a45;
  --grad-pink: #ec4899;
  --grad-purple: #7c3aed;
  --grad-blue: #3b82f6;
  --brand-dot: #8b2fe0;

  /* -- Surfaces -- */
  --bg: #ffffff;
  --bg-soft: #f7f7fb;
  --bg-panel: #101014;
  --bg-panel-soft: #17171d;
  --border: #e7e7ee;
  --border-strong: #d8d8e2;

  /* -- Ink -- */
  --ink: #0b0e14;
  --ink-soft: #4b4f5a;
  --ink-mute: #868993;
  --ink-on-dark: #f4f4f8;
  --ink-on-dark-soft: #a7a9b5;

  /* -- Language colors (custom, for the file-type bar) -- */
  --lang-hl: #6c1fd6;      /* Hacker Lang — purple, from the Hacker Lang mark */
  --lang-hsharp: #a5001a;  /* H# — dark red, from the H# mark */
  --lang-hcs: #4b4b52;     /* HackerScript — dark graphite */

  /* -- Type -- */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* -- Radius / shadow -- */
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow-card: 0 1px 2px rgba(16, 16, 20, 0.04), 0 8px 24px rgba(16, 16, 20, 0.05);
  --shadow-lift: 0 12px 32px rgba(16, 16, 20, 0.12);

  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

code, pre {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-dot);
  display: inline-block;
}

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

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

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* -- Badges -- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
  text-transform: lowercase;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

/* -- Visually hidden -- */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* -- Skip link -- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}
