/* =========================================================
   H&S Service – Base / Elements
   Setzt Grundlagen: Reset, Typografie, Layoutcontainer,
   Sektionen, Formularelemente, Utilities.
   Setzt tokens.css voraus.
   ========================================================= */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Überschriften ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-4);
  color: var(--text-heading);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, var(--fs-h1)); }
h2 { font-size: clamp(1.625rem, 4vw, var(--fs-h2)); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); line-height: var(--lh-snug); }

p  { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--fs-lg);
  color: var(--ink-500);
  line-height: 1.55;
}

/* Kicker: kleine rote Vorzeile über der Überschrift */
.kicker {
  display: block;
  margin-bottom: var(--sp-2);
  color: var(--red-700);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* Rote Unterstreichung unter Sektionstiteln */
.title-rule::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: var(--sp-4);
  background: var(--hs-red);
}
.text-center .title-rule::after,
.title-rule.is-centered::after { margin-inline: auto; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
a:hover { color: var(--link-hover); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-7) 0; }

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li + li { margin-top: var(--sp-2); }

/* Häkchen-Liste für Leistungsaufzählungen */
.list-check { list-style: none; padding: 0; }
.list-check li {
  position: relative;
  padding-left: 1.9rem;
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0; top: .45em;
  width: 1.1rem; height: 1.1rem;
  background: var(--hs-red);
  border-radius: 50%;
  clip-path: polygon(50% 0,100% 0,100% 100%,0 100%,0 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/svg%3E") center/contain no-repeat;
}
.list-check li::after {
  content: "";
  position: absolute;
  left: .3rem; top: .72em;
  width: .5rem; height: .28rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

blockquote {
  margin: 0;
  padding: var(--sp-5) var(--sp-6);
  border-left: 4px solid var(--hs-red);
  background: var(--ink-50);
  font-size: var(--fs-lg);
  color: var(--ink-600);
}
blockquote cite {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-style: normal;
  color: var(--text-muted);
}

table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--ink-700); font-weight: var(--fw-bold); background: var(--ink-50); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--muted   { background: var(--bg-muted); }
.section--ink     { background: var(--ink-800); color: #D6DBE0; }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--ink .kicker { color: #FF8085; }
.section--red     { background: var(--hs-red); color: #fff; }
.section--red h1, .section--red h2, .section--red h3 { color: #fff; }
.section--red .kicker { color: rgba(255,255,255,.85); }
.section--red .title-rule::after { background: #fff; }

.section__head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section__head.is-centered { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: var(--sp-5); }
@media (min-width: 620px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); }
                             .grid--3 { grid-template-columns: repeat(2, 1fr); }
                             .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); }
                             .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ---------- Formularelemente ---------- */
label { display: block; margin-bottom: var(--sp-2); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-700); }
.field + .field { margin-top: var(--sp-5); }
.field__hint { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-muted); }

input[type=text], input[type=email], input[type=tel], input[type=search],
input[type=date], select, textarea {
  width: 100%;
  padding: .7rem .9rem;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink-700);
  background: #fff;
  border: 1px solid var(--ink-300);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-400); }
input:focus, select:focus, textarea:focus {
  border-color: var(--hs-red);
  box-shadow: 0 0 0 3px var(--red-100);
  outline: none;
}
textarea { min-height: 8rem; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-strong { color: var(--text-strong); }
.fs-sm { font-size: var(--fs-sm); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.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: var(--sp-4); top: -100px;
  z-index: var(--z-modal);
  padding: var(--sp-3) var(--sp-4);
  background: var(--hs-red); color: #fff; font-weight: var(--fw-bold);
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.skip-link:focus { top: 0; color: #fff; }
