/* ==========================================================================
   MedVyapar design tokens
   Palette derived from assets/brand/MedVyapar Logo.png (royal blue + leaf green).
   Components must reference these variables only — no raw values.
   ========================================================================== */

:root {
  /* ---- Palette: brand blue ------------------------------------------------ */
  --blue-50: #eef4fe;
  --blue-100: #d9e7fd;
  --blue-200: #b3cefa;
  --blue-300: #7facf5;
  --blue-400: #4a87ec;
  --blue-500: #2a6fe3;
  --blue-600: #1560d6;
  --blue-700: #0f4bb0;
  --blue-800: #0d3c8a;
  --blue-900: #0b2e66;

  /* ---- Palette: leaf green (accent) -------------------------------------- */
  --green-50: #edf8f0;
  --green-100: #d3efdb;
  --green-200: #a9dfb8;
  --green-300: #72c98a;
  --green-400: #4bb86a;
  --green-500: #2fa84f;
  --green-600: #258a40;
  --green-700: #1e7a38;   /* text-safe green on white (AA) */
  --green-800: #17602c;

  /* ---- Palette: navy (dark bands, footer) ------------------------------- */
  --navy-700: #13305f;
  --navy-800: #0b1e3f;
  --navy-900: #08152b;

  /* ---- Palette: cool gray ------------------------------------------------ */
  --gray-0: #ffffff;
  --gray-50: #f7f9fc;
  --gray-100: #eef2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #56667c;   /* ≥4.5:1 on white and --blue-50 */
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* ---- Palette: support -------------------------------------------------- */
  --amber-50: #fef6e7;
  --amber-400: #f5b83d;
  --amber-600: #b7791f;
  --red-50: #fdecec;
  --red-600: #d23c3c;

  /* ---- Semantic colours -------------------------------------------------- */
  --color-primary: var(--blue-600);
  --color-primary-hover: var(--blue-700);
  --color-primary-soft: var(--blue-50);
  --color-accent: var(--green-500);
  --color-accent-strong: var(--green-700);
  --color-accent-soft: var(--green-50);

  --color-text: var(--gray-900);
  --color-text-muted: var(--gray-600);
  --color-text-subtle: var(--gray-500);
  --color-heading: var(--gray-900);
  --color-link: var(--blue-700);

  --color-bg: var(--gray-0);
  --color-bg-alt: var(--gray-50);
  --color-bg-tint: var(--blue-50);
  --color-surface: var(--gray-0);
  --color-border: var(--gray-200);
  --color-border-strong: var(--gray-300);

  --color-dark: var(--navy-800);
  --color-dark-deep: var(--navy-900);
  --color-on-dark: var(--gray-0);
  --color-on-dark-muted: var(--gray-300);
  --color-on-primary: var(--gray-0);

  --color-success: var(--green-700);
  --color-warning: var(--amber-600);
  --color-danger: var(--red-600);
  --color-focus: var(--blue-500);
  --color-overlay: rgb(8 21 43 / 0.6);

  /* Brand gradient (hero accents, highlight word) */
  --gradient-brand: linear-gradient(90deg, var(--blue-600) 0%, var(--green-500) 100%);
  --gradient-tint: linear-gradient(135deg, var(--blue-50) 0%, var(--green-50) 100%);
  --gradient-dark: linear-gradient(135deg, var(--navy-800) 0%, var(--blue-800) 100%);

  /* ---- Typography -------------------------------------------------------- */
  --font-sans: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Fluid scale: min @ 390px → max @ 1440px */
  --fs-xs: 0.75rem;                                        /* 12 */
  --fs-sm: 0.875rem;                                       /* 14 */
  --fs-base: 1rem;                                         /* 16 */
  --fs-md: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);         /* 16–18 */
  --fs-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);      /* 18–20 */
  --fs-xl: clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);        /* 20–24 */
  --fs-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);           /* 24–32 */
  --fs-3xl: clamp(1.75rem, 1.45rem + 1.25vw, 2.5rem);      /* 28–40 */
  --fs-4xl: clamp(2rem, 1.6rem + 1.7vw, 3rem);             /* 32–48 */
  --fs-5xl: clamp(2.5rem, 1.9rem + 2.5vw, 4rem);           /* 40–64 */

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.55;
  --lh-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.08em;

  --measure: 65ch;       /* max line length for body copy */
  --measure-narrow: 45ch;

  /* ---- Spacing (4px base) ------------------------------------------------ */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.25rem;   /* 20 */
  --space-6: 1.5rem;    /* 24 */
  --space-8: 2rem;      /* 32 */
  --space-10: 2.5rem;   /* 40 */
  --space-12: 3rem;     /* 48 */
  --space-16: 4rem;     /* 64 */
  --space-20: 5rem;     /* 80 */
  --space-24: 6rem;     /* 96 */
  --space-32: 8rem;     /* 128 */

  /* Section rhythm (desktop 60 / 80 / 120) */
  --section-sm: clamp(2.5rem, 1.8rem + 2.5vw, 3.75rem);
  --section-md: clamp(3rem, 2rem + 3.5vw, 5rem);
  --section-lg: clamp(4rem, 2.5rem + 5.5vw, 7.5rem);

  /* Layout */
  --container-max: 75rem;        /* 1200 */
  --container-narrow: 50rem;     /* 800 */
  --gutter: 1rem;                /* 16 */
  --header-height: 4.5rem;       /* 72 */

  /* ---- Radii ------------------------------------------------------------- */
  --radius-xs: 0.25rem;   /* 4 */
  --radius-sm: 0.5rem;    /* 8 */
  --radius-md: 0.75rem;   /* 12 */
  --radius-lg: 1.25rem;   /* 20 */
  --radius-xl: 1.75rem;   /* 28 */
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* ---- Borders ----------------------------------------------------------- */
  --border-width: 1px;
  --border-width-thick: 2px;

  /* ---- Shadows ----------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-sm: 0 2px 8px rgb(15 23 42 / 0.06);
  --shadow-md: 0 8px 24px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 20px 48px rgb(15 23 42 / 0.12);
  --shadow-header: 0 8px 24px rgb(11 30 63 / 0.08);
  --shadow-focus: 0 0 0 3px rgb(42 111 227 / 0.35);
  --shadow-ring-accent: 0 0 0 0.75rem rgb(47 168 79 / 0.25);

  /* ---- Sizes ------------------------------------------------------------- */
  --icon-sm: 1rem;
  --icon-md: 1.5rem;
  --icon-lg: 2.5rem;
  --icon-xl: 3.5rem;
  --tap-target: 2.75rem;   /* 44px min touch target */

  /* Component sizing */
  --card-min-sm: 14rem;
  --card-min: 16rem;
  --card-min-lg: 20rem;
  --drawer-width: 24rem;
  --megamenu-w-1: 22.5rem;
  --megamenu-w-2: 50rem;
  --megamenu-w-3: 72rem;
  --sidebar-width: 16rem;
  --compare-label-width: 16rem;
  --dialog-width: 56rem;
  --scroll-box-height: 36rem;
  --logo-height: 2.25rem;

  /* ---- Motion ------------------------------------------------------------ */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
  --dur-marquee: 40s;

  /* ---- Layers ------------------------------------------------------------ */
  --z-base: 1;
  --z-dropdown: 50;
  --z-header: 100;
  --z-float: 150;
  --z-drawer: 200;
  --z-modal: 300;

  /* ---- Breakpoints (reference only — @media needs literal values) --------
     sm 576px · md 768px · lg 992px · xl 1200px (header nav expands)              */
  --bp-sm: 576px;
  --bp-md: 768px;
  --bp-lg: 992px;
  --bp-xl: 1200px;
}
