/* ==========================================================================
   AuraFit — Design Tokens
   Soft-UI / Neumorphic double-shadow system.
   Every elevation is expressed as a *pair* of shadows (light source top-left):
     - a dark shadow cast away from the light
     - a light "highlight" cast toward the light
   Flipping --shadow-dark / --shadow-light per theme is what keeps the same
   shadow recipes working in both light and dark mode.
   ========================================================================== */

:root {
  /* ---- Surface & background ---- */
  --bg: #e0e5ec;
  --surface: #e0e5ec;
  --surface-raised: #e6ebf2;

  /* ---- Shadow pair (the core neumorphic ingredient) ---- */
  --shadow-dark: #a3b1c6;
  --shadow-light: #ffffff;

  /* ---- Text ---- */
  --text-primary: #2f3548;
  --text-secondary: #6b7488;
  --text-muted: #99a2b5;
  --text-on-accent: #ffffff;

  /* ---- Brand / accent ---- */
  --accent: #6c5ce7;
  --accent-strong: #5a48d6;
  --accent-soft: #efe9ff;
  --accent-2: #00c2a8;
  --accent-2-soft: #dffaf5;
  --rose: #ff6b81;
  --rose-soft: #ffe3e8;
  --amber: #ffb84d;
  --amber-soft: #fff2df;
  --success: #2ecc71;
  --danger: #ff5c5c;

  --gradient-accent: linear-gradient(135deg, #7c6bf0 0%, #6c5ce7 55%, #5a48d6 100%);
  --gradient-teal: linear-gradient(135deg, #21d8bd 0%, #00c2a8 100%);

  /* ---- Radii ---- */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---- Elevation: raised (extruded) shadows ---- */
  --sh-raised-xs: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  --sh-raised-sm: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  --sh-raised-md: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  --sh-raised-lg: 13px 13px 26px var(--shadow-dark), -13px -13px 26px var(--shadow-light);

  /* ---- Elevation: inset (recessed) shadows ---- */
  --sh-inset-sm: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
  --sh-inset-md: inset 4px 4px 9px var(--shadow-dark), inset -4px -4px 9px var(--shadow-light);
  --sh-inset-lg: inset 7px 7px 14px var(--shadow-dark), inset -7px -7px 14px var(--shadow-light);

  /* ---- Pressed / active state (deep inset, used on click) ---- */
  --sh-pressed: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light);

  /* ---- Focus ring (accessibility, independent of soft-UI shadows) ---- */
  --focus-ring: 0 0 0 3px rgba(108, 92, 231, 0.45);

  /* ---- Motion ---- */
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur-med: 260ms;
  --dur-slow: 480ms;

  /* ---- Type ---- */
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Manrope', system-ui, sans-serif;

  color-scheme: light;
}

/* ==========================================================================
   Dark theme — same shadow *formulas*, inverted light-source pair so every
   component (cards, buttons, inputs, sliders) stays correct automatically.
   ========================================================================== */
:root[data-theme='dark'] {
  --bg: #262b38;
  --surface: #262b38;
  --surface-raised: #2b3140;

  --shadow-dark: #1b1f29;
  --shadow-light: #333a4b;

  --text-primary: #eef1fb;
  --text-secondary: #a7aec4;
  --text-muted: #757e97;

  --accent-soft: #33305a;
  --accent-2-soft: #163934;
  --rose-soft: #402530;
  --amber-soft: #3d3222;

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']):not([data-theme='dark']) {
    --bg: #262b38;
    --surface: #262b38;
    --surface-raised: #2b3140;
    --shadow-dark: #1b1f29;
    --shadow-light: #333a4b;
    --text-primary: #eef1fb;
    --text-secondary: #a7aec4;
    --text-muted: #757e97;
    --accent-soft: #33305a;
    --accent-2-soft: #163934;
    --rose-soft: #402530;
    --amber-soft: #3d3222;
    color-scheme: dark;
  }
}
