/*
 * H1 Holding SpA: design tokens for the website theme
 * Approved 19 Nov 2026. The type system and palette follow CNM's brand book
 * (brand-book/index.html, November 2026): Optima for display, Gill Sans for text,
 * CNM's soft greys, slate and night. Logo files are in ./logo/ (see guide.html).
 *
 * FONTS AND GDPR
 * The stacks below name the Adobe Fonts families first ("optima-nova-lt-pro", "gill-sans-nova"),
 * exactly like cnmspa.com, then the Optima and Gill Sans built into Apple devices, then
 * system fallbacks. This file makes NO font request by itself:
 *   - without the Adobe kit, Apple devices show real Optima / Gill Sans, and the others fall back
 *     to Candara / Calibri (no third-party request at all);
 *   - adding CNM's Adobe Fonts kit (<link rel="stylesheet" href="https://use.typekit.net/<kit>.css">)
 *     gives Optima nova / Gill Sans Nova everywhere, but it is a request to Adobe. Decide with the
 *     privacy policy (CNM already does this) before enabling it.
 * The logo never depends on fonts: it is outlined SVG.
 */

:root {
  /* ---- Colour (CNM palette) ---- */
  --h1-night: #1f2023;      /* primary: logo ground, header, footer, dark bands */
  --h1-slate: #3a3e46;      /* button hover, dark bands */
  --h1-ink: #000000;        /* titles, filled buttons */
  --h1-text: #63666b;       /* body text */
  --h1-label: #6b6e71;      /* small capitals labels */
  --h1-grey: #abaeb6;       /* logo tint on white, section fields */
  --h1-soft: #e4e5e4;       /* backgrounds, bands */
  --h1-mist: #f4f4f3;       /* page ground alternative */
  --h1-line: #dcdcdc;       /* hairline rules */
  --h1-paper: #ffffff;

  /* semantic */
  --h1-bg: var(--h1-paper);
  --h1-bg-alt: var(--h1-mist);
  --h1-bg-dark: var(--h1-night);
  --h1-fg: var(--h1-text);
  --h1-heading: var(--h1-ink);
  --h1-on-dark: var(--h1-paper);
  --h1-on-dark-muted: rgba(255, 255, 255, 0.75);
  --h1-button: var(--h1-ink);
  --h1-button-hover: var(--h1-slate);
  --h1-focus: var(--h1-slate);

  /* ---- Type families ---- */
  --h1-font-display: "optima-nova-lt-pro", Optima, "Optima nova", "Optima LT Std", Candara, "Segoe UI", sans-serif;
  --h1-font-text: "gill-sans-nova", "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;

  /* ---- Type scale (desktop; phone values in the media query) ---- */
  /* Display (Optima, regular weight, 20 px and above only) */
  --h1-size-hero: 44px;        /* page hero title, spaced capitals */
  --h1-size-title: 30px;       /* section titles, spaced capitals */
  --h1-size-statement: 34px;   /* quoted statements, sentence case */
  --h1-size-lead: 26px;        /* lead sentence, line height 1.4 */
  /* Text (Gill Sans) */
  --h1-size-body: 16px;        /* line height 1.7 */
  --h1-size-card: 15px;
  --h1-size-card-title: 12px;  /* SemiBold capitals */
  --h1-size-button: 12px;      /* SemiBold capitals */
  --h1-size-label: 11px;       /* SemiBold capitals; nothing smaller than 11 px */

  --h1-weight-display: 400;
  --h1-weight-text: 400;
  --h1-weight-strong: 600;

  --h1-leading-display: 1.3;
  --h1-leading-lead: 1.4;
  --h1-leading-body: 1.7;

  /* letter-spacing */
  --h1-track-hero: 6px;        /* 0.136 em at 44 px */
  --h1-track-title: 3px;       /* 0.1 em at 30 px, same as the logo */
  --h1-track-label: 2.55px;    /* labels and card titles */
  --h1-track-button: 4px;
  --h1-track-link: 3px;

  --h1-measure: 40em;          /* 60-80 characters */

  /* ---- Shape ---- */
  --h1-radius: 0;              /* square corners */
  --h1-rule: 1px solid var(--h1-line);
  --h1-shadow: none;
  --h1-fade: 0.5s ease;        /* text fades only; photos may scale 1.03-1.04 */

  /* ---- Logo ---- */
  --h1-logo-ratio: 12.52;      /* width / cap height of the wordmark */
  --h1-logo-min-width: 150px;  /* below this, use the H1 icon */
  --h1-logo-header-height: 16px;
}

@media (max-width: 700px) {
  :root {
    --h1-size-hero: 32px;
    --h1-size-title: 24px;
    --h1-size-statement: 26px;
    --h1-size-lead: 21px;
  }
}
