/* =====================================================================
   Pott-Ware – Design-Tokens v1.0 · „Zeche & Stahl"
   Stand: 2026-11-26 · final (abgenommen: Logo, Bildsprache, Komponenten, Sprache)
   Quelle für: Styleguide, Shopware-Theme (SCSS-Variante: theme/_tokens.scss), Mails, CD-Skill.

   Ebenen: 1) Primitive (Rohwerte, nie direkt in Komponenten außer im immer-dunklen Rahmen)
           2) Semantik (Bedeutung, je Schicht)
   Schicht über Attribut: [data-schicht="dunkel"] (Standard, Rahmen) | [data-schicht="hell"] (Arbeitsbereich)
   Schriften: fonts/fonts.css (selbst gehostet, SIL OFL)

   Änderungen gegenüber v0.1:
   - kohle-450 (#5f5b55) heißt jetzt kohle-550 (war dunkler als 500, Skala falsch sortiert)
   - neu kohle-450 (#857f77) für Bedienelement-Ränder auf hell (WCAG 1.4.11, 3,96 : 1 auf Weiß)
   - neu --line-control, --shadow-overlay, Bedien-Höhen, Ebenen (z-index), Preis- und Logo-Größen
   ===================================================================== */

:root {
  /* ---------- 1. Primitive ---------- */
  /* Kohle – warme Neutraltöne (von dunkel nach hell) */
  --kohle-950: #0d0d0d;
  --kohle-900: #141414;
  --kohle-850: #1b1b1b;
  --kohle-800: #232323;
  --kohle-700: #2f2f2f;
  --kohle-600: #4a4744;
  --kohle-550: #5f5b55;   /* Nebentext auf hell */
  --kohle-500: #6e6a64;
  --kohle-450: #857f77;   /* Ränder von Eingabefeldern auf hell */
  --kohle-400: #9b948a;
  --kohle-300: #c4bdb2;
  --kohle-200: #ddd7cd;
  --kohle-100: #eeeae4;   /* „Kalk" */
  --kohle-50:  #f7f5f1;
  --weiss:     #ffffff;

  /* Corten – Markenfarbe (Rost/Stahl) */
  --corten-700: #7a3510;
  --corten-600: #9a4416;
  --corten-500: #b5541c;  /* Markenfarbe: Logo, Schichtlinie, Flächen, Großtext */
  --corten-400: #d4691f;  /* „Glut" – ausschließlich Kauf-Aktionen */
  --corten-350: #e07a2e;  /* Glut Hover */
  --corten-300: #e98a45;  /* Links und Akzente auf dunkel */
  --corten-200: #f4b98a;
  --corten-100: #fbe5d3;

  /* Kanal – maritimer Zweitton (Info, Hilfe, Wasser in Illustrationen) */
  --kanal-700: #1f3a4d;
  --kanal-500: #3d6b85;
  --kanal-300: #7fb0cc;
  --kanal-100: #e3eef4;

  /* Status – je eine Fassung für dunklen und hellen Grund */
  --gruen-hell: #5fbf7a;  --gruen-dunkel: #2f7d48;
  --gelb-hell:  #e0a526;  --gelb-dunkel:  #8a5a00;
  --rot-hell:   #e36a6a;  --rot-dunkel:   #b83232;

  /* ---------- Typografie ---------- */
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;  /* 600/700/800, Versalien */
  --font-text:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.6rem + 4.2vw, 4rem);     /* 44 → 64 */
  --fs-h1:      clamp(2.25rem, 1.6rem + 2.4vw, 3rem);     /* 36 → 48 */
  --fs-h2:      clamp(1.75rem, 1.35rem + 1.5vw, 2.25rem); /* 28 → 36 */
  --fs-h3:      clamp(1.5rem, 1.3rem + .7vw, 1.75rem);    /* 24 → 28 */
  --fs-h4:      1.375rem;  /* 22, Plex 600, normale Schreibung */
  --fs-lead:    1.125rem;  /* 18 */
  --fs-body:    1rem;      /* 16 */
  --fs-small:   .875rem;   /* 14 */
  --fs-caption: .75rem;    /* 12, Versalien, gesperrt */
  --fs-preis:   1.75rem;   /* 28, Karten */
  --fs-preis-gross: 2.75rem; /* 44, Buy-Box */
  --fs-key:     1.125rem;  /* 18, Plex Mono 500, +0.06em */

  --lh-tight: 1;
  --lh-heading: 1.1;
  --lh-text: 1.6;
  --track-display: .02em;
  --track-button: .04em;
  --track-caption: .1em;
  --track-key: .06em;

  /* ---------- Abstände (4er-Raster) ---------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* ---------- Form ---------- */
  --radius-0: 0;        /* Flächen, Sektionen */
  --radius-1: 2px;      /* Buttons, Eingabefelder, Badges */
  --radius-2: 4px;      /* Karten – Maximum im ganzen System */
  --border: 1px;
  --schichtlinie: 3px;  /* Corten-Signaturlinie */

  /* ---------- Bedienung ---------- */
  --control-h: 44px;    /* Standard, Mindest-Touchziel */
  --control-h-sm: 36px;
  --control-h-lg: 52px; /* Kauf-Button */
  --icon: 24px;
  --logo-h-header: 36px;
  --logo-h-header-mobil: 26px;

  /* ---------- Layout ---------- */
  --container: 1280px;
  --gutter: 24px;       /* mobil 16px */
  --bp-sm: 480px; --bp-md: 768px; --bp-lg: 1024px; --bp-xl: 1280px;

  /* ---------- Ebenen ---------- */
  --z-header: 50;
  --z-overlay: 90;
  --z-drawer: 100;
  --z-toast: 120;

  /* ---------- Bewegung ---------- */
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur-fast: 120ms;
  --dur: 200ms;
}

@media (max-width: 767px) { :root { --gutter: 16px; } }

/* ---------- 2. Semantik: Schicht „dunkel" (Standard, Rahmen) ---------- */
:root, [data-schicht="dunkel"] {
  --bg:            var(--kohle-900);
  --bg-raised:     var(--kohle-850);
  --bg-sunken:     var(--kohle-950);
  --bg-muted:      var(--kohle-800);
  --line:          var(--kohle-700);
  --line-strong:   var(--kohle-600);
  --line-control:  var(--kohle-500);   /* 3,2 : 1 auf 850 */
  --text:          var(--kohle-100);   /* 15,4 : 1 */
  --text-muted:    var(--kohle-400);   /* 6,1 : 1 */
  --text-inverse:  var(--kohle-950);
  --brand:         var(--corten-500);  /* nur Flächen/Linien/Großtext, 3,7 : 1 */
  --link:          var(--corten-300);  /* 7,2 : 1 */
  --accent:        var(--kanal-300);   /* 7,9 : 1 */
  --action-bg:     var(--corten-400);
  --action-bg-hover: var(--corten-350);
  --action-text:   var(--kohle-950);   /* 5,4 : 1 */
  --success:       var(--gruen-hell);  /* 7,6 : 1 */
  --warning:       var(--gelb-hell);   /* 7,9 : 1 */
  --danger:        var(--rot-hell);    /* 5,4 : 1 */
  --shadow:        none;               /* im Dunkeln Kanten statt Schatten */
  --shadow-overlay: 0 12px 32px rgba(0,0,0,.45);
  --focus:         0 0 0 3px var(--kohle-900), 0 0 0 5px var(--corten-300);
}

/* ---------- 2. Semantik: Schicht „hell" (Arbeitsbereich) ---------- */
[data-schicht="hell"] {
  --bg:            var(--kohle-50);
  --bg-raised:     var(--weiss);
  --bg-sunken:     var(--kohle-100);
  --bg-muted:      var(--kohle-100);
  --line:          var(--kohle-200);
  --line-strong:   var(--kohle-300);
  --line-control:  var(--kohle-450);   /* 4,0 : 1 auf Weiß */
  --text:          var(--kohle-900);   /* 16,9 : 1 */
  --text-muted:    var(--kohle-550);   /* 6,2 : 1 */
  --text-inverse:  var(--kohle-50);
  --brand:         var(--corten-500);  /* 4,5 : 1 */
  --link:          var(--corten-600);  /* 6,0 : 1 */
  --accent:        var(--kanal-500);   /* 5,3 : 1 */
  --action-bg:     var(--corten-400);
  --action-bg-hover: var(--corten-350);
  --action-text:   var(--kohle-950);
  --success:       var(--gruen-dunkel); /* 5,1 : 1 */
  --warning:       var(--gelb-dunkel);  /* 5,9 : 1 */
  --danger:        var(--rot-dunkel);   /* 5,9 : 1 */
  --shadow:        0 1px 2px rgba(13,13,13,.06), 0 8px 24px rgba(13,13,13,.08);
  --shadow-overlay: 0 12px 32px rgba(13,13,13,.18);
  --focus:         0 0 0 3px var(--kohle-50), 0 0 0 5px var(--corten-600);
}
