/* ==========================================================================
   Rehab Global — Design Tokens
   Extracted 1:1 from the live Tilda site (rehabglobal.io): exact HEX from the
   page CSS, type scale from the rendered font-size values, font = Montserrat.
   Adjust values here once; everything else references the variables.
   ========================================================================== */

:root {
  /* ---- Brand colors (exact, from live site) ---- */
  --rg-green-deep: #1D3A32;  /* BODY text + dark labels       (rgb 29,58,50)   */
  --rg-green:      #215749;  /* HEADINGS + accents            (rgb 33,87,73)   */
  --rg-card-green: #1F5145;  /* dark card bg: stat/VIP/CTA     (rgb 31,81,69)   */
  --rg-sage:       #77918A;  /* DECOR ONLY (circles/dividers/dots/icons) — not text (fails AA) */
  --rg-beige:      #79704A;  /* gold: ALL CTA buttons (darkened for white-text AA) rgb 121,112,74 */
  --rg-beige-dark: #6E6544;  /* gold button hover                             */
  --rg-line:       #E7E9F1;  /* gray-lavender: borders + FAQ section bg        */
  --rg-bg:         #E7E9F1;  /* page background (exact from Figma section fill) */
  --rg-bg-soft:    #F3F4F8;  /* alt light section background                   */
  --rg-ink:        #222222;  /* near-black body text                           */
  --rg-white:      #FFFFFF;
  --rg-eyebrow:    #5C7268;  /* muted eyebrow-badge text (AA on white ~5.2:1)  */
  --rg-muted:      #566A60;  /* readable muted text (AA on page 4.8:1) — sage replacement */
  --rg-heading-muted: #6A887E;  /* 2nd colour of two-tone headings (AA large 3.19:1 — safe buffer, restrained sage) */
  --rg-muted-light:   #5E7469;  /* airier muted for 2-tone text on LIGHT cards (bg-soft) — AA 4.57:1 */
  --rg-overlay:    #D1D7DC;  /* frosted overlay / goal-bar fill                */

  /* RGB channels — for rgba() with opacity: rgba(var(--rg-green-rgb), .2) */
  --rg-green-rgb:      33, 87, 73;
  --rg-green-deep-rgb: 29, 58, 50;
  --rg-sage-rgb:       119, 145, 138;
  --rg-beige-rgb:      121, 112, 74;
  --rg-white-rgb:      255, 255, 255;
  --rg-overlay-rgb:    209, 215, 220;
  --rg-line-rgb:       231, 233, 241;

  /* ---- Typography ---- */
  --rg-font: 'Montserrat', 'Montserrat Fallback', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;   /* fallback sized like Montserrat: no layout shift on font swap */

  /* Type scale (desktop px, from rendered site) */
  --rg-fs-display: 55px;  /* H1 hero + big section headings */
  --rg-fs-h2-lg:   48px;
  --rg-fs-h2:      36px;  /* section H2 + stat numbers */
  --rg-fs-h3:      32px;
  --rg-fs-h4:      24px;
  --rg-fs-card:    22px;  /* card titles */
  --rg-fs-h5:      20px;  /* stats intro / small headings */
  --rg-fs-lead:    18px;  /* lead paragraphs */
  --rg-fs-body:    16px;  /* body default */
  --rg-fs-small:   14px;
  --rg-fs-badge:   12px;  /* uppercase badges */

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

  /* Line-heights — use ONLY these (consolidated) */
  --rg-lh-tight:   1.1;    /* big display numbers */
  --rg-lh-heading: 1.15;   /* H1–H4 section headings */
  --rg-lh-snug:    1.3;    /* card titles / compact text */
  --rg-lh-body:    1.45;   /* paragraphs (dominant value) */

  /* Icon glyph sizes (Material Symbols) — use ONLY these */
  --rg-icon-sm: 20px;
  --rg-icon-md: 24px;
  --rg-icon-lg: 28px;
  --rg-icon-xl: 40px;

  /* ---- Layout ---- */
  --rg-container:  1200px;   /* content width inside the 1440 frame */
  --rg-gutter:     40px;     /* horizontal page padding */
  --rg-heading-max: 1040px;  /* единый max-width заголовков секций */
  --rg-section-y:  26px;     /* Figma: ~26px per side → ~52px between sections (frames are flush) */

  /* ---- Radii / shadows ---- */
  --rg-radius-card: 20px;   /* all cards (confirmed) */
  --rg-radius-btn:  30px;   /* all CTA buttons (confirmed) */
  --rg-radius-pill: 100px;
  --rg-radius-md:   15px;   /* icon boxes */
  --rg-radius-sm:   10px;   /* small chips / nav buttons */
  --rg-shadow-card: 0 10px 40px rgba(29, 58, 50, 0.06); /* site fakes this via art layer; subtle here */
}

/* Tablet / mobile down-scale of the type scale (refine against real breakpoints) */
@media (max-width: 980px) {
  :root {
    --rg-fs-display: 40px;
    --rg-fs-h2-lg:   34px;
    --rg-fs-h2:      28px;
    --rg-fs-h3:      24px;
    --rg-fs-h4:      20px;
    --rg-gutter:     20px;
    --rg-section-y:  24px;
  }
}
