/*
 * DrSalut design tokens (proposal). Owner doc: docs/DESIGN.md.
 * Direction: Caderneta. Palette: ameixa on warm paper, framboesa as secondary accent.
 * State colors are a traffic light kept outside the brand palette; never use them for anything else.
 * To use with Tailwind v4, import this file from app/app.css and map the variables inside @theme.
 */

:root {
  color-scheme: light;

  /* surfaces and text */
  --color-bg: #fffcf7;
  --color-surface: #ffffff;
  --color-ink: #2a1a2e;
  --color-ink-soft: #5a4a5e;
  --color-line: #ede2e6;
  --color-field: #86738b;

  /* brand: ameixa for actions, links, focus and the wordmark */
  --color-brand: #6a2c7c;
  --color-on-brand: #ffffff;
  --color-brand-soft: #f7e6ee;
  --color-brand-text: #6a2c7c;

  /* secondary accent: framboesa, for illustration and non-interactive highlights only */
  --color-accent: #c2185b;

  /* result states: text, fill, border, range-band tint */
  --color-ok-text: #1b6b2f;
  --color-ok-bg: #ddf3df;
  --color-ok-border: #1e8e3e;
  --color-ok-band: #cdebd0;
  --color-mid-text: #3b2a00;
  --color-mid-bg: #ffd21f;
  --color-mid-border: #8a6500;
  --color-mid-band: #ffe88a;
  --color-out-text: #ffffff;
  --color-out-bg: #ba2a12;
  --color-out-border: #ba2a12;
  --color-out-band: #f6c9c0;
  --color-check-text: #5e4a3c;
  --color-check-border: #8a7060;

  /* type: 1rem = 20px (html { font-size: 125% }) */
  --font-display: "Nunito", system-ui, sans-serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --text-display: 2.2rem;
  --text-title-1: 1.7rem;
  --text-title-2: 1.3rem;
  --text-title-3: 1.05rem;
  --text-body: 1rem;
  --text-support: 0.9rem;
  --text-label: 0.9rem;
  --text-value: 1.6rem;

  /* shape */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 3px;
  --shadow-2: 0 12px 32px -12px rgb(42 26 46 / 0.28);

  /* space, on a 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --target-min: 48px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-micro: 120ms;
  --duration-swap: 200ms;
  --duration-overlay: 240ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #1a1220;
    --color-surface: #251a2c;
    --color-ink: #f7eef2;
    --color-ink-soft: #cdbccb;
    --color-line: #3e2f46;
    --color-field: #9f8ba6;
    --color-brand: #d9a8e6;
    --color-on-brand: #2a0f33;
    --color-brand-soft: #3a2140;
    --color-brand-text: #d9a8e6;
    --color-accent: #ff7ba8;
    --color-ok-text: #a6e3b0;
    --color-ok-bg: #173f22;
    --color-ok-border: #5fcb77;
    --color-ok-band: #1f4a2a;
    --color-mid-text: #3b2a00;
    --color-mid-bg: #ffd21f;
    --color-mid-border: #ffd21f;
    --color-mid-band: #6b5810;
    --color-out-text: #2a0703;
    --color-out-bg: #e8553f;
    --color-out-border: #e8553f;
    --color-out-band: #5a211a;
    --color-check-text: #e3d2c4;
    --color-check-border: #b39a88;
    --shadow-2: 0 12px 32px -12px rgb(0 0 0 / 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #1a1220;
  --color-surface: #251a2c;
  --color-ink: #f7eef2;
  --color-ink-soft: #cdbccb;
  --color-line: #3e2f46;
  --color-field: #9f8ba6;
  --color-brand: #d9a8e6;
  --color-on-brand: #2a0f33;
  --color-brand-soft: #3a2140;
  --color-brand-text: #d9a8e6;
  --color-accent: #ff7ba8;
  --color-ok-text: #a6e3b0;
  --color-ok-bg: #173f22;
  --color-ok-border: #5fcb77;
  --color-ok-band: #1f4a2a;
  --color-mid-text: #3b2a00;
  --color-mid-bg: #ffd21f;
  --color-mid-border: #ffd21f;
  --color-mid-band: #6b5810;
  --color-out-text: #2a0703;
  --color-out-bg: #e8553f;
  --color-out-border: #e8553f;
  --color-out-band: #5a211a;
  --color-check-text: #e3d2c4;
  --color-check-border: #b39a88;
  --shadow-2: 0 12px 32px -12px rgb(0 0 0 / 0.6);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-micro: 0ms;
    --duration-swap: 0ms;
    --duration-overlay: 0ms;
  }
}
