/*
 * Design tokens: "Tự nhiên cao cấp" (natural premium). Warm cream, taupe brown (primary), earthy brown accent.
 * Single source of truth for colour, type, spacing, shape and motion. Rebrand by editing this file.
 * Text pairs are WCAG 2.1 AA (checked: text, text-muted, primary, accent on bg/surface/sand;
 * on-dark/on-dark-muted on forest). Borders used for form controls (border-strong) are >= 3:1.
 */
:root {
  /* Neutrals: cream paper + sand */
  --color-bg: #f7f2e9;
  --color-surface: #fffdf9;
  --color-surface-muted: #efe7d9;
  --color-sand: #e7dcc8;
  /* Deep cocoa text in the taupe family, clearly brown rather than black (10:1 on bg, 8.3:1 on sand);
     muted 6.3:1 on bg, 5.2:1 on sand. */
  --color-text: #47382e;
  --color-text-muted: #665649;
  --color-border: #e0d6c4;
  --color-border-strong: #8f8670;

  /* Taupe brown (primary): ONE colour for buttons, links, prices, icons and selected states.
     Hue of #937662, darkened (hsl 24 20% 40%) so it passes AA both as text on cream (5.1:1 on bg)
     and under white button text (5.6:1). Rebrand the whole site by changing these three. */
  --color-primary: #7a6252;
  --color-primary-hover: #5c493d;
  --color-primary-soft: #eee7e2;
  --color-on-primary: #fffdf9;

  /* Buttons follow the primary colour (main, secondary, round icon buttons, header cart, floating call). */
  --button-bg: var(--color-primary);
  --button-bg-hover: var(--color-primary-hover);
  --button-text: var(--color-on-primary);
  /* Secondary buttons follow the main colour; point these elsewhere to split them again. */
  --button-secondary-bg: var(--button-bg);
  --button-secondary-border: var(--button-bg);
  --button-secondary-text: var(--button-text);
  --button-secondary-hover-bg: var(--button-bg-hover);
  --button-secondary-hover-text: var(--button-text);

  /* Prices (cards, product page, variations): red to catch the eye, darkened from #eb1f3a to pass AA (5:1 on white). */
  --color-price: #d81b33;

  /* Earthy brown + honey (accents) */
  --color-accent: #8a5530;
  --color-accent-soft: #f2e5d3;
  --color-honey: #c98f3d; /* decorative only (no text) */

  /* Dark band (footer, story strip) */
  --color-forest: var(--color-primary-hover); /* dark band = deeper taupe, same family as the buttons */
  --color-on-dark: #f3ecdf;
  --color-on-dark-muted: #cbbfb2;

  /* Feedback */
  --color-success-bg: #e5ecdf;
  --color-success-text: #234a32;
  --color-info-bg: #f6ead6;
  --color-info-text: #6a4413;
  --color-error-bg: #f8e4df;
  --color-error-text: #8c2f1f;

  --color-focus: var(--color-primary);

  /* Typography: one sans family (Be Vietnam Pro, built for Vietnamese) for headings and body */
  --font-heading: var(--font-sans);
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.8125rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: clamp(1.25rem, 1.18rem + 0.3vw, 1.4rem);
  --font-size-2xl: clamp(1.6rem, 1.35rem + 1.1vw, 2.25rem);
  --font-size-3xl: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --font-size-display: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  /* Vietnamese stacks diacritics (ự, ẩ): keep heading leading >= 1.15 */
  --line-height-tight: 1.18;
  --line-height-snug: 1.35;
  --line-height-base: 1.65;
  --letter-spacing-heading: -0.025em;
  --letter-spacing-caps: 0.14em;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4.5rem, 3rem + 6vw, 8rem);

  /* Shape & depth (warm-tinted shadows) */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(46 36 29 / 0.06);
  --shadow-md: 0 18px 40px -22px rgb(58 44 35 / 0.35);
  --shadow-lg: 0 30px 60px -30px rgb(58 44 35 / 0.45);

  /* Layout */
  --container-max: 1200px;
  --container-gutter: clamp(1rem, 4vw, 2.5rem);
  --header-height: 4.5rem;
  --header-offset: var(--header-height); /* whole sticky header; taller with the category bar */
  --control-height: 2.75rem; /* >= 44px touch target */
  --control-height-lg: 3.25rem;

  /* Motion (disabled under prefers-reduced-motion in base.css) */
  --ease-out: cubic-bezier(0.22, 0.7, 0.2, 1);
  --transition-fast: 160ms ease;
  --transition-base: 320ms var(--ease-out);
  --duration-reveal: 700ms;
}
