/* SpisaSmart — design tokens */

:root {
  /* Typography — Inter per tutto */
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;

  /* Scala tipografica */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);

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

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Breakpoints */
  --bp-mobile-lg: 40rem;   /* 640px */
  --bp-tablet: 48rem;      /* 768px */
  --bp-desktop: 64rem;     /* 1024px */
  --bp-desktop-wide: 80rem; /* 1280px */

  /* Transizioni */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 120ms ease;

  /* Layout widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1280px;
}

/* Tema light */
[data-theme="light"],
html:not([data-theme="dark"]) {
  /* Superfici */
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-surface-2: #f8f9fa;
  --color-surface-offset: #f1f3f5;
  --color-surface-dynamic: #e9ecef;
  --color-divider: #dee2e6;
  --color-border: #ced4da;

  /* Testo */
  --color-text: #1a1d21;
  --color-text-muted: #6c757d;
  --color-text-faint: #adb5bd;
  --color-text-inverse: #ffffff;

  /* Primario — teal vivido */
  --color-primary: #0d7a73;
  --color-primary-hover: #0a635d;
  --color-primary-active: #084d48;
  --color-primary-highlight: #d0f0ec;
  --color-primary-subtle: #e8f8f6;

  /* Successo */
  --color-success: #2d8a3e;
  --color-success-hover: #226e30;
  --color-success-highlight: #d4edda;

  /* Warning */
  --color-warning: #b45309;
  --color-warning-highlight: #fef3c7;

  /* Error */
  --color-error: #c62828;
  --color-error-highlight: #ffebee;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --color-bg: #0f1117;
  --color-surface: #1a1d23;
  --color-surface-2: #1f2229;
  --color-surface-offset: #252830;
  --color-surface-dynamic: #2d3038;
  --color-divider: #2d3038;
  --color-border: #383c46;
  --color-text: #e8eaf0;
  --color-text-muted: #8b9099;
  --color-text-faint: #525966;
  --color-text-inverse: #0f1117;
  --color-primary: #14b8ad;
  --color-primary-hover: #0fa09b;
  --color-primary-active: #0c8880;
  --color-primary-highlight: #0d3330;
  --color-primary-subtle: #0a2825;
  --color-success: #4ade80;
  --color-success-hover: #22c55e;
  --color-success-highlight: #14532d;
  --color-warning: #fbbf24;
  --color-warning-highlight: #451a03;
  --color-error: #f87171;
  --color-error-highlight: #450a0a;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.35);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6), 0 8px 16px rgba(0,0,0,0.4);
}
