/* ════════════════════════════════════════════════════════════════════
   darlix. — Design System 1.0
   Schwarz, Weiss, Stahl. Eine Datei: Tokens, Basis, Komponenten.
   Einbinden:  <link rel="stylesheet" href="design-system/darlix.css">
   Regeln:     brand/darlix Brand Guidelines 1.0.pdf
   Bausteine:  design-system/index.html
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── 1 · TOKENS ───────────────────────────────────────────────────── */
:root {
  /* Schwarz und Weiss tragen alles */
  --ink:    #000000;
  --paper:  #FFFFFF;
  --stage:  #F2F2F2;   /* Bühne: ruhige Fläche hinter Objekten */
  --line:   #D9D9D9;   /* Trennlinien */
  --grey:        #6E6E6E;   /* Nebentext auf Weiss, 5.1 : 1 */
  --grey-on-ink: #A6A6A6;   /* Nebentext auf Schwarz, 8.6 : 1 */

  /* Stahl — der Akzent ist ein Material, keine Farbe */
  --steel:       #A9AEB6;   /* Flachwert: Schatten auf Schwarz, kleinste Grössen, einfarbiger Druck */
  --steel-light: #F3F4F6;
  --steel-mid:   #C9CDD3;
  --steel-dark:  #6B717A;
  /* Platte: polierter Stahl mit einer Lichtkante. Für Tasten und eckige Formen. */
  --metal: linear-gradient(118deg, #C5CAD1 0%, #F8F9FA 21%, #AEB4BC 43%, #EDEFF1 57%, #C3C8CF 76%, #9EA4AD 100%);
  /* Gedreht: Stahl von der Drehbank. Nur für runde Formen. */
  --metal-spun: conic-gradient(from 215deg, #F7F8F9, #8F96A0, #ECEEF1, #787E88, #F7F8F9, #A3A9B2, #EEF0F3, #828892, #F7F8F9);

  /* Signal — meldet einen Zustand, gehört nicht zur Marke */
  --ok:    #00C896;
  --warn:  #FFD166;
  --error: #FF4D6D;

  /* Kontext: kehrt sich in .section--black und .on-ink um */
  --fg:      var(--ink);     /* Schrift */
  --bg:      var(--paper);   /* Grund */
  --surface: var(--paper);   /* Karten */
  --edge:    var(--ink);     /* Rahmen */
  --shadow:  var(--ink);     /* harter Schatten */
  --muted:   var(--grey);    /* Nebentext */
  --rule:    rgba(0,0,0,0.08);

  /* Rahmen */
  --bw-strong: 3px;   /* Sektionen, Haupttaste, Panels */
  --bw:        2px;   /* Karten, Navigation, Felder */

  /* Schrift */
  --bg:      var(--paper);   /* Grund */
  --surface: var(--paper);   /* Karten */
  --edge:    var(--ink);     /* Rahmen */
  --shadow:  var(--ink);     /* harter Schatten */
  --muted:   var(--grey);    /* Nebentext */
  --rule:    rgba(0,0,0,0.08);

  /* Rahmen */
  --bw-strong: 3px;   /* Sektionen, Haupttaste, Panels */
  --bw:        2px;   /* Karten, Navigation, Felder */

  /* Harter Schatten: Versatz nach rechts unten, keine Unschärfe */
  --sh-xs: 2px;
  --sh-sm: 4px;
  --sh-md: 6px;
  --sh-lg: 8px;

  /* Schrift */
  --mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  --w-regular: 400;
  --w-bold:    700;
  --fs-display: clamp(42px, 8vw, 96px);
  --fs-title:   clamp(28px, 4vw, 52px);
  --fs-number:  64px;
  --fs-lead:    clamp(15px, 2vw, 20px);
  --fs-body:    14px;
  --fs-small:   12px;
  --fs-label:   10px;
  --fs-micro:   8px;
  --ls-label:   0.14em;
  --ls-wide:    0.20em;

  /* Raster */
  --w-page:   1080px;
  --w-mid:    960px;
  --w-narrow: 860px;
  --pad-x:    32px;
  --pad-y:    72px;

  /* Bewegung */
  --t-fast: 80ms;
  --t-soft: 200ms;
}

/* Der harte Schatten ist gezogen, nicht kopiert: Er schliesst lückenlos an die Fläche an,
   seine Ecken laufen im Winkel von 45° zusammen. Jede Stufe ist ein Stapel in Schritten von 0.5 px.
   Die Regel gilt für jedes Element, damit der Stapel die Schattenfarbe seines Kontexts nimmt. */
*, ::before, ::after {
  --sh-xs:   0.5px 0.5px 0 var(--shadow), 1px 1px 0 var(--shadow), 1.5px 1.5px 0 var(--shadow), 2px 2px 0 var(--shadow);
  --sh-down: 0.5px 0.5px 0 var(--shadow), 1px 1px 0 var(--shadow), 1.5px 1.5px 0 var(--shadow), 2px 2px 0 var(--shadow), 2.5px 2.5px 0 var(--shadow), 3px 3px 0 var(--shadow);
  --sh-sm:   0.5px 0.5px 0 var(--shadow), 1px 1px 0 var(--shadow), 1.5px 1.5px 0 var(--shadow), 2px 2px 0 var(--shadow), 2.5px 2.5px 0 var(--shadow), 3px 3px 0 var(--shadow), 3.5px 3.5px 0 var(--shadow), 4px 4px 0 var(--shadow);
  --sh-md:   0.5px 0.5px 0 var(--shadow), 1px 1px 0 var(--shadow), 1.5px 1.5px 0 var(--shadow), 2px 2px 0 var(--shadow), 2.5px 2.5px 0 var(--shadow), 3px 3px 0 var(--shadow), 3.5px 3.5px 0 var(--shadow), 4px 4px 0 var(--shadow), 4.5px 4.5px 0 var(--shadow), 5px 5px 0 var(--shadow), 5.5px 5.5px 0 var(--shadow), 6px 6px 0 var(--shadow);
  --sh-lg:   0.5px 0.5px 0 var(--shadow), 1px 1px 0 var(--shadow), 1.5px 1.5px 0 var(--shadow), 2px 2px 0 var(--shadow), 2.5px 2.5px 0 var(--shadow), 3px 3px 0 var(--shadow), 3.5px 3.5px 0 var(--shadow), 4px 4px 0 var(--shadow), 4.5px 4.5px 0 var(--shadow), 5px 5px 0 var(--shadow), 5.5px 5.5px 0 var(--shadow), 6px 6px 0 var(--shadow), 6.5px 6.5px 0 var(--shadow), 7px 7px 0 var(--shadow), 7.5px 7.5px 0 var(--shadow), 8px 8px 0 var(--shadow);
  --sh-up:   0.5px 0.5px 0 var(--shadow), 1px 1px 0 var(--shadow), 1.5px 1.5px 0 var(--shadow), 2px 2px 0 var(--shadow), 2.5px 2.5px 0 var(--shadow), 3px 3px 0 var(--shadow), 3.5px 3.5px 0 var(--shadow), 4px 4px 0 var(--shadow), 4.5px 4.5px 0 var(--shadow), 5px 5px 0 var(--shadow), 5.5px 5.5px 0 var(--shadow), 6px 6px 0 var(--shadow), 6.5px 6.5px 0 var(--shadow), 7px 7px 0 var(--shadow), 7.5px 7.5px 0 var(--shadow), 8px 8px 0 var(--shadow), 8.5px 8.5px 0 var(--shadow), 9px 9px 0 var(--shadow);
}

/* Auf Schwarz kehrt sich alles um; der Schatten wird zu Stahl */
.section--black, .on-ink {
  --fg:      var(--paper);
  --bg:      var(--ink);
  --surface: var(--ink);
  --edge:    var(--paper);
  --shadow:  var(--steel);
  --muted:   var(--grey-on-ink);
  --rule:    rgba(255,255,255,0.14);
}

/* ── 2 · BASIS ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font-family: var(--mono); color: inherit; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

.page { position: relative; z-index: 1; }   /* liegt über den Hintergrundformen */

/* Wortmarke: immer klein, eine Farbe, der Punkt gehört dazu */
.wordmark {
  font-size: 20px; font-weight: var(--w-bold); letter-spacing: -0.01em; line-height: 1;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}

/* Label: Versalien mit Laufweite, für Feldnamen und Tabellenköpfe */
.label {
  display: block;
  font-size: var(--fs-label); font-weight: var(--w-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
}
.muted { color: var(--muted); }

/* ── 3 · SEKTIONEN ────────────────────────────────────────────────── */
.section { position: relative; z-index: 1; padding: var(--pad-y) var(--pad-x); background: var(--bg); color: var(--fg); }
.section--stage { --bg: var(--stage); border-top: var(--bw-strong) solid var(--ink); border-bottom: var(--bw-strong) solid var(--ink); }
.section--black { border-top: var(--bw-strong) solid var(--ink); border-bottom: var(--bw-strong) solid var(--ink); }
.section--line  { border-top: var(--bw-strong) solid var(--ink); }
.section--open  { background: transparent; }   /* Formen scheinen durch — Inhalt gehört dann auf eine .plate */
.section--top   { padding-top: 132px; }   /* erste Sektion einer Seite ohne Hero: Platz für die schwebende Navigation */
.section--stage + .section--black, .section--black + .section--stage,
.section--black + .section--line { border-top: none; }

.section-inner { max-width: var(--w-page); margin: 0 auto; }
.section-inner--mid    { max-width: var(--w-mid); }
.section-inner--narrow { max-width: var(--w-narrow); }

.section-title { font-size: var(--fs-title); font-weight: var(--w-bold); line-height: 1.0; letter-spacing: -0.01em; margin-bottom: 16px; }
.section-sub   { font-size: 15px; color: var(--muted); max-width: 560px; line-height: 1.7; margin-bottom: 56px; }

.grid-2    { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.grid-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }

/* ── 4 · TAG, BADGE, PILL, STATUS ─────────────────────────────────── */
/* Tag: benennt, was der Titel nicht sagt. Nicht über jeden Titel. */
.tag {
  display: inline-block; margin-bottom: 20px; padding: 7px 16px;
  font-size: var(--fs-label); font-weight: var(--w-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  background: var(--surface); color: var(--fg); border: var(--bw) solid var(--edge);
}

.badge {
  display: inline-flex; align-items: center; padding: 3px 8px;
  font-size: 8px; font-weight: var(--w-bold); letter-spacing: 0.14em; text-transform: uppercase;
  background: transparent; color: var(--fg); border: 1.5px solid var(--edge);
}
.badge--solid { background: var(--fg); color: var(--bg); }
.badge--ok    { background: var(--ok);    color: #000; border-color: #000; }
.badge--warn  { background: var(--warn);  color: #000; border-color: #000; }
.badge--error { background: var(--error); color: #000; border-color: #000; }
.badge--off   { color: var(--muted); border-color: var(--line); }
.badge--lg    { font-size: 10px; padding: 4px 10px; border-width: 2px; }

.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; cursor: pointer;
  font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.14em; text-transform: uppercase;
  background: transparent; color: var(--muted); border: 1.5px solid var(--line);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.pill:hover  { color: var(--fg); border-color: var(--edge); }
.pill.active { background: var(--fg); color: var(--bg); border-color: var(--edge); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; white-space: nowrap;
  font-size: 11px; font-weight: var(--w-bold); letter-spacing: 0.07em; text-transform: uppercase;
  background: var(--surface); color: var(--fg); border: var(--bw) solid var(--edge);
  box-shadow: var(--sh-sm);
}
.status-dot { width: 8px; height: 8px; background: var(--ok); flex-shrink: 0; animation: dx-pulse 1.4s ease-in-out infinite; }
.status-dot--warn  { background: var(--warn); }
.status-dot--error { background: var(--error); }
.status-dot--off   { background: var(--line); animation: none; }
@keyframes dx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ── 5 · TASTEN ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-weight: var(--w-bold); text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
}

/* Die Stahltaste: sitzt am Ende der Haupttaste und trägt den Pfeil */
.key {
  display: block; align-self: stretch; flex-shrink: 0; width: 56px; margin-left: 28px;
  border-left: var(--bw-strong) solid #000;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h14M12 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") center / 20px no-repeat,
    var(--metal);
}

/* Haupttaste: eine pro Ansicht. Schwarzer Körper, Stahltaste, harter Schatten. */
.btn-primary {
  align-items: center; justify-content: flex-start; gap: 0; min-height: 56px; padding: 0 0 0 28px;
  font-size: 13px; letter-spacing: 0.14em;
  color: var(--bg); background: var(--fg);
  border: var(--bw-strong) solid var(--edge); box-shadow: var(--sh-md);
}
.btn-primary:not(:has(.key)) { padding-right: 28px; justify-content: center; }
.btn-primary:hover  { transform: translate(-3px,-3px); box-shadow: var(--sh-up); }
.btn-primary:active { transform: translate(0,0);       box-shadow: var(--sh-down); }

/* Zweite Taste: Kontur, füllt sich */
.btn-secondary {
  min-height: 50px; padding: 0 24px;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--fg); background: transparent; border: var(--bw) solid var(--edge);
}
.btn-secondary:hover { background: var(--fg); color: var(--bg); }

/* Leise: Nebenaktion */
.btn-ghost {
  min-height: 38px; padding: 0 14px;
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--muted); background: transparent; border: var(--bw) solid var(--line);
}
.btn-ghost:hover { color: var(--fg); border-color: var(--edge); }

/* Klein: in Karten und Tabellen */
.btn-sm { min-height: 38px; font-size: 10px; letter-spacing: 0.12em; }
.btn-primary.btn-sm { padding-left: 14px; border-width: var(--bw); box-shadow: var(--sh-xs); }
.btn-primary.btn-sm:not(:has(.key)) { padding-right: 14px; }
.btn-primary.btn-sm:hover { transform: translate(-1px,-1px); box-shadow: var(--sh-down); }
.btn-primary.btn-sm .key { width: 36px; margin-left: 14px; border-left-width: var(--bw); background-size: 14px, auto; }
.btn-secondary.btn-sm { padding: 0 14px; }

.btn-block { display: flex; width: 100%; }
.btn-primary.btn-block .key { margin-left: auto; }

/* ── 6 · NAVIGATION ───────────────────────────────────────────────── */
.nav-wrap {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.nav {
  display: inline-flex; align-items: stretch; height: 60px; white-space: nowrap;
  background: var(--paper); color: var(--ink);
  border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); --shadow: var(--ink);
}
.nav-brand {
  display: flex; align-items: center; padding: 0 28px; flex-shrink: 0; text-decoration: none; color: var(--ink);
  border-right: var(--bw) solid var(--ink);
}
.nav-brand .wordmark { color: var(--ink); }
.nav-links { display: flex; align-items: stretch; }
.nav-link {
  display: flex; align-items: center; padding: 0 24px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: var(--w-bold);
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  color: var(--grey); background: transparent; border: none;
  border-right: 1px solid var(--line);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-links > :last-child, .nav-links > .has-menu:last-child .nav-link { border-right: none; }
.nav-link:hover  { color: var(--ink); background: var(--stage); }
.nav-link.active { color: var(--paper); background: var(--ink); }
/* Die Hauptaktion der Leiste ist eine Stahltaste */
.nav-cta {
  display: flex; align-items: center; padding: 0 22px; flex-shrink: 0; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: var(--w-bold);
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: #000; background: var(--metal); border: none; border-left: var(--bw) solid var(--ink);
  transition: filter var(--t-fast);
}
.nav-cta:hover { filter: brightness(1.06); }

.has-menu { position: relative; display: flex; }
.menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px; z-index: 110;
  display: none; background: var(--paper); color: var(--ink);
  border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); --shadow: var(--ink);
}
.menu.open { display: block; }
.menu-head { padding: 10px 18px; background: var(--stage); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: var(--w-bold); color: var(--grey); }
.menu-item {
  display: block; width: 100%; padding: 13px 18px; text-align: left; cursor: pointer;
  font-family: var(--mono); font-size: 10px; font-weight: var(--w-bold);
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: transparent; border: none; border-bottom: 1px solid var(--line);
  transition: background var(--t-fast), color var(--t-fast);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--ink); color: var(--paper); }
.menu-item--danger:hover { background: var(--error); color: #000; }

/* Schwebende Haupttaste: erscheint nach dem Hero, weicht dem Footer.
   Markup: <a class="fab btn btn-primary" data-after="#hero-cta">Text<i class="key"></i></a> */
.fab {
  position: fixed; bottom: 32px; left: 50%; z-index: 100;
  opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px);
  transition: opacity var(--t-soft), transform var(--t-soft), box-shadow var(--t-fast);
}
.fab.is-visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.fab.btn-primary:hover  { transform: translateX(calc(-50% - 3px)) translateY(-3px); }
.fab.btn-primary:active { transform: translateX(-50%) translateY(0); }
.fab.on-dark { --fg: var(--paper); --bg: var(--ink); --edge: var(--paper); --shadow: var(--steel); }

/* ── 7 · HERO ─────────────────────────────────────────────────────── */
.hero { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 132px var(--pad-x) 72px; }
.hero-inner { max-width: var(--w-narrow); width: 100%; }
.hero-title {
  font-size: var(--fs-display); font-weight: var(--w-bold);
  line-height: 0.95; letter-spacing: -0.02em; word-spacing: -0.08em;
  margin-bottom: 20px;
}
.hero-sub { font-size: var(--fs-lead); color: var(--muted); max-width: 540px; line-height: 1.6; margin-bottom: 44px; }
.hero-sub strong { color: var(--fg); font-weight: var(--w-bold); }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.facts { display: flex; gap: 0; margin-top: 56px; flex-wrap: wrap; border-top: var(--bw) solid var(--edge); }
.fact { display: flex; flex-direction: column; gap: 6px; padding: 18px 32px 0 0; margin-right: 32px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: none; margin-right: 0; }
.fact-num   { font-size: 28px; font-weight: var(--w-bold); line-height: 1; }
.fact-label { font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ── 8 · FLÄCHEN ──────────────────────────────────────────────────── */
/* Platte: die grosse Fläche. Trägt den Hero über den Formen. */
.plate {
  position: relative; z-index: 2; padding: 52px 56px;
  background: var(--surface); color: var(--fg);
  border: var(--bw-strong) solid var(--edge); box-shadow: var(--sh-lg);
}

/* Karte */
.card {
  position: relative; padding: 22px 24px;
  background: var(--surface); color: var(--fg);
  border: var(--bw) solid var(--edge); box-shadow: var(--sh-sm);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.card--hover:hover { transform: translate(-2px,-2px); box-shadow: var(--sh-md); }
.card-title { font-size: 16px; font-weight: var(--w-bold); letter-spacing: 0.02em; line-height: 1.25; }
.card-meta  { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; margin-top: 4px; }
.card-text  { font-size: var(--fs-small); color: var(--muted); line-height: 1.65; margin-top: 12px; }
.card-actions { display: flex; gap: 8px; margin-top: 18px; }

/* Panel: Bühne mit starkem Rahmen — Formulare, Einstellungen */
.panel {
  padding: 32px; background: var(--stage); color: var(--ink);
  border: var(--bw-strong) solid var(--ink); box-shadow: var(--sh-lg);
  --fg: var(--ink); --bg: var(--paper); --edge: var(--ink); --muted: var(--grey);
}
.panel-title {
  font-size: 11px; font-weight: var(--w-bold); letter-spacing: var(--ls-wide); text-transform: uppercase;
  margin-bottom: 28px; padding-bottom: 14px; border-bottom: var(--bw) solid var(--ink);
}

/* Kennzahl */
.stat-card { padding: 20px 22px; background: var(--surface); color: var(--fg); border: var(--bw) solid var(--edge); box-shadow: var(--sh-sm); }
.stat-card--ok    { box-shadow: var(--sh-sm); --shadow: var(--ok); }
.stat-card--warn  { box-shadow: var(--sh-sm); --shadow: var(--warn); }
.stat-card--error { box-shadow: var(--sh-sm); --shadow: var(--error); }
.stat-card-label { font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.stat-card-value { font-size: 42px; font-weight: var(--w-bold); line-height: 1; }
.stat-card-delta { font-size: 11px; font-weight: var(--w-bold); color: var(--muted); margin-top: 8px; }

/* Schritte: nur für echte Abfolgen */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border: var(--bw-strong) solid var(--edge); }
.step { padding: 36px 30px; border-right: var(--bw-strong) solid var(--edge); }
.step:last-child { border-right: none; }
.step-num   { font-size: var(--fs-number); font-weight: var(--w-bold); line-height: 1; margin-bottom: 20px; }
.step-title { font-size: 15px; font-weight: var(--w-bold); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.step-desc  { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Hinweis */
.notice { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--warn); color: #000; border: var(--bw) solid #000; }
.notice-label { font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.notice-text  { font-size: 11px; line-height: 1.45; }

/* Angebot */
.plan { display: flex; flex-direction: column; position: relative; background: var(--surface); color: var(--fg); border: var(--bw) solid var(--edge); box-shadow: var(--sh-sm); }
.plan.featured { --surface: var(--ink); --fg: var(--paper); --bg: var(--ink); --edge: var(--paper); --muted: var(--grey-on-ink); --rule: rgba(255,255,255,0.14);
  border-color: var(--ink); box-shadow: var(--sh-lg); --shadow: var(--steel); }
.section--black .plan.featured, .on-ink .plan.featured { --surface: var(--paper); --fg: var(--ink); --bg: var(--paper); --edge: var(--ink); --muted: var(--grey); --rule: rgba(0,0,0,0.1);
  border-color: var(--paper); }
.plan-flag   { position: absolute; top: 14px; right: 14px; padding: 5px 10px; font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.14em; background: var(--bg); color: var(--fg); border: var(--bw) solid var(--edge); }
.plan-head   { padding: 28px 28px 20px; border-bottom: 1px solid var(--rule); }
.plan-name   { font-size: 10px; font-weight: var(--w-bold); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; margin-bottom: 12px; }
.plan-price  { font-size: 52px; font-weight: var(--w-bold); line-height: 1; }
.plan-period { font-size: 11px; opacity: 0.6; margin-top: 8px; }
.plan-features { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 28px 26px; }
.plan-feature  { display: flex; align-items: baseline; gap: 10px; font-size: var(--fs-small); line-height: 1.45; }
.plan-feature::before { content: '+'; width: 12px; font-weight: var(--w-bold); flex-shrink: 0; }
.plan-feature.off { opacity: 0.35; }
.plan-feature.off::before { content: '–'; }
.plan-cta { padding: 0 28px 28px; margin-top: auto; }

/* ── 9 · FORMULARE ────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.input {
  width: 100%; padding: 12px 14px; outline: none;
  font-family: var(--mono); font-size: 14px; color: var(--ink);
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 0;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.input::placeholder { color: #9A9A9A; }
.input:focus { box-shadow: var(--sh-sm); transform: translate(-2px,-2px); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.6; }
.hint { font-size: 11px; color: var(--muted); line-height: 1.6; }

/* Regler: der Knopf ist aus Stahl */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--fg); outline-offset: 8px; cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; background: var(--metal); border: var(--bw) solid #000; box-shadow: var(--sh-xs); cursor: grab; }
.range::-moz-range-thumb     { width: 24px; height: 24px; background: var(--metal); border: var(--bw) solid #000; box-shadow: var(--sh-xs); cursor: grab; border-radius: 0; }
.range-ends { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* Schalter: der Knopf ist aus Stahl */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; vertical-align: middle; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: var(--paper); border: var(--bw) solid var(--ink); transition: background var(--t-fast); }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--metal); border: var(--bw) solid #000; transition: transform 120ms cubic-bezier(.4,0,.2,1); }
.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track::after { transform: translateX(22px); border-color: #000; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--fg); outline-offset: 3px; }

/* ── 10 · TABELLE ─────────────────────────────────────────────────── */
.table-wrap { background: var(--paper); color: var(--ink); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap thead tr { background: var(--ink); }
.table-wrap th { padding: 11px 14px; text-align: left; white-space: nowrap; font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper); }
.table-wrap td { padding: 11px 14px; font-size: 12px; vertical-align: middle; white-space: nowrap; }
.table-wrap tbody tr { border-bottom: 1px solid var(--line); background: var(--paper); }
.table-wrap tbody tr:nth-child(even) { background: var(--stage); }
.table-wrap tbody tr:last-child { border-bottom: none; }
.table-wrap tbody tr:hover { background: #E4E4E4; }
.table-wrap .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 10a · LAUFTEXT ───────────────────────────────────────────────── */
/* Lange Texte zum Lesen: Impressum, Datenschutz, Erklärungen. Eine schmale Spalte,
   Zwischentitel mit Linie, Absätze, Listen mit Quadrat, Angaben als Paare (dl). Links sind unterstrichen. */
.text { max-width: 680px; font-size: var(--fs-body); line-height: 1.75; color: var(--fg); }
.text > * + * { margin-top: 14px; }
.text h2 { margin-top: 52px; padding-top: 24px; border-top: var(--bw) solid var(--edge); font-size: 20px; font-weight: var(--w-bold); line-height: 1.2; letter-spacing: -0.01em; }
.text > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.text h3 { margin-top: 30px; font-size: var(--fs-small); font-weight: var(--w-bold); letter-spacing: var(--ls-label); text-transform: uppercase; }
.text ul { list-style: none; }
.text li { position: relative; padding-left: 22px; }
.text li + li { margin-top: 6px; }
.text li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; background: var(--fg); }
.text a { color: var(--fg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.text a:hover { background: var(--fg); color: var(--bg); text-decoration-color: var(--fg); }
.text address { font-style: normal; }
.text dl { display: grid; grid-template-columns: 200px 1fr; border-top: var(--bw) solid var(--edge); }
.text dt, .text dd { padding: 13px 0; border-bottom: 1px solid var(--line); }
.text dt { padding-top: 17px; padding-right: 16px; font-size: var(--fs-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--muted); }
.text .muted { font-size: var(--fs-small); }

/* ── 11 · MODAL ───────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,0.78); }
.modal-overlay.active { display: flex; }
.modal { width: 100%; max-width: 420px; background: var(--paper); color: var(--ink); border: var(--bw-strong) solid var(--ink); box-shadow: var(--sh-lg); --shadow: var(--steel); }
.modal-head  { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; background: var(--ink); color: var(--paper); }
.modal-title { font-size: 11px; font-weight: var(--w-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.modal-close { width: 30px; height: 30px; display: grid; place-items: center; background: var(--metal); color: #000; border: var(--bw) solid var(--paper); font-size: 14px; font-weight: var(--w-bold); line-height: 1; cursor: pointer; }
.modal-close:hover { filter: brightness(1.08); }
.modal-body  { padding: 30px 22px; }

/* ── 12 · FOOTER ──────────────────────────────────────────────────── */
.footer { position: relative; z-index: 1; padding: 48px var(--pad-x) 32px; background: var(--paper); color: var(--ink); border-top: var(--bw-strong) solid var(--ink); }
.footer-inner { max-width: var(--w-page); margin: 0 auto; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: var(--bw) solid var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; }
.footer-link { padding: 6px 16px; white-space: nowrap; font-size: 11px; font-weight: var(--w-bold); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--grey); border-left: 1px solid var(--line); transition: color var(--t-fast); }
.footer-link:last-child { border-right: 1px solid var(--line); }
.footer-link:hover { color: var(--ink); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 48px; padding: 32px 0 28px; border-bottom: 1px solid var(--line); }
.footer-col-title { font-size: 9px; font-weight: var(--w-bold); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; margin-bottom: 8px; font-size: 12px; text-decoration: none; color: var(--grey); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 20px; }
.footer-note { max-width: 640px; font-size: 11px; line-height: 1.7; color: var(--grey); }
.footer-copy { font-size: 11px; color: var(--grey); white-space: nowrap; }

/* ── 13 · HINTERGRUNDFORMEN ───────────────────────────────────────── */
/* Sieben Formen, zwei davon aus Stahl. Sie treiben langsam hinter dem Inhalt.
   Weisse und stählerne Formen: 4 px Rahmen, harter Schatten 6 px. Schwarze stehen ohne.
   Der Schatten fällt immer nach rechts unten, darum verschieben sich die Formen nur und drehen nicht.
   <div class="shapes" aria-hidden="true"><i class="shape shape-1"></i> … <i class="shape shape-7"></i></div> */
.shapes { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.shape  { position: absolute; display: block; }
.shape::before, .shape::after { content: ''; position: absolute; inset: 0; }

/* 1 Dreieck, schwarz */
.shape-1 { width: 280px; height: 240px; top: 2%; left: 6%; animation: dx-drift-a 55s ease-in-out infinite; }
.shape-1::before { background: #000; clip-path: polygon(48% 0%, 0% 100%, 100% 88%); }

/* 2 Kreuz, weiss */
.shape-2 { width: 88px; height: 88px; top: 30%; left: 20%; animation: dx-drift-b 48s ease-in-out infinite;
  filter: drop-shadow(4px 0 0 #000) drop-shadow(-4px 0 0 #000) drop-shadow(0 4px 0 #000) drop-shadow(0 -4px 0 #000)
          drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000); }
.shape-2::before { background: #fff; clip-path: polygon(33% 0%,67% 0%,67% 33%,100% 33%,100% 67%,67% 67%,67% 100%,33% 100%,33% 67%,0% 67%,0% 33%,33% 33%); }

/* 3 Halbscheibe, weiss */
.shape-3 { width: 180px; height: 90px; bottom: 18%; left: 9%; animation: dx-drift-c 62s ease-in-out infinite; }
.shape-3::before { background: #fff; border: 4px solid #000; border-radius: 100px 100px 0 0; box-shadow: var(--sh-md); }

/* 4 Ring, gedrehter Stahl. Nur die Stahlfläche dreht sich, der Schatten bleibt stehen. */
.shape-4 { --d: 230px; --hole: 62px; width: var(--d); height: var(--d); top: 56%; right: 7%; animation: dx-drift-d 70s ease-in-out infinite; }
.shape-4::before { border-radius: 50%; background: #000;
  filter: drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000) drop-shadow(1px 1px 0 #000);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 calc(var(--hole) - 0.5px), #000 var(--hole)); mask: radial-gradient(circle closest-side, transparent 0 calc(var(--hole) - 0.5px), #000 var(--hole)); }
.shape-4::after { border-radius: 50%;
  background:
    radial-gradient(circle closest-side, transparent 0 var(--hole), #000 var(--hole) calc(var(--hole) + 4px), transparent calc(var(--hole) + 4.5px) calc(100% - 4.5px), #000 calc(100% - 4px) 100%),
    var(--metal-spun);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 calc(var(--hole) - 0.5px), #000 var(--hole)); mask: radial-gradient(circle closest-side, transparent 0 calc(var(--hole) - 0.5px), #000 var(--hole));
  animation: dx-spin 120s linear infinite; }

/* 5 Scheibe, schwarz */
.shape-5 { width: 90px; height: 90px; top: 30%; right: 13%; animation: dx-drift-e 44s ease-in-out infinite; }
.shape-5::before { background: #000; border-radius: 50%; }

/* 6 Raute, Stahlplatte */
.shape-6 { width: 84px; height: 84px; top: 66%; left: 46%; animation: dx-drift-f 58s ease-in-out infinite; }
.shape-6::before { background: #000; transform: translate(6px, 6px) rotate(45deg); }   /* die Raute gleitet an ihrer eigenen Kante, die Kopie schliesst darum bündig an */
.shape-6::after  { background: var(--metal); border: 4px solid #000; transform: rotate(45deg); }

/* 7 Pille, weiss */
.shape-7 { width: 130px; height: 46px; top: 13%; right: 21%; animation: dx-drift-g 66s ease-in-out infinite; }
.shape-7::before { background: #fff; border: 4px solid #000; border-radius: 100px; box-shadow: var(--sh-md); }

@keyframes dx-drift-a { 0%,100% { transform: translate(0,0); } 50% { transform: translate(46px,40px); } }
@keyframes dx-drift-b { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-36px,32px); } }
@keyframes dx-drift-c { 0%,100% { transform: translate(0,0); } 50% { transform: translate(24px,-38px); } }
@keyframes dx-drift-d { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-38px,-46px); } }
@keyframes dx-drift-e { 0%,100% { transform: translate(0,0); } 50% { transform: translate(28px,-30px); } }
@keyframes dx-drift-f { 0%,100% { transform: translate(0,0); } 50% { transform: translate(28px,34px); } }
@keyframes dx-drift-g { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-26px,34px); } }
@keyframes dx-spin    { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shape, .shape::after, .status-dot { animation: none !important; }
  .btn, .fab, .card, .input { transition: none; }
}

/* ── 14 · RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .grid-3 { grid-template-columns: 1fr; }
  .plan-price { font-size: 42px; }
  .footer { padding: 36px 20px 24px; }
  .footer-nav { display: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
@media (max-width: 600px) {
  :root { --pad-x: 16px; --pad-y: 56px; }
  .nav-wrap { top: 12px; }
  .nav { height: 48px; }
  .nav-links { display: none; }
  .nav-brand { padding: 0 20px; }
  .nav-brand .wordmark { font-size: 16px; }
  .nav-cta { font-size: 10px; padding: 0 16px; }
  .hero { padding: 88px var(--pad-x) 56px; }
  .section--top { padding-top: 96px; }
  .text h2 { margin-top: 40px; font-size: 18px; }
  .text dl { grid-template-columns: 1fr; }
  .text dt { padding-bottom: 0; border-bottom: 0; }
  .text dd { padding-top: 4px; }
  .plate { padding: 32px 26px; box-shadow: var(--sh-md); }
  .facts { margin-top: 40px; }
  .fact { padding-right: 20px; margin-right: 20px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: var(--bw-strong) solid var(--edge); }
  .step:last-child { border-bottom: none; }
  .panel { padding: 24px 20px; box-shadow: var(--sh-md); }
  .fab { bottom: 20px; }
  .btn-primary { font-size: 12px; }

  /* Auf dem Handy bleiben vier Formen, jede als Form erkennbar, alle am Rand */
  .shape-1 { left: -96px; top: 2vh; width: 180px; height: 154px; }
  .shape-2, .shape-3, .shape-5 { display: none; }
  .shape-4 { --d: 150px; --hole: 40px; right: -58px; top: auto; bottom: 3vh; }
  .shape-6 { left: auto; right: -20px; top: 11vh; width: 60px; height: 60px; }
  .shape-7 { right: auto; left: 18px; top: auto; bottom: 4vh; width: 96px; height: 34px; }

  .snap-mobile {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 calc(var(--pad-x) * -1); padding: 4px var(--pad-x) 12px; scrollbar-width: none;
  }
  .snap-mobile::-webkit-scrollbar { display: none; }
  .snap-mobile > * { flex: 0 0 82vw; scroll-snap-align: center; }
}
