/* =============================================================================
   Kurth Fleisch — Designsystem
   Aufbau: 1 Tokens · 2 Reset · 3 Basis · 4 Layout · 5 Typografie
           6 Komponenten · 7 Sektionen · 8 Utilities · 9 Print
   ========================================================================== */

/* --- 1 Tokens ------------------------------------------------------------ */
:root {
  /* Farben — Kontraste geprüft gegen WCAG 2.2 AA */
  --kohle:     #141414;   /* 18,4:1 auf Weiß */
  --graphit:   #2E2E2E;
  --stahl:     #5C5C5C;   /*  6,7:1 auf Weiß */
  --nebel:     #B4B4B4;   /* nie für Text */
  --linie:     #E4E0DB;
  --papier:    #F4F2EF;
  --weiss:     #FFFFFF;
  /* Der Rotton der Beschilderung, gemessen am 11.08.2026.
     Bis dahin stand hier ein Ziegelrot mit Farbton 8,2° und 63 % Sättigung —
     das wirkte bräunlich. Die Farbe des Betriebs ist röter: Das Schild am
     Verkaufsautomaten misst über knapp 6000 Bildpunkte gemittelt Farbton 2,8°
     bei 75 % Sättigung, die Fensterrahmen an der Halle liegen bei 359°.
     Die drei Werte hier sind aus dieser Messung abgeleitet, mit denselben
     Helligkeitsabständen wie zuvor. */
  --ziegel:    #B32119;   /*  6,7:1 auf Weiß, 6,0:1 auf Papier */
  --ziegel-d:  #8A1914;   /*  9,4:1 auf Weiß — Zustand beim Überfahren */
  --ziegel-l:  #F5E4E3;   /*  nur als Fläche, nie hinter Text ohne Prüfung */
  --gruen:     #2F6B45;
  --messing:   #8A6420;

  /* Schrift */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Abstände — 4px-Basis */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* Maße */
  --wrap: 1080px;
  --measure: 64ch;
  --radius: 3px;
  --header-h: 72px;

  /* Typo-Skala, fluid */
  --t-d1: clamp(34px, 6vw, 58px);
  --t-d2: clamp(28px, 4.4vw, 44px);
  --t-h1: clamp(26px, 3.4vw, 34px);
  --t-h2: clamp(20px, 2.2vw, 22px);
  --t-b:  clamp(16px, 1.2vw, 17px);
  --t-s:  14px;
  --t-l:  12px;
}

/* --- 2 Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

/* --- 3 Basis ------------------------------------------------------------- */
body {
  background: var(--papier);
  color: var(--kohle);
  font-family: var(--sans);
  font-size: var(--t-b);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ziegel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ziegel-d); }
:focus-visible {
  outline: 2px solid var(--ziegel);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--ziegel); color: #fff; }

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 999;
  background: var(--kohle); color: var(--papier);
  padding: var(--s3) var(--s5); border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--s4); color: var(--papier); }

/* --- 4 Layout ------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 700px) { .wrap { padding-inline: 32px; } }

.section { padding-block: var(--s7); }
@media (min-width: 700px) { .section { padding-block: var(--s9); } }
.section--tight { padding-block: var(--s6); }
@media (min-width: 700px) { .section--tight { padding-block: var(--s7); } }
.section--dark { background: var(--kohle); color: var(--papier); }
.section--dark h2, .section--dark h3 { color: var(--papier); }
.section--dark p { color: #CFCBC6; }
.section--paper { background: var(--weiss); }
.section--accent { background: var(--ziegel-l); }

.grid { display: grid; gap: var(--s4); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stack > * + * { margin-top: var(--s4); }
.stack--lg > * + * { margin-top: var(--s6); }

/* --- 5 Typografie -------------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: var(--t-h1); line-height: 1.18; }
h2 { font-size: var(--t-d2); line-height: 1.12; letter-spacing: -.015em; }
h3 { font-size: var(--t-h2); line-height: 1.3; font-family: var(--sans); letter-spacing: 0; }
.display { font-size: var(--t-d1); line-height: 1.06; letter-spacing: -.02em; }

p, li { max-width: var(--measure); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--stahl); }
.section--dark .lead { color: #CFCBC6; }
.small { font-size: var(--t-s); color: var(--stahl); }
.label {
  font-family: var(--sans); font-size: var(--t-l); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--stahl);
}
.section--dark .label { color: var(--nebel); }
.rule { height: 3px; width: 56px; background: var(--ziegel); border: 0; margin: var(--s4) 0 var(--s5); }

.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--s2); }

/* --- 6 Komponenten ------------------------------------------------------- */

/* Header */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--weiss); border-bottom: 1px solid var(--linie);
}
.header__inner {
  display: flex; align-items: center; gap: var(--s5);
  min-height: var(--header-h);
}
.header__logo { color: var(--kohle); flex: 0 0 auto; }
/* Wortmarke als CSS-Maske: eine gecachte Datei, Farbe erbt von currentColor.
   Spart rund 13 KB HTML pro Seite gegenüber zweifachem Inline-SVG. */
.logo-mark {
  display: block; width: 128px; aspect-ratio: 222 / 66;
  background-color: currentColor;
  -webkit-mask: url("/kurth-wortmarke.svg") no-repeat center / contain;
          mask: url("/kurth-wortmarke.svg") no-repeat center / contain;
}
.logo-mark--footer { width: 120px; margin-bottom: var(--s4); }
.header__nav { display: none; margin-left: auto; }
.header__nav ul { display: flex; gap: var(--s5); list-style: none; }
.header__nav a {
  color: var(--kohle); text-decoration: none; font-size: 15px; font-weight: 500;
  padding-block: var(--s2); border-bottom: 2px solid transparent;
}
.header__nav a:hover { border-bottom-color: var(--nebel); }
.header__nav a[aria-current="page"] { border-bottom-color: var(--ziegel); font-weight: 600; }
.header__meta { margin-left: auto; display: flex; align-items: center; gap: var(--s4); }
.header__hours { display: none; font-size: 13px; color: var(--stahl); white-space: nowrap; }
@media (min-width: 980px) {
  .header__nav { display: block; }
  .header__meta { margin-left: 0; }
  .header__hours { display: block; }
}

/* Mobilmenü — reines CSS über <details> */
.menu { margin-left: auto; }
@media (min-width: 980px) { .menu { display: none; } }
.menu > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s2);
  padding: var(--s3); margin: calc(var(--s3) * -1);
  font-size: 14px; font-weight: 600;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu__bars { display: block; width: 22px; height: 2px; background: var(--kohle); position: relative; }
.menu__bars::before, .menu__bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--kohle);
}
.menu__bars::before { top: -7px; } .menu__bars::after { top: 7px; }
.menu[open] .menu__bars { background: transparent; }
.menu[open] .menu__bars::before { top: 0; transform: rotate(45deg); }
.menu[open] .menu__bars::after  { top: 0; transform: rotate(-45deg); }
.menu__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--weiss); border-bottom: 1px solid var(--linie);
  padding: var(--s4) 20px var(--s6);
  box-shadow: 0 12px 24px rgb(20 20 20 / .08);
}
.menu__panel ul { list-style: none; }
.menu__panel li + li { border-top: 1px solid var(--linie); }
.menu__panel a {
  display: block; padding: var(--s4) 0; color: var(--kohle);
  text-decoration: none; font-size: 17px; font-weight: 500; min-height: 44px;
}
.menu__panel a[aria-current="page"] { color: var(--ziegel); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: 2px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--ziegel); color: #fff; }
.btn--primary:hover { background: var(--ziegel-d); color: #fff; }
.btn--secondary { background: transparent; color: var(--kohle); border-color: var(--kohle); }
.btn--secondary:hover { background: var(--kohle); color: var(--papier); }
.btn--ghost { background: var(--weiss); color: var(--kohle); border-color: var(--linie); }
.btn--ghost:hover { border-color: var(--kohle); color: var(--kohle); }
.section--dark .btn--secondary { color: var(--papier); border-color: var(--papier); }
.section--dark .btn--secondary:hover { background: var(--papier); color: var(--kohle); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn .icon { width: 19px; height: 19px; flex: 0 0 auto; }
.btns { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Icon */
.icon { width: 24px; height: 24px; color: currentColor; }
.icon--lg { width: 34px; height: 34px; }

/* Karte */
.card {
  background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: var(--s5);
}
@media (min-width: 700px) { .card { padding: var(--s6); } }
.card--link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease; }
.card--link:hover { border-color: var(--kohle); color: inherit; }
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--stahl); }
.section--dark .card { background: var(--graphit); border-color: #3D3D3D; }
.section--dark .card p { color: #CFCBC6; }

/* Weiche — zwei Wege */
.split { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.split__card {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4);
  text-decoration: none; color: inherit; transition: border-color .15s ease;
}
.split__card:hover { border-color: var(--ziegel); color: inherit; }
.split__card .icon { color: var(--ziegel); }
.split__card h3 { font-family: var(--serif); font-size: var(--t-h1); }
.split__card ul { list-style: none; font-size: 15px; color: var(--stahl); }
.split__card li { padding-left: 1.1em; position: relative; }
.split__card li::before { content: "–"; position: absolute; left: 0; color: var(--nebel); }
.split__card .btn { margin-top: auto; align-self: flex-start; }

/* Vertrauenspunkt */
.trust { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.trust__item .icon { color: var(--ziegel); margin-bottom: var(--s3); }
.section--dark .trust__item .icon { color: #D97E7A; }
.trust__item h3 { font-size: 16px; font-family: var(--sans); margin-bottom: var(--s1); }
.trust__item p { font-size: var(--t-s); color: var(--stahl); }

/* Kennzahl */
.stats { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stat__value { font-family: var(--serif); font-size: clamp(36px, 5vw, 52px); line-height: 1; font-weight: 600; }
.stat__label { font-size: var(--t-l); letter-spacing: .12em; text-transform: uppercase; color: var(--stahl); margin-top: var(--s2); }
.section--dark .stat__label { color: var(--nebel); }

/* Schritte */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s5); }
.steps li { counter-increment: step; padding-left: 56px; position: relative; max-width: var(--measure); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ziegel); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; font-weight: 600;
}
.steps h3 { margin-bottom: var(--s1); }
.steps p { color: var(--stahl); }

/* Zeitstrahl */
.timeline { list-style: none; position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--linie); }
.timeline li { position: relative; padding-bottom: var(--s6); max-width: var(--measure); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -32px; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--papier); border: 3px solid var(--ziegel);
}
.timeline time { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; }
.timeline p { color: var(--stahl); margin-top: var(--s1); }

/* Aufklappbereich */
.acc { border-top: 1px solid var(--linie); }
.acc:last-of-type { border-bottom: 1px solid var(--linie); }
.acc > summary {
  cursor: pointer; list-style: none; padding: var(--s4) 40px var(--s4) 0;
  position: relative; font-weight: 600; min-height: 44px; display: flex; align-items: center;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after {
  content: ""; position: absolute; right: 12px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--stahl); border-bottom: 2px solid var(--stahl);
  transform: rotate(45deg); transition: transform .15s ease;
}
.acc[open] > summary::after { transform: rotate(-135deg); margin-top: -3px; }
.acc__body { padding-bottom: var(--s5); }
.acc__body p { color: var(--stahl); }

/* Teilstück-Liste */
.cuts { list-style: none; display: grid; gap: var(--s3); }
.cuts li { border-left: 3px solid var(--ziegel-l); padding-left: var(--s4); max-width: var(--measure); }
.cuts b { display: block; }
.cuts span { font-size: var(--t-s); color: var(--stahl); }

/* Bewertung */
.review { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: var(--s5); }
.review blockquote { font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.review figcaption { margin-top: var(--s4); font-size: var(--t-s); color: var(--stahl); }
.stars { color: var(--messing); letter-spacing: 2px; font-size: 15px; margin-bottom: var(--s3); }

/* Hinweis / Platzhalter */
.note {
  background: var(--ziegel-l); border-left: 3px solid var(--ziegel);
  padding: var(--s5); border-radius: 0 var(--radius) var(--radius) 0;
}
.note p { color: #5A2A22; }
.note b { display: block; margin-bottom: var(--s2); color: #5A2A22; }
.placeholder {
  background: repeating-linear-gradient(45deg, #EDEAE6, #EDEAE6 10px, #E6E2DD 10px, #E6E2DD 20px);
  border: 1px dashed var(--nebel); border-radius: var(--radius);
  display: grid; place-items: center; text-align: center;
  padding: var(--s6); color: var(--stahl); font-size: var(--t-s);
  min-height: 200px;
}
.placeholder--hero { min-height: 340px; }

/* Öffnungszeiten */
.hours { width: 100%; border-collapse: collapse; max-width: 420px; }
.hours th, .hours td { text-align: left; padding: var(--s3) 0; border-bottom: 1px solid var(--linie); }
.hours th { font-weight: 500; color: var(--stahl); font-size: var(--t-b); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Formular */
.form { display: grid; gap: var(--s4); max-width: 560px; }
.field { display: grid; gap: var(--s2); }
.field label { font-size: var(--t-s); font-weight: 600; }
.field .hint { font-size: 13px; color: var(--stahl); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px var(--s4); min-height: 48px;
  background: var(--weiss); color: var(--kohle);
  border: 1px solid var(--stahl); border-radius: 2px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--ziegel); outline-offset: 1px; border-color: var(--ziegel);
}
.field textarea { min-height: 130px; resize: vertical; }
.req { color: var(--ziegel); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Karte / Maps mit Zustimmung */
.map { border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; background: var(--weiss); }
.map__consent { padding: var(--s6); text-align: center; display: grid; gap: var(--s4); place-items: center; }
.map__consent p { color: var(--stahl); font-size: var(--t-s); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }

/* Footer */
.footer { background: var(--kohle); color: var(--papier); padding-block: var(--s8) var(--s6); }
.footer a { color: var(--papier); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer h2 { font-family: var(--sans); font-size: var(--t-l); letter-spacing: .14em; text-transform: uppercase; color: var(--nebel); margin-bottom: var(--s4); font-weight: 600; }
.footer ul { list-style: none; }
.footer li + li { margin-top: var(--s3); }
.footer address { font-style: normal; color: #CFCBC6; line-height: 1.8; }
.footer__bottom {
  margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid #333;
  display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5);
  font-size: var(--t-s); color: var(--nebel);
}
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: var(--s5); }
.footer__bottom li + li { margin-top: 0; }

/* Brotkrumen */
.crumbs { padding-block: var(--s4); font-size: var(--t-s); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); color: var(--stahl); }
.crumbs li::after { content: "›"; margin-left: var(--s2); color: var(--nebel); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--stahl); }

/* Seitenkopf */
.pagehead { padding-block: var(--s6) var(--s7); border-bottom: 1px solid var(--linie); background: var(--weiss); }
.pagehead h1 { max-width: 20ch; }
.pagehead .lead { margin-top: var(--s4); }
.pagehead .btns { margin-top: var(--s5); }

/* Hero */
.hero { background: var(--kohle); color: var(--papier); padding-block: var(--s8); }
@media (min-width: 700px) { .hero { padding-block: var(--s9); } }
.hero__grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { color: var(--papier); max-width: 16ch; }
.hero .lead { margin-top: var(--s5); max-width: 46ch; }
.hero .btns { margin-top: var(--s6); }
.hero .label { margin-bottom: var(--s4); }

/* Anker-Navigation */
.anchornav { position: sticky; top: var(--header-h); z-index: 50; background: var(--papier); border-bottom: 1px solid var(--linie); }
.anchornav ul { list-style: none; display: flex; gap: var(--s5); overflow-x: auto; padding-block: var(--s3); }
.anchornav a { color: var(--stahl); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; padding-block: var(--s2); }
.anchornav a:hover { color: var(--ziegel); }

/* Sprungziele nicht unter dem Header verstecken */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* --- 8 Utilities --------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }
.mt-7 { margin-top: var(--s7); }
.narrow { max-width: 68ch; }

/* --- 9 Print ------------------------------------------------------------- */
@media print {
  .header, .footer, .anchornav, .skip-link, .btns, .map { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .section { padding-block: 12pt; }
}
