/* ==========================================================================
   Chulink Holdings — Design Tokens (Portal + Web) v1.1 · 20/11/2026 (shared Portal + public site)
   Brand core values from the official guideline (13/11/2026):
     RED #AC1E23 · BLACK #040707 · WHITE #FFFFFF · ratio 60 black / 30 white / 10 red
     Gradient #040707 → #AC1E23 (large graphics only) · Font Unbounded 400/500/700
   Everything marked "derived" is a UI extension proposed by design (not in the guideline).
   ========================================================================== */
:root {
  /* ---- Brand core (official) ---- */
  --cl-red: #AC1E23;
  --cl-black: #040707;
  --cl-white: #FFFFFF;
  --cl-gradient-brand: linear-gradient(135deg, #040707 0%, #AC1E23 100%);

  /* ---- Red scale (derived, for UI states) ---- */
  --cl-red-hover: #C2252B;      /* button hover */
  --cl-red-press: #8E171C;      /* button active */
  --cl-red-text: #E5484D;       /* red text/icons on dark bg (AA 5.1:1 on #040707). Brand red itself is 2.8:1 → fills only */
  --cl-red-soft: rgba(172, 30, 35, 0.14);   /* tinted chips, selected rows */
  --cl-red-line: rgba(172, 30, 35, 0.45);   /* focus ring / active border */

  /* ---- Dark surfaces (derived from BLACK) ---- */
  --cl-bg: #040707;             /* page */
  --cl-surface-1: #0A0E0F;      /* sidebar, panels */
  --cl-surface-2: #101516;      /* cards */
  --cl-surface-3: #171D1F;      /* inputs, hover */
  --cl-surface-4: #20272A;      /* pressed / bubbles */
  --cl-border: rgba(255, 255, 255, 0.08);
  --cl-border-strong: rgba(255, 255, 255, 0.16);

  /* ---- Text on dark ---- */
  --cl-text: #FFFFFF;
  --cl-text-2: rgba(255, 255, 255, 0.72);
  --cl-text-3: rgba(255, 255, 255, 0.50);
  --cl-text-4: rgba(255, 255, 255, 0.32);  /* placeholders / disabled */

  /* ---- Functional status (derived, used sparingly, never as brand color) ---- */
  --cl-success: #3DBE8B;  --cl-success-soft: rgba(61, 190, 139, 0.14);
  --cl-warning: #E2A84B;  --cl-warning-soft: rgba(226, 168, 75, 0.14);
  --cl-danger:  #E5484D;  --cl-danger-soft:  rgba(229, 72, 77, 0.14);
  --cl-info:    #9AA6AC;  --cl-info-soft:    rgba(154, 166, 172, 0.14);

  /* ---- Typography ----
     Display / headings / labels: Unbounded (brand font)
     Dense UI body text: Be Vietnam Pro (PROPOSAL — Vietnamese-native, very legible at 13–15px).
     Fallback: Arial (as in brand guideline). */
  --cl-font-display: "Unbounded", Arial, sans-serif;
  --cl-font-body: "Be Vietnam Pro", Arial, sans-serif;

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

  /* type scale (px)   size / line-height */
  --cl-fs-display: 56px;  --cl-lh-display: 64px;   /* Unbounded 700 */
  --cl-fs-h1: 36px;       --cl-lh-h1: 44px;        /* Unbounded 700 */
  --cl-fs-h2: 26px;       --cl-lh-h2: 34px;        /* Unbounded 700 */
  --cl-fs-h3: 18px;       --cl-lh-h3: 26px;        /* Unbounded 600 */
  --cl-fs-h4: 15px;       --cl-lh-h4: 22px;        /* Unbounded 500 */
  --cl-fs-body-lg: 16px;  --cl-lh-body-lg: 26px;   /* Be Vietnam Pro 400 */
  --cl-fs-body: 14px;     --cl-lh-body: 22px;      /* Be Vietnam Pro 400 */
  --cl-fs-small: 13px;    --cl-lh-small: 20px;
  --cl-fs-caption: 12px;  --cl-lh-caption: 16px;
  --cl-fs-overline: 11px; --cl-ls-overline: 0.14em; /* Unbounded 500, UPPERCASE */

  /* ---- Spacing (4px base) ---- */
  --cl-space-1: 4px;  --cl-space-2: 8px;  --cl-space-3: 12px; --cl-space-4: 16px;
  --cl-space-5: 20px; --cl-space-6: 24px; --cl-space-8: 32px; --cl-space-10: 40px;
  --cl-space-12: 48px; --cl-space-16: 64px; --cl-space-20: 80px; --cl-space-30: 120px;

  /* ---- Radii (angular brand → small radii; symbol corners are ~5% of size) ---- */
  --cl-radius-xs: 4px; --cl-radius-sm: 6px; --cl-radius-md: 10px; --cl-radius-lg: 14px;
  --cl-radius-xl: 20px; --cl-radius-pill: 999px;

  /* ---- Shadows / elevation (on dark) ---- */
  --cl-shadow-1: 0 1px 2px rgba(0,0,0,.5);
  --cl-shadow-2: 0 8px 24px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.04) inset;
  --cl-shadow-3: 0 24px 64px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.05) inset;
  --cl-shadow-red: 0 8px 28px rgba(172,30,35,.35);   /* primary CTA only */
  --cl-focus-ring: 0 0 0 3px rgba(172,30,35,.45);

  /* ---- Layout ---- */
  --cl-header-h: 76px;            /* public site header */
  --cl-rail-w: 76px;              /* portal icon rail */
  --cl-sidebar-w: 320px;          /* portal list column */
  --cl-container: 1280px;
  --cl-bp-mobile: 390px; --cl-bp-tablet: 768px; --cl-bp-desktop: 1440px;

  /* ---- Motion ---- */
  --cl-ease: cubic-bezier(.2,.7,.2,1);
  --cl-dur-fast: 120ms; --cl-dur: 200ms; --cl-dur-slow: 360ms;

  /* ---- Public-site + luxury-metal extensions (derived, 20/11/2026) ----
     Not in the 13/11/2026 brand guideline. Metal #E2C36B is taken from the
     current public-site CSS (resort/concept UI). Use sparingly — never as a
     fourth brand color at scale. Official ratio remains 60 black / 30 white / 10 red.
     Light-ink tokens support occasional light marketing bands. */
  --cl-metal: #E2C36B;
  --cl-metal-soft: rgba(226, 195, 107, 0.14);
  --cl-metal-line: rgba(226, 195, 107, 0.45);

  --cl-bg-light: #FFFFFF;
  --cl-surface-light: #F3F4F4;
  --cl-text-ink: #040707;
  --cl-text-ink-soft: #2A2D2D;
  --cl-line-on-light: rgba(4, 7, 7, 0.14);

  /* Larger marketing type; same families as the portal */
  --cl-fs-hero-tag: clamp(1.05rem, 2vw, 1.5rem);
  --cl-lh-hero-tag: 1.45;
  --cl-fs-section: clamp(2rem, 4.2vw, 3.25rem);
  --cl-lh-section: 1.15;
  --cl-fs-lead: clamp(1.05rem, 1.5vw, 1.25rem);
  --cl-lh-lead: 1.7;
}
