/* Page-opening hero system (2026-09-25). Loaded after styles.css / jobs-mobile-b / status-pages. */

:root {
  --detail-sidebar-width: 380px;
  --detail-column-gap: 48px;
  --page-hero-stack-gap: 28px;
  --page-hero-intro-max: 60ch;
  --page-hero-title-mobile: clamp(36px, 10.25vw, 48px);
  --page-hero-title-editorial-mobile: clamp(48px, 12.8vw, 56px);
}

/* Quiet wayfinding */
.hero-utility .breadcrumb,
.hero-detail .breadcrumb,
.hero-editorial-page .breadcrumb {
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.4;
}

/* Utility listing heroes — title, lead, counter on one left axis */
.hero-utility-grid {
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.hero-utility-title,
.hero-detail-title,
.hero-editorial-title {
  text-wrap: balance;
}

.hero-utility-title {
  margin-bottom: 12px;
}

.hero-utility-lead {
  margin-top: 0;
}

.hero-utility-counter {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
  white-space: normal;
}

.hero-utility-counter strong {
  font-size: inherit;
  font-weight: 600;
  letter-spacing: normal;
  font-feature-settings: normal;
  color: var(--color-text);
  line-height: inherit;
}

.hero-utility-counter span {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
  line-height: inherit;
  color: inherit;
}


/* Editorial (über uns) — top-aligned narrative split */
.hero-editorial-page .breadcrumb {
  margin-bottom: 28px;
}

.hero-editorial-grid {
  align-items: start;
  gap: clamp(40px, 6vw, 72px);
}

.hero-editorial-side {
  padding-bottom: 0;
}

/* Company / B2B detail — title + intro, facts strip below */
.hero-detail:not(.hero-detail--sidebar) .hero-detail-grid {
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--page-hero-stack-gap);
  padding-bottom: 40px;
}

.hero-detail:not(.hero-detail--sidebar) .hero-detail-lead {
  max-width: var(--page-hero-intro-max);
}

.hero-detail:not(.hero-detail--sidebar) .hero-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
  padding: 20px 0 0;
  background: transparent;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--color-hairline-strong);
}

.hero-detail:not(.hero-detail--sidebar) .hero-detail-meta > div {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero-detail:not(.hero-detail--sidebar) .hero-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .hero-detail:not(.hero-detail--sidebar) .hero-detail-meta {
    grid-template-columns: 1fr;
  }
}

/* Functional job detail — sidebar aligned with apply column */
body.cta-job-detail .hero-detail-grid {
  grid-template-columns: minmax(0, 1fr) var(--detail-sidebar-width);
  gap: var(--detail-column-gap);
  align-items: start;
}

body.cta-job-detail .job-detail-grid {
  grid-template-columns: minmax(0, 1fr) var(--detail-sidebar-width);
  gap: var(--detail-column-gap);
}

body.cta-job-detail .hero-detail-label {
  display: none;
}

@media (max-width: 900px) {
  body.cta-job-detail .hero-detail-grid,
  body.cta-job-detail .job-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Application heroes — compact split, no redundant eyebrow */
body.cta-no-float .hero-detail--sidebar .hero-detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 32px;
  align-items: start;
}

body.cta-no-float #bw-label {
  display: none;
}

@media (max-width: 900px) {
  body.cta-no-float .hero-detail--sidebar .hero-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Follow-on intro — tighter rhythm after stacked heroes */
section.hero-detail:not(.hero-detail--sidebar) + section.page-intro {
  padding-top: clamp(48px, 5vw, 72px);
}

section.hero-detail.hero-tochter + section.tochter-visual + section.page-intro {
  padding-top: clamp(48px, 5vw, 72px);
}

[data-page="fuer-unternehmen"] .page-intro-grid {
  gap: clamp(32px, 5vw, 56px);
}

/* Homepage — keep media hero; no structural change */
.hero-detail--sidebar .hero-detail-grid {
  align-items: start;
}

.hero-detail--sidebar .hero-detail-grid > * {
  min-width: 0;
}

/* Utility heroes — tighter gap to first content block (not jobs filter journey) */
body:not(.jobs-index) section.hero-utility + section {
  padding-top: 48px;
}

@media (max-width: 720px) {
  body:not(.page-status):not(.jobs-index) .hero-utility {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  body:not(.page-status):not(.jobs-index) .hero-utility .breadcrumb {
    margin-bottom: 12px;
  }

  body:not(.page-status):not(.jobs-index) .hero-utility-title {
    font-size: var(--page-hero-title-mobile);
    line-height: 1.08;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    text-wrap: pretty;
  }

  body:not(.page-status):not(.jobs-index) .hero-utility-lead {
    font-size: 16px;
    line-height: 1.55;
  }

  body:not(.page-status):not(.jobs-index) .hero-utility-grid {
    gap: 12px;
  }

  body:not(.jobs-index) section.hero-utility + section {
    padding-top: 32px;
  }
}

/* Keep the established compact mobile journey when desktop columns collapse. */
@media (max-width: 720px) {
  body.cta-job-detail .hero-detail-grid { gap: 16px; }
  body.cta-job-detail .job-detail-grid { gap: 24px; }
  body.cta-no-float .hero-detail--sidebar .hero-detail-grid { gap: 10px; }
}

/* Shared reading rhythm, with dedicated compact application/job rules above. */
.hero-detail--sidebar .hero-detail-meta { margin: 0; }
@media (max-width: 720px) {
  .hero-detail:not(.hero-detail--sidebar) { padding-top: 24px; }
  .hero-detail:not(.hero-detail--sidebar) .hero-detail-grid { gap: 20px; padding-bottom: 24px; border-bottom: 0; }
  .hero-detail:not(.hero-detail--sidebar) .hero-detail-title {
    font-size: var(--page-hero-title-mobile);
    line-height: 1.08;
    margin-bottom: 12px;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    text-wrap: pretty;
  }
  body.cta-no-float .hero-detail--sidebar .hero-detail-title {
    font-size: var(--page-hero-title-mobile);
    line-height: 1.08;
  }
  .hero-detail:not(.hero-detail--sidebar) .hero-detail-lead { font-size: 16px; }
  .hero-editorial-page { padding: 24px 0 32px; }
  .hero-editorial-page .breadcrumb { margin-bottom: 16px; }
  .hero-editorial-grid { gap: 20px; }
  .hero-editorial-title {
    font-size: var(--page-hero-title-editorial-mobile);
    line-height: 1.06;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    text-wrap: pretty;
  }
  .hero-editorial-side { gap: 20px; }
  .hero-editorial-lead { border-left: 0; padding-left: 0; font-size: 16px; }
  .hero-editorial-stamps { padding-top: 16px; }
}
