html {
  scroll-behavior: smooth;
}



.accessibility:not(:focus):not(:active) {
  position: absolute;

  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;

  white-space: nowrap;

  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}


img,
svg {
  max-width: 100%;
  height: auto;
}

.nojs picture.lazy {
  display: none;
}

.page-content {
  min-height: 100vh;
  padding: 7rem 5vw 5vw;
  background-color: var(--dark);
  background-image: var(--gradient);
  color: white;
}

.page-content>* {
  max-width: 800px;
}

.page-content>h1 {
  max-width: none;
}

.page-content>h1 span {
  display: block;
}

.page-content ul {
  list-style: disc;
}

.page-content ol {
  list-style: decimal;
}

.page-content ul,
.page-content ol {
  padding-left: 3rem;
  margin-bottom: 4rem;
}

.page-content ul li+li,
.page-content ol li+li {
  margin-top: 1rem;
}

.page-content .button {
  margin-top: 3rem;
}

main {
  overflow-x: hidden;
}

main>section {
  display: flex;
  min-height: 100svh;
  position: relative;
  z-index: 1;
  padding: 170px 0;
}

@media screen and (max-width: 767px) {
  main>section {
    padding: 80px 0;
  }
}

.container {
  width: calc(100% - var(--margin));
  max-width: 1200px;
  margin: auto;
}

.hero {
  position: relative;
  height: 100svh;
  background-color: var(--dark);
  background-image: var(--gradient);
  color: white;
  padding: 0;
}

.bg,
.bg img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
  transform: translateZ(0);
}

.hero .bg {
  position: fixed;
}

.hero .bg:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.05);
  z-index: -1;
}

.hero a {
  text-decoration: none !important;
}

.hero h1 {
  animation: appear .8s ease .2s;
  animation-fill-mode: both;
  text-align: center;
  text-wrap: balance;
  max-width: 80vw;
  margin-inline: auto;
  font-size: min(9vw, 100px);
}

.hero .down {
  animation-delay: 1.5s;
}

@keyframes appear {
  from {
    opacity: 0;
    translate: 0 50px;
  }

  to {
    opacity: 1;
    translate: 0;
  }
}

.hero .down {
  position: absolute;
  right: 5vw;
  bottom: 5rem;
  animation: arrow-appear .8s ease 1s;
  animation-fill-mode: both;
  display: flex;
  align-items: center;
  gap: 2rem;
  rotate: 90deg;
  transform-origin: bottom right;
  margin-right: 1lh;


  .rotated {
    margin: 0;
  }

  .icon {
    width: 2.3rem;
    height: 2.8rem;
    animation: breathe 2s ease-in-out 1.8s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    rotate: -90deg;

    .small-icon {
      display: none
    }
  }

}

@keyframes breathe {
  from {
    transform: translate(0, 0px);
  }

  to {
    transform: translate(0, -5px);
  }
}

@keyframes arrow-appear {
  from {
    opacity: 0;
    transform: translate(0, -30px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0px);
  }
}


.fixed {
  position: fixed;
  z-index: 1;
  bottom: 11rem;
  left: 5vw;
  width: calc(100% - 10vw);
  text-align: left;
  transform: translateZ(0);
}

@media screen and (max-width: 1023px) {
  .fixed {
    bottom: auto;
    top: 16vh;
    margin-top: 2rem;
  }

  .hero .down {
    bottom: 3rem;

    .icon {
      width: 1.5rem;
      height: 1.8rem;

      .large-icon {
        display: none;
      }

      .small-icon {
        display: block;
      }
    }
  }

}

.haltung {
  color: var(--dark);
  text-align: center;
}

.haltung blockquote {
  max-width: 914px;
  margin: auto;
}

@media screen and (max-width: 480px) {
  .haltung blockquote {
    max-width: 285px;
  }
}

.leistungen {
  color: white;
  background-color: var(--dark);
  background-image: var(--gradient);
  min-height: 50vw;
}

.leistungen>.container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: stretch;
  width: calc(100% - var(--margin));
  gap: 3rem;
}

.leistungen .button {
  margin-top: 1rem;
  align-self: center;
}

.leistungen .text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 70%;
  max-width: 640px;

  & p {
    margin-block: 0;
    text-wrap: balance;


    &:empty {
      display: none;
    }
  }

  @media (max-width: 767px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;

    p {
      width: 100%;
    }
  }
}

.leistungen .container>* {
  max-width: 100%;
}


@media screen and (max-width: 1279px) {
  .leistungen .container {
    max-width: 800px;
  }

  .leistungen .text .header {
    margin: 0 auto;
  }
}

@media screen and (max-width: 767px) {
  .leistungen .container {
    flex-direction: column;
  }
}

.leistungen .bereiche {
  min-width: 280px;
}

.leistungen .bereiche ul {
  list-style: none;
  margin-left: 0;
}

.leistungen .bereiche li {
  padding: 1em 0;
  border-bottom: 0.5px solid var(--bright);
}


.leistungen .bereiche li:last-child {
  border-bottom: none;
}

.leistungen .bereiche li a:hover {
  text-decoration: none;
}

button[commandfor] {
  cursor: pointer;
}

.leistungen .bereiche li>button[commandfor] {
  position: relative;
  margin: 0;
  padding: .1em 0;
  overflow: hidden;
  transition: color .5s, padding-bottom .4s;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  gap: 4rem;

  @media (max-width:767px) {
    gap: 1rem;
  }

}

.leistungen .bereiche li>button[commandfor] .icon {
  width: 4.4rem;
  aspect-ratio: 1;
  transition: transform .5s;
  flex-shrink: 0;
  max-width: 8%;
}


dialog {
  overscroll-behavior: contain;
  overflow: auto;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: none;
  background-color: var(--bright);
  color: var(--dark);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  gap: 120px;

  flex-direction: column;
  justify-content: center;
  padding: 0;

  @media (max-width: 1279px) {
    justify-content: flex-start;
  }

  /* Exit Stage To */
  transform: translateX(100px);

  &,
  &::backdrop {
    transition:
      display .5s allow-discrete,
      overlay .5s allow-discrete,
      opacity .5s ease,
      transform .5s ease;

    /* Exit Stage To */
    opacity: 0;
  }

  /* On Stage */
  &[open] {
    display: flex;
    opacity: 1;
    transform: translateY(0px);

    &::backdrop {
      opacity: 0.8;
    }
  }

  html:has(&[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  /* Enter Stage From */
  @starting-style {

    &[open],
    &[open]::backdrop {
      opacity: 0;
    }

    &[open] {
      transform: translateX(100px);
    }
  }

  &::backdrop {
    background-color: black;

    /* prevent scrolling page */
    overflow: hidden;
    overscroll-behavior: contain;
  }
}

dialog>.sticky-container {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
  --padding: 40px;
  padding: var(--padding);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 3;

  @media (max-width: 767px) {
    --padding: 20px;
  }

  button {
    all: unset;
    position: sticky;
    top: var(--padding);
    margin-left: auto;
    pointer-events: all;
    cursor: pointer;

    svg {
      width: 40px;
      height: 40px;
      rotate: 45deg;
    }
  }
}

dialog>.container {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-block: var(--margin);

}

.leistungen dialog .beschreibung {
  max-width: 1500px;
  display: flex;
  gap: 96px;

  @media (max-width: 1279px) {
    flex-direction: column;
    gap: 32px;
  }

  >*,
  >div>* {
    margin: 0;
    break-inside: avoid;
    margin-bottom: 1em;
    max-width: 640px;
  }

  p {
    font-size: 28px;
    line-height: 1.5;

    @media (max-width: 767px) {
      font-size: 18px;
    }
  }


  ul {
    break-before: column;
    list-style: none;
    padding: 0;
    display: flex;
    max-width: 380px;

    @media (max-width: 1279px) {
      max-width: 100%;
    }

    flex-direction: column;
    gap: 16px;

    li {
      width: 100%;
      padding: 0 0 16px;
      border-bottom: 1px solid;
      margin: 0;
    }
  }
}

.leistungen .bereiche li>button[commandfor]:hover {
  color: var(--white);
}

.referenzen {
  min-height: 0;
  color: var(--dark);
  background: var(--bright);

  .container>p {
    max-width: 540px
  }

  ul.taetigkeitsfelder {
    margin-top: 2em;
    columns: 3;
    -webkit-mask-image: linear-gradient(to top, transparent 2px, black 2px);
    mask-image: linear-gradient(to top, transparent 2px, black 2px);

    @media (max-width: 1200px) {
      columns: 2;
    }

    @media (max-width: 767px) {
      columns: auto;
    }

    li {
      padding: 0.5em 0;
      border-bottom: 1px solid;
      font-size: 28px;
      line-height: 1.5;


      @media (max-width: 767px) {
        font-size: 22px;
      }

    }
  }

  .logos {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    justify-items: center;
    align-items: center;
    max-width: 1150px;
    width: 90%;
    margin: 8rem auto 0;

    text-align: center;

    svg {
      max-width: min(200px, 100%);
    }
  }

  @media screen and (max-width: 767px) {
    .logos {
      grid-template-columns: repeat(2, 1fr);
      grid-gap: 50px;
    }

    .logos>.logo:last-child:nth-child(odd) {
      display: none;
    }

    .leistungen .bereiche li h3 .icon {
      width: 2.4rem;
    }

    .referenzen .h3 .white {
      display: inline-block;
      max-width: 260px;
    }
  }

}

.referenzen .container {
  padding-bottom: 2rem;
}


#kontakt {
  display: flex;
  flex-direction: column;
  background-color: var(--dark);
  background-image: var(--gradient);
  color: var(--white);
  z-index: 1;
  position: relative;
  padding: 5rem 5vw;
  gap: 13rem;

  .container {
    display: flex;
    gap: 50px;
    flex-direction: column;
    align-items: center;
    max-width: 1400px;

    ul {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 20px;

      .button {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        text-align: center;
      }

      @media screen and (max-width: 1100px) {
        grid-template-columns: 1fr;
      }
    }
  }


}

#kontakt .legal-etc {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;

  ul {
    display: flex;
    gap: 40px;
  }

  >svg {
    flex-shrink: 0;
  }

}

#kontakt .menu-footer {
  margin-left: 0;
}


@media screen and (max-width: 767px) {
  .kontakt {
    padding-top: 4rem;
  }

  #kontakt svg {
    display: none;
  }

  #kontakt .menu-footer {
    margin-left: 0;
    text-align: center;
  }

  #kontakt .legal-etc {
    margin: auto;
    flex-direction: column;
    align-items: flex-start;
    text-align: center;

  }
}

.tl-left {
  text-align: left;
  margin-right: auto;
}

.tl-right {
  text-align: right;
  margin-left: auto;
}

.tl-center {
  text-align: center;
  margin-inline: auto;
}