/* Gemeinsames Stylesheet für index.html, impressum.html und datenschutz.html */

:root {
  --text: #1f2933;
  --text-muted: #52606d;
  --bg: #ffffff;
  --surface: #f4f6f8;
  --rule: #dde3e9;
  --accent: #0f5c6e;
  --accent-dark: #0b4553;

  --radius: 8px;
  --gutter: 16px;
  --content-width: 1080px;
  --measure: 37rem; /* entspricht bei dieser Schrift etwa 68 Zeichen */
  --section-space: clamp(3.5rem, 2.25rem + 6vw, 6.5rem);
  --block-space: clamp(2rem, 1.5rem + 2vw, 3rem);

  color-scheme: light;
}

/* Grundlagen */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Fußzeile bleibt auch bei kurzen Seiten unten */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.25rem + 3.75vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.5rem);
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.3;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

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

/* Rahmen */

.container {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: var(--bg);
  transform: translateY(-200%);
}

.skip-link:hover {
  color: var(--bg);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  border-bottom: 1px solid var(--rule);
}

/* Schmal: Name und Kontakt-Knopf in der ersten Zeile, die Links darunter */
.site-header__inner {
  position: relative;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 0.25rem;
  font-size: 1rem;
}

.site-nav a:not(.button) {
  padding-block: 0.375rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:not(.button):hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-nav .button {
  position: absolute;
  top: 0.75rem;
  right: var(--gutter);
}

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--text-muted);
  font-size: 1rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.75rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent-dark);
}

/* Knöpfe */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.375rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--bg);
}

.button--small {
  min-height: 2.5rem;
  padding: 0.375rem 1rem;
}

.button--secondary {
  background: transparent;
  color: var(--accent);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Abschnitte */

.section {
  padding-block: var(--section-space);
}

.section--surface {
  background: var(--surface);
}

.section--accent {
  background: var(--accent);
  color: var(--bg);
}

.section--accent :focus-visible {
  outline-color: var(--bg);
}

.section--accent .button {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--accent-dark);
}

.section--accent .button--secondary {
  background: transparent;
  color: var(--bg);
}

.section--accent .button:hover {
  border-color: var(--bg);
  background: var(--accent-dark);
  color: var(--bg);
}

.section__intro {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--text-muted);
}

/* Überschrift links, Inhalt rechts; schmal untereinander */
.split {
  display: grid;
  gap: 1.5rem;
}

.split > * {
  min-width: 0;
}

.split__main {
  max-width: var(--measure);
}

/* Einstieg */

.hero {
  padding-block: clamp(3rem, 1.75rem + 6vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4rem);
}

.hero__eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 600;
}

/* Zeilenumbruch möglichst nach dem ersten Satz */
.hero h1 span {
  display: inline-block;
}

.hero__text {
  max-width: var(--measure);
  margin-block: 1.5rem 2rem;
  font-size: 1.125rem;
}

.facts {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.5rem, 2rem + 3vw, 4rem);
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.facts strong,
.facts span {
  display: block;
}

.facts strong {
  font-weight: 650;
  line-height: 1.3;
}

.facts span {
  color: var(--text-muted);
}

/* Kommt Ihnen das bekannt vor? */

.rule-list {
  padding: 0;
  list-style: none;
}

.rule-list li {
  padding-block: 0.875rem;
  border-top: 1px solid var(--rule);
}

.rule-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.closing {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--accent);
  font-weight: 600;
}

/* Leistungen */

.service {
  margin-top: var(--block-space);
  padding-top: var(--block-space);
  border-top: 1px solid var(--rule);
}

.service__tagline {
  margin-top: 0.25rem;
  color: var(--text-muted);
}

.service ul {
  margin-top: 1rem;
  padding-left: 1.25rem;
}

.service li + li {
  margin-top: 0.375rem;
}

.service li::marker {
  color: var(--accent);
}

/* Beispiele */

.case {
  margin-top: var(--block-space);
  padding-top: var(--block-space);
  border-top: 1px solid var(--rule);
}

.case__facts {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.case__facts div {
  min-width: 0;
  max-width: var(--measure);
}

.case__facts dt {
  color: var(--accent);
  font-weight: 600;
}

/* Vorher-Nachher-Bilder */

.compare {
  margin-top: var(--block-space);
}

.compare__images {
  display: grid;
  gap: 1.25rem;
}

.compare__image {
  min-width: 0;
}

.compare__image img {
  width: 100%;
  border-radius: var(--radius);
}

.compare__image p {
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
}

.compare figcaption {
  max-width: var(--measure);
  margin-top: 1rem;
}

/* Ablaufleiste */

.flow {
  margin-top: var(--block-space);
}

.flow figcaption {
  margin-bottom: 0.75rem;
  font-weight: 650;
}

.flow ol {
  display: grid;
  gap: 1.5rem;
  max-width: var(--measure);
  padding: 0;
  list-style: none;
}

.flow li {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.35;
}

/* Pfeilspitze zum nächsten Schritt */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(135deg);
}

/* So arbeiten wir zusammen */

.steps {
  display: grid;
  gap: 1.5rem 2rem;
  margin-top: var(--block-space);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding-top: 1rem;
  border-top: 2px solid var(--accent);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.steps p {
  margin-top: 0.375rem;
}

/* Über mich */

#ueber-mich h2 {
  margin-bottom: var(--block-space);
}

.portrait {
  width: 100%;
  max-width: 24rem;
  border-radius: var(--radius);
}

/* Häufige Fragen */

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq details:first-child {
  border-top: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* Winkel, zeigt nach dem Aufklappen nach oben */
.faq summary::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.25rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-0.2em) rotate(45deg);
}

.faq details[open] summary::after {
  transform: translateY(0.1em) rotate(-135deg);
}

.faq summary:hover {
  color: var(--accent);
}

.faq details p {
  padding-bottom: 1.25rem;
}

/* Kontakt */

.contact__text {
  font-size: 1.125rem;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.contact li {
  min-width: 0;
}

.contact__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

/* Rechtstexte */

.legal {
  padding-block: clamp(2.5rem, 1.75rem + 4vw, 4.5rem) var(--section-space);
}

.legal > * {
  max-width: var(--measure);
}

.legal h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);
  line-height: 1.15;
}

.legal h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.625rem;
  font-size: 1.5rem;
  line-height: 1.25;
}

.legal h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.1875rem;
}

.legal p,
.legal ul,
.legal ol,
.legal address {
  margin-block: 0 1em;
  font-style: normal;
}

.legal p + p {
  margin-top: 0;
}

.legal ul,
.legal ol {
  padding-left: 1.5rem;
}

.legal li + li {
  margin-top: 0.375rem;
}

.legal li::marker {
  color: var(--accent);
}

.legal a {
  overflow-wrap: anywhere;
}

@media (min-width: 34rem) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 2rem;
  }

  .site-nav {
    align-items: center;
    margin-top: 0;
  }

  .site-nav .button {
    position: static;
  }

  .facts,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    gap: 1.25rem 2rem;
  }
}

@media (min-width: 56rem) {
  :root {
    --gutter: 32px;
  }

  body {
    font-size: 1.125rem;
  }

  .hero__text,
  .contact__text {
    font-size: 1.25rem;
  }

  /* Gleiche Spalten für alle Abschnitte, damit die Kanten durchlaufen */
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
    gap: 4rem;
  }

  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .case__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }

  /* Spalten im Verhältnis der Bildformate 3:2 und 4:5, damit beide gleich hoch sind */
  .compare__images {
    grid-template-columns: minmax(0, 15fr) minmax(0, 8fr);
    gap: 2rem;
  }

  .flow ol {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem;
    max-width: none;
  }

  .flow li:not(:last-child)::after {
    top: 50%;
    left: calc(100% + 0.75rem);
    margin-top: -0.25rem;
    transform: rotate(45deg);
  }
}

@media print {
  .skip-link {
    display: none;
  }
}
