/* ==========================================================================
   Vorlage 08 Software / Tool · Einsatzbrett (Demo)
   --------------------------------------------------------------------------
   Hell wie Papier, Tintenschwarz, Kobalt als einziger Akzent. Bewusst nicht
   dunkel mit Leuchtfarben. Die Programmansicht ist eine echte HTML-Tabelle.
   Umfärben: nur die Werte unter „Farben" ändern.
   Bewegung: im <html>-Tag data-bewegung="starr | mittel | dynamisch".
   ========================================================================== */

/* ---------- Schriften (lokal, SIL Open Font License, Lizenz in fonts/) ---------- */
@font-face {
  font-family: "Chivo";
  src: url("../fonts/chivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Chivo Mono";
  src: url("../fonts/chivo-mono-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* ---------- Farben ---------- */
  --papier: #f7f7f5;           /* Seitenhintergrund */
  --flaeche: #fdfdfc;          /* Programmansicht, Preisstufen */
  --flaeche-grau: #efeff0;     /* Spalte „Offen", Fuß */
  --tinte: #111318;            /* Schrift, Preisstufe „Betrieb" */
  --tinte-leise: #555b66;      /* Nebentext, 6,5:1 auf Papier */
  --linie: #dcdde0;
  --kobalt: #2346d6;           /* der eine Akzent: Knöpfe, Nummern, Links. Weiße Schrift darauf 7:1 */
  --kobalt-tief: #1a36ab;
  --text-hell: #f7f7f5;
  --text-hell-leise: #b8bcc6;
  /* Farben der Auftragsarten in der Programmansicht (Daten, kein Schmuck) */
  --typ-heizung: #fde6c6;  --typ-heizung-text: #5c3300;
  --typ-elektro: #dce4ff;  --typ-elektro-text: #1b2f7a;
  --typ-sanitaer: #d4efe8; --typ-sanitaer-text: #0c4a3f;
  --typ-service: #f6e0e1;  --typ-service-text: #6e1d28;
  --fokus: var(--kobalt);

  /* ---------- Schrift ---------- */
  --schrift: "Chivo", "Segoe UI", system-ui, sans-serif;
  --schrift-mono: "Chivo Mono", Consolas, "Courier New", monospace;

  /* ---------- Maße ---------- */
  --breite: 76rem;
  --rand: clamp(1rem, 4vw, 3rem);
  --abschnitt: clamp(4.5rem, 9vw, 8rem);
  --ecke: 10px;                /* Karten und Programmansicht */
  --ecke-klein: 6px;           /* Knöpfe, Einsätze */
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font-family: var(--schrift); font-size: 1.0625rem; line-height: 1.6;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }
main { overflow-x: clip; }
.mono { font-family: var(--schrift-mono); font-variant-numeric: tabular-nums; }

.behaelter { width: min(100% - 2 * var(--rand), var(--breite)); margin-inline: auto; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprunglink { position: absolute; left: var(--rand); top: -4rem; z-index: 20; background: var(--tinte); color: var(--text-hell); padding: .75rem 1rem; border-radius: var(--ecke-klein); }
.sprunglink:focus { top: .75rem; }

.abschnitt-titel {
  font-weight: 800; font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.08; letter-spacing: -.03em; max-width: 24ch;
}

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.3rem;
  background: var(--kobalt); color: #fff;
  border: 1.5px solid var(--kobalt); border-radius: var(--ecke-klein);
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
}
.knopf:hover { background: var(--kobalt-tief); border-color: var(--kobalt-tief); }
.knopf-leise { background: transparent; color: var(--tinte); border-color: var(--tinte); }
.knopf-leise:hover { background: var(--tinte); color: var(--text-hell); border-color: var(--tinte); }
.knopf-klein { min-height: 2.5rem; padding: .5rem 1rem; font-size: .9375rem; }

/* ---------- Bildrahmen (Platzhalter für Fotos) ---------- */
.bild-platzhalter {
  position: relative; display: flex; align-items: flex-end;
  aspect-ratio: var(--format, 3 / 2);
  background:
    linear-gradient(90deg, var(--linie) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(var(--linie) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--flaeche-grau);
  border: 1px solid var(--linie); border-radius: var(--ecke);
  overflow: hidden;
}
.bild-platzhalter figcaption {
  margin: .7rem; padding: .4rem .6rem; max-width: calc(100% - 1.4rem);
  background: var(--flaeche); color: var(--tinte); border-radius: var(--ecke-klein);
  font-size: .75rem; line-height: 1.35;
}

/* ---------- Kopf ---------- */
.kopf { border-bottom: 1px solid var(--linie); background: var(--papier); }
.kopf-innen { display: flex; align-items: center; gap: 1.75rem; min-height: 4.25rem; }
.marke { font-weight: 900; font-size: 1.375rem; letter-spacing: -.04em; text-decoration: none; margin-right: auto; }
.kopf-nav ul { display: flex; gap: 1.6rem; }
.kopf-nav a { text-decoration: none; font-weight: 500; font-size: .96875rem; color: var(--tinte-leise); }
.kopf-nav a:hover { color: var(--tinte); }
@media (max-width: 47.99rem) { .kopf-nav { display: none; } }

/* ---------- 1 · Erster Bildschirm ---------- */
.held { padding-top: clamp(3rem, 7vw, 6rem); overflow-x: clip; }
.held h1 {
  font-weight: 800; font-size: clamp(2.5rem, 1.35rem + 4.4vw, 5.25rem);
  line-height: 1.02; letter-spacing: -.04em; max-width: 15ch;
}
.held-satz { margin-top: 1.5rem; font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); color: var(--tinte-leise); max-width: 44ch; }
.held-aktion { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Programmansicht ----------
   Steht mittig über die volle Inhaltsbreite. Bis 24.09.2026 lief sie rechts bis an den
   Fensterrand; einseitig an den Rand greifen ist ein Fehler (STATUS.md, Entscheidung 8). */
.programm {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--ecke);
  box-shadow: 0 30px 60px -30px rgb(17 19 24 / .25), 0 2px 6px -2px rgb(17 19 24 / .08);
  overflow: hidden;
}
.programm-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--linie); }
.programm-titel { font-weight: 700; }
.programm-zeitraum { font-size: .8125rem; color: var(--tinte-leise); margin-right: auto; }
.programm-ansicht { display: inline-flex; border: 1px solid var(--linie); border-radius: var(--ecke-klein); padding: 2px; font-size: .8125rem; }
.programm-ansicht span { padding: .2rem .65rem; border-radius: 4px; }
.programm-ansicht .aktiv { background: var(--tinte); color: var(--text-hell); }
.programm-inhalt { display: grid; }
.plan { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .8125rem; }
.plan thead th { font-family: var(--schrift-mono); font-weight: 400; font-size: .75rem; color: var(--tinte-leise); text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--linie); }
.plan thead th:first-child { width: 9.5rem; }
.plan tbody th { text-align: left; font-weight: 700; padding: .55rem .5rem .55rem 1.1rem; vertical-align: top; border-bottom: 1px solid var(--linie); }
.quali { display: block; font-weight: 400; font-size: .75rem; color: var(--tinte-leise); }
.plan td { padding: .35rem .3rem; vertical-align: top; border-bottom: 1px solid var(--linie); border-left: 1px dashed var(--linie); }
.plan tbody tr:last-child th, .plan tbody tr:last-child td { border-bottom: 0; }
.einsatz { display: grid; gap: .05rem; padding: .45rem .55rem; border-radius: var(--ecke-klein); line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }
.einsatz .zeit { font-size: .6875rem; font-weight: 500; }
.einsatz .ort { font-size: .75rem; font-weight: 400; }
.typ-heizung  { background: var(--typ-heizung);  color: var(--typ-heizung-text); }
.typ-elektro  { background: var(--typ-elektro);  color: var(--typ-elektro-text); }
.typ-sanitaer { background: var(--typ-sanitaer); color: var(--typ-sanitaer-text); }
.typ-service  { background: var(--typ-service);  color: var(--typ-service-text); }
.einsatz-neu { box-shadow: 0 0 0 2px var(--kobalt); }
.frei { padding: .45rem .55rem; border-radius: var(--ecke-klein); font-size: .75rem; color: var(--tinte-leise); background: repeating-linear-gradient(45deg, var(--flaeche-grau) 0 6px, transparent 6px 12px); }
.offen { background: var(--flaeche-grau); padding: .9rem 1rem; display: grid; gap: .5rem; align-content: start; border-top: 1px solid var(--linie); font-size: .8125rem; }
.offen-titel { font-weight: 700; font-size: .875rem; }
.offen-titel .mono { font-weight: 500; color: var(--tinte-leise); margin-left: .25rem; }
.programm-legende { padding: .6rem 1.1rem; font-size: .75rem; color: var(--tinte-leise); border-top: 1px solid var(--linie); }
/* Tablet: Montag bis Mittwoch. Handy: Montag und Dienstag. So bleibt die Tabelle lesbar. */
@media (max-width: 63.99rem) {
  .plan th:nth-child(n+5), .plan td:nth-child(n+5) { display: none; }
}
@media (max-width: 47.99rem) {
  .plan th:nth-child(n+4), .plan td:nth-child(n+4) { display: none; }
  .plan thead th:first-child { width: 7.5rem; }
  .plan tbody th { padding-left: .8rem; }
}
@media (min-width: 64rem) {
  .programm-inhalt { grid-template-columns: 1fr 15rem; }
  .offen { border-top: 0; border-left: 1px solid var(--linie); }
}

/* ---------- 2 · Zahlenleiste ---------- */
.zahlen { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.zahlen-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
.zahlen-liste > div { display: flex; flex-direction: column-reverse; gap: .35rem; border-top: 1px solid var(--tinte); padding-top: 1rem; }
.zahlen-liste dt { font-size: .9375rem; color: var(--tinte-leise); max-width: 20ch; }
.zahlen-liste dd { font-size: clamp(2.25rem, 1.5rem + 2.4vw, 3.5rem); line-height: 1; letter-spacing: -.03em; font-weight: 500; }
.zahlen-liste [data-zaehlen] { display: inline-block; }
@media (min-width: 60rem) { .zahlen-liste { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 3 · Funktionen ---------- */
.funktionen { padding-block: 0 var(--abschnitt); }
.funktionsliste { margin-top: 2.75rem; display: grid; gap: 2.25rem 3rem; }
.funktionsliste li { display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; row-gap: .3rem; }
.nummer { grid-row: 1 / 3; font-size: 1.75rem; font-weight: 500; color: var(--kobalt); line-height: 1.1; }
.funktionsliste h3 { font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.funktionsliste p { color: var(--tinte-leise); max-width: 42ch; }
@media (min-width: 52rem) { .funktionsliste { grid-template-columns: 1fr 1fr; } }

/* ---------- 4 · Kundenbeispiel ---------- */
.kunde { padding-block: var(--abschnitt); border-top: 1px solid var(--linie); }
.kunde-raster { display: grid; gap: 2.5rem; align-items: center; }
.kunde-zahl { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.5rem); line-height: 1; letter-spacing: -.04em; margin-bottom: 1.25rem; }
.kunde-zahl .mono:last-child { color: var(--kobalt); }
/* Pfeil aus Linie und Spitze, kein Symbolbild */
.pfeil { position: relative; display: inline-block; width: 2.2em; height: .08em; min-height: 3px; background: var(--tinte); }
.pfeil::after { content: ""; position: absolute; right: 0; top: 50%; width: .35em; height: .35em; border-top: .08em solid var(--tinte); border-right: .08em solid var(--tinte); transform: translateY(-50%) rotate(45deg); }
.kunde-zitat { margin: 1.75rem 0 0; }
.kunde-zitat p { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.625rem); line-height: 1.4; font-weight: 500; max-width: 34ch; }
.kunde-zitat p::before { content: "„"; }
.kunde-zitat p::after { content: "\201C"; }
.kunde-name { margin-top: 1rem; color: var(--tinte-leise); font-weight: 600; }
@media (min-width: 56rem) { .kunde-raster { grid-template-columns: 4fr 7fr; gap: clamp(3rem, 6vw, 6rem); } }

/* ---------- 5 · Preise ---------- */
.preise { padding-block: var(--abschnitt); background: var(--flaeche-grau); }
.preise-satz { margin-top: 1rem; color: var(--tinte-leise); }
.stufen { margin-top: 2.5rem; display: grid; gap: 1rem; align-items: start; }
.stufe { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--ecke); padding: 1.6rem; display: grid; gap: .5rem; }
.stufe h3 { font-weight: 800; font-size: 1.375rem; }
.stufe-fuer { color: var(--tinte-leise); font-size: .9375rem; }
.stufe-preis { font-size: .9375rem; margin-top: .5rem; }
.stufe-preis .mono { font-size: 2.5rem; letter-spacing: -.04em; font-weight: 500; margin-right: .35rem; }
.stufe-liste { margin-top: .75rem; display: grid; gap: .4rem; font-size: .9375rem; }
.stufe-liste li { padding-left: 1.25rem; position: relative; }
.stufe-liste li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .3rem; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.stufe-betrieb { background: var(--tinte); color: var(--text-hell); border-color: var(--tinte); --fokus: #9fb2ff; }
.stufe-betrieb .stufe-fuer { color: var(--text-hell-leise); }
.stufe-betrieb .knopf { margin-top: 1rem; justify-self: start; }
.demo-meldung:empty { display: none; }
.demo-meldung { font-size: .875rem; background: rgb(247 247 245 / .12); padding: .6rem .8rem; border-radius: var(--ecke-klein); }
.preise-hinweis { margin-top: 1.5rem; font-size: .875rem; color: var(--tinte-leise); }
@media (min-width: 60rem) { .stufen { grid-template-columns: 1fr 1.15fr 1fr; } }

/* ---------- 6 · Änderungsprotokoll ---------- */
.neu { padding-block: var(--abschnitt); }
.neu-raster { display: grid; gap: 2rem 4rem; }
.protokoll { display: grid; }
.protokoll li { display: grid; gap: .2rem; padding-block: 1.1rem; border-top: 1px solid var(--linie); }
.protokoll li:last-child { border-bottom: 1px solid var(--linie); }
.protokoll time { font-size: .8125rem; color: var(--kobalt); }
.protokoll h3 { font-weight: 800; font-size: 1.1875rem; }
.protokoll p { color: var(--tinte-leise); max-width: 52ch; }
@media (min-width: 56rem) { .neu-raster { grid-template-columns: 4fr 8fr; } }

/* ---------- Kontakt ---------- */
.kontakt { padding-block: 0 var(--abschnitt); }
.kontakt-raster { display: grid; gap: 1rem; border-top: 2px solid var(--tinte); padding-top: 2.5rem; }
.kontakt-raster > p:not(.kontakt-wege) { max-width: 48ch; color: var(--tinte-leise); font-size: 1.125rem; }
.kontakt-wege { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: clamp(1.25rem, 1.05rem + .8vw, 1.75rem); font-weight: 700; }

/* ---------- Fuß ---------- */
.fuss { background: var(--flaeche-grau); padding-top: clamp(3rem, 6vw, 4rem); font-size: .9375rem; border-top: 1px solid var(--linie); }
.fuss-raster { display: grid; gap: 1.75rem; }
.fuss-raster p + p { margin-top: .75rem; }
.fuss-marke { font-weight: 900; font-size: 1.75rem; letter-spacing: -.04em; margin-bottom: .6rem; }
.fuss address { font-style: normal; line-height: 1.7; }
.fuss-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.fuss-demo { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--linie); color: var(--tinte-leise); font-size: .875rem; }
/* D29: letzte Zeile, ganz unten mittig */
.fuss-zeile { width: 100%; max-width: none; text-align: center; padding: 1.5rem 1rem 1.25rem; font-size: .8125rem; color: var(--tinte-leise); }
@media (min-width: 48rem) { .fuss-raster { grid-template-columns: 4fr 5fr 3fr; } }

/* ==========================================================================
   Bewegung (Grundstufe dieser Vorlage: dynamisch)
   starr      – nichts bewegt sich
   mittel     – erster Bildschirm blendet ein, ein Auftrag springt sichtbar in den Plan,
                Zahlen zählen hoch, Abschnitte erscheinen beim Scrollen
   dynamisch  – dazu richtet sich die Programmansicht beim Scrollen aus der Schräge auf
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  :root.js:not([data-bewegung="starr"]) [data-auftritt] { transition: opacity .7s var(--ease), transform .7s var(--ease); }
  :root.js:not([data-bewegung="starr"]) [data-auftritt]:not(.ist-sichtbar) { opacity: 0; transform: translateY(1.25rem); }

  :root:not([data-bewegung="starr"]) .held h1 { animation: rein .9s var(--ease) both; }
  :root:not([data-bewegung="starr"]) .held-satz { animation: rein .9s var(--ease) .1s both; }
  :root:not([data-bewegung="starr"]) .held-aktion { animation: rein .9s var(--ease) .2s both; }

  /* Ein Auftrag wird eingeplant: er springt in den Mittwoch, der Rahmen leuchtet kurz */
  :root.js:not([data-bewegung="starr"]) .programm:not(.linie-da) .einsatz-neu { opacity: 0; transform: translate(2.5rem, -1rem) scale(.8); }
  :root.js:not([data-bewegung="starr"]) .programm.linie-da .einsatz-neu { animation: einplanen 1s var(--ease) .6s both; }

  :root:not([data-bewegung="starr"]) .knopf { transition: background-color .2s, color .2s, transform .2s var(--ease); }
  :root:not([data-bewegung="starr"]) .knopf:active { transform: scale(.97); }
}
@keyframes rein { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
@keyframes einplanen {
  0%   { opacity: 0; transform: translate(2.5rem, -1rem) scale(.8); box-shadow: 0 0 0 2px var(--kobalt), 0 12px 24px -8px rgb(35 70 214 / .5); }
  60%  { opacity: 1; transform: none; box-shadow: 0 0 0 4px var(--kobalt), 0 12px 24px -8px rgb(35 70 214 / .4); }
  100% { opacity: 1; transform: none; box-shadow: 0 0 0 2px var(--kobalt); }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    :root[data-bewegung="dynamisch"] .programm { animation: aufrichten linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; transform-origin: 50% 0; }
    :root[data-bewegung="dynamisch"] .funktionsliste li { animation: rein linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
  }
}
@keyframes aufrichten {
  /* nur kippen, nicht verblassen: blasse Schrift hätte zu wenig Kontrast */
  from { transform: perspective(1600px) rotateX(16deg) scale(.95); }
  to   { transform: none; }
}

/* Drucken: keine Bewegung, alles sichtbar */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-auftritt], .einsatz-neu { opacity: 1 !important; transform: none !important; }
}
