/* ==========================================================================
   Zoombask — Design Tokens
   Master Design & Experience Mission, 6 Dec 2026 — ART DIRECTION seat
   Single source of truth for colour, type, spacing, radii, shadows, motion.
   Builders import this file; they do NOT invent new tokens. If a value is
   missing, ask Art Direction — do not add a one-off hex/size in a component.
   ========================================================================== */

:root {
  /* ------------------------------------------------------------------
     Colour — "The Honest Edit"
     Anchor: deep emerald. Warm paper neutrals. Warm near-black ink.
     Brass is a restrained accent only (small highlights, never fills).
     ------------------------------------------------------------------ */

  /* Emerald scale */
  --zb-green-950: #07231A;  /* darkest — footer bg, deep panels */
  --zb-green-900: #0C2E23;  /* primary dark — header on scroll, footer */
  --zb-green-800: #0F3D2E;  /* primary button hover, dark section bg */
  --zb-green-700: #14543F;  /* primary button, links on light bg */
  --zb-green-600: #1B6B4F;  /* primary interactive, focus ring */
  --zb-green-500: #2E7D5B;  /* secondary interactive, success text */
  --zb-green-400: #5A9C7D;  /* decorative only, never body text */
  --zb-green-200: #BFD8C8;  /* tinted borders on green */
  --zb-green-100: #DCE9E0;  /* tint bg — COD badge, info chips */
  --zb-green-50:  #EEF4EF;  /* palest tint — success wash, hover bg */

  /* Warm neutrals */
  --zb-paper:     #FAF7F1;  /* page background */
  --zb-cream:     #F3EEE5;  /* alt section background */
  --zb-card:      #FFFFFF;  /* card / panel surface on paper */
  --zb-line:      #E3DDD2;  /* hairline borders */
  --zb-line-strong: #CFC7B8; /* stronger divider, input borders */

  /* Ink */
  --zb-ink:       #1D1B16;  /* headings, primary text */
  --zb-ink-soft:  #4A463D;  /* body text */
  --zb-muted:     #6F6A5E;  /* secondary text, captions */
  --zb-faint:     #9A9484;  /* placeholder text, disabled labels only */

  /* Restrained accent — brass, used sparingly */
  --zb-brass:     #A97C2F;  /* old-price strike context, small rules, stars n/a */
  --zb-brass-soft:#F0E7D3;  /* brass wash, rare */

  /* Status — always paired with text, never colour alone */
  --zb-danger:    #A93226;  /* errors, out-of-stock text */
  --zb-danger-bg: #F9EDEA;
  --zb-success:   #14543F;  /* = green-700, confirmed states */
  --zb-success-bg:#EEF4EF;  /* = green-50 */
  --zb-warn:      #8A5A12;
  --zb-warn-bg:   #FAF1DE;

  /* On-dark text */
  --zb-on-dark:   #F5F1E8;  /* text on green-900 */
  --zb-on-dark-muted: #B9C4B6;

  /* ------------------------------------------------------------------
     Typography
     Display serif (EN: Fraunces / BN: Noto Serif Bengali) — headlines,
     editorial moments, prices on PDP only.
     Sans (Hind Siliguri — BN + Latin in one face; Inter as EN fallback
     for UI where Hind Siliguri is unavailable) — everything else.
     Fonts are SELF-HOSTED as woff2 (see design-system.md §2.3). Never
     load Google Fonts at runtime on the shop (low-bandwidth audience).
     ------------------------------------------------------------------ */

  --font-display: "Fraunces", "Noto Serif Bengali", Georgia, "Times New Roman", serif;
  --font-sans: "Hind Siliguri", "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Type scale — fluid between 360px and 1200px via clamp() */
  --fs-display: clamp(2.125rem, 6vw + 0.5rem, 3.5rem);   /* 34 → 56, hero only */
  --fs-h1:      clamp(1.75rem, 4vw + 0.5rem, 2.5rem);    /* 28 → 40, page titles */
  --fs-h2:      clamp(1.375rem, 2.5vw + 0.5rem, 1.75rem);/* 22 → 28, section titles */
  --fs-h3:      clamp(1.125rem, 1vw + 0.5rem, 1.25rem);  /* 18 → 20, card/section heads */
  --fs-body:    1rem;                                     /* 16, body */
  --fs-body-sm: 0.9375rem;                                /* 15, dense UI text */
  --fs-small:   0.8125rem;                                /* 13, meta, captions */
  --fs-caption: 0.75rem;                                  /* 12, overlines, legal */

  --lh-display: 1.12;
  --lh-heading: 1.25;
  --lh-body:    1.6;
  --lh-tight:   1.4;

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

  /* Letter spacing — display only; body text is never tracked */
  --ls-overline: 0.14em;   /* uppercase overlines, 12px, semibold */
  --ls-display: -0.01em;

  /* ------------------------------------------------------------------
     Spacing — 4px base. Section rhythm is built from these only.
     ------------------------------------------------------------------ */
  --sp-1:  0.25rem;   /* 4  */
  --sp-2:  0.5rem;    /* 8  */
  --sp-3:  0.75rem;   /* 12 */
  --sp-4:  1rem;      /* 16 */
  --sp-5:  1.5rem;    /* 24 */
  --sp-6:  2rem;      /* 32 */
  --sp-8:  3rem;      /* 48 */
  --sp-10: 4rem;      /* 64 */
  --sp-12: 6rem;      /* 96 */

  /* Section vertical rhythm */
  --section-gap: clamp(3rem, 8vw, 6rem);
  --section-gap-sm: clamp(2rem, 5vw, 3rem);

  /* Layout */
  --max-width: 76rem;        /* 1216px content max */
  --max-width-narrow: 44rem; /* 704px reading column (PDP text, info pages) */
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-height: 4rem;     /* 64px desktop; 3.5rem mobile (see media query) */

  /* ------------------------------------------------------------------
     Radii — restrained. Editorial surfaces are near-square; only small
     controls and chips are soft. No large rounded cards anywhere.
     ------------------------------------------------------------------ */
  --r-none: 0;
  --r-sm: 2px;    /* images, panels, inputs */
  --r-md: 6px;    /* buttons, small cards */
  --r-lg: 10px;   /* drawer, modal — the maximum radius in the system */
  --r-pill: 999px;/* chips, badges, quantity stepper */

  /* ------------------------------------------------------------------
     Borders & shadows — hairlines do the work, not shadows.
     Only ONE shadow level exists for floating layers.
     ------------------------------------------------------------------ */
  --border: 1px solid var(--zb-line);
  --border-strong: 1px solid var(--zb-line-strong);
  --border-dark: 1px solid var(--zb-green-900);

  --sh-float: 0 8px 32px rgb(29 27 22 / 0.14);  /* drawer, modal, search overlay panel */
  --sh-lift: 0 2px 8px rgb(29 27 22 / 0.08);    /* hover lift on product card image only */
  --sh-none: none;

  /* ------------------------------------------------------------------
     Motion — see motion-spec.md for the rules. Tokens only here.
     ------------------------------------------------------------------ */
  --dur-instant: 100ms;
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-slow: 360ms;
  --dur-page: 480ms;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);      /* entrances, drawers */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);   /* state changes */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);           /* exits only */
  --ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1);  /* micro: qty stepper, toggles */

  /* ------------------------------------------------------------------
     Z-index scale
     ------------------------------------------------------------------ */
  --z-header: 50;
  --z-drawer: 80;
  --z-overlay: 70;
  --z-search: 90;
  --z-toast: 100;
  --z-modal: 110;
}

/* Mobile header height */
@media (max-width: 767px) {
  :root {
    --header-height: 3.5rem; /* 56px */
    --section-gap: clamp(2.5rem, 10vw, 3.5rem);
  }
}

/* Reduced motion — the motion system honours this everywhere (motion-spec.md §7) */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 0ms;
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --dur-page: 0ms;
  }
}
