/* Keep the portrait and the headline together in one full-width section. */
.pw.pw-home .pwh-hero {
  --hero-ink: #1a1b18;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  margin: 0;
  background: var(--hero-ink);
  color: #f7f5f0;
}
.pw.pw-home .pwh-hero-img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}
.pw.pw-home .pwh-intro {
  padding-block: clamp(22px, 4vw, 52px);
  background: transparent;
}
.pw.pw-home .pwh-intro-inner {
  max-width: 1180px;
  margin-inline: auto;
}
.pw.pw-home .pw-hero-title {
  font-size: clamp(30px, 4.3vw, 58px);
  line-height: 1.08;
  color: #f7f5f0;
}
.pw.pw-home .pw-hero-title em { color: #d8b77a; }
.pw.pw-home .pw-hero-support { color: #e1dfda; }
.pw.pw-home .pwh-intro :focus-visible { outline-color: #f7f5f0; }

@media (min-width: 860px) {
  .pw.pw-home .pwh-hero {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    padding-inline: max(0px, calc((100% - 1440px) / 2));
  }
  .pw.pw-home .pwh-hero-img {
    grid-area: 1 / 2;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 98%, transparent);
  }
  .pw.pw-home .pwh-intro { grid-area: 1 / 1; }
  .pw.pw-home .pwh-intro-inner { padding-inline: clamp(28px, 4vw, 64px) 18px; }
}

.pw .preview-mobile-home { display: none; }
@media (max-width: 1279px) {
  .pw .preview-mobile-home {
    display: inline-flex;
    gap: 5px;
    padding-inline: 7px;
    min-height: 44px;
    white-space: nowrap;
  }
  .pw .preview-mobile-home .pw-header-home-label { display: inline; }
}
.pw.pw-home #program-finder,
.pw.pw-home #program-finder .pwf-box {
  scroll-margin-top: 100px;
}

/* Keep program images proportional across the catalogue, finder and detail pages. */
.pw.pw-home .pwh-art-photo,
.pw.pw-home .pwh-art-photo[data-full-frame] {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #252624;
}
.pw.pw-home .pwh-art-photo img,
.pw.pw-home .pwh-art-photo[data-full-frame] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.pw.pw-home .pwr-photo img,
.pw.pw-home .pwr-photo[data-full-frame] img,
.pw-program .pwp-figure img,
.pw-program .pwp-figure[data-full-frame] img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}
.pw.pw-home .pwh-art-photo img[src*="/glute-"],
.pw.pw-home .pwr-photo img[src*="/glute-"],
.pw-program .pwp-figure img[src*="/glute-"] {
  object-position: center 72%;
}
.pw.pw-home .pwh-art-photo img[src*="/fit40-latziehen-"],
.pw.pw-home .pwr-photo img[src*="/fit40-latziehen-"],
.pw-program .pwp-figure img[src*="/fit40-latziehen-"] {
  object-position: center 58%;
}

/* Use one rhythm for comparable groups and keep the original mobile stacking. */
.pw.pw-home .pwgs-list,
.pw.pw-home .pwf-box {
  max-width: none;
}
.pw.pw-home .pwgs-link,
.pw.pw-home .pwf-opt span {
  height: 100%;
  letter-spacing: normal;
}
.pw.pw-home .pwgs-link,
.pw.pw-home .pwf-opt span,
.pw.pw-home .pwh-service-details,
.pw-program .pwp-facts > div {
  overflow-wrap: anywhere;
}
.pw-program .pwp-facts > div {
  flex: 1 1 9rem;
}
.pwv-stage {
  --clip-height: clamp(290px, 50dvh, 420px);
  gap: 14px;
}
.pwv-stage .pwv-main {
  max-width: min(100%, calc(var(--clip-height) * 9 / 16));
}
.pwv-stage .pwv-thumbs {
  max-width: 320px;
  gap: 12px;
}

@media (min-width: 700px) {
  .pw.pw-home [data-testid="group-digital"] .pwh-grid,
  .pw.pw-home .pwh-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
  }
  .pw.pw-home .pwh-service-grid {
    align-items: start;
  }
}

/* Keep individual coaching visually distinct from the four digital programs. */
.pw.pw-home .preview-coaching {
  border-top: 1px solid #e8e5df;
}
.pw.pw-home .preview-coaching .pwh-service-grid {
  align-items: stretch;
}
.pw .preview-coaching-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid #e8e5df;
  border-radius: 10px;
  min-width: 0;
}
.pw .preview-coaching-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
}
.pw .preview-coaching-card p {
  color: #4a4a46;
  margin: 0 0 5px;
}
.pw .preview-coaching-card .pw-btn {
  margin-top: auto;
  white-space: normal;
}
.pw.pw-home .pwr-photo {
  max-width: 440px;
}

/* Size the portrait and its frame together so the footer begins below both columns. */
.pw.pw-home .pwh-about {
  padding-block: clamp(32px, 5vw, 72px);
}
.pw.pw-home .pwh-about .pw-about {
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
}
.pw.pw-home .pwh-about .pw-portrait {
  width: min(100%, 410px);
  height: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  justify-self: start;
}
.pw.pw-home .pwh-about .pw-about-photo {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center top;
}
.pw.pw-home .pwh-about .pw-about > div:last-child {
  min-width: 0;
}
.pw .preview-live-home {
  margin-bottom: clamp(18px, 3vw, 34px);
}

@media (prefers-reduced-motion: no-preference) {
  .pw .pwh-intro-inner,
  .pw .pwp-hero-copy,
  .pw .plt-head,
  .pw .pwh-about .pw-about > div:last-child {
    animation: preview-content-enter 420ms ease-out both;
  }

  .pw .pwh-hero-img,
  .pw .pwp-figure img,
  .pw .pwh-about .pw-about-photo {
    animation: preview-image-enter 540ms ease-out both;
  }
}

@keyframes preview-content-enter {
  from { opacity: 0.72; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes preview-image-enter {
  from { opacity: 0.76; }
  to { opacity: 1; }
}

/* Handheld preview: keep the portrait, headline and primary action in one section. */
.pw.pw-home .pwh-hero-picture {
  display: block;
  min-width: 0;
}

@media (min-width: 860px) {
  .pw.pw-home .pwh-hero-picture { grid-area: 1 / 2; }
}

@media (max-width: 859px) {
  .pw.pw-home .pwh-hero-img {
    height: clamp(270px, 86vw, 480px);
    object-fit: cover;
    object-position: center 9%;
    mask-image: linear-gradient(to bottom, #000 77%, transparent);
  }

  .pw.pw-home .pwh-intro { padding-block: 4px 30px; }
  .pw.pw-home .pwh-intro-inner { padding-inline: clamp(20px, 6vw, 44px); }
  .pw.pw-home .pw-hero-title { font-size: clamp(33px, 10vw, 54px); }
  .pw.pw-home .pw-hero-support { max-width: 32ch; }
  .pw.pw-home .pw-hero-cta > a { width: 100%; max-width: 29rem; min-height: 50px; }
}

/* Keep the five goals balanced at every width. */
.pw.pw-home .pwf-opts.preview-finder-goals,
.pw.pw-home .pwgs-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.pw.pw-home .preview-finder-goals .pwf-opt span,
.pw.pw-home .pwgs-link {
  min-height: 54px;
  align-content: center;
}

@media (min-width: 620px) {
  .pw.pw-home .pwf-opts.preview-finder-goals,
  .pw.pw-home .pwgs-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pw.pw-home .preview-finder-goals > :last-child,
  .pw.pw-home .pwgs-list > :last-child { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  .pw.pw-home .pwf-opts.preview-finder-goals,
  .pw.pw-home .pwgs-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .pw.pw-home .preview-finder-goals > :last-child,
  .pw.pw-home .pwgs-list > :last-child { grid-column: auto; }
}

/* Use the existing calculator's discount values in a readable table. */
.pw .preview-live-rebates {
  margin: 16px 0 0;
  padding: 4px 16px;
  background: #252825;
  color: #f7f5f0;
  border-radius: 8px;
}
.pw .preview-live-rebates > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
}
.pw .preview-live-rebates > div + div { border-top: 1px solid #4c4d47; }
.pw .preview-live-rebates dd {
  margin: 0;
  color: #e2bc72;
  font-weight: 800;
  white-space: nowrap;
}
.pw .plt-field select { min-height: 50px; }

/* Show the shirt logo and shoulders in the original light. */
@media (max-width: 859px) {
  .pw.pw-home .pwh-hero-picture {
    width: min(72%, 330px);
    justify-self: center;
  }
  .pw.pw-home .pwh-hero-img {
    height: auto;
    aspect-ratio: 7 / 8;
    object-position: center top;
    mask-image: none;
    border-radius: 0 0 10px 10px;
  }
  .pw.pw-home .pwh-intro {
    padding-top: 18px;
  }
  .pw.pw-home .pw-hero-title {
    font-size: clamp(30px, 8.6vw, 48px);
  }
  .pw.pw-home .pw-hero-support {
    margin-block: 14px 0;
    line-height: 1.5;
  }
}

@media (max-width: 619px) {
  .pwv-stage {
    gap: 14px;
  }
  .pwv-stage .pwv-main,
  .pwv-stage .pwv-thumbs {
    max-width: none;
    min-width: 0;
  }
  .pwv-stage .pwv-main .pwv-frame {
    max-height: none;
  }
  .pwv-stage .pwv-thumbs {
    gap: 10px;
  }
  .pwv-stage .pwv-thumb {
    height: auto;
    max-height: none;
    aspect-ratio: 4 / 3;
  }
  .pwv-stage .pwv-thumb img {
    object-fit: cover;
    object-position: center 45%;
  }
  .pwv-stage .pwv-thumb-label {
    padding: 7px 5px;
    font-size: .72rem;
  }

  /* The header already contains the main navigation on mobile. */
  .pw .pw-footer {
    padding-block: 22px 16px;
  }
  .pw .pw-footer-grid {
    gap: 12px;
  }
  .pw .pw-footer .pw-logo.pw-logo-full {
    width: 152px;
  }
  .pw .pw-footer-contact {
    margin-top: 4px;
  }
  .pw .pw-footer-contact p {
    display: inline;
    margin: 0;
    font-size: .75rem;
    letter-spacing: normal;
  }
  .pw .pw-footer-contact p + p::before {
    content: " · ";
  }
  .pw .pw-footer-contact > a {
    display: flex;
    justify-content: center;
    min-height: 44px;
    font-size: .875rem;
    overflow-wrap: anywhere;
  }
  .pw .pw-footer-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 0;
    border-top: 1px solid #ffffff26;
  }
  .pw .pw-footer-link-group {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 0 16px;
    min-width: 0;
  }
  .pw .pw-footer-link-group:first-child,
  .pw .pw-footer-link-group a[data-testid="footer-contact"] {
    display: none;
  }
  .pw .pw-footer-link-group a {
    min-height: 44px;
    font-size: .8rem;
    text-align: center;
  }
  .pw .pw-footer-link-group a[data-testid="footer-withdrawal"] {
    flex-basis: 100%;
  }
  .pw .pw-footer-meta {
    gap: 0 8px;
  }
}
