/* variables.css — design tokens (single source of truth)
   Change these to retheme the entire app. */

:root {
  /* ---- Color palette (light theme) ---- */
  --color-primary: #570d48; /* Meesho brand purple (matches the logo) */
  --color-primary-hover: #3d0933;
  --color-primary-soft: #fbe7f5;

  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;

  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;

  --color-border: #e2e8f0;
  --color-danger: #dc2626;
  --color-success: #16a34a;

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

  /* Fluid type: scales smoothly between small phones and tablets */
  --fs-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --fs-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --fs-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* ---- Spacing scale (4px base) ---- */
  --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;

  /* ---- Radii ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);

  /* ---- Layout ---- */
  --bar-height: 56px;        /* top app bar (header row 1) */
  --subbar-height: 52px;     /* header category row (44px chip + 8px) */
  --bottom-nav-height: 60px; /* bottom navigation */
  --container-max: 1100px;
  --content-max: 640px;      /* reading column width */

  /* ---- Safe areas (notch / home indicator) ---- */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* ---- Motion ---- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* ---- Breakpoints (reference only; used in responsive.css) ----
     sm: 480px  |  md: 768px  |  lg: 1024px  */

  --z-header: 100;
  --z-nav: 100;
  --z-overlay: 200;
}

/* ---- Dark theme (opt-in via <html data-theme="dark">) ---- */
[data-theme="dark"] {
  --color-primary: #ff7bc3; /* Meesho pink - readable on the dark surface */
  --color-primary-hover: #ffa8d6;
  --color-primary-soft: #3f1030;

  --color-bg: #0b1120;
  --color-surface: #111827;
  --color-surface-alt: #1f2937;

  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #0f172a;

  --color-border: #1f2937;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.55);
}