/* Roviq design tokens (--rv-*). Single source: wp-content/roviq/brand/tokens.css.
   Consumer copies are written by brand/sync-tokens.mjs; never edit a copy.
   Light warm is the default theme. Dark warm applies under [data-theme='dark']
   or .rv-theme-dark. Every color has a hex value and an "-rgb" triplet
   ("r g b") for rgb(var(--rv-x-rgb) / alpha). No glow: shadows are neutral. */

:root,
[data-theme='light'] {
  color-scheme: light;

  /* Brand: one orange. Text on orange is always dark (--rv-color-on-primary). */
  --rv-brand-50: #FEF3EC;   --rv-brand-50-rgb: 254 243 236;
  --rv-brand-100: #FDE3D3;  --rv-brand-100-rgb: 253 227 211;
  --rv-brand-200: #FBC6A7;  --rv-brand-200-rgb: 251 198 167;
  --rv-brand-300: #F8A67B;  --rv-brand-300-rgb: 248 166 123;
  --rv-brand-400: #F7895A;  --rv-brand-400-rgb: 247 137 90;
  --rv-brand-500: #F26A2E;  --rv-brand-500-rgb: 242 106 46;
  --rv-brand-600: #D9551C;  --rv-brand-600-rgb: 217 85 28;
  --rv-brand-700: #B8461A;  --rv-brand-700-rgb: 184 70 26;
  --rv-brand-800: #933A1A;  --rv-brand-800-rgb: 147 58 26;
  --rv-brand-900: #773219;  --rv-brand-900-rgb: 119 50 25;
  --rv-brand-950: #40170A;  --rv-brand-950-rgb: 64 23 10;

  --rv-color-primary: #F26A2E;        --rv-color-primary-rgb: 242 106 46;
  --rv-color-primary-hover: #D9551C;  --rv-color-primary-hover-rgb: 217 85 28;
  --rv-color-primary-text: #B8461A;   --rv-color-primary-text-rgb: 184 70 26;
  --rv-color-on-primary: #1A1310;     --rv-color-on-primary-rgb: 26 19 16;

  /* Light warm surfaces and ink. */
  --rv-color-bg: #FAF8F5;             --rv-color-bg-rgb: 250 248 245;
  --rv-color-surface: #FFFFFF;        --rv-color-surface-rgb: 255 255 255;
  --rv-color-surface-raised: #FFFFFF; --rv-color-surface-raised-rgb: 255 255 255;
  --rv-color-surface-sunken: #F4F0EB; --rv-color-surface-sunken-rgb: 244 240 235;
  --rv-color-border: #E7E1DA;         --rv-color-border-rgb: 231 225 218;
  --rv-color-text: #1C1917;           --rv-color-text-rgb: 28 25 23;
  --rv-color-text-secondary: #57534E; --rv-color-text-secondary-rgb: 87 83 78;
  --rv-color-text-muted: #78716C;     --rv-color-text-muted-rgb: 120 113 108;
  --rv-color-overlay: rgb(28 25 23 / 0.48);
  --rv-color-focus: #B8461A;

  /* Semantic states (ink on surface; soft fills use the -rgb with alpha). */
  --rv-color-success: #15783A;        --rv-color-success-rgb: 21 120 58;
  --rv-color-warning: #A84D08;        --rv-color-warning-rgb: 168 77 8;
  --rv-color-danger: #B91C1C;         --rv-color-danger-rgb: 185 28 28;
  --rv-color-info: #0369A1;           --rv-color-info-rgb: 3 105 161;
  --rv-color-on-danger: #FFFFFF;

  /* Typography (D6). Cairo stays as the migration fallback. */
  --rv-font-body: 'IBM Plex Sans Arabic', 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --rv-font-heading: 'Readex Pro Variable', 'Readex Pro', 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  --rv-font-numeric: tabular-nums;
  --rv-text-12: 0.75rem;
  --rv-text-13: 0.8125rem;
  --rv-text-14: 0.875rem;
  --rv-text-16: 1rem;
  --rv-text-18: 1.125rem;
  --rv-text-20: 1.25rem;
  --rv-text-24: 1.5rem;
  --rv-text-30: 1.875rem;
  --rv-text-36: 2.25rem;
  --rv-text-48: 3rem;
  --rv-leading-tight: 1.3;
  --rv-leading-normal: 1.6;
  --rv-weight-regular: 400;
  --rv-weight-medium: 500;
  --rv-weight-semibold: 600;
  --rv-weight-bold: 700;

  /* Shape. */
  --rv-radius-sm: 6px;
  --rv-radius-md: 10px;
  --rv-radius-lg: 14px;
  --rv-radius-xl: 20px;
  --rv-radius-pill: 9999px;

  /* Three neutral elevations, no brand-tinted shadow. */
  --rv-shadow-1: 0 1px 2px rgb(28 25 23 / 0.06), 0 1px 3px rgb(28 25 23 / 0.08);
  --rv-shadow-2: 0 4px 12px -2px rgb(28 25 23 / 0.10), 0 2px 4px -2px rgb(28 25 23 / 0.06);
  --rv-shadow-3: 0 16px 40px -12px rgb(28 25 23 / 0.22), 0 4px 12px -4px rgb(28 25 23 / 0.10);

  /* 4px spacing grid. */
  --rv-space-1: 4px;
  --rv-space-2: 8px;
  --rv-space-3: 12px;
  --rv-space-4: 16px;
  --rv-space-5: 20px;
  --rv-space-6: 24px;
  --rv-space-8: 32px;
  --rv-space-10: 40px;
  --rv-space-12: 48px;
  --rv-space-16: 64px;

  /* Motion. */
  --rv-duration-fast: 150ms;
  --rv-duration-base: 250ms;
  --rv-ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Touch targets and control heights. */
  --rv-touch-min: 44px;
  --rv-control-sm: 36px;
  --rv-control-md: 44px;
  --rv-control-lg: 52px;
}

[data-theme='dark'],
.rv-theme-dark {
  color-scheme: dark;

  --rv-color-primary-text: #F7895A;   --rv-color-primary-text-rgb: 247 137 90;

  /* Dark warm surfaces and ink. */
  --rv-color-bg: #14110F;             --rv-color-bg-rgb: 20 17 15;
  --rv-color-surface: #1E1A17;        --rv-color-surface-rgb: 30 26 23;
  --rv-color-surface-raised: #28231F; --rv-color-surface-raised-rgb: 40 35 31;
  --rv-color-surface-sunken: #14110F; --rv-color-surface-sunken-rgb: 20 17 15;
  --rv-color-border: #3A332D;         --rv-color-border-rgb: 58 51 45;
  --rv-color-text: #F5F1EC;           --rv-color-text-rgb: 245 241 236;
  --rv-color-text-secondary: #A8A29E; --rv-color-text-secondary-rgb: 168 162 158;
  --rv-color-text-muted: #8A837D;     --rv-color-text-muted-rgb: 138 131 125;
  --rv-color-overlay: rgb(0 0 0 / 0.64);
  --rv-color-focus: #F7895A;

  --rv-color-success: #4ADE80;        --rv-color-success-rgb: 74 222 128;
  --rv-color-warning: #FBBF24;        --rv-color-warning-rgb: 251 191 36;
  --rv-color-danger: #F87171;         --rv-color-danger-rgb: 248 113 113;
  --rv-color-info: #38BDF8;           --rv-color-info-rgb: 56 189 248;
  --rv-color-on-danger: #1A1310;

  --rv-shadow-1: 0 1px 2px rgb(0 0 0 / 0.30), 0 1px 3px rgb(0 0 0 / 0.24);
  --rv-shadow-2: 0 4px 12px -2px rgb(0 0 0 / 0.40), 0 2px 4px -2px rgb(0 0 0 / 0.30);
  --rv-shadow-3: 0 16px 40px -12px rgb(0 0 0 / 0.60), 0 4px 12px -4px rgb(0 0 0 / 0.40);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --rv-duration-fast: 0ms;
    --rv-duration-base: 0ms;
  }
}
