/* shapestats tokens, die eine gemeinsame Quelle für App, Plattform, Website und Reels.
   Stand 15.11.2026 (Lauf v2, ergänzt 17:20: Typografie nach website-v2, Datenkontrast). Entwurf zur Wahl: Richtung A, B oder C. Nach Manuels Wahl gilt nur die gewählte Richtung,
   die beiden anderen Rollenblöcke werden gelöscht. Regeln dazu: marke/REGELN.md.
   Abgeleitet aus marke/icon.svg: gefaltetes S aus drei Silberbändern auf Graphit.
   Grundlage des Aufbaus ist website-v2 (Kavara-Look): ruhige Flächenbänder, große Grotesk-Überschriften,
   helle Karten mit weichem Schatten, geneigtes Handy. Neu ist nur die Farb- und Materialwelt.
   Komponenten nutzen nur die semantischen Rollen (Abschnitt 10), nie Rohwerte. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("fonts/clash-display-variable.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  /* 1. Rohpalette. Graphit und Silber sind die Stoppwerte der Icon-Verläufe. */
  --graphite-950: #121413;
  --graphite-900: #1a1c1b;  /* Icon, unterer Stopp des Grundes */
  --graphite-850: #222524;
  --graphite-800: #2a2d2c;  /* Icon, oberer Stopp des Grundes */
  --graphite-700: #3a3e3c;
  --graphite-600: #5f6463;  /* Icon, mittleres Band dunkel */
  --graphite-500: #8e9391;  /* Icon, mittleres Band hell */
  --graphite-450: #999e9c;  /* Text 3 in A und C, 5,1:1 auf graphite-800 */
  --silver-400: #b7bbb9;    /* Icon, unteres Band dunkel */
  --silver-300: #c9ccca;    /* Icon, oberes Band dunkel */
  --silver-200: #dfe1e0;
  --silver-100: #e9ebea;    /* Icon, unteres Band hell */
  --silver-50:  #f4f5f4;    /* Icon, oberes Band hell */
  --paper:        #eef0ee;  /* helle Grundfläche, kühles Off-White, nie Creme */
  --paper-raised: #f9faf9;  /* Karte auf Papier */

  /* Die eine Akzentfarbe, nur Richtung C. Signal-Orange: Daten, die zählen, und die Haupthandlung. */
  --signal-500: #ff6a1f;    /* auf Graphit: Füllung, Linie, Zahl (5,9:1 auf graphite-900) */
  --signal-600: #e85a12;    /* gedrückt */
  --signal-700: #b93d0a;    /* auf Papier: Text und Linie (5,3:1 auf paper) */

  --error-on-dark: #ff8f7a;
  --error-on-light: #b42318;
  --success-on-dark: #9fd8b4;
  --success-on-light: #1f7a45;

  /* 2. Chrom: die drei Bänder des Icons. Nur Marke, Bandmotiv, Hauptknopf in Richtung A und
     die eine hervorgehobene Datenreihe. Nie als Seiten-, Abschnitts- oder Kartenhintergrund. */
  --chrome-top:    linear-gradient(90deg, #f4f5f4 0%, #c9ccca 100%);
  --chrome-bottom: linear-gradient(270deg, #e9ebea 0%, #b7bbb9 100%);
  --chrome-mid:    linear-gradient(135deg, #8e9391 0%, #5f6463 100%);
  --chrome-vertical: linear-gradient(180deg, #f4f5f4 0%, #c9ccca 100%);
  --chrome-text:   linear-gradient(100deg, #f4f5f4 0%, #c9ccca 55%, #8e9391 100%);
  --graphite-ground: linear-gradient(180deg, #2a2d2c 0%, #1a1c1b 100%); /* nur App-Icon, Profilbild, Reel-Endkarte */

  /* 3. Formsprache. Die Faltung des S steigt 1 zu 2 (Icon: 74 nach rechts, 37 nach oben). */
  --fold-angle: 26.565deg;
  --fold-ratio: 0.5;
  --fold-corner: 24px;      /* Faltecke an Kennzahl-Kacheln: 48 breit, 24 hoch */

  /* 4. Typografie nach website-v2 (Manuel 15.11.2026: "der Look, den wir erreichen wollen").
     Überschriften Geist fett mit enger Laufweite (festgelegte Ausnahme für Anzeigegrößen ab 26 px),
     Fließtext Geist mit Laufweite 0. Clash Display spricht nur Zahlen: Kennzahlen, Reel-Daten, große Werte.
     Geist Mono nur für Rohdaten-Export. Ziffern in Daten immer tabellarisch. */
  --font-display: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-figure: "Clash Display", "Geist", system-ui, sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --tracking: 0;
  --tracking-display: -0.03em;   /* nur Überschriften ab 26 px */

  --type-display-xl: 800 80px/1.00 var(--font-display); /* Reel-Titel 1080 breit, Kampagne */
  --type-display-l:  800 52px/1.04 var(--font-display); /* Website-Hero */
  --type-display-m:  800 40px/1.08 var(--font-display); /* Abschnittstitel Website */
  --type-title:      700 26px/1.15 var(--font-display); /* Bildschirmtitel App, Kartentitel */
  --type-figure-xl:  600 64px/1.00 var(--font-figure);  /* Kennzahl groß */
  --type-figure-l:   600 44px/1.00 var(--font-figure);  /* Kennzahl in Karte, App-Signatur */
  --type-heading:    600 18px/1.30 var(--font-text);
  --type-body:       400 16px/1.55 var(--font-text);    /* Website */
  --type-body-app:   400 15px/1.45 var(--font-text);    /* App, Plattform */
  --type-small:      400 14px/1.45 var(--font-text);
  --type-label:      500 13px/1.35 var(--font-text);
  --type-micro:      500 12px/1.35 var(--font-text);    /* kleinste erlaubte Größe */

  /* 5. Abstände, 4er-Raster. */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 120px;
  --app-gutter: 16px;       /* Seitenrand App */
  --web-gutter: 24px;       /* Seitenrand Website mobil */
  --container: 1128px;      /* Website-Container wie website-v2 */

  /* 6. Radien: eckig. Drei Stufen, mehr gibt es nicht. */
  --radius-control: 4px;    /* Knöpfe, Felder, Schalter, Segmente (Obergrenze 6 px) */
  --radius-card: 6px;       /* Karten, Kacheln, Fotos, Paneele */
  --radius-none: 0px;       /* Flächenbänder, Diagramme, Reel-Flächen */

  /* 7. Knöpfe und Dichte. Sichtbare Höhe kompakt, Trefferfläche immer mindestens 44 px. */
  --control-s: 32px;        /* App: in Zeilen, Toolbar, sekundär */
  --control-m: 36px;        /* App und Plattform: Standard */
  --control-l: 44px;        /* nur Website: Hero und Abschlussband */
  --hit-min: 44px;
  --row-app: 52px;          /* Listenzeile App */
  --tabbar: 56px;           /* ohne Sicherheitsbereich */

  /* 8. Linien. Eine Stärke. */
  --line: 1px;

  /* 9. Schatten, graphitgetönt, nie reines Schwarz. Gefüllte Knöpfe tragen immer einen Schatten. */
  --shadow-button: inset 0 1px 0 rgb(255 255 255 / 0.30), 0 1px 2px rgb(18 20 19 / 0.28), 0 6px 14px -6px rgb(18 20 19 / 0.45);
  --shadow-button-pressed: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 1px 1px rgb(18 20 19 / 0.30);
  --shadow-card: 0 1px 2px rgb(18 20 19 / 0.06), 0 12px 32px -16px rgb(18 20 19 / 0.22);
  --shadow-card-dark: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 18px 40px -24px rgb(0 0 0 / 0.65);
  --shadow-device: 0 50px 90px -40px rgb(18 20 19 / 0.60);

  /* 10. Bewegung. Die Faltung ist die einzige Signaturbewegung. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 120ms;
  --dur-ui: 200ms;
  --dur-exit: 160ms;        /* rund 20 % kürzer als der Eintritt */
  --dur-fold: 420ms;        /* Faltung: Seitenwechsel, Reel-Übergang, Logo-Animation */
  --press-scale: 0.97;
}

/* 11. Semantische Rollen je Richtung. Komponenten nutzen nur diese Namen. */

/* A: Graphit und Silber. Dunkel, Chrom als Material. */
[data-richtung="a"] {
  --bg: var(--graphite-900);
  --band: var(--graphite-800);          /* zweites Flächenband, Karten darin graphite-700 */
  --surface: var(--graphite-800);       /* Karte */
  --surface-sunk: var(--graphite-950);  /* Feld, Handy-Grund */
  --ink: var(--silver-50);
  --ink-2: var(--silver-300);
  --ink-3: var(--graphite-450);
  --rule: var(--graphite-700);
  --action-bg: var(--chrome-vertical);
  --action-ink: var(--graphite-900);
  --action-2-line: var(--graphite-500);
  --data-strong: var(--chrome-top);
  --data-strong-solid: var(--silver-50);
  --data-base: var(--graphite-500);     /* 5,5:1 auf graphite-900, Grafikminimum 3:1 */
  --data-faint: var(--graphite-700);    /* nur Plan- und Hilfslinien, nie allein bedeutungstragend */
  --focus: var(--silver-50);
  --error: var(--error-on-dark);
  --success: var(--success-on-dark);
  --card-shadow: var(--shadow-card-dark);
  --band-motif: var(--graphite-800);
  --wordmark-fill: var(--chrome-text);
  --photo-filter: grayscale(1) contrast(1.08) brightness(0.92);
}

/* B: Hell mit Graphit. Papierflächen, Graphit-Paneele, Silber als Detail. */
[data-richtung="b"] {
  --bg: var(--paper);
  --band: var(--silver-200);           /* sichtbares Silberband, 1,2:1 auf paper */
  --surface: var(--paper-raised);
  --surface-sunk: var(--silver-50);
  --panel: var(--graphite-900);         /* dunkles Paneel: Handy, Video, Abschlussband */
  --panel-ink: var(--silver-50);
  --ink: var(--graphite-900);
  --ink-2: var(--graphite-700);
  --ink-3: var(--graphite-600);
  --rule: var(--silver-300);
  --action-bg: var(--graphite-900);
  --action-ink: var(--silver-50);
  --action-2-line: var(--graphite-600);
  --data-strong: var(--graphite-900);
  --data-strong-solid: var(--graphite-900);
  --data-base: var(--graphite-600);     /* 5,3:1 auf paper */
  --data-faint: var(--silver-300);      /* nur Plan- und Hilfslinien */
  --focus: var(--graphite-900);
  --error: var(--error-on-light);
  --success: var(--success-on-light);
  --card-shadow: var(--shadow-card);
  --band-motif: var(--silver-200);
  --wordmark-fill: var(--graphite-900);
  --photo-filter: saturate(0.35) contrast(1.04);
}

/* C: Graphit plus ein Akzent. Dunkel wie A, Chrom nur in der Marke, Signal-Orange für Daten und Handlung. */
[data-richtung="c"] {
  --bg: var(--graphite-900);
  --band: var(--graphite-800);
  --surface: var(--graphite-800);
  --surface-sunk: var(--graphite-950);
  --ink: var(--silver-50);
  --ink-2: var(--silver-300);
  --ink-3: var(--graphite-450);
  --rule: var(--graphite-700);
  --accent: var(--signal-500);
  --accent-on-light: var(--signal-700);
  --action-bg: var(--signal-500);
  --action-ink: var(--graphite-950);
  --action-2-line: var(--graphite-500);
  --data-strong: var(--signal-500);
  --data-strong-solid: var(--signal-500);
  --data-base: var(--graphite-500);
  --data-faint: var(--graphite-700);
  --focus: var(--silver-50);           /* Fokus nie in Signal, damit Fokus und Fehler unterscheidbar bleiben */
  --error: var(--error-on-dark);
  --success: var(--success-on-dark);
  --card-shadow: var(--shadow-card-dark);
  --band-motif: var(--graphite-800);
  --wordmark-fill: var(--chrome-text);
  --photo-filter: saturate(0.62) contrast(1.06) brightness(0.95); /* C gedämpft farbig seit 16.11.2026, vorher grayscale(1) */
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fold: 0ms; --dur-ui: 0ms; --press-scale: 1; }
}
