/*
 * Traina & Partners - design tokens (direction C "Verde inchiostro", mark C2 "Schermo").
 * Custom properties for the prototype only. The names are the Divi 5 Design Variables
 * listed in docs/04-wordpress-settings.md; in WordPress nothing is redeclared as a custom
 * property (the Variable Manager is the only variable system). Light theme only.
 */

/* ---------------------------------------------------------------------------
 * Colours
 * Divi 5: Visual Builder > Variable Manager > Colors. One variable per token,
 * named like the token without the "--color-" prefix
 * (primary, primary-dark, accent, bg, bg-alt, heading, body, border, success, white).
 * ------------------------------------------------------------------------ */
:root {
  --color-primary: #173A2F;
  --color-primary-dark: #0E241D;
  --color-accent: #C1502E;
  --color-bg: #FCFAF6;
  --color-bg-alt: #F3EFE6;
  --color-heading: #151A17;
  --color-body: #414843;
  --color-border: #DAD5C9;
  --color-success: #2E7D4F;
  --color-white: #FFFFFF;

  /* Derived tints used by components; in Divi they are Colors variables too (same names). */
  --color-primary-tint: rgba(23, 58, 47, 0.08);
  --color-accent-tint: rgba(193, 80, 46, 0.10);
  --color-accent-dark: #A8421F;
  --color-error: #B3261E;
  --color-on-dark: rgba(255, 255, 255, 0.82);
  --color-border-on-dark: rgba(255, 255, 255, 0.18);
  --color-white-tint-12: rgba(255, 255, 255, 0.12);
  --color-white-tint-06: rgba(255, 255, 255, 0.06);
  --color-primary-tint-05: rgba(23, 58, 47, 0.05);
  --color-success-tint-10: rgba(46, 125, 79, 0.10);
}

/* ---------------------------------------------------------------------------
 * Fonts
 * Divi 5: Variable Manager > Fonts (font-heading, font-body), Google Fonts on in
 * Theme Options: Bricolage Grotesque 600/700, Instrument Sans 400/600.
 * ------------------------------------------------------------------------ */
:root {
  --font-heading: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  --weight-heading: 700;
  --weight-heading-light: 600;
  --weight-body: 400;
  --weight-body-strong: 600;
}

/* ---------------------------------------------------------------------------
 * Type scale (desktop; mobile overrides below 767 px)
 * Divi 5: Variable Manager > Numbers (text-*, leading-*, tracking-*) used by the
 * Text module presets (Display, H1..H4, Lead, Body, Small); Customizer body 16 / H1 44.
 * 56 / 44 / 34 / 26 / 20 / 18 / 16 / 14 px on desktop.
 * ------------------------------------------------------------------------ */
:root {
  --text-display: 3.5rem;
  --text-h1: 2.75rem;
  --text-h2: 2.125rem;
  --text-h3: 1.625rem;
  --text-h4: 1.25rem;
  --text-lead: 1.125rem;
  --text-body: 1rem;
  --text-small: 0.875rem;

  --leading-display: 1.05;
  --leading-heading: 1.15;
  --leading-subheading: 1.25;
  --leading-body: 1.6;
  --leading-tight: 1.35;

  --tracking-heading: -0.015em;
  --tracking-eyebrow: 0.06em;
}

/* 40 / 34 / 28 / 22 / 20 / 17 / 16 / 14 px on phones. */
@media (max-width: 767px) {
  :root {
    --text-display: 2.5rem;
    --text-h1: 2.125rem;
    --text-h2: 1.75rem;
    --text-h3: 1.375rem;
    --text-h4: 1.25rem;
    --text-lead: 1.0625rem;
    --text-body: 1rem;
    --text-small: 0.875rem;
  }
}

/* ---------------------------------------------------------------------------
 * Spacing (8 px scale)
 * Divi 5: Theme Builder / Section and Row settings > Spacing. Section padding
 * top/bottom = --section-y; row gutter = --gutter; module gaps = --space-*.
 * ------------------------------------------------------------------------ */
:root {
  --space-1: 0.5rem;   /* 8 px */
  --space-2: 1rem;     /* 16 px */
  --space-3: 1.5rem;   /* 24 px */
  --space-4: 2rem;     /* 32 px */
  --space-5: 2.5rem;   /* 40 px */
  --space-6: 3rem;     /* 48 px */
  --space-7: 3.5rem;   /* 56 px */
  --space-8: 4rem;     /* 64 px */

  --section-y: 6rem;   /* 96 px desktop */
  --container: 1200px;
  --gutter: 1.5rem;    /* 24 px desktop */
  --row-gap: 2rem;     /* 32 px between columns on desktop */
}

@media (max-width: 767px) {
  :root {
    --section-y: 4rem; /* 64 px mobile */
    --gutter: 1rem;    /* 16 px mobile */
    --row-gap: 1.5rem; /* 24 px */
  }
}

/* ---------------------------------------------------------------------------
 * Radius, shadows, focus
 * Divi 5: Design > Border (radius) and Box Shadow in each preset. The focus
 * ring is added in Theme Options > Custom CSS with literal values (Divi has no global focus style).
 * ------------------------------------------------------------------------ */
:root {
  --radius: 4px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* Divi 5: Box Shadow option-group presets "shadow-1" (0 1px 3px, #151A17 10%) and "shadow-2" (0 4px 12px, #151A17 12%), one layer each; see docs/04-wordpress-settings.md section 5. */
  --shadow-1: 0 1px 2px rgba(21, 26, 23, 0.06), 0 1px 3px rgba(21, 26, 23, 0.08);
  --shadow-2: 0 4px 12px rgba(21, 26, 23, 0.10), 0 2px 4px rgba(21, 26, 23, 0.06);

  --focus: 0 0 0 3px var(--color-bg), 0 0 0 6px var(--color-accent);
  --focus-on-dark: 0 0 0 3px var(--color-primary-dark), 0 0 0 6px var(--color-white);

  --transition: 160ms ease-out;

  /* Site header height, used by the sticky offset and anchor scroll margin. */
  --header-h: 4.5rem;
}
