:root {
  --am-block-max-width: 60rem;
  --am-block-margin-top: 2em;
  --am-container-padding: 2rem;
  --am-flex-gap: 2rem;
  --am-flex-min-block-width: 18rem;
}

/**
font-weight: 300; Light
font-weight: 400; Regular
font-weight: 500; Medium
font-weight: 600; SemiBold
*/
html {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: #1a1a1a;
  min-height: 100%;
  height: 100%
}

body {
  margin: 0;
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-columns: 100%;
}

main {
  grid-row: 1;
}

header {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  position: fixed;
  background: #ffffff;
  width: 100%;
  z-index: 1;
  top: 0;
}

.hidden,
header img.burger {
  display: none;
}

header #logo {
  width: auto;
  grid-column: 1;
  justify-self: start;
  padding: 40px 30px 20px;
}

header nav {
  grid-column: 2;
  justify-self: end;
  padding-right: 30px;
}

nav ul {
  list-style: none;
}

header nav a {
  margin: 20px;
  position: relative;
  top: 52px;
}

a, a:visited {
  color: #1a1a1a;
  text-decoration: none;
}

a:hover, a:active, a:focus, a.active {
  color: #A13246;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

h2 {
  font-size: 1.1em;
  color: #A13246;
  font-weight: 600;
  /* SemiBold */
}

h3 {
  font-size: 2.6em;
  font-weight: 400;
  /* Regular */
}

h4 {
  font-size: 1.2em;
  font-weight: 500;
  /* Medium */
}

h5 {
  font-size: 0.8em;
  font-weight: 600;
  /* SemiBold */
}

h6 {
  font-size: 1em;
  font-weight: 500;
  /* Medium */
  margin: 1em 0;
}

section#home {
  padding: 220px 28px 0;
  min-height: calc(100vh - 220px);
}

section#leistung, section#projekte {
  padding-top: 140px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: space-evenly;
}

section#kontakt {
  padding: 140px 28px 80px;
  display: grid;
  grid-template-columns: 50% 50%;
}

section#home .home-background-image {
  z-index: -1;
}

section#home p.intro {
  width: 80%;
}

section#leistung h2 {
  padding: 0 28px;
  grid-row: 1;
}

section#leistung section.leistungen {
  grid-row: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5% 0;
}

section#leistung .leistungen article {
  text-align: center;
  width: 20%;
  margin: 20px;
}

section#leistung .leistungen article img {
  height: 64px;
}

section#leistung .leistungen article a img {
  padding-left: 6px;
  height: 0.75em;
}

section#leistung a, section#leistung a:visited {
  color: #A13246;
}

section#leistung section.partner {
  grid-row: 3;
  background-color: #f2f2f2;
  display: grid;
  justify-content: space-between;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 100%;
  overflow: hidden;
  padding: 0 28px 44px;
}

section#leistung section.partner h5 {
  grid-row: 1;
}

section#leistung section.partner .partner-images {
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

section#leistung section.partner .partner-images img {
  align-self: center;
  justify-self: center;
  max-height: 50px;
  max-width: 90%;
}

section#projekte h2 {
  padding: 0 28px;
  grid-row: 1;
}

section#projekte .projekte {
  grid-row: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-evenly;
  padding: 2% 28px;
  overflow: hidden;
}

section#projekte .projekte article {
  width: 25%;
  margin: 20px;
}

section#projekte .projekte article h3 {
  margin: 0.5em 0;
}

section#projekte .projekte article .header-img {
  max-width: 100%;
  height: auto;
}

section#projekte .projekte article a>img {
  padding-left: 6px;
  height: 0.75em;
}

section#projekte .projekte a, section#projekte .projekte a:visited {
  color: #A13246;
}

section#kontakt article {
  display: grid;
  grid-template-columns: 20% 80%;
}

section#kontakt article h2 {
  grid-column: 1;
  margin-top: 20%;
}

section#kontakt article img {
  max-width: 500px;
  height: auto;
}

section#kontakt article img,
section#kontakt article div.markdown-container {
  grid-column: 2;
  width: 75%;
  margin-left: 10%;
}

section#kontakt p.quote {
  align-self: center;
  justify-self: center;
  width: 75%;
}

body.error-page section {
  padding: 140px 28px 80px;
}

.project-page article, .leistung-page section, .page-page section {
  display: grid;
  justify-content: space-between;
  grid-template-columns: 50% 50%;
  padding: 160px 0 80px;
}

.project-page article div.col-1, .leistung-page section div.col-1 {
  grid-column: 1;
}

.project-page article div.col-1 img, .leistung-page section div.col-1 img {
  max-width: 100%;
  height: auto;
}

.project-page article div.col-2, .leistung-page section div.col-2 {
  grid-column: 2;
  align-self: end;
  padding: 0 28px 20px;
}

.project-page article div.col-2 p.intro, .leistung-page section div.col-2 p.intro, .page-page section p.intro {
  margin-left: 10px;
  margin-top: 10px;
}

.project-page article div.markdown-container, .leistung-page section div.markdown-container, .page-page section div.block-container {
  margin: 0 28px;
  grid-column: 1 / span 2;
}

.markdown-container>* {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--am-block-max-width);
  margin: 0 auto;
  margin-top: var(--am-block-margin-top);
}

.markdown-container a, .markdown-container a:visited {
  color: #A13246;
  text-decoration: underline;
}

.markdown-container a:hover,
.markdown-container a:active,
.markdown-container a:focus,
.markdown-container a.active {
  color: #A13246;
  text-decoration-line: underline;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
}

.markdown-container img {
  max-width: 100%;
}

.markdown-container ul {
  margin-top: 0;
  padding-left: 30px;
}

p.intro {
  font-size: 2.6em;
  font-weight: 400;
  /* Regular */
  margin-left: 40px;
}

.quote blockquote {
  font-size: 2.6em;
  font-weight: 400;
  /* Regular */
  margin-top: 0;
  margin-top: 20%;
}

.quote blockquote>p {
  margin-bottom: 0;
  margin-top: 0;
}

.quote blockquote+p {
  margin-top: 1em;
  font-size: 12.8px;
}

aside {
  position: fixed;
  z-index: 1;
  top: 50%;
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  right: 0px;
}

aside nav {
  display: flex;
  flex-direction: column;
}

aside nav a {
  padding: 20px;
}

aside nav a:before {
  content: '◻︎';
  color: #A13246;
}

aside nav a.active:before {
  content: '◼︎';
  color: #A13246;
}

body>footer {
  grid-row: 2;
  display: grid;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-weight: 300;
  /* Light */
  background-color: #A13246;
  padding: 20px 28px;
}

body>footer .links {
  grid-column: 1;
  margin-right: 40px;
}

body>footer a, body>footer a:visited {
  color: #ffffff;
  text-decoration: underline;
}

body>footer a:hover,
body>footer a:active,
body>footer a:focus,
body>footer a.active {
  color: #ffffff;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
}

body>footer .addresses {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
}

body>footer .addresses .hq-address {
  margin-right: 40px;
}

header img.burger, img.cross {
  position: absolute;
  height: 24px;
  top: 52px;
  right: 32px;
}

img.cross {
  height: 30px;
  right: 34px;
}

.overlay {
  height: 0%;
  width: 100%;
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  background-color: #ffffff;
  -webkit-background-size: 100% auto;
  -moz-background-size: 100% auto;
  -o-background-size: 100% auto;
  background-size: 100% auto;
  overflow-x: hidden;
}

.overlay .overlay-content {
  font-size: 1.8em;
  display: flex;
  flex-direction: column;
  position: relative;
  top: 10%;
  text-align: left;
  padding-left: 20px;
  padding-top: 20px;
}

.overlay .overlay-content a {
  text-decoration-thickness: 3px;
}

.overlay .overlay-content li {
  padding: 2px 0;
}

.overlay .overlay-content ul li ul {
  padding-left: 20px;
}

.overlay .top-nav {
  display: flex;
  justify-content: space-between;
  margin-right: 10%;
}

.overlay .arrow {
  height: 100%;
  width: 30px;
}

.overlay .sub-nav.closed {
  display: none;
}

/* desktop */
@media (min-width: 1600px) {
  html {
    font-size: 20px;
  }
}

@media (max-width: 710px) {
  header nav {
    display: none;
  }

  header img.burger, img.cross {
    display: block;
  }
}

/* phone */
@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  section#home {
    padding-top: 140px;
    min-height: calc(100vh - 140px);
    background-position: 80% 90% !important;
    background-size: auto 60% !important;
  }

  p.intro {
    font-size: 1.6em;
    margin-left: 10px;
    margin-top: 4px;
    word-wrap: break-word;
  }

  section#leistung {
    align-content: initial;
  }

  section#leistung .leistungen {
    flex-direction: column;
    align-items: center;
  }

  section#leistung .leistungen article {
    width: auto;
  }

  section#projekte .projekte {
    flex-direction: column;
    padding: 5% 28px;
  }

  section#projekte .projekte article {
    width: auto;
    margin: 20px 0;
  }

  section#leistung section.partner {
    display: none;
  }

  section#kontakt {
    grid-template-columns: 100%;
  }

  section#kontakt article h2 {
    margin-top: 0;
  }

  section#kontakt article {
    grid-template-columns: 100%;
    justify-items: start;
  }

  section#kontakt article h2,
  section#kontakt article img,
  section#kontakt article div.markdown-container {
    grid-column: 1;
  }

  section#kontakt article img {
    max-width: 100%;
  }

  section#kontakt article img,
  section#kontakt article div.markdown-container {
    width: 100%;
    margin-left: 0;
  }

  section#kontakt .quote {
    grid-row: 2;
  }

  body>footer {
    grid-template-columns: 1fr;
  }

  body>footer .links, body>footer .addresses {
    grid-column: 1;
    justify-self: start;
    margin-right: 0;
  }

  body>footer .addresses {
    flex-direction: column;
  }

  body>footer .hq-address {
    margin-right: 0;
  }

  .project-page article, .leistung-page section, .page-page section {
    grid-template-columns: 100%;
    padding: 140px 0 40px;
  }

  .project-page article div.col-2, .leistung-page section div.col-2 {
    grid-column: 1;
    padding: 0 28px;
  }

  .project-page article div.col-2 p.intro,
  .leistung-page section div.col-2 p.intro,
  .page-page section p.intro {
    margin-top: 4px;
  }
}

@media (max-width: 375px) {
  header #logo {
    height: auto;
    width: 50%;
  }
}

/* big phone */
@media (min-width: 375px) and (max-width: 667px) and (-webkit-min-device-pixel-ratio: 2) {
  html {
    font-size: 16px;
  }

  section#home {
    background-position: 60% 90% !important;
  }
}