/* Handwerk-Demo "Ein Auftrag bei Haustechnik Berger" (W09-F4; Rahmen seit 2026-11-25 im Stil von
   gauferdigital.de, PP-222). Struktur und Namen: WEB_STYLEGUIDE. Werte: der Rahmen (Leiste, Einstieg, Stationen,
   Knoepfe, Schluss, Fuss) kommt von gauferdigital/style.css, die Gegenstaende (Mail, Zettel, PDF) sind neutrale
   Abbildungen im Fensterstil der Seite. Herkunft je Wert: demos/handwerk/README.md ("Woher"). */

/* Schriften wie gauferdigital.de (D-064), selbst ausgeliefert, Teilmenge latin (schrift/OFL.txt,
   schrift/figtree-OFL.txt). Archivo variabel: Gewicht 100-900, Breite 62-125 %. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("schrift/archivo-latin.woff2") format("woff2");
}
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("schrift/figtree-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("schrift/figtree-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("schrift/figtree-700-latin.woff2") format("woff2"); }

:root {
  --font-text: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-anzeige: "Archivo", "Figtree", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;

  /* Stufen von gauferdigital.de (--t-*): Text 17, Lead 19, klein 14, mini 13; Titel und Satz fliessend. */
  --type-label:           .8125rem;
  --type-small:           .875rem;
  --type-body:            1.0625rem;
  --type-knopf:           1.0625rem;
  --type-lead:            1.1875rem;
  --type-schritt:         1.375rem;
  --type-titel:           clamp(1.75rem, 1.4vw + 1.25rem, 2.5rem);
  --type-display:         clamp(2.125rem, 3vw + 1.1rem, 4rem);

  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  /* Radien der Seite: Knoepfe 6 px (--r), Fenster 12 px (--r-fenster). */
  --radius-xs:  6px;
  --radius-xl: 12px;

  /* Schatten der Fenster auf gauferdigital.de */
  --shadow-card: 0 24px 48px -30px rgba(20, 23, 26, .4);

  --control-height: 44px;
  --knopf-height:   44px;

  /* Farben von gauferdigital.de (style.css :root). Kontraste: Schrift auf Grund 16,4:1, Nebentext auf Grund
     6,1:1, auf Weiss 7,0:1; Grund auf Schrift (Demo-Leiste) 16,4:1. */
  --grund:        #eef0f2;
  --anthrazit:    #14171a;
  --leise:        #555b62;
  --linie:        #d3d7dc;

  /* Gegenstaende: weisse Fenster wie auf der Seite, neutrale Linien, kein Akzent. */
  --surface:      #ffffff;
  --surface-kopf: #f3f5f7;
  --objekt-linie: #e3e6ea;
}

/* Eine Flaeche fuer alle Abschnitte: hell wie die Seite, Abschnitte durch eine Linie getrennt. */
[data-flaeche] {
  --bg: var(--grund);
  --fg: var(--anthrazit);
  --nebentext: var(--leise);
  --titel: var(--anthrazit);
  --knopf: var(--anthrazit);
  --knopf-text: #ffffff;
  --ring: var(--anthrazit);
  --rand: var(--linie);
  background: var(--bg);
  color: var(--fg);
}

/* Demo-Leiste Gaufer Digital. Quelle: WEB_STYLEGUIDE 3.10, Fassung Gaufer Digital 2026-11-25 (PP-222):
   dunkles Band in der Schriftfarbe der Seite, links der Rueckweg mit der Wortmarke als SVG, rechts der Hinweis.
   Hoehe 44 px, Breite und Rand wie der Inhalt. Gleich in Handwerk, Websites und Camping (WSG-128). */
:root {
  --demo-leiste-bg:  #14171a;
  --demo-leiste-ink: #eef0f2;
}
.demo-leiste {
  background: var(--demo-leiste-bg);
  color: var(--demo-leiste-ink);
  font: 400 var(--type-label) / 1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-align: left;
}
.demo-leiste__inhalt {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-4);
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}
.demo-leiste a { color: inherit; text-decoration: none; }
.demo-leiste a:focus-visible { outline: 2px solid var(--demo-leiste-ink); outline-offset: -2px; border-radius: 3px; }
.demo-leiste__zurueck {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  white-space: nowrap;
}
/* Wortmarke "Gaufer Digital" als Pfad (aus Archivo, Gaufer 800, Digital 400, Breite 112 %), damit die Leiste
   ohne Schriftdatei in jeder Demo gleich aussieht. */
.demo-leiste__marke { display: block; height: 15px; width: auto; }
/* Der Pfeil rueckt beim Hovern, unterstrichen wird nichts (WSG-143). */
.demo-leiste__pfeil { display: block; flex: none; transition: transform 150ms ease-out; }
.demo-leiste__zurueck:hover .demo-leiste__pfeil { transform: translateX(-2px); }
@media (prefers-reduced-motion: reduce) {
  .demo-leiste__pfeil { transition: none; }
  .demo-leiste__zurueck:hover .demo-leiste__pfeil { transform: none; }
}
.demo-leiste__hinweis {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  line-height: var(--control-height);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .8;
}
.demo-leiste__kurz { display: none; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Grundlagen ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--anthrazit);
  font: 400 var(--type-body) / 1.5 var(--font-text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}
::selection { background: var(--anthrazit); color: var(--grund); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; }
:where(a, button):focus-visible { outline: 2px solid var(--ring, var(--anthrazit)); outline-offset: 3px; border-radius: 3px; }

/* Anzeige-Schnitt der Seite: Archivo 700, Breite 112 %, eng gesetzt. */
.anzeige {
  font-family: var(--font-anzeige);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

/* Gleiche Breite und Rand wie die Huelle auf gauferdigital.de. */
.breite {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

/* --- Knopf wie .knopf auf gauferdigital.de: 44 px, Radius 6 px, dunkel, hebt sich beim Hovern ------- */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--knopf-height);
  padding: 0 var(--space-5);
  border: 1px solid var(--knopf);
  border-radius: var(--radius-xs);
  background: var(--knopf);
  color: var(--knopf-text);
  font: 600 var(--type-knopf) / 1.25 var(--font-text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms, color 160ms;
}
.knopf:hover { transform: translateY(-1px); }
.knopf:active { transform: translateY(0); }
.knopf[disabled] { opacity: .5; pointer-events: none; }
.knopf--erledigt,
.knopf--erledigt:hover { background: transparent; color: var(--knopf); cursor: default; pointer-events: none; transform: none; }
.knopf__haken { flex: none; }

/* --- Einstieg -------------------------------------------------------- */
.einstieg { padding-block: var(--space-7) var(--space-6); }
.einstieg__oben { margin-bottom: var(--space-4); font-weight: 600; color: var(--nebentext); }
.einstieg h1 { max-width: 20ch; font-size: var(--type-display); }
.einstieg__text {
  max-width: 34rem;
  margin-top: var(--space-4);
  font-size: var(--type-lead);
  line-height: 1.55;
  color: var(--nebentext);
  text-wrap: pretty;
}

/* --- Zeitstrahl (WSG-140, wie components/ablauf-zeitstrahl.tsx): Linie 2 px in Textfarbe 35 %, Punkt in der
   Knopffarbe mit Rand in der Flaechenfarbe, Titel und ein Satz; jeder Titel springt zur Station. ------------ */
.zeitstrahl { position: relative; display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.zeitstrahl li { position: relative; display: grid; align-content: start; gap: var(--space-1); }
.zeitstrahl li::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 5px solid var(--bg);
  border-radius: 50%;
  background: var(--knopf);
  outline: 2px solid var(--knopf);
}
.zeitstrahl__titel {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: var(--control-height);
  font-size: var(--type-schritt);
  line-height: 1.1;
  font-family: var(--font-anzeige);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.zeitstrahl__titel:hover .zeitstrahl__wort { text-decoration: underline; text-decoration-thickness: 2px; }
.zeitstrahl p { color: var(--nebentext); }

/* --- Station: Vorher links, Nachher rechts --------------------------- */
.station { padding-block: var(--space-7); border-top: 1px solid var(--rand); }
.station h2 { font-size: var(--type-titel); color: var(--titel); }
.station { scroll-margin-top: 0; }
.station__wann { margin-top: var(--space-2); color: var(--nebentext); }
.station__teil { margin-top: var(--space-1); }
.station__teil strong { font-weight: 600; }
.paar {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
/* Beide Seiten gleich hoch: das Etikett oben, der Gegenstand fuellt den Rest. */
.paar__seite { display: grid; grid-template-rows: auto 1fr; gap: var(--space-3); min-width: 0; }
.etikett { font-size: var(--type-body); font-weight: 600; }
.paar__pfeil { display: flex; justify-content: center; color: var(--nebentext); }
.paar__pfeil svg { width: 28px; height: 28px; transform: rotate(90deg); }

/* --- Gegenstand Mail: Mailkopf, Text, Anhang. Neutral, ohne Akzent. --- */
.mail {
  background: var(--surface);
  color: var(--anthrazit);
  border: 1px solid var(--objekt-linie);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.mail__kopf {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--objekt-linie);
  background: var(--surface-kopf);
  font-size: var(--type-small);
}
.mail__kopf div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--space-2); }
.mail__kopf dt { color: var(--leise); }
.mail__kopf dd { min-width: 0; overflow-wrap: anywhere; }
.mail__betreff { font-weight: 600; }
.mail__text { display: grid; gap: var(--space-3); padding: var(--space-4); }
/* Anhang: kleines Vorschaubild, daneben Dateiname, "PDF oeffnen" und Freigeben. */
.anhang { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); }
.pdf {
  display: block;
  flex: none;
  width: 240px;
  border: 1px solid var(--objekt-linie);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--surface);
}
.pdf img { width: 100%; }
.pdf:hover { border-color: var(--leise); }
.anhang__seite { flex: 1 1 8rem; display: grid; gap: var(--space-2); justify-items: start; min-width: 0; }
.anhang__datei { display: grid; font-size: var(--type-small); }
.anhang__name { font-family: var(--font-mono); font-size: var(--type-label); color: var(--leise); overflow-wrap: anywhere; }
.anhang__datei a { display: inline-flex; align-items: center; min-height: var(--control-height); font-weight: 600; color: var(--anthrazit); text-decoration: underline; }
.anhang__datei a:hover { text-decoration-thickness: 2px; }

/* --- Freigabe -------------------------------------------------------- */
.freigabe {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  --knopf: var(--anthrazit);
  --knopf-text: #ffffff;
  --ring: var(--anthrazit);
}
.freigabe__status { font-size: var(--type-small); color: var(--leise); }
.freigabe__status:empty { display: none; }

/* Mail an den Kunden: antwortet auf "Freigeben" mit kurzem Einblenden (WSG-134, Handlung -> Antwort). */
.versand--ein { animation: versand-ein 200ms ease-out; }
@keyframes versand-ein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* --- Nach dem Freigeben: die Mail an den Kunden als Abbildung ------- */
.versand, .ablage { display: grid; align-content: start; gap: var(--space-3); min-width: 0; }
.versand__hinweis, .ablage__hinweis { font-size: var(--type-small); color: var(--nebentext); }
.datei {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: start;
  font-family: var(--font-mono);
  font-size: var(--type-label);
  color: var(--leise);
  overflow-wrap: anywhere;
}
.datei svg, .ordner__liste svg { flex: none; width: 20px; height: 20px; color: var(--leise); }

/* --- Abbildung Kundenordner (nur Bild, keine Funktion) ---------------- */
.ordner {
  background: var(--surface);
  color: var(--anthrazit);
  border: 1px solid var(--objekt-linie);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-size: var(--type-small);
}
.ordner__pfad {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--objekt-linie);
  background: var(--surface-kopf);
  color: var(--leise);
  overflow-wrap: anywhere;
}
.ordner__liste li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--objekt-linie);
  overflow-wrap: anywhere;
}
.ordner__liste li:last-child { border-bottom: 0; }

/* --- Gegenstand Auftragszettel: Papier mit Linien, neutral ------------ */
.zettel {
  background: var(--surface);
  color: var(--anthrazit);
  border: 1px solid var(--objekt-linie);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
}
.zettel__kopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--anthrazit);
}
.zettel__titel { font-weight: 700; }
.zettel__nr { font-family: var(--font-mono); color: var(--leise); }
.zettel__felder { display: grid; }
.zettel__felder div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-2);
  padding-block: var(--space-1);
  border-bottom: 1px solid var(--objekt-linie);
}
.zettel__felder dt { color: var(--leise); font-size: var(--type-small); }
.zettel table { width: 100%; margin-top: var(--space-2); border-collapse: collapse; }
.zettel caption { text-align: left; font-size: var(--type-small); color: var(--leise); }
.zettel td { padding: var(--space-1) 0; border-bottom: 1px solid var(--objekt-linie); text-align: left; vertical-align: top; }
.zettel .zahl { width: 3rem; padding-right: var(--space-2); white-space: nowrap; }
.zettel__notiz { margin-top: var(--space-3); }
.zettel__notiz span { display: block; font-size: var(--type-small); color: var(--leise); }


/* --- Schluss und Fuss wie auf gauferdigital.de: hell, Fuss mit Linie oben ----- */
.schluss { padding-block: var(--space-7); border-top: 1px solid var(--rand); }
.schluss__inhalt {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}
.schluss h2 { font-size: var(--type-titel); color: var(--titel); }
.schluss p { max-width: 40rem; margin-top: var(--space-2); font-size: var(--type-lead); line-height: 1.55; color: var(--nebentext); text-wrap: pretty; }
.fuss { border-top: 1px solid var(--rand); }
.fuss__inhalt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-5);
  padding-block: var(--space-1);
  font-size: var(--type-small);
  color: var(--nebentext);
}
.fuss__wege { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-5); }
.fuss p { display: inline-flex; align-items: center; min-height: var(--control-height); }
.fuss a { display: inline-flex; align-items: center; min-height: var(--control-height); color: var(--nebentext); text-decoration: none; transition: color 160ms; }
.fuss a:hover { color: var(--fg); }

/* --- Responsive-Schicht: Breakpoints aus 1.1 (650 / 920 px) ---------- */
@media (max-width: 650px) {
  .demo-leiste__voll { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .demo-leiste__kurz { display: inline; }
  .einstieg { padding-block: var(--space-6) var(--space-5); }
  .zeitstrahl { gap: var(--space-4); margin-top: var(--space-5); }
  .zeitstrahl li { gap: 0; }
  .station, .schluss { padding-block: var(--space-6); }
  .zettel__felder div { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .schluss .knopf { width: 100%; }
}
@media (min-width: 651px) {
  .zeitstrahl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); padding-top: 40px; }
  .zeitstrahl::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 11px;
    height: 2px;
    background: currentColor;
    opacity: .35;
  }
  .zeitstrahl li::before { position: absolute; top: -40px; left: 0; }
}
@media (min-width: 921px) {
  .paar { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: var(--space-6) var(--space-5); }
  .paar > .paar__seite, .paar > .paar__pfeil { grid-row: 1; }
  .versand { grid-column: 3; grid-row: 2; }
  .ablage { grid-column: 1; grid-row: 2; }
  .paar__pfeil { align-items: center; }
  .paar__pfeil svg { transform: none; }
  .schluss__inhalt { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .versand--ein { animation: none; }
}
