/* ==========================================================================
   RM Sicherheit — Design System
   Dunkles Premium-Security-Design · Akzent: Logo-Blau
   ========================================================================== */

:root {
  --bg: #070b16;
  --bg-2: #0b1222;
  --bg-3: #101a30;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(148, 178, 255, 0.12);
  --accent: #2e6bff;
  --accent-2: #4f8bff;
  --accent-soft: rgba(46, 107, 255, 0.14);
  --text: #eef2fb;
  --text-dim: #9aa7c4;
  --white: #ffffff;
  --radius: 18px;
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --header-h: 84px;
  --max-w: 1200px;
}

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto ist Pflicht, sobald die Bilder width/height-Attribute tragen —
   sonst rechnet der Browser mit der Attributhöhe und verzerrt das Bild. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; font-weight: 700; }

.container { width: min(var(--max-w), 92vw); margin-inline: auto; }

section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }

/* --- Typo helpers ------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--accent); }

.h-xl { font-size: clamp(40px, 6.5vw, 76px); font-weight: 800; letter-spacing: -0.02em; }
.h-lg { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.015em; }
h2.h-lg + .lead, h2.h-lg + p { margin-top: 24px; }
.h-md { font-size: clamp(21px, 2.2vw, 27px); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-dim); max-width: 62ch; }
.text-dim { color: var(--text-dim); }
.text-gradient {
  background: linear-gradient(92deg, #7ea8ff 0%, #2e6bff 55%, #6a71d8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 15.5px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(135deg, #3d7bff, #1f4fd8);
  color: var(--white);
  box-shadow: 0 12px 34px -12px rgba(46, 107, 255, 0.65);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -12px rgba(46, 107, 255, 0.8); }
.btn-ghost { border-color: var(--card-border); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: var(--accent-2); transform: translateY(-3px); background: var(--accent-soft); }
.btn svg { width: 18px; height: 18px; }

/* --- Barrierefreiheit ----------------------------------------------------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 400;
  background: var(--accent); color: var(--white);
  padding: 12px 22px; border-radius: 0 0 12px 12px;
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible, .filter-btn:focus-visible { outline-offset: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* --- Cookie-Consent -------------------------------------------------------- */
.consent-banner {
  position: fixed; z-index: 500; left: 16px; right: 16px; bottom: 16px;
  display: flex; justify-content: center;
}
.consent-banner[hidden], .consent-modal[hidden] { display: none; }
.consent-inner {
  max-width: 860px; width: 100%;
  background: rgba(11, 18, 34, 0.97); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px 28px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.consent-inner p { font-size: 14.5px; color: var(--text-dim); margin-bottom: 18px; }
.consent-inner p strong { color: var(--text); display: block; font-family: var(--font-head); font-size: 16px; margin-bottom: 6px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.consent-actions .btn { padding: 12px 24px; font-size: 14.5px; }
/* „Alle akzeptieren" und „Nur notwendige" sind gleichrangige Optionen und
   werden deshalb identisch dargestellt — kein farblich bevorzugter Zustimmen-
   Button (EDSA-Leitlinien 03/2022, Dark-Pattern-Vermeidung). */
.btn-consent {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 178, 255, 0.34);
  color: var(--text);
  min-width: 178px; justify-content: center;
}
.btn-consent:hover {
  background: rgba(46, 107, 255, 0.16);
  border-color: rgba(79, 139, 255, 0.6);
  color: var(--white);
}
.btn-consent:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.consent-link {
  background: none; border: 0; cursor: pointer;
  color: var(--text-dim); font-family: var(--font-body); font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}
.consent-link:hover { color: var(--accent-2); }

.consent-modal {
  position: fixed; inset: 0; z-index: 510;
  background: rgba(4, 6, 12, 0.8);
  display: grid; place-items: center; padding: 20px;
}
.consent-card {
  max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 30px 32px;
}
.consent-card h2 { font-size: 22px; margin-bottom: 8px; }
.consent-card > p { font-size: 14.5px; color: var(--text-dim); margin-bottom: 22px; }
.consent-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  border: 1px solid var(--card-border); border-radius: 13px;
  padding: 16px 18px; margin-bottom: 12px;
}
.consent-row b { font-family: var(--font-head); display: block; margin-bottom: 3px; }
.consent-row p { font-size: 13.5px; color: var(--text-dim); }
.consent-row input[type="checkbox"] {
  appearance: none; width: 46px; height: 26px; flex: 0 0 46px; margin-top: 4px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14); position: relative;
  cursor: pointer; transition: background 0.25s;
}
.consent-row input[type="checkbox"]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--white); transition: transform 0.25s;
}
.consent-row input[type="checkbox"]:checked { background: var(--accent); }
.consent-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.consent-row input[type="checkbox"]:disabled { opacity: 0.6; cursor: not-allowed; }

.footer-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-dim); font-family: var(--font-body); font-size: 13.5px;
}
.footer-link:hover { color: var(--accent-2); }

/* --- Scroll-Progressbar (GSAP scrub) ------------------------------------ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  background: linear-gradient(90deg, #3d7bff, #6a71d8, #4f8bff);
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.35s ease, box-shadow 0.35s ease, height 0.35s ease;
}
.site-header.scrolled {
  height: 68px;
  background: rgba(7, 11, 22, 0.82);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(148, 178, 255, 0.08);
}
/* Logo links, Navigation rechtsbündig (rechts steht keine Telefonnummer mehr) */
.header-inner { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.brand img { height: 52px; width: auto; transition: height 0.35s ease; }
.site-header.scrolled .brand img { height: 42px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 19px; letter-spacing: 0.06em; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 10.5px; letter-spacing: 0.24em; color: var(--text-dim); text-transform: uppercase; }

.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 10px 15px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.main-nav a.active { color: var(--white); background: var(--accent-soft); }
.has-sub { position: relative; }
.has-sub > .sub {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 250px;
  background: rgba(11, 18, 34, 0.97); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.75);
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a { padding: 11px 14px; border-radius: 9px; }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.header-phone span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.header-phone a { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--white); transition: color 0.2s; }
.header-phone a:hover { color: var(--accent-2); }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 10px; z-index: 130;
}
.burger span { width: 26px; height: 2px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(7, 11, 22, 0.98);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav a { font-family: var(--font-head); font-size: 26px; font-weight: 700; padding: 10px 20px; color: var(--text-dim); transition: color 0.2s; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--white); }
.mobile-nav .mobile-sub { font-size: 19px; color: var(--text-dim); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
}
/* Firmenlogo rechts im Hero — ersetzt die frühere Canvas-Animation.
   Rein dekorativ (alt="" + aria-hidden), der Name steht bereits im Header.
   `display:contents` nimmt das <picture> des Unterseiten-Logos aus dem Layout;
   positioniert wird allein das <img>. NICHT auf `.hero > picture` ausweiten —
   dort steckt das Hintergrundbild, das seine eigene Box braucht. */
.page-hero > picture { display: contents; }
.hero-logo {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  right: 5%; top: 43%; transform: translateY(-50%);
  /* an Breite UND Höhe gekoppelt, damit das Logo in flachen Fenstern nicht in
     die Kennzahlen-Leiste darunter läuft */
  width: min(36vw, 43vh, 420px); height: auto;
}
/* Vollflächiges Hintergrundmotiv. Das Bild ist so komponiert, dass die linke
   Hälfte dunkel und frei bleibt — dort steht der Text. */
.hero-bg { position: absolute; inset: 0; z-index: 0; display: block; }
.hero-bg img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: right center;
}

/* Logo unten rechts, klein. Der Lichtreflex läuft in Logoform darüber:
   `.shine` trägt das Logo als Maske, darunter wandert ein Lichtstreifen. */
.hero-logo-badge {
  position: absolute; right: 5%; bottom: 13%; z-index: 2;
  width: min(14vw, 165px); pointer-events: none;
  animation: logoAuftritt 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-logo-badge img { width: 100%; height: auto; display: block; }
.hero-logo-badge .shine {
  position: absolute; inset: 0;
  -webkit-mask-image: url('/assets/img/logo-hero.png');
  mask-image: url('/assets/img/logo-hero.png');
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.62) 50%, transparent 62%);
  background-size: 280% 100%; background-position: 200% 0;
  animation: logoReflex 6s ease-in-out 1.4s infinite;
}
@keyframes logoAuftritt {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes logoReflex {
  0%, 62% { background-position: 200% 0; }   /* Pause zwischen den Durchläufen */
  100%    { background-position: -90% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo-badge { animation: none; }
  .hero-logo-badge .shine { display: none; }
}
/* Kein drop-shadow: der Schriftzug „SICHERHEIT" ist eine Outline-Type —
   ein Schatten legt dort einen grauen Halo hinter die offenen Buchstaben. */
/* Abdunklung nur hinter dem Text (links) — rechts bleibt das Logo frei */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg) 0%, rgba(7, 11, 22, 0.88) 30%,
                    rgba(7, 11, 22, 0.55) 58%, rgba(7, 11, 22, 0.30) 82%,
                    rgba(7, 11, 22, 0.24) 100%),
    /* oben kräftiger, damit die Navigation auch über der hellen Fassade steht */
    linear-gradient(to bottom, rgba(7, 11, 22, 0.78) 0%, rgba(7, 11, 22, 0.22) 24%,
                    transparent 40%, transparent 72%, var(--bg) 100%);
}
@media (max-width: 900px) {
  /* Mobil liegt der Text direkt auf dem Motiv — deutlich stärker abdunkeln */
  .hero::after {
    background: linear-gradient(to bottom, rgba(7, 11, 22, 0.74) 0%, rgba(7, 11, 22, 0.82) 38%,
                                rgba(7, 11, 22, 0.92) 68%, var(--bg) 100%);
  }
  /* Ausschnitt auf die Figuren statt auf die helle Fassade */
  .hero-bg img { object-position: 74% center; }
  /* Auf schmalen Screens liegt das Logo direkt hinter dem Fließtext — dort
     zeigt der Header es ohnehin, also ausblenden statt den Text stören. */
  .hero-logo { display: none; }
  /* Badge würde mit der Kennzahlen-Leiste kollidieren; das Logo steht mobil
     ohnehin im Header. */
  .hero-logo-badge { display: none; }
}
.hero .container { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px; border-radius: 999px; margin-bottom: 26px;
  border: 1px solid var(--card-border); background: rgba(11, 18, 34, 0.6);
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #38d97c; box-shadow: 0 0 12px #38d97c; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.hero h1 { max-width: 15ch; margin-bottom: 24px; }
.hero .lead { margin-bottom: 40px; }
/* Mittlere Breiten: die Überschrift liefe sonst in die Bildkachel rechts.
   Muss NACH der 15ch-Regel oben stehen, sonst gewinnt diese. */
@media (min-width: 901px) and (max-width: 1319px) {
  .hero h1 { max-width: 11ch; }
  .hero .lead { max-width: 44ch; }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 70px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--card-border); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden; max-width: 860px;
}
.hero-stats > div { background: rgba(11, 18, 34, 0.72); padding: 22px 26px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-stats b { display: block; font-family: var(--font-head); font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; color: var(--white); }
.hero-stats b span { font: inherit; color: inherit; letter-spacing: inherit; }
.hero-stats > div > span { font-size: 13px; color: var(--text-dim); letter-spacing: 0.04em; }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 2px solid rgba(154, 167, 196, 0.5); border-radius: 14px;
}
.scroll-hint::before {
  content: ''; position: absolute; top: 7px; left: 50%; margin-left: -2px;
  width: 4px; height: 8px; border-radius: 4px; background: var(--accent-2);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* --- Page hero (Unterseiten) --------------------------------------------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(56px, 9vw, 110px)) 0 clamp(56px, 7vw, 90px);
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(46, 107, 255, 0.16), transparent 65%),
    radial-gradient(700px 380px at 8% 8%, rgba(106, 113, 216, 0.12), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid rgba(148, 178, 255, 0.07);
}
/* Unterseiten-Hero ist flacher — Logo entsprechend kleiner */
.page-hero .hero-logo-compact { width: min(22vw, 210px); right: 6%; }
/* Textspalte begrenzen, sonst laufen lange Überschriften unter das Logo
   (betraf u. a. Referenzen, Über uns, Barrierefreiheit). */
@media (min-width: 901px) {
  .page-hero h1, .page-hero .lead { max-width: 64%; }
}
/* 901–1199 px: Überschriften wie „Kaufhausüberwachung" sind einzelne lange
   Wörter — die überlaufen jede Breitenbegrenzung. Dort weicht das Logo:
   auf Unterseiten ganz, auf der Startseite nach oben über die Kennzahlen. */
@media (min-width: 901px) and (max-width: 1199px) {
  .page-hero .hero-logo-compact { display: none; }
  .hero-logo-badge { top: 19%; bottom: auto; width: 132px; }
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg-2) 0%, rgba(11, 18, 34, 0.88) 32%,
                    rgba(11, 18, 34, 0.46) 62%, rgba(11, 18, 34, 0.12) 86%, transparent 100%),
    linear-gradient(to bottom, rgba(11, 18, 34, 0.5) 0%, transparent 30%, rgba(11, 18, 34, 0.6) 100%);
}
@media (max-width: 900px) {
  .page-hero::after {
    background: linear-gradient(to bottom, rgba(11, 18, 34, 0.5) 0%, rgba(11, 18, 34, 0.85) 60%, var(--bg-2) 100%);
  }
}
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-dim); margin-bottom: 22px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent-2); }
.breadcrumb .sep { opacity: 0.5; }

/* --- Cards / Grids -------------------------------------------------------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 34px 30px;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-6px); border-color: rgba(79, 139, 255, 0.4); background: rgba(255, 255, 255, 0.055); }
/* Spotlight-Hover: Lichtkegel folgt dem Cursor (JS setzt --mx/--my) */
.card { --mx: 50%; --my: 50%; }
.card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(79, 139, 255, 0.16), transparent 65%);
  transition: opacity 0.35s ease;
}
.card:hover::after { opacity: 1; }
.card .icon {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 22px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 12px; overflow-wrap: break-word; hyphens: auto; }
.card p { color: var(--text-dim); font-size: 15.5px; }
.card .card-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-weight: 700; font-size: 14.5px; color: var(--accent-2); }
.card .card-link svg { width: 16px; height: 16px; transition: transform 0.25s; }
.card:hover .card-link svg { transform: translateX(5px); }

/* Service-Karte mit Bild */
.service-card { padding: 0; display: flex; flex-direction: column; }
.service-card .thumb { aspect-ratio: 16 / 9.5; overflow: hidden; }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.service-card:hover .thumb img { transform: scale(1.07); }
.service-card .body { padding: 28px 28px 32px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }

/* Feature list (Leistungsdetails) */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.feature-list li {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 13px; padding: 16px 20px; font-weight: 600; font-size: 15.5px;
  transition: border-color 0.3s, transform 0.3s;
}
.feature-list li:hover { border-color: rgba(79, 139, 255, 0.45); transform: translateX(4px); }
.feature-list .check {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2);
}
.feature-list .check svg { width: 13px; height: 13px; }

/* --- Split-Layout ---------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.split .media { border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
/* Für sehr breite Ausgangsbilder: Box aufs Hochformat zwingen, Bild wird beschnitten */
.split .media-portrait { aspect-ratio: 4 / 3.4; }
@media (max-width: 860px) { .split .media-portrait { aspect-ratio: 16 / 9; } }
.split .media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(200deg, rgba(46, 107, 255, 0.18), transparent 55%); }

/* --- Marquee ---------------------------------------------------------------- */
.marquee-section { padding: 44px 0; border-block: 1px solid rgba(148, 178, 255, 0.07); background: var(--bg-2); overflow: hidden; }
.marquee { display: flex; gap: 60px; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee span { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: rgba(238, 242, 251, 0.4); white-space: nowrap; display: flex; align-items: center; gap: 60px; }
.marquee span::after { content: '◆'; font-size: 10px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Referenzen -------------------------------------------------------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filter-btn {
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--card-border);
  background: transparent; color: var(--text-dim); font-family: var(--font-head);
  font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.25s;
}
.filter-btn:hover { color: var(--white); border-color: var(--accent-2); }
.filter-btn.active { background: linear-gradient(135deg, #3d7bff, #1f4fd8); color: var(--white); border-color: transparent; }

.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ref-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 15px;
  padding: 24px 24px 20px; transition: transform 0.3s, border-color 0.3s, opacity 0.4s, scale 0.4s;
}
.ref-card:hover { transform: translateY(-4px); border-color: rgba(79, 139, 255, 0.45); }

/* Karten mit Hintergrundbild: Bild liegt hinter dem Text und wird so weit
   abgedunkelt, dass die Schrift immer den Kontrast hält (WCAG AA). */
.ref-card.has-img { position: relative; overflow: hidden; min-height: 232px;
  display: flex; flex-direction: column; justify-content: flex-end; }
/* ⚠️ Muss NACH `.ref-card.has-img` stehen UND höher gewichtet sein: sonst
   überschreibt dessen `display:flex` das Ausblenden (gleiche Spezifität,
   spätere Regel gewinnt) und der Kategorie-Filter bleibt wirkungslos.
   Fiel früher nicht auf, weil nur wenige Karten ein Bild hatten. */
.ref-grid .ref-card.hidden { display: none; }
.ref-card .ref-bg {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.78; transition: opacity 0.45s ease, transform 0.6s ease;
}
.ref-card .ref-bg img, .ref-card .ref-bg picture { width: 100%; height: 100%; display: block; }
.ref-card .ref-bg img { object-fit: cover; object-position: center; }
/* Verlauf schützt nur den Textbereich unten — das Motiv bleibt oben klar sichtbar */
.ref-card.has-img::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 11, 22, 0.97) 0%, rgba(7, 11, 22, 0.92) 34%,
              rgba(7, 11, 22, 0.55) 62%, rgba(7, 11, 22, 0.18) 100%);
}
.ref-card.has-img > .tag, .ref-card.has-img > h3, .ref-card.has-img > p { position: relative; z-index: 2; }
.ref-card.has-img > .tag { align-self: flex-start; }
.ref-card.has-img:hover .ref-bg { opacity: 0.62; transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .ref-card.has-img:hover .ref-bg { transform: none; }
}

/* --- Referenz im Fokus (Showcase) ----------------------------------------- */
.showcase { position: relative; overflow: hidden; background: var(--bg-2); }
.showcase-bg {
  position: absolute; inset: 0; z-index: 0; opacity: 0.55;
  background-size: cover; background-position: center 62%;
}
/* Textseite links kräftig abdecken, damit Fließtext auch über hellem Himmel lesbar bleibt */
.showcase::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg-2) 2%, rgba(11, 18, 34, 0.95) 40%,
                    rgba(11, 18, 34, 0.72) 68%, rgba(11, 18, 34, 0.4) 100%),
    linear-gradient(to bottom, rgba(11, 18, 34, 0.55) 0%, transparent 30%,
                    transparent 62%, rgba(11, 18, 34, 0.7) 100%);
}
@media (max-width: 900px) {
  .showcase::after { background: linear-gradient(to bottom,
      rgba(11, 18, 34, 0.72) 0%, rgba(11, 18, 34, 0.92) 55%, var(--bg-2) 100%); }
}
.showcase-inner { position: relative; z-index: 2; }
.showcase-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 44px;
  background: var(--card-border); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden; max-width: 940px; }
.showcase-facts > div { background: rgba(11, 18, 34, 0.82); padding: 22px 24px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.showcase-facts b { display: block; font-family: var(--font-head); font-size: 16px;
  color: var(--white); margin-bottom: 5px; }
.showcase-facts span { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; }
@media (max-width: 780px) { .showcase-facts { grid-template-columns: 1fr; } }

/* Bildnachweise (Pflicht bei CC BY / CC BY-SA) */
.img-credits { margin-top: 30px; font-size: 12.5px; color: var(--text-dim); line-height: 1.9; }
.img-credits summary { cursor: pointer; font-weight: 700; color: var(--text); }
.img-credits ul { margin-top: 12px; display: grid; gap: 3px; }
.img-credits a { color: var(--accent-2); }
.ref-card .tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-2);
  background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.ref-card h3 { font-size: 16.5px; line-height: 1.4; margin-bottom: 6px; }
.ref-card p { font-size: 13.5px; color: var(--text-dim); }

/* --- Galerie ------------------------------------------------------------------ */
.gallery-grid { columns: 3; column-gap: 18px; }
.gallery-grid figure {
  break-inside: avoid; margin-bottom: 18px; border-radius: 14px; overflow: hidden;
  position: relative; cursor: zoom-in; border: 1px solid var(--card-border);
}
.gallery-grid img { width: 100%; transition: transform 0.5s ease; }
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute; inset: auto 0 0 0; padding: 34px 16px 13px;
  background: linear-gradient(transparent, rgba(7, 11, 22, 0.9));
  font-size: 13.5px; font-weight: 600;
}
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(4, 6, 12, 0.94);
  display: grid; place-items: center; padding: 4vw;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 40px 120px rgba(0,0,0,0.8); }
.lightbox-close {
  position: absolute; top: 22px; right: 26px; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--card-border);
  color: var(--white); font-size: 26px; line-height: 1; cursor: pointer;
  transition: background 0.25s;
}
.lightbox-close:hover { background: var(--accent); }
.lightbox figcaption { text-align: center; margin-top: 16px; color: var(--text-dim); }

/* --- Kontakt -------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 4vw, 60px); align-items: start; }
.contact-info-card { display: flex; align-items: flex-start; gap: 18px; padding: 24px 26px; margin-bottom: 16px; }
.contact-info-card .icon { margin-bottom: 0; flex-shrink: 0; }
.contact-info-card b { font-family: var(--font-head); display: block; margin-bottom: 3px; }
.contact-info-card a { color: var(--text-dim); transition: color 0.2s; display: block; }
.contact-info-card a:hover { color: var(--accent-2); }
.contact-info-card p { font-size: 15px; }

/* --- Kooperationspartner (Referenzen) ------------------------------------- */
.partner-card { display: flex; gap: 22px; align-items: flex-start; }
.partner-mark {
  flex: 0 0 68px; height: 68px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: 0.02em;
  color: var(--accent-2); background: var(--accent-soft); border: 1px solid var(--card-border);
}
/* Partnerlogo: heller Chip, damit dunkle Logo-Teile auf dunklem Grund lesbar bleiben */
.partner-mark.has-logo { flex: 0 0 128px; width: 128px; height: 68px; padding: 14px 16px;
  background: rgba(255, 255, 255, 0.94); border-color: rgba(255, 255, 255, 0.2); }
.partner-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 560px) { .partner-mark.has-logo { flex: 0 0 auto; } }
@media (max-width: 560px) { .partner-card { flex-direction: column; gap: 16px; } }

/* Kontaktzeilen mit Icon (Büro-Karte) */
.contact-lines { margin-top: 14px; display: grid; gap: 9px; }
.contact-lines li { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--text-dim); }
.contact-lines .ico { flex: 0 0 17px; width: 17px; height: 17px; color: var(--accent-2); }
.contact-lines .ico svg { width: 100%; height: 100%; display: block; }
.contact-lines a { display: inline; }
/* Hervorgehobene Karte (24/7-Bereitschaftsdienst) */
.accent-card { border-color: rgba(79, 139, 255, 0.34); background: rgba(46, 107, 255, 0.07); }

/* --- Prozess-Schritte (Kontakt: „So arbeiten wir") ------------------------ */
.process-steps { margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 34px; }
.process-steps .step { display: flex; gap: 18px; align-items: flex-start; position: relative; }
.process-steps .step-no {
  flex: 0 0 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
  color: var(--accent-2); background: var(--accent-soft); border: 1px solid var(--card-border);
}
.process-steps h3 { margin-bottom: 8px; }
.process-steps p { font-size: 15px; }
@media (max-width: 1000px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .process-steps { grid-template-columns: 1fr; } }

/* Rückmeldung nach dem Absenden */
.form-hinweis { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px;
  border-radius: 13px; margin-bottom: 24px; font-size: 14.5px; line-height: 1.6; }
.form-hinweis b { font-family: var(--font-head); font-size: 15.5px; }
.form-ok { background: rgba(56, 217, 124, 0.1); border: 1px solid rgba(56, 217, 124, 0.36); color: #b7f0cf; }
.form-ok b { color: #6ee7a0; }
.form-fehler { background: rgba(255, 107, 107, 0.09); border: 1px solid rgba(255, 107, 107, 0.36); color: #f3c9c9; }
.form-fehler b { color: #ff8f8f; }
.form-hinweis a { color: inherit; text-decoration: underline; }
/* Honeypot: für Menschen unsichtbar, aber nicht display:none (Bots erkennen das) */
.hp-feld { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn.is-busy { opacity: 0.6; pointer-events: none; }

.form-card { padding: clamp(28px, 3vw, 44px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em; }
.form-field input, .form-field select, .form-field textarea {
  background: rgba(7, 11, 22, 0.65); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px 16px; color: var(--text);
  font-family: var(--font-body); font-size: 15px; transition: border-color 0.25s, box-shadow 0.25s;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(46, 107, 255, 0.15);
}
.form-note { font-size: 13px; color: var(--text-dim); margin-top: 14px; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--card-border); margin-top: 40px; }

/* --- CTA-Band ---------------------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(46, 107, 255, 0.28), transparent 60%),
    radial-gradient(700px 320px at 90% 100%, rgba(106, 113, 216, 0.22), transparent 60%),
    var(--bg-3);
  border: 1px solid rgba(148, 178, 255, 0.14);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(44px, 6vw, 80px);
  text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { margin: 0 auto 34px; }
.cta-band .hero-actions { justify-content: center; margin-bottom: 0; }

/* --- Prose (Impressum/Datenschutz) --------------------------------------------------- */
.prose { max-width: 820px; }
.prose h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 48px 0 16px; }
.prose h3 { font-size: 19px; margin: 32px 0 12px; color: var(--accent-2); }
.prose p, .prose li { color: var(--text-dim); margin-bottom: 14px; font-size: 15.5px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose strong { color: var(--text); }
.prose .contact-block {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 28px 30px; margin: 24px 0; font-size: 16px; color: var(--text);
}
.prose .contact-block p { color: var(--text); margin-bottom: 4px; }

/* --- Footer ---------------------------------------------------------------------------- */
.site-footer { background: var(--bg-2); border-top: 1px solid rgba(148, 178, 255, 0.08); padding: 70px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
.footer-grid h3 { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 20px; }
.footer-grid ul li { margin-bottom: 11px; }
.footer-grid a { color: var(--text-dim); font-size: 15px; transition: color 0.2s; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { color: var(--text-dim); font-size: 14.5px; max-width: 30ch; }
.footer-contact li { display: flex; gap: 10px; align-items: baseline; color: var(--text-dim); font-size: 15px; }
.footer-contact b { color: var(--text); font-weight: 600; }
/* Kontaktzeilen mit Icon statt Textlabel (Telefon, Fax, E-Mail) */
.footer-contact li.with-ico { align-items: center; gap: 11px; }
.footer-contact .ico { flex: 0 0 17px; width: 17px; height: 17px; color: var(--accent-2); }
.footer-contact .ico svg { width: 100%; height: 100%; display: block; }
.footer-bottom {
  border-top: 1px solid rgba(148, 178, 255, 0.08); padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 13.5px; color: var(--text-dim);
}
.footer-bottom a:hover { color: var(--accent-2); }
/* Kein opacity: 0.7 — das drückte die effektive Farbe auf rgb(108,117,137)
   und riss den WCAG-AA-Kontrast (Lighthouse-A11y-Fehler). Stattdessen eine
   feste, ausreichend helle Farbe. */
.footer-credit { display: block; margin-top: 4px; font-size: 12.5px; color: rgb(154, 167, 196); }

/* --- Reveal (GSAP) ----------------------------------------------------------------------- */
.reveal, .reveal-stagger > * { opacity: 0; transform: translateY(36px); }
html.no-js .reveal, html.no-js .reveal-stagger > * { opacity: 1; transform: none; }

/* --- Responsive ---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-phone { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ref-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { columns: 2; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .split, .contact-grid, .form-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: auto; }
}
@media (max-width: 520px) {
  .grid-4, .ref-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
