/* KT-ProGuard – main.css
   Design tokens per CLAUDE.md. Keine externen Ressourcen. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --red-600: #DC2626;
  --red-700: #B91C1C;
  --bg: #F8FAF8;
  --card: #FFFFFF;
  --text: var(--slate-900);
  /* Slate 500 erreicht auf #F8FAF8 ca. 4.5:1 – für Fließtext nutzen wir Slate 600 */
  --muted: #475569;
  --muted-light: var(--slate-500);
  --line: var(--slate-200);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 4px;
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 750;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.625rem, 3.2vw, 2.375rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.012em; }
p { margin: 0 0 1em; }

/* Silbentrennung (lang="de") – verhindert Überlauf langer Komposita wie „Brandschutztechnik“ auf schmalen Displays */
h1, h2, h3, h4, p, li, dd, address, legend, label {
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

a { color: var(--red-700); text-underline-offset: 3px; }
a:hover { color: var(--red-600); }

:focus-visible {
  outline: 3px solid var(--red-600);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--slate-900);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--red-600); color: #fff; }
.btn--primary:hover { background: var(--red-700); color: #fff; }
.btn--outline { border-color: var(--slate-900); color: var(--slate-900); background: transparent; }
.btn--outline:hover { background: var(--slate-900); color: #fff; }
.btn--ghost-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--slate-900); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--slate-900);
  text-decoration: none;
  margin-right: auto;
}
.logo:hover { color: var(--slate-900); }
.logo__mark { width: 40px; height: auto; aspect-ratio: 40 / 44; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; }
.logo__sub { font-size: .75rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
@media (max-width: 400px) { .logo__sub { white-space: normal; } }

.nav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__list a {
  color: var(--slate-900);
  text-decoration: none;
  font-weight: 550;
  font-size: .9375rem;
  padding-block: .5rem;
  border-bottom: 2px solid transparent;
}
.nav__list a:hover { border-bottom-color: var(--red-600); }

.header-cta { display: flex; gap: .625rem; align-items: center; }
.header-cta .btn { min-height: 44px; padding: .5rem 1rem; font-size: .9375rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--slate-900);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.nav__list a, .header-cta .btn { white-space: nowrap; }
@media (max-width: 1240px) {
  .header-cta .btn--phone span { display: none; }
  .header-cta .btn--phone { width: 44px; padding: 0; }
}
@media (max-width: 1080px) {
  .nav__list { gap: 1.125rem; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-cta .btn--primary { display: none; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: .5rem var(--gutter) 1rem;
  }
  .nav__list a {
    display: block;
    padding: .875rem 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--white { background: var(--card); border-block: 1px solid var(--line); }
.section--dark { background: var(--slate-900); color: #fff; }
.section--dark .eyebrow { color: #FCA5A5; }
.section--dark .lead { color: var(--slate-300); }

.eyebrow {
  display: block;
  margin-bottom: .875rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red-700);
}
.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__grid > * { min-width: 0; }
.checklist {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
  display: grid;
  gap: .75rem;
}
.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: .75rem;
  align-items: start;
  font-weight: 500;
}
.checklist svg { width: 24px; height: 24px; color: var(--red-600); margin-top: 1px; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__media { position: relative; }
.hero__media figure { margin: 0; }
.hero__img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.hero__badge {
  position: absolute;
  left: -1rem; bottom: 1.5rem;
  display: flex; align-items: center; gap: .625rem;
  padding: .75rem 1rem;
  background: var(--slate-900);
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  border-left: 4px solid var(--red-600);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.hero__badge-logo { width: 32px; height: auto; aspect-ratio: 40 / 44; flex: none; }
.hero__caption { margin-top: .625rem; font-size: .8125rem; color: var(--muted); }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__badge { left: .75rem; }
}

/* ---------- Leistungsmatrix ---------- */
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.panel {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  display: flex; flex-direction: column;
}
.panel--dark { background: var(--slate-900); color: #fff; border-color: var(--slate-900); }
.panel--dark .panel__tag { background: var(--red-600); color: #fff; }
.panel--dark p { color: var(--slate-300); }
.panel__tag {
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: .25rem .625rem;
  background: var(--slate-200);
  color: var(--slate-900);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 2px;
}
.panel ul { margin: 1.25rem 0 1.75rem; padding: 0; list-style: none; }
.panel li {
  padding: .75rem 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 20px 1fr; gap: .75rem;
}
.panel--dark li { border-top-color: var(--slate-700); }
.panel li svg { width: 20px; height: 20px; color: var(--red-600); margin-top: 3px; }
.panel--dark li svg { color: #F87171; }
.panel li strong { display: block; }
.panel li span { font-size: .9375rem; color: var(--muted); }
.panel--dark li span { color: var(--slate-300); }
.panel .btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 800px) { .matrix { grid-template-columns: 1fr; } }

/* ---------- Leistungen Detail ---------- */
.services { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service { background: var(--card); padding: 1.75rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 1100px) { .services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .services { grid-template-columns: 1fr; } }
.service__num { font-size: .8125rem; font-weight: 700; color: var(--red-700); letter-spacing: .06em; }
.service h3 { margin-top: .5rem; font-size: 1.0625rem; hyphens: manual; }
.service p { hyphens: manual; }
.service p { color: var(--muted); font-size: .9375rem; margin: 0; }

/* ---------- Funnel ---------- */
.funnel {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.funnel__box {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
.steps {
  display: flex; gap: .5rem;
  list-style: none; margin: 0 0 1.5rem; padding: 0;
  counter-reset: step;
}
.steps li {
  flex: 1;
  padding-top: .625rem;
  border-top: 4px solid var(--slate-200);
  font-size: .8125rem; font-weight: 650; color: var(--muted);
}
.steps li[aria-current="step"], .steps li.is-done { border-top-color: var(--red-600); color: var(--slate-900); }

.funnel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.funnel legend { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 1rem; padding: 0; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label {
  display: flex; flex-direction: column; gap: .25rem;
  height: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice label::before {
  content: "";
  position: absolute; left: 1rem; top: 1.125rem;
  width: 20px; height: 20px;
  border: 2px solid var(--slate-500);
  background: #fff;
}
.choice input[type="radio"] + label::before { border-radius: 50%; }
.choice input[type="checkbox"] + label::before { border-radius: 3px; }
.choice input:checked + label { border-color: var(--red-600); background: #FEF2F2; }
.choice input:checked + label::before {
  border-color: var(--red-600);
  background: var(--red-600);
  box-shadow: inset 0 0 0 3px #fff;
}
.choice input:focus-visible + label { outline: 3px solid var(--red-600); outline-offset: 2px; }
.choice label strong { font-weight: 650; }
.choice label span { font-size: .875rem; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: .375rem; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: .75rem .875rem;
  font: inherit; font-size: 1rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--slate-500);
  border-radius: var(--radius);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--red-600); outline-offset: 0; border-color: var(--red-600); }
.field [aria-invalid="true"] { border-color: var(--red-700); border-width: 2px; }
.field__hint { font-size: .8125rem; color: var(--muted); margin-top: .25rem; }
.req { color: var(--red-700); }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; font-size: .875rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red-600); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.funnel__nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.form-error, .form-status {
  margin-top: 1rem; padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .9375rem;
}
.form-error { background: #FEF2F2; color: var(--red-700); border: 1px solid #FECACA; }
.form-status--ok { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.form-status--err { background: #FEF2F2; color: var(--red-700); border: 1px solid #FECACA; }
[hidden] { display: none !important; }

.funnel__aside ul { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.funnel__aside li { display: grid; grid-template-columns: 32px 1fr; gap: .75rem; color: var(--slate-300); }
.funnel__aside li b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--slate-700);
  color: #fff; font-size: .875rem;
}
.funnel__aside strong, .funnel__aside a { color: #fff; }

@media (max-width: 880px) { .funnel { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .choice-grid, .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Referenzen ---------- */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.ref-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column;
}
.ref-card__media {
  width: calc(100% + 3rem);
  max-width: none;
  margin: -1.5rem -1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.ref-card__cat {
  align-self: flex-start;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  padding: .25rem .5rem;
  border: 1px solid var(--red-600);
  color: var(--red-700);
  border-radius: 2px;
  margin-bottom: 1rem;
}
.ref-card__cat--dark { border-color: var(--slate-900); color: var(--slate-900); }
.ref-card h3 { margin-bottom: .25rem; }
.ref-card__place { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.ref-card dl { margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: .375rem 1rem; font-size: .875rem; }
.ref-card dt { color: var(--muted); }
.ref-card dd { margin: 0; font-weight: 550; }

/* ---------- Ansprechpartner ---------- */
.contact-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red-600);
  border-radius: var(--radius);
}
.contact-card__portrait { width: 220px; height: 220px; border-radius: var(--radius); background: var(--slate-200); }
.contact-card__role { color: var(--muted); font-weight: 550; margin-bottom: 1rem; }
.contact-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .5rem; }
.contact-list a { display: inline-flex; align-items: center; gap: .625rem; color: var(--slate-900); font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--red-700); text-decoration: underline; }
.contact-list svg { width: 20px; height: 20px; color: var(--red-600); }

@media (max-width: 700px) {
  .contact-card { grid-template-columns: 1fr; }
  .contact-card__portrait { width: 140px; height: 140px; }
}

/* ---------- Karriere ---------- */
.career { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
@media (max-width: 800px) { .career { grid-template-columns: 1fr; } }

/* ---------- Region ---------- */
.region-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.region-list li { padding: .375rem .75rem; border: 1px solid var(--line); background: var(--card); border-radius: 2px; font-size: .9375rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: var(--slate-300); padding-top: 3.5rem; font-size: .9375rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #FCA5A5; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-grid h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .375rem; }
.footer-grid address { font-style: normal; }
.footer-logo { width: 56px; height: auto; aspect-ratio: 56 / 62; margin-bottom: 1rem; }
.footer-logo--sm { width: 24px; margin: 0; flex: none; }
.footer-bottom__brand { display: flex; align-items: center; gap: .625rem; margin: 0; }
.footer-towns { font-size: .875rem; line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid var(--slate-700);
  padding-block: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .875rem;
}
.footer-bottom nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Legal-Seiten ---------- */
.legal { max-width: 820px; }
.legal h1 { margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.375rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1.0625rem; margin-top: 1.5rem; }
.legal address { font-style: normal; margin-bottom: 1em; }
.legal ul { padding-left: 1.25rem; }
.legal .note {
  padding: 1rem 1.25rem;
  background: #FEF2F2;
  border-left: 4px solid var(--red-600);
  font-size: .9375rem;
}

.contact-hours { display: inline-flex; align-items: center; gap: .625rem; color: var(--muted); font-weight: 550; }
.contact-hours svg { width: 20px; height: 20px; color: var(--red-600); }

/* Touch-Targets: Textlinks mind. 24px (WCAG 2.5.8), auf Touch-Geräten 44px */
.footer-grid ul a, .footer-bottom a, .contact-list a { display: inline-flex; align-items: center; min-height: 28px; }
.footer-grid address a { display: inline-block; padding-block: 3px; }
@media (pointer: coarse) {
  .footer-grid ul a, .footer-bottom a, .contact-list a { min-height: 44px; }
  .footer-grid ul { gap: 0; }
}
