/* ==========================================================================
   Feierabend-Kit · Design-System (base.css)
   These: "Ein ordentlicher Schreibtisch, kein Tech-Produkt."
   Geteilt von allen Seiten. Seitenspezifisches liegt in landing/dashboard/
   handbuch/legal.css. Keine Gradients, kein Glassmorphism.
   ========================================================================== */

/* ---------- Schriften (self-hosted, DSGVO-konform) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Farben */
  --paper: #FAF9F6;        /* Papierweiß, Grundfläche */
  --paper-warm: #F3F1EA;   /* wärmerer Papier-Ton für Flächen/Abschnitte */
  --card: #FFFFFF;         /* Kartenfläche */
  --ink: #26282B;          /* Anthrazit, Text */
  --ink-soft: #55585C;     /* Sekundärtext */
  --ink-mute: #83868B;     /* Nebentext, Bildunterschriften */
  --petrol: #16606A;       /* Produktfarbe */
  --petrol-dark: #0F4750;  /* Hover, dunkle Flächen */
  --petrol-soft: #E4EEEF;  /* helle Petrol-Fläche */
  --orange: #C2571B;       /* warmer Akzent, Kauf-CTA */
  --orange-dark: #A84A15;  /* Hover */
  --orange-soft: #F8EADF;  /* helle Orange-Fläche */
  --line: #E5E2D9;         /* Hairline auf Papier */
  --line-strong: #D3CFC3;
  --ok: #2E7D4F;           /* Erfolg */

  /* Schrift */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  /* Maße */
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1160px;
  --pad-x: clamp(20px, 4vw, 40px);
  --shadow-sm: 0 1px 2px rgba(38, 40, 43, .05), 0 2px 10px rgba(38, 40, 43, .05);
  --shadow-md: 0 2px 6px rgba(38, 40, 43, .06), 0 14px 36px rgba(38, 40, 43, .10);
}

/* ---------- Reset & Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
/* Breiten-/Höhen-Attribute dienen nur der Platzreservierung; die Höhe folgt
   immer dem Seitenverhältnis, sonst verzerren skalierte Bilder. */
img { height: auto; }
::selection { background: var(--petrol-soft); color: var(--petrol-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.28rem; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--petrol-dark); }
strong { font-weight: 600; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Sektions-Kopf ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--petrol);
  margin: 0 0 .9em;
  display: block;
}
.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 46em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 50px;
  padding: .72em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); color: #fff; }
.btn-petrol { background: var(--petrol); color: #fff; }
.btn-petrol:hover { background: var(--petrol-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--card); color: var(--ink); }
.btn-sm { min-height: 42px; padding: .5em 1.1em; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: .85em 1.9em; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35em; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  min-height: 50px;
  padding: .6em .9em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--petrol);
  outline-offset: 0;
  border-color: var(--petrol);
}
.hint { font-size: .88rem; color: var(--ink-mute); }

/* ---------- Karten & Abzeichen ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .28em .75em;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--petrol-soft);
  color: var(--petrol-dark);
}
.badge-orange { background: var(--orange-soft); color: var(--orange-dark); }

/* ---------- Token-Chips (Prompt-Platzhalter) ---------- */
.tk {
  display: inline-block;
  padding: 0 .35em;
  border-radius: 5px;
  border: 1px dashed var(--line-strong);
  background: var(--paper-warm);
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tk-var { border-style: solid; }
.tk-var.filled {
  background: var(--petrol-soft);
  border-color: var(--petrol);
  color: var(--petrol-dark);
  font-weight: 500;
}
.tk-var.empty {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange-dark);
  cursor: pointer;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -80px);
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: .7em 1.3em;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: .98rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
  max-width: min(92vw, 480px);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================================
   Feierabend-Leiste (Signatur-Element)
   Zeitstrahl 17:00 bis 22:00. Vorher-Balken bis 21:30 (90%), Nachher-Balken
   bis 18:15 (25%). Animation: JS setzt .in-view, Balken wachsen auf --w.
   ========================================================================== */
.fa-leiste {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 34px);
  box-shadow: var(--shadow-sm);
}
.fa-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  padding-left: var(--fa-label-w, 108px);
  margin-bottom: 10px;
}
.fa-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
}
.fa-row:last-child { margin-bottom: 0; }
.fa-label {
  flex: 0 0 var(--fa-label-w, 108px);
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.fa-track {
  position: relative;
  flex: 1;
  height: 40px;
  background: var(--paper-warm);
  border-radius: 7px;
  overflow: hidden;
  /* Stundenraster als feine Linien */
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 20% 100%;
}
.fa-bar {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 7px 0 0 7px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: width 1.3s cubic-bezier(.25, .7, .3, 1);
}
.in-view .fa-bar { width: var(--w); }
.fa-bar-vorher { background: var(--ink); }
.fa-bar-nachher { background: var(--petrol); }
.fa-time {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  color: #fff;
  padding-right: .7em;
  white-space: nowrap;
}
.fa-caption {
  margin-top: 16px;
  font-size: .92rem;
  color: var(--ink-soft);
}
@media (max-width: 560px) {
  .fa-leiste { --fa-label-w: 84px; }
  .fa-label { font-size: .82rem; }
}

/* ---------- Scroll-Reveal (dezent) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fa-bar { transition: none; }
  .in-view .fa-bar { width: var(--w); }
  .toast { transition: none; }
}
