/* ==========================================================================
   Global Business Square — Design tokens v0.1  ("Nocturne Monograph", A+B hybrid)
   Mobile-first: every value below is the PHONE value. Larger screens scale up
   via clamp() or min-width media queries — never the other way round.
   These variables are the single source for the CMS theme.
   ========================================================================== */
:root {
  /* ---------- Primitive colours ---------- */
  --ink-950: #08090d;   /* page background (night) */
  --ink-900: #0e121b;
  --ink-800: #141b29;   /* raised surfaces */
  --ink-700: #1f2636;
  --ink-600: #2c3446;
  --ink-400: #5d6270;
  --ink-300: #8b909c;   /* muted text on night */
  --ink-200: #bdb9b0;
  --ink-100: #d8d4cb;

  --gold-700: #8f7444;
  --gold-500: #c9a96e;  /* brand accent */
  --gold-300: #e6cf9f;  /* accent text on night */
  --gold-100: #f5ead4;

  --paper-50:  #faf8f3;
  --paper-100: #f3efe7; /* text on night / page on paper */
  --paper-200: #e9e3d7;
  --paper-300: #d4ccbd; /* hairlines on paper */
  --graphite:  #191919; /* text on paper */
  --terracotta-600: #9a4423;
  --terracotta-500: #b4532a; /* accent on paper (from B) */

  /* Logo colours — for the logo, data visualisation and tiny highlights only */
  --logo-indigo: #3b4192;
  --logo-magenta: #a43282;
  --logo-pink: #e22a72;
  --logo-orange: #f2822f;
  --logo-red: #e2303a;

  --success-500: #5fae7e;
  --warning-500: #e0a84a;
  --danger-500: #e2614f;

  /* ---------- Semantic colours: NIGHT (default theme) ---------- */
  --bg: var(--ink-950);
  --bg-elevated: var(--ink-900);
  --surface: var(--ink-800);
  --surface-glass: rgba(10, 13, 20, .72);
  --text: var(--paper-100);
  --text-muted: var(--ink-300);
  --text-soft: var(--ink-200);
  --accent: var(--gold-500);
  --accent-text: var(--gold-300);
  --on-accent: var(--ink-950);
  --border: rgba(201, 169, 110, .24);
  --border-subtle: rgba(243, 239, 231, .10);
  --focus: var(--gold-300);

  /* ---------- Typography ---------- */
  --font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Fluid scale: min = phone (375px), max = desktop (1440px) */
  --fs-display: clamp(2.75rem, 0.8134rem + 8.263vw, 8.25rem);  /* 44 → 132 */
  --fs-h1:      clamp(2.25rem, 1.1056rem + 4.883vw, 5.5rem);   /* 36 → 88 */
  --fs-h2:      clamp(1.875rem, 1.1268rem + 3.192vw, 4rem);    /* 30 → 64 */
  --fs-h3:      clamp(1.5rem, 1.2359rem + 1.127vw, 2.25rem);  /* 24 → 36 */
  --fs-h4:      clamp(1.25rem, 1.1620rem + 0.376vw, 1.5rem);  /* 20 → 24 */
  --fs-lead:    clamp(1.0625rem, 0.9965rem + 0.282vw, 1.25rem);   /* 17 → 20 */
  --fs-body:    1rem;                                      /* 16 */
  --fs-small:   .875rem;                                   /* 14 */
  --fs-caption: .75rem;                                    /* 12 */
  --fs-eyebrow: .6875rem;                                  /* 11, caps */

  --lh-tight: .95;
  --lh-heading: 1.05;
  --lh-body: 1.65;
  --tracking-display: -.02em;
  --tracking-eyebrow: .3em;
  --tracking-button: .2em;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* ---------- Space (4-pt base) ---------- */
  --space-1: .25rem;  /* 4 */
  --space-2: .5rem;   /* 8 */
  --space-3: .75rem;  /* 12 */
  --space-4: 1rem;    /* 16 */
  --space-5: 1.5rem;  /* 24 */
  --space-6: 2rem;    /* 32 */
  --space-7: 3rem;    /* 48 */
  --space-8: 4rem;    /* 64 */
  --space-9: 6rem;    /* 96 */
  --space-10: 8rem;   /* 128 */
  --section-y: clamp(4rem, 1.8873rem + 9.014vw, 10rem);           /* 64 → 160 */
  --gutter: clamp(1rem, 0.6479rem + 1.502vw, 2rem);                /* 16 → 32 */
  --page-x: clamp(1rem, -0.7606rem + 7.512vw, 6rem);             /* 16 → 96 */
  --content-max: 90rem;                                    /* 1440 */
  --measure: 34rem;                                        /* readable line length */

  /* ---------- Shape, lines, depth ---------- */
  --radius-0: 0;        /* default: sharp, architectural */
  --radius-1: 2px;      /* inputs only */
  --radius-round: 999px;/* avatars, dots */
  --hairline: 1px;
  --blur-glass: 16px;
  --shadow-1: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, .45);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(.16, 1, .3, 1);    /* "expo out" — reveals */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 200ms;
  --dur-base: 400ms;
  --dur-slow: 800ms;
  --dur-cinematic: 1400ms;
  --parallax-near: .25;
  --parallax-far: .1;

  /* ---------- Layers ---------- */
  --z-base: 1;
  --z-sticky: 40;
  --z-nav: 50;
  --z-actionbar: 55;
  --z-overlay: 60;
  --z-modal: 70;

  /* ---------- Touch ---------- */
  --tap-min: 48px;
}

/* PAPER theme — long reading: specifications, price-list form, legal pages */
[data-theme="paper"] {
  --bg: var(--paper-100);
  --bg-elevated: var(--paper-50);
  --surface: #ffffff;
  --surface-glass: rgba(250, 248, 243, .82);
  --text: var(--graphite);
  --text-muted: #6f6a60;
  --text-soft: #4a4741;
  --accent: var(--terracotta-500);
  --accent-text: var(--terracotta-600);
  --on-accent: #ffffff;
  --border: var(--paper-300);
  --border-subtle: rgba(25, 25, 25, .08);
  --focus: var(--terracotta-500);
}

/* Breakpoints (min-width, mobile first) — CSS can't use variables in media queries,
   so these are the agreed values:
   sm 600px  ·  md 900px  ·  lg 1200px  ·  xl 1440px */

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --dur-cinematic: 0ms; --parallax-near: 0; --parallax-far: 0; }
}
