/* Shared hero-height pass.
 * Keep the home composition unchanged while giving every inner-page hero
 * enough vertical space for its artwork and copy. The rules live in their own
 * final-loaded file so route-specific hero styles do not drift apart again. */

/* Desktop: inner-page heroes are 50% taller than the compact 325px pass. */
@media (min-width: 901px) {
  .page-hero:not(.home-hero) {
    min-height: 488px !important;
    padding-top: 76px !important;
    padding-bottom: 28px !important;
  }

  .page-hero:not(.home-hero) > .shell {
    min-height: 0 !important;
    padding-block: 22px 26px !important;
  }

  .page-hero:not(.home-hero) .page-hero-copy {
    max-width: 44ch;
  }

  .news-hero {
    min-height: 488px !important;
  }

  .news-hero > .shell {
    padding-block: 28px 32px !important;
  }

  .product-detail-hero {
    min-height: 0 !important;
    padding: 92px 0 48px !important;
  }

  .product-detail-hero .detail-hero-image {
    min-height: 420px !important;
  }

  .home-hero {
    height: 100svh !important;
    min-height: 660px !important;
  }

  .home-hero-content {
    align-items: center !important;
    padding-top: 76px !important;
    padding-bottom: 0 !important;
  }

  .home-hero-copy {
    transform: translate3d(0, clamp(-84px, -8vh, -56px), 0);
  }

  .home-hero-eyebrow {
    margin-bottom: 18px !important;
    line-height: 1.5 !important;
  }

  .home-hero-headline {
    margin-bottom: 16px !important;
    font-size: clamp(3rem, 5vw, 5.5rem) !important;
    line-height: 1.08 !important;
  }

  .home-hero-divider {
    margin-bottom: 16px !important;
  }

  .home-hero-support {
    max-width: 40ch;
    margin-bottom: 24px !important;
    font-size: clamp(1rem, 1.25vw, 1.2rem) !important;
    line-height: 1.65 !important;
  }

  .home-hero-products {
    right: clamp(118px, 12vw, 220px) !important;
    bottom: clamp(200px, 25vh, 310px) !important;
  }

  .home-hero-capabilities .capability-item h2 {
    line-height: 1.25 !important;
  }

  .home-hero .hero-element {
    opacity: clamp(.78, calc(var(--element-opacity, .38) + .48), 1) !important;
    filter:
      drop-shadow(0 10px 12px rgba(0, 0, 0, .34))
      drop-shadow(0 0 18px var(--element-glow, rgba(212, 148, 58, .48)))
      saturate(1.24)
      contrast(1.08)
      brightness(1.04) !important;
  }

  .home-hero-product img {
    max-height: 29vh !important;
  }

  .home-hero-capabilities .capabilities-grid {
    min-height: 82px !important;
    padding-block: 10px !important;
  }
}

/* Tablet: use a compact in-flow composition so the product row remains
 * visible while the hero still adapts to the amount of copy. */
@media (min-width: 561px) and (max-width: 900px) {
  .page-hero:not(.home-hero) {
    min-height: 390px !important;
    padding-top: 76px !important;
    padding-bottom: 20px !important;
  }

  .page-hero:not(.home-hero) > .shell {
    padding-block: 14px 20px !important;
  }

  .news-hero {
    min-height: 390px !important;
  }

  .news-hero > .shell {
    padding-block: 18px 24px !important;
  }

  .product-detail-hero {
    min-height: 0 !important;
    padding: 92px 0 40px !important;
  }

  .product-detail-hero .detail-hero-image {
    min-height: 390px !important;
  }

  .home-hero {
    height: 100svh !important;
    min-height: 680px !important;
  }

  .home-hero-content {
    padding-top: 76px !important;
    padding-bottom: 0 !important;
  }

  .home-hero-eyebrow {
    margin-bottom: 14px !important;
  }

  .home-hero-headline {
    margin-bottom: 14px !important;
    font-size: clamp(3rem, 7vw, 5rem) !important;
  }

  .home-hero-divider {
    margin-bottom: 14px !important;
  }

  .home-hero-support {
    margin-bottom: 18px !important;
    line-height: 1.45 !important;
  }

  .home-hero-copy > .home-hero-capabilities {
    margin-top: 14px !important;
  }

  .home-hero-capabilities .capabilities-grid {
    min-height: 76px !important;
    padding-block: 8px !important;
  }

  .home-hero-products {
    margin-top: 16px !important;
  }

  .home-hero-product img {
    max-height: 12vh !important;
  }
}

/* Phone: inner-page heights are 50% taller than the compact pass. The home
 * hero remains a separate docked composition with its existing dimensions. */
@media (max-width: 560px) {
  .site-body:not(.page-home) .page-hero:not(.home-hero) {
    min-height: 270px !important;
    padding-top: 64px !important;
    padding-bottom: 10px !important;
  }

  .site-body:not(.page-home) .page-hero:not(.home-hero) > .shell {
    min-height: 0 !important;
    padding-block: 8px 12px !important;
  }

  .site-body:not(.page-home) .page-hero.products-page-hero,
  .site-body:not(.page-home) .page-hero.certificates-page-hero {
    min-height: 225px !important;
  }

  .site-body:not(.page-home) .page-hero.legal-page-hero {
    min-height: 203px !important;
  }

  .site-body:not(.page-home) .page-hero.search-page-hero {
    min-height: 248px !important;
  }

  .site-body:not(.page-home) .page-hero.process-page-hero,
  .site-body:not(.page-home) .page-hero.history-page-hero {
    min-height: 285px !important;
  }

  .news-hero {
    min-height: 270px !important;
  }

  .news-hero > .shell {
    min-height: 0 !important;
    padding-block: 8px 12px !important;
  }

  .product-detail-hero {
    min-height: 0 !important;
    padding: 88px 0 32px !important;
  }

  .product-detail-hero .detail-hero-image {
    min-height: 330px !important;
  }

  .home-hero {
    height: 100svh !important;
    min-height: 590px !important;
    max-height: none !important;
  }

  .home-hero-content {
    height: 100% !important;
    padding-top: clamp(68px, 8svh, 82px) !important;
    padding-bottom: 0 !important;
  }

  .home-hero-eyebrow {
    margin-bottom: 12px !important;
  }

  .home-hero-headline {
    margin-bottom: 12px !important;
    font-size: clamp(2.3rem, 10vw, 3.4rem) !important;
  }

  .home-hero-divider {
    margin-bottom: 12px !important;
  }

  .home-hero-support {
    max-width: 30ch !important;
    margin-bottom: 16px !important;
    font-size: .9rem !important;
    line-height: 1.4 !important;
  }

  .home-hero .home-hero-actions .button {
    min-height: 42px !important;
  }

  .home-hero-products {
    bottom: calc(clamp(86px, calc(13svh + 20px), 118px) + env(safe-area-inset-bottom)) !important;
  }

  .home-hero-product img {
    max-height: 13vh !important;
  }

  .home-hero-capabilities {
    bottom: calc(46px + env(safe-area-inset-bottom) + clamp(46px, calc(13svh - 20px), 68px)) !important;
  }

  .home-hero-capabilities .capabilities-grid {
    min-height: 72px !important;
    padding-block: 4px !important;
  }

  .home-hero-capabilities .capability-item {
    min-height: 30px !important;
    gap: 4px !important;
  }

  .home-hero-capabilities .capability-item > .icon {
    width: 24px !important;
    height: 24px !important;
    flex-basis: 24px !important;
  }

  .home-hero-capabilities .capability-item h2 {
    font-size: 8px !important;
  }

  .home-hero-discover {
    bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }
}
