/* ==========================================================================
   IBReinigung – Stylesheet
   Farbwelt: tiefes Marineblau (Ink), Papierweiß, Nebelgrau, Aqua-Akzent.
   Keine externen Schriften, keine CDN-Aufrufe -> DSGVO-freundlich.
   ========================================================================== */

:root {
  /* Markenfarben laut Logo-Kit:
       #123A44  Dunkelblau
       #1FA39C  Türkis für helle Flächen
       #3DC7BE  Türkis für dunkle Flächen
     Die beiden dunkleren Töne sind daraus abgeleitet, weil das Marken-Türkis
     auf Weiß nur 3.0:1 erreicht – genug für Symbole und große Ziffern,
     zu wenig für Links und Schaltflächen (dort sind 4.5:1 gefordert). */
  --ink:        #123a44;   /* Dunkelblau, 12.0:1 auf Weiß              */
  --ink-soft:   #48646c;   /* Fließtext, 6.2:1                         */
  --paper:      #fbfdfd;
  --mist:       #dde9ea;   /* Linien und Rahmen                        */
  --tint:       #ecf7f6;   /* zarte Flächen                            */
  --aqua-light: #3dc7be;   /* Marken-Türkis, nur auf Dunkelblau, 5.9:1 */
  --aqua-mid:   #1fa39c;   /* Marken-Türkis für Symbole, 3.0:1         */
  --aqua:       #157873;   /* Links und Fokus, 5.2:1                   */
  --aqua-dark:  #116460;   /* Schaltflächen, 6.8:1                     */

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  /* Eigene Schrift? Hier lokal einbinden (siehe ANLEITUNG.md), nie per Google-CDN. */

  --wrap: 1140px;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
  --radius: 5px;
  --header-h: 78px;
}

/* --- Reset / Basis ------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 700;
}

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

a { color: var(--aqua-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

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

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

.measure { max-width: 62ch; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; z-index: 200;
}
.skip:focus { left: 0; }

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

/* --- Kopfzeile ---------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(251, 253, 253, .93);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--mist); }

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand {
  display: inline-flex; align-items: center;
  text-decoration: none;
  transition: opacity .15s ease;
}
.brand:hover { opacity: .78; }
.brand img {
  display: block;
  height: 52px; width: auto;
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--mist); border-radius: var(--radius);
  padding: .45rem .7rem; font: inherit; font-size: .9rem; color: var(--ink);
  cursor: pointer;
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: .96rem; font-weight: 500;
}
.nav a:hover { color: var(--ink); }
.nav .btn { color: var(--paper); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .82rem 1.4rem;
  border: 1px solid var(--aqua-dark);
  border-radius: var(--radius);
  background: var(--aqua-dark); color: var(--paper);
  font: inherit; font-size: .98rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--mist);
}
.btn-ghost:hover { background: var(--tint); border-color: var(--aqua); color: var(--ink); }

.btn-sm { padding: .55rem 1rem; font-size: .92rem; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(120% 90% at 88% 0%, var(--tint) 0%, rgba(237,246,248,0) 62%),
    var(--paper);
}

.hero h1 {
  font-size: clamp(2.55rem, 7.4vw, 5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .99;
  max-width: 14ch;
  margin-bottom: .45em;
}

.hero-lead {
  font-size: clamp(1.06rem, 2.1vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 54ch;
  line-height: 1.55;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: .8rem;
  margin-top: 2rem;
}

.hero-facts {
  list-style: none; margin: 2.75rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
.hero-facts li {
  font-size: .93rem; color: var(--ink-soft);
  padding: .1rem 1.15rem;
  border-left: 1px solid var(--mist);
}
.hero-facts li:first-child { padding-left: 0; border-left: 0; }

/* Der Wisch: einmalige, bewusste Bewegung beim Laden (Rakel über Glas). */
.wipe {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(103deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 42%, rgba(236,247,246,.92) 100%),
    repeating-linear-gradient(103deg, rgba(61,199,190,.08) 0 3px, rgba(255,255,255,0) 3px 22px);
  backdrop-filter: blur(3px);
  border-right: 2px solid rgba(61, 199, 190, .85);
  animation: wipe-away 1150ms cubic-bezier(.62, .02, .32, 1) 180ms forwards;
}
@keyframes wipe-away {
  from { clip-path: polygon(0 0, 108% 0, 100% 100%, 0 100%); opacity: 1; }
  to   { clip-path: polygon(-16% 0, -8% 0, -16% 100%, -16% 100%); opacity: 1; }
}

/* --- Leistungsband ------------------------------------------------------ */

.band {
  background: var(--tint);
  border-block: 1px solid var(--mist);
  padding: 1.5rem 0;
}
.band ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.band li {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .96rem; color: var(--ink);
}
.band svg { flex: none; margin-top: .22rem; color: var(--aqua); }

/* --- Abschnitte --------------------------------------------------------- */

.section { padding-block: var(--section-y); }
.section-dark { background: var(--ink); color: var(--paper); }

.section-head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 {
  font-size: clamp(1.85rem, 3.9vw, 2.7rem);
  letter-spacing: -.035em;
}
.section-head p { color: var(--ink-soft); font-size: 1.06rem; margin: 0; }

/* --- Leistungen: Zeilenliste statt Kartenraster ------------------------- */

.services {
  display: grid; gap: 0 clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  border-top: 1px solid var(--mist);
}
.service {
  display: flex; gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--mist);
}
.service-icon {
  flex: none; width: 28px; height: 28px; margin-top: .15rem;
  color: var(--aqua-mid);
}
.service h3 {
  font-size: 1.08rem; font-weight: 650; margin-bottom: .25rem;
  letter-spacing: -.015em;
}
.service p { font-size: .95rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* --- Ablauf (echte Abfolge -> Nummerierung ist inhaltlich begründet) ----- */

.steps {
  display: grid; gap: clamp(1.75rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  counter-reset: step;
}
.step { position: relative; padding-top: 1.4rem; border-top: 2px solid var(--ink); }
.step-num {
  display: block;
  font-size: 2.6rem; font-weight: 800; line-height: 1;
  letter-spacing: -.05em; color: var(--aqua-mid);
  margin-bottom: .55rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.step p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* --- Versprechen -------------------------------------------------------- */

.promise { text-align: left; }
.promise blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2.15rem);
  line-height: 1.38;
  letter-spacing: -.01em;
  max-width: 24ch;
}
.promise footer {
  margin-top: 1.6rem; font-family: var(--sans); font-style: normal;
  font-size: .95rem; color: var(--aqua-light);
}

/* --- Kontakt ------------------------------------------------------------ */

.contact-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}

.form-row { margin-bottom: 1.15rem; }
.form-duo {
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

label {
  display: block; font-size: .92rem; font-weight: 600;
  margin-bottom: .35rem; color: var(--ink);
}
.opt { font-weight: 400; color: var(--ink-soft); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: .72rem .85rem;
  font: inherit; font-size: 1rem;
  color: var(--ink); background: #fff;
  border: 1px solid #c2d4d6;
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: none; }

input:hover, select:hover, textarea:hover { border-color: #97b2b5; }
input:focus, select:focus, textarea:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(21, 120, 115, .2);
  outline: none;
}
[aria-invalid="true"] { border-color: #b3261e !important; }

.field-error {
  display: block; margin-top: .3rem;
  font-size: .87rem; color: #b3261e; font-weight: 500;
}

.consent {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 1.4rem 0;
}
.consent input { flex: none; width: 19px; height: 19px; margin-top: .22rem; accent-color: var(--aqua-dark); }
.consent label { font-size: .92rem; font-weight: 400; color: var(--ink-soft); line-height: 1.5; margin: 0; }

/* Honeypot: für Menschen unsichtbar, für Bots verlockend. */
.hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.notice {
  padding: 1rem 1.15rem; border-radius: var(--radius);
  margin-bottom: 1.6rem; font-size: .96rem;
  border: 1px solid;
}
.notice-ok   { background: var(--tint); border-color: var(--aqua-light); color: var(--ink); }
.notice-fail { background: #fdf1f0; border-color: #e3b5b1; color: #7d1c17; }
.notice p:last-child { margin-bottom: 0; }

.contact-aside {
  background: var(--tint);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.contact-aside h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.contact-aside dl { margin: 0; }
.contact-aside dt {
  font-size: .82rem; color: var(--ink-soft);
  margin-top: 1rem;
}
.contact-aside dt:first-child { margin-top: 0; }
.contact-aside dd {
  margin: .1rem 0 0; font-size: 1rem; font-weight: 500;
}
.contact-aside dd a { text-decoration: none; }
.contact-aside dd a:hover { text-decoration: underline; }
.privacy-note { font-size: .86rem; color: var(--ink-soft); margin-top: 1.6rem; line-height: 1.5; }

/* --- Fließtextseiten (Impressum, Datenschutz, 404) ---------------------- */

.page { padding-block: clamp(3rem, 7vw, 5rem); }
.page h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: 1.5rem; }
.page h2 {
  font-size: 1.28rem; margin-top: 2.6rem; margin-bottom: .7rem;
  padding-top: 1.4rem; border-top: 1px solid var(--mist);
}
.page h3 { font-size: 1.05rem; margin-top: 1.8rem; margin-bottom: .4rem; }
.page p, .page li { color: var(--ink-soft); }
.page ul { padding-left: 1.2rem; }
.page li { margin-bottom: .4rem; }
.page address { font-style: normal; color: var(--ink); line-height: 1.7; }
.page .lead { font-size: 1.1rem; color: var(--ink); }

.todo {
  background: #fff8e6; border: 1px dashed #d8b14a;
  border-radius: var(--radius); padding: 1rem 1.15rem;
  font-size: .93rem; color: #6b5313; margin: 1.5rem 0;
}
.todo strong { color: #4a3809; }

/* --- Fußzeile ----------------------------------------------------------- */

.site-footer {
  background: var(--ink); color: #a9c3c6;
  padding: clamp(2.75rem, 6vw, 4rem) 0 2rem;
  font-size: .94rem;
}
.footer-grid {
  display: grid; gap: 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.site-footer h2 {
  font-size: .82rem; font-weight: 600; color: #7c9a9e;
  letter-spacing: .02em; margin-bottom: .9rem;
}
.site-footer a { color: #d8e8e9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.brand-fuss { margin-bottom: 1rem; }
.brand-fuss img { height: 58px; }
.footer-base {
  margin-top: 2.75rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  justify-content: space-between;
  font-size: .86rem; color: #86a3a7;
}
.site-footer :focus-visible { outline-color: var(--aqua-light); }

/* --- Mobil -------------------------------------------------------------- */

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

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--mist);
    padding: .5rem var(--gap) 1.25rem;
    box-shadow: 0 14px 28px -20px rgba(18, 58, 68, .5);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a {
    padding: .8rem 0; font-size: 1.02rem;
    border-bottom: 1px solid var(--mist);
  }
  .nav .btn { margin-top: 1rem; border-bottom: 0; }
  .hero-facts li {
    border-left: 0; padding: 0;
    flex: 1 1 100%; margin-bottom: .35rem;
  }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wipe { display: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .nav, .hero-actions, .wipe, form { display: none; }
  body { font-size: 11pt; color: #000; }
}

/* --- Hilfsklassen (ersetzen Inline-Styles, damit die strenge
       Content-Security-Policy ohne 'unsafe-inline' auskommt) ------------- */

.section-tint {
  background: var(--tint);
  border-block: 1px solid var(--mist);
}

.field-error-block {
  display: block;
  margin-top: -.8rem;
  margin-bottom: 1rem;
}

.dd-plain { font-weight: 400; }

.page-stand { margin-top: 2.5rem; font-size: .9rem; }

.page-actions {
  margin-top: 2rem;
  display: flex; gap: .8rem; flex-wrap: wrap;
}

code {
  font-size: .92em;
  background: var(--mist);
  padding: .1em .35em;
  border-radius: 3px;
}

/* --- Diagnoseseite (mailtest.php) -------------------------------------- */

.pruefung {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  margin-bottom: 1rem;
}
.pruefung th, .pruefung td {
  text-align: left;
  padding: .6rem .7rem .6rem 0;
  border-bottom: 1px solid var(--mist);
  vertical-align: top;
}
.pruefung th { font-weight: 600; width: 42%; }
.pruefung td { color: var(--ink-soft); word-break: break-word; }
.pruefung td.ok   { color: var(--aqua-dark); font-weight: 600; width: 5rem; }
.pruefung td.warn { color: #b3261e;          font-weight: 600; width: 5rem; }

.protokoll {
  background: #fff; border: 1px solid #e3b5b1; border-radius: var(--radius);
  padding: .8rem; font-size: .82rem; line-height: 1.5;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  margin: .8rem 0 0;
}

.page ol { padding-left: 1.3rem; }
.page ol li { margin-bottom: .55rem; color: var(--ink-soft); }

/* --- Logo auf kleinen Bildschirmen etwas kompakter ---------------------- */

@media (max-width: 720px) {
  :root { --header-h: 66px; }
  .brand img { height: 44px; }
}
