/* =========================================================
   BS Pflege · Utility-Seiten
   Danke, 404, Impressum, Datenschutz
   Wird nur auf diesen vier Seiten nach css/style.css geladen.
========================================================== */

[hidden] { display: none !important; }

/* ---------- Kompakter Seitenkopf ---------- */
.page-hero--compact {
  min-height: clamp(380px, 50vh, 500px);
}
.page-hero--compact .page-hero__media img {
  object-position: center 40%;
}
.page-hero--compact .page-hero__body {
  padding: 160px 28px 88px;
}
.page-hero--compact .page-hero__title {
  margin-bottom: 0;
}
.page-hero--compact .page-hero__lead {
  margin-top: 18px;
  margin-bottom: 0;
}
.page-hero--compact .hero__eyebrow {
  margin-bottom: 18px;
}

/* Danke und 404: Platz für die überlappende Wege-Karte */
.page-hero--utility .page-hero__body {
  padding-bottom: 168px;
}

/* =========================================================
   Danke und 404
========================================================== */
.utility-main {
  position: relative;
  z-index: 6;
  padding-bottom: 110px;
}
.utility-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-top: -112px;
  padding: clamp(28px, 4vw, 52px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.utility-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 360px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-1-glow), transparent 68%);
  pointer-events: none;
}

/* Markenzeichen links: Haken oder 404 im Verlaufskreis */
.utility-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 25%, var(--accent-2-soft), transparent 60%),
    linear-gradient(145deg, var(--primary-soft), var(--bg));
}
.utility-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(132px, 15vw, 176px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--btn-gradient);
  box-shadow: 0 24px 56px rgba(45, 90, 105, 0.32);
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.utility-mark svg {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.utility-mark--404 {
  font-size: clamp(40px, 4.6vw, 56px);
}
.utility-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(80, 131, 150, 0.22);
  pointer-events: none;
}
.utility-ring--one { width: clamp(176px, 20vw, 232px); aspect-ratio: 1; }
.utility-ring--two {
  width: clamp(212px, 25vw, 284px);
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(242, 140, 122, 0.45);
}
.utility-dot {
  position: absolute;
  top: 22%;
  right: 22%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(242, 140, 122, 0.18);
}

/* Wege zurück */
.utility-routes {
  position: relative;
  z-index: 1;
}
.utility-routes .section-label {
  margin-bottom: 12px;
}
.utility-routes h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 26px;
}
.utility-routes__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.utility-route {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 20px 20px;
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s, border-color .3s, background .3s;
}
.utility-route:hover,
.utility-route:focus-visible {
  transform: translateY(-4px);
  background: #fff;
  border-color: rgba(80, 131, 150, 0.28);
  box-shadow: var(--shadow-sm);
}
.utility-route:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.utility-route .card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
}
.utility-route .card-icon svg {
  width: 20px;
  height: 20px;
}
.utility-route:hover .card-icon,
.utility-route:focus-visible .card-icon {
  background: var(--accent-2);
  box-shadow: 0 12px 28px var(--accent-2-glow), 0 0 0 6px rgba(242, 140, 122, 0.14);
}
.utility-route__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.utility-route__title::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform .3s;
}
.utility-route:hover .utility-route__title::after {
  transform: translateX(3px) rotate(45deg);
}
.utility-route__text {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.utility-route__strong {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--primary-dark);
}
.utility-route__strong + .utility-route__text {
  margin-top: 2px;
}

/* =========================================================
   Impressum und Datenschutz
========================================================== */
.legal-main {
  position: relative;
  z-index: 6;
  padding: 0 0 110px;
}
.legal-doc {
  max-width: 860px;
  margin: -56px auto 0;
  padding: clamp(28px, 5vw, 64px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.legal-prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  overflow-wrap: break-word;
}
.legal-prose > :first-child {
  margin-top: 0;
}
.legal-prose h2 {
  position: relative;
  margin: 2.2em 0 0.6em;
  padding-top: 1.4em;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--primary-dark);
  border-top: 1px solid var(--line);
}
.legal-prose h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-2);
}
.legal-prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.legal-prose > h2:first-child::before {
  display: none;
}
.legal-prose p {
  margin: 0 0 1em;
}
.legal-prose p:last-child {
  margin-bottom: 0;
}
.legal-prose a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Kontrastmodus ---------- */
html.a11y-contrast .utility-panel,
html.a11y-contrast .legal-doc {
  border-color: var(--ink);
  box-shadow: none;
}
html.a11y-contrast .utility-route {
  background: #fff;
  border-color: var(--ink);
}
html.a11y-contrast .utility-route__text,
html.a11y-contrast .legal-prose {
  color: var(--ink);
}
html.a11y-contrast .utility-art {
  background: #fff;
  border: 1px solid var(--ink);
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .utility-route,
  .utility-route__title::after {
    transition: none;
  }
  .utility-route:hover,
  .utility-route:focus-visible {
    transform: none;
  }
}
html.a11y-reduced-motion .utility-route:hover,
html.a11y-reduced-motion .utility-route:focus-visible {
  transform: none;
}

/* ---------- Responsiv ---------- */
@media (max-width: 1024px) {
  .utility-panel {
    grid-template-columns: 1fr;
  }
  .utility-art {
    min-height: 220px;
  }
}

@media (max-width: 960px) {
  .page-hero--compact {
    min-height: 340px;
  }
  .page-hero--compact .page-hero__body {
    padding: 130px 28px 72px;
  }
  .page-hero--utility .page-hero__body {
    padding-bottom: 140px;
  }
  .utility-routes__list {
    grid-template-columns: 1fr;
  }
  .utility-route__title {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .page-hero--compact {
    min-height: 300px;
  }
  .page-hero--compact .page-hero__body {
    padding: 116px 20px 60px;
  }
  .page-hero--utility .page-hero__body {
    padding-bottom: 120px;
  }
  .utility-main,
  .legal-main {
    padding-bottom: 72px;
  }
  .utility-panel {
    margin-top: -84px;
    border-radius: var(--radius-lg);
  }
  .utility-art {
    min-height: 200px;
  }
  .legal-doc {
    margin-top: -36px;
    border-radius: var(--radius-lg);
  }
  .legal-prose {
    font-size: 16px;
  }
}

/* Beim Scrollen bleibt der feste Kopf über der Inhaltskarte (27.10.2026) */
.page-hero-shell:has(.page-hero--compact),
.page-hero-shell:has(.page-hero--utility) { z-index: auto; }
html.nav-is-open .page-hero-shell:has(.page-hero--compact),
html.nav-is-open .page-hero-shell:has(.page-hero--utility) { z-index: 300; }
