/* Fallstudie Autohaus Herrmann (/fallstudien): Teile, die nur diese Seite hat
 * (Ergebnis-Leiste, Messprotokoll, Projektverlauf, Bausteine). Kopf, Geräte-
 * Bühne und Story kommen aus case-study.css.
 * Alles ist unter .hc gekapselt. fallstudie-herrmann.js setzt .hc--live
 * (Bewegung erlaubt) und .hc--pin (angeheftetes Messprotokoll auf großen
 * Bildschirmen) und schreibt Fortschritt in CSS-Variablen (--p, --k,
 * --fill). Ohne JS oder mit reduzierter Bewegung bleibt alles statisch und
 * vollständig sichtbar: Die Endwerte stehen im HTML. */

.case-page .page-wrapper {
  overflow: clip; /* sticky Messprotokoll braucht clip statt hidden */
}

.hc {
  --g: var(--ogency-base);
  --g-rgb: var(--ogency-base-rgb);
  --ink: var(--ogency-black);
  --ink2: var(--ogency-black2);
  --ink3: var(--ogency-black3);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --muted: rgba(255, 255, 255, .72);
  --quiet: rgba(255, 255, 255, .58);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.4, 0, .2, 1);
  background: var(--ink);
  color: var(--ogency-white);
}

.hc section {
  position: relative;
}

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

/* Gemeinsame Typografie ------------------------------------------------- */

.hc-h2 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(32px, 3.6vw, 54px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.hc-lead {
  max-width: 54ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.75;
}

.hc-link {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--g);
  color: var(--ogency-white);
  font-weight: 700;
  transition: color .3s ease;
}

.hc-link:hover,
.hc-link:focus-visible {
  color: var(--g);
}

.hc a:focus-visible,
.hc .ogency-btn:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 3px;
}

/* Zweispaltiges Grundraster: Kopf links (angeheftet), Inhalt rechts */
.hc-split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
}

.hc-head--sticky {
  position: sticky;
  top: 130px;
}

/* Headline steigt aus der eigenen Box (wie .ev2-rise) */
.hc--live .hc-rise {
  transition: clip-path 1000ms var(--ease), translate 1000ms var(--ease);
}

.hc--live .hc-rise:not(.is-in) {
  clip-path: inset(0 0 100% 0);
  translate: 0 .4em;
}

/* Leiser Einstieg für Inhaltsblöcke */
.hc--live .hc-fade {
  transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.hc--live .hc-fade:not(.is-in) {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}

/* Ergebnis-Leiste unter dem Seitenkopf ----------------------------------- */
.hc-hero--readout {
  padding: 0 0 clamp(70px, 8vw, 100px);
  background: var(--ink);
}

.hc .kc-intro {
  padding-bottom: clamp(80px, 9vw, 120px);
}

.hc-hero--readout {
  padding-top: clamp(8px, 2vw, 24px);
}

.hc-hero--readout .hc-readout {
  margin-top: 0;
}

.hc-hero--readout .hc-source {
  padding-bottom: 0;
}

/* Story-Abstand und Geräte-Ebene der gemeinsamen Fallstudien-Bühne */
.hc .kc-story {
  padding-top: clamp(90px, 10vw, 140px);
  border-top: 1px solid var(--line);
}

.kc-stage__phone--device img {
  width: 100%;
  filter: drop-shadow(-14px 24px 30px rgba(0, 0, 0, .65));
}

/* Ergebnis-Leiste am Fuß des Heros */
.hc-readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(40px, 6vh, 64px) 0 0;
  border-top: 1px solid var(--line-strong);
}

.hc-reading {
  position: relative;
  padding: 26px 24px 30px 0;
}

.hc-reading + .hc-reading {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.hc-reading::before {
  /* Goldstrich zieht über die obere Kante, sobald gezählt wird */
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--g);
  transform-origin: 0 50%;
}

.hc--live .hc-reading::before {
  transition: transform 1400ms var(--ease);
  transition-delay: calc(var(--i, 0) * 140ms + 700ms);
}

.hc--live .hc-hero:not(.is-in) .hc-reading::before {
  transform: scaleX(0);
}

.hc-reading dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.hc-reading dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 10px 0 0;
}

.hc-reading__num {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}

.hc-reading__before {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 600;
}

.hc-reading--zero .hc-reading__num {
  color: var(--g);
}

.hc-source {
  max-width: 88ch;
  margin: 0;
  padding: 0 0 clamp(70px, 9vw, 110px);
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.65;
}

/* Ausgangslage ------------------------------------------------------------ */
.hc-brief {
  padding: clamp(90px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
  background: var(--ink2);
}

.hc-brief__item {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.hc-brief__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.hc-brief__item h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.hc-brief__item p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.hc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hc-list li {
  position: relative;
  padding: 0 0 0 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hc-list li + li {
  margin-top: 10px;
}

.hc-list li::before {
  content: "";
  position: absolute;
  top: .78em;
  left: 0;
  width: 12px;
  height: 1px;
  background: var(--g);
}

/* Projektsteckbrief */
.hc-sheet {
  margin: 34px 0 0;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--g);
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(var(--g-rgb), .16);
}

.hc-sheet__title {
  margin: 0 0 16px;
  color: var(--ogency-white);
  font-size: 16px;
  font-weight: 700;
}

.hc-sheet div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.hc-sheet dt {
  color: var(--g);
  font-size: 14px;
  font-weight: 700;
}

.hc-sheet dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Umsetzung: vier Bausteine -------------------------------------------- */
.hc-build {
  padding: clamp(90px, 10vw, 140px) 0;
  background: var(--ink);
}

.hc-build__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(40px, 6vw, 110px);
  align-items: end;
  margin-bottom: clamp(44px, 6vw, 72px);
}

.hc-build__head .hc-lead {
  margin: 0;
}

.hc-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.hc-block {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 22px;
  padding: 38px 36px 40px 0;
  border-bottom: 1px solid var(--line);
}

.hc-block:nth-child(even) {
  padding-right: 0;
  padding-left: 36px;
  border-left: 1px solid var(--line);
}

.hc-block__icon {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--g);
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.hc--live .hc-block__icon * {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1200ms var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms + 200ms);
}

.hc--live .hc-block:not(.is-in) .hc-block__icon * {
  stroke-dashoffset: 1;
}

.hc-block h3 {
  margin: 4px 0 14px;
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
}

/* Messprotokoll (Signature) ------------------------------------------- */
.hc-report {
  --p: 1;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / calc(100% / 6) 100%,
    var(--ink2);
  background-position: calc(50% + .5px) 0, 0 0;
}

.hc-report__sticky {
  padding: clamp(90px, 10vw, 140px) 0;
}

.hc--pin .hc-report {
  height: 260vh;
}

.hc--pin .hc-report__sticky {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 96px 0 36px;
}

.hc-report__sticky > .container {
  width: 100%;
}

.hc-report__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(40px, 6vw, 110px);
  align-items: end;
  margin-bottom: clamp(28px, 4vh, 48px);
}

.hc-report__head .hc-lead {
  margin: 0;
  font-size: 16px;
}

.hc-protocol {
  border: 1px solid var(--line);
  background: rgba(5, 5, 6, .72);
  box-shadow: inset 0 1px 0 rgba(var(--g-rgb), .16), 0 50px 90px -40px #000;
}

.hc-protocol__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
}

.hc-protocol__title {
  margin: 0;
  color: var(--ogency-white);
  font-size: 14px;
  font-weight: 700;
}

.hc-protocol__axis {
  display: flex;
  flex: 1 1 320px;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hc-protocol__track {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.hc-protocol__track i {
  position: absolute;
  inset: 0;
  background: var(--g);
  transform: scaleX(var(--p));
  transform-origin: 0 50%;
}

.hc-protocol__track i::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 0 4px rgba(var(--g-rgb), .18);
  transform: scaleX(calc(1 / max(var(--p), .01)));
}

.hc-protocol__rows {
  margin: 0;
  padding: 6px 28px;
}

.hc-row {
  --k: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.95fr);
  gap: 24px;
  align-items: center;
  padding: 18px 0;
}

.hc--pin .hc-row {
  padding: 13px 0;
}

.hc-row + .hc-row {
  border-top: 1px solid var(--line);
}

.hc-row dt {
  color: var(--ogency-white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.hc-row dt span {
  display: block;
  color: var(--quiet);
  font-size: 13px;
  font-weight: 600;
}

.hc-row dd {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 82px;
  grid-template-areas:
    "num bar delta"
    "before bar delta";
  column-gap: 22px;
  align-items: center;
  margin: 0;
}

.hc-row__num {
  grid-area: num;
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hc-row__before {
  grid-area: before;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 600;
}

/* Balken: Ausgangswert als Marke, Gold wächst bis zum Endwert (100 %) */
.hc-row__bar {
  grid-area: bar;
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, .06);
}

.hc-row__bar i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ogency-base-dark), var(--g) 70%, var(--ogency-base-light));
  transform: scaleX(calc(var(--r) + (1 - var(--r)) * var(--k)));
  transform-origin: 0 50%;
}

.hc-row__bar b {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: calc(var(--r) * 100%);
  width: 1px;
  background: var(--ogency-white);
}

.hc-row__delta {
  grid-area: delta;
  color: var(--g);
  font-size: 16px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hc-protocol__note {
  margin: 0;
  padding: 14px 28px 16px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.6;
}

/* Projektverlauf -------------------------------------------------------- */
.hc-course {
  padding: clamp(90px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
  background: var(--ink);
}

.hc-course__list {
  --fill: 1;
  position: relative;
  margin: 0;
  padding: 0 0 0 46px;
  list-style: none;
}

.hc-course__list::before,
.hc-course__list::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 1px;
  background: var(--line-strong);
}

.hc-course__list::after {
  background: var(--g);
  transform: scaleY(var(--fill));
  transform-origin: 50% 0;
}

.hc-mile {
  position: relative;
  padding: 0 0 46px;
}

.hc-mile:last-child {
  padding-bottom: 0;
}

.hc-mile::before {
  /* Knoten auf der Linie */
  content: "";
  position: absolute;
  z-index: 1;
  top: 5px;
  left: -46px;
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink);
  transition: border-color .5s var(--ease), background-color .5s var(--ease), box-shadow .5s var(--ease);
}

.hc-mile.is-reached::before,
.hc:not(.hc--live) .hc-mile::before {
  border-color: var(--g);
  background: var(--g);
  box-shadow: 0 0 0 5px rgba(var(--g-rgb), .16);
}

.hc-mile__when {
  display: block;
  color: var(--g);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.hc-mile h3 {
  margin: 6px 0 10px;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.hc-mile p {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hc--live .hc-mile h3,
.hc--live .hc-mile p {
  transition: color .5s var(--ease);
}

.hc--live .hc-mile:not(.is-reached) h3 {
  color: var(--muted);
}

.hc--live .hc-mile:not(.is-reached) p {
  color: var(--quiet);
}

/* Kundenstimme und Learnings ------------------------------------------- */
.hc-voice {
  padding: clamp(90px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
  background: var(--ink2);
}

.hc-voice__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
}

.hc-quote {
  margin: 0;
}

.hc-quote blockquote {
  margin: 0;
}

.hc-quote blockquote p {
  margin: 0;
  color: var(--ogency-white);
  font-size: clamp(26px, 2.7vw, 40px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.03em;
  text-wrap: pretty;
}

.hc-quote figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.hc-quote figcaption::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--g);
}

.hc-learn__title {
  margin: 0 0 22px;
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.hc-learn__next {
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hc-learn__next strong {
  color: var(--ogency-white);
}

/* Abschluss ------------------------------------------------------------ */
.hc-cta {
  padding: clamp(90px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 70% at 20% 60%, rgba(var(--g-rgb), .07), transparent 70%),
    var(--ink);
}

.hc-cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}

.hc-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  margin-top: 36px;
}

.hc-next {
  position: relative;
  display: block;
  color: var(--ogency-white);
}

.hc-next__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
}

.hc-next__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 900ms var(--ease);
}

.hc-next__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 5, 6, .85));
}

.hc-next__label {
  display: block;
  margin-top: 20px;
  color: var(--g);
  font-size: 14px;
  font-weight: 700;
}

.hc-next__title {
  display: block;
  margin-top: 6px;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
  transition: color .3s ease;
}

.hc-next:hover .hc-next__media img,
.hc-next:focus-visible .hc-next__media img {
  transform: scale(1.04);
}

.hc-next:hover .hc-next__title,
.hc-next:focus-visible .hc-next__title {
  color: var(--g);
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1199px) {
  .hc-row dd {
    grid-template-columns: 96px minmax(0, 1fr) 74px;
    column-gap: 16px;
  }
}

@media (max-width: 991px) {

  .hc-split,
  .hc-build__head,
  .hc-report__head,
  .hc-voice__grid,
  .hc-cta__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hc-head--sticky {
    position: static;
  }

  .hc-readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hc-reading:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .hc-reading:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .hc-reading:nth-child(n+3)::before {
    display: none;
  }

  .hc-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .hc-next {
    max-width: 560px;
  }
}

@media (max-width: 767px) {
  .hc-blocks {
    grid-template-columns: minmax(0, 1fr);
  }

  .hc-block,
  .hc-block:nth-child(even) {
    padding: 30px 0;
    border-left: 0;
  }

  .hc-protocol__bar,
  .hc-protocol__rows,
  .hc-protocol__note {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hc-protocol__axis {
    max-width: none;
  }

  .hc-row dd {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "num delta"
      "before before"
      "bar bar";
    row-gap: 6px;
  }

  .hc-row__bar {
    margin-top: 6px;
  }

  .hc-sheet {
    padding: 22px 20px;
  }

  .hc-sheet div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (max-width: 575px) {

  .hc-reading,
  .hc-reading + .hc-reading {
    padding: 20px 12px 22px 0;
  }

  .hc-reading:nth-child(even) {
    padding-left: 14px;
  }

  .hc-reading__num {
    font-size: 38px;
  }

  .hc-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .hc-quote blockquote p {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc *,
  .hc *::before,
  .hc *::after {
    transition: none !important;
  }
}
