/* Ralf Meller & Ralf Schmidt GmbH – Design System (mobil zuerst, System-Fonts) */

:root {
  /* Marken & Akzente */
  --brand-blue: #0d5a9e;
  --brand-blue-hover: #0a487f;
  --brand-blue-muted: #e8f1f9;
  --accent-red: #c41e1e;
  --accent-red-hover: #a01818;
  --accent-warm: #c9a227;

  /* Semantik Flächen */
  --surface-page: #f4f6f9;
  --surface-0: #ffffff;
  --surface-1: #fafbfd;
  --surface-2: #eef2f7;
  --surface-inverse: #0e1117;
  --surface-inverse-elevated: #161b24;

  /* Text */
  --text-primary: #0f1419;
  --text-secondary: #4a5562;
  --text-tertiary: #6b7280;
  --text-inverse: #f4f6f9;
  --text-inverse-muted: #a8b0bd;
  --text-on-brand: #ffffff;

  /* Heizung-Sektion (dunkel) */
  --heat-bg: #0a0d12;
  --heat-surface: #121820;
  --heat-border: rgba(255, 255, 255, 0.08);
  --heat-text: #eef1f5;
  --heat-muted: #9ca6b3;
  --heat-accent: #ff7a5c;

  /* Linien */
  --line-subtle: rgba(15, 20, 25, 0.08);
  --line-strong: rgba(15, 20, 25, 0.12);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Schatten (gestaffelt) */
  --elev-0: 0 0 0 1px var(--line-subtle);
  --elev-1: 0 1px 2px rgba(15, 20, 25, 0.04), 0 4px 12px rgba(15, 20, 25, 0.06);
  --elev-2: 0 4px 8px rgba(15, 20, 25, 0.06), 0 12px 28px rgba(15, 20, 25, 0.1);
  --elev-header: 0 1px 0 var(--line-subtle), 0 8px 24px rgba(15, 20, 25, 0.04);

  /* Layout */
  --max: 1140px;
  --narrow: 600px;
  --header-h: 60px;
  --touch: 48px;
  --pad-x: clamp(1.125rem, 4vw, 1.75rem);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.2s;
}

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

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

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Ubuntu,
    "Helvetica Neue", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: radial-gradient(
      ellipse 140% 90% at 50% -30%,
      rgba(13, 90, 158, 0.07),
      transparent 55%
    ),
    var(--surface-page);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

::selection {
  background: var(--brand-blue-muted);
  color: var(--text-primary);
}

/* ——— Skip ——— */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.65rem 1.1rem;
  background: var(--brand-blue);
  color: var(--text-on-brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--r-md);
}

.skip-link:focus {
  left: var(--pad-x);
  top: 0.65rem;
  outline: 2px solid var(--text-on-brand);
  outline-offset: 2px;
}

/* Fokus nach Skip-Link (nur Tastatur) */
main#inhalt:focus {
  outline: none;
}

main#inhalt:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  body.nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

/* ——— Layout ——— */

.wrap {
  width: min(100% - 2 * var(--pad-x), var(--max));
  margin-inline: auto;
}

.wrap.narrow {
  max-width: min(100% - 2 * var(--pad-x), var(--narrow));
}

/* ——— Header ——— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface-0) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--elev-header);
}

@supports not (backdrop-filter: blur(12px)) {
  .site-header {
    background: var(--surface-0);
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  min-height: var(--header-h);
  padding: 0.55rem 0;
}

.brand {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - var(--touch) - 0.75rem);
}

.brand img {
  display: block;
  height: auto;
  max-width: min(248px, 66vw);
  width: auto;
}

@media (min-width: 768px) {
  .brand {
    flex: 0 1 auto;
    max-width: none;
  }

  .brand img {
    max-width: min(288px, 36vw);
  }
}

/* Mobile Menü-Button */

.nav-toggle {
  flex: 0 0 var(--touch);
  width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-0);
  cursor: pointer;
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur) var(--ease-out), border-color var(--dur);
}

.nav-toggle:hover {
  background: var(--surface-2);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

/* Navigation */

.nav {
  display: none;
  flex-direction: column;
  width: 100%;
  flex-basis: 100%;
  gap: 0.2rem;
  margin: 0;
  padding: 0.5rem 0 0.85rem;
  border-top: 1px solid var(--line-subtle);
  list-style: none;
}

.nav.is-open {
  display: flex;
}

.nav a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  padding: 0.85rem 0.75rem;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  border-radius: var(--r-md);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur), color var(--dur);
}

.nav a:active {
  opacity: 0.92;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--brand-blue-muted);
  color: var(--brand-blue-hover);
}

.nav a:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.nav a.nav-cta {
  color: var(--accent-red);
  background: color-mix(in srgb, var(--accent-red) 8%, transparent);
}

.nav a.nav-cta:hover,
.nav a.nav-cta:focus-visible {
  background: color-mix(in srgb, var(--accent-red) 14%, transparent);
  color: var(--accent-red-hover);
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    flex-basis: auto;
    padding: 0;
    margin: 0;
    border: none;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
  }

  .nav a {
    padding: 0.5rem 0.95rem;
    min-height: auto;
    font-size: 0.9rem;
  }

  .nav a.nav-cta {
    font-weight: 700;
    box-shadow: var(--elev-0);
  }
}

/* ——— Hero ——— */

.hero-landing {
  background: var(--surface-0);
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: clamp(240px, 52vh, 540px);
}

@media (min-width: 720px) {
  .hero-split {
    grid-template-columns: 1fr 1fr;
    min-height: clamp(300px, 56vh, 620px);
  }
}

.hero-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  overflow: hidden;
  color: var(--text-on-brand);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.hero-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-tile__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-tile--san .hero-tile__veil {
  background: linear-gradient(
    160deg,
    rgba(13, 90, 158, 0.12) 0%,
    rgba(13, 90, 158, 0.55) 42%,
    rgba(8, 45, 82, 0.94) 100%
  );
}

.hero-tile--heat .hero-tile__veil {
  background: linear-gradient(
    200deg,
    rgba(10, 13, 18, 0.15) 0%,
    rgba(10, 13, 18, 0.55) 40%,
    rgba(5, 7, 10, 0.93) 100%
  );
}

.hero-tile__text {
  position: relative;
  z-index: 2;
  padding: clamp(1.35rem, 4.5vw, 2.25rem);
  width: 100%;
}

.hero-tile__title {
  display: block;
  font-size: clamp(1.85rem, 5.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.05;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

.hero-tile__sub {
  display: block;
  font-size: 0.98rem;
  opacity: 0.94;
  margin-top: 0.45rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-tile__go {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-tile img {
    transition: transform 0.75s var(--ease-out);
  }

  .hero-tile:hover img,
  .hero-tile:focus-visible img {
    transform: scale(1.04);
  }

  .hero-tile__go {
    transition: border-color var(--dur);
  }

  .hero-tile:hover .hero-tile__go,
  .hero-tile:focus-visible .hero-tile__go {
    border-bottom-color: rgba(255, 255, 255, 0.95);
  }
}

.hero-tile:focus-visible {
  outline: 3px solid var(--accent-warm);
  outline-offset: -3px;
}

.hero-strip {
  padding: clamp(1.75rem, 5.5vw, 3.25rem) 0;
  background: linear-gradient(
    180deg,
    var(--surface-1) 0%,
    var(--surface-0) 55%,
    var(--surface-page) 100%
  );
  border-bottom: 1px solid var(--line-subtle);
}

.hero-strip-inner {
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
}

.hero-badge {
  margin: 0 0 1.1rem;
  display: flex;
  justify-content: center;
}

.hero-badge__inner {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-blue-hover);
  background: var(--brand-blue-muted);
  border: 1px solid color-mix(in srgb, var(--brand-blue) 18%, transparent);
  border-radius: var(--r-pill);
}

a.hero-badge__inner {
  text-decoration: none;
  cursor: pointer;
  min-height: var(--touch);
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a.hero-badge__inner:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.hero-heading {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 4.2vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.hero-lead {
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
  font-size: clamp(1.02rem, 2.4vw, 1.1rem);
  line-height: 1.65;
  max-width: 38rem;
}

.hero-lead strong {
  color: var(--text-primary);
  font-weight: 700;
}

.hero-lead a {
  color: var(--brand-blue);
  font-weight: 600;
  text-underline-offset: 0.12em;
}

.hero-lead a:hover {
  color: var(--brand-blue-hover);
}

.hero-lead a:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.hero-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: center;
  max-width: 22rem;
  margin: 0 auto 1.15rem;
}

@media (min-width: 520px) {
  .hero-cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
    align-items: center;
  }
}

.hero-gas-water {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  line-height: 1.55;
  max-width: 34rem;
  margin-inline: auto;
}

/* ——— Buttons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch);
  padding: 0.78rem 1.5rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur) var(--ease-out), border-color var(--dur),
    box-shadow var(--dur), color var(--dur), transform var(--dur);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(180deg, #1a6db8 0%, var(--brand-blue) 100%);
  color: var(--text-on-brand);
  border-color: color-mix(in srgb, var(--brand-blue) 85%, #000);
  box-shadow: var(--elev-1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(180deg, var(--brand-blue-hover) 0%, #083d6b 100%);
  border-color: var(--brand-blue-hover);
}

.btn-outline {
  background: var(--surface-0);
  color: var(--brand-blue);
  border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--line-strong));
  box-shadow: var(--elev-0);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--brand-blue-muted);
  border-color: var(--brand-blue);
}

.btn-heat {
  background: linear-gradient(135deg, #ff8f73 0%, var(--accent-red) 100%);
  color: var(--text-on-brand);
  border-color: transparent;
  box-shadow: var(--elev-1), 0 8px 24px rgba(196, 30, 30, 0.28);
}

.btn-heat:hover,
.btn-heat:focus-visible {
  filter: brightness(1.05);
  box-shadow: var(--elev-2), 0 10px 28px rgba(196, 30, 30, 0.32);
}

.btn-block {
  width: 100%;
}

@media (min-width: 520px) {
  .hero-cta-row .btn {
    width: auto;
  }
}

/* ——— Sections (generisch) ——— */

.section {
  padding: clamp(2.25rem, 7vw, 3.5rem) 0;
}

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

.section:not(.section-anfrage) > .wrap > h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 3.8vw, 1.7rem);
  color: var(--brand-blue-hover);
  letter-spacing: -0.025em;
  position: relative;
  padding-bottom: 0.75rem;
  font-weight: 800;
}

.section:not(.section-anfrage) > .wrap > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    90deg,
    var(--brand-blue),
    var(--accent-red) 70%,
    var(--accent-warm)
  );
}

.section-intro {
  margin: 0.85rem 0 1.5rem;
  color: var(--text-secondary);
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.65;
}

.section-intro a {
  color: var(--brand-blue);
  font-weight: 600;
  text-underline-offset: 3px;
}

.section-intro a:hover {
  color: var(--brand-blue-hover);
}

/* ——— Cards / Gallery (Legacy) ——— */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface-0);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 3vw, 1.5rem);
  box-shadow: var(--elev-1);
  transition: box-shadow var(--dur), transform var(--dur) var(--ease-out);
}

.card:hover {
  box-shadow: var(--elev-2);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
  }
}

.card-accent {
  border-color: color-mix(in srgb, var(--accent-red) 28%, transparent);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--brand-blue);
}

.card p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 420px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery figure {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-subtle);
  background: var(--surface-0);
  box-shadow: var(--elev-1);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ——— Pillars ——— */

.pillar {
  padding: clamp(2.5rem, 8vw, 4.5rem) 0;
}

.pillar--san {
  background: var(--surface-page);
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
}

.pillar--heat {
  background: var(--heat-bg);
  color: var(--heat-text);
  position: relative;
}

.pillar--heat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 20% 0%,
    rgba(255, 122, 92, 0.07) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.pillar__grid {
  display: grid;
  gap: clamp(1.65rem, 4.5vw, 2.75rem);
  align-items: start;
  position: relative;
  z-index: 1;
}

@media (min-width: 960px) {
  .pillar__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 3rem 3.5rem;
  }

  .pillar__grid--flip .pillar__copy {
    grid-column: 2;
  }

  .pillar__grid--flip .pillar__visual {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (min-width: 960px) {
  .pillar--san .pillar__copy {
    position: relative;
    padding-left: 1.35rem;
  }

  .pillar--san .pillar__copy::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 3px;
    border-radius: var(--r-pill);
    background: linear-gradient(
      180deg,
      var(--brand-blue),
      var(--accent-warm)
    );
  }
}

.pillar__title {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: var(--text-primary);
}

.pillar--heat .pillar__title {
  color: var(--heat-text);
}

.pillar__intro {
  margin: 0 0 1.2rem;
  font-size: 1.04rem;
  line-height: 1.68;
  color: var(--text-secondary);
  max-width: 38rem;
}

.pillar--heat .pillar__intro {
  color: var(--heat-muted);
}

.pillar__list {
  margin: 0 0 1.65rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pillar__list li {
  position: relative;
  padding-left: 1.45rem;
  font-size: 0.99rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.pillar--heat .pillar__list li {
  color: var(--heat-text);
}

.pillar__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-muted);
}

.pillar--heat .pillar__list li::before {
  background: var(--heat-accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 92, 0.15);
}

/* Mosaic */

.mosaic {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 540px) {
  .mosaic {
    grid-template-columns: repeat(2, 1fr);
  }

  .mosaic__lead {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .mosaic {
    grid-template-columns: repeat(3, 1fr);
  }

  .mosaic__lead {
    grid-column: 1 / -1;
  }
}

.mosaic figure {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
  background: var(--heat-surface);
  box-shadow: var(--elev-2);
  border: 1px solid var(--heat-border);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}

.pillar--san .mosaic figure {
  background: var(--surface-0);
  border: 1px solid var(--line-subtle);
  box-shadow: var(--elev-1);
}

.mosaic-hit {
  display: block;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.mosaic-hit:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
  border-radius: var(--r-lg);
}

.pillar--heat .mosaic-hit:focus-visible {
  outline-color: var(--heat-accent);
}

@media (hover: hover) {
  .mosaic-hit:hover figure {
    transform: translateY(-2px);
    box-shadow: var(--elev-2);
  }
}

.mosaic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mosaic__lead figure {
  aspect-ratio: 16 / 9;
  max-height: min(380px, 44vw);
}

.mosaic > li:not(.mosaic__lead) figure {
  aspect-ratio: 1;
}

@media (max-width: 539px) {
  .mosaic__lead figure {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .mosaic > li:not(.mosaic__lead) figure {
    aspect-ratio: 4 / 3;
  }
}

/* ——— Anfrage ——— */

.section-anfrage {
  background: linear-gradient(
    180deg,
    var(--surface-2) 0%,
    var(--surface-page) 45%,
    var(--surface-1) 100%
  );
}

.section-anfrage__h {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 4vw, 1.95rem);
  color: var(--brand-blue-hover);
  letter-spacing: -0.03em;
  position: relative;
  padding-bottom: 0.75rem;
  font-weight: 800;
}

.section-anfrage__h::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    90deg,
    var(--brand-blue),
    var(--accent-red) 75%,
    var(--accent-warm)
  );
}

/* ——— FAQ (SEO + Nutzer) ——— */

.section-faq {
  background: var(--surface-0);
  border-top: 1px solid var(--line-subtle);
}

.section-faq__h {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  color: var(--brand-blue-hover);
  letter-spacing: -0.03em;
  position: relative;
  padding-bottom: 0.75rem;
  font-weight: 800;
}

.section-faq__h::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    90deg,
    var(--brand-blue),
    var(--accent-red) 75%,
    var(--accent-warm)
  );
}

.section-faq__intro {
  margin-top: 0.75rem;
}

.faq-list {
  margin: 1.5rem 0 0;
}

.faq-item {
  padding: 0;
  border-bottom: 1px solid var(--line-subtle);
}

.faq-item summary.faq-q {
  margin: 0;
  padding: 1rem 2.25rem 1rem 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  position: relative;
}

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

.faq-item summary.faq-q::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  margin-top: -0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease-out);
}

.faq-item details[open] summary.faq-q::after {
  transform: rotate(225deg);
  margin-top: -0.15rem;
}

.faq-item .faq-a {
  margin: 0;
  padding: 0 0 1.15rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.faq-item summary.faq-q:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.faq-more {
  margin: 1.5rem 0 0;
  text-align: center;
}

/* ——— Bewertungen (Google / Portale) ——— */

.section-reviews {
  background: var(--surface-0);
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
}

.section-reviews__h {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  color: var(--brand-blue-hover);
  letter-spacing: -0.03em;
  position: relative;
  padding-bottom: 0.75rem;
  font-weight: 800;
}

.section-reviews__h::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    90deg,
    var(--brand-blue),
    var(--accent-warm)
  );
}

.section-reviews__intro {
  margin-top: 0.75rem;
  max-width: 44rem;
}

.reviews-summary {
  margin: 1.5rem 0 1.75rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .reviews-summary {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }
}

.reviews-summary__score {
  flex-shrink: 0;
}

.reviews-stars {
  display: inline-block;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--accent-warm);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.reviews-summary__text {
  flex: 1;
  min-width: 0;
}

.reviews-summary__note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.reviews-summary__actions {
  margin: 1rem 0 0;
  width: 100%;
}

.reviews-summary__actions .btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 640px) {
  .reviews-summary__actions {
    margin: 0;
    width: auto;
  }

  .reviews-summary__actions .btn {
    width: auto;
  }
}

.review-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .review-cards {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.review-card {
  margin: 0;
}

.review-card__link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-lg);
  -webkit-tap-highlight-color: transparent;
}

.review-card__link:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

@media (hover: hover) {
  .review-card__link:hover .review-card__inner {
    transform: translateY(-2px);
    box-shadow: var(--elev-2);
  }
}

.review-card__inner {
  margin: 0;
  height: 100%;
  padding: 1.25rem 1.35rem;
  background: var(--surface-1);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}

.review-card__quote {
  margin: 0;
  padding: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.review-card__quote p {
  margin: 0;
}

.review-card__meta {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-subtle);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-tertiary);
}

.review-card__meta a {
  color: var(--brand-blue);
  font-weight: 600;
}

.review-card__meta a:hover {
  color: var(--brand-blue-hover);
}

/* ——— Formular ——— */

.form-panel {
  background: var(--surface-0);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-xl);
  padding: clamp(1.35rem, 4vw, 2rem);
  box-shadow: var(--elev-2);
}

.form {
  margin-top: 0;
}

.form-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.2rem;
  line-height: 1.55;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-radius: var(--r-md);
  border: 1px solid var(--line-subtle);
}

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.req {
  color: var(--accent-red);
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.82rem 1rem;
  min-height: var(--touch);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  background: var(--surface-1);
  color: var(--text-primary);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

.field textarea {
  min-height: 9.5rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--line-strong));
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--brand-blue);
  background: var(--surface-0);
  box-shadow: 0 0 0 3px var(--brand-blue-muted);
}

.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--accent-red);
}

.form-error {
  color: var(--accent-red);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.85rem;
}

/* ——— Footer ——— */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(2rem, 5.5vw, 3rem) 0;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  background: linear-gradient(
    180deg,
    #12161e 0%,
    var(--surface-inverse) 40%,
    #0a0c10 100%
  );
  color: var(--text-inverse-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-grid {
  display: grid;
  gap: 1.75rem 2.5rem;
  align-items: start;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-areas:
      "brand nap contact"
      "legal legal legal";
  }

  .footer-brand {
    grid-area: brand;
  }

  .footer-nap {
    grid-area: nap;
  }

  .footer-contact {
    grid-area: contact;
  }

  .footer-legal {
    grid-area: legal;
  }
}

.footer-legal {
  margin-top: 0.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-title {
  margin: 0 0 0.35rem;
}

.footer-title strong {
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.92;
  line-height: 1.45;
}

.footer-nap,
.footer-contact {
  font-style: normal;
}

.footer-nap__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.footer-nap p,
.footer-contact p {
  margin: 0;
}

.footer-cookies {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.footer-inner strong {
  color: var(--text-inverse);
  font-weight: 700;
}

.footer-meta {
  font-size: 0.86rem;
  line-height: 1.6;
  opacity: 0.95;
  margin: 0;
}

.site-footer a {
  color: color-mix(in srgb, var(--text-inverse) 92%, var(--brand-blue-muted));
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: var(--text-inverse);
  text-decoration: underline;
}

/* ——— Rechtstexte ——— */

main.section .wrap.narrow h1 {
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  color: var(--brand-blue-hover);
  margin-top: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
}

main.section .wrap.narrow h2 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 1.65rem 0 0.5rem;
  color: var(--text-primary);
}

main.section .wrap.narrow h2::after {
  display: none;
}

main.section .wrap.narrow p,
main.section .wrap.narrow li {
  line-height: 1.65;
  color: var(--text-secondary);
}

main.section .wrap.narrow a {
  color: var(--brand-blue);
  font-weight: 600;
}

main.section .wrap.narrow a:hover {
  color: var(--brand-blue-hover);
}

main.section .wrap.narrow.legal h2 {
  font-size: 1.02rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--brand-blue-hover);
}

main.section .wrap.narrow.legal h2::after {
  display: none;
}

.legal-note {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

.legal-stand {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-subtle);
  font-size: 0.88rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* ——— Projektgalerie (Lightbox) ——— */

body.gallery-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 767px) {
  body.gallery-open {
    touch-action: none;
  }
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox:not([hidden]) {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  flex-direction: column;
  box-sizing: border-box;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.9);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(2.75rem, 8vw, 3.5rem) var(--pad-x) var(--pad-x);
  box-sizing: border-box;
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: var(--pad-x);
  z-index: 2;
  width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur);
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

.lightbox__stage {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 2vw, 0.75rem);
  min-height: 0;
  width: 100%;
}

.lightbox__figure {
  margin: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: min(78vh, 900px);
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.lightbox__arrow {
  flex-shrink: 0;
  width: var(--touch);
  height: var(--touch);
  min-width: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur);
}

.lightbox__arrow span {
  margin-top: -0.12em;
}

.lightbox__arrow:hover,
.lightbox__arrow:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

.lightbox__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.lightbox__counter {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.04em;
}

.lightbox__cta.btn-primary {
  min-height: var(--touch);
}

@media (max-width: 420px) {
  .lightbox__arrow {
    width: 2.65rem;
    min-width: 2.65rem;
    height: 2.65rem;
    font-size: 1.5rem;
  }
}

.js-gallery-trigger {
  cursor: zoom-in;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__close,
  .lightbox__arrow {
    transition: none;
  }
}
