/* Trickle Up - design tokens */

:root {
  /* Colour palette */
  --bg: #0f1419;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #30363d;
  --text: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #6e7681;

  --accent-flow: #58a6ff;
  --accent-grow: #3fb950;
  --accent-warn: #f85149;
  --accent-spark: #ffe744;

  /* Typography */
  --font-ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 20px;
  --fs-lg: 28px;
  --fs-xl: 44px;
  --fs-xxl: 64px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* Layout */
  --max-w: 1200px;
  --header-h: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 240ms ease;
  --t-slow: 480ms cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

* { box-sizing: border-box; }

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  color: var(--text);
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 { font-size: var(--fs-xxl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }

p { margin: 0 0 var(--sp-4); color: var(--text-muted); }

.label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-flow);
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.warn { color: var(--accent-warn); }
.grow { color: var(--accent-grow); }
.spark { color: var(--accent-spark); }

a {
  color: var(--accent-flow);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}

a:hover { border-bottom-color: var(--accent-flow); }

@media (max-width: 768px) {
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  h3 { font-size: var(--fs-md); }
}

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