/* THE ALTIMIST — brand layer.
 *
 * Source of truth: The_Altimist_StyleGuide.pdf (May 2024, 21pp), delivered in
 *   ~/Documents/60_The-Altimist/01_Brand-Assets/202601 Brand Delivery/
 *
 * This sits ON TOP of altimist.css (the Altimist Design System). The two brands
 * share three anchors exactly; everything below that the guide states
 * differently is overridden here, so the delta is auditable in one file.
 *
 * ── PALETTE (guide p.10, values sampled from the rendered swatches) ─────────
 *   Dark Blue    #233654   same as the design system
 *   Light Sand   #deceba   same as the design system
 *   Pale Beige   #f6f1ea   same as the design system
 *   Dark Sand    #a88f80   NOT in the design system
 *   Light Blue   #6eb6e4   NOT in the design system
 *   Dark Grey    #666562   design system has #5e5851 — this brand's is cooler
 *
 *   NOTE — the guide's body text prints "LIGHT BLUE #f6f1ea", which is a
 *   copy/paste of Pale Beige. Its own swatch measures #6eb6e4 (and again on the
 *   p.20 cheat sheet). The swatch is used here; the printed hex is a doc bug.
 *
 * ── TYPE (guide p.11–13, p.15) ──────────────────────────────────────────────
 *   Logo      Decimal      ships as artwork only — never re-typeset (assets/)
 *   Headlines Brandon Text delivered as "headlines font" in the brand pack
 *   Body      Bell MT      desktop licence only -> Georgia fallback on the web
 *
 *   NOTE — guide p.15 reads "Typeface: Decimal (Heading)". Three things
 *   contradict it: the brand pack ships Brandon Text in a folder literally named
 *   "headlines font", the guide's own H1–H6 specimens on that page render in a
 *   geometric sans, and Decimal is filed under "logo font". Treating the line as
 *   a doc bug and using Brandon Text for headings. Decimal is also the only one
 *   of the three with no web-embedding licence, so this is the safe reading too.
 *
 *   The guide's uppercase rule for headings IS applied.
 */

:root {
  /* ── primary palette ───────────────────────────────────────────────────── */
  --ta-dark-blue:  #233654;
  --ta-light-sand: #deceba;
  --ta-dark-sand:  #a88f80;
  --ta-light-blue: #6eb6e4;
  --ta-pale-beige: #f6f1ea;
  --ta-dark-grey:  #666562;

  /* ── web type scale (guide p.15, verbatim) ─────────────────────────────── */
  --ta-h1: 2.25rem;    --ta-h1-lh: 2.375rem;   /* 36 / 38 */
  --ta-h2: 1.5rem;     --ta-h2-lh: 1.6875rem;  /* 24 / 27 */
  --ta-h3: 1.25rem;    --ta-h3-lh: 1.4375rem;  /* 20 / 23 */
  --ta-h4: 1.125rem;   --ta-h4-lh: 1.25rem;    /* 18 / 20 */
  --ta-h5: 1rem;       --ta-h5-lh: 1.125rem;   /* 16 / 18 */
  --ta-h6: 0.875rem;   --ta-h6-lh: 1rem;       /* 14 / 16 */
  --ta-body: 1rem;                             /* 16 */
  --ta-body-lh: 1.125;                         /* 18/16 — headings-adjacent, single-line */

  /* Running prose only. The guide specifies 18px on 16px (1.125), which is
     unreadable over multiple lines; its own p.15 instruction is "ensure
     adequate line height for body text legibility". Documented deviation. */
  --ta-prose-lh: 1.7;

  /* Heading treatment — the guide's uppercase rule (p.15). */
  --ta-heading-case: uppercase;
  --ta-heading-track: 0.05em;

  /* ── grid (guide p.14) ─────────────────────────────────────────────────── */
  --ta-cols: 8;
  --ta-gutter: 30px;     /* 15px column padding either side */
  --ta-edge: 15px;

  /* ── photography (guide p.16) ──────────────────────────────────────────── */
  /* Two Dark Blue layers: Multiply @50%, then Color @50%. */
  --ta-photo-tint: rgba(35, 54, 84, 0.5);

  /* ── role mappings ─────────────────────────────────────────────────────── */
  /* Small de-emphasised text. Dark Grey #666562 measures 5.1:1 on Pale Beige,
     5.6:1 on bg-surface and 5.8:1 on white — it clears WCAG AA, which the
     design system's --al-text-muted does not. (Not on a Light Sand fill: 3.8:1
     — use Dark Blue there, as the design system's own note says.) */
  --meta: var(--ta-dark-grey);

  /* Rules, borders, dividers, small fills. Dark Sand is 2.7:1 on Pale Beige,
     so it is never used for text. */
  --ta-rule: var(--ta-dark-sand);

  /* Interactive accent. Light Blue is 2.0:1 on Pale Beige — a fill, not a text
     colour, in the light theme. */
  --ta-accent: var(--ta-dark-blue);

  /* The canvas the rail sits against. Pale Beige in light, per the guide. */
  --ta-canvas: var(--ta-pale-beige);
}

[data-theme="dark"] {
  /* The guide is a single-theme print document, so the dark ramp stays the
     design system's navy ladder and only the brand roles are re-pointed. */

  /* Light Sand on the dark surfaces: 10.7:1 on bg-page, 7.7:1 on bg-surface,
     5.9:1 on bg-elevated. Clears AA everywhere, unlike --al-text-muted. */
  --meta: var(--ta-light-sand);

  --ta-rule: var(--ta-dark-sand);

  /* Light Blue finally earns text duty: 5.4:1 on Dark Blue. */
  --ta-accent: var(--ta-light-blue);

  /* The rail stays Dark Blue #233654 in both themes — it is the brand. That
     means the dark canvas has to sit BELOW it in the ladder, or the two read as
     the same panel. bg-content (#1f2f47) is too close; bg-page (#111a27) gives
     the rail something to stand on. */
  --ta-canvas: var(--al-bg-page);
}
