/**
 * base.css
 * -----------------------------------------------------------------------
 * Design tokens (CSS custom properties), resets, and base typography.
 * Everything else in layout.css / components.css should reference these
 * variables rather than hard-coding values, so re-theming QILO later
 * means editing this file only.
 * ----------------------------------------------------------------------- */

:root {
  /* ---- Color: neutrals ---- */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f5f4;
  --color-border: #e4e2df;
  --color-border-strong: #cfccc7;

  --color-ink: #17171a;
  --color-ink-soft: #55555b;
  --color-ink-faint: #8c8c92;
  --color-ink-inverse: #ffffff;

  /* ---- Color: brand / accent ---- */
  --color-accent: #17171a;
  --color-accent-hover: #000000;
  --color-focus: #2f6fed;

  /* ---- Color: swatch references (kept in sync with state.js COLORS) ---- */
  --swatch-matte-black: #202022;
  --swatch-silver: #c9cdd3;
  --swatch-navy-blue: #1f3358;
  --swatch-crimson: #9e1b32;
  --swatch-graphite: #3a3a3d;
  --swatch-champagne-gold: #c9a86a;
  --swatch-forest-green: #2c4a3e;
  --swatch-ivory: #ece7dd;

  /* ---- Spacing scale ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;

  /* ---- Radius ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 1px 2px rgba(15, 15, 17, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 15, 17, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 15, 17, 0.14);

  /* ---- Typography ---- */
  --font-body: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Helvetica Neue", var(--font-body);
  --tracking-wide: 0.08em;
  --tracking-wider: 0.14em;

  /* ---- Layout ---- */
  --topnav-height: 64px;
  --summary-bar-height: 84px;
  --sidebar-toggle-height: 52px;
  --sidebar-width: 380px;
  --z-nav: 100;
  --z-sidebar: 90;
  --z-sidebar-backdrop: 80;
  --z-summary: 100;

  /* ---- Motion ---- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-med: 220ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
select {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Visible, consistent focus ring for keyboard users across all controls */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
