/* =========================================================================
   Helmut Cremer CSS
========================================================================== */

/*    Fonts
========================================================================== */

@font-face {
  font-family: "Sora";
  src: url("../fonts/Sora-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sora Bold";
  src: url("../fonts/Sora-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*   Variables
========================================================================== */

:root {
  box-sizing: border-box;
  
  --background-color: #fff;

  --white: oklch(1 0 0);
  --black: oklch(0 0 0);
  --grey: oklch(0.67 0.0256 256.14);

  --red: oklch(0.54 0.218164 29.6734);
  --red-light: oklch(0.69 0.1129 25.79);
  --red-lighter: oklch(0.45 0.222 29.43);

  --yellow-dark: oklch(63.29% 0.13 81.013);
  --yellow: oklch(0.83 0.1707 81.41);
  --yellow-light: oklch(0.91 0.1158 89.34);

  --blue: oklch(0.34 0.0987 251.52);
  --blue-light: oklch(0.67 0.0418 277.24);
  --blue-lighter: oklch(0.99 0.007 268.55);

  --primary-color: var(--red);
  --secondary-color: var(--blue);
  --tertiary-color: var(--yellow);

  --pico-nav-element-spacing-horizontal: 1.25rem;
}
@media (prefers-color-scheme: dark) {
	:root {
	  --background-color: #343434;
	  --blue: oklch(0.6 0.15 251.17);
	}
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--secondary-color);
}

/*   Layout
========================================================================== */

body {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  line-height: 1.25rem;
  background: var(--background-color);
}

header {
  padding-top: 0 !important;
  .topline {
    margin-block: 0;
    background-color: var(--red);
    > div {
      p {
        margin: 0;
        padding: 0.5rem;
      }
    }
    .opening-times {
      color: var(--white);
    }
    a {
      color: var(--white);
      text-decoration-color: transparent;
      &:hover {
        text-decoration: underline;
        text-decoration-color: var(--white);
      }
    }
  }
  .site-header {
    margin-block: 0;

    .site-header__logo {
      img {
        margin-block: 1rem;
        @media (min-width: 768px) {
          height: 120px;
        }
      }
    }
    #menu {
      align-content: center;

      a:not(.emergency) {
        text-decoration-color: var(--blue);
        color: var(--blue);
      }
    }
    .menu-icon {
      color: var(--blue);
      align-content: center;
    }
    .emergency {
      background: var(--red);
      color: var(--white);
      border-color: var(--white);
      text-decoration-color: transparent;
      &:hover {
        background: var(--red-lighter);
      }
    }
  }
}
main {
  width: 1000px;
  margin: 0 auto;
}
main > section {
	margin-block: 6rem;
}

.tagline {
  min-height: 50vw;
  background: url("../../assets/images/tagline_clean.webp") no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;

  .inner {
	display: flex;
    flex-direction: column;
    align-items: flex-start;
    h2 {
      font-size: 2.5rem;
      color: var(--white);
	  background: #00000066;
	  box-shadow: 0px 0px 30px 12px #00000088;
      border-radius: 4rem;
    }
    p {
      color: var(--white);
	  font-size: 1rem;
	  font-weight: bold;
	  line-height: 1.2;
	  background: #00000066;
	  box-shadow: 0px 0px 30px 12px #00000088;
      border-radius: 4rem;
    }
    }
  }
}

.introduction {
  > p {
    column-gap: 2rem;
    column-count: 1;

    @media (min-width: 768px) {
      column-count: 2;
    }
  }
}

footer {
  padding-bottom: 0 !important;

  section.footerline {
    margin-bottom: 0;
    background-color: var(--grey);

    > div {
      justify-items: center;
      align-items: center;
      p {
        color: var(--white);
        margin: 0;
        padding: 0.5rem;
      }

      .menu {
        button {
          font-size: 1em;
          background: transparent;
          color: var(--white);
          border-color: transparent;
          &:hover {
            text-decoration: underline;
            text-decoration-color: currentColor;
          }
        }
      }

      a {
        color: currentColor;
        text-decoration: none;
        text-decoration-color: currentColor;
        &:hover {
          text-decoration: underline;
          text-decoration-color: currentColor;
        }
      }
    }
  }
}
.center {
  text-align: center;
}

/*   Button
========================================================================== */

button,
.button {
  background-color: var(--primary-color);
  padding: 1rem 1rem;
  color: var(--white);
  text-decoration: none;
  border-radius: 0.25rem;
  transition: 0.25s ease-in-out;
  &:hover,
  &:focus {
    background-color: var(--red-lighter);
  }
}

/*   Keyfacts
========================================================================== */

.wrap-keyfacts {
  @media (min-width: 768px) {
    margin-top: -10rem;
  }

  .keyfacts.active {
    background: var(--blue);
    h3,
    h4,
    h5,
    p {
      color: var(--white);
    }
  }
}

/*   Leistungen
========================================================================== */

section.leistungen {
  article.article-img-left {
    margin-block: 2rem 2rem;
    .text {
      background: url("../../assets/icons/bild1_bg.svg") no-repeat;
      background-size: 80% 80%;
      background-position: 80% 80%;
    }
  }

  article.article-img-right .text {
    background: url("../../assets/icons/bild2_bg.svg") no-repeat;
    background-size: 80% 80%;
    background-position: 80% 80%;
  }

  article {
    margin: 0;
    padding: 0;
    .text {
      padding: 2rem;
      display: flex;
      flex-direction: column;

      justify-content: center;
      p {
        margin: 0;
      }
      small {
        margin: 0;
        font-weight: bold;

        &.yellow {
          color: var(--yellow);
        }
        &.red {
          color: var(--red);
        }
      }
    }
    .image {
      img {
        margin: 0;
      }
    }
  }
}

/*   How To
========================================================================== */
section.howto {
  margin-top: 4rem;
  > div {
    margin-block: 2rem 2rem;
    gap: 2rem;
  }
  article > p,
  h3,
  a {
    color: var(--white);
    text-decoration-color: white;
  }
  .icon {
    background: var(--white);
    text-align: center;
    font-size: 2rem;
    line-height: 4rem;
    color: currentColor;
    aspect-ratio: 1;
    border-radius: 50%;
    height: 4rem;
  }

  article.first {
    border-radius: 0;
    background-color: var(--blue);
    color: var(--blue);
    box-shadow: 15px 15px 0 var(--blue-light);
  }
  article.second {
    border-radius: 0;
    background-color: var(--yellow-dark);
    color: var(--yellow-dark);
    box-shadow: 15px 15px 0 var(--yellow-light);
  }
  article.third {
    border-radius: 0;
    background-color: var(--red);
    color: var(--red);
    box-shadow: 15px 15px 0 var(--red-light);
  }
}

/*   Partner logos
========================================================================== */

.partner__list {
  display: grid;
  gap: 2rem;
  li {
    list-style: none;
    padding: 0;
    margin: 0;
    img {
      width: 100%;
    }
  }
}
/*   Kontakt
========================================================================== */

section.kontakt {
  background: url("../../assets/icons/heating.svg") no-repeat;
  background-size: contain;
  background-position: 100% 100%;
  margin-bottom: 0;

  > div {
    padding-bottom: 2rem;
  }
  article:not(:has(> form:first-child)) {
    background-color: var(--secondary-color);
    border-radius: 0;
    box-shadow: 15px 15px 0 var(--blue-light);

    h2,
    p,
    address,
    li {
      color: var(--white);
    }
    address a {
      color: var(--white);
      text-decoration-color: currentColor;
      &:hover,
      &:focus {
        text-decoration-color: currentColor;
      }
    }
    address > div {
      margin-block: 1rem 2rem;
      text-align: center;
      & a {
        padding: 0;
      }
    }
  }
}

/* =========================================================================
   Icons
========================================================================== */

.gg-mail,
.gg-mail::after {
  display: inline-flex;
  vertical-align: middle;
  box-sizing: border-box;
  height: 14px;
  border: 2px solid;
}
.gg-mail {
  overflow: hidden;
  transform: scale(var(--ggs, 1));
  position: relative;
  width: 18px;
  border-radius: 2px;
}
.gg-mail::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  width: 14px;
  transform: rotate(-45deg);
  bottom: 3px;
  left: 0;
}

/* Phone */

.gg-phone {
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  width: 22px;
  height: 22px;
  transform: scale(var(--ggs, 1));
}

.gg-phone::after,
.gg-phone::before {
  content: "";
  display: block;
  box-sizing: border-box;
  position: absolute;
}

.gg-phone::after {
  width: 18px;
  height: 18px;
  border-top-left-radius: 1px;
  border-bottom-right-radius: 1px;
  border-bottom-left-radius: 12px;
  border-left: 4px solid;
  border-bottom: 4px solid;
  left: 2px;
  bottom: 2px;
  background: linear-gradient(to left, currentColor 10px, transparent 0)
      no-repeat right 11px/6px 4px,
    linear-gradient(to left, currentColor 10px, transparent 0) no-repeat -1px 0/4px
      6px;
}

.gg-phone::before {
  width: 20px;
  height: 20px;
  border: 6px double;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-45deg);
  bottom: 2px;
  left: 2px;
}

/* Cevron */

.gg-chevron-right {
  vertical-align: middle;
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  transform: scale(var(--ggs, 1));
  width: 22px;
  height: 22px;
  border: 2px solid transparent;
  border-radius: 100px;
}
.gg-chevron-right::after {
  content: "";
  display: block;
  box-sizing: border-box;
  position: absolute;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid;
  border-right: 2px solid;
  transform: rotate(-45deg);
  right: 6px;
  top: 4px;
}

footer a.button {
  padding: 0;

  > i:first-child {
    margin-right: 0.5rem;
  }

  > i:last-child {
    margin-left: 0.5rem;
  }
}
a.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

p.menu {
  display: flex;
}

dialog
  footer
  :is(button, [type="submit"], [type="button"], [role="button"]).secondary {
  border: 0;
}

/*    Mobile Anpassungen
========================================================================== */

@media (max-width: 768px) {
  section.topline .container {
    justify-items: center;
    > p.opening-times {
      display: none;
    }
  }
  section.kontakt {
    background: none;
  }
}

/* Dialog Fading */

dialog[open] {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

dialog[open] article {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius);
}

dialog button[aria-label="Dialog schließen"] {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
