/*
 * TaskMonkey Website-Kopf und -Fuss (global, alle Seiten von taskmonkey.de
 * und die Loesungs-Landings). Quelle der Markup-Bausteine:
 * docs/design/site-chrome/{header,footer}.html, eingesetzt per
 * docs/design/site-chrome/sync.py. Regeln: docs/marketing/website-konzept.md
 * ("Navigation").
 *
 * Eigenstaendig: eigene Tokens (--tmg-*), eigene Klassen (tm-gh / tm-gf),
 * damit der Kopf auch auf aelteren Landings mit eigenem CSS gleich aussieht.
 * Werte = Landing-Kit (product-landing.css): Akzent #ED6A3D, Hell/Dunkel
 * per prefers-color-scheme; Seiten ohne Dunkel-Modus setzen
 * <html data-tm-chrome="light">, dunkle Seiten data-tm-chrome="dark".
 */
@font-face { font-family: "TM Sans"; src: url("fonts/source-sans-pro-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TM Sans"; src: url("fonts/source-sans-pro-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TM Sans"; src: url("fonts/source-sans-pro-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

.tm-gh, .tm-gf {
  --tmg-bg: #F2F4F5;
  --tmg-surface: #FFFFFF;
  --tmg-sunken: #E9EDEE;
  --tmg-text: #19272C;
  --tmg-muted: #4A5659;
  --tmg-border: #D1D9DC;
  --tmg-accent: #ED6A3D;
  --tmg-on-accent: #1A0F0A;
  --tmg-accent-text: #A8411B;
  --tmg-accent-soft: #FBE3D9;
  --tmg-shadow: 0 1px 2px rgba(25, 39, 44, .06), 0 24px 48px -24px rgba(25, 39, 44, .35);
  --tmg-sans: "TM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  font-family: var(--tmg-sans);
  color: var(--tmg-text);
  -webkit-font-smoothing: antialiased;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}
/* Seiten ohne Dunkel-Modus (aeltere Landings): <html data-tm-chrome="light"> */
@media (prefers-color-scheme: dark) {
  html:not([data-tm-chrome="light"]) .tm-gh, html:not([data-tm-chrome="light"]) .tm-gf {
    --tmg-bg: #0A0E10;
    --tmg-surface: #101518;
    --tmg-sunken: #151C21;
    --tmg-text: #ECEDEE;
    --tmg-muted: #A2AAAF;
    --tmg-border: #202B32;
    --tmg-accent-text: #F59A78;
    --tmg-accent-soft: rgba(237, 106, 61, .18);
    --tmg-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 48px -24px rgba(0, 0, 0, .8);
  }
}
/* Dunkle Seiten (z. B. /werkstatt/, Handbuch im Dunkel-Modus) erzwingen den
   dunklen Kopf: <html data-tm-chrome="dark"> */
html[data-tm-chrome="dark"] .tm-gh, html[data-tm-chrome="dark"] .tm-gf {
  --tmg-bg: #0A0E10;
  --tmg-surface: #101518;
  --tmg-sunken: #151C21;
  --tmg-text: #ECEDEE;
  --tmg-muted: #A2AAAF;
  --tmg-border: #202B32;
  --tmg-accent-text: #F59A78;
  --tmg-accent-soft: rgba(237, 106, 61, .18);
  --tmg-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 48px -24px rgba(0, 0, 0, .8);
}
html[data-tm-chrome="dark"] .tm-gh-logo .tm-gh-logo-light { display: none; }
html[data-tm-chrome="dark"] .tm-gh-logo .tm-gh-logo-dark { display: block; }
.tm-gh *, .tm-gh *::before, .tm-gh *::after,
.tm-gf *, .tm-gf *::before, .tm-gf *::after { box-sizing: border-box; }
.tm-gh a:focus-visible, .tm-gh summary:focus-visible, .tm-gf a:focus-visible { outline: 3px solid var(--tmg-accent); outline-offset: 3px; border-radius: 6px; }

/* Logo (hell/dunkel) */
.tm-gh-logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; border: 0; background: none; padding: 0; margin: 0; }
.tm-gh-logo img { display: block; height: 28px; width: auto; max-width: none; margin: 0; }
.tm-gh-logo .tm-gh-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-tm-chrome="light"]) .tm-gh-logo .tm-gh-logo-light { display: none; }
  html:not([data-tm-chrome="light"]) .tm-gh-logo .tm-gh-logo-dark { display: block; }
}

/* Kopf */
header.tm-gh {
  position: sticky; top: env(safe-area-inset-top, 0px); left: auto; right: auto; z-index: 50;
  display: block; width: auto; height: auto; margin: 0; padding: 0;
  background: color-mix(in srgb, var(--tmg-bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 0; border-bottom: 1px solid var(--tmg-border); border-radius: 0; box-shadow: none;
  font-size: 16px; line-height: 1.4;
  transform: none;
}
.tm-gh-row {
  display: flex; align-items: center; gap: 8px;
  width: min(1180px, 100% - 40px); min-height: 68px; margin: 0 auto; padding: 0;
}
.tm-gh-nav { font: 600 16px/1 var(--tmg-sans); display: flex; align-items: center; gap: 2px; margin: 0 0 0 20px; padding: 0; background: none; border: 0; position: static; }
.tm-gh-nav > a, .tm-gh-drop > summary, .tm-gh-login {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px; margin: 0; border-radius: 8px;
  color: var(--tmg-muted); background: none; border: 0;
  font: 600 16px/1 var(--tmg-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.tm-gh-nav > a:hover, .tm-gh-drop > summary:hover, .tm-gh-login:hover, .tm-gh-drop[open] > summary { color: var(--tmg-text); background: var(--tmg-sunken); }
.tm-gh-login { margin-left: auto; }
.tm-gh summary { list-style: none; }
.tm-gh summary::-webkit-details-marker { display: none; }
.tm-gh summary::marker { content: ""; }
.tm-gh-drop { position: relative; margin: 0; padding: 0; border: 0; }
.tm-gh-drop > summary::after {
  content: ""; width: 7px; height: 7px; margin: -3px 0 0 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.tm-gh-drop[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.tm-gh-panel {
  position: absolute; top: calc(100% + 10px); left: -8px; z-index: 60;
  width: 360px; padding: 10px; margin: 0;
  background: var(--tmg-surface); border: 1px solid var(--tmg-border); border-radius: 14px; box-shadow: var(--tmg-shadow);
}
.tm-gh .tm-gh-group {
  margin: 8px 10px 4px; padding: 0;
  font: 700 12px/1.3 var(--tmg-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--tmg-accent-text);
}
.tm-gh-panel a {
  display: block; padding: 9px 10px; margin: 0; border-radius: 10px;
  color: var(--tmg-text); text-decoration: none; background: none; border: 0;
}
.tm-gh-panel a:hover { background: var(--tmg-sunken); }
.tm-gh-panel b { display: block; font: 700 16px/1.3 var(--tmg-sans); color: var(--tmg-text); }
.tm-gh-panel span { display: block; margin-top: 2px; font: 400 14px/1.35 var(--tmg-sans); color: var(--tmg-muted); }
.tm-gh-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; margin: 0 0 0 6px; border: 0; border-radius: 999px;
  background: var(--tmg-accent); color: var(--tmg-on-accent);
  font: 700 15px/1 var(--tmg-sans); text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.tm-gh-cta:hover { color: var(--tmg-on-accent); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(237, 106, 61, .9); }

/* Mobil: Menue-Knopf mit Blatt */
.tm-gh-burger { display: none; position: static; margin: 0; padding: 0; border: 0; }
.tm-gh-burger > summary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; border-radius: 10px; cursor: pointer;
  color: var(--tmg-text); background: none; border: 1px solid var(--tmg-border);
}
.tm-gh-burger[open] > summary { background: var(--tmg-sunken); }
.tm-gh-sheet {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  max-height: calc(100vh - 80px); overflow-y: auto;
  padding: 10px 20px 22px; margin: 0;
  background: var(--tmg-surface); border-bottom: 1px solid var(--tmg-border); box-shadow: var(--tmg-shadow);
}
.tm-gh-sheet a {
  display: block; padding: 11px 10px; margin: 0; border-radius: 10px;
  color: var(--tmg-text); background: none; border: 0;
  font: 600 17px/1.3 var(--tmg-sans); text-decoration: none;
}
.tm-gh-sheet a:hover { background: var(--tmg-sunken); }
.tm-gh-sheet hr { border: 0; border-top: 1px solid var(--tmg-border); margin: 10px 0; height: 0; background: none; }

@media (max-width: 1060px) {
  .tm-gh-nav, .tm-gh-login { display: none; }
  .tm-gh-cta { margin-left: auto; }
  .tm-gh-burger { display: block; }
}
@media (max-width: 420px) {
  .tm-gh-row { gap: 6px; }
  .tm-gh-logo img { height: 24px; }
  .tm-gh-cta { padding: 0 14px; font-size: 14px; }
}

/* Kampagnen-Kopf: nur Logo + CTA (Regel siehe website-konzept.md) */
.tm-kampagne .tm-gh-nav, .tm-kampagne .tm-gh-login, .tm-kampagne .tm-gh-burger { display: none; }
.tm-kampagne .tm-gh-cta { margin-left: auto; }

/* Fuss */
footer.tm-gf {
  display: block; position: static; margin: 0; padding: 56px 0 30px;
  background: var(--tmg-bg); color: var(--tmg-muted);
  border: 0; border-top: 1px solid var(--tmg-border); border-radius: 0;
  font-size: 15px; line-height: 1.55;
}
.tm-gf-wrap { width: min(1180px, 100% - 40px); margin: 0 auto; padding: 0; }
.tm-gf-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.tm-gf p { margin: 0; padding: 0; color: var(--tmg-muted); font: 400 15px/1.55 var(--tmg-sans); }
.tm-gf-brand p { margin-top: 14px; max-width: 28em; }
.tm-gf nav { font: 400 15px/1.55 var(--tmg-sans); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding: 0; background: none; border: 0; position: static; }
.tm-gf .tm-gf-head { margin-bottom: 4px; font: 700 12px/1.3 var(--tmg-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--tmg-text); }
.tm-gf a { color: var(--tmg-muted); text-decoration: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; overflow-wrap: anywhere; }
.tm-gf a:hover { color: var(--tmg-text); text-decoration: underline; text-underline-offset: 3px; }
.tm-gf-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 22px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--tmg-border);
  font: 400 14px/1.5 var(--tmg-sans); color: var(--tmg-muted);
}
@media (max-width: 960px) { .tm-gf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tm-gf-brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .tm-gf-grid { grid-template-columns: minmax(0, 1fr); } }
/* "Made with ♥ in Bremen · by meco" (Herz als Inline-SVG, meco-Logo grau) */
.tm-gf-made { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.tm-gf .tm-gf-heart { display: inline-block; width: 14px; height: 14px; color: var(--tmg-accent); }
.tm-gf a.tm-gf-meco { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.tm-gf a.tm-gf-meco:hover { text-decoration: none; }
.tm-gf-meco img { display: block; height: 13px; width: auto; opacity: .85; }
.tm-gf a.tm-gf-meco:hover img { opacity: 1; }
@media (prefers-color-scheme: dark) { html:not([data-tm-chrome="light"]) .tm-gf-meco img { filter: brightness(2.2); } }
html[data-tm-chrome="dark"] .tm-gf-meco img { filter: brightness(2.2); }
