/* ==========================================================================
   KMU Werk – Nachfolge-Check Landingpage
   Design tokens
   ========================================================================== */

:root {
  --color-navy: #142739;
  --color-navy-deep: #14212f;
  --color-rust: #9a2a18;
  --color-rust-dark: #8a3524;
  --color-cream: #f7f8f8;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-ink: #1b2c42;
  --color-ink-soft: #4a5568;
  --color-border: #dfe0e0;

  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans:
    'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --page-width: 1800px;
  --wrap-width: 1600px;
  --sub-page-width: 1400px;
  --hero-left: 800px;

  --fs-200: clamp(0.75rem, 0.5rem + 1.5vw, 1rem);
  --fs-300: clamp(1rem, 0.5rem + 1.5vw, 1.15rem);
  --fs-400-stat: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  --fs-400: clamp(1rem, 0.5rem + 1.5vw, 1.25rem);
  --fs-500: clamp(1.2rem, 0.5rem + 2vw, 1.5rem);
  --fs-600: clamp(1.4rem, 0.5rem + 2vw, 2rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;

  --radius: 6px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  container-name: body;
  container-type: inline-size;
  /* * {
    outline: 1px solid green;
  } */
}

.skip-link.screen-reader-text {
  position: absolute;
  left: -5000px;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  width: 1px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 1.5vw + 1rem, 3.25rem);
}
h2 {
  font-size: clamp(1.2rem, 2.2vw + 1rem, 1.8rem);
}
h3 {
  font-size: 1.15rem;
  font-family: var(--font-sans);
}

p {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-400);
  /* color: var(--color-ink-soft); */
  /* max-width: 65ch; */
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

figure {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.wrap {
  width: min(100%, var(--wrap-width));
  margin-inline: auto;
  padding-inline: var(--space-3);

  @media (min-width: 768px) {
    padding-inline: var(--space-4);
  }
}

/* .section--muted is a second class on the SAME element
   (<section class="section section--muted">) -> compound selector, needs the dot. */
.section {
  padding-block: var(--space-8);

  &.section--muted {
    background: var(--color-cream);
  }
}

/* .rule--light is likewise a modifier on the same element. */
.rule {
  display: block;
  width: 85px;
  height: 4px;
  background: var(--color-rust);
  margin-block: var(--space-2) var(--space-3);

  &.rule--light {
    background: var(--color-rust);
  }
}

.eyebrow {
  /* color: var(--color-rust); */
  color: var(--color-white);
  font-size: var(--fs-300);
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
  &.eyebrow--dark {
    color: var(--color-ink-soft);
  }
}

/* ==========================================================================
   Buttons
   .btn--primary / .btn--text / .btn--block are modifiers on the same
   element as .btn (e.g. <a class="btn btn--primary">) -> compound selectors.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-weight: 600;
  /* font-size: 0.95rem; */
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;

  &.btn--primary {
    background: var(--color-rust);
    color: var(--color-white);
    padding: 0.9rem 1.6rem;

    &:hover {
      background: var(--color-rust-dark);
    }

    &:focus-visible {
      outline: 3px solid var(--color-rust);
      outline-offset: 3px;
    }
  }

  &.btn--text {
    color: var(--color-rust);
    font-weight: 600;
    font-size: var(--fs-400);
    margin-inline-start: auto;
    @container body (width > 450px) {
      /* flex: unset; */
    }
    &:hover {
      color: var(--color-rust-dark);
    }
  }

  &.btn--block {
    width: 100%;
    justify-content: center;
  }
  &.btn--outline {
    background: transparent;
    color: var(--color-rust);
    border: 1.5px solid var(--color-rust);
    padding: calc(0.9rem - 1.5px) calc(1.6rem - 1.5px);

    &:hover {
      background: var(--color-rust);
      color: var(--color-white);
    }

    &:focus-visible {
      outline: 3px solid var(--color-rust);
      outline-offset: 3px;
    }
  }
}

/* ==========================================================================
   Header
   .site-header__inner is a child <div>, not the header itself
   -> descendant combinator: "& .site-header__inner".
   ========================================================================== */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 20;

  & .site-header__inner {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-2);
    width: min(100%, var(--page-width));
    max-width: unset;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--color-navy);
  /* .logo__mark is a child <span> -> descendant */
  & .logo__mark {
    width: clamp(200px, 1rem + 25vw, 300px);
  }

  /* .logo--footer is a modifier on the same <p> -> compound */
  &.logo--footer {
    color: var(--color-white);
    margin: 0;
  }
}

/* ==========================================================================
   Hero
   All .hero__x below are child elements of <section class="hero"> and are
   ONLY ever used inside it, so descendant combinators are safe here.
   ========================================================================== */

.hero {
  background:
    url(https://kmuwerk.24bp.de/wp-content/uploads/Hintergrund-Berge-1440x738-KMU-WERK.jpg)
      no-repeat,
    linear-gradient(180deg, var(--color-navy) 0%, var(--color-navy-deep) 100%);
  background-size: cover;
  background-position: center bottom;
  color: var(--color-white);
  padding-block: var(--space-8) var(--space-7);

  & .hero__grid {
    display: grid;
    gap: var(--space-7);
    align-items: center;

    @media (min-width: 960px) {
      grid-template-columns: 1.2fr 0.8fr;
      gap: var(--space-6);
    }
  }
  .hero__content {
    container: hero__content/inline-size;
    .btn {
      width: min(100%, 500px);
      margin-block-start: var(--space-4);
      justify-content: center;
    }
  }

  h1 {
    color: var(--color-white);
    margin-block-end: var(--space-4);
    line-height: 1.4;
    text-wrap: balance;

    @container hero__content {
      font-size: clamp(1.75rem, 6.5cqi, 3.25rem);
    }
  }

  & .hero__lede {
    width: min(100%, var(--hero-left));
    /* max-width: 52ch; */
  }
}

/* .hero__note is reused OUTSIDE .hero too (in the closing CTA banner),
   so it must NOT be nested inside .hero - kept as its own top-level rule. */
.hero__note {
  font-size: 0.9rem;
  margin-top: var(--space-2);

  /* .hero__note--light is a modifier on the same element -> compound */
  &.hero__note--light {
    color: var(--color-white);
  }
}

.stat-row {
  --line-space: 4vw;
  --jump: 500px;
  display: grid;
  grid-template-columns: 1fr;
  /* repeat(3, 1fr); */
  gap: var(--space-3);
  width: min(100%, var(--hero-left));
  width: fit-content;
  margin-top: var(--space-7);
  padding-top: var(--space-4);

  @container hero__content (width > 300px) {
    grid-template-columns: fit-content(60px) fit-content(150px);
    gap: var(--line-space);
  }

  @container hero__content (width > 380px) {
    grid-template-columns: fit-content(180px) fit-content(150px) fit-content(
        320px
      );
  }

  @container hero__content (width > 600px) {
    --line-space: var(--space-5);
    grid-template-columns: fit-content(180px) fit-content(150px) fit-content(
        320px
      );
  }

  & .stat-row__item {
    position: relative;
    /* padding-inline-start: var(--space-4); */
    /* padding-inline-end: var(--space-5); */
    dt {
      font-family: var(--font-serif);
      font-size: 2rem;
      font-weight: 600;
      color: var(--color-white);
      margin: 0;
    }
    dd {
      margin: 0.25rem 0 0;
      font-size: var(--fs-400);
      text-wrap: balance;
    }
    & + .stat-row__item {
      border-top: 1px solid var(--color-white);
      padding-block-start: var(--space-3);
    }
    @container hero__content (width > 300px) {
      & + .stat-row__item {
        padding-inline-start: var(--line-space);
        border-top: unset;
        padding-block-start: 0;
        &::before {
          content: '';
          display: inline-block;
          width: 1px;
          background-color: var(--color-white);
          height: calc(100% - 1.5rem);
          position: absolute;
          left: 0px;
          margin-block-start: 1rem;
          margin-block-end: 0.5rem;
        }
      }

      &:first-child {
        width: min-content;
      }
      &:last-child {
        grid-column: 1/-1;
        width: min(100%, 300px);
        margin-inline: auto;
        &::before {
          display: none;
        }
      }
    }
    @container hero__content (width > 380px) {
      dd {
        font-size: var(--fs-400-stat);
      }
      &:last-child {
        grid-column: auto;
        width: auto;
        margin-inline: 0;
        &::before {
          display: inline-block;
        }
      }
    }
    @container hero__content (width > 810px) {
      &:first-child {
        width: auto;
      }
    }
  }
}

.hero__visual {
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   Placeholder images
   --brochure / --mountains are modifiers on the same element as
   .placeholder-image -> compound selectors.
   ========================================================================== */

.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.06) 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  );
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  line-height: 1.4; */

  &.placeholder-image--brochure {
    width: min(100%, 500px);
    aspect-ratio: 3 / 4;
  }

  &.placeholder-image--mountains {
    position: absolute;
    inset: 0;
    border-radius: 0;
    background:
      url(https://kmuwerk.24bp.de/wp-content/uploads/Hintergrund-Berge-1440x225-KMU-WERK.jpg)
        no-repeat,
      linear-gradient(
        180deg,
        var(--color-navy) 0%,
        var(--color-navy-deep) 100%
      );
    background-size: cover;
    background-position-x: right;
    background-position-y: top;
    filter: brightness(1.6);
    /* background-color: var(--color-navy-deep);
    background-image: repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 10px,
      rgba(255, 255, 255, 0.08) 10px,
      rgba(255, 255, 255, 0.08) 20px
    ); */
    border: none;
  }
}

/* ==========================================================================
   Gedanken-Sektion
   All children of <div class="wrap thoughts">, used only once -> descendant.
   ========================================================================== */

.thoughts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--space-4);
  margin-bottom: var(--space-8);
  container-type: inline-size;
  container-name: thoughts;

  @container body (width>620px) {
    grid-template-columns: 1.2fr 2fr;
  }

  /* & .thoughts__heading {
    max-width: 42ch;
  } */

  .thoughts__list {
    display: grid;
    gap: 0 var(--space-7);

    @container thoughts (width > 1000px) {
      grid-template-columns: repeat(2, 1fr);
    }

    .column_left,
    .column_right {
      position: relative;
      padding-inline-start: 2rem;
      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        display: block;
        min-width: 2px;
        min-height: calc(100% - 0rem);
        /* margin-block: 0.5rem; */
        background-color: var(--color-border);
        @container thoughts (width > 1000px) {
          min-height: calc(100% - 1.5rem);
          margin-block-end: 1.5rem;
        }
      }
    }
    .column_left {
      :nth-child(odd) {
        &::before {
          background-color: var(--color-rust);
        }
      }
    }
    .column_right {
      :nth-child(even) {
        &::before {
          background-color: var(--color-rust);
        }
      }
    }
    .thoughts__item {
      display: flex;
      gap: 0.75rem;
      align-items: center;
      padding-block: 0.6rem;
      color: var(--color-ink);
      font-size: var(--fs-400);
      font-weight: 500;
      line-height: 1.2;

      /* position: relative; */
    }

    .thoughts__item::before {
      content: '';
      width: 40px;
      aspect-ratio: 1/1;
      flex-shrink: 0;

      /* Die Fill-Farbe wird einfach hierüber gesteuert: */
      background-color: var(--color-navy);

      /* SVG als Maske einbinden */
      -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="20.644" viewBox="0 0 6.35 5.462"><g style="fill-rule:evenodd;stroke-width:28.222;stroke-linejoin:round"><g class="com.sun.star.drawing.ClosedBezierShape"><path class="BoundingBox" fill="none" d="M13406 2896h944v664h-944z" transform="translate(-90.178 -19.48)scale(.00673)"/><path d="M14211 3052c-13-89-89-156-180-156-57 0-109 27-142 69-33-42-85-69-142-69-90 0-165 65-180 151-91 11-161 88-161 181s70 170 161 181c15 85 90 150 180 150 57 0 109-27 142-69 33 42 85 69 142 69 91 0 167-67 180-155 79-19 137-91 137-176s-58-157-137-176" transform="translate(-90.178 -19.48)scale(.00673)"/></g><g class="com.sun.star.drawing.ClosedBezierShape"><path class="BoundingBox" fill="none" d="M13464 3475h154v153h-154z" transform="translate(-90.178 -19.48)scale(.00673)"/><path d="M13542 3475c-43 0-77 34-77 77 0 41 34 75 77 75 42 0 75-34 75-75 0-43-33-77-75-77" transform="translate(-90.178 -19.48)scale(.00673)"/></g><g class="com.sun.star.drawing.ClosedBezierShape"><path class="BoundingBox" fill="none" d="M13406 3608h99v100h-99z" transform="translate(-90.178 -19.48)scale(.00673)"/><path d="M13456 3608c-28 0-50 22-50 50 0 27 22 48 50 48 27 0 48-21 48-48 0-28-21-50-48-50" transform="translate(-90.178 -19.48)scale(.00673)"/></g></g></svg>');
      mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="20.644" viewBox="0 0 6.35 5.462"><g style="fill-rule:evenodd;stroke-width:28.222;stroke-linejoin:round"><g class="com.sun.star.drawing.ClosedBezierShape"><path class="BoundingBox" fill="none" d="M13406 2896h944v664h-944z" transform="translate(-90.178 -19.48)scale(.00673)"/><path d="M14211 3052c-13-89-89-156-180-156-57 0-109 27-142 69-33-42-85-69-142-69-90 0-165 65-180 151-91 11-161 88-161 181s70 170 161 181c15 85 90 150 180 150 57 0 109-27 142-69 33 42 85 69 142 69 91 0 167-67 180-155 79-19 137-91 137-176s-58-157-137-176" transform="translate(-90.178 -19.48)scale(.00673)"/></g><g class="com.sun.star.drawing.ClosedBezierShape"><path class="BoundingBox" fill="none" d="M13464 3475h154v153h-154z" transform="translate(-90.178 -19.48)scale(.00673)"/><path d="M13542 3475c-43 0-77 34-77 77 0 41 34 75 77 75 42 0 75-34 75-75 0-43-33-77-75-77" transform="translate(-90.178 -19.48)scale(.00673)"/></g><g class="com.sun.star.drawing.ClosedBezierShape"><path class="BoundingBox" fill="none" d="M13406 3608h99v100h-99z" transform="translate(-90.178 -19.48)scale(.00673)"/><path d="M13456 3608c-28 0-50 22-50 50 0 27 22 48 50 48 27 0 48-21 48-48 0-28-21-50-48-50" transform="translate(-90.178 -19.48)scale(.00673)"/></g></g></svg>');

      -webkit-mask-size: contain;
      mask-size: contain;
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
    }
    /* Beispiel für eine Farbänderung beim Hovern */
    /* .thoughts__item:hover::before {
      background-color: #e74c3c;
    } */
  }
}
.thoughts__question {
  font-weight: 700;
  color: var(--color-rust);
  font-size: 1.5rem;
  text-align: center;
  padding-inline: var(--space-2);
  /* max-width: 60ch; */
  margin: 0;
}
/* .bubble--a / .bubble--b are modifiers on the same <span> -> compound */
.bubble {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50% 50% 50% 4px;
  margin-top: 0.4rem;

  &.bubble--a {
    background: var(--color-rust);
  }
  &.bubble--b {
    background: var(--color-navy);
  }
}

/* ==========================================================================
   Zwei-/Fünf-/Drei-Spalten Intro-Blöcke
   .intro-cols wraps each of several sections independently, so a
   descendant rule matches correctly every time it's reused.
   ========================================================================== */

.intro-cols {
  display: grid;
  gap: var(--space-4);
  p {
    font-size: var(--fs-200);
  }
  @media (min-width: 900px) {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--space-7);
    align-items: start;
  }

  & .intro-cols__lead {
    max-width: 50ch;
  }

  /* modifier on the same element (<div class="wrap intro-cols intro-cols--score">) */
  &.intro-cols--score,
  &.intro-cols--plain {
    align-items: center;
  }

  &:has(.numbered-cols--five) {
    /* override cols3 with five section */
    .container {
      container: cols3/inline-size;
    }
    @container body (width > 900px) {
      grid-template-columns: 1fr 2.2fr;
    }
  }
}
.numbered-cols__num {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-600);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-1);
}
.container {
  container: cols3/inline-size;
}
.numbered-cols {
  display: grid;
  /* display: flex; */
  /* flex-wrap: wrap; */
  gap: var(--space-4) var(--space-3);
  grid-template-columns: 1fr;

  li {
    padding-inline-start: var(--space-1);
    padding-inline-end: var(--space-3);
    position: relative;

    & + li {
      padding-block-start: var(--space-5);
      border-block-start: 1px solid var(--color-border);
    }

    &:last-of-type {
      &::after {
        display: none;
      }
    }
  }
  /* @container cols3 (width > 300px) {
    li {
      p {
        hyphens: auto;
      }
    }
  } */

  /* @media (min-width: 640px) { */
  @container cols3 (width > 400px) {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    /* hyphens: auto; */
    li {
      & + li {
        border: unset;
        padding-block-start: 0;
      }
      &:first-of-type {
        &::after {
          content: '';
          position: absolute;
          right: 0;
          top: 0;
          display: block;
          min-width: 1px;
          min-height: calc(100% - 3rem);
          margin-block: 1.5rem;
          background-color: var(--color-border);
        }
      }
      &:last-of-type {
        grid-column: 1/-1;
      }
    }
  }
  @container cols3 (width > 588px) {
    li {
      &::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        display: block;
        min-width: 1px;
        min-height: calc(100% - 3rem);
        margin-block: 1.5rem;
        background-color: var(--color-border);
      }
      &:last-of-type {
        grid-column: auto;
      }
    }
  }

  /* modifier on the same <ol> */
  &.numbered-cols--five {
    --line-space: 3vw;
    display: flex;
    /* flex-direction: column; */
    flex-wrap: wrap;
    gap: var(--line-space);
    @container cols3 (width > 525px) {
      --line-space: 2.75rem;
    }
    @container cols3 (width > 702px) {
      display: grid;
      --line-space: 1rem;
    }
    li {
      flex: 1;
      padding-inline-start: 0;
      padding-inline-end: var(--line-space);
      grid-column: auto;
      border-top: unset;
      padding-block-start: 0;
      &::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        display: block;
        min-width: 1px;
        min-height: calc(100% - 3rem);
        margin-block: 1.5rem;
        background-color: var(--color-border);
      }
      &:nth-child(2),
      &:nth-child(4),
      &:nth-child(5) {
        &::after {
          display: none;
        }
      }
      @container cols3 (width > 319px) {
        &:nth-child(2),
        &:nth-child(4) {
          &::after {
            display: block;
          }
        }
        &:nth-child(3) {
          &::after {
            display: none;
          }
        }
      }
      @container cols3 (width > 525px) {
        &:nth-child(4) {
          &::after {
            display: block;
          }
        }
      }
      @container cols3 (width > 702px) {
        &:nth-child(3) {
          &::after {
            display: block;
          }
        }
      }
    }
    @container cols3 (width > 400px) {
      /* flex-direction: row; */

      /* li {
        width: min-content;
      } */
      grid-template-columns: repeat(auto-fit, minmax(min(100px, 100%), 1fr));
      /* grid-template-columns: repeat(2, fit-content(80px)); */
    }
    @container cols3 (width > 500px) {
      grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
      /* grid-template-columns: repeat(3, fit-content(80px)); */
    }
    @container cols3 (width > 702px) {
      justify-content: end;
      --line-space: 3cqw;
      grid-template-columns:
        fit-content(150px) fit-content(160px) fit-content(180px)
        fit-content(170px) fit-content(180px);
      /* grid-template-columns: repeat(5, fit-content(120px)); */
    }
  }
}

/* ==========================================================================
   Score / Standortbestimmung
   All children of a single <div class="score">, used once -> descendant.
   ========================================================================== */

.score {
  & .numbered-cols {
    margin-block-end: var(--space-4);
  }
  & .numbered-cols__num {
    color: var(--color-rust);
  }

  & .score__bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  & .score__bar-label {
    font-family: var(--font-serif);
    color: var(--color-navy);
    font-size: 1.1rem;
  }

  & .score__bar-track {
    flex: 1;
    height: 10px;
    background: var(--color-border);
    border-radius: 999px;
    overflow: hidden;
  }

  & .score__bar-fill {
    display: block;
    height: 100%;
    width: 60%;
    background: var(--color-rust);
    border-radius: 999px;
  }
}

/* ==========================================================================
   Banner (Zitat + Abschluss-CTA)
   .banner is reused for two sections (quote banner and closing CTA banner);
   every .banner__x below is only ever a descendant of SOME .banner, so
   descendant combinators are safe. .banner--cta is a modifier on the
   same <section> as the second usage -> compound.
   ========================================================================== */

.banner {
  position: relative;
  color: var(--color-white);
  overflow: hidden;
  padding-block: var(--space-7);

  & .banner__inner {
    position: relative;
    display: grid;
    gap: var(--space-4);

    @media (min-width: 860px) {
      grid-template-columns: 1.3fr 0.9fr;
      align-items: center;
    }
  }

  & .banner__statement h2 {
    color: var(--color-white);
    max-width: 30ch;
  }

  & .banner__tags {
    font-size: var(--fs-400);
    font-weight: 500;
    color: var(--color-white);
    text-transform: uppercase;
    margin: 0;
  }

  & .banner__quote {
    margin: 0;
    /* border-inline-start: 2px solid rgba(255, 255, 255, 0.35); */
    padding-inline-start: var(--space-3);

    p,
    cite {
      display: inline-block;
      width: min(100%, 34ch);
      font-family: var(--font-sans);
      font-style: italic;
      font-size: 1.1rem;
      color: var(--color-white);
      text-align: center;
    }

    /* cite {
      display: block;
      margin-top: var(--space-2);
      font-style: normal;
      color: var(--color-white);
    } */
  }

  & .banner__cta-inner {
    position: relative;
    display: grid;
    gap: var(--space-3);
    align-items: center;

    @media (min-width: 860px) {
      grid-template-columns: 1.4fr auto;
    }

    h2 {
      color: var(--color-white);
      font-size: clamp(1.35rem, 2vw + 1rem, 1.85rem);
      max-width: 40ch;
    }
  }

  & .banner__cta-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    .btn {
      width: 100%;
      justify-content: center;
    }
    .hero__note--light {
      width: fit-content;
    }
    @media (min-width: 860px) {
      align-items: center;
      /* text-align: right; */
    }
  }
}

/* ==========================================================================
   Eignung + Formular
   ========================================================================== */

.fit-form {
  display: grid;
  grid-template-columns: 100%;
  gap: var(--space-7);

  @media (min-width: 960px) {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-start: var(--space-4);
  li {
    position: relative;
    padding-inline-start: 1.75rem;
    color: var(--color-black);
    font-weight: 500;

    &::before {
      content: '✓';
      position: absolute;
      inset-inline-start: 0;
      top: 0;
      bottom: 0;
      margin-block: auto;
      width: 20px;
      aspect-ratio: 1/1;
      text-align: center;
      background-color: var(--color-rust);
      color: var(--color-white);
      border-radius: 50%;
      font-weight: 700;
    }
  }
}

.klaviyo-form {
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(27, 44, 66, 0.08);

  .go145647075.go145647075[role='radiogroup'] {
    display: grid;
    grid-template-columns: 1fr;
    @media (min-width: 480px) {
      grid-template-columns: 1fr 1fr;
    }
  }
  .go2561992891.go2561992891.go2561992891 {
    padding-inline: 0.5rem;
    text-wrap: balance;
    &::after {
      content: '→';
      display: inline-block;
      font-size: 1.5rem;
      margin-inline-start: 1ch;
    }
  }
  & input[id^='first_name_'].needsclick,
  & input[id^='last_name_'].needsclick,
  & input[id^='email_'].needsclick,
  & input[id^='phone_number_'].needsclick {
    box-sizing: border-box;
    width: 100%;
  }
  /* Mobile: alle Felder untereinander (Standard) */
  /* #first_name_01M4FWYNV09HYDHWD6P44F40GG,
  #last_name_01M4FWYNV3PJA9DNPJS0GGNHJK,
  #email_01M4FWYNVAT98FX1JV1HP76GAB,
  #phone_number_01M4FWYNVDMJNBN9135V701707 {
    box-sizing: border-box;
    width: 100%;
  } */
  /* & [data-testid='form-row']:has(#first_name_01M4FWYNV09HYDHWD6P44F40GG),
  & [data-testid='form-row']:has(#email_01M4FWYNVAT98FX1JV1HP76GAB) { */
  & [data-testid='form-row']:has(input[id^='first_name_'].needsclick),
  & [data-testid='form-row']:has(input[id^='email_'].needsclick) {
    display: block !important;
  }
  /* Ab 480px: Felder paarweise nebeneinander */
  @media (min-width: 480px) {
    /* & [data-testid='form-row']:has(#first_name_01M4FWYNV09HYDHWD6P44F40GG),
    & [data-testid='form-row']:has(#email_01M4FWYNVAT98FX1JV1HP76GAB) { */
    & [data-testid='form-row']:has(input[id^='first_name_'].needsclick),
    & [data-testid='form-row']:has(input[id^='email_'].needsclick) {
      display: flex !important;
    }
  }
}
/* ==========================================================================
   FAQ
   All .faq__x are children of <div class="wrap faq">, used once -> descendant.
   ========================================================================== */

.faq {
  display: grid;
  gap: var(--space-4);

  @media (min-width: 900px) {
    grid-template-columns: 0.7fr 1.3fr;
  }

  & .faq__heading {
    max-width: 30ch;
  }

  & .faq__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  & .faq__item {
    background: var(--color-cream);
    border-radius: var(--radius);
    /* border: 1px solid var(--color-border); */

    @media (prefers-reduced-motion: no-preference) {
      interpolate-size: allow-keywords;
    }
    &::details-content {
      opacity: 0;
      block-size: 0;
      overflow-y: clip;
      transition-property: content-visibility, opacity, block-size;
      transition-duration: 0.3s;
      transition-timing-function: ease;
      transition-behavior: allow-discrete;
    }
    &[open]::details-content {
      opacity: 1;
      block-size: auto;
    }

    summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-2);
      padding: 1rem 1.25rem;
      font-size: var(--fs-400);
      font-weight: 600;
      color: var(--color-navy);
      cursor: pointer;
      list-style: none;

      &::-webkit-details-marker {
        display: none;
      }
    }

    &[open] .faq__icon::before {
      content: '–';
    }

    .faq__icon {
      flex: none;
      color: var(--color-rust);
      font-weight: 700;
      font-size: 1.1rem;

      &::before {
        content: '+';
      }
    }

    .faq__answer {
      padding: 0 1.25rem 1.1rem;
      p {
        margin: 0;
        min-height: 1.4em;
        font-size: var(--fs-300);
        &:not(:last-child) {
          padding-block-end: var(--space-2);
        }
      }
    }
  }
}

/* ==========================================================================
   Footer
   All .site-footer__x are children of <footer class="site-footer">,
   used once -> descendant.
   ========================================================================== */

.site-footer {
  background: var(--color-cream);
  color: var(--color-black);
  padding-block: var(--space-4);
  .logo {
    width: min(225px, 80%);
  }
  & .site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* justify-content: space-between; */
    gap: var(--space-2);
  }

  & .site-footer__tagline {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-black);
    border-left: var(--color-border) 2px solid;
    padding-inline-start: var(--space-4);
  }

  & .site-footer__legal {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    margin-inline-start: auto;
    a:hover {
      color: var(--color-rust);
    }
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

.grid-container {
  display: grid;
  grid-template-columns: fit-content(80px) fit-content(120px) fit-content(80px);
  gap: 40px;
}
.divider {
  width: 2px;
  background-color: #ccc;
  margin-block: var(--space-1);
}
/* Setzt die vertikale Linie zwischen die Elemente */
.item + .item {
  /* border-left: 2px solid #ccc; */
  /* Verhindert, dass der Text direkt an der Linie klebt */
  padding-left: 40px;
  position: relative;
  &::before {
    content: '';
    display: inline-block;
    width: 2px;
    background-color: red;
    height: calc(100% - 2rem);
    position: absolute;
    left: 0px;
    margin-block: 1rem;
  }
}

/* Responsiv: Auf Smartphones untereinander statt nebeneinander */
@media (max-width: 500px) {
  .grid-container {
    grid-template-columns: fit-content(80px) fit-content(200px);
  }

  .item + .item + .item {
    /* padding-block-start: 40px; */
    padding-inline-start: 0;
    grid-column: 1/-1;
    justify-self: center;
    &::before {
      content: '';
      display: inline-block;
      width: calc(100% - 2rem);
      background-color: red;
      height: 2px;
      position: absolute;
      top: 0px;
      margin-inline: 1rem;
      margin-block: 0;
      display: none;
    }
  }
}

/* ==========================================================================
   ==========================================================================
   VIELEN-DANK-SEITE (vielen-dank.html)
   Alles unterhalb gehört ausschließlich zur Dankeseite. Header, Footer,
   .hero, .section, .btn, .rule, .eyebrow und .placeholder-image werden von
   index.html wiederverwendet und sind oben bereits definiert.
   ==========================================================================
   ========================================================================== */

.download,
.confirm {
  & .hero__lede,
  & .pdf_link {
    font-size: var(--fs-500);
  }
}
.sub_page {
  .wrap {
    width: min(100%, var(--sub-page-width));
  }
  & .hero__grid {
    @media (min-width: 960px) {
      grid-template-columns: 1fr 1fr;
      gap: var(--space-6);
    }
  }
}

/* ==========================================================================
   Next-Steps-Karte (weiße Karte im Hero, rechte Spalte)
   Alle .next-steps__x sind Kinder von <aside class="next-steps">, nur hier
   verwendet -> Descendant-Kombinator.
   ========================================================================== */

.next-steps {
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: 0 24px 48px rgba(10, 20, 30, 0.25);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;

  & h3 {
    margin: 0;
  }

  & .next-steps__body-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);

    @media (min-width: 640px) {
      flex-direction: row;
      align-items: flex-start;
      flex-wrap: wrap;
    }
  }

  & .next-steps__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
  }

  & .next-steps__item {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
  }

  & .next-steps__num {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 3rem;
    block-size: 3rem;
    border-radius: 50%;
    background: var(--color-rust);
    color: var(--color-white);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.5rem;
  }

  & .next-steps__body {
    h4 {
      margin: 0 0 var(--space-2);
      font-family: var(--font-sans);
      font-weight: 700;
      font-size: var(--fs-300);
      color: var(--color-navy);
    }

    p {
      margin: 0;
      font-size: var(--fs-200);
      color: var(--color-black);
    }
  }

  & .next-steps__visual {
    flex: none;
    width: min(100%, 220px);
    margin-inline: auto;

    @media (min-width: 640px) {
      /* margin-inline: 0; */
    }

    .placeholder-image--brochure {
      width: 100%;
    }
  }
}

/* ==========================================================================
   Tipp / optionales Angebot (Zweispalter mit Trennlinie)
   Eigene Komponente statt .intro-cols, da hier zwei gleichwertige,
   eigenständig überschriebene Spalten stehen statt "Lead + Content".
   ========================================================================== */

section:has(.tip-offer) {
  background-color: var(--color-cream);
}
.tip-offer {
  display: grid;
  gap: var(--space-5);
  align-items: start;

  @media (min-width: 860px) {
    grid-template-columns: 0.9fr auto 1.1fr;
    gap: var(--space-6);
  }

  & .tip-offer__icon {
    display: inline-flex;
    color: var(--color-rust);
    margin-bottom: var(--space-2);
  }

  & .tip-offer__tip {
    display: flex;
    gap: var(--space-4);
    .rule {
      margin-block-start: 0;
      margin-block-end: var(--space-5);
    }
    .column_right {
      margin-block-start: var(--space-6);
    }
  }
  & .tip-offer__offer {
    p {
      max-width: 48ch;
    }
  }

  & .tip-offer__divider {
    display: none;

    @media (min-width: 860px) {
      display: block;
      width: 1px;
      background: var(--color-border);
      height: 100%;
    }
  }

  & .tip-offer__offer {
    & .btn {
      margin-top: var(--space-2);
    }
  }
}

.download {
  .pdf_link {
    padding-bottom: var(--space-2);
    width: fit-content;
    svg {
      width: 20px;
      height: auto;
      fill: var(--color-white);
    }
    &:hover {
      color: var(--color-rust);
      svg {
        fill: var(--color-rust);
      }
    }
  }
}

.short_page {
  display: grid;
  min-height: 100dvh;
  grid-template-rows: auto 1fr auto;

  #top {
    height: 100%;
    flex-basis: 100%;

    background: unset;
  }

  .img_right {
    background: unset;
  }

  .site-footer {
    margin-top: auto;
  }
}
