/* ============================================
   InksPet — Shared Design Tokens
   Single source of truth for both index.html
   and flash/index.html.
   ============================================ */

:root {
  /* ---- Backgrounds (tinted slightly toward brand green hue) ---- */
  --bg-deep: #070806;
  --bg-primary: #0b0c0a;
  --bg-elevated: #121311;
  --bg-card: #16181500;           /* fallback below */
  --bg-card: #161815;
  --bg-card-hover: #1b1d1a;

  /* ---- Borders ---- */
  --border-subtle: #23251f;
  --border-medium: #2c2e28;

  /* ---- Text (all WCAG AA compliant on --bg-primary) ---- */
  --text-primary: #e8e8e3;         /* ~15:1 on bg-primary */
  --text-secondary: #8d938a;       /* ~5.1:1 on bg-primary, tinted green */
  --text-tertiary: #8a8a85;        /* ~4.7:1 on bg-primary (was #555 ~2.4:1) */

  /* ---- Brand Accents ---- */
  --accent-green: #76B900;
  --accent-green-hover: #84d100;
  --accent-green-dim: #5a8f00;
  --accent-green-glow: rgba(118, 185, 0, 0.12);
  --accent-green-glow-soft: rgba(118, 185, 0, 0.06);

  /* ---- Status Accents (for LED states) ---- */
  --accent-blue: #58a6ff;
  --accent-red: #f85149;
  --accent-yellow: #e3b341;
  --accent-purple: #bc8cff;
  --accent-cyan: #56d4dd;
  --accent-orange: #f0883e;
  --accent-white: #cccccc;

  /* ---- Typography ---- */
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-pixel: 'Press Start 2P', ui-monospace, monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ---- Radii ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* ---- Layout ---- */
  --nav-height: 64px;
  --max-width: 1120px;
}

/* ============================================
   Global focus-visible — A11y critical
   ============================================ */
:focus {
  outline: none;
}

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

/* For elements that already have border-radius */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
}

/* ============================================
   Reduced motion — A11y critical
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
