/* Codex 67. Each change maps to B1–B5 in the delivery findings. */

/* B5: Give the existing promise enough weight below the unchanged headline. */
#start .hero-sub {
  max-width: 1000px;
  margin-inline: auto;
  font-size: clamp(1.625rem, 2.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

/* B1: Native anchor navigation, with the same eight destinations. */
.module-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 56px;
}
.module-index-label {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  font-size: 1.25rem;
}
.module-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #efe6f5;
  color: var(--ink);
  box-shadow: 0 5px 12px #26204412;
  font-size: 1.0625rem;
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease-out, transform .15s ease-out;
}
.module-index a svg { flex: 0 0 24px; color: var(--purple); }
.module-index a:hover { background: #e3d3ef; }
.module-index a:active { transform: scale(.97); }

/* B2: Alternating images and content; distinct full-width section surfaces. */
main > .section.module-story.feinschliff-modul {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 80px max(4vw, calc((100vw - 1326px) / 2));
  text-align: left;
  scroll-margin-top: 24px;
}
.feinschliff-modul:nth-of-type(even) { background: var(--white); }
.feinschliff-modul.module-wide { background: #efe6f5; }
.module-story.feinschliff-modul .module-copy {
  order: 0;
  align-self: center;
  width: 100%;
  max-width: 600px;
  margin: 0;
}
.module-story.feinschliff-modul .module-visual {
  display: block;
  order: 0 !important;
  margin: 0;
  min-width: 0;
}
.module-story.feinschliff-modul:nth-of-type(odd) .module-visual { order: 2 !important; }
.module-story.feinschliff-modul .modul-szene {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  object-fit: contain;
}
.module-story.feinschliff-modul .app-view {
  display: block;
  position: relative;
  min-height: 0;
  max-width: none;
  width: 90%;
  margin: -36px 0 0 auto;
  box-shadow: 0 12px 28px #26204419;
  border-radius: 12px;
}
.module-story.feinschliff-modul:nth-of-type(odd) .app-view { margin-inline: 0 auto; }
.module-story.feinschliff-modul .app-body { padding: 20px 24px 24px; }
.module-story.feinschliff-modul details { display: block; text-align: left; min-height: 0 !important; }
.module-story.feinschliff-modul h2 { text-wrap: balance; }
.module-story.feinschliff-modul .module-copy > p { margin-bottom: 24px; }

/* B3: Quiet, compact result summaries. Amount and currency stay together. */
.fall .fall-panel {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-content: center;
  gap: 8px 20px;
  min-height: 0;
  padding: 32px;
  background: var(--white);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 12px 28px #26204412;
}
.fall .fall-panel > img {
  grid-row: 1;
  grid-column: 1;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  box-shadow: none;
  object-fit: cover;
  object-position: center;
}
.fall.section .fall-panel .fall-wer {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.fall .fall-wer b { display: block; color: var(--ink); font-size: 1.25rem; }
.fall.section .fall-panel .fall-zahl {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  padding: 0;
  color: var(--purple);
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: normal;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fall.section .fall-panel .fall-was {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

/* B4: One connected sequence, with readable steps instead of six equal boxes. */
.workflow.ablauf-gross {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 7%;
}
.workflow.ablauf-gross > h2 {
  grid-column: auto;
  position: sticky;
  top: 40px;
  margin: 0;
  font-size: clamp(2.25rem, 3.6vw, 3.5rem);
  text-wrap: balance;
}
.workflow.ablauf-gross ol {
  display: block;
  position: relative;
  max-width: none;
}
.workflow.ablauf-gross ol::before {
  content: '';
  position: absolute;
  top: 24px;
  bottom: 100px;
  left: 23px;
  width: 2px;
  background: #e3d3ef;
}
.workflow.ablauf-gross li {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 52px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.workflow.ablauf-gross li:last-child { padding-bottom: 0; }
.workflow.ablauf-gross li .step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  background: #efe6f5;
  color: var(--purple);
  border-radius: 8px;
  font-size: 1.5rem;
  line-height: 1;
}
.workflow.ablauf-gross li > div { padding: 6px 0 0; }
.workflow.ablauf-gross h3 { margin: 0 0 12px; font-size: 1.625rem; line-height: 1.25; }
.workflow.ablauf-gross p { max-width: 58ch; }

@media (max-width: 900px) {
  .module-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-story.feinschliff-modul { gap: 32px; }
  .workflow.ablauf-gross { grid-template-columns: 1fr; gap: 40px; }
  .workflow.ablauf-gross > h2 { position: static; max-width: 650px; }
}
@media (max-width: 767px) {
  #start .hero-sub { font-size: 1.625rem; line-height: 1.3; margin-bottom: 30px; }
  .module-index { gap: 10px; padding-bottom: 40px; }
  .module-index a { padding: 14px 12px; gap: 9px; font-size: 1rem; min-height: 76px; }
  .module-index a svg { flex-basis: 20px; width: 20px; height: 20px; }
  main > .section.module-story.feinschliff-modul { grid-template-columns: 1fr; gap: 28px; padding: 48px 18px; }
  .module-story.feinschliff-modul .module-copy { order: -1; }
  .module-story.feinschliff-modul h2 { font-size: 2.25rem; }
  .module-story.feinschliff-modul .app-view { width: calc(100% - 20px); margin-top: -24px; }
  .module-story.feinschliff-modul .app-body { padding: 18px 16px; }
  .fall .fall-panel { padding: 24px; gap: 8px 16px; grid-template-columns: 64px minmax(0, 1fr); }
  .fall .fall-panel > img { width: 64px; height: 64px; }
  .fall.section .fall-panel .fall-zahl { font-size: clamp(2rem, 9.5vw, 3rem); margin-top: 16px; }
  .fall .fall-wer b { font-size: 1.125rem; }
  .fall.section .fall-panel .fall-wer { font-size: 1rem; }
  .workflow.ablauf-gross { gap: 36px; }
  .workflow.ablauf-gross li { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding-bottom: 36px; }
  .workflow.ablauf-gross li .step-number { width: 40px; height: 40px; font-size: 1.25rem; }
  .workflow.ablauf-gross ol::before { left: 19px; }
  .workflow.ablauf-gross h3 { font-size: 1.375rem; }
  .workflow.ablauf-gross.section p { font-size: 1.125rem; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  .module-index a { transition: none; }
}

/* B8: Keep names and roles beside their portraits without mobile overlap. */
@media (max-width: 900px) {
  .team-gross .team-karten article {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 4px 16px;
  }
  .team-gross .team-karten article > img,
  .team-gross .team-karten article > .team-ini {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 72px;
    height: 72px;
    margin: 0;
    font-size: 1.75rem;
  }
  .team-gross .team-karten article > h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0;
    font-size: 1.375rem;
  }
  .team-gross .team-karten article > .team-role {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
  }
  .team-gross .team-karten article > p:not(.team-role) {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 16px 0 0;
  }
}
