/* ==========================================================================
   Seitenspezifische Bausteine
   ========================================================================== */

/* --- Hero (Startseite): vollflächiges Bild ------------------------------- */
.hero {
  position: relative;
  min-height: 92svh;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-height) + clamp(2rem, 6vh, 5rem));
  padding-bottom: clamp(2.5rem, 7vh, 5.5rem);
  background: var(--color-dark);
  color: var(--color-text-invert);
  overflow: hidden;
  isolation: isolate;
}

/* Bildebene ---------------------------------------------------------------- */
.hero__bg {
  position: absolute;
  inset: -2% 0 -6%;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide picture { display: block; width: 100%; height: 100%; }
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1200ms ease-out;
}
/* langsame Kamerafahrt auf dem aktiven Bild */
.hero__slide.is-active img {
  animation: heroPan 16s ease-out both;
}
@keyframes heroPan {
  from { transform: scale(1.02); }
  to   { transform: scale(1.11); }
}

/* Abdunklung: unten für den Text, rechts oben ein warmer Lichtschimmer ----- */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 10, 13, 0.82) 0%, rgba(10, 10, 13, 0.28) 26%,
                    rgba(10, 10, 13, 0.34) 52%, rgba(10, 10, 13, 0.9) 100%),
    linear-gradient(96deg, rgba(10, 10, 13, 0.86) 0%, rgba(10, 10, 13, 0.52) 38%,
                    rgba(10, 10, 13, 0.08) 68%, rgba(10, 10, 13, 0.35) 100%);
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(58% 46% at 78% 14%, rgba(240, 192, 36, 0.22), transparent 62%);
  mix-blend-mode: screen;
  pointer-events: none;
}
/* feine Farbschichten am unteren Rand – wie aufgetragene Farbe */
.hero__edge {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  z-index: 3;
  display: flex;
  pointer-events: none;
}
.hero__edge i { flex: 1; background: var(--edge); }

/* Inhalt ------------------------------------------------------------------- */
.hero__inner {
  position: relative;
  z-index: 4;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.hero__content { max-width: 44rem; }
.hero .eyebrow { color: var(--color-accent); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65); }
.hero__facts li { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.hero__title {
  font-size: var(--fs-hero);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  color: var(--color-text-invert);
  margin-bottom: 1.35rem;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}
.hero__title .accent { color: var(--color-accent); }
.hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: rgba(246, 243, 238, 0.86);
  max-width: 46ch;
  margin-bottom: 2rem;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
}
.hero__cta { margin-bottom: 2.25rem; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 243, 238, 0.2);
  list-style: none;
  margin: 0;
  padding-left: 0;
  max-width: 46rem;
}
.hero__facts li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.86rem;
  color: rgba(246, 243, 238, 0.82);
}
.hero__facts li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: none;
}

/* Bildunterschrift und Steuerung ------------------------------------------ */
.hero__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  text-align: right;
  padding-bottom: 0.35rem;
}
.hero__caption {
  min-height: 2.6em;
  max-width: 17rem;
}
.hero__caption strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text-invert);
}
.hero__caption strong { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }
.hero__caption span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.hero__dots { display: flex; gap: 0.45rem; }
.hero__dot {
  position: relative;
  width: 54px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  display: block;
}
.hero__dot::before {
  content: "";
  position: absolute;
  inset: 18px 0;
  background: rgba(246, 243, 238, 0.35);
}
.hero__dot::after {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 0;
  background: var(--color-accent);
  transition: width 220ms linear;
}
.hero__dot:hover::before { background: rgba(246, 243, 238, 0.55); }
.hero__dot[aria-current="true"]::after { width: 100%; }
.hero__dot[data-timing="true"][aria-current="true"]::after {
  animation: heroProgress 6800ms linear both;
}
@keyframes heroProgress { from { width: 0; } to { width: 100%; } }

/* Scroll-Hinweis ----------------------------------------------------------- */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.55);
}
.hero__scroll i {
  display: block;
  width: 44px; height: 1px;
  background: rgba(246, 243, 238, 0.3);
  position: relative;
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: var(--color-accent);
  animation: scrollHint 2.4s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes scrollHint {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(250%); }
  100% { transform: translateX(250%); }
}

/* Pinselzug beim Laden ----------------------------------------------------- */
.hero__sweep {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(240, 192, 36, 0) 0%, rgba(240, 192, 36, 0.9) 42%,
                              rgba(240, 192, 36, 0.98) 56%, rgba(240, 192, 36, 0) 100%);
  animation: brushSweep 1250ms cubic-bezier(0.6, 0.04, 0.24, 1) 180ms both;
}
.hero__curtain {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--color-dark);
  transform-origin: right center;
  animation: heroCurtain 1150ms cubic-bezier(0.62, 0.02, 0.2, 1) 260ms both;
  pointer-events: none;
}
@keyframes heroCurtain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* --- Seitenkopf (Unterseiten) -------------------------------------------- */
.page-hero {
  position: relative;
  background: var(--color-dark);
  color: var(--color-text-invert);
  padding-top: calc(var(--header-height) + clamp(2.5rem, 5vw, 4rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 120% at 88% 0%, rgba(240, 192, 36, 0.14), transparent 60%),
    linear-gradient(180deg, #101014, #0e0e11);
}
.page-hero__inner { position: relative; z-index: 2; }
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}
.page-hero h1 { color: var(--color-text-invert); max-width: 15em; }
.page-hero p { color: rgba(246, 243, 238, 0.76); max-width: 52ch; }
.page-hero--image { padding-bottom: 0; }
.page-hero__figure {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 21 / 8;
}
.page-hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .breadcrumbs { padding-top: 0; margin-bottom: 1.5rem; }
.page-hero .breadcrumbs ol { color: rgba(246, 243, 238, 0.55); }
.page-hero .breadcrumbs a:hover { color: var(--color-accent); }

/* --- Signature-Sektion („Farbe mit Wirkung“) ----------------------------- */
.signature {
  position: relative;
  background: var(--color-dark);
  color: var(--color-text-invert);
  overflow: hidden;
}
.signature::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 192, 36, 0.5), transparent);
}
.signature__intro { max-width: 52ch; margin-inline: auto; text-align: center; }

/* --- Split-Bild/Text ----------------------------------------------------- */
.split__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media--tall { aspect-ratio: 3 / 4; }
.split__badge {
  position: absolute;
  right: 1rem; bottom: 1rem;
  background: rgba(14, 14, 17, 0.82);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- Leistungsliste (Unterseiten) ---------------------------------------- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin: 0;
  font-size: 0.96rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.52em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--color-accent-deep);
  border-bottom: 2px solid var(--color-accent-deep);
  transform: rotate(-45deg);
}
.on-dark .check-list li::before { border-color: var(--color-accent); }

/* --- Leistungsnavigation (Querverweise) ---------------------------------- */
.service-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0; padding: 0;
}
.service-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 56px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.service-nav a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.service-nav a > span + span { flex: none; }
.service-nav a:hover { border-color: var(--color-accent); background: var(--color-surface); }
.service-nav a[aria-current="page"] {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-surface-alt);
}
.service-nav li { margin: 0; }

/* --- CTA-Band ------------------------------------------------------------ */
.cta-band {
  position: relative;
  background: var(--color-accent);
  color: var(--color-brand-primary);
  overflow: hidden;
}
.cta-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.cta-band h2 { color: var(--color-brand-primary); max-width: 20ch; }
.cta-band p { color: rgba(22, 22, 26, 0.72); max-width: 46ch; margin-top: 0.8rem; }
.cta-band .btn { --btn-bg: var(--color-brand-primary); --btn-fg: var(--color-accent); }
.cta-band .btn::before { background: var(--color-surface-alt); }
.cta-band .btn:hover { color: var(--color-brand-primary); }
.cta-band .btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--color-brand-primary);
  border-color: rgba(22, 22, 26, 0.35);
}
.cta-band__mark {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(8rem, 22vw, 20rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(22, 22, 26, 0.06);
  pointer-events: none;
  user-select: none;
  line-height: 0.8;
}

/* --- Einsatzgebiet ------------------------------------------------------- */
.area-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.6rem;
  list-style: none;
  margin: 0; padding: 0;
}
.area-list li {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.area-list li span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--color-muted);
  margin-left: auto;
}
.radius-visual {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  min-height: 300px;
  margin-inline: auto;
  align-self: center;
  display: grid;
  place-items: center;
}
.radius-visual__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
}
.radius-visual__ring--1 { inset: 34%; border-color: var(--color-accent); }
.radius-visual__ring--2 { inset: 17%; border-style: dashed; }
.radius-visual__ring--3 { inset: 0; border-style: dashed; opacity: 0.6; }
.radius-visual__core {
  position: relative;
  z-index: 2;
  padding: 0.5rem;
  background: var(--color-brand-primary);
  color: var(--color-surface-alt);
  border-radius: 50%;
  width: 30%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}
.radius-visual__tag {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-surface-alt);
  padding: 0 0.4rem;
}
.radius-visual__tag--1 { top: 33%; left: 50%; transform: translate(-50%, -50%); color: var(--color-accent-ink); }
.radius-visual__tag--2 { top: 16%; left: 50%; transform: translate(-50%, -50%); }
.radius-visual__tag--3 { top: -1%; left: 50%; transform: translate(-50%, -50%); }

/* --- 404 ----------------------------------------------------------------- */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--color-dark);
  color: var(--color-text-invert);
  text-align: center;
  padding: calc(var(--header-height) + 3rem) var(--gutter) 5rem;
  position: relative;
  overflow: hidden;
}
.error-page__code {
  font-size: clamp(6rem, 22vw, 16rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(246, 243, 238, 0.28);
  margin-bottom: 1.5rem;
}
.error-page__code span { color: var(--color-accent); -webkit-text-stroke: 0; }

/* --- Rechtstexte --------------------------------------------------------- */
.legal { max-width: 68ch; }
.legal h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-top: 2.6rem; margin-bottom: 0.9rem; }
.legal h3 { font-size: 1.05rem; margin-top: 1.8rem; margin-bottom: 0.5rem; }
.legal p, .legal li { font-size: 0.95rem; }
.legal address { font-style: normal; line-height: 1.7; }

/* --- Referenz-Detailkarte ------------------------------------------------ */
.ref-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.25rem 0;
  border-block: 1px solid var(--color-border);
  list-style: none;
  margin: 0 0 var(--space-md);
}
.ref-meta li { margin: 0; }
.ref-meta dt, .ref-meta__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.3rem;
}
.ref-meta__value { font-size: 0.95rem; font-weight: 500; }

/* ==========================================================================
   Einsatzgebiet – Umkreisgrafik
   ========================================================================== */
.areamap {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding-inline: clamp(0rem, 4vw, 3rem);
}
.areamap svg { width: 100%; height: auto; overflow: visible; }

.areamap__ring {
  fill: none;
  stroke: rgba(246, 243, 238, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 7;
}
.areamap__ring--main { stroke: rgba(240, 192, 36, 0.5); stroke-dasharray: none; }
.areamap__spoke { stroke: rgba(246, 243, 238, 0.08); stroke-width: 1; }
.areamap__link {
  stroke: rgba(240, 192, 36, 0.32);
  stroke-width: 1.2;
  fill: none;
}
.areamap__ringlabel {
  fill: rgba(246, 243, 238, 0.42);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-anchor: middle;
}

.areamap__place { cursor: default; }
.areamap__dot {
  fill: rgba(246, 243, 238, 0.62);
  transition: fill var(--transition-normal), r var(--transition-normal);
}
.areamap__place--major .areamap__dot { fill: var(--color-accent); }
.areamap__halo {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.2;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.areamap__label {
  fill: rgba(246, 243, 238, 0.78);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: fill var(--transition-normal);
}
.areamap__km {
  fill: rgba(240, 192, 36, 0.85);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
/* Nebenorte: Name erscheint erst beim Überfahren */
.areamap__label--soft { opacity: 0; transition: opacity var(--transition-normal); }
.areamap__place:hover .areamap__label--soft,
.areamap__place:focus-visible .areamap__label--soft,
.areamap__place.is-active .areamap__label--soft { opacity: 1; }
.areamap__place:hover .areamap__km,
.areamap__place:focus-visible .areamap__km,
.areamap__place.is-active .areamap__km { opacity: 1; }
.areamap__place:focus { outline: none; }
.areamap__place:focus-visible .areamap__halo { opacity: 1; stroke-width: 2; }
.areamap__place:hover .areamap__dot,
.areamap__place.is-active .areamap__dot { fill: var(--color-accent); }
.areamap__place:hover .areamap__label,
.areamap__place.is-active .areamap__label { fill: #fff; }
.areamap__place:hover .areamap__halo,
.areamap__place.is-active .areamap__halo { opacity: 0.8; }

.areamap__home { fill: var(--color-accent); }
.areamap__pulse {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  transform-origin: 400px 400px;
  animation: mapPulse 3.4s ease-out infinite;
}
@keyframes mapPulse {
  0%   { transform: scale(0.6); opacity: 0.85; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
.areamap__homelabel {
  fill: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-anchor: middle;
}

/* Einblendung beim Scrollen */
.areamap__ring, .areamap__link { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.areamap__ring { stroke-dasharray: 4 7; stroke-dashoffset: 0; opacity: 0; transition: opacity 900ms ease; }
.areamap__ring--main { stroke-dasharray: 2100; stroke-dashoffset: 2100;
  transition: stroke-dashoffset 1600ms cubic-bezier(0.22, 0.61, 0.36, 1); opacity: 1; }
.areamap.is-visible .areamap__ring { opacity: 1; transition-delay: var(--d, 0ms); }
.areamap.is-visible .areamap__ring--main { stroke-dashoffset: 0; }
.areamap__link { transition: stroke-dashoffset 1200ms ease var(--d, 0ms); }
.areamap.is-visible .areamap__link { stroke-dashoffset: 0; }
.areamap__place {
  opacity: 0;
  transform: scale(0.7);
  transform-origin: var(--ox, 400px) var(--oy, 400px);
  transition: opacity 520ms ease var(--d, 0ms), transform 520ms cubic-bezier(0.16, 0.84, 0.44, 1) var(--d, 0ms);
}
.areamap.is-visible .areamap__place { opacity: 1; transform: scale(1); }

/* Ortsliste mit Verbindung zur Karte */
.area-list li[data-place] { cursor: default; transition: border-color var(--transition-fast),
  background var(--transition-fast), transform var(--transition-fast); }
.area-list li[data-place]:hover, .area-list li.is-active {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.on-dark .area-list li {
  background: rgba(246, 243, 238, 0.04);
  border-color: rgba(246, 243, 238, 0.14);
  color: rgba(246, 243, 238, 0.86);
}
.on-dark .area-list li span { color: rgba(246, 243, 238, 0.5); }
.on-dark .area-list li:hover { border-color: var(--color-accent); }

@media (prefers-reduced-motion: reduce) {
  .areamap__pulse { animation: none !important; opacity: 0.35; }
  .areamap__place { opacity: 1 !important; transform: none !important; }
  .areamap__ring { opacity: 1 !important; }
  .areamap__ring--main, .areamap__link { stroke-dashoffset: 0 !important; }
}
