:root {
  --bg: #F5F4F1;
  --ink: #292D30;
  --body: #404649;
  --muted: #717572;
  --accent: #304B5A;
  --accent-hover: #243A46;

  --font-heading: "Avenir Next", Avenir, "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --gutter: 24px;
  --content: 1040px;
  --measure: 680px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0;
}

p {
  margin: 0;
}

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

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

.page,
.footer {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hero */

.hero {
  padding-top: 32px;
}

.portrait {
  display: block;
  width: 240px;
  height: 300px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
}

.hero-text {
  margin-top: 30px;
}

h1 {
  font-size: 36px;
  line-height: 46px;
}

.role {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.intro {
  margin-top: 22px;
  color: var(--ink);
  font-size: 19px;
  line-height: 30px;
}

.button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 202px;
  height: 52px;
  padding: 0 28px;
  margin-top: 26px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
}

/* Sections */

section {
  margin-top: 80px;
}

h2 {
  font-size: 28px;
  line-height: 38px;
}

.prose {
  max-width: var(--measure);
  margin-top: 22px;
}

.prose p + p {
  margin-top: 20px;
}

.services {
  margin-top: 24px;
}

.service + .service {
  margin-top: 32px;
}

h3 {
  font-size: 20px;
  line-height: 29px;
}

.service p {
  margin-top: 10px;
}

/* Contact */

.contact-title {
  max-width: 780px;
  font-size: 29px;
  line-height: 39px;
}

.contact .button {
  margin-top: 28px;
}

/* Kontakt-Dialog */

.contact-dialog {
  width: min(100% - 2 * var(--gutter), 460px);
  margin: auto;
  padding: 36px 32px 32px;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--body);
  box-shadow: 0 24px 64px rgba(41, 45, 48, 0.28);
}

.contact-dialog::backdrop {
  background: rgba(41, 45, 48, 0.55);
}

.contact-dialog h2 {
  padding-right: 32px;
  font-size: 26px;
  line-height: 34px;
}

.dialog-text {
  margin-top: 10px;
  font-size: 16px;
  line-height: 26px;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.dialog-close:hover {
  background: rgba(41, 45, 48, 0.08);
  color: var(--ink);
}

.dialog-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  color: var(--accent);
}

.dialog-mail .icon-mail {
  flex: none;
  margin-right: 4px;
}

.dialog-mail .js-mail-link {
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 17px;
  line-height: 26px;
  text-decoration: none;
}

.dialog-mail .js-mail-link:hover {
  text-decoration: underline;
}

.copy-button {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(41, 45, 48, 0.08);
  color: var(--ink);
}

.copy-button .icon-check { display: none; }
.copy-button.is-copied .icon-copy { display: none; }
.copy-button.is-copied .icon-check { display: block; }
.copy-button.is-copied { color: #2E7D4F; }

.copy-feedback {
  flex: none;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.copy-feedback:empty {
  display: none;
}

.dialog-phone,
.dialog-linkedin {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--accent);
  font-size: 17px;
  line-height: 26px;
  text-decoration: none;
}

.dialog-phone:hover,
.dialog-linkedin:hover {
  text-decoration: underline;
}

/* Footer */

.footer {
  padding-top: 76px;
  padding-bottom: 34px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Legal pages */

.legal {
  padding-top: 64px;
}

.legal .back {
  font-size: 15px;
  text-decoration: none;
}

.legal h1 {
  margin-top: 24px;
}

.legal h2 {
  margin-top: 48px;
  font-size: 22px;
  line-height: 32px;
}

.legal .prose {
  margin-top: 16px;
}

.legal .prose p + p {
  margin-top: 14px;
}

/* Desktop */

@media (min-width: 900px) {
  body {
    font-size: 20px;
    line-height: 32px;
  }

  .hero {
    display: flex;
    align-items: center;
    gap: 64px;
    padding-top: 104px;
  }

  .portrait {
    flex: none;
    width: 320px;
    height: 400px;
  }

  .hero-text {
    margin-top: 0;
    max-width: 656px;
  }

  h1 {
    font-size: 54px;
    line-height: 68px;
  }

  .role {
    margin-top: 6px;
    font-size: 17px;
    line-height: 26px;
  }

  .intro {
    margin-top: 24px;
    font-size: 22px;
    line-height: 34px;
  }

  .button {
    margin-top: 28px;
  }

  section {
    margin-top: 100px;
  }

  .hero + section {
    margin-top: 112px;
  }

  h2 {
    font-size: 32px;
    line-height: 44px;
  }

  .prose {
    margin-top: 28px;
  }

  .prose p + p {
    margin-top: 20px;
  }

  .services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 48px;
    margin-top: 28px;
  }

  .services--three {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .cases {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 48px;
    margin-top: 32px;
  }

  .case p {
    font-size: 18px;
    line-height: 29px;
  }

  .service + .service {
    margin-top: 0;
  }

  h3 {
    font-size: 21px;
    line-height: 30px;
  }

  .service p {
    margin-top: 12px;
    font-size: 18px;
    line-height: 29px;
  }

  .contact {
    margin-top: 104px;
  }

  .contact-title {
    font-size: 36px;
    line-height: 46px;
  }

  .contact .button {
    margin-top: 30px;
  }

  .footer {
    padding-top: 100px;
    padding-bottom: 64px;
    font-size: 14px;
    line-height: 22px;
  }
}

/* Textlinks und Teaser */

.text-link {
  display: inline-block;
  color: var(--accent);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.teaser .text-link {
  margin-top: 20px;
  font-size: 17px;
  line-height: 26px;
}

/* Praxisbeispiel-Blöcke auf der Startseite */

.cases {
  display: grid;
  gap: 36px;
  margin-top: 28px;
}

.case p {
  margin-top: 10px;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 14px;
}

.case-links .text-link {
  margin-top: 0;
}

.arch {
  scroll-margin-top: 24px;
}

@media (min-width: 900px) {
  .text-link {
    font-size: 17px;
    line-height: 26px;
  }

  .teaser .text-link {
    margin-top: 24px;
    font-size: 18px;
    line-height: 28px;
  }
}

/* Architekturen-Seite */

.arch-page {
  padding-top: 64px;
}

.arch-head .back {
  font-size: 15px;
  text-decoration: none;
}

.arch-head h1 {
  margin-top: 24px;
}

.arch-head .arch-kicker {
  margin-top: 28px;
}

.arch-head .arch-kicker + h1 {
  margin-top: 8px;
}

.arch-head .intro {
  max-width: var(--measure);
}

.arch-head .intro + .intro {
  margin-top: 16px;
}

.arch-kicker {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arch h2 {
  margin-top: 8px;
  max-width: 780px;
}

.arch-stack {
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
}

.arch .services {
  margin-top: 24px;
}

/* Diagramme */

.diagram {
  margin: 28px 0 0;
}

.diagram-scroll {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.diagram-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.diagram svg {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
  color: var(--ink);
  font-family: var(--font-body);
}

.diagram figcaption {
  margin-top: 12px;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.d-head {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.d-box {
  fill: #fff;
  stroke: #cfd2ce;
  stroke-width: 1;
}

.d-box.d-emph {
  stroke: var(--accent);
  stroke-width: 2;
}

.d-box-accent {
  fill: var(--accent);
  stroke: var(--accent);
}

.d-group {
  fill: rgba(41, 45, 48, 0.035);
  stroke: #cfd2ce;
  stroke-width: 1;
}

.d-zone {
  fill: rgba(48, 75, 90, 0.05);
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
}

.d-zonelabel {
  fill: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.d-lock {
  fill: var(--accent);
}

.d-lockarc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
}

.d-bar {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.d-bartext,
.d-dimtext {
  fill: var(--body);
  font-size: 12px;
}

.d-label {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.d-caption {
  fill: var(--muted);
  font-size: 11px;
}

.d-light {
  fill: #fff;
}

.d-caption.d-light {
  fill: rgba(255, 255, 255, 0.82);
}

.d-step {
  fill: var(--ink);
  font-size: 12px;
}

.d-quote {
  fill: var(--body);
  font-size: 11px;
  font-style: italic;
}

.d-bubble {
  fill: #fff;
  stroke: #cfd2ce;
  stroke-width: 1;
}

.d-bubble-answer {
  stroke: var(--accent);
}

.d-pill {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 1.2;
}

.d-pilltext {
  fill: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.d-check {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-arrow {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}

.d-arrow.d-dashed {
  stroke: var(--muted);
  stroke-dasharray: 4 4;
}

.d-arrowlabel {
  fill: var(--muted);
  font-size: 11px;
}

.d-dim {
  stroke: var(--muted);
  stroke-width: 1;
}

.d-cross {
  stroke: #b4423a;
  stroke-width: 2;
  stroke-linecap: round;
}

.d-note {
  fill: #b4423a;
  font-size: 11px;
  font-weight: 700;
}

@media (min-width: 900px) {
  .arch-page {
    padding-top: 96px;
  }

  .arch {
    margin-top: 120px;
  }

  .arch-head + .arch {
    margin-top: 96px;
  }

  .diagram {
    margin-top: 32px;
  }

  .diagram-scroll {
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .diagram svg {
    min-width: 0;
  }

  .diagram-hint {
    display: none;
  }

  .diagram figcaption {
    font-size: 15px;
    line-height: 24px;
  }

  .arch-stack {
    font-size: 16px;
    line-height: 26px;
  }
}
