* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "DC Alphapipe";
  src:
    url("fonts/DCAlphapipe-Regular.woff2") format("woff2"),
    url("fonts/DCAlphapipe-Regular.woff") format("woff"),
    url("fonts/BCAlphapipe-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DC Alphapipe";
  src:
    url("fonts/DCAlphapipe-Bold.woff2") format("woff2"),
    url("fonts/DCAlphapipe-Bold.woff") format("woff"),
    url("fonts/BCAlphapipe-Bold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DC Alphapipe";
  src:
    url("fonts/DCAlphapipe-Bold.woff2") format("woff2"),
    url("fonts/DCAlphapipe-Bold.woff") format("woff"),
    url("fonts/BCAlphapipe-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "DC Alphapipe", Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #233247;
}

.page {
  width: min(96vw, 760px);
  margin: 0 auto;
}

.panel {
  background: #efefef;
}

.panel.short {
  min-height: 300px;
}

.header {
  background: #ffffff;
  display: flex;
  justify-content: center;
  padding: 14px 10px 16px;
  position: relative;
  z-index: 2;
  margin-bottom: -14px;
  border-radius: 0 0 18px 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 6px 12px rgba(25, 45, 80, 0.12),
    0 14px 28px rgba(35, 90, 160, 0.18);
}

.header-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: clamp(28px, 8.2vw, 56px);
  contain: layout;
}

.header-brand__gif-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(28px, 8.2vw, 56px);
}

/* Optionale Phase-1-Grafik (.header-brand__gif) und Cosimart2 (Lockup): gleiche Zielgröße */
.header-brand__gif,
.header-brand__lockup .logo--wordmark {
  display: block;
  width: auto;
  max-width: clamp(63px, 17.25vw, 121px);
  max-height: clamp(28px, 8.05vw, 58px);
  height: auto;
  aspect-ratio: unset;
  object-fit: contain;
  object-position: center;
  flex-shrink: 1;
}

.header-brand__lockup {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(9px, 2.875vw, 21px);
  width: 100%;
  min-height: clamp(28px, 8.2vw, 56px);
  box-sizing: border-box;
}

/*
 * Logobutton im Lockup: kompakte Maße dauerhaft (auch nach Entfernen von .logo--intro
 * durch das Skript — sonst würde die globale .logo-Regel den Button vergrößern).
 */
.header-brand__lockup .logo:not(.logo--wordmark) {
  width: auto;
  max-width: clamp(41px, 10.35vw, 78px);
  height: clamp(16px, 4.14vw, 37px);
  aspect-ratio: unset;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

/* Feste Zielfläche für Cosimart2 — weniger Nachspringen beim Einblenden */
.header-brand__lockup .logo--wordmark {
  flex: 0 0 auto;
  min-width: min(100%, clamp(63px, 17.25vw, 121px));
  min-height: clamp(28px, 8.05vw, 58px);
}

.logo {
  width: clamp(110px, 30vw, 210px);
  aspect-ratio: 500 / 164;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.logo--intro {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .logo--intro {
    will-change: auto;
  }
}

.nav {
  background: #8eb2e7;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
  padding: 30px 20px 20px;
  overflow: hidden;
}

.nav-item {
  min-height: 34px;
  text-decoration: none;
  color: #596377;
  font-size: clamp(11px, 2vw, 15px);
  background: #ffffff;
  border: 1px solid #d5dbe4;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 10px;
}

.nav-item.active {
  border-color: #d5dbe4;
  background: #ffffff;
  color: #323232;
  padding: 10px;
  box-shadow: 0 8px 16px rgba(120, 120, 120, 0.35);
  transform: scale(1.04);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-item:not(.active) .nav-icon {
  filter: brightness(0) saturate(100%) invert(41%) sepia(96%) saturate(1907%)
    hue-rotate(335deg) brightness(101%) contrast(90%);
}

.nav-item.active .nav-icon {
  filter: brightness(0) saturate(100%) invert(80%) sepia(7%) saturate(3618%)
    hue-rotate(21deg) brightness(105%) contrast(104%);
}

.blue-content {
  background: rgba(35, 117, 234, 0.5);
  min-height: 260px;
  padding: 34px 28px 26px;
  text-align: center;
}

.blue-content h1,
.blue-content h2 {
  font-size: clamp(12px, 2vw, 16px);
  margin-bottom: 12px;
  color: #2f3d53;
  font-weight: 600;
}

.blue-content p {
  font-size: clamp(9px, 1.8vw, 12px);
  line-height: 1.45;
  margin-bottom: 10px;
}

.welcome-text {
  text-align: left;
}

.service-text {
  text-align: left;
}

.service-text h1,
.service-text h2 {
  text-align: center;
}

.impressum-content.service-text {
  text-align: center;
}

.impressum-content.service-text p:last-of-type {
  margin-top: clamp(16px, 3.5vw, 26px);
}

.welcome-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 22px);
  margin-top: 6px;
  text-align: center;
}

.welcome-cta__arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 1px rgba(35, 50, 80, 0.25));
}

.welcome-cta__arrow-svg {
  display: block;
  width: auto;
  height: clamp(11px, 2.8vw, 14px);
}

.welcome-cta__arrow-shape {
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.cta-link {
  display: inline-block;
  margin-top: 0;
  font-size: clamp(10px, 1.9vw, 13px);
  color: #233247;
  text-decoration: underline;
}

.empty-area {
  min-height: 220px;
  background: #ffffff;
}

.form-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.form-wrap input,
.form-wrap textarea {
  width: min(100%, 520px);
  border: 1px solid #bcc6d5;
  background: #f3f5f9;
  border-radius: 2px;
  padding: 7px 8px;
  font-size: 12px;
  font-family: inherit;
}

.form-wrap button {
  justify-self: start;
  background: #f4f4f4;
  border: 1px solid #9097a3;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}

/* Kontakt: Formularfelder 2,5× der bisherigen Maximalbreite (520px → 1300px), begrenzt durch die Spalte */
.contact-form-wide form.form-wrap {
  justify-items: stretch;
  width: min(100%, 1300px);
}

.contact-form-wide form.form-wrap input,
.contact-form-wide form.form-wrap textarea {
  width: 100%;
  max-width: 1300px;
}

.mini-text,
.contact {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.illustration-gallery {
  display: block;
  text-align: center;
}

.illustration-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.2vw, 18px);
  width: 100%;
  max-width: min(100%, 520px);
  margin: 0 auto;
  text-align: initial;
}

.illustration-tile {
  margin: 0;
  padding: 0;
}

.illustration-tile__frame {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 10px rgba(25, 45, 80, 0.12);
}

.illustration-tile__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.bar-footer {
  background: #d9e631;
  min-height: 20px;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  font-size: 9px;
}

.bar-footer a {
  color: #323232;
  text-decoration: none;
}

.legal-link {
  color: #233247;
  text-decoration: underline;
}

.legal-document {
  margin-top: 10px;
  text-align: left;
  white-space: pre-wrap;
  font-size: clamp(9px, 1.8vw, 12px);
  line-height: 1.45;
  font-family: inherit;
}

@media (max-width: 560px) {
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .blue-content {
    padding: 26px 12px 18px;
  }

  .illustration-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }
}