/* Fonts */
/* inter-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  src: url("../fonts/inter-v20-latin-300.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-300italic - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: italic;
  font-weight: 300;
  src: url("../fonts/inter-v20-latin-300italic.woff2") format("woff2");
}
/* inter-regular - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/inter-v20-latin-regular.woff2") format("woff2");
}
/* inter-italic - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  src: url("../fonts/inter-v20-latin-italic.woff2") format("woff2");
}
/* inter-500 - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/inter-v20-latin-500.woff2") format("woff2");
}
/* inter-500italic - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: italic;
  font-weight: 500;
  src: url("../fonts/inter-v20-latin-500italic.woff2") format("woff2");
}
/* inter-600 - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/inter-v20-latin-600.woff2") format("woff2");
}
/* inter-700 - latin */
@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/inter-v20-latin-700.woff2") format("woff2");
}

/* oswald-300 - latin */
@font-face {
  font-display: swap;
  font-family: "Oswald";
  font-style: normal;
  font-weight: 300;
  src: url("../fonts/oswald-v57-latin-300.woff2") format("woff2");
}
/* oswald-regular - latin */
@font-face {
  font-display: swap;
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/oswald-v57-latin-regular.woff2") format("woff2");
}
/* oswald-500 - latin */
@font-face {
  font-display: swap;
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/oswald-v57-latin-500.woff2") format("woff2");
}
/* oswald-600 - latin */
@font-face {
  font-display: swap;
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/oswald-v57-latin-600.woff2") format("woff2");
}
/* oswald-700 - latin */
@font-face {
  font-display: swap;
  font-family: "Oswald";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/oswald-v57-latin-700.woff2") format("woff2");
}

/* dancing-script-regular - latin */
@font-face {
  font-display: swap;
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/dancing-script-v29-latin-regular.woff2") format("woff2");
}
/* dancing-script-500 - latin */
@font-face {
  font-display: swap;
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/dancing-script-v29-latin-500.woff2") format("woff2");
}

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    overflow-y: scroll;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin: 0;
  }

  /* https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html */
  [role="list"] {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  body {
    min-block-size: 100vh;
    line-height: 1.6;
  }

  h1,
  h2,
  h3,
  button,
  input,
  label {
    line-height: 1.1;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  p,
  li {
    text-wrap: pretty;
  }

  img,
  picture {
    max-inline-size: 100%;
    display: block;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }
}

@layer base {
  :root {
    --clr-white: hsl(0, 0%, 100%);
    --clr-white-900: hsl(0, 0%, 90%);
    --clr-white-smoke: hsl(120, 10%, 94%);

    --clr-pastell-500: hsl(328, 20%, 75%);
    --clr-pastell-700: hsl(327, 28%, 55%);
    --clr-pastell-900: hsl(327, 28%, 50%);

    --clr-rosa-light: hsl(351, 67%, 91%);
    --clr-rosa-light-300: hsl(322, 100%, 98%);
    --clr-grey-light: hsl(349, 14%, 85%);
    --clr-black: hsl(0, 0%, 0%);

    --ff-heading: "Oswald", sans-serif;
    --ff-body: "Inter", sans-serif;
    --ff-zitat: "Dancing Script", cursive;

    --fs-300: 0.875rem;
    --fs-400: 1rem;
    --fs-500: 1.15rem;
    --fs-550: 1.25rem;
    --fs-600: 1.25rem;
    --fs-650: 1.5rem;
    --fs-700: 1.7rem;
    --fs-750: 1.8rem;
    --fs-800: 2rem;
    --fs-900: 3.75rem;
    --fs-1000: 3.75rem;

    @media (width > 760px) {
      --fs-300: 0.875rem;
      --fs-400: 1rem;
      --fs-500: 1.15rem;
      --fs-550: 1.2rem;
      --fs-600: 1.3rem;
      --fs-650: 1.8rem;
      --fs-700: 2rem;
      --fs-750: 2.2rem;
      --fs-800: 2.6rem;
      --fs-900: 5rem;
      --fs-1000: 7.5rem;
    }
  }

  :root {
    /* structured custom properties, own block because syntax highlighting is broken after the media nesting */
    --text-main: var(--clr-black);
    --text-high-contrast: var(--clr-black);
    --text-brand: var(--clr-pastell-900);
    --text-brand-light: var(--clr-rosa-light);
    --text-white: var(--clr-white);
    --text-hover: var(--clr-white-900);

    --background-accent-light: var(--clr-white-smoke);
    --background-button: var(--clr-pastell-700);

    --background-extra-light: var(--clr-grey-light);
    --background-light: var(--clr-rosa-light-300);
    --background-main: var(--clr-white);
    --background-dark: var(--clr-pastell-500);
    --background-extra-dark: var(--clr-pastell-900);

    --font-size-heading-xs: var(--fs-700);
    --font-size-heading-sm: var(--fs-750);
    --font-size-heading-regular: var(--fs-800);
    --font-size-heading-lg: var(--fs-900);
    --font-size-heading-xl: var(--fs-1000);

    --font-size-sm: var(--fs-400);
    --font-size-regular: var(--fs-500);
    --font-size-md: var(--fs-550);

    --font-size-lg: var(--fs-600);
    --font-size-xl: var(--fs-650);

    --border-radius-1: 0.25rem;
    --border-radius-2: 0.5rem;
    --border-radius-3: 0.75rem;
  }

  html {
    font-family: var(--ff-body);
    line-height: 1.6;
    /* padding vor dem Jump-Punkt. */
    /* scroll-padding: 3rem; */

    /* smooth scrolling activated.  */
    @media (prefers-reduced-motion: no-preference) {
      scroll-behavior: smooth;
    }
  }

  body {
    /* Font size on body to keep rem measurement consistent. */
    font-size: var(--font-size-regular);
    color: var(--text-main);
    background: var(--background-main);
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: var(--ff-heading);
    color: var(--text-high-contrast);
  }

  h1 {
    font-size: var(--font-size-heading-lg);
  }

  a {
    color: var(--text-high-contrast);
  }

  a:hover,
  a:focus-visible {
    color: var(--text-brand);
  }

  img {
    border-radius: var(--border-radius-3);
  }

  /* Page-View Transition (only newer browsers) - progressive enhancement. */
  @view-transition {
    navigation: auto;
  }

  hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid var(--clr-pastell-700);
    margin: 1em 0;
    padding: 0;
  }
}

@layer layout {
  /* wendet die anpassungen nur auf childs an, die nicht das erste child sind. */
  .flow > * + * {
    margin-top: var(--flow-spacer, 1em);
  }

  .grid-flow {
    display: grid;
    gap: var(--grid-flow-gap, 1rem);
  }

  .wrapper {
    --wrapper-max-width: 1130px;

    max-width: calc(var(--wrapper-max-width) + 2rem);
    margin-inline: auto;
    padding-inline: 1rem;

    &[data-width="narrow"] {
      --wrapper-max-width: 780px;
    }

    &[data-width="wide"] {
      --wrapper-max-width: 1280px;
    }

    &[data-width="extra-wide"] {
      --wrapper-max-width: 1410px;
    }
  }

  .flex-area {
    display: flex;
    flex-direction: column;
    gap: 1em;

    @media (width < 760px) {
      flex-direction: column-reverse;
    }
  }

  .section {
    --padding: 3.75rem;

    padding-block: var(--padding);

    @media (width > 760px) {
      --padding: 5rem;

      &[data-padding="compact"] {
        --padding: 3.5rem;
      }
    }
  }

  .three-columns {
    --column-sizes: 1fr 1fr 1fr;
  }

  .two-columns-left {
    --column-sizes: 1.6fr 1fr;
  }

  .two-columns-right {
    --column-sizes: 1fr 1.6fr;
  }

  .grid-columns {
    /* Standard Two-Equal-Columns */
    display: grid;
    gap: var(--equal-columns-gap, 1rem);

    align-items: var(--column-layout-alignment, stretch);

    @media (width > 760px) {
      grid-template-columns: var(--column-sizes, 1fr 1fr);
      grid-auto-columns: auto;
    }

    @media (width < 760px) {
      .grid-columns-img {
        order: 4;
      }
    }

    &[data-gap="large"] {
      --equal-columns-gap: 2rem;
    }

    &[data-vertical-alignment="centered"] {
      --column-layout-alignment: center;
    }

    &[data-vertical-alignment="top"] {
      --column-layout-alignment: start;
    }

    &[data-rowgap="big"] {
      row-gap: 2rem;
    }
  }

  /* Beispiel für Flex-Design mit Columns, bei dem alle Childs dieselbe Größe haben
  .flex-equal-columns {
    display: flex;

    > * {
        flex: 1;
    }
  }
  */

  .flex-center {
    display: flex; /* Macht den Container zu einem Flex-Container */
    justify-content: center; /* Zentriert den Inhalt horizontal */
    align-items: center;
  }
}

@layer components {
  .skip-to-main:not(:focus) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .skip-to-main {
    background: var(--clr-pastell-900);
    padding: 0.75rem;
    position: absolute;
    top: 1.5rem;
    left: 1rem;
    font-size: var(--font-size-regular);
    font-family: var(--ff-body);
    font-weight: 700;
    border-radius: var(--border-radius-3);
    color: white;
    z-index: 4;
    text-decoration: none;
  }

  .site-header {
    padding-block: 1rem;

    /* Um horizontalen Scrollbalken bei Translations zu vermeiden. */
    overflow-x: clip;
    position: relative;
    background-color: var(--background-main);
  }

  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    /* top/buttom gap is smaller, then left/right. looks visually better if something is wrapped. */
    gap: 0.5rem 2rem;
    align-items: center;
    justify-content: space-between;

    @media (width < 1280px) {
      justify-content: center;

      .primary-navigation {
        order: 4;
      }
      .button {
        margin-left: auto;
        order: 3;
      }
    }

    @media (width < 740px) {
      justify-content: start;

      picture {
        margin-right: auto;
      }

      button {
        margin-left: auto;
      }

      .button {
        margin-left: 0.8rem;
      }
    }

    @media (width < 500px) {
      gap: 0.5rem 0rem;
    }

    @media (width < 415px) {
      .button {
        margin-left: 0rem;
      }
    }
  }

  [aria-controls="primary-nav"] {
    /* button in front of the menu. z-index works here directly because of flex or grid container. */
    z-index: 100;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: none;

    /* pitfall from defining the radius globally. should be refactored if it has to be set different more often. */
    img {
      border-radius: 0;
    }

    @media (width < 740px) {
      display: block;
    }
  }

  .primary-navigation {
    font-size: var(--font-size-lg);
    font-family: var(--ff-heading);

    ul {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
    }

    a {
      text-decoration: none;
    }

    /* neu für das Hamburger Menü */
    @media (width < 740px) {
      display: none;
      opacity: 0;
      /* Animation mit Bewegung: translate 1s:
      transition: opacity 1s, display 1s, translate 1s;
      translate: 0 -100%; 
      */
      transition: opacity 1s, display 1s;
      transition-behavior: allow-discrete;

      position: absolute;
      z-index: 10;
      top: 12px;
      right: 0;
      font-size: var(--font-size-lg);
      font-weight: 500;
      font-family: var(--ff-heading);
      background-color: var(--background-extra-dark);
      padding: 2rem;
      border-radius: var(--border-radius-3) 0 0 var(--border-radius-3);

      ul {
        gap: 0;
        flex-direction: column;
      }

      li {
        --delay: 0s;
        translate: 50%;
        transition: translate 0.8s var(--delay), opacity 1s var(--delay);
      }

      li:nth-child(2) {
        --delay: 0.15s;
      }
      li:nth-child(3) {
        --delay: 0.25s;
      }
      li:nth-child(4) {
        --delay: 0.3s;
      }
      li:nth-child(5) {
        --delay: 0.35s;
      }

      li + li {
        /* ähnlich wie * + *, allerdings nur für list elemente  */
        margin-block-start: 1.5rem;
        padding-block-start: 1.5rem;
        border-top: 2px solid var(--background-accent-light);
      }

      a {
        color: var(--text-white);
      }

      a:hover,
      a:focus-visible {
        color: var(--text-hover);
      }

      /* alternativ zu dem extra media block eins drunter: 
      [aria-expanded="true"] + & {
        display: block;
      }
      */
    }
  }

  @media (width < 740px) {
    /* greift nur wenn beide elemente direkt hintereinander sind. mit ~ ggf. etwas sicherer. dann müssen beide elemente nur nacheinander kommen. */
    [aria-expanded="true"] + .primary-navigation {
      display: block;
      opacity: 1;
      translate: 0 0;

      /* für fading in, muss nach der opacity definition stehen. */
      @starting-style {
        opacity: 0;
        translate: 0 -100%;
      }

      li {
        translate: 0 0;
        opacity: 1;

        @starting-style {
          opacity: 0;
          translate: 50%;
        }
      }
    }

    .image-toggle-small {
      display: none;
    }
  }

  .site-footer {
    background-color: var(--background-main);
    padding-block: 2rem;
    gap: 2rem;

    /* Um horizontalen Scrollbalken bei Translations zu vermeiden. */
    overflow-x: clip;
    position: relative;
  }

  .site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    /* top/buttom gap is smaller, then left/right. looks visually better if something is wrapped. */
    gap: 0.5rem 2rem;
    align-items: center;
    justify-content: start;

    .footer-navigation {
      margin-left: auto;
    }
  }

  .footer-navigation {
    font-size: var(--font-size-regular);
    font-family: var(--ff-heading);

    ul {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
    }

    a {
      text-decoration: none;
    }
  }

  .zitat__text {
    font-family: var(--ff-zitat);
    font-size: var(--font-size-xl);
    line-height: 1.3;
  }

  .zitat__image {
    float: right;
    margin-top: 0.5em;
    margin-right: 0.5em;
  }

  .overview {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--text-high-contrast);
    background-size: cover;
    background-position: center;

    h2 {
      font-family: var(--ff-heading);
    }
  }

  .datenschutz {
    font-size: var(--font-size-heading-md);

    h2 {
      font-family: var(--ff-heading);
      font-size: var(--font-size-lg);
    }
  }

  .card {
    /* wegen dem automatischen vergrößern (stretching) der bereiche bei weniger Inhalt von Grid auf Flex-Design mit Direction column umgestellt. */
    /* display: grid; */
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: var(--card-gap, 1rem);
    padding: 1rem;
    border-radius: var(--border-radius-3);

    img {
      /* innnere elemente sollten kleineren radius haben, damit es gut aussieht. */
      border-radius: var(--border-radius-2);
    }

    a {
      text-decoration: none;
    }
  }

  .preise-card {
    display: flex;
    flex-direction: column;

    gap: var(--card-gap, 1rem);
    padding-bottom: 1rem;
    border-radius: var(--border-radius-3);

    img {
      /* innnere elemente sollten kleineren radius haben, damit es gut aussieht. */
      border-radius: var(--border-radius-2);
    }

    a {
      text-decoration: none;
    }
  }

  .card__title {
    color: var(--card-title-color, var(--text-brand));
    font-size: var(--card-title-font-size, var(--font-size-heading-xs));
    font-family: var(--ff-heading);
    line-height: 1.1;

    &[data-padding="large"] {
      padding-bottom: 1.5rem;
    }
    &[data-size="big"] {
      --card-title-font-size: var(--font-size-heading-sm);
    }
  }

  .card__note {
    /* adding the empty space at the top. */
    margin-block-start: auto;
    background-color: var(--background-dark);
    padding: 0.75rem;
    border-radius: var(--border-radius-2);

    p {
      margin-left: 0.5em;
      margin-top: 0.5em;
    }
  }

  .nachoben {
    font-size: var(--font-size-sm);
    text-decoration: none;
  }

  .button {
    display: inline-flex;
    text-decoration: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background-color: var(--background-button);
    color: var(--text-white);
    font-size: var(--font-size-regular);
    font-family: var(--ff-body);
    font-weight: 700;
    border-radius: var(--border-radius-2);
  }

  .button:hover,
  .button:focus-visible {
    color: var(--text-hover);
    background-color: var(--background-button);
  }

  .contact-form {
    display: grid;
    gap: 1rem;
    margin: 1rem;

    button {
      /* Button links */
      /* justify-self: start; */
      border: none;

      /* Button auf der rechten Seite: */
      grid-column: 1 / -1;
      justify-self: end;
    }
  }

  .form-group {
    display: grid;
    gap: 0.75ch;
    margin-top: 0.5rem;

    input,
    textarea {
      /* background: var(--clr-grey-light); */
      border-radius: var(--border-radius-3);
      padding: 1ex 2ex;
      border: none;
    }

    label {
      /* text-transform: uppercase; */
      text-box-trim: trim-both;
      text-box-edge: cap alphabetic;
    }

    input {
      /* Hintergrund bei Checkbox-Selection: */
      accent-color: var(--background-main);
    }

    /* Um horizontalen Overflow zu vermeiden: */
    input:not([type="checkbox"], [type="radio"]) {
      width: 100%;
    }

    input[type="checkbox"] {
      transform: scale(1.9);
    }
  }

  .form-group:has(.fine-print) {
    grid-column: 1 / -1;

    display: flex;
    gap: 1ch;
  }

  .image-ueber-mich {
    float: right;
    margin-left: 0.5em;
    margin-bottom: 2em;
  }

  .impressum-text-right {
    float: right;
    margin-left: 0.5em;
    white-space: nowrap;
  }

  .btn--close-modal {
    font-family: inherit;
    color: inherit;
    position: absolute;
    top: 0.5rem;
    right: 2rem;
    font-size: var(--font-size-heading-regular);
    cursor: pointer;
    border: none;
    background: none;

    @media (width < 760px) {
      right: 1.5rem;
    }
  }
}

@layer utilities {
  [hidden] {
    display: none;
  }

  .hidden {
    visibility: hidden;
    opacity: 0;
  }

  /* Wird durch Java-Script beim Resizen gesetzt. Um unerwünschte Effekte beim Resizen zu vermeiden. */
  .resizing * {
    transition: none;
    animation: none;
    /* animation-play-state: paused */
  }

  .visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .text-center {
    text-align: center;
  }
  .text-right {
    text-align: right;
  }
  .text-brand {
    color: var(--text-brand);
  }
  .text-high-contrast {
    color: var(--text-high-contrast);
  }

  .section-title {
    font-size: var(--font-size-heading-regular);
  }

  .section-extranote {
    font-style: italic;
    font-weight: 300;
    font-size: var(--font-size-regular);
  }

  .background-base {
    background-color: var(--background-base);
  }
  .background-light {
    background-color: var(--background-light);
  }
  .background-extra-light {
    background-color: var(--background-extra-light);
  }
  .background-dark {
    background-color: var(--background-dark);
  }

  .font-size-sm {
    font-size: var(--font-size-sm);
  }
  .font-size-regular {
    font-size: var(--font-size-regular);
  }
  .font-size-md {
    font-size: var(--font-size-md);
  }
  .font-size-lg {
    font-size: var(--font-size-lg);
  }

  /* MODAL WINDOW */
  .modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4rem 6rem rgba(0, 0, 0, 0.3);
    padding: 4rem 5rem;
    z-index: 1000;
    transition: all 0.5s;
    background-color: var(--background-main);
    border-radius: var(--border-radius-3);
    max-width: 60rem;

    @media (width < 760px) {
      padding: 3rem 4rem;
      min-width: 80%;
    }
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 100;
    transition: all 0.5s;
  }
}

/* Animations can be declared like this - but be careful with too much animating */
@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
