/* ==========================================================================
   tokens.css
   Einzige Quelle für Farben, Schriften, Abstände. Keine Hex-Werte außerhalb
   dieser Datei verwenden.
   Namenslogik: --{kategorie}-{rolle}-{variante}
   ========================================================================== */

@font-face {
  font-family: "Roboto";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/roboto-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2");
}

:root {
  /* ---- Marke (Foundation) ---------------------------------------------- */
  --brand-lapis: #22577a;
  --brand-verdigris: #38a5a3;
  --brand-emerald: #57cc99;
  --brand-light-green: #80ed99;
  --brand-tea-green: #c7f9cc;

  /* Abgeleitete Töne */
  --brand-lapis-700: #1a4461; /* Hover auf Lapis */
  --brand-lapis-900: #10293b; /* Verläufe, sehr dunkle Flächen */
  --brand-verdigris-700: #1f7270; /* Textlinks auf hellen Flächen (AA) */

  /* ---- Neutrale ---------------------------------------------------------- */
  --neutral-0: #ffffff;
  --neutral-50: #f4f7f8;
  --neutral-100: #e6ecef;
  --neutral-300: #c3ced4;
  --neutral-500: #6b7c87;   /* nur für große oder dekorative Texte */
  --neutral-700: #3b4a54;
  --neutral-900: #0f1f2b;   /* Textfarbe, Blaustich statt reinem Schwarz */

  /* ---- Status ------------------------------------------------------------ */
  --status-info: #1f7270;
  --status-success: #1d7a4f;
  --status-warning: #8a5a00;
  --status-danger: #a32b2b;

  /* ---- Semantische Rollen ----------------------------------------------- */
  --color-bg: var(--neutral-0);
  --color-bg-tint: var(--brand-tea-green);
  --color-bg-brand: var(--brand-lapis);
  --panel-bg: var(--brand-lapis);             /* Farbfläche links */
  --heading-on-panel: var(--neutral-0);       /* Überschrift, soweit sie auf der Fläche steht (7,7 zu 1 auf Lapis) */
  --color-heading: var(--brand-lapis);        /* Überschriften auf Weiß (7,7 zu 1) */
  --color-text: var(--neutral-900);
  --color-text-muted: var(--neutral-700);
  --color-text-on-brand: var(--neutral-0);
  --color-text-on-tint: var(--neutral-900);
  --color-link: var(--brand-lapis);
  --color-link-hover: var(--brand-lapis-700);
  --color-accent: var(--brand-emerald);
  --color-border: var(--neutral-300);
  --color-focus: var(--brand-verdigris-700);

  /* ---- Goldener Schnitt -------------------------------------------------
     phi = 1,618. Alle Größen, Abstände und Proportionen leiten sich davon ab.
     Potenzen (in rem bei 16 px Basis):
       phi^-2 0,382   phi^-1 0,618   phi^0 1   phi^0,5 1,272   phi^1 1,618
       phi^1,5 2,058  phi^2 2,618    phi^3 4,236   phi^4 6,854
     Proportionen: Fläche links = 1/phi^3 der Breite (23,6 %), Überschriftsbereich
     = 38,2 % der Höhe, Textblock beginnt bei 38,2 % der Inhaltsbreite. */
  --phi: 1.618034;
  --phi-inv: 0.618034;
  --phi-inv-2: 0.381966;

  /* ---- Schriften --------------------------------------------------------- */
  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* Schriftskala: Stufen im Abstand von phi^0,5 (Text) bis phi^4 (Display).
     Display, Title, Headline und Lead skalieren fließend zwischen zwei Stufen. */
  --text-display: clamp(3rem, 1.6rem + 6vw, 6.854rem);  /* phi^4 am Maximum */
  --leading-display: 1.02;
  --text-title: clamp(2.058rem, 1.3rem + 3vw, 3.33rem);
  --leading-title: 1.08;
  --text-headline: clamp(1.272rem, 1.1rem + 0.8vw, 1.618rem);  /* bis phi^1 */
  --leading-headline: 1.15;
  --text-body: 1.125rem;                    /* einzige Textgröße der Absätze */
  --text-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.272rem);     /* bis phi^0,5 */
  --leading-lead: 1.45;
  --text-base: 1rem;
  --leading-base: 1.618;
  --text-sm: 0.875rem;
  --leading-sm: 1.45;
  --text-xs: 0.75rem;
  --leading-xs: 1.3;

  --text-statement-max: 2.618rem;  /* phi^2, Obergrenze des Statements (2,3 : 1 zum Fließtext) */
  --leading-statement: 1.02;
  --tracking-statement: -0.03em;

  --tracking-display: -0.02em;
  --tracking-headline: 0.06em;

  /* ---- Abstände: Goldene Reihe ------------------------------------------ */
  --space-1: 0.382rem;  /* phi^-2 */
  --space-2: 0.618rem;  /* phi^-1 */
  --space-3: 1rem;      /* phi^0  */
  --space-4: 1.618rem;  /* phi^1  */
  --space-5: 2.618rem;  /* phi^2  */
  --space-6: 4.236rem;  /* phi^3  */
  --space-7: 6.854rem;  /* phi^4  */

  /* ---- Radien, Schatten, Layout ----------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --shadow-focus: 0 0 0 3px var(--brand-tea-green), 0 0 0 5px var(--color-focus);

  --measure: 61.8ch;                      /* maximale Zeilenlänge Fließtext */
  /* Raster: Rand und Gutter = eine Textzeile (--space-4), 12 Spalten, 8 Modulreihen (Desktop) */
  --bp-tablet: 48rem;                     /* 768 px, zur Dokumentation */
  --bp-desktop: 64rem;                    /* 1024 px */
}
