/*
 * ALFRESCO CAKES - DESIGN TOKENS (UI/UX Bible §8, §9, §10, §52)
 *
 * This is the ONLY place raw colour, type, spacing, radius, shadow, motion and z-index values may be
 * defined. Components reference var(--token) and never hard-code a hex value or one-off pixel value.
 *
 * !! PROVISIONAL VALUES !!  The UI/UX Bible marks exact brand colours and the typeface DECISION REQUIRED
 * (DR-UX-COLOR, DR-UX-FONT) pending the supplied logo/brand assets. The colours below are deliberately
 * NEUTRAL placeholders (they are not the Alfresco palette) chosen only to meet the Bible's contrast rules
 * (text >= 4.5:1, borders >= 3:1). Swapping in the real palette means editing this file only.
 * Dark mode is not a V1 commitment [DR-UX-DARK]; the semantic names below are dark-mode ready.
 */
:root {
  /* ---- Colour (semantic roles, UI/UX §8) ---- */
  --color-primary: #1b1512;
  --color-primary-dark: #0f0b09;
  --color-primary-light: #3a302b;
  --color-on-primary: #ffffff;
  --color-secondary: #5a4d44;
  --color-accent: #f0b4ab;              /* soft pink: buttons on dark sections, rare highlight */
  --color-on-accent: #1b1512;
  --color-background: #fbf7f2;
  --color-surface: #f3ece3;
  --color-surface-elevated: #ffffff;
  --color-text-primary: #1b1512;
  --color-text-secondary: #5a4d44;
  --color-text-muted: #6c5f55;
  --color-border: #8a7d72;
  --color-border-subtle: #e2d8cc;
  --color-disabled: #9c9086;
  --color-focus: #b0446b;
  --color-link: #9a2f58; /* link colour in running text (provisional with the palette); 6:1 on the page background */
  /* Status colours are reserved for genuine system state, never decoration. */
  /* Dark hero / header surfaces (owner reference image, 2026-10-21). Provisional until the owner confirms the brand palette (DR-RC-100). */
  --color-hero: #17120f;
  --color-on-hero: #fbf7f2;
  --color-on-hero-muted: #d9cfc4;

  --color-success: #1b6e3a;
  --color-warning: #8a5300;
  --color-error: #b3261e;
  --color-info: #1f5a99;

  /* ---- Typography (UI/UX §9). Family is PROVISIONAL: system stack, no third-party font request. ---- */
  --font-family-primary: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Mobile-first sizes; larger sizes are applied in base.css at >= 900px. */
  --font-size-display: 2.25rem;   /* 36px (32-40 mobile) */
  --font-size-h1: 1.875rem;       /* 30px */
  --font-size-h2: 1.5rem;         /* 24px */
  --font-size-h3: 1.125rem;       /* 18px */
  --font-size-h4: 1rem;           /* 16px */
  --font-size-body-lg: 1rem;
  --font-size-body: 0.9375rem;    /* 15px mobile */
  --font-size-body-sm: 0.875rem;  /* 14px */
  --font-size-caption: 0.8125rem; /* 13px */
  --font-size-button: 0.9375rem;

  --line-height-display: 1.08;
  --line-height-heading: 1.2;
  --line-height-body: 1.55;
  --line-height-tight: 1.3;
  --letter-spacing-tight: -0.01em;
  --letter-spacing-wide: 0.04em;

  /* ---- Spacing scale, 4px base, nothing else allowed (UI/UX §10) ---- */
  --space-1: 0.25rem;   /* 4   */
  --space-2: 0.5rem;    /* 8   */
  --space-3: 0.75rem;   /* 12  */
  --space-4: 1rem;      /* 16  */
  --space-6: 1.5rem;    /* 24  */
  --space-8: 2rem;      /* 32  */
  --space-12: 3rem;     /* 48  */
  --space-16: 4rem;     /* 64  */
  --space-24: 6rem;     /* 96  */
  --space-32: 8rem;     /* 128 */

  /* ---- Layout (UI/UX §10). Breakpoints documented here; CSS custom properties cannot be used
         inside @media, so base.css repeats: 600 / 900 / 1200 / 1440 px. ---- */
  --page-margin: 1.25rem;          /* 20px mobile; 16px on <375 handled in base.css */
  --gutter: 0.75rem;
  --content-max-width: 90rem;      /* 1440px */
  --measure: 65ch;

  /* ---- Shape (restrained; UI/UX §93) ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;            /* pills and round buttons */
  --border-width-hairline: 1px;
  --border-color-default: var(--color-border-subtle);

  /* ---- Elevation: 0-3 mapped to shadows, used sparingly ---- */
  --shadow-sm: 0 1px 2px rgb(20 20 20 / 0.08);
  --shadow-md: 0 4px 12px rgb(20 20 20 / 0.12);
  --shadow-lg: 0 12px 32px rgb(20 20 20 / 0.16);

  /* ---- Motion (UI/UX §44). Zeroed under prefers-reduced-motion in base.css. ---- */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --easing-decelerate: cubic-bezier(0, 0, 0, 1);

  /* ---- Z-index scale ---- */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* ---- Component sizing ---- */
  --size-tap-min: 2.75rem;         /* 44px minimum touch target */
  --size-input-height: 2.75rem;
  --size-button-height-sm: 2.25rem;
  --size-button-height-md: 2.75rem;
  --size-button-height-lg: 3.25rem;
  --size-icon-sm: 1rem;
  --size-icon-md: 1.25rem;
  --size-icon-lg: 1.5rem;

  /* ---- Structural sizes (layout columns, field widths). Raw values live here only. ---- */
  --size-sidebar: 15rem;
  --size-tabbar: 4rem;
  --size-summary: 24rem;           /* cart / checkout order-summary column */
  --size-form-max: 36rem;
  --size-field-xs: 4.5rem;
  --size-field-sm: 5rem;
  --size-field-md: 6rem;
  --size-field-lg: 7rem;
  --size-thumb: 12rem;
  --size-tile-min: 10rem;
  --size-hero-min: 34rem;
  --size-hero-visual-min: 28rem;
  --size-filter-field: 12rem;
  --size-search: 16rem;
  --size-logo-header: 2.75rem;
  --size-label-col: 6.5rem;          /* label column when tables stack into cards on phones */
  --aspect-product: 4 / 5;         /* UI/UX §46: one small, consistent set of ratios */
  --aspect-hero: 4 / 5;
  --aspect-tile: 3 / 2;
  --aspect-category: 1 / 1;
  --aspect-hero-mobile: 5 / 4;
  --aspect-strip: 16 / 7;
  --size-promo: 32rem;             /* pop-up promotion width */
  --size-category-min: 9.5rem;     /* smallest category card before the grid drops a column */
  --size-hero-visual-max: 36rem;
  --size-search-mobile-gap: 0.5rem;
  --shadow-photo: 0 18px 40px rgb(0 0 0 / 0.35);
}

/*
 * Staff surfaces (admin / POS / kitchen / finance) use a denser language than the expressive customer
 * site (master prompt §61). Only density changes; the colour/type tokens stay shared.
 */
[data-surface="staff"] {
  --font-size-body: 0.875rem;
  --font-size-body-lg: 0.9375rem;
  --page-margin: 1rem;
  --size-input-height: 2.5rem;
  --size-button-height-md: 2.5rem;
}
