/* Die Tokens der Library DIBS-DesignSystem.lib.pen im Website-Projekt, eins zu
   eins übernommen, ohne das Präfix «U:». Die Library ist die einzige Quelle
   für gestalterische Werte. Ändert sich dort etwas, gehört es hier nachgezogen
   und sonst nirgends, gelesen wird über den Pencil MCP mit GetVariables().

   Zwei Achsen wie in der Library. «surface» schaltet die Farben, hell ist der
   Normalfall, eine dunkle Fläche setzt die Klasse «dunkel». «device» schaltet
   Schrift und Raum über die Breakpoints der Website, also Handy unter 768,
   iPad von 768 bis 1099 und Desktop ab 1100. Das Backend nimmt immer die
   Desktop-Werte, siehe «Backend – Regeln» im AnmeldeTool.pen. */

@font-face {
  font-family: "Inter";
  /* Inter 4.001 als Teilmenge mit Gewicht und optischer Grösse, wie sie entsteht, steht in der README unter «Dateien». */
  src: url("../schrift/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Skalen ---------- */
  --neutral-0: #ffffff;
  --neutral-50: #f7f7f7;
  --neutral-100: #efefef;
  --neutral-200: #e3e3e3;
  --neutral-300: #c5c5c5;
  --neutral-400: #a8a8a8;
  --neutral-500: #8c8c8c;
  --neutral-600: #717171;
  --neutral-700: #575757;
  --neutral-800: #3e3e3e;
  --neutral-900: #272727;

  --periwinkle-200: #d9d1ff;
  --periwinkle-500: #bcacfe;
  --deepblue-500: #193c61;
  --blossom-200: #fcbddc;
  --blossom-500: #ef87bf;
  --alert-500: #df2225;
  --alert-600: #bf1018;
  --alert-700: #9f000d;
  --notice-500: #ffb334;
  --success-500: #2e7c35;

  /* ---------- Rollen, hell ---------- */
  --surface: var(--neutral-0);
  --surface-subtle: var(--neutral-50);
  --surface-raised: var(--neutral-100);
  --surface-periwinkle: var(--periwinkle-200);
  --surface-blossom: var(--blossom-200);
  --text: var(--neutral-900);
  --text-secondary: var(--neutral-700);
  --text-muted: var(--neutral-600);
  --text-min: var(--neutral-500);
  --line: var(--neutral-200);
  --line-strong: var(--neutral-600);
  --focus-ring: var(--neutral-900);
  --action: var(--deepblue-500);
  --on-action: var(--neutral-0);
  --signal-danger: var(--alert-500);
  --signal-notice: var(--notice-500);
  --signal-success: var(--success-500);

  /* ---------- Schrift ---------- */
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Handy ist der Ausgangswert, darüber legen sich iPad und Desktop. */
  --type-display-xl: 59px;
  --type-display-l: 46px;
  --type-display-m: 36px;
  --type-display-s: 28px;
  --type-headline: 22px;
  --type-lead: 16px;
  --type-heading: 15px;
  --type-body: 14px;
  --type-micro: 11px;

  --track-display-xl: -2.7px;
  --track-display-l: -2.1px;
  --track-display-m: -1.6px;
  --track-display-s: -1.1px;
  --track-headline: -0.6px;

  /* ---------- Raum und Form ---------- */
  --space-2: 2px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;
  --space-128: 128px;
  --space-160: 160px;
  --space-192: 192px;

  --radius-0: 0;
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-16: 16px;
  --radius-full: 999px;

  --stroke-1: 1px;
  --stroke-2: 2px;

  --page-margin: 20px;
  --section-space: 48px;
  --tag-padding-y: 4px;
  --tag-padding-x: 8px;

  /* Höchstbreite des Inhalts auf der Website. */
  --inhalt-max: 1312px;
}

@media (min-width: 768px) {
  :root {
    --type-display-xl: 109px;
    --type-display-l: 79px;
    --type-display-m: 57px;
    --type-display-s: 41px;
    --type-headline: 30px;
    --type-lead: 18px;
    --type-heading: 16px;
    --type-micro: 12px;

    --track-display-xl: -4.9px;
    --track-display-l: -3.6px;
    --track-display-m: -2.5px;
    --track-display-s: -1.8px;
    --track-headline: -1.35px;

    --page-margin: 40px;
    --section-space: 56px;
    --tag-padding-y: 8px;
    --tag-padding-x: 12px;
  }
}

/* Die Desktop-Werte gelten ab 1100 und im Backend immer, egal wie breit. */
@media (min-width: 1100px) {
  :root {
    --type-display-xl: 200px;
    --type-display-l: 135px;
    --type-display-m: 90px;
    --type-display-s: 60px;
    --type-headline: 40px;
    --type-lead: 20px;
    --type-heading: 17px;

    --track-display-xl: -9px;
    --track-display-l: -6.1px;
    --track-display-m: -4.1px;
    --track-display-s: -2.7px;
    --track-headline: -1.8px;

    --page-margin: 64px;
    --section-space: 64px;
  }
}

.backend {
  --type-display-xl: 200px;
  --type-display-l: 135px;
  --type-display-m: 90px;
  --type-display-s: 60px;
  --type-headline: 40px;
  --type-lead: 20px;
  --type-heading: 17px;
  --type-micro: 12px;

  --track-headline: -1.8px;
}

/* ---------- Rollen, dunkel ---------- */
.dunkel {
  --surface: var(--neutral-900);
  --text: var(--neutral-0);
  --text-secondary: var(--neutral-400);
  --text-muted: var(--neutral-500);
  --line: var(--neutral-700);
  --line-strong: var(--neutral-500);
  --focus-ring: var(--neutral-0);
  --action: var(--neutral-0);
  --on-action: var(--neutral-900);
}
