/*
 * ZuseCRM Website – Kopf- und Fußzeile (Relaunch 2026-10, docs_local/WEBSITE_KONZEPT.md)
 *
 * Tokens aus web/src/styles/shared.ts (--z-*). Alle Regeln sind auf .zs-* gekapselt,
 * weil Kopf und Fuß auch in Altseiten (Impressum, AGB …) per JavaScript eingesetzt werden,
 * deren eigenes CSS sonst kollidiert. Seiteninhalte stylt static/site/site.css.
 * Keine Google-Farben, keine Animationen außer Farbwechseln.
 */
:root {
  /* Marke D3 „Vier Sprechblasen“ (brand/README.md) */
  --zuse-mark-1: #D46A17;
  --zuse-mark-2: #3B32C8;
  --zuse-mark-3: #2A2391;
  --zuse-mark-4: #6B63D9;
  --zuse-indigo: #3B32C8;
  --zuse-orange: #FF9F43;
  --zuse-ink: #16151F;
  --zuse-graphite: #1E1E24;
  --zuse-line: #E0DFE6;
  --z-primary: var(--zuse-indigo);
  --z-primary-hover: #2F28A6;
  --z-primary-pressed: #2A2391;
  --z-primary-soft: #f4f3ff;
  --z-primary-container: #e0e7ff;
  --z-on-primary: #ffffff;
  --z-on-primary-container: #2e2a7a;
  --z-surface: #ffffff;
  --z-surface-dim: #f6f9fc;
  --z-surface-container: #eef2f8;
  --z-on-surface: #1a1f36;
  --z-on-surface-variant: #475569;
  --z-outline: #e3e8ee;
  --z-outline-accent: #c9cff8;
  --z-radius-s: 8px;
  --z-radius-m: 12px;
  --z-radius-l: 16px;
  --z-shadow-card: 0 1px 2px rgba(26, 31, 54, 0.06), 0 12px 32px rgba(26, 31, 54, 0.08);
  --z-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --z-gutter: clamp(16px, 4vw, 32px);
  --z-content: 1280px;  /* 12.11.2026: vorher 1120 px, Nico: Inhalt zu schmal */
  --z-container-max: calc(var(--z-content) + 2 * var(--z-gutter));
}
/* ab 1100 px mindestens 32 px Außenrand zusätzlich zum Gutter: Personenfotos der Startseite ragen bis 48 px über den Inhalt hinaus */
@media (min-width: 1100px) { :root { --z-container-max: min(calc(var(--z-content) + 2 * var(--z-gutter)), calc(100vw - 64px)); } }


/* Altseiten laden den Kopf in <div id="site-nav">; so bleibt er dort sticky. */
#site-nav { display: contents; }

.zs-skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 16px; background: var(--z-on-surface); color: #fff; border-radius: var(--z-radius-s);
  font: 600 1rem/1.4 var(--z-font); text-decoration: none;
}
.zs-skip:focus { top: 12px; color: #fff; }

.zs-header, .zs-footer {
  font-family: var(--z-font);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.zs-header *, .zs-footer * { box-sizing: border-box; }
.zs-header :focus-visible, .zs-footer :focus-visible {
  outline: 3px solid var(--z-primary); outline-offset: 3px; border-radius: 4px;
}

/* ── Ankündigungsband (nur Vorschau-Modus, components/ankuendigung.html) ── */
.zs-announce {
  background: var(--z-primary-soft); border-bottom: 1px solid var(--z-outline-accent);
  color: var(--z-on-primary-container); font-family: var(--z-font);
}
.zs-announce p {
  max-width: var(--z-container-max); margin: 0 auto; padding: 10px var(--z-gutter);
  font-size: 1rem; line-height: 1.5; text-align: center;
}
.zs-announce a { color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.zs-announce a:hover { color: var(--z-primary-pressed); }

/* ── Kopfzeile ── */
.zs-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--z-outline);
  color: var(--z-on-surface);
  line-height: 1.4;
}
.zs-header-inner {
  position: relative;
  display: flex; align-items: center; gap: 24px;
  width: 100%; max-width: var(--z-container-max);
  min-height: 64px; margin: 0 auto; padding: 0 var(--z-gutter);
}

/* Wortmarke: einzige Stelle des Logos (zusammen mit footer.html). */
.zs-logo {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--z-on-surface); text-decoration: none;
  font-size: 1.25rem; font-weight: 750; letter-spacing: -0.015em; white-space: nowrap;
}
.zs-logo:hover { color: var(--z-on-surface); }
.zs-logo img { display: block; height: 32px; width: auto; }
.zs-footer .zs-logo img { height: 28px; }

.zs-nav { display: flex; gap: 2px; margin-left: 4px; }
.zs-header .zs-nav a, .zs-header .zs-login {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--z-on-surface); text-decoration: none;
  font-size: 1rem; font-weight: 500; border-radius: var(--z-radius-s); white-space: nowrap;
}
.zs-header .zs-nav a:hover, .zs-header .zs-login:hover { background: var(--z-surface-dim); color: var(--z-on-surface); }
.zs-header .zs-nav a[aria-current] { color: var(--z-primary-hover); font-weight: 650; }

.zs-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.zs-header .zs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px;
  font-size: 1rem; font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.zs-header .zs-btn-primary { background: var(--z-primary-hover); color: var(--z-on-primary); }
.zs-header .zs-btn-primary:hover { background: var(--z-primary-pressed); color: var(--z-on-primary); }
.zs-header .zs-btn-secondary { background: #fff; color: var(--z-primary-hover); border-color: var(--z-outline-accent); }
.zs-header .zs-btn-secondary:hover { background: var(--z-primary-soft); color: var(--z-primary-pressed); }

/* Mobiles Menü ohne JavaScript */
.zs-menu { display: none; }
.zs-header .zs-menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--z-outline); border-radius: 10px; background: #fff;
  color: var(--z-on-surface); font-size: 1rem; font-weight: 600;
}
.zs-header .zs-menu > summary::-webkit-details-marker { display: none; }
.zs-header .zs-menu[open] > summary { background: var(--z-surface-dim); }
.zs-menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--z-outline);
  box-shadow: 0 12px 24px rgba(26, 31, 54, 0.08);
  padding: 8px var(--z-gutter) 16px;
}
.zs-menu-panel ul { list-style: none; margin: 0; padding: 0; }
.zs-header .zs-menu-panel a {
  display: flex; align-items: center; min-height: 48px;
  color: var(--z-on-surface); text-decoration: none; font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid var(--z-outline);
}
.zs-header .zs-menu-panel li:last-child a { border-bottom: 0; }
.zs-header .zs-menu-panel a[aria-current] { color: var(--z-primary-hover); font-weight: 650; }

@media (max-width: 1180px) {
  .zs-nav, .zs-header .zs-login, .zs-header .zs-hide-md { display: none; }
  .zs-menu { display: block; }
}
@media (max-width: 560px) {
  .zs-header .zs-hide-sm { display: none; }
}
@media (max-width: 400px) {
  .zs-header-inner { gap: 8px; }
  .zs-actions { gap: 6px; }
  .zs-header .zs-btn { padding: 0 12px; }
  .zs-header .zs-menu > summary { padding: 0 12px; }
}
@media (max-width: 360px) {
  .zs-logo img { height: 28px; }
  .zs-header .zs-btn { padding: 0 10px; font-size: 1rem; }
  .zs-header .zs-menu > summary { padding: 0 10px; font-size: 1rem; }
}

/* ── Fußzeile ── */
.zs-footer {
  padding: 64px 0 40px; border-top: 1px solid var(--z-outline); background: var(--z-surface);
  color: var(--z-on-surface-variant); font-size: 1rem; line-height: 1.65;
}
.zs-footer-inner {
  width: 100%; max-width: var(--z-container-max);
  margin: 0 auto; padding: 0 var(--z-gutter);
}
.zs-footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.zs-footer ul { list-style: none; margin: 0; padding: 0; }
.zs-footer li + li { margin-top: 10px; }
.zs-footer p { margin: 0; }
.zs-footer .zs-footer-title { font-size: 1rem; font-weight: 700; color: var(--z-on-surface); margin-bottom: 12px; }
.zs-footer .zs-footer-grid a { color: var(--z-on-surface-variant); text-decoration: none; }
.zs-footer .zs-footer-grid a:hover { color: var(--z-on-surface); text-decoration: underline; }
.zs-footer .zs-footer-brand .zs-logo { min-height: 0; }
.zs-footer-brand p { margin-top: 12px; max-width: 40ch; }
.zs-footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--z-outline); font-size: 1rem; }
.zs-footer-legal p { max-width: 80ch; }
.zs-footer-legal p + p { margin-top: 8px; }

@media (max-width: 960px) {
  .zs-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zs-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .zs-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Q3: lange Komposita („Geschäftsbedingungen“) mit Trennstrich statt mitten im Wort abgeschnitten */
  .zs-footer-grid a { hyphens: auto; -webkit-hyphens: auto; }
}
