/* RSG design tokens — single source of truth for the redesigned storefront.
   Loaded before every other stylesheet; no layout rules belong here. */

:root {
  color-scheme: light dark;

  /* Brand — the blue taken from the Shengguang logo. */
  --brand: #0a63c4;
  --brand-hover: #0b58ad;
  --brand-strong: #084a95;
  --brand-tint: rgba(10, 99, 196, 0.08);
  --brand-ring: rgba(10, 99, 196, 0.32);

  /* Surfaces */
  --canvas: #fbfbfd;
  --surface: #ffffff;
  --surface-muted: #f5f5f7;
  --surface-sunken: #f0f0f2;
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;

  /* Ink */
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --ink-muted: #6e6e73;
  --ink-faint: #86868b;
  --on-dark: #f5f5f7;
  --on-dark-muted: rgba(245, 245, 247, 0.72);
  --on-dark-faint: rgba(245, 245, 247, 0.45);

  /* Page header band on subpages and the catalog: a pale brand-blue mist
     instead of black, so the header sits comfortably with the white page. */
  --hero-mist: #eef3f9;
  --hero-mist-edge: #e2eaf4;

  /* Inverted (product showcase) */
  --canvas-dark: #08080a;
  --surface-dark: #101012;

  /* Type */
  --font-sans: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-lg: 1.1875rem;
  --text-xl: clamp(1.375rem, 1.05rem + 1.1vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --text-3xl: clamp(2.25rem, 1.3rem + 3.4vw, 4rem);
  --text-display: clamp(2.75rem, 1.1rem + 6.2vw, 6rem);
  --text-mega: clamp(3.25rem, 1rem + 8vw, 7.5rem);

  --leading-tight: 1.06;
  --leading-snug: 1.24;
  --leading-body: 1.6;
  --tracking-hero: -0.035em;
  --tracking-title: -0.022em;
  --tracking-label: 0.14em;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --section-y: clamp(72px, 9vw, 144px);
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1180px;
  --measure-wide: 1440px;

  /* Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 18px 60px rgba(0, 0, 0, 0.12);
  --shadow-brand: 0 10px 30px rgba(10, 99, 196, 0.24);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --dur-fast: 160ms;
  --dur-base: 260ms;
  --dur-slow: 520ms;

  /* Chrome */
  --topbar-h: 56px;
  --blur: saturate(180%) blur(20px);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Only the inverted bands and form clients rely on these today; the light
       storefront stays light so the catalog photography keeps its white ground. */
    --shadow-lg: 0 18px 60px rgba(0, 0, 0, 0.5);
  }
}
