/*
 * BitStepX design tokens. Every color value of the theme lives in this file and nowhere else:
 * other CSS, PHP, HTML and theme.json use the variable names only.
 *
 * Two blocks. The first is the default and it is dark: a page without the data-theme
 * attribute (first visit, scripts off, storage blocked) is dark. The visitor's device color
 * setting is never read. The second block holds the light values, used only when the visitor
 * picked light with the header switch (saved in localStorage "bsx-theme").
 *
 * Sizes, spacing, radius, line height, letter spacing, weight and motion are copied by name and
 * value from Documents/code/design-tokens.css. Text sizes are floors: they grow on wide screens.
 */

:root {
  color-scheme: dark;

  /* Color: dark (default). Charcoal with a little blue, never pure black (2026-11-15 decision).
     Values, reasons and contrast: docs/design-research/2026-11-15-dark-theme.md */
  --bg-base: #181A20;
  --bg-box: #202630;
  --bg-pill: #29313D;
  --bg-pill-hover: #333B47;
  --border: #333B47;
  --border-strong: #434C5A;
  --text-strong: #EAECEF;
  --text-body: #D5D9DF;
  --text-muted: #9BA3AE;
  --link: #5B9CF6;
  --price-up: #2ABCA2;
  --price-down: #FA6E79;
  --btn-bg: #FFFFFF;
  --btn-text: #181A20;
  /* Edge of the outlined buttons (comparison table, side card, header button on exchange screens).
     4.01:1 on the page, 3.50:1 on a box (WCAG 1.4.11 asks 3:1). */
  --control-border: #707A8A;
  /* Sign-up buttons (referral links): green fill so they stand out on every screen (2026-11-22 user decision).
     Dark text on #2ABCA2 is 7.3:1. */
  --signup-bg: #2ABCA2;
  --signup-text: #181A20;
  /* Share buttons (bitstepx/share): each network in its own color so readers know it at a glance
     (2026-11-28 user decision, an exception to "three color families a screen" for this card only).
     The official colors darkened just enough for white text at 4.5:1. Same in both themes; X uses
     --btn-bg / --btn-text. */
  --brand-facebook: #0D6FED;
  --brand-whatsapp: #178540;
  --brand-telegram: #167CAF;
  --brand-reddit: #D63A00;
  --brand-text: #FFFFFF;

  /* Font */
  --font-sans: "Pretendard Std Variable", "Pretendard Std", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;

  /* Text size: 15px is the floor, body is --text-base */
  --text-xs: clamp(15px, 0.63vw + 7px, 19px);
  --text-sm: clamp(16px, 0.78vw + 6px, 21px);
  --text-base: clamp(18px, 0.94vw + 6px, 24px);
  --text-md: clamp(20px, 0.94vw + 8px, 26px);
  --text-lg: clamp(22px, 1.09vw + 8px, 29px);
  --text-xl: clamp(26px, 1.25vw + 10px, 34px);
  --text-2xl: clamp(32px, 1.56vw + 12px, 42px);
  --text-3xl: clamp(42px, 2.19vw + 14px, 56px);

  /* Line height */
  --leading-display: 1.25;
  --leading-tight: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Letter spacing: tight from --text-lg up */
  --tracking-tight: -0.02em;
  --tracking-normal: -0.01em;

  /* Weight */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --weight-heavy: 800;

  /* Spacing: 4px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 120ms;
  --duration: 180ms;

  /* Layout */
  --measure: 42em;
  --container: 1240px;
}

:root[data-theme="light"] {
  color-scheme: light;

  /* Color: light (chosen with the header switch) */
  --bg-base: #FCFBF9;
  --bg-box: #F4F5F8;
  --bg-pill: #F4F5F8;
  --bg-pill-hover: #E5E8EB;
  --border: #E5E8EB;
  --border-strong: #D1D6DB;
  --text-strong: #1A1C20;
  --text-body: #333840;
  --text-muted: #4E5968;
  --link: #2962FF;
  --price-up: #06806B;
  --price-down: #CC2F3C;
  --btn-bg: #1A1C20;
  --btn-text: #FFFFFF;
  /* Edge of every control a visitor presses or types in: the outlined buttons, and in this theme also
     the tabs, pills, page numbers, round icon buttons and the search field (base.css). 4.46:1 on the
     page, 4.23:1 on a box: the controls stand out from the near-white page (WCAG 1.4.11 asks 3:1). */
  --control-border: #6B7684;
  /* Sign-up buttons: white text on #06806B is 4.9:1; the fill is 4.7:1 on the page and 4.5:1 on a box. */
  --signup-bg: #06806B;
  --signup-text: #FFFFFF;
}
