/* wegweiser.studio — components.css
   Wiederverwendbare Bausteine: Header, Navigation, Buttons, Karten, FAQ,
   Karussell, Vergleichsregler, Ebenen, Ebenen-Animation, Kontaktband, Footer. */

/* ---------------------------------------------------------------- Header */
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--ink);
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.brand {
  position: relative;
  z-index: 102;
  font: 700 1rem/1 var(--mono);
  letter-spacing: .03em;
  white-space: nowrap;
}
.brand b { color: var(--cyan-ink); font-weight: 700; }
.nav-shell { display: flex; align-items: center; gap: 1.5rem; }
.nav-list { display: flex; align-items: center; gap: 1.6rem; }
.nav-list > li { position: relative; display: flex; align-items: center; gap: .15rem; }
.nav-list a { display: block; padding: .5rem 0; color: var(--ink-2); font-size: .95rem; font-weight: 520; transition: color .2s ease; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--cyan-ink); }
.nav-list > li > a[aria-current="page"] { box-shadow: 0 2px 0 var(--cyan-ink); }

.sub-toggle {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 0; border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.sub-toggle::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.has-sub.open .sub-toggle::before { transform: translateY(2px) rotate(225deg); }
.sub-list {
  position: absolute;
  top: calc(100% + .35rem);
  left: -1rem;
  min-width: 318px;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.sub-list::before { content: ""; position: absolute; inset: -.6rem 0 auto; height: .6rem; } /* Hover-Brücke */
.sub-list a { padding: .6rem .8rem; border-radius: 8px; color: var(--ink); font-size: .93rem; }
.sub-list a:hover { background: var(--soft); color: var(--cyan-ink); }
.has-sub.open .sub-list { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 961px) {
  .has-sub:hover .sub-list { opacity: 1; visibility: visible; transform: none; }
}

/* Startseite: Header liegt zunächst transparent über dem dunklen Hero */
.has-dark-hero .site-header:not(.scrolled) { border-color: transparent; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--night-text); }
.has-dark-hero .site-header:not(.scrolled) .brand b { color: var(--cyan); }
.has-dark-hero .site-header:not(.scrolled) .nav-list > li > a { color: #c3d3e0; }
.has-dark-hero .site-header:not(.scrolled) .nav-list > li > a:hover,
.has-dark-hero .site-header:not(.scrolled) .nav-list > li > a[aria-current="page"] { color: var(--cyan-soft); box-shadow: none; }
.has-dark-hero .site-header:not(.scrolled) .header-cta { border-color: var(--cyan); color: #031116; background: var(--cyan); }
.has-dark-hero .site-header:not(.scrolled) :focus-visible { outline-color: var(--cyan); }

.menu-button {
  position: relative;
  z-index: 102;
  display: none;
  width: 44px; height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: .9;
}
.menu-button span, .menu-button::before, .menu-button::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 18px; height: 1.5px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-button::before { top: 15px; }
.menu-button span { top: 21px; }
.menu-button::after { top: 27px; }
.menu-button[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] span { opacity: 0; }
.menu-button[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------------- Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.35rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11, 21, 32, .18); }
.button.secondary { color: var(--ink); background: transparent; }
.button.secondary:hover { background: var(--soft); box-shadow: none; }
.on-night .button { border-color: var(--cyan); color: #031116; background: var(--cyan); }
.on-night .button:hover { box-shadow: 0 16px 34px rgba(41, 224, 255, .22); }
.on-night .button.secondary { color: var(--cyan-soft); background: transparent; }
.on-night .button.secondary:hover { background: rgba(41, 224, 255, .11); }
.header-cta { min-height: 40px; padding: .6rem 1rem; font-size: .86rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------------------------------------------------------------- Chips & Listen */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .42rem .72rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: 600 .74rem/1.2 var(--mono);
}
.check-list { display: grid; gap: .7rem; }
.check-list li { position: relative; padding-left: 1.75rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: var(--cyan-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.3 8.3l2.4 2.4 5-5.4' fill='none' stroke='%2300667a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.cross-list { display: grid; gap: .7rem; }
.cross-list li { position: relative; padding-left: 1.75rem; }
.cross-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: #e9eef3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.2 5.2l5.6 5.6M10.8 5.2l-5.6 5.6' fill='none' stroke='%234a5b6b' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.dot-list { display: grid; gap: .45rem; }
.dot-list li { position: relative; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; }
.dot-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan-ink); }

/* ---------------------------------------------------------------- Karten */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card h3 + p, .card h4 + p { margin-top: .5rem; color: var(--muted); font-size: .97rem; }
.card-link { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card-link:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.card-link:focus-within { border-color: var(--cyan-ink); }
.stretched::after { content: ""; position: absolute; z-index: 1; inset: 0; }
.stretched:focus-visible { outline: none; }
.card-link:has(.stretched:focus-visible) { outline: 2px solid var(--cyan-ink); outline-offset: 3px; }
.more { display: inline-flex; gap: .4rem; margin-top: 1.1rem; color: var(--cyan-ink); font-weight: 650; font-size: .93rem; }
.more::after { content: "→"; transition: transform .2s ease; }
.card-link:hover .more::after { transform: translateX(4px); }

.media { position: relative; overflow: hidden; background: var(--soft); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.contain img { object-fit: contain; padding: 6%; }
.figure { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.figure figcaption { padding: .9rem 1.2rem 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

.notice {
  padding: 1rem 1.2rem;
  border: 1px solid #bfe6ee;
  border-left: 4px solid var(--cyan-ink);
  border-radius: var(--radius-sm);
  background: var(--cyan-tint);
  color: var(--ink-2);
  font-size: .95rem;
}
.notice strong { color: var(--ink); }

.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1.5rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #f3f6f9 0 14px, #eef2f6 14px 28px);
  color: var(--muted);
  font: 600 .82rem/1.5 var(--mono);
  text-align: center;
}

/* ---------------------------------------------------------------- Breadcrumb */
.breadcrumb { margin-bottom: 1.4rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem .5rem; color: var(--muted); font-size: .86rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.breadcrumb a:hover { color: var(--cyan-ink); }

/* ---------------------------------------------------------------- Ablauf */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps::before { content: ""; position: absolute; top: 24px; left: 24px; right: 12%; border-top: 1px dashed var(--line-strong); }
.step { position: relative; padding-top: 4rem; counter-increment: step; }
.step::before {
  content: "0" counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--cyan-ink);
  font: 700 .74rem/1 var(--mono);
}
.section.soft .step::before { background: var(--soft); }
.step p { margin-top: .45rem; color: var(--muted); font-size: .95rem; }

/* ---------------------------------------------------------------- FAQ */
.faq-list { display: grid; gap: .7rem; max-width: 880px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.faq-item summary { position: relative; padding: 1.1rem 3.2rem 1.1rem 1.3rem; cursor: pointer; font-weight: 620; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%); color: var(--cyan-ink); font: 700 1.25rem/1 var(--mono); }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary:focus-visible { border-radius: 12px; }
.faq-item p { padding: 0 1.3rem 1.25rem; color: var(--muted); max-width: 72ch; }

/* ---------------------------------------------------------------- Karussell */
.carousel-head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.carousel-ctrl { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.carousel-count { min-width: 3.4rem; color: var(--muted); font: 700 .86rem/1 var(--mono); letter-spacing: .08em; text-align: right; }
.carousel-count b { color: var(--ink); }
.carousel-btn {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.carousel-btn:hover { background: var(--ink); color: #fff; }
.carousel-btn:disabled { opacity: .3; cursor: default; background: transparent; color: var(--ink); }
.carousel-track {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: .9rem;
  margin-inline: calc((100vw - min(100vw - 3rem, var(--max))) / -2);
  padding-inline: calc((100vw - min(100vw - 3rem, var(--max))) / 2);
  scroll-padding-inline: calc((100vw - min(100vw - 3rem, var(--max))) / 2);
}
.carousel-card {
  flex: 0 0 min(84%, 380px);
  scroll-snap-align: start;
  padding: 1.7rem 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.carousel-card .num { display: block; margin-bottom: 2.6rem; color: var(--cyan-ink); font: 700 .78rem/1 var(--mono); letter-spacing: .12em; }
.carousel-card p { margin-top: .6rem; color: var(--muted); font-size: .97rem; }

/* ---------------------------------------------------------------- Vergleichsregler */
.compare { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e7eaec; }
.compare picture, .compare img { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare img { object-fit: cover; }
.compare-overlay { clip-path: inset(0 0 0 50%); }
.compare input {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare-line { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--cyan); box-shadow: 0 0 0 1px rgba(5, 8, 13, .25), 0 0 16px rgba(41, 224, 255, .7); pointer-events: none; }
.compare-handle {
  position: absolute;
  z-index: 2;
  left: 50%; top: 50%;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid #031116;
  border-radius: 50%;
  color: #031116;
  background: var(--cyan);
  font-weight: 800;
  pointer-events: none;
}
.compare input:focus-visible ~ .compare-handle { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 7px var(--ink); }
.compare-label {
  position: absolute;
  z-index: 2;
  top: .8rem;
  padding: .38rem .6rem;
  border-radius: 999px;
  color: #e9f7fb;
  background: rgba(5, 8, 13, .78);
  font: 700 .68rem/1 var(--mono);
  letter-spacing: .06em;
  pointer-events: none;
}
.compare-label.left { left: .8rem; }
.compare-label.right { right: .8rem; }

/* ---------------------------------------------------------------- Ebenen-Stapel */
.mini-stack {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 46%, #ffffff, var(--soft) 70%);
}
.mini-stack picture { position: absolute; left: 10%; top: 4%; width: 80%; transform: translateY(calc(var(--i) * 18px)) scale(calc(1 - var(--i) * .018)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.mini-stack img { width: 100%; filter: drop-shadow(0 10px 14px rgba(11, 21, 32, .22)); }
.mini-stack.is-open picture { transform: translateY(calc(var(--i) * 36px - 6px)) scale(calc(1 - var(--i) * .018)); }
.stack-toggle {
  position: absolute;
  z-index: 8;
  right: 1rem; bottom: 1rem;
  min-height: 40px;
  padding: .55rem .9rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 650;
}
.stack-toggle:hover { background: var(--ink); color: #fff; }

.layer-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 3rem; align-items: center; }
.layer-stage { position: relative; --fan: 0; aspect-ratio: 949 / 1800; user-select: none; }
.layer-stage picture {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  transform: translateY(calc((2.5 * (1 - var(--fan)) + var(--offset) * var(--fan)) * 46%));
  transition: transform .8s cubic-bezier(.2, .85, .2, 1), opacity .3s ease;
}
.layer-stage img { width: 100%; filter: drop-shadow(0 16px 20px rgba(11, 21, 32, .2)); }
.layer-stage picture:nth-child(1) { --offset: 5; }
.layer-stage picture:nth-child(2) { --offset: 4; }
.layer-stage picture:nth-child(3) { --offset: 3; }
.layer-stage picture:nth-child(4) { --offset: 2; }
.layer-stage picture:nth-child(5) { --offset: 1; }
.layer-stage picture:nth-child(6) { --offset: 0; }
.layer-stage.is-open { --fan: 1; }
.layer-stage[data-focus] picture { opacity: .12; }
.layer-stage[data-focus="0"] picture[data-layer="0"],
.layer-stage[data-focus="1"] picture[data-layer="1"],
.layer-stage[data-focus="2"] picture[data-layer="2"],
.layer-stage[data-focus="3"] picture[data-layer="3"],
.layer-stage[data-focus="4"] picture[data-layer="4"],
.layer-stage[data-focus="5"] picture[data-layer="5"] { opacity: 1; }
.layer-legend { display: grid; gap: .35rem; margin-top: 1.5rem; }
.layer-legend button {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: .1rem .8rem;
  width: 100%;
  padding: .72rem .85rem;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.layer-legend button:hover, .layer-legend button:focus-visible, .layer-legend button[aria-pressed="true"] { border-color: #bfe6ee; background: var(--cyan-tint); }
.layer-legend b { grid-row: 1 / span 2; color: var(--cyan-ink); font: 700 .74rem/1.6 var(--mono); }
.layer-legend strong { font-size: .97rem; }
.layer-legend span { color: var(--muted); font-size: .86rem; }
.layer-controls { margin-top: 1rem; }

/* ---------------------------------------------------------------- Ebenen-Animation (Startseite) */
.layer-loop { position: relative; max-width: 560px; margin-inline: auto; }
.ll-svg { width: 100%; height: auto; overflow: visible; }
.ll-label {
  position: absolute;
  z-index: 2;
  top: 0; right: 0;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-1);
  font: 700 .72rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ll-label [data-ll-text] { transition: opacity .18s ease, transform .18s ease; }
.ll-label.swap [data-ll-text] { opacity: 0; transform: translateY(4px); }
.ll-check {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.4 8.3l2.3 2.3 4.9-5.2' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.ll-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
.ll-bar[hidden] { display: none; }   /* sonst überstimmt display:flex das hidden-Attribut (Pause-Knopf bei „Bewegung reduzieren“) */
.ll-steps { display: flex; gap: .4rem; }
.ll-steps span { width: 18px; height: 4px; border-radius: 2px; background: var(--line-strong); transition: width .35s ease, background .35s ease; }
.ll-steps span.on { width: 38px; background: var(--cyan-ink); }
.ll-pause {
  min-height: 36px;
  padding: .4rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: 600 .72rem/1 var(--mono);
  letter-spacing: .06em;
}
.ll-pause:hover { border-color: var(--ink); color: var(--ink); }

.ll-plate { fill: #fff; stroke: #c3d0db; stroke-width: 1; }
.ll-side-l { fill: #cbd7e1; }
.ll-side-r { fill: #dde6ed; }
.ll-p { fill: #eef3f7; stroke: #d5dfe7; stroke-width: .8; transition: fill .7s ease var(--d, 0ms); }
.ll-c { fill: none; stroke: #00667a; stroke-width: 1.15; stroke-opacity: .62; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 1; transition: stroke-dashoffset 1.5s ease var(--d, 0ms), opacity .6s ease; }
.ll-t { fill: #5fb37f; stroke: #3e8f5d; stroke-width: .7; opacity: 0; transition: opacity .4s ease var(--d, 0ms); }
.ll-b { opacity: 0; transform: translateY(12px); transition: opacity .45s ease var(--d, 0ms), transform .6s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms); }
.ll-wl, .ll-wr, .ll-roof { stroke: #5b7186; stroke-width: .7; stroke-linejoin: round; }
.ll-wl { fill: #bccad6; }
.ll-wr { fill: #d6e0e8; }
.ll-roof { fill: #fff; }
.ll-iso-in { transform: scale(0); opacity: 0; transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .5s ease; }
.ll-iso-1 { fill: rgba(41, 224, 255, .42); stroke: #00667a; stroke-width: 1.2; stroke-dasharray: 4 4; }
.ll-iso-2 { fill: rgba(41, 224, 255, .2); stroke: #00667a; stroke-width: 1; stroke-dasharray: 4 4; }
.ll-iso-ui { opacity: 0; transition: opacity .5s ease; }
.ll-pin { fill: #0b1520; stroke: #fff; stroke-width: 2; }
.ll-pulse { fill: none; stroke: #00667a; stroke-width: 1.5; opacity: 0; }
.ll-tag rect { fill: #fff; stroke: #c3d0db; }
.ll-tag text { font: 700 10.5px var(--mono); fill: #0b1520; }

/* Zustände: reset → 0 Gelände → 1 Flächennutzung → 2 Gebäude → 3 Erreichbarkeit; „all“ = statisch */
.layer-loop[data-stage="reset"] .ll-c { transition: none; opacity: 0; }
.layer-loop[data-stage="0"] .ll-c { stroke-dashoffset: 0; }
.layer-loop[data-stage="1"] .ll-c,
.layer-loop[data-stage="2"] .ll-c,
.layer-loop[data-stage="all"] .ll-c { stroke-dashoffset: 0; opacity: .38; }
.layer-loop[data-stage="3"] .ll-c { stroke-dashoffset: 0; opacity: .16; }
.layer-loop[data-stage="1"] .ll-w, .layer-loop[data-stage="2"] .ll-w, .layer-loop[data-stage="all"] .ll-w { fill: #c9eef7; }
.layer-loop[data-stage="1"] .ll-m, .layer-loop[data-stage="2"] .ll-m, .layer-loop[data-stage="all"] .ll-m { fill: #9fdcec; }
.layer-loop[data-stage="1"] .ll-g, .layer-loop[data-stage="2"] .ll-g, .layer-loop[data-stage="all"] .ll-g { fill: #cfe9d6; }
.layer-loop[data-stage="1"] .ll-k, .layer-loop[data-stage="2"] .ll-k, .layer-loop[data-stage="all"] .ll-k { fill: #d3dbe4; }
.layer-loop[data-stage="1"] .ll-t, .layer-loop[data-stage="2"] .ll-t, .layer-loop[data-stage="3"] .ll-t, .layer-loop[data-stage="all"] .ll-t { opacity: 1; }
.layer-loop[data-stage="2"] .ll-b, .layer-loop[data-stage="3"] .ll-b, .layer-loop[data-stage="all"] .ll-b { opacity: 1; transform: none; }
.layer-loop[data-stage="3"] .ll-iso-in { transform: none; opacity: 1; }
.layer-loop[data-stage="3"] .ll-iso-ui { opacity: 1; transition-delay: .45s; }
.layer-loop[data-stage="3"] .ll-pulse { animation: ll-pulse 1.8s ease-out .5s infinite; }
@keyframes ll-pulse { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }

/* ---------------------------------------------------------------- Kontaktband & Footer */
.contact-band {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  background: radial-gradient(60% 140% at 12% 110%, rgba(41, 224, 255, .13), transparent 70%), var(--night-2);
  scroll-margin-top: var(--header-h);
}
.contact-inner { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 2rem 3rem; }
.contact-inner h2 { max-width: 18ch; }
.contact-inner p { margin-top: .9rem; max-width: 52ch; color: var(--night-muted); }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.email-link { color: var(--cyan-soft); font: 700 .9rem/1.4 var(--mono); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(143, 238, 255, .4); }
.email-link:hover { text-decoration-color: var(--cyan-soft); }

.site-footer { padding: 3.5rem 0 2rem; background: var(--night); color: var(--night-muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .brand { font-size: 1rem; color: var(--night-text); }
.footer-brand .brand b { color: var(--cyan); }
.footer-brand p { margin-top: 1rem; max-width: 32ch; }
.footer-title { margin-bottom: .9rem; color: var(--night-text); font: 700 .74rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.footer-links { display: grid; gap: .5rem; }
.footer-links a { display: inline-block; padding: .1rem 0; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--cyan-soft); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--night-line); font-size: .84rem; }

/* ---------------------------------------------------------------- Responsiv */
@media (max-width: 1100px) {
  .header-cta { display: none; }
}
@media (max-width: 960px) {
  .menu-button { display: block; }
  .nav-shell {
    position: fixed;
    z-index: 101;
    inset: 0;
    display: block;
    padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
    background: #fff;
    color: var(--ink);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  }
  .nav-shell.open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .nav-list > li > a { flex: 1 1 auto; padding: 1rem 0; font-size: 1.2rem; font-weight: 620; color: var(--ink) !important; box-shadow: none !important; }
  .sub-toggle { width: 48px; height: 48px; }
  .sub-list { position: static; flex: 1 0 100%; display: none; min-width: 0; padding: 0 0 .8rem; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .sub-list::before { display: none; }
  .has-sub.open .sub-list { display: block; }
  .sub-list a { padding: .7rem .2rem; font-size: 1rem; color: var(--ink-2); }
  .nav-shell .header-cta { display: inline-flex; margin-top: 1.5rem; min-height: 48px; font-size: .95rem; border-color: var(--ink) !important; color: #fff !important; background: var(--ink) !important; }
  body.menu-open .site-header { border-color: transparent; background: #fff; color: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.menu-open .site-header .brand b { color: var(--cyan-ink) !important; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.2rem; }
  .steps::before { display: none; }
  .layer-layout { grid-template-columns: 1fr; }
  .layer-stage { max-width: 620px; width: 100%; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .carousel-track {
    margin-inline: -1rem;
    padding-inline: 1rem;
    scroll-padding-inline: 1rem;
  }
  .carousel-head { align-items: start; flex-direction: column; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { padding: 0 0 0 4rem; min-height: 52px; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .button-row { flex-direction: column; align-items: stretch; }
  .mini-stack { min-height: 240px; }
  .ll-label { font-size: .64rem; padding: .45rem .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .layer-stage { --fan: 1; }
}

/* ---------------------------------------------------------------- Illustrationen (Leistungen)
   Grundzustand = fertiges Bild (ohne JS, bei „Bewegung reduzieren“).
   site.js setzt .anim auf [data-ill] und .play, solange sichtbar. Ein Durchlauf = 9 s. */
.ill-wrap { position: relative; width: 100%; height: 100%; min-height: 180px; background: radial-gradient(circle at 50% 50%, #ffffff, #eef2f6 78%); }
.ill { position: absolute; inset: 6% 6%; width: 88%; height: 88%; overflow: visible; }
.ill text { font: 700 10.5px var(--mono); }
.i-plate { fill: #fff; stroke: #c3d0db; stroke-width: 1; }
.i-side-l { fill: #cbd7e1; }
.i-side-r { fill: #dde6ed; }
.i-wire { fill: none; stroke: #00667a; stroke-width: 1; stroke-opacity: .55; stroke-linejoin: round; }
.i-wl, .i-wr, .i-roof, .rf-n, .rf-s { stroke: #5b7186; stroke-width: .7; stroke-linejoin: round; }
.i-wl { fill: #bccad6; }
.i-wr { fill: #d6e0e8; }
.i-roof { fill: #fff; }
.i-tag rect { fill: #fff; stroke: #c3d0db; }
.i-tag text { fill: #0b1520; }
.i-badge rect { fill: #0b1520; }
.i-badge circle { fill: var(--cyan); }
.i-badge path { fill: none; stroke: #031116; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-badge text { fill: #fff; letter-spacing: .06em; }
.i-scan polygon { fill: rgba(41, 224, 255, .28); }
.i-scan path { stroke: #29e0ff; stroke-width: 2; }
.i-only-anim { display: none; }
.anim .i-only-anim { display: inline; }
/* Zusammenführen */
.m-glass { fill: rgba(255, 255, 255, .55); stroke: #00667a; stroke-width: 1; stroke-dasharray: 3 3; }
.m-glass2 { fill: rgba(255, 255, 255, .25); stroke: #0b1520; stroke-width: 1; stroke-dasharray: 3 3; }
.m-p-a { fill: rgba(41, 224, 255, .3); stroke: #00667a; stroke-width: .7; }
.m-p-b { fill: rgba(95, 179, 127, .35); stroke: #3e8f5d; stroke-width: .7; }
.m-p-c { fill: rgba(159, 220, 236, .55); stroke: #00667a; stroke-width: .7; }
.i-cad { fill: none; stroke: #0b1520; stroke-width: 1.1; }
.m-label { fill: #4a5b6b; opacity: 0; letter-spacing: .12em; }
/* Erreichbarkeit */
.i-block { fill: #eef3f7; stroke: #d5dfe7; stroke-width: .8; }
.i-road { fill: none; stroke: #9fb3c4; stroke-width: 2.4; stroke-linecap: round; }
.i-iso { stroke: #00667a; stroke-width: 1.1; stroke-dasharray: 4 4; }
.i-iso-0 { fill: rgba(41, 224, 255, .12); }
.i-iso-1 { fill: rgba(41, 224, 255, .22); }
.i-iso-2 { fill: rgba(41, 224, 255, .38); }
.i-poi { fill: #0b1520; }
.i-pin { fill: #0b1520; stroke: #fff; stroke-width: 2; }
.i-pulse { fill: none; stroke: #00667a; stroke-width: 1.5; }
/* Dächer */
.rf-n { fill: #c9eef7; }
.rf-s { fill: #29e0ff; }
.i-sun { transform-origin: 260px 330px; transform: rotate(24deg); }
.i-sun circle { fill: #ffd76a; stroke: #e0a92a; stroke-width: 1; }
.i-sun path { stroke: #e0a92a; stroke-width: 1.6; stroke-linecap: round; }
/* Schnitt */
.i-ground { stroke: #0b1520; stroke-width: 1.4; }
.i-ink { fill: none; stroke: #0b1520; stroke-width: 1.4; stroke-linejoin: round; }
.i-bfill { fill: #eef3f7; }
.i-win rect { fill: #c9eef7; stroke: #9fb3c4; stroke-width: .6; }
.i-walk { fill: #c3d0db; }
.i-asph { fill: #4a5b6b; }
.i-treeg path { stroke: #6b5a45; stroke-width: 3; stroke-linecap: round; }
.i-treeg circle { fill: #8fd3a5; stroke: #3e8f5d; stroke-width: 1; }
.i-car rect, .i-car circle { fill: #00667a; }
.i-car rect + rect { fill: #9fdcec; }
.i-car circle { fill: #0b1520; }
.i-person circle { fill: #0b1520; }
.i-person path { stroke: #0b1520; stroke-width: 2; stroke-linecap: round; fill: none; }
.i-dim path { stroke: #00667a; stroke-width: 1; fill: none; }
/* Webkarte */
.w-bg { fill: #e9f0f5; }
.w-frame { fill: none; stroke: #c3d0db; stroke-width: 1.5; }
.w-blk { fill: #fff; stroke: #d5dfe7; }
.w-blk2 { fill: #dbeaf3; stroke: #d5dfe7; }
.w-park { fill: #d6efe0; stroke: #c3e3cf; }
.w-river { fill: none; stroke: #9fd8ea; stroke-width: 14; stroke-linecap: round; }
.w-street { fill: none; stroke: #fff; stroke-width: 11; }
.w-pin path { fill: #0b1520; }
.w-pin circle { fill: #fff; }
.w-pin.w-act path { fill: #00667a; }
.w-pop rect:first-child, .w-panel rect:first-child { fill: #fff; stroke: #c3d0db; }
.w-pop text { fill: #00667a; letter-spacing: .12em; }
.w-panel text { fill: #4a5b6b; letter-spacing: .12em; }
.w-l1 { fill: #0b1520; }
.w-l2 { fill: #cdd8e1; }
.w-cb { fill: #00667a; }
.w-cursor path { fill: #0b1520; stroke: #fff; stroke-width: 1.2; }
.w-click { fill: none; stroke: #00667a; stroke-width: 2; opacity: 0; }
/* XPlanung */
.x-wa { fill: #c9eef7; stroke: #9fb3c4; stroke-width: .7; }
.x-mi { fill: #9fdcec; stroke: #9fb3c4; stroke-width: .7; }
.x-ge { fill: #d3dbe4; stroke: #9fb3c4; stroke-width: .7; }
.x-gr { fill: #cfe9d6; stroke: #9fb3c4; stroke-width: .7; }
.x-bg { fill: none; stroke: #00667a; stroke-width: 1; stroke-dasharray: 5 3; }
.x-gb { fill: none; stroke: #0b1520; stroke-width: 2; }

/* Ablaufsteuerung */
.anim .a-cycle { animation: ill-cycle 9s linear infinite; }
.anim .a-cycle-b { animation: ill-cycle-b 9s linear infinite; }
.anim .a-draw1 { stroke-dasharray: 1; animation: ill-draw1 9s ease-in-out infinite; }
.anim .a-in1 { animation: ill-in1 9s ease infinite; }
.anim .a-in2 { animation: ill-in2 9s ease infinite; }
.anim .a-in3 { animation: ill-in3 9s ease infinite; }
.anim .a-in4 { animation: ill-in4 9s ease infinite; }
.anim .a-pop2, .anim .a-pop3, .anim .a-pop4 { transform-box: fill-box; transform-origin: center; }
.anim .a-pop2 { animation: ill-pop2 9s cubic-bezier(.2, .8, .2, 1.2) infinite; }
.anim .a-pop3 { animation: ill-pop3 9s cubic-bezier(.2, .8, .2, 1.2) infinite; }
.anim .a-pop4 { animation: ill-pop4 9s cubic-bezier(.2, .8, .2, 1.2) infinite; }
.anim .a-drop2 { animation: ill-drop2 9s ease infinite; }
.anim .i-scan { animation: ill-scan 9s ease-in-out infinite; }
.anim .i-pulse { transform-box: fill-box; transform-origin: center; animation: ll-pulse 1.8s ease-out infinite; }
.anim .rf-s { animation: ill-roof-s 9s ease infinite; }
.anim .rf-n { animation: ill-roof-n 9s ease infinite; }
.anim .i-sun { animation: ill-sun 9s linear infinite; }
.anim .m-p2 { animation: ill-m2 9s ease-in-out infinite; }
.anim .m-p3 { animation: ill-m3 9s ease-in-out infinite; }
.anim .m-label { animation: ill-mlabel 9s ease infinite; }
.anim .m-badge { animation: ill-mbadge 9s ease infinite; }
.anim .w-cursor { animation: ill-cursor 9s ease-in-out infinite; }
.anim .w-click { transform-box: fill-box; transform-origin: center; animation: ill-click 9s ease-out infinite; }
[data-ill].anim * { animation-play-state: paused !important; }
[data-ill].anim.play * { animation-play-state: running !important; }

@keyframes ill-cycle { 0%, 88% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes ill-cycle-b { 0%, 82% { opacity: 1; } 87%, 100% { opacity: 0; } }
@keyframes ill-draw1 { 0%, 6% { stroke-dashoffset: 1; } 26%, 100% { stroke-dashoffset: 0; } }
@keyframes ill-in1 { 0%, 6% { opacity: 0; transform: translateY(8px); } 22%, 100% { opacity: 1; transform: none; } }
@keyframes ill-in2 { 0%, 26% { opacity: 0; transform: translateY(10px); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes ill-in3 { 0%, 42% { opacity: 0; transform: translateY(8px); } 54%, 100% { opacity: 1; transform: none; } }
@keyframes ill-in4 { 0%, 58% { opacity: 0; transform: translateY(8px); } 70%, 100% { opacity: 1; transform: none; } }
@keyframes ill-pop2 { 0%, 26% { opacity: 0; transform: scale(.3); } 38%, 100% { opacity: 1; transform: none; } }
@keyframes ill-pop3 { 0%, 42% { opacity: 0; transform: scale(.3); } 54%, 100% { opacity: 1; transform: none; } }
@keyframes ill-pop4 { 0%, 58% { opacity: 0; transform: scale(.3); } 70%, 100% { opacity: 1; transform: none; } }
@keyframes ill-drop2 { 0%, 26% { opacity: 0; transform: translateY(-24px); } 34% { opacity: 1; transform: translateY(3px); } 38%, 100% { opacity: 1; transform: none; } }
@keyframes ill-scan { 0%, 56% { opacity: 0; transform: translate(0, 0); } 59% { opacity: 1; } 80% { opacity: 1; transform: translate(235px, 117.5px); } 84%, 100% { opacity: 0; transform: translate(235px, 117.5px); } }
@keyframes ill-roof-s { 0%, 20% { fill: #ffffff; } 34%, 100% { fill: #29e0ff; } }
@keyframes ill-roof-n { 0%, 20% { fill: #ffffff; } 34%, 100% { fill: #c9eef7; } }
@keyframes ill-sun { 0% { transform: rotate(-36deg); } 100% { transform: rotate(36deg); } }
@keyframes ill-m2 { 0%, 12% { transform: translate(12px, -46px); } 40%, 74% { transform: none; } 92%, 100% { transform: translate(12px, -46px); } }
@keyframes ill-m3 { 0%, 12% { transform: translate(-16px, -92px); } 40%, 74% { transform: none; } 92%, 100% { transform: translate(-16px, -92px); } }
@keyframes ill-mlabel { 0%, 12% { opacity: 1; } 24%, 80% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes ill-mbadge { 0%, 40% { opacity: 0; transform: translateY(6px); } 48%, 72% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; } }
@keyframes ill-cursor { 0%, 20% { opacity: 0; transform: translate(430px, 290px); } 24% { opacity: 1; } 40%, 44% { transform: translate(294px, 96px); opacity: 1; } 56% { opacity: 1; transform: translate(294px, 96px); } 62%, 100% { opacity: 0; transform: translate(294px, 96px); } }
@keyframes ill-click { 0%, 42% { opacity: 0; transform: scale(.4); } 44% { opacity: .9; } 52%, 100% { opacity: 0; transform: scale(2.2); } }

/* Methodenbeispiel-Hinweis auf Leistungsseiten */
.example-link { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 220px; padding: 1.8rem; background: var(--soft); }
.section.soft .example-link { background: #fff; }
.example-link h3 { font-size: 1.3rem; max-width: 22ch; }

/* Teaser Projekte auf der Startseite */
.projects-teaser { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center; padding: clamp(1.8rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.projects-teaser h2 { max-width: 20ch; }
.projects-teaser p { margin-top: .9rem; max-width: 60ch; color: var(--muted); }
@media (max-width: 760px) { .projects-teaser { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Weitere Bewegung */
/* Pulsierende Ringe um „LW“ */
.profile-mark { position: relative; }
.profile-mark::before, .profile-mark::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--cyan-ink);
  border-radius: 50%;
  opacity: 0;
  animation: lw-ring 3.2s ease-out infinite;
  pointer-events: none;
}
.profile-mark::after { animation-delay: 1.6s; }
@keyframes lw-ring { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }

/* Karussell mit der Maus ziehen */
@media (pointer: fine) { .carousel-track { cursor: grab; } }
.carousel-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.carousel-card { transition: transform .3s ease, box-shadow .3s ease; }
.carousel-track.dragging .carousel-card { transform: scale(.985); }
.carousel-card:hover { box-shadow: var(--shadow-1); }

/* Gestaffelte Einblendungen und Ablauf-Linie */
.reveal-armed.in { transition-delay: calc(var(--i, 0) * 90ms); }
.steps.reveal-armed::before { transform: scaleX(0); }
.steps::before { transform-origin: left center; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1) .2s; }
.steps.reveal-armed .step::before { opacity: 0; transform: scale(.5); }
.steps .step::before { transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1.3); }
.steps.in .step::before { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 220ms + .2s); }
.figure figcaption small { display: block; margin-top: .2rem; font-size: .8rem; }
