/* ============================================================
   Christian Birchel Malereibetrieb – Basis-Stylesheet
   Wird zusammen mit assets/fonts.css geladen.
   Farb-/Abstands-Tokens, Reset, A11y-, Print- und Responsive-Regeln.
   ============================================================ */

:root {
  --accent: #1872B5;
  --accent-dark: #0E4D7A;
  --accent-light: #E8F2FA;
  --ink: #1E2A3A;
  --ink-soft: #4A5568;
  --ink-muted: #8A95A3;
  --line: #EEF1F4;
  --surface: #F8FAFB;
  --nav-h: 72px;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(24, 114, 181, 0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: #1872B540; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

input:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px #1872B520;
}

/* ---- Skip-Link (Tastaturbedienung) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #fff;
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.skip-link:focus { left: 0; }

/* ---- Navigation ---- */
.site-nav a { text-decoration: none; }

@media (hover: hover) {
  .site-nav__link:hover { color: var(--accent) !important; }
  /* Bewusst ohne transform: auf der Seite bewegt sich beim Hover nichts. */
  .button-link { transition: box-shadow 0.2s ease; }
  .button-link:hover { box-shadow: var(--shadow-md); }
}

/* ---- Zweispaltige Layouts auf kleinen Displays einspaltig ---- */
@media (max-width: 768px) {
  [data-grid-2col] { grid-template-columns: 1fr !important; }
}

/* ---- Kein JavaScript ---- */
.noscript {
  max-width: 640px;
  margin: 0 auto;
  padding: 140px clamp(20px, 5vw, 40px) 80px;
  line-height: 1.7;
}
.noscript h1 { font-size: 28px; margin-bottom: 12px; }
.noscript p { margin-bottom: 12px; color: var(--ink-soft); }
.noscript a { color: var(--accent); }

/* ---- Druck ---- */
@media print {
  .site-nav, .skip-link, .twk-panel, .noscript { display: none !important; }
  body { font-size: 11pt; }
  section { break-inside: avoid; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #666; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Reduzierte Bewegung ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
