/* ==========================================================================
   Optimus Bau GmbH – Premium Construction Website
   Design: mobile-first, clean, premium. Teal/green accent, dark hero, glass header.
   Breakpoints: 320px, 480px, 768px, 1024px, 1440px. Grid + Flexbox.
   ========================================================================== */

/* --- CSS Variables (mobile-first base) --- */
:root {
  --color-dark: #0f172a;
  --color-dark-deep: #020617;
  --color-bg-light: #f8fafc;
  --color-accent-teal: #0f766e;
  --color-accent-green: #22c55e;
  --color-accent-orange: #f97316;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-surface: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 24px 56px rgba(15, 23, 42, 0.16);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Oswald', sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --transition: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-pill: 9999px;
  --radius: 12px;
  --radius-lg: 16px;
  /* Breakpoints (for reference; use in media queries) */
  --bp-xs: 320px;
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1440px;
  /* Touch-friendly minimums */
  --touch-min: 44px;
  --text-min: 16px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-min);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
/* Responsive media: scale to viewport, no overflow (mobile-first) */
video, embed, object {
  max-width: 100%;
  height: auto;
}
iframe {
  max-width: 100%;
  width: 100%;
  border: 0;
}
a { color: var(--color-accent-teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-green); }
a:focus-visible { outline: 2px solid var(--color-accent-teal); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-dark);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}
@media (min-width: 320px) { .container { padding: 0 1rem; } }
@media (min-width: 480px) { .container { padding: 0 1.25rem; } }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
@media (min-width: 1440px) { .container { padding: 0 2rem; } }

/* --- Header (glass over hero) --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}
.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.2);
}
.body-legal .site-header {
  background: var(--color-dark);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.2);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: calc(var(--header-height) - 0.75rem * 2);
}
@media (min-width: 480px) { .header-inner { padding: 0 1.25rem; } }
@media (min-width: 768px) { .header-inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .header-inner { padding: 0 2rem; } }

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff !important;
  text-decoration: none;
  transition: opacity var(--transition);
}
.logo-link:hover { opacity: 0.9; color: #fff !important; }
.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--color-accent-green) 0%, var(--color-accent-teal) 85%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 4px 12px rgba(15, 118, 110, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-rendering: geometricPrecision;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.logo-text strong { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; line-height: 1.2; letter-spacing: 0.02em; }
.logo-tagline { font-size: 0.75rem; opacity: 0.85; font-weight: 400; }
@media (min-width: 320px) {
  .logo-text strong { font-size: 1rem; }
}
@media (min-width: 480px) {
  .logo-text strong { font-size: 1.0625rem; }
  .logo-tagline { font-size: 0.8125rem; }
}
@media (min-width: 768px) {
  .logo-text strong { font-size: 1.0625rem; }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--touch-min);
  min-width: var(--touch-min);
  height: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  color: #fff;
  transition: background var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  margin: 0 auto;
  transition: transform var(--transition-smooth), opacity var(--transition);
}
.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; } }

.nav-main {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: auto;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background: var(--color-dark);
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 99;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.4);
}
.nav-main.is-open { display: flex; }
.nav-main a {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  min-height: var(--touch-min);
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: var(--text-min);
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-main a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
@media (min-width: 768px) {
  .nav-main {
    position: static;
    max-height: none;
    overflow: visible;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
  }
  .nav-main a {
    padding: 0.5rem 0.875rem;
    min-height: auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
  }
  .nav-main a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 2rem) 0 3rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 30%, var(--color-accent-teal) 0%, var(--color-dark) 45%, var(--color-dark-deep) 100%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
.hero-content { color: #fff; }
.hero-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 0.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.25rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem;
  font-weight: 500;
}
.hero-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1.5rem;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-visual {
  position: relative;
  order: -1;
  width: 100%;
  max-width: 100%;
}
.hero-image-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/3;
  max-width: 100%;
  width: 100%;
}
.hero-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image-secondary {
  position: absolute;
  right: 0;
  bottom: -1rem;
  width: 45%;
  max-width: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/3;
  border: 3px solid rgba(255, 255, 255, 0.2);
}
.hero-image-secondary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 320px) {
  .hero-image-secondary { max-width: 140px; }
}
@media (min-width: 480px) {
  .hero-image-secondary { width: 45%; max-width: 180px; }
}
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1fr 1fr; gap: 3rem; padding: 0 1rem; }
  .hero-visual { order: 0; }
  .hero-actions { flex-wrap: nowrap; }
  .hero-image-secondary { width: 50%; max-width: 280px; bottom: -1.5rem; }
}
@media (min-width: 1024px) {
  .hero-desc { font-size: 1.0625rem; margin-bottom: 2rem; }
  .hero-image-main { aspect-ratio: 3/2; }
}
@media (min-width: 1440px) {
  .hero-image-secondary { max-width: 320px; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-min);
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition), color var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-green) 0%, var(--color-accent-teal) 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(15, 118, 110, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 118, 110, 0.45);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}
.btn-block { width: 100%; }
@media (min-width: 480px) {
  .hero-actions .btn { flex: 0 1 auto; }
}

/* --- Sections common --- */
.section {
  padding: 4rem 0;
}
.section-dark {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.9);
}
.section-dark .section-title { color: #fff; }
.section-dark .section-intro,
.section-dark .strengths-list { color: rgba(255, 255, 255, 0.85); }
.section-dark a { color: var(--color-accent-green); }
.section-dark a:hover { color: #fff; }
.section-light {
  background: var(--color-bg-light);
  color: var(--color-text);
}
.section-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.section-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}
@media (min-width: 480px) { .section-intro { font-size: 1.0625rem; } }
.strengths-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}
.strengths-list li { margin-bottom: 0.5rem; }
@media (min-width: 480px) {
  .section { padding: 4.25rem 0; }
}
@media (min-width: 768px) {
  .section { padding: 5rem 0; }
  .section-inner { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
@media (min-width: 1024px) {
  .section { padding: 5.5rem 0; }
  .section-inner { gap: 3.5rem; }
}
@media (min-width: 1440px) {
  .section { padding: 6rem 0; }
}

/* --- Reveal animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-visible .reveal { transition-delay: calc(var(--i, 0) * 0.08s); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* --- Über uns --- */
.ueber-uns-content p { margin: 0 0 1rem; }
.ueber-uns-content p:last-of-type { margin-bottom: 0; }
.ueber-uns-slider { width: 100%; }

/* Über uns – bessere Lesbarkeit auf Handy & Tablet */
@media (max-width: 480px) {
  .ueber-uns {
    overflow: hidden;
  }

  .ueber-uns .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* На телефоне: текст сверху, фото снизу (одна колонка) */
  .ueber-uns .section-inner {
    display: block;
  }

  .ueber-uns-content {
    max-width: 100%;
    margin: 0 0 1.5rem;
  }

  .ueber-uns-content .section-title {
    font-size: 1.15rem;
    word-break: break-word;
    hyphens: auto;
  }

  .ueber-uns-content p,
  .ueber-uns .strengths-list {
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
    hyphens: auto;
  }

  .ueber-uns .strengths-list {
    padding-left: 1.1rem;
  }

  .ueber-uns-slider {
    max-width: 100%;
    margin: 0;
  }
}

@media (min-width: 481px) and (max-width: 1023px) {
  .ueber-uns .section-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
  }

  .ueber-uns-content {
    max-width: 40rem;
  }

  .ueber-uns-content p,
  .ueber-uns .strengths-list {
    font-size: 0.975rem;
  }

  .ueber-uns-slider {
    max-width: 100%;
    margin-left: auto;
  }
}

/* Slider --- */
.slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
}
.slider-track {
  display: flex;
  width: 300%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.slider-slide {
  width: 33.33333%;
  min-width: 33.33333%;
  flex-shrink: 0;
  padding: 0;
}
.slider-image {
  overflow: hidden;
  background: var(--color-dark-deep);
}
.slider-image--portrait img {
  object-fit: contain;
  object-position: center center;
}
.slider-image--lower img,
.slider-image--third img {
  object-fit: cover !important;
  object-position: center center;
  min-width: 100%;
  min-height: 100%;
}
.slider-image img {
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}
.slider-caption {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
}
.slider-caption h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.slider-caption p {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.slider-btn:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-50%) scale(1.05); }
.slider-btn svg { width: 20px; height: 20px; }
.slider-prev { left: 0.75rem; }
.slider-next { right: 0.75rem; }
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
}
.slider-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.slider-dot:hover { background: rgba(255, 255, 255, 0.5); }
.slider-dot.is-active { background: var(--color-accent-green); transform: scale(1.2); }

/* Slider: mobile-first, touch-friendly */
.slider {
  border-radius: var(--radius);
}
.slider-image {
  aspect-ratio: 4/3;
  max-height: 52vh;
  max-height: 52dvh;
}
.slider-caption { padding: 1rem 1rem 1.25rem; }
.slider-caption h3 { font-size: 1rem; }
.slider-caption p { font-size: 0.875rem; }
.slider-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  top: calc(50% - 1.5rem);
}
.slider-btn svg { width: 18px; height: 18px; }
.slider-prev { left: 0.5rem; }
.slider-next { right: 0.5rem; }
.slider-dots { padding: 0.75rem; }
@media (min-width: 768px) {
  .ueber-uns .section { padding: 5rem 0; }
  .ueber-uns .section-inner { gap: 3rem; }
  .slider { border-radius: var(--radius-lg); }
  .slider-image {
    aspect-ratio: auto;
    max-height: none;
  }
  .slider-caption { padding: 1.25rem 1.5rem; }
  .slider-caption h3 { font-size: 1.125rem; }
  .slider-caption p { font-size: 0.9375rem; }
  .slider-btn {
    width: var(--touch-min);
    height: var(--touch-min);
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    top: 50%;
  }
  .slider-btn svg { width: 20px; height: 20px; }
  .slider-prev { left: 0.75rem; }
  .slider-next { right: 0.75rem; }
  .slider-dots { padding: 1rem; }
}

/* --- Cards (Leistungen) --- */
.cards-grid {
  display: grid;
  gap: 1.25rem;
}
.cards-grid-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .cards-grid { gap: 1.5rem; }
}
@media (min-width: 768px) {
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cards-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}
@media (min-width: 1440px) {
  .cards-grid { gap: 1.75rem; }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.card-icon-teal {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(15, 118, 110, 0.2) 100%);
  color: var(--color-accent-teal);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* --- Projekte (filter + grid) --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--color-accent-green) 0%, var(--color-accent-teal) 100%);
  border-color: transparent;
  color: #fff;
}
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 480px) { .projects-grid { gap: 1.5rem; } }
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: repeat(4, 1fr); } }

.project-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.project-card.is-hidden { display: none; }
.project-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-light);
}
.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
}
.project-card:hover .project-card-image img { transform: scale(1.05); }
.project-card-body { padding: 1.25rem; }
.project-card-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.project-card-body p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.project-meta {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --- Karriere --- */
.karriere-inner .karriere-content .section-title { text-align: left; }
.karriere-subtitle {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1.75rem 0 0.5rem;
  letter-spacing: 0.02em;
}
.karriere-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}
.karriere-steps li { margin-bottom: 0.5rem; }
.karriere-contact {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.9375rem;
  color: var(--color-text);
}
.karriere-contact a { color: var(--color-accent-teal); }
.karriere-contact a:hover { color: var(--color-accent-green); }

/* Bessere Lesbarkeit in dunklem Karriere-Block */
.section-dark .karriere-contact {
  color: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(148, 163, 184, 0.35);
}
.form-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.form-card-title {
  font-family: var(--font-display);
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* --- Forms --- */
.form-row {
  margin-bottom: 1.25rem;
}
.form-row:last-of-type { margin-bottom: 1.5rem; }
.form-row label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}
.form-row .required { color: var(--color-accent-orange); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="file"],
.form-row textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: var(--text-min);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--color-text-muted); }
.form-row input[type="file"] {
  padding: 0.5rem 0;
  min-height: auto;
}
.form-row textarea {
  min-height: 120px;
  resize: vertical;
}
.form-row-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.form-row-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--color-accent-teal);
}
.form-row-checkbox label { margin-bottom: 0; font-weight: 400; }

.form-success-message {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: rgba(34, 120, 100, 0.15);
  color: var(--color-accent-teal);
}
.form-success-message.is-visible { display: block; }
.form-success-message.is-error {
  background: rgba(200, 60, 60, 0.12);
  color: #c0392b;
}

/* --- Kontakt --- */
.kontakt-address {
  font-style: normal;
  margin-bottom: 1.5rem;
}
.kontakt-address p { margin: 0 0 0.5rem; }
.kontakt-address a { color: var(--color-accent-green); }
.kontakt-address a:hover { color: #fff; }
.kontakt-hours { margin-top: 0.75rem; opacity: 0.9; }
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-top: 1.5rem;
  background: var(--color-dark-deep);
  width: 100%;
}
.map-wrap iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 200px;
  aspect-ratio: 16 / 10;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
.logo-mark-footer {
  width: 40px;
  height: 40px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 0.5rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 3px 10px rgba(15, 118, 110, 0.3);
}
.footer-tagline {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}
.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-legal > a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.footer-legal > a:hover { color: #fff; }
.footer-copy {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}
@media (min-width: 480px) { .footer-inner { padding: 0 1.25rem; } }
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; padding: 0 1.5rem; }
  .footer-legal { align-items: flex-end; text-align: right; }
}
@media (min-width: 1024px) { .footer-inner { padding: 0 2rem; } }

/* --- Cookie banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem;
  background: var(--color-dark);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.3);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.cookie-banner h2 { margin: 0; font-size: 1rem; }
.cookie-banner p { margin: 0.25rem 0 0; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.85); max-width: 56ch; }
.cookie-banner a { color: var(--color-accent-green); }
.cookie-banner a:hover { color: #fff; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; flex-shrink: 0; }
.cookie-banner .btn { min-height: var(--touch-min); }
.cookie-banner .btn-reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.cookie-banner .btn-reject:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* Cookie-Einstellungen Modal */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal-overlay.is-open {
  display: flex;
}
.cookie-modal {
  background: var(--color-surface);
  color: var(--color-text);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  max-height: 90vh;
  overflow-y: auto;
}
.cookie-modal h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}
.cookie-modal fieldset {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius);
  background: var(--color-bg-light);
}
.cookie-modal fieldset:first-of-type { margin-top: 0; }
.cookie-modal legend {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0 0.25rem;
}
.cookie-modal fieldset p {
  margin: 0.5rem 0 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.cookie-modal input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  accent-color: var(--color-accent-teal);
  vertical-align: middle;
}
.cookie-modal label { font-size: 0.9375rem; cursor: pointer; vertical-align: middle; }
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.cookie-modal-actions .btn { min-height: var(--touch-min); }
.cookie-modal .btn-outline {
  color: var(--color-text);
  border: 2px solid rgba(15, 23, 42, 0.25);
}
.cookie-modal .btn-outline:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.4);
  color: var(--color-text);
}

/* Cookie-Banner & Modal: Mobil & Tablet */
@media (max-width: 767px) {
  .cookie-banner {
    padding: 1rem 0.75rem 1rem;
    left: 0;
    right: 0;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: left;
  }
  .cookie-banner h2 {
    font-size: 0.9375rem;
    line-height: 1.3;
  }
  .cookie-banner p {
    font-size: 0.8125rem;
    margin-top: 0.35rem;
    max-width: none;
    line-height: 1.45;
  }
  .cookie-banner .cookie-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .cookie-banner .cookie-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
  }
  .cookie-modal-overlay {
    padding: 0.75rem;
    align-items: flex-end;
  }
  .cookie-modal {
    max-height: 85vh;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .cookie-modal h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  .cookie-modal fieldset {
    padding: 0.75rem 1rem;
    margin-top: 1rem;
  }
  .cookie-modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
  }
  .cookie-modal-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .cookie-banner {
    padding: 1rem 1.25rem;
  }
  .cookie-banner-inner {
    gap: 1.25rem;
  }
  .cookie-banner p {
    max-width: 42ch;
  }
  .cookie-banner .cookie-actions {
    gap: 0.5rem;
  }
  .cookie-modal {
    max-width: 90%;
    max-height: 88vh;
    padding: 1.5rem 1.25rem;
  }
}

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1rem;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--color-accent-green) 0%, var(--color-accent-teal) 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth), transform var(--transition-smooth);
  box-shadow: 0 4px 18px rgba(15, 118, 110, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(15, 118, 110, 0.5);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top svg { width: 24px; height: 24px; }

/* --- Legal pages (Impressum, Datenschutz) --- */
.body-legal main { padding-top: var(--header-height); }
.page-header {
  background: var(--color-dark);
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
}
.page-header h1 { font-family: var(--font-display); margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: 0.02em; }
.page-header p { margin: 0.5rem 0 0; opacity: 0.9; font-size: 0.9375rem; }
.content-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.content-area h2 {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.content-area h2:first-child { margin-top: 0; }
.content-area h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.content-area p,
.content-area li { color: var(--color-text-muted); line-height: 1.6; }
.legal-content a { color: var(--color-accent-teal); }

/* Legal form (Cookie-Einstellungen) */
.legal-form fieldset {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius);
  background: var(--color-bg-light);
}
.legal-form legend {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0 0.5rem;
  letter-spacing: 0.02em;
}
.legal-form fieldset p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.legal-form fieldset p:last-of-type { margin-bottom: 0.5rem; }
.legal-form input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  accent-color: var(--color-accent-teal);
  vertical-align: middle;
}
.legal-form label {
  font-size: 0.9375rem;
  color: var(--color-text);
  cursor: pointer;
  vertical-align: middle;
}
.legal-form .btn { margin-top: 1.25rem; }

/* Utility: hide on inner pages if needed */
.body-legal .hero { display: none; }

/* Legal pages – bessere Lesbarkeit auf Handy */
@media (max-width: 480px) {
  .body-legal .page-header {
    padding: 1.75rem 1.25rem;
  }

  .body-legal .content-area {
    padding: 1.75rem 1.25rem 2.5rem;
  }

  .body-legal .content-area h2 {
    font-size: 1.15rem;
  }

  .body-legal .content-area h3 {
    font-size: 1rem;
  }

  .body-legal .content-area p,
  .body-legal .content-area li {
    font-size: 0.93rem;
    line-height: 1.7;
    word-break: break-word;
    hyphens: auto;
  }
}

/* Legal pages – Tablet Layout */
@media (min-width: 481px) and (max-width: 1023px) {
  .body-legal .page-header {
    padding: 2.25rem 1.75rem;
  }

  .body-legal .content-area {
    padding: 2.25rem 1.75rem 3rem;
  }

  .body-legal .content-area h2 {
    font-size: 1.3rem;
  }

  .body-legal .content-area h3 {
    font-size: 1.1rem;
  }

  .body-legal .content-area p,
  .body-legal .content-area li {
    font-size: 0.97rem;
    line-height: 1.7;
  }
}

/* Karriere-Seite – Abstand unter dem festen Header */
.body-karriere main {
  margin-top: 30px;
}

/* ==========================================================================
   Responsive Layout – explicit breakpoints
   - Mobile:   bis 480px
   - Tablet:   481px–1023px
   - Desktop:  ab 1024px
   ========================================================================== */

/* --- Mobile phones (<= 480px) --- */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .hero {
    padding: calc(var(--header-height) + 1.5rem) 0 2.5rem;
  }

  .hero-desc {
    max-width: 100%;
  }

  .section {
    padding: 3.5rem 0;
  }

  .form-card {
    padding: 1.5rem;
  }

  .site-footer {
    padding: 2rem 0 1.75rem;
  }
}

/* --- Tablets (481px–1023px) --- */
@media (min-width: 481px) and (max-width: 1023px) {
  .hero {
    padding: calc(var(--header-height) + 2.5rem) 0 3.5rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  /* Zweispaltiges Layout für Text + Formular */
  .karriere-inner,
  .kontakt-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: flex-start;
  }

  .kontakt-inner .kontakt-info,
  .kontakt-inner .kontakt-form-wrap,
  .karriere-inner .karriere-text,
  .karriere-inner .kontakt-form-wrap {
    align-self: stretch;
  }

  .form-card {
    padding: 2rem;
  }
}

/* --- Desktops (>= 1024px) --- */
@media (min-width: 1024px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: calc(var(--header-height) + 3rem) 0 4rem;
  }

  .hero-inner {
    gap: 3.5rem;
  }

  .hero-desc {
    font-size: 1.0625rem;
  }

  .section {
    padding: 5.5rem 0;
  }

  .section-title {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  }

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

  .karriere-inner,
  .kontakt-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: flex-start;
  }

  .form-card {
    padding: 2.25rem 2.25rem 2.5rem;
  }

  .site-footer .footer-inner {
    grid-template-columns: minmax(0, 1.4fr) auto;
  }
}
