/**
 * Typography tokens. Rules per docs/design-system.md §2 (NNL_REQUIRED unless
 * noted). The CD manual mandates FS Me, a commercial Fontsmith typeface, for
 * NNL web communication — but per project decision (2026-09-28) this
 * demonstrator deliberately does NOT license or use FS Me, the same way it
 * deliberately does not use the official NNL signet: both are the client's
 * licensed/trademarked assets, not "the CD" itself. We instead permanently
 * use Atkinson Hyperlegible (SIL OFL-licensed, Braille Institute), an
 * open-source humanist sans with the same accessibility-first design brief
 * FS Me was originally built for. This is NOT a "swap for FS Me later"
 * placeholder — see docs/decisions/ADR-0005-font-licensing.md.
 * Font files are self-hosted (./fonts/) rather than CDN-loaded, since the
 * target Kubernetes environment denies egress by default.
 */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/atkinson-hyperlegible-regular.ttf") format("truetype");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/atkinson-hyperlegible-bold.ttf") format("truetype");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/atkinson-hyperlegible-italic.ttf") format("truetype");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/atkinson-hyperlegible-bolditalic.ttf") format("truetype");
}

:root {
  --font-family-base: "Atkinson Hyperlegible", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-style-default: normal; /* italic reserved for Latin species names only, e.g. <i lang="la">Canis lupus</i> */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-bold: 700;
  --font-weight-heavy: 800;

  /* No numeric type scale is given by any sourced CD material (cross-refs
     "> Schriftgrößen" / "> Referenzgröße H" still not obtained). This scale
     is APPLICATION_DESIGN, not a CD value — see docs/design-system.md §7. */
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;
  --font-size-h1: 2rem;
  --font-size-h2: 1.85rem;
  --font-size-h3: 1.5rem;
  --font-size-h4: 1.25rem;
  --line-height-body: 1.5;
  --line-height-heading: 1.2;

  --text-align-body: left; /* CD manual: "linksbündiger Flattersatz" preferred, never justify */
}

/* Browser default `body { margin: 8px }` was leaving a visible strip of
   the page background on all four sides — most visible as a green->white
   gap on the sticky header before you scroll. */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Sticky footer: on any page shorter than the viewport, the footer used
   to end wherever the content ended, leaving bare page background below
   it instead of the footer sitting flush with the bottom of the window.
   min-height:100vh + flex column on body, with <main> as the one growing
   child (see components.css), pushes the footer down to the viewport's
   bottom edge without needing a fixed/absolute footer (which would
   overlap short content instead of pushing below it). */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-base);
  font-style: var(--font-style-default);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  text-align: var(--text-align-body);
  color: var(--color-text, #000); /* CD manual: body text preferably black */
}

/* NNL_REQUIRED exception: Latin species names may render italic. */
i[lang="la"],
i[lang="la"] * {
  font-style: italic;
}
