.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section snapping is handled via GSAP ScrollTrigger (see initSectionSnap). */
section {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  padding: max(8rem, var(--glass-nav-safe-top)) 0 8rem;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: opacity 2.2s ease;
}

/* SVG zoom sections: remove extra vertical padding (pinning handled via GSAP); clip zoomed SVG to section */
.ub-svg-section {
  padding: 0;
  overflow: hidden;
}

/* ── Fullpage Observer-driven slides ──────────────────────────── */
html.fullpage-zone-active {
  overflow: hidden;
}

.fullpage-slide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  visibility: hidden;
  z-index: 10;
  padding: 0;
  --fullpage-next-reserve: clamp(4rem, 10dvh, 6.5rem);
}

.fullpage-slide:has(.fullpage-scroll-hint--home) {
  --fullpage-primary-hint: var(--fullpage-tint-home);
}

.fullpage-slide:has(.fullpage-scroll-hint--raum) {
  --fullpage-primary-hint: var(--fullpage-tint-raum);
}

.fullpage-slide:has(.fullpage-scroll-hint--service) {
  --fullpage-primary-hint: var(--fullpage-tint-service);
}

.fullpage-slide:has(.fullpage-scroll-hint--kultur) {
  --fullpage-primary-hint: var(--fullpage-tint-kultur);
}

.fullpage-slide:has(.fullpage-scroll-hint--statistik) {
  --fullpage-primary-hint: var(--fullpage-tint-statistik);
}

.fullpage-slide[data-fullpage-primary="raum"] {
  --section-title-tint: var(--fullpage-tint-raum);
}

.fullpage-slide[data-fullpage-primary="service"] {
  --section-title-tint: var(--fullpage-tint-service);
}

.fullpage-slide[data-fullpage-primary="kultur"] {
  --section-title-tint: var(--fullpage-tint-kultur);
}

.fullpage-slide[data-fullpage-primary="statistik"] {
  --section-title-tint: var(--fullpage-tint-statistik);
}

.fullpage-slide .outer,
.fullpage-slide .inner {
  width: 100%;
  height: 100%;
  overflow-y: hidden;
  background-color: inherit;
}

.fullpage-slide .bg {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-top: var(--glass-nav-safe-top);
  box-sizing: border-box;
  background-color: inherit;
  background-size: cover;
  background-position: center;
}

/* Compact glass nav (toggle only): min 5rem top inset (safe area if larger), then center intro above scroll hint. */
@media (max-width: 1079px) {
  .fullpage-slide:has(.home-intro-logos) .bg {
    padding-top: max(5rem, env(safe-area-inset-top, 0px));
    padding-bottom: var(--fullpage-next-reserve);
    place-content: center;
  }

  .fullpage-slide:has(#gebaeude-scroll-lottie) .bg > .slide-lottie {
    transform: translate(-50%, calc(-50% + 4rem));
  }
}

.fullpage-slide:has(.slide-lottie) .outer,
.fullpage-slide:has(.slide-lottie) .inner {
  overflow: visible;
}

/* Next-slide control: Lottie intros, feature slides, template/quote slides, etc. */
.fullpage-scroll-hint {
  position: absolute;
  bottom: clamp(0.75rem, 4vmin, 2rem);
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  width: clamp(2.25rem, 11vmin, 4rem);
  height: clamp(2.25rem, 11vmin, 4rem);
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.fullpage-scroll-hint--home {
  background: var(--fullpage-tint-home);
}

.fullpage-scroll-hint--raum {
  background: var(--fullpage-tint-raum);
}

.fullpage-scroll-hint--service {
  background: var(--fullpage-tint-service);
}

.fullpage-scroll-hint--kultur {
  background: var(--fullpage-tint-kultur);
}

.fullpage-scroll-hint--statistik {
  background: var(--fullpage-tint-statistik);
}

.fullpage-scroll-hint:focus-visible {
  outline: 2px solid var(--accent-green, #348277);
  outline-offset: 2px;
}

.fullpage-scroll-hint img {
  display: block;
  width: clamp(2.25rem, 11vmin, 4rem);
  height: clamp(2.25rem, 11vmin, 4rem);
}

.fullpage-slide .slide-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-color: inherit;
}

.flow-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flow-layer--step {
  visibility: hidden;
  opacity: 0;
}

.fullpage-slide .map-interactive {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.fullpage-slide .map-panzoom-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fullpage-slide .slide-svg--map-compact {
  display: none;
}

.fullpage-slide .map-tooltip-legend {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0.25rem 0.5rem 0.4rem;
  pointer-events: none;
}

.fullpage-slide .map-tooltip-legend img {
  display: block;
  width: 30rem;
  max-width: min(100%, 20rem);
  height: auto;
}

.fullpage-slide .flow-chart-area .flow-pan-viewport {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.fullpage-slide .flow-chart-area.flow-chart-area--pending .flow-pan-viewport {
  overflow: hidden;
  pointer-events: none;
}

.fullpage-slide .flow-chart-area .flow-scroll-slot {
  display: flex;
  min-width: 100%;
  min-height: 100%;
  justify-content: flex-start;
  align-items: center;
}

.fullpage-slide .flow-chart-area .flow-interactive {
  position: relative;
  flex-shrink: 0;
  margin: 0 auto;
  width: calc(var(--flow-chart-w) * var(--flow-zoom, 1));
  aspect-ratio: 1190.55 / 605;
  height: auto;
  overflow: hidden;
}

.fullpage-slide .flow-chart-area .flow-interactive .flow-layer {
  display: block;
  border: 0;
  object-fit: fill;
}

.fullpage-slide .flow-chart-area .statistik-figure-interactive {
  position: relative;
  flex-shrink: 0;
  margin: 0 auto;
  width: calc(var(--flow-chart-w) * var(--flow-zoom, 1));
  max-width: none;
  box-sizing: border-box;
}

.fullpage-slide[data-figure-layout="fit"] .flow-chart-area .flow-scroll-slot {
  flex-direction: column;
  min-height: 100%;
  align-items: center;
}

.fullpage-slide[data-figure-layout="fit"] .flow-chart-area .statistik-figure-interactive {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.fullpage-slide .map-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.fullpage-slide .map-hotspot-wrap {
  position: absolute;
  box-sizing: border-box;
  pointer-events: auto;
}

.fullpage-slide .map-hotspot-wrap:hover .map-hotspot-hit,
.fullpage-slide .map-hotspot-wrap:focus-within .map-hotspot-hit {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
  border-radius: 2px;
}

.fullpage-slide .map-hotspot-hit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, 1.75rem);
  height: max(100%, 1.75rem);
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.fullpage-slide .map-hotspot-wrap.map-hotspot--pulse .map-hotspot-hit {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  animation: map-hotspot-pulse 1.5s ease-in-out;
}

@keyframes map-hotspot-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(3.12); }
}

.fullpage-slide .map-hotspot-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fullpage-slide .map-popup {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 4;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.75rem 0.7rem;
  min-width: 11.5rem;
  max-width: 17rem;
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  border-radius: 2px;
  background: rgba(18, 28, 58, 0.88);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.25;
  text-align: left;
}

.fullpage-slide .map-popup--below {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.fullpage-slide .map-popup__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-right: 0.1rem;
}

.fullpage-slide .map-popup__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.fullpage-slide .map-popup__close {
  flex-shrink: 0;
  margin: -0.15rem -0.1rem 0 0;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
}

.fullpage-slide .map-popup__stats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fullpage-slide .map-popup__stats li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.fullpage-slide .map-popup__stats li:first-child {
  margin-top: 0;
}

.fullpage-slide .map-popup__icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: auto;
  display: block;
  object-fit: contain;
}

.fullpage-slide .map-popup__val {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.fullpage-slide .map-hotspot-wrap:hover .map-popup,
.fullpage-slide .map-hotspot-wrap:focus-within .map-popup {
  visibility: visible;
  opacity: 1;
}

/* Lottie above blur overlay so white strokes stay crisp (overlay tints SVG sections) */
.fullpage-slide .slide-lottie {
  display: block;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 2;
  color: #ffffff;
  isolation: isolate;
  background: transparent;
}

/* Full-bleed canvas (no split stack): viewport-centered, then nudged up */
.fullpage-slide .bg > .slide-lottie {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(130vw, 100rem);
  max-width: none;
  height: min(85dvh, 100%);
  max-height: min(85dvh, 100%);
  transform: translate(-50%, -50%);
  margin-top: -4rem;
}

/* Lottie + title: stack sizes the canvas; animation uses contain inside canvas */
.fullpage-slide .lottie-split-stack {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-top: clamp(-10rem, -12dvh, -4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3dvh, 2rem);
  z-index: 2;
  pointer-events: none;
  width: min(130vw, 90rem);
  max-width: none;
  box-sizing: border-box;
}

.fullpage-slide .lottie-split-stack .slide-lottie {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  max-height: min(85dvh, 100%);
}


.lottie-split-title {
  text-align: center;
}

.fullpage-slide .lottie-split-title {
  max-width: min(130vw, 90rem);
  margin: 0;
  padding: 0 1rem;
  box-sizing: border-box;
  color: #fff;
  font-family: "Source Sans Pro", sans-serif;
  font-size: clamp(1.25rem, 4vmin + 1.5vw + 0.25vh, 5.375rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.06;
}

.fullpage-slide .blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1;
  pointer-events: none;
}

.fullpage-slide .slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 80vw;
  padding: clamp(0.75rem, 3vmin, 2rem);
}

.fullpage-slide:has(.slide-lottie) .slide-content {
  text-align: left;
}

.fullpage-slide .home-intro-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin-bottom: clamp(1rem, 3vh, 1.75rem);
}

.fullpage-slide .home-intro-logos img {
  height: clamp(1.75rem, 5vmin + 1vw, 3.75rem);
  width: auto;
  display: block;
}

.fullpage-slide .slide-content h2 {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: clamp(1.35rem, 4vmin + 2.5vw, 5.625rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  margin: 0 0 clamp(0.5rem, 2dvh, 1.25rem);
}

.fullpage-slide[data-fullpage-primary]:not([data-fullpage-primary="home"], [data-fullpage-primary="footer"]):not(.template-slide):not(:has(.slide-lottie)) .lottie-split-title,
.fullpage-slide[data-fullpage-primary]:not([data-fullpage-primary="home"], [data-fullpage-primary="footer"]):not(.template-slide):not(:has(.slide-lottie)) .slide-content > h2 {
  color: var(--section-title-tint);
}

.fullpage-slide .slide-content p {
  font-size: clamp(0.9rem, 2vmin + 1vw, 1.35rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  margin-top: clamp(0.5rem, 2vmin, 1rem);
}

.fullpage-slide .clip-text {
  overflow: hidden;
}

.fullpage-slide h2 * {
  will-change: transform;
}

.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(136, 206, 2, 0.1) 0%, transparent 100%),
    var(--bg-primary);
  padding: max(12rem, var(--glass-nav-safe-top)) 0 8rem;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(136, 206, 2, 0.02) 100%);
  pointer-events: none;
}

.hero-section h1 {
  margin-bottom: clamp(0.75rem, 2dvh, 1.5rem);
}

.hero-section p {
  font-size: clamp(0.95rem, 2vmin + 1vw, 1.75rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.content-section {
  position: relative;
  background: var(--bg-primary);
}

.content-section:nth-child(even) {
  background: var(--bg-secondary);
}

.content-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.horizontal-scroll {
  background: var(--bg-secondary);
  padding: 0;
  overflow: hidden;
  position: relative;
}

.horizontal-scroll::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.scroll-container {
  display: flex;
  gap: 2rem;
  padding: max(6rem, var(--glass-nav-safe-top)) 2rem 6rem;
  width: max-content;
}

.scroll-item {
  min-width: 450px;
  height: 600px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-primary);
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.scroll-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-blue) 100%);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.scroll-item:hover {
  border-color: var(--accent-green);
  transform: translateY(-4px);
}

.scroll-item:hover::before {
  transform: scaleX(1);
}

.facts-section {
  background: var(--bg-primary);
  text-align: center;
  position: relative;
}

.facts-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

@media (max-width: 1079px) {
  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: max(4rem, var(--glass-nav-safe-top)) 0 4rem;
  }

  .hero-section {
    padding: max(6rem, var(--glass-nav-safe-top)) 0 4rem;
  }

  .scroll-container {
    padding: max(4rem, var(--glass-nav-safe-top)) 1.5rem 4rem;
  }

  .scroll-item {
    min-width: 320px;
    height: min(450px, 58dvh);
    padding: 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .fullpage-slide .slide-svg--map-full {
    display: none;
  }

  .fullpage-slide .slide-svg--map-compact {
    display: block;
  }

  .fullpage-slide .map-hotspots,
  .fullpage-slide .map-tooltip-legend {
    display: none;
  }

  .fullpage-slide.statistik-edge-slide[data-figure-layout="fit"] .flow-chart-area .flow-scroll-slot {
    min-height: auto;
    align-items: stretch;
  }

  .fullpage-slide.statistik-edge-slide[data-figure-layout="fit"] .flow-chart-area .statistik-figure-interactive {
    flex: 0 0 auto;
    display: block;
    min-height: auto;
  }
}

@media (max-height: 700px) {
  section {
    padding: max(2.5rem, var(--glass-nav-safe-top)) 0 max(2.5rem, env(safe-area-inset-bottom, 0px));
  }

  .hero-section {
    padding: max(3rem, var(--glass-nav-safe-top)) 0 max(2.5rem, env(safe-area-inset-bottom, 0px));
  }

  .scroll-container {
    padding: max(2.5rem, var(--glass-nav-safe-top)) 1.5rem max(2.5rem, env(safe-area-inset-bottom, 0px));
  }

  .scroll-item {
    height: min(400px, 52dvh);
  }

  .fullpage-slide .bg > .slide-lottie {
    height: min(85dvh, 100%);
    max-height: min(85dvh, 100%);
    min-height: 50dvh;
  }

  .fullpage-slide .lottie-split-title {
    display: none;
  }

  .fullpage-slide .lottie-split-stack {
    top: var(--glass-nav-safe-top);
    bottom: var(--fullpage-next-reserve);
    transform: translate(-50%, 0);
    margin-top: 0;
    gap: 0;
    justify-content: center;
  }

  .fullpage-slide .lottie-split-stack .slide-lottie {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    height: auto;
  }

  .fullpage-scroll-hint {
    bottom: clamp(0.5rem, 3vmin, 1rem);
    width: clamp(2rem, 10vmin, 3.5rem);
    height: clamp(2rem, 10vmin, 3.5rem);
  }

  .fullpage-scroll-hint img {
    width: clamp(2rem, 10vmin, 3.5rem);
    height: clamp(2rem, 10vmin, 3.5rem);
  }

  .fullpage-slide:not(.template-slide) .slide-content > p:only-of-type {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
  }

  .fullpage-slide:not(.template-slide) .slide-content-prose {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    min-width: 0;
  }

  .fullpage-slide:not(.template-slide) .slide-content-prose p {
    display: contents;
  }
}

@media (max-height: 700px) and (max-width: 1079px) {
  .fullpage-slide .lottie-split-stack {
    top: env(safe-area-inset-top, 0px);
  }

  .fullpage-slide[data-fullpage-primary="service"] .lottie-split-stack {
    transform: translate(-50%, -5rem);
  }

  .fullpage-slide[data-fullpage-primary="statistik"] .lottie-split-stack {
    transform: translate(-50%, -2rem);
  }

  .fullpage-slide[data-fullpage-primary="kultur"] .lottie-split-stack {
    transform: translate(-50%, -2rem);
  }
}