/* =========================================================
   BASIS – Reset, Typografie, Layout, Buttons, Felder, Platzhalter
   Werte und Regeln: Design-System/STYLEGUIDE.md
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-hoehe);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background var(--uebergang), color var(--uebergang);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: var(--fokus-ring); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skiplink {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: var(--radius-klein);
  background: var(--bg-dunkel); color: var(--text-auf-dunkel); font-weight: 600;
}
.skiplink:focus { top: 12px; }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-titel);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 16px;
  color: inherit;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); letter-spacing: -0.005em; }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 16px; text-wrap: pretty; }

.akzent { color: var(--kupfer); }

/* Kicker: "✦ KONTAKT" – sparsam einsetzen */
.kicker {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kupfer-text);
}
.kicker::before { content: "✦"; margin-right: 10px; }

.lead { font-size: 1.15rem; color: var(--text-leise); max-width: 620px; }

.textlink {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--kupfer-text);
  text-underline-offset: 4px;
}
.textlink:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; background: var(--bg); }
.section--leinen { background: var(--bg-alt); }
.section--dunkel { background: var(--bg-dunkel); color: var(--text-auf-dunkel); }

.section-kopf { max-width: 720px; margin-bottom: var(--abstand-14); }
.section-kopf .lead { margin-bottom: 0; }
.section--dunkel .lead { color: var(--text-hell); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--touch-ziel);
  padding: 14px 28px;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-klein);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--uebergang), color var(--uebergang), border-color var(--uebergang);
}
.btn--primaer { background: var(--primaer); color: var(--auf-primaer); }
.btn--primaer:hover { background: var(--primaer-hover); }
.btn--rahmen { border-color: var(--text); color: var(--text); background: transparent; }
.btn--rahmen:hover { background: var(--text); color: var(--bg); }
.btn--klein { padding: 10px 20px; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Formularfelder ---------- */
.feld { display: flex; flex-direction: column; gap: 8px; }
.feld label { font-size: 0.85rem; font-weight: 500; }
.feld__pflicht { color: var(--kupfer-text); }
.feld input,
.feld select,
.feld textarea {
  width: 100%;
  min-height: var(--feld-hoehe);
  padding: 12px 14px;
  font-size: 1rem;
  background: var(--bg-feld);
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  transition: border-color var(--uebergang);
}
.feld select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A857B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.feld textarea { min-height: 160px; resize: vertical; }
.feld input::placeholder,
.feld textarea::placeholder { color: var(--text-leise); opacity: 1; }
.feld input:focus,
.feld select:focus,
.feld textarea:focus {
  outline: 2px solid var(--kupfer);
  outline-offset: -1px;
  border-color: transparent;
}
.feld__hilfe { font-size: 0.85rem; color: var(--text-leise); }
.feld__fehler {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--fehler);
}
.feld__fehler svg { width: 16px; height: 16px; flex: none; }
.feld.hat-fehler .feld__fehler { display: flex; }
.feld.hat-fehler input,
.feld.hat-fehler textarea { border-color: var(--fehler); }

/* Inline-Hinweis (Erfolg/Info/Fehler) */
.hinweis {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid currentColor;
  font-size: 0.95rem;
}
.hinweis[hidden] { display: none; }
.hinweis p { margin: 0; color: var(--text); }
.hinweis svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.hinweis--erfolg { color: var(--erfolg); background: var(--erfolg-bg); }
.hinweis--info   { color: var(--info);   background: var(--info-bg); }
.hinweis--fehler { color: var(--fehler); background: var(--fehler-bg); }

/* ---------- Bild-Platzhalter ----------
   Später ersetzen durch: <img src="img/datei.jpg" alt="…" class="bild bild--4x5"> */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--platzhalter);
  border-radius: var(--radius);
  color: var(--platzhalter-text);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}
.placeholder svg { width: 32px; height: 32px; }
.bild { width: 100%; object-fit: cover; border-radius: var(--radius); }
.bild--4x5 { aspect-ratio: 4 / 5; }
.bild--16x10 { aspect-ratio: 16 / 10; }
