/* ==========================================================
   Mazroua & Söhne GmbH – Stylesheet
   Farben aus dem Firmenlogo: Blau #1b6fb6, Rot #9e1b1f
   ========================================================== */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0e2440;
  --navy-deep: #0a1a2f;
  --blue: #1b6fb6;
  --blue-dark: #145a95;
  --blue-tint: #e8f1fa;
  --red: #9e1b1f;
  --ink: #18212d;
  --muted: #566273;
  --line: #e2e7ee;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 36, 64, 0.06), 0 12px 32px rgba(14, 36, 64, 0.08);
  --header-h: 72px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1160px;
}

/* ---------- Grundlagen ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

h1 {
  font-size: clamp(2.25rem, 5.4vw, 3.4rem);
  font-weight: 750;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 720;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

p {
  margin: 0;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

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

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-dark);
}

.btn--ghost {
  border-color: #c9d3df;
  color: var(--navy);
  background: #fff;
}

.btn--ghost:hover {
  border-color: var(--navy);
}

.btn--light {
  background: #fff;
  color: var(--navy);
}

.btn--light:hover {
  background: var(--blue-tint);
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(14, 36, 64, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--navy);
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: auto;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__sub {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 520;
  text-decoration: none;
  transition: background-color 0.2s;
}

.nav__link:hover {
  background: var(--bg-soft);
}

.header__call {
  display: none;
  min-height: 46px;
  padding: 0 20px;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
}

.menu-toggle .icon-close {
  display: none;
}

@media (max-width: 439px) {
  .menu-toggle {
    width: 46px;
    padding: 0;
  }

  .menu-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 359px) {
  .brand__sub {
    display: none;
  }
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 32px rgba(14, 36, 64, 0.1);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu ul {
  margin: 0 auto;
  padding: 8px var(--gutter) 16px;
  list-style: none;
}

.mobile-menu a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 650;
  text-decoration: none;
}

.mobile-menu li:last-child a {
  border-bottom: 0;
}

@media (min-width: 980px) {
  .nav,
  .header__call {
    display: inline-flex;
  }

  .menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}

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

.hero {
  padding: clamp(28px, 5vw, 72px) 0 clamp(56px, 8vw, 96px);
}

.hero__grid {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero__lead {
  max-width: 34em;
  margin-top: 22px;
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero__note a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

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

.hero__media {
  position: relative;
  margin: 0;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__badge {
  position: absolute;
  left: 16px;
  bottom: -22px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hero__badge strong {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 760;
  line-height: 1;
  color: var(--blue);
}

.hero__badge span {
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--muted);
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
  }

  .hero__media img {
    aspect-ratio: 4 / 3;
  }

  .hero__badge {
    left: -28px;
    bottom: 32px;
  }
}

/* ---------- Vertrauensleiste ---------- */

.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
}

.trust__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust__item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.97rem;
  line-height: 1.35;
  color: var(--muted);
}

.trust__item strong {
  display: block;
  color: var(--navy);
  font-weight: 650;
}

.trust__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
}

.trust__icon .icon {
  width: 22px;
  height: 22px;
}

@media (min-width: 600px) {
  .trust__list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1080px) {
  .trust__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Leistungen ---------- */

.services {
  display: grid;
  gap: 20px;
}

.service {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.4vw, 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.25s, transform 0.25s;
}

.service:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
}

.service__icon .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.6;
}

.service p {
  margin-top: 12px;
  color: var(--muted);
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.97rem;
}

.checklist li {
  position: relative;
  padding-left: 28px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

@media (min-width: 720px) {
  .services {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ---------- Über uns ---------- */

.about {
  display: grid;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.about__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.about__text > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.1rem;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline strong {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 720;
  color: var(--blue);
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Bildansicht (Lightbox) ---------- */

.lightbox {
  width: min(1200px, 100vw);
  max-width: 100vw;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(6, 15, 28, 0.96);
}

.lightbox figure {
  margin: 0;
  padding: 56px 12px 12px;
}

.lightbox img {
  width: 100%;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  border-radius: 10px;
}

.lightbox figcaption {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  font-size: 0.97rem;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lightbox__btn .icon {
  width: 24px;
  height: 24px;
}

.lightbox__close {
  top: 0;
  right: 12px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
}

.lightbox__prev {
  left: 20px;
}

.lightbox__next {
  right: 20px;
}

@media (max-width: 699px) {
  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: -60px;
  }

  .lightbox__prev {
    left: calc(50% - 60px);
  }

  .lightbox__next {
    right: calc(50% - 60px);
  }
}

/* ---------- Nachweise ---------- */

.docs {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.doc:hover {
  border-color: #b9c6d6;
  box-shadow: var(--shadow);
}

.doc__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
}

.doc__text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.doc__text strong {
  display: block;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
  color: var(--navy);
  font-weight: 650;
}

.doc__text span {
  font-size: 0.92rem;
  color: var(--muted);
}

.doc__dl {
  color: var(--blue);
}

@media (max-width: 399px) {
  .doc {
    gap: 12px;
    padding: 16px;
  }

  .doc__dl {
    display: none;
  }
}

@media (min-width: 820px) {
  .docs {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

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

.contact {
  background: var(--navy);
  color: #c9d5e3;
}

.contact h2 {
  color: #fff;
}

.contact .eyebrow {
  color: #ff9a9d;
}

.contact__grid {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
}

.contact__intro {
  margin-top: 18px;
  font-size: 1.1rem;
  max-width: 32em;
}

.contact__list {
  display: grid;
  gap: 4px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact__item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.contact__item .icon {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  color: #8fb8e0;
}

.contact__label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ea3bb;
}

.contact__value,
.contact__value a {
  color: #fff;
  font-size: 1.12rem;
  font-weight: 600;
  text-decoration: none;
}

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

.contact__route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #8fb8e0;
  font-size: 0.95rem;
}

.request {
  align-self: start;
  padding: clamp(28px, 4vw, 44px);
  background: #fff;
  border-radius: var(--radius);
  color: var(--ink);
}

.request h3 {
  font-size: 1.45rem;
}

.request > p {
  margin-top: 10px;
  color: var(--muted);
}

.request .checklist {
  margin-top: 22px;
}

.request__actions {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.request__actions .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
}

/* ---------- Kontaktformular ---------- */

.form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form__row {
  display: grid;
  gap: 16px;
}

@media (min-width: 560px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
}

.field__req {
  color: var(--red);
}

.field__hint {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid #c9d3df;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566273' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

.field input[type="file"] {
  min-height: 0;
  padding: 10px;
  border-style: dashed;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--navy);
  font: 600 0.92rem/1 var(--font-body);
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8b96a5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 111, 182, 0.18);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: var(--red);
}

.field__error {
  font-size: 0.88rem;
  color: var(--red);
}

/* Für Menschen unsichtbar, Spam-Programme füllen es trotzdem aus */
.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  font-size: 0.88rem;
  color: var(--muted);
}

.form__submit {
  width: 100%;
}

.form__submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.form__msg {
  display: none;
  border-radius: var(--radius-sm);
}

.form__msg--error {
  padding: 14px 16px;
  background: #fbeaea;
  color: #7a1418;
  font-size: 0.95rem;
}

.form__msg--error a {
  color: inherit;
  font-weight: 600;
}

.form__msg--ok {
  gap: 14px;
  margin-top: 24px;
  padding: 20px;
  background: var(--blue-tint);
  color: var(--navy);
}

.form__msg--ok .icon {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.form__msg--ok p {
  margin-top: 6px;
  color: var(--ink);
}

.form__msg:focus {
  outline: none;
}

/* Erfolg bzw. Fehler: per Skript (Klasse) oder ohne Skript (Sprungmarke nach dem Absenden) */
.request.is-sent .form__msg--ok,
#anfrage-gesendet:target {
  display: flex;
}

.request.is-sent .form,
.request:has(#anfrage-gesendet:target) .form {
  display: none;
}

.request.is-error .form__msg--error,
#anfrage-fehler:target {
  display: block;
}

.request .request__actions {
  margin-top: 16px;
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

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

.footer {
  padding: 48px 0 40px;
  background: var(--navy-deep);
  color: #8ea3bb;
  font-size: 0.95rem;
}

.footer__grid {
  display: grid;
  gap: 28px;
}

.footer .brand {
  color: #fff;
}

.footer .brand__sub {
  color: #8ea3bb;
}

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

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

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
}

@media (min-width: 820px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
  }
}

/* ---------- Aktionsleiste auf dem Handy ---------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(14, 36, 64, 0.08);
}

.action-bar .btn {
  min-height: 50px;
  padding: 0 12px;
}

.has-action-bar .footer {
  padding-bottom: calc(40px + 72px + env(safe-area-inset-bottom));
}

@media (min-width: 980px) {
  .action-bar {
    display: none;
  }

  .has-action-bar .footer {
    padding-bottom: 40px;
  }
}

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */

.legal {
  padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 104px);
}

.legal__inner {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(1.7rem, 6vw, 3rem);
  margin-bottom: 8px;
}

.legal h2 {
  margin: 44px 0 12px;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.legal h3 {
  margin: 28px 0 8px;
  font-size: 1.1rem;
}

.legal p,
.legal ul {
  margin: 0 0 14px;
  color: #343f4d;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal .meta {
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-weight: 600;
  text-decoration: none;
}

.back-link .icon {
  transform: rotate(180deg);
}

/* ---------- Bewegung reduzieren ---------- */

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.lightbox__btn[hidden] {
  display: none;
}

/* ---------- Referenzen ---------- */

.section-more {
  margin-top: clamp(28px, 4vw, 40px);
  text-align: center;
}

.page-hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 40px);
}

.page-hero .hero__lead {
  margin-top: 18px;
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(28px, 4vw, 40px);
  padding: 0;
  list-style: none;
}

.filter button {
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: 550 0.95rem/1 var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.filter button:hover {
  border-color: var(--navy);
}

.filter button[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.ref-group + .ref-group {
  margin-top: clamp(48px, 6vw, 72px);
}

.ref-group__title {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-body);
}

.refs {
  display: grid;
  gap: 20px;
}

.ref {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ref[hidden] {
  display: none;
}

.ref__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--line);
}

.ref__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ref__media:hover img {
  transform: scale(1.03);
}

.ref__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 26, 47, 0.78);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.ref__count .icon {
  width: 16px;
  height: 16px;
}

.ref__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ref__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.6vw, 28px);
}

.ref__meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.ref h3 {
  font-size: 1.25rem;
}

.ref__text {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--blue-tint);
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

.ref--klein .ref__body {
  gap: 6px;
  padding: 16px 18px 18px;
}

.ref--klein h3 {
  font-size: 1.05rem;
}

.ref--top h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
}

.refs-empty {
  padding: clamp(32px, 5vw, 56px);
  border: 1.5px dashed #c9d3df;
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.refs-empty strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--navy);
}

@media (min-width: 640px) {
  .refs--normal,
  .refs--klein {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .refs--top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .refs--normal {
    grid-template-columns: repeat(3, 1fr);
  }

  .refs--klein {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Nur ein einziges Top-Projekt: breit nebeneinander statt halbe Breite */
@media (min-width: 900px) {
  .refs--top .ref:only-child {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-column: 1 / -1;
  }

  .refs--top .ref:only-child .ref__media img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 340px;
  }

  .refs--top .ref:only-child .ref__body {
    justify-content: center;
    padding: 40px;
  }
}

.cta-band {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius);
  background: var(--navy);
  color: #c9d5e3;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.cta-band p {
  margin-top: 10px;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 900px) {
  .cta-band {
    grid-template-columns: 1fr auto;
  }
}

/* Symbol-Sammlung (unsichtbar, wird per <use> eingesetzt) */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.about__media {
  margin: 0;
}

/* Ausgeblendete Elemente bleiben ausgeblendet, egal welche Anzeige-Regel sonst gilt */
[hidden] {
  display: none !important;
}

/* Abschnitt mit Trennlinie (Referenzen-Vorschau auf der Startseite) */
.section--divided {
  border-top: 1px solid var(--line);
}

/* Abschnitt direkt unter dem Seitenkopf */
.section--flush {
  padding-top: 0;
}
