* {
  margin: 0;
  padding: 0;
}

*, *:before, *:after {
  box-sizing: border-box;
}

:root {
  --padding: 1.5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-dark-grey: #343434;
  --color-grey: #777;
  --color-light: #efefef;
  --color-biber-brown: #875E40;
  --color-text: #50270a;
  --color-background: #f6d848;
  --color-bg-header: #201815;  /* bottom color of used image */
  --color-code-light-grey:  #cacbd1;
  --color-code-comment:     #a9aaad;
  --color-code-white:       #c5c9c6;
  --color-code-red:         #d16464;
  --color-code-orange:      #de935f;
  --color-code-yellow:      #f0c674;
  --color-code-green:       #a7bd68;
  --color-code-aqua:        #8abeb7;
  --color-code-blue:        #7e9abf;
  --color-code-purple:      #b294bb;
  --font-family-sans: "Source Sans 3", "Trebuchet MS", Times, serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --animation-time: 500ms;
}

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  overflow-y: scroll; /* prevent flickering because of some pages can scroll some not */
}
img {
  display: block;
  width: 100%;
  height: auto;
}
body {
  margin: 0 auto;
  background: var(--color-background);
}
li {
  list-style: none;
}
a {
  color: currentColor;
  text-decoration: none;

  &:hover,
  &:focus,
  &[aria-current]{
    text-decoration: underline;
  }
}
button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}
strong, b {
  font-weight: 600;
}
small {
  font-size: inherit;
  color: var(--color-text);
}

.section {
  padding: 3rem 0;
}
input[type="checkbox"],
label {
  cursor: pointer;
}
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.text {
  line-height: 1.5em;
}
.text a {
  text-decoration: underline;

  &:hover,
  &:focus {
    text-decoration: none;
  }
}
.text :first-child {
  margin-top: 0;
}
.text :last-child {
  margin-bottom: 0;
}
.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}
.text ul,
.text ol {
  margin-left: 1rem;
}
.text ul p,
.text ol p {
  margin-bottom: 0;
}
.text ul > li {
  list-style: disc;
}
.text ol > li {
  list-style: decimal;
}
.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}

h1,
.h1,
.intro {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
h2,
.h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
h3,
.h3 {
  font-size: 1.125rem;
}
.text .codeblock {
  display: grid;
}
.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}
.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}
.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}
.text hr {
  margin: 1rem 0;
}
.text dt {
  font-weight: 600;
}
.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}
.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}
.text figure {
  margin: 3rem 0;
}
.text figcaption {
  padding-top: .75rem;
  color: var(--color-text);
}
.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.text figure ul li {
  list-style: none;
}

hr {
  border: 0;
  background: var(--color-text);
  height: 1px;
  margin: 3rem auto;
}

.align-center {
  text-align: center;
}

/************** OTHER ***************/
.intro {
  max-width: 40rem;
}
.intro *:not(:last-child) {
  margin-bottom: 1em;
}

.cta {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: .75rem 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-black);
}

.box {
  background: var(--color-light);
  padding: 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-light);
}

.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

.container {
  padding: 2.25rem 1.5rem;

  @media screen and (min-height: 720px) and (min-width: 736px) {
    padding: 6rem 2rem;
  }

  @media screen and (min-width: 980px) {
    padding: 6rem 3rem 3rem;
  }

  @media screen and (min-width: 1280px) {
    padding: 6rem 4rem 3rem;
  }
}


/************** HEADER ***************/

.header {
  position: relative;
  height: 100%;
  width: 100%;
  padding-top: 4.5rem;
  padding-bottom: 8rem;
  text-align: center;
  background-attachment: scroll;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 150%;
  background-color: var(--color-bg-header);
  color: var(--color-white);
  overflow: hidden;
  transition: 0s linear;
  transition-property: top;

  & > * {
    flex-shrink: 0;
    width: 100%;
  }

  & > .header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
  }

  & > .noise-filter {
    background-attachment: scroll;
    background-image: url("/assets/images/noise.svg");
    background-position: top left;
    background-repeat: repeat;
    background-size: auto;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
    z-index: 2;
  }

  & > .inner {
    flex-grow: 1;
    position: relative;
    z-index: 3;

    & > a {
      color: var(--color-grey);
      font-size: 1.35em;
      line-height: 1.75em;
    }

    & > p {
      margin-bottom: 1em;
    }
  }

  .logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 8rem;
    height: 8rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background-color: var(--color-background);
    border-radius: 50% 50% 30% 30%;

    .logo-img {
      position: absolute;
      bottom: -1px;
      right: 10px;
      display: block;
      max-width: 9rem;
      max-height: 7rem;
      height: auto;
      width: auto;
    }
  }


  @media screen and (min-height: 720px) and (min-width: 736px) {
    position: fixed;
    text-align: right;
    top: 0;
    left: 0;
    width: 30%;
  }

  @media screen and (min-width: 1280px) {
    width: 35%;
  }
}

/************** MAIN ***************/

.main {
  & section {
    border-top: solid 2px #efefef;
    margin: 4rem 0 0 0;
    padding: 4rem 0 0 0;

    &:first-child {
      border-top: 0;
      margin-top: 0;
      padding-top: 0;
    }
  }

  @media screen and (min-height: 720px) and (min-width: 736px) {
    padding-left: 4rem;
    padding-right: 4rem;
    margin-left: 30%;
    width: calc(100% - 30%);
  }

  @media screen and (min-width: 1280px) {
    margin-left: 35%;
    width: calc(100% - 35%);
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/************** FOTOS ***************/
.gallery-leistung { display: block; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;

  @media screen and (min-height: 720px) and (min-width: 736px) {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }

  .gallery-link {
    &:hover,
    &:focus {
      .gallery-img img {
        transform: scale(1.05);
      }
    }
  }

  .gallery-img {
    display: block;
    padding: 3px;
    background-color: var(--color-text);
    border: 1px solid var(--color-light);
    border-radius: 2px;

    img {
      transition: transform .25s ease-in-out;
    }
  }
}

/* overwrite */
.fslightbox-open {
  overflow: scroll !important;
}
/************** FOOTER ***************/

.footer {
  line-height: 1.5em;
  color: var(--color-white);
  background: var(--color-bg-header);

  &:before {
    content: "";
    display: block;
    width: 1.5rem;
    height: 2px;
    background: var(--color-grey);
    margin-bottom: 1.5rem;
  }

  @media screen and (min-height: 720px) and (min-width: 736px) {
    position: fixed; /* footer is set fixed here over the header. hopefully header will not get overlapped */
    left: 0;
    bottom: 0;
    width: 30%;
    background: linear-gradient(0deg,var(--color-bg-header) 0%, var(--color-bg-header) 71%, rgba(255, 255, 255, 0) 100%);
  }

  @media screen and (min-width: 1280px) {
    width: 35%;
  }

  & .h3 {
    margin-bottom: .75rem;
  }
  & a {
    text-decoration: underline;

    &:hover,
    &:focus {
      text-decoration: none;
    }
  }
}
