/* Balance headings without changing their type scale or section layout. */
main :is(h2, h3), .contact-section__note { text-wrap: balance; }
main :is(p, dd, li) { text-wrap: pretty; }
#responsibility-mosaic-title br { display: none; }
.candidate-title-accent { white-space: nowrap; }

/* Shared compact-screen rhythm. Desktop composition stays in its existing stylesheets. */
@media (max-width: 1100px) {
  :root {
    --gutter: clamp(20px, 3.125vw, 32px);
    --compact-h2: clamp(34px, calc(20.8px + 3vw), 54px);
    --compact-h3: clamp(23px, calc(18px + 1.2vw), 30px);
    --compact-label: clamp(16px, 1.8vw, 19px);
    --compact-body: clamp(16px, calc(14px + .35vw), 18px);
    --compact-space: clamp(64px, 7vw, 80px);
    --compact-gap: clamp(32px, 4vw, 44px);
    --compact-padding: clamp(22px, 3vw, 30px);
    --compact-cut: 30px;
  }

  html[lang] :is(#client-trust-title, #audiences-title, #responsibility-mosaic-title,
    #reviews-title, #conversation-cta-title, #candidate-title, #about-intro-title, #contact-title) {
    font-size: var(--compact-h2);
    line-height: 1.1;
    letter-spacing: -.05em;
  }

  :is(.client-trust__label, .reviews__label, .solutions-label,
    .candidates .small-label, .candidate-path-label, .contact-section__label,
    .contact-section__email-label, .contact-section__social-label, .contact-section__talk-label) {
    font-size: var(--compact-label);
    line-height: 1.35;
  }
  html.services-v2 .solutions-label { font-size: var(--compact-label); }
  :is(.solution-copy h3, .responsibility-mosaic__card h3, .candidate-path-card h3,
    .about-intro__story h3, .contact-section__note) {
    font-size: var(--compact-h3);
    line-height: 1.15;
    letter-spacing: -.035em;
  }
  html.services-v2 .solution-copy h3 { font-size: var(--compact-h3); line-height: 1.15; }
  :is(.responsibility-mosaic__card p, .candidates .candidate-path-intro,
    .candidate-path-benefits, .about-intro__body, .contact-section__intro) {
    font-size: var(--compact-body);
    line-height: 1.5;
  }

  .header, .header.is-scrolled { margin-inline: 0; padding-inline: var(--gutter); }
  .hero { padding-inline: var(--gutter); }
  .hero-support { margin-top: 32px; }
  .hero-bottom { margin-top: 40px; }

  :is(.responsibility-mosaic, .conversation-cta, .about-intro, .contact-section, .candidate-stage) {
    padding: var(--compact-space) var(--gutter);
  }
  html.services-v2 .business-solutions { padding-block: var(--compact-space); }
  .client-trust { --logo-size: clamp(232px, 36vw, 320px); padding-bottom: var(--compact-space); }
  .client-trust__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-top: var(--compact-space); margin-bottom: var(--compact-gap); }
  .client-trust__intro h2 { width: 100%; max-width: 24ch; margin: 0; text-align: left; }
  .client-trust__tile { padding: 28px; }
  .client-trust__logo { width: 86%; height: 136px; }
  .client-trust__tile--tall .client-trust__logo { height: 176px; }

  html.services-v2 .solutions-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 0 var(--gutter) var(--compact-gap); }
  html.services-v2 .solutions-label { order: -1; margin: 0; }
  html.services-v2 #audiences-title { width: 100%; max-width: 24ch; }
  html[lang="de"] #audiences-title { hyphens: auto; overflow-wrap: anywhere; }
  html.services-v2 .solutions-grid { grid-template-columns: 1fr; gap: 24px; --card-cut: var(--compact-cut); }
  html.services-v2 .solution-card { display: grid; grid-template-columns: minmax(100px, 20%) minmax(0, 1fr); align-items: center; min-height: 0; height: auto; gap: 28px; padding: var(--compact-padding); }
  html.services-v2 .solution-card .solution-visual { width: 100%; min-height: 0; margin: 0; align-items: center; }
  html.services-v2 .solution-copy { min-width: 0; }
  html.services-v2 .solution-copy > p { margin-top: 16px; font-size: var(--compact-body); line-height: 1.5; }
  html.services-v2 .solution-cta { position: static; margin-top: 24px; padding-top: 16px; font-size: 20px; line-height: 1.3; }
  html.services-v2 .solution-cta .icon { width: 26px; height: 26px; }

  .responsibility-mosaic__heading { position: static; gap: 22px; margin-bottom: var(--compact-gap); }
  .responsibility-mosaic__heading h2 { max-width: 24ch; }
  .responsibility-mosaic__grid { gap: 24px; }
  .responsibility-mosaic__card { --cut: var(--compact-cut); min-height: 0; padding: var(--compact-padding); }
  .responsibility-mosaic__card p, .responsibility-mosaic__card--start p { margin-top: 16px; }
  .responsibility-mosaic__card--start { width: 100%; }

  /* Touch reviews: content-height section, native horizontal scrolling, no pinned scene. */
  .reviews { height: auto; }
  .reviews__stage { position: relative; top: auto; height: auto; min-height: 0; overflow: visible; }
  .reviews__content { display: block; height: auto; padding: var(--compact-space) var(--gutter); pointer-events: auto; }
  .reviews__intro { max-width: 680px; padding: 0; margin-bottom: var(--compact-gap); }
  .reviews__intro h2 { margin-top: 22px; }
  .reviews__center, .reviews__symbol-fallback, .reviews__progress { display: none; }
  .reviews__deck { display: flex; gap: 24px; width: calc(100% + var(--gutter)); height: auto; min-height: 0; padding: 0 var(--gutter) 16px 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: 0; overscroll-behavior-x: contain; touch-action: auto; -webkit-mask-image: none; mask-image: none; scrollbar-width: thin; scrollbar-color: #a2afb8 transparent; }
  .reviews__deck:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
  .reviews__card, .reviews__card.is-active { --cut: var(--compact-cut); position: relative; inset: auto; flex: 0 0 calc((100% - 24px) / 2); width: auto; height: auto; min-height: 330px; padding: var(--compact-padding); gap: 28px; transform: none; opacity: 1; transition: none; will-change: auto; scroll-snap-align: start; }
  .reviews__logo { width: 160px; height: 58px; }
  .reviews__logo img { max-width: 160px; max-height: 58px; }
  .reviews__quote { margin: 0; font-size: clamp(20px, 2.5vw, 24px); line-height: 1.3; text-wrap: pretty; }
  .reviews__attribution { margin-top: auto; font-size: 16px; line-height: 1.5; }

  .conversation-cta { --cut: var(--compact-cut); }
  .conversation-cta__layout { gap: 24px; }
  .conversation-cta__message, .conversation-cta__button { height: auto; min-height: 0; padding: var(--compact-padding); }
  .conversation-cta__message-copy, .conversation-cta__button-copy { gap: 24px; }
  .conversation-cta__action { font-size: var(--compact-h3); line-height: 1.15; }
  .conversation-cta__arrow { --arrow-size: 48px; }

  .candidates .candidate-copy { gap: var(--compact-gap); }
  .candidates .candidate-heading { width: 100%; max-width: 960px; margin: 0; text-align: left; }
  .candidates .candidate-copy h2 { margin-top: 22px; }
  .candidate-paths { width: 100%; gap: 24px; }
  .candidate-path-card { --path-cut: var(--compact-cut); gap: 28px; padding: var(--compact-padding); }
  .candidate-path-card h3 { margin-bottom: 16px; }
  .candidate-path-benefits li + li { margin-top: 12px; }
  .candidates .candidate-button { margin-top: 0; padding-top: 16px; font-size: 20px; line-height: 1.3; }
  .candidate-button > .icon { width: 26px; height: 26px; }

  .about-intro { --cut: var(--compact-cut); }
  .about-intro__grid { gap: var(--compact-gap) 24px; }
  .about-intro__photo { aspect-ratio: 3.5 / 1; margin-bottom: 0; }
  .about-intro__head { gap: 22px; }
  .about-intro__story-card { min-height: 0; padding: var(--compact-padding); gap: 16px; }
  .about-intro__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .about-intro__facts > div { min-height: 0; padding: var(--compact-padding); row-gap: 20px; }
  .about-intro__facts dd { font-size: 20px; line-height: 1.3; }
  .about-intro__cta { justify-self: start; font-size: 20px; }

  .contact-section { gap: var(--compact-gap); }
  .contact-section__copy { width: 100%; max-width: 680px; margin: 0; }
  .contact-section__label { margin-bottom: 22px; }
  .contact-section__intro { margin-top: 16px; }
  .contact-section__mosaic { gap: 24px; grid-template-rows: 58px auto auto auto 58px; }
  .contact-section__tile { min-height: 0; padding: var(--compact-padding); gap: 24px; }
  .contact-section__email { min-height: 200px; }
  .contact-section__email-label { margin-top: 0; }
  .contact-section__email-address { margin-top: 0; font-size: 22px; }
  .contact-section__talk { margin: 0; }
  .contact-section__photo--main { width: 100%; height: 100%; min-height: 280px; margin: 0; }
  .contact-section__photo--small { height: 150px; width: 100%; margin: 0; }
  .contact-section__social-chip { margin: 0; font-size: 16px; min-height: 58px; }

  .site-footer__group { gap: 16px; font-size: 16px; }
  .site-footer__nav { gap: 32px 24px; }
  .site-footer__grid { padding-bottom: 32px; }
  .site-footer__link { max-width: 100%; overflow-wrap: anywhere; }
  .site-footer__label { font-size: 13px; }
  .site-footer__base { font-size: 13px; }
  .site-footer__address { font-size: 16px; }
  :is(.site-footer__group, .candidate-heading, .candidate-path-summary, .contact-section__copy) { min-width: 0; }
  :is(.candidate-path-summary, .about-intro__body, .about-intro__facts dd, .contact-section__intro) { overflow-wrap: break-word; }
  html[lang="de"] :is(.solution-copy h3, .candidate-path-summary h3, .about-intro__facts dd) { hyphens: auto; }
  .candidate-field input { font-size: 16px; }
  .candidate-dialog h2 { font-size: var(--compact-h3); line-height: 1.15; }
  .candidate-field { max-width: 100%; }
}

@media (max-width: 1040px) {
  .mobile-nav { padding-inline: var(--gutter); }
  .mobile-services-trigger, .mobile-service-link .service-title { font-size: 18px; }
  .mobile-direct-links a, .mobile-contact { font-size: 18px !important; }
  .mobile-service-link .service-description { font-size: 16px; line-height: 1.5; }
}

@media (max-width: 900px) {
  .conversation-cta__layout { grid-template-columns: 1fr; }
  .candidate-paths { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .conversation-cta__title-lines br { display: none; }
  main :is(h1, h2, h3, p, dd, dt),
  .client-trust__intro, .solutions-intro, .candidate-heading, .about-intro__head,
  .contact-section__copy, .site-footer__group { text-align: left; }
  .client-trust__logo { height: 112px; }
  .client-trust__tile--tall .client-trust__logo { height: 144px; }
  .responsibility-mosaic__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .responsibility-mosaic__card--understand, .responsibility-mosaic__card--start { grid-column: 1 / -1; }
  .reviews__card, .reviews__card.is-active { flex-basis: 86%; min-height: 0; }
  .about-intro__photo { aspect-ratio: 2 / 1; }
  .about-intro__facts { grid-template-columns: 1fr; }
  .about-intro__facts > div { padding: var(--compact-padding); }
  .site-footer__fallback, .site-footer.has-particles .site-footer__fallback { width: calc(100% - var(--gutter) * 2); }
}

@media (max-width: 600px) {
  html.services-v2 .solution-card { grid-template-columns: 72px minmax(0, 1fr); gap: 20px; }
  html.services-v2 .solution-copy { display: contents; }
  html.services-v2 .solution-card .solution-visual { grid-column: 1; grid-row: 1; }
  html.services-v2 .solution-card .solution-visual svg { width: 72px; }
  html.services-v2 .solution-copy h3 { grid-column: 2; grid-row: 1; padding: 0; }
  html.services-v2 .solution-copy > p { grid-column: 1 / -1; margin: 0; }
  html.services-v2 .solution-cta { grid-column: 1 / -1; margin: 4px 0 0; font-size: 18px; }
  .responsibility-mosaic__grid { grid-template-columns: 1fr; }
  .responsibility-mosaic__card { grid-column: 1; }
  .conversation-cta__bottom { align-items: center; }
  .candidates .candidate-button { font-size: 18px; }
  .candidate-stage, .contact-section { padding-block: var(--compact-space); }
  .contact-section__mosaic { grid-template-columns: 1fr; grid-template-rows: auto; }
  .contact-section__email { grid-column: 1; grid-row: 2; min-height: 180px; margin: 0; }
  .contact-section__photo--main { grid-column: 1; grid-row: 3; height: 200px; min-height: 0; width: 100%; margin: 0; }
  .contact-section__photo--small { grid-column: 1; grid-row: 6; height: 150px; width: 100%; margin: 0; }
  .contact-section__talk { grid-column: 1; grid-row: 5; margin: 0; }
  .contact-section__social-label { grid-column: 1; grid-row: 7; margin: 8px 0 0; }
  .contact-section__social-chip--facebook { grid-column: 1; grid-row: 1; }
  .contact-section__social-chip--linkedin { grid-column: 1; grid-row: 4; }
  .contact-section__social-chip--instagram { grid-column: 1; grid-row: 8; }
}

@media (max-width: 360px) {
  html[lang="en"] .hero h1 { font-size: clamp(28px, 9.2vw, 34px); }
  :root { --gutter: 16px; }
  .site-footer__nav { grid-template-columns: 1fr; }
}

/* Keep the usual desktop composition on 16:9 displays; constrain only ultrawide. */
@media (min-width: 1921px) and (min-aspect-ratio: 21/10) {
  :root {
    --wide-content: 2000px;
    --gutter: max(80px, calc((100vw - var(--wide-content)) / 2));
    --wide-h2: 64px;
    --wide-h3: 34px;
    --wide-label: 22px;
    --wide-body: 20px;
  }

  .header, .header.is-scrolled, .hero {
    padding-inline: max(120px, calc((100vw - 2600px) / 2));
  }
  .hero h1 { font-size: min(100px, 9.5cqw); }
  html[lang="de"] .hero h1 { font-size: min(84px, 6.5cqw); }

  html[lang] :is(#client-trust-title, #audiences-title, #responsibility-mosaic-title,
    #reviews-title, #conversation-cta-title, #candidate-title, #about-intro-title,
    #contact-title) { font-size: var(--wide-h2); }
  html[lang="de"] #candidate-title { font-size: 62px; }
  html[lang] :is(.small-label, .client-trust__label, .solutions-label, .reviews__label,
    .candidate-path-label, .contact-section__label, .contact-section__email-label,
    .contact-section__social-label, .about-intro__facts dt) { font-size: var(--wide-label); }
  .client-trust { --logo-size: 280px; }

  html.services-v2 .solutions-intro { column-gap: 80px; }
  html.services-v2 .solution-card { min-height: 600px; padding: 40px; }
  html.services-v2 .solution-copy h3,
  .responsibility-mosaic__card h3,
  .candidate-path-card h3,
  .about-intro__story h3 { font-size: var(--wide-h3); }
  html.services-v2 .solution-copy > p,
  .responsibility-mosaic__card p,
  .contact-section__intro { font-size: var(--wide-body); }
  html.services-v2 .solution-cta,
  .candidates .candidate-button { font-size: 24px; }
  .responsibility-mosaic__card { padding: 40px; }

  .reviews__symbol-fallback { left: clamp(64px, 2.5vw, 96px); }
  .reviews__intro { padding-right: 32px; }
  .reviews__quote { font-size: 26px; }
  .reviews__card { padding: 40px; }

  .conversation-cta__action { font-size: var(--wide-h2); }
  .conversation-cta__message, .conversation-cta__button { padding: 40px; }
  .candidate-path-card { padding: 48px; }
  .candidates .candidate-path-intro, .about-intro__body { font-size: 22px; }
  .candidate-path-benefits { font-size: 18px; }
  .about-intro__facts dd { font-size: 24px; }
  .contact-section__email-address { font-size: 26px; }
  .contact-section__note { font-size: 28px; }
  .contact-section__social-chip { font-size: 20px; }

  /* Match the maximum wordmark width in particle-field.js. */
  .site-footer__stage { height: min(calc(21.03vw + 199.53px), 671px); }
  .site-footer__fallback { width: min(2000px, calc(100% - 240px)); }
}
