/* ==========================================================================
   HOMEMADE FOOD & TIFFIN MARKETPLACE — THEME.CSS
   Global Design System, Tokens, Color Palettes, Typography & Spacing
   ========================================================================== */

/* --------------------------------------------------------------------------
   Google Fonts Import
   Heading: Cormorant Garamond (Weights: 400, 500, 600, 700; Italic)
   Body / UI: Manrope (Weights: 400, 500, 600, 700, 800)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Manrope:wght@400;500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   Default (Light Mode) Tokens & Global Variables
   Light Mode is the strict system default.
   -------------------------------------------------------------------------- */
:root {
  /* Core Brand Colors (Strict Golden Yellow / Sunflower Palette) */
  --color-bg: #FDFBD5;
  --color-surface: #FFFFFF;
  --color-primary: #E9A413;
  --color-primary-hover: #CD8B09;
  --color-secondary: #FCC724;
  --color-accent: #CD8B09;
  --color-highlight: #FEF36C;
  --color-text: #1C1914;
  --color-text-muted: #696456;
  --color-border: #E8E2B8;
  --color-soft-accent: #FDFEAD;
  --color-soft-green: #FDFEAD;
  --color-soft-red: #FDFBD5;

  /* Functional Status & Feedback Tokens (Golden Yellow Palette) */
  --color-error: #CD8B09;
  --color-error-bg: #FDFEAD;
  --color-error-border: #FCC724;
  --color-warning: #CD8B09;
  --color-warning-bg: #FDFBD5;
  --color-warning-border: #FCC724;
  --color-info: #E9A413;
  --color-info-bg: #FDFBD5;
  --color-info-border: #FEF36C;
  --color-success: #CD8B09;
  --color-success-bg: #FDFEAD;
  --color-success-border: #FCC724;

  /* Typography Fonts */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Typographic Scale (Low/Medium Contrast Ratio for Web & Editorial Balance) */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px - Base Body Font */
  --text-md: 1.125rem;    /* 18px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.25rem;    /* 36px */
  --text-4xl: 2.75rem;    /* 44px */
  --text-5xl: 3.5rem;     /* 56px */
  --text-6xl: 4.25rem;    /* 68px */

  /* Font Weights */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

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

  /* Border Radii Tokens (Subtle & Restrained; Avoid Extreme Rounding) */
  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px; /* Reserved for icon buttons and pills only */

  /* Elevated Shadows */
  --shadow-xs: 0 1px 2px rgba(39, 35, 33, 0.04);
  --shadow-sm: 0 2px 4px rgba(39, 35, 33, 0.05);
  --shadow-md: 0 4px 12px rgba(39, 35, 33, 0.07);
  --shadow-lg: 0 8px 24px rgba(39, 35, 33, 0.09);
  --shadow-xl: 0 16px 40px rgba(39, 35, 33, 0.12);
  --shadow-card-hover: 0 12px 32px rgba(205, 139, 9, 0.16);

  /* Transitions & Easing */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-theme: background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;

  /* Layout Max-Widths & Container Tokens */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-max: 1400px;
  --container-gutter: clamp(1rem, 4vw, 2.5rem);

  /* Z-Index Scale */
  --z-negative: -1;
  --z-normal: 1;
  --z-sticky: 100;
  --z-header: 500;
  --z-dropdown: 600;
  --z-drawer-backdrop: 800;
  --z-drawer: 900;
  --z-modal-backdrop: 1000;
  --z-modal: 1100;
  --z-toast: 1200;

  /* UI Sizing Norms */
  --header-height: 76px;
  --header-height-mobile: 68px;
  --tap-target-min: 44px;
  --icon-button-size: 42px;
  --icon-glyph-size: 18px;
}

/* --------------------------------------------------------------------------
   Dark Mode Theme Overrides
   Activated strictly via html[data-theme="dark"] attribute
   -------------------------------------------------------------------------- */
html[data-theme="dark"] {
  --color-bg: #14130F;
  --color-surface: #1E1C15;
  --color-primary: #E9A413;
  --color-primary-hover: #FCC724;
  --color-secondary: #CD8B09;
  --color-accent: #FCC724;
  --color-highlight: #FEF36C;
  --color-text: #FAF8EE;
  --color-text-muted: #BDB7A4;
  --color-border: #3A3523;
  --color-soft-accent: #2A2415;
  --color-soft-green: #1F2A1E;
  --color-soft-red: #2A1D1D;

  /* Adjusted Feedback Colors for Dark Canvas */
  --color-error: #FCC724;
  --color-error-bg: #2A1D1D;
  --color-error-border: #CD8B09;
  --color-warning: #FEF36C;
  --color-warning-bg: #2A2415;
  --color-warning-border: #CD8B09;
  --color-info: #E9A413;
  --color-info-bg: #1E1C15;
  --color-info-border: #FCC724;
  --color-success: #FCC724;
  --color-success-bg: #1F2A1E;
  --color-success-border: #CD8B09;

  /* Elevated Shadows for Dark Surfaces */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-card-hover: 0 12px 32px rgba(233, 164, 19, 0.2);
}
