/*
 * basis.css
 * ─────────────────────────────────────────────────────────────────
 * Grundlegende Stile: Reset, Typografie, Links, Bilder, Raster.
 * Mobile First – Erweiterungen für Tablet (768px) und Desktop (1024px).
 * ─────────────────────────────────────────────────────────────────
 */


/* ════════════════════════════════════════
   RESET & BOX-MODELL
════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}


/* ════════════════════════════════════════
   BODY
════════════════════════════════════════ */

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fs-text);
  line-height: 1.7;
  color: var(--textgrau);
  background-color: var(--weiss);
  overflow-x: hidden;
}

/* Kein Scrollen wenn das mobile Menü offen ist */
body.menu-offen {
  overflow: hidden;
}


/* ════════════════════════════════════════
   ÜBERSCHRIFTEN
════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--schwarz);
  line-height: 1.2;
}

/* ── MOBIL ──────────────────────────── */
h1 { font-size: var(--fs-h1); }   /* 32px */
h2 { font-size: var(--fs-h2); }   /* 26px */
h3 { font-size: var(--fs-h3); }   /* 20px */
h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-klein);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--schwarz);
}
h5, h6 {
  font-family: var(--font-sans);
  font-size: var(--fs-klein);
  font-weight: 400;
}

/* ── TABLET ─────────────────────────── */
@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 34px; }
  h3 { font-size: 24px; }
}

/* ── DESKTOP ────────────────────────── */
@media (min-width: 1024px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
  h3 { font-size: 28px; }
}


/* ════════════════════════════════════════
   ABSTÄNDE ZWISCHEN ELEMENTEN
════════════════════════════════════════ */

p {
  margin-bottom: 1.2em;
}
p:last-child {
  margin-bottom: 0;
}

h1 + p,
h2 + p,
h3 + p {
  margin-top: 0.6em;
}

ul, ol {
  padding-left: 1.4em;
}
li {
  margin-bottom: 0.4em;
}


/* ════════════════════════════════════════
   LINKS
════════════════════════════════════════ */

a {
  color: var(--schwarz);
  text-decoration: none;
  transition: opacity var(--transition-standard);
}
a:hover,
a:focus {
  opacity: 0.65;
  outline: none;
}
a:focus-visible {
  outline: 2px solid var(--schwarz);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ════════════════════════════════════════
   BILDER
════════════════════════════════════════ */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Schwarz-Weiß-Filter für alle Bilder auf dieser Website */
img:not(.kein-filter) {
  filter: grayscale(100%);
}

/* Ausnahme: Editor-Bilder in Gutenberg nicht filtern */
.editor-styles-wrapper img {
  filter: none;
}


/* ════════════════════════════════════════
   FORMULARE (Grundstil)
════════════════════════════════════════ */

input,
textarea,
select,
button {
  font-family: var(--font-sans);
  font-size: var(--fs-text);
  line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--trennlinie);
  border-radius: 0;
  background-color: var(--weiss);
  color: var(--schwarz);
  appearance: none;
  transition: border-color var(--transition-standard);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--schwarz);
  outline: none;
}

select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--trennlinie);
  border-radius: 0;
  background-color: var(--weiss);
  color: var(--schwarz);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23000' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

::placeholder {
  color: var(--textgrau-hell);
  font-weight: 300;
  font-size: var(--fs-klein);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
}

label {
  display: block;
  font-size: var(--fs-klein);
  font-weight: 400;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--textgrau);
  margin-bottom: 6px;
}


/* ════════════════════════════════════════
   BARRIEREFREIHEIT: VERSTECKTER TEXT
════════════════════════════════════════ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-Link (Zugänglichkeit: direkt zum Inhalt springen) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--schwarz);
  color: var(--weiss);
  padding: 10px 20px;
  font-size: var(--fs-klein);
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}


/* ════════════════════════════════════════
   INHALTSBREITE & ZENTRIERUNG
════════════════════════════════════════ */

/* Standard-Begrenzung für Textsektionen */
.inhalt-begrenzt {
  max-width: var(--max-breite);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--aussen-mobil);
  padding-right: var(--aussen-mobil);
}

@media (min-width: 768px) {
  .inhalt-begrenzt {
    padding-left: var(--aussen-tablet);
    padding-right: var(--aussen-tablet);
  }
}

@media (min-width: 1024px) {
  .inhalt-begrenzt {
    padding-left: var(--aussen-desktop);
    padding-right: var(--aussen-desktop);
  }
}

/* Vollbreite (für Gutenberg "wide" Blöcke) */
.alignwide {
  max-width: 100%;
}
.alignfull {
  max-width: 100%;
  margin-left: calc(-1 * var(--aussen-mobil));
  margin-right: calc(-1 * var(--aussen-mobil));
}
@media (min-width: 768px) {
  .alignfull {
    margin-left: calc(-1 * var(--aussen-tablet));
    margin-right: calc(-1 * var(--aussen-tablet));
  }
}
@media (min-width: 1024px) {
  .alignfull {
    margin-left: calc(-1 * var(--aussen-desktop));
    margin-right: calc(-1 * var(--aussen-desktop));
  }
}


/* ════════════════════════════════════════
   GUTENBERG-STANDARD: SEITENINHALT
════════════════════════════════════════ */

.seiteninhalt {
  min-height: 60vh;
}

/* Gutenberg erzeugt manchmal unerwünschte Außenabstände */
.wp-block-group,
.wp-block-cover {
  margin-top: 0;
  margin-bottom: 0;
}

/* Saubere Trennlinie zwischen Sektionen verhindern */
.wp-block-separator {
  border-color: var(--trennlinie);
  opacity: 1;
}


/* ════════════════════════════════════════
   PRINT-STILE
════════════════════════════════════════ */

@media print {
  .site-header,
  .site-footer,
  .menu-toggle {
    display: none;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
}
