/* horsey design tokens (brand/horsey/tokens.json) and logo primitives.
   Dark is the default; light applies under [data-theme="light"], or under
   prefers-color-scheme: light unless the page pins [data-theme="dark"]. */

:root {
  color-scheme: dark;
  --brand-ink: #0e1116;
  --brand-signal: #3ddc97;
  --brand-paper: #e6edf3;
  --bg: #0e1116;
  --surface: #161b22;
  --ink: #e6edf3;
  --mute: #9aa4b2;
  --signal: #3ddc97;
  --signal-text: #3ddc97;
  --on-signal: #0e1116;
  --hairline: #2a313b;

  --app-deck: #8b8e97;
  --app-board: #c19ee0;
  --app-boxscore: #7ac8bf;
  --app-console: #95a9ec;
  --app-chat: #f394ba;
  --app-fast-browser: #f5c26b;
  --app-glyph: #1d1830;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: Inter, system-ui, -apple-system, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 72px;

  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-icon: 22.5%;
  --radius-none: 0;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f4f2ee;
    --ink: #0e1116;
    --mute: #555a63;
    --signal-text: #0b7a4d;
    --hairline: #e2e0db;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f4f2ee;
  --ink: #0e1116;
  --mute: #555a63;
  --signal-text: #0b7a4d;
  --hairline: #e2e0db;
}

.horsey-mark {
  display: block;
  flex: none;
  border-radius: var(--radius-icon);
}
/* On a light page the beige tile needs an edge, drawn like the ghost button's border. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .horsey-mark {
    outline: 1px solid var(--mute);
    outline-offset: -1px;
  }
}
:root[data-theme="light"] .horsey-mark {
  outline: 1px solid var(--mute);
  outline-offset: -1px;
}

/* Lockup: every part is a multiple of --s, the wordmark's font size, rounded
   to whole pixels the way the design system's component rounds them. */
.horsey-lockup {
  --s: 80px;
  display: inline-flex;
  align-items: center;
  gap: round(calc(var(--s) * 0.25), 1px);
}
/* The mark alone, for small placements. The mark carries its own beige tile. */
.horsey-mark-alone {
  --m: 24px;
  display: inline-flex;
}
.horsey-mark-alone .horsey-mark {
  width: var(--m);
  height: var(--m);
}

.horsey-lockup .horsey-mark {
  width: round(calc(var(--s) * 1.05), 1px);
  height: round(calc(var(--s) * 1.05), 1px);
}
.horsey-word {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--s);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.horsey-cursor {
  display: block;
  flex: none;
  width: round(calc(var(--s) * 0.475), 1px);
  height: round(calc(var(--s) * 0.9), 1px);
  background: var(--brand-signal);
}

@keyframes horsey-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}
.horsey-cursor--blink {
  animation: horsey-blink 1.1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .horsey-cursor--blink {
    animation: none;
  }
}
