/* ============================================================
   themes.css — Design tokens & auto light/dark theming
   NEOCONTEC Web · Mobile-first · No toggle (auto via OS)
   ============================================================ */

:root {
  /* ---------- Color palette (light, default) ---------- */
  --color-bg: #ffffff;
  --color-text: #0a0a0a;
  --color-accent: #197519;
  --color-accent-2: #22cc66;
  --color-subtle: #f5f5f5;
  --color-border: #e5e5e5;
  --color-muted: #525252;
  --color-heading: #0a0a0a;

  /* Surfaces & states derived from base palette */
  --color-surface: #ffffff;
  --color-surface-elev: #fafafa;
  --color-accent-soft: rgba(25, 117, 25, 0.1);
  --color-accent-soft-2: rgba(34, 204, 102, 0.1);
  --color-focus-ring: rgba(25, 117, 25, 0.45);
  --color-overlay: rgba(10, 10, 10, 0.6);

  /* ---------- Spacing scale (rem) ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---------- Border radius ---------- */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* ---------- Shadows (light) ---------- */
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow: 0 4px 12px rgba(10, 10, 10, 0.08);
  --shadow-lg: 0 12px 32px rgba(10, 10, 10, 0.1);

  /* ---------- Typography ---------- */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* ---------- Layout ---------- */
  --container-max: 1480px;
  --container-padding: var(--space-4);
  --header-height: 64px;

  /* ---------- Motion ---------- */
  --transition: 200ms ease;
  --transition-slow: 400ms ease;
  --transition-fast: 120ms ease;

  /* ---------- Z-index scale ---------- */
  --z-canvas: -1;
  --z-base: 1;
  --z-header: 100;
  --z-modal: 1000;

  /* ---------- Gradient ---------- */
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
}

/* ============================================================
   Dark theme — automatically applied when OS prefers dark
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0a0a0a;
    --color-text: #f5f5f5;
    --color-accent: #33cc44;
    --color-accent-2: #00ff88;
    --color-subtle: #171717;
    --color-border: #262626;
    --color-muted: #a3a3a3;
    --color-heading: #f5f5f5;

    --color-surface: #0a0a0a;
    --color-surface-elev: #171717;
    --color-accent-soft: rgba(51, 204, 68, 0.12);
    --color-accent-soft-2: rgba(0, 255, 136, 0.12);
    --color-focus-ring: rgba(51, 204, 68, 0.5);
    --color-overlay: rgba(0, 0, 0, 0.7);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  }
}
