:root {
  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

[id] {
  scroll-margin-top: 96px;
}

.skip-link {
  position: fixed !important;
  top: -100px !important;
  left: 1rem;
  z-index: 3000;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--color-primary);
  opacity: 0;
}

.skip-link:focus {
  top: 1rem !important;
  opacity: 1;
}

:where(a, button, input, textarea, select, dialog):focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

:where(button, input[type="submit"], .hero-cta, #cookie-banner a, #cookie-banner button, .split-panel-text a) {
  transition-property: color, background-color, border-color, box-shadow;
  transition-duration: 400ms;
  transition-timing-function: var(--ease-fluid);
}

/* Navigation remains below the fixed 80px header and never locks page scrolling. */
#nav-toggle {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

#nav-toggle .site-burger-line {
  transform-origin: center;
  transition: transform 400ms var(--ease-fluid), opacity 400ms var(--ease-fluid);
}

#nav-toggle[aria-expanded="true"] .site-burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#nav-toggle[aria-expanded="true"] .site-burger-line:nth-child(2) {
  opacity: 0;
}

#nav-toggle[aria-expanded="true"] .site-burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

#nav-menu a {
  position: relative;
}

#nav-menu a::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 2px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-fluid);
}

@media (hover: hover) and (pointer: fine) {
  #nav-menu a:hover::after,
  #nav-menu a:focus-visible::after {
    transform: scaleX(1);
  }
}

@media (max-width: 1000px) {
  #nav-toggle {
    display: flex !important;
  }

  #nav-menu {
    position: absolute !important;
    top: 80px !important;
    right: 0;
    left: 0 !important;
    z-index: 900;
    display: none !important;
    width: 100% !important;
    padding: 1.25rem 2.5rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--color-primary);
    box-shadow: 0 16px 28px rgb(0 0 0 / 12%);
  }

  #nav-menu.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  #nav-menu a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (min-width: 1001px) {
  #nav-toggle {
    display: none !important;
  }

  #nav-menu {
    display: flex !important;
  }
}

/* Minimal mandated footer: copyright left, legal links right. */
.site-footer {
  padding: 12px 40px;
  color: #fff;
  background: var(--color-primary);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  gap: 1rem;
}

.site-footer-legal {
  display: flex;
  gap: 1rem;
}

.site-footer a {
  color: inherit;
  transition: color 400ms var(--ease-fluid);
}

@media (max-width: 640px) {
  .site-footer {
    padding-inline: 20px;
  }

  .site-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Full-width consent bar with adjacent decisions on desktop. */
#cookie-banner[hidden] {
  display: none !important;
}

#cookie-banner {
  z-index: 2000;
  width: 100%;
  border-top: 2px solid var(--color-primary);
  background: #fff;
  box-shadow: 0 -10px 30px rgb(0 0 0 / 14%);
}

#cookie-banner::before {
  opacity: 0.08;
}

.cookie-banner-inner {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
}

.cookie-action {
  min-width: 118px;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-primary);
  border-radius: 0.375rem;
  cursor: pointer;
}

.cookie-action-primary {
  color: #fff;
  background: var(--color-primary);
}

.cookie-action-secondary {
  color: var(--color-primary);
  background: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .cookie-action-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
  }

  .cookie-action-secondary:hover {
    color: #fff;
    background: var(--color-primary);
  }
}

@media (max-width: 700px) {
  .cookie-banner-inner {
    padding: 16px 20px;
  }

  .cookie-actions,
  .cookie-action {
    width: 100%;
  }
}

/* Cold-load safe reveal lifecycle. */
html.repair-js [data-aos]:not(.aos-in):not(.aos-skip) {
  opacity: 0;
  filter: blur(3px);
}

html.repair-js [data-aos].aos-ready {
  transition-property: opacity, transform, filter;
  transition-duration: 700ms;
  transition-timing-function: var(--ease-fluid);
}

html.repair-js [data-aos="fade-up"]:not(.aos-in):not(.aos-skip) {
  transform: translateY(30px);
}

html.repair-js [data-aos="fade-right"]:not(.aos-in):not(.aos-skip) {
  transform: translateX(-30px);
}

html.repair-js [data-aos="fade-left"]:not(.aos-in):not(.aos-skip) {
  transform: translateX(30px);
}

html.repair-js [data-aos].aos-in,
html.repair-js [data-aos].aos-skip,
html.repair-js.repair-fallback [data-aos] {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

.split-panel {
  overflow: hidden;
}

html.repair-js .split-panel > [data-aos].aos-ready {
  transition-duration: 1000ms;
  transition-delay: 100ms;
}

html.repair-js .split-panel > [data-aos="fade-right"]:not(.aos-in):not(.aos-skip) {
  transform: translateX(-100px);
}

html.repair-js .split-panel > [data-aos="fade-left"]:not(.aos-in):not(.aos-skip) {
  transform: translateX(100px);
}

.site-hero[data-aos] {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

/* Match the public hero's full-height, centered content geometry. */
.site-hero {
  min-height: calc(100vh - 80px);
}

.site-hero > div.relative.z-10 {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 40px;
  margin-bottom: 100px;
  text-align: center;
}

.site-hero h5 {
  margin: 0 0 0.67em;
  font-size: 1.2em;
  line-height: 1.2em;
}

.site-hero h1 {
  margin: 0 0 0.67em;
  font-size: 2.7em;
  line-height: 1.2em;
}

/* The frozen public heading ends with a br; preserve its blank line geometrically. */
.site-hero h1::after {
  display: block;
  height: 1.2em;
  content: "";
}

.site-hero .hero-cta {
  align-self: center;
  display: inline-flex;
  justify-content: center;
  box-sizing: border-box;
  min-width: 127px;
  padding: 7px 10px 6px;
  line-height: 1.3em;
}

.site-hero > div.relative.z-10 > .mt-16 {
  display: none;
}

@media (max-width: 750px) {
  .site-hero > div.relative.z-10 {
    padding: 0 20px;
  }

  .site-hero h1 {
    font-size: 2.2em;
  }
}

@media (max-width: 550px), (max-height: 550px) {
  .site-hero h1 {
    font-size: 2em;
    line-height: 1.2em;
  }
}

.repair-js .site-hero h5,
.repair-js .site-hero h1,
.repair-js .site-hero .hero-cta {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(20px);
  animation: hero-entrance 800ms var(--ease-fluid) forwards;
}

.repair-js .site-hero h5 {
  animation-delay: 300ms;
}

.repair-js .site-hero h1 {
  animation-delay: 550ms;
}

.repair-js .site-hero .hero-cta {
  animation-delay: 850ms;
}

@keyframes hero-entrance {
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.draw-ready {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms var(--ease-fluid);
}

.draw-ready.draw-in {
  transform: scaleX(1);
}

.site-divider.draw-ready {
  transform-origin: left;
}

.aos-in .space-y-3 p svg {
  opacity: 0;
  animation: contact-icon-in 500ms var(--ease-spring) forwards;
  animation-delay: calc(var(--icon-index, 0) * 70ms);
}

@keyframes contact-icon-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item img {
    transition: transform 400ms var(--ease-fluid), box-shadow 400ms var(--ease-fluid), filter 400ms var(--ease-fluid);
  }

  .gallery-item:hover img,
  .gallery-item:focus-visible img {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--color-primary) 32%, transparent);
    filter: saturate(1.04);
  }

  .split-panel-img.aos-in:hover,
  html:not(.repair-js) .split-panel-img:hover {
    transform: scale(1.02) !important;
    transition: transform 600ms var(--ease-fluid);
  }
}

/* Exact public PhotoSwipe 4 control sprite, used by the local dialog implementation. */
.gallery-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  color: #fff;
  background: rgb(0 0 0 / 92%);
  border: 0;
}

.gallery-lightbox::backdrop {
  background: rgb(0 0 0 / 80%);
}

.gallery-lightbox-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 72px;
}

.gallery-lightbox-image {
  display: block;
  max-width: min(100%, 1400px);
  max-height: calc(100vh - 150px);
  object-fit: contain;
  box-shadow: 0 16px 50px rgb(0 0 0 / 45%);
}

.gallery-lightbox-button {
  position: fixed;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  color: transparent;
  background-color: transparent;
  background-image: url('/images/photoswipe-default-skin.png');
  background-repeat: no-repeat;
  border: 0;
  cursor: pointer;
}

.gallery-lightbox-close {
  top: 12px;
  right: 12px;
  background-position: 0 -44px;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  top: 50%;
  margin-top: -22px;
}

.gallery-lightbox-prev {
  left: 12px;
  background-position: -138px -44px;
}

.gallery-lightbox-next {
  right: 12px;
  background-position: -94px -44px;
}

.gallery-lightbox-meta {
  position: fixed;
  right: 72px;
  bottom: 24px;
  left: 72px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}

body.lightbox-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.form-status {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: #fff;
  border: 1px solid #fff;
}

.form-field-invalid {
  border-color: #ffd4d4 !important;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 48%);
}

#datenschutz h2,
#datenschutz h3,
#datenschutz h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

#datenschutz p,
#datenschutz ul,
#datenschutz ol {
  margin-bottom: 1rem;
  line-height: 1.65;
}

@media (max-width: 600px) {
  .gallery-lightbox-stage {
    padding: 60px 48px;
  }

  .gallery-lightbox-meta {
    right: 48px;
    bottom: 18px;
    left: 48px;
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-aos],
  .draw-ready,
  .repair-js .site-hero h5,
  .repair-js .site-hero h1,
  .repair-js .site-hero .hero-cta,
  .aos-in .space-y-3 p svg {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
