/* Haselbacher GmbH – Grundlayout. Eine Datei, keine Abhängigkeiten. */
:root {
  --bg: #fff;
  --flaeche: #f4f5f6;
  --text: #1b1e22;
  --leise: #565c65;
  --linie: #d9dce0;
  --akzent: #c4161c;
  --marke: #ee2a24;
  --breite: 72rem;
  --radius: .375rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131518;
    --flaeche: #1c1f24;
    --text: #e9ebee;
    --leise: #a4abb5;
    --linie: #343941;
    --akzent: #ff7b74;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-wrap: break-word;
}
main { flex: 1; padding-block: 2rem 4rem; }
.breite { width: 100%; max-width: var(--breite); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48rem) { .breite { padding-inline: 2rem; } }

a { color: var(--akzent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: .125em; }
:focus-visible { outline: .1875rem solid var(--akzent); outline-offset: .125rem; border-radius: .125rem; }

.sprunglink { position: absolute; left: -999rem; top: .5rem; padding: .5rem 1rem; background: var(--bg); z-index: 2; }
.sprunglink:focus { left: .5rem; }

/* Kopf */
.kopf { border-top: .375rem solid var(--marke); border-bottom: 1px solid var(--linie); }
.kopf-innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: 1rem; }
.marke { display: block; flex: 0 1 17rem; min-width: 11rem; line-height: 0; }
.marke img { width: 100%; height: auto; }
.kopf ul, .fuss ul, .unterseiten { list-style: none; margin: 0; padding: 0; }
.kopf ul { display: flex; flex-wrap: wrap; margin-inline: -.5rem; }
.kopf nav a {
  display: block;
  padding: .625rem .5rem;
  font-size: .9375rem;
  min-height: 2.75rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: .1875rem solid transparent;
}
@media (min-width: 30rem) { .kopf ul { margin-inline: -.75rem; gap: 0 .25rem; } .kopf nav a { padding-inline: .75rem; font-size: 1rem; } }
.kopf nav a:hover { border-bottom-color: var(--linie); }
.kopf nav a[aria-current] { border-bottom-color: var(--marke); }

/* Inhalt */
h1, h2, h3, h4 { line-height: 1.2; text-wrap: balance; margin: 2.25em 0 .5em; }
h1 { font-size: clamp(1.875rem, 1.4rem + 2.2vw, 2.75rem); letter-spacing: -.015em; margin-top: .5em; }
h2 { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); }
h3 { font-size: 1.1875rem; }
h4 { font-size: 1rem; }
main > :is(p, ul, ol, h2, h3, h4, address, dl), main section > :is(p, ul, ol, h2, h3, h4) { max-width: 44rem; }
p, ul, ol, table, figure, address, dl { margin: 0 0 1.1em; }
main > .unterseiten, main > .standorte { max-width: none; }
picture { display: block; }
main > :is(picture, figure, video) { max-width: 44rem; margin-bottom: 1.5rem; }
main > h1 + picture { max-width: none; margin-bottom: 2rem; }
main ul, main ol { padding-left: 1.25rem; }
main li { margin-bottom: .3em; }
main li::marker { color: var(--marke); }
address { font-style: normal; }
img, video { max-width: 100%; height: auto; display: block; }
figure, picture, main > img, main video { border-radius: var(--radius); overflow: hidden; }
main img, main video { border-radius: var(--radius); background: var(--flaeche); }
figure { margin-inline: 0; }
figcaption { color: var(--leise); font-size: .9375rem; padding-top: .5rem; }
hr { border: 0; border-top: 1px solid var(--linie); margin: 2.5rem 0; }

.tabelle { overflow-x: auto; margin-bottom: 1.1em; }
table { border-collapse: collapse; width: 100%; max-width: 44rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--linie); }
th { font-weight: 600; }

.hinweis { border-left: .25rem solid var(--marke); background: var(--flaeche); padding: .75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }

/* Karten: Unterseiten und Standorte */
.unterseiten, .standorte { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin-block: 2rem; }
.unterseiten li, .standort { margin: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.unterseiten li { position: relative; padding: 1rem 1.125rem 1.125rem; border-top: .1875rem solid var(--marke); }
.unterseiten a { font-weight: 700; font-size: 1.125rem; color: var(--text); text-decoration: none; }
.unterseiten a::after { content: ""; position: absolute; inset: 0; }
.unterseiten li:hover, .unterseiten li:focus-within { border-color: var(--marke); }
.unterseiten span { display: block; margin-top: .375rem; color: var(--leise); font-size: .9375rem; line-height: 1.45; }
.standort { padding: 1rem 1.125rem; }
.standort h2, .standort h3 { margin: 0 0 .5rem; font-size: 1.125rem; }
.standort > :last-child { margin-bottom: 0; }

/* Fuß */
.fuss { background: var(--flaeche); border-top: 1px solid var(--linie); font-size: .9375rem; padding-block: 2.5rem 1.5rem; }
.fuss-innen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 2rem; }
.fuss h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); margin: 0 0 .5rem; }
.fuss a { color: var(--text); display: inline-block; padding-block: .3125rem; }
.fuss address { line-height: 1.9; margin: 0; }
.copyright { color: var(--leise); margin-top: 2rem; margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .kopf nav, .fuss nav, .sprunglink { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; }
}
