/* Error-page presentation is isolated from all existing page layouts. */
.error-404 {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 126px);
  min-height: calc(100svh - 126px);
  background: var(--hnt-paper);
  text-align: center;
}
.error-404 > .err-wrap { padding-block: 80px; }
.error-404 .err-code {
  margin: 0;
  color: var(--hnt-action);
  font-size: clamp(140px, 20vw, 300px);
  font-weight: 700;
  line-height: 1;
}
.error-404 .err-message { margin: 32px 0 24px; color: var(--hnt-ink); font-size: 18px; }
.error-404 .err-home { color: var(--hnt-white); }
@media (max-width: 1439px) {
  .error-404 .err-message { font-size: 14px; }
}
@media (max-width: 1024px) {
  .error-404 { min-height: calc(100svh - 206px); }
}
@media (max-width: 767px) {
  .error-404 { min-height: calc(100svh - 154px); }
  .error-404 .err-message { margin: 20px 0; font-size: 12px; }
}

/* Site-wide responsive rhythm. Desktop starts at 1440px and remains untouched. */
@media (min-width: 768px) and (max-width: 1439px) {
  body.home,
  .editor-styles-wrapper {
    --hnt-home-heading-size: 36px;
  }

  :is(
    .products-block__head > .display-title,
    .customization-head > .display-title,
    .production-showcase__copy > h2,
    .about-copy > .display-title,
    .cases-intro > .display-title,
    .reviews-head > .display-title,
    .news-head .display-title,
    .hnt-company-advantages > .container > .section-heading > h2,
    .hnt-company-history .section-heading > h2,
    .hnt-company-team .section-heading > h2,
    .hnt-company-certificates > .container > .section-heading > h2,
    .hnt-product-catalogue__content > h2,
    .hnt-product-detail__summary > h2,
    .hnt-product-information [data-info-panel] > header > h2,
    .hnt-product-information__panel-title,
    .hnt-related-products > .container > header > h2,
    .hnt-related-articles > .container > header > h2,
    .hnt-case-catalogue > .container > h2,
    .hnt-case-article__intro > h2,
    .hnt-news-catalogue__title,
    .hnt-news-article__title,
    .hnt-contact-inquiry__contacts > header > h2,
    .hnt-contact-location__heading h2,
    .editorial-detail__body > h2:first-child,
    .editorial-detail__related > .container > header > h2,
    .editorial-detail__cta h2,
    .archive-head > .section-title,
    .error-404 .section-title,
    .site-main > .wp-block-heading:first-child
  ) {
    font-size: 36px;
  }

  :is(
    .section-sub,
    .production-showcase__summary,
    .about-intro,
    .section-heading > p:not(.eyebrow),
    .team-description > p:first-child,
    .hnt-product-information [data-info-panel] > header > p,
    .hnt-product-catalogue__intro,
    .hnt-news-catalogue__intro,
    .hnt-case-catalogue > .container > p,
    .hnt-contact-location__heading > div > p,
    .editorial-detail__body > h2:first-child + p
  ) {
    font-size: 14px;
  }

  :is(
    .products-block,
    .customization-flow,
    .production-showcase,
    body.home .hnt-section--about:not(.hnt-section--about-flush),
    .hnt-section--case-list,
    .hnt-section--testimonials,
    .hnt-section--news-list,
    .hnt-company-advantages,
    .hnt-company-history,
    .hnt-company-team,
    .hnt-company-certificates,
    .hnt-product-catalogue,
    .hnt-product-detail,
    .hnt-product-information,
    .hnt-related-products,
    .hnt-related-articles,
    .hnt-case-catalogue,
    .hnt-case-article,
    .hnt-news-catalogue,
    .hnt-news-article,
    .hnt-contact-inquiry,
    .hnt-contact-location,
    .editorial-detail__article,
    .editorial-detail__related,
    .editorial-detail__cta,
    .aib-collection-archive__list,
    .hnt-case-archive__grid,
    .archive-page > .container,
    .error-404 > .container,
    .site-main:has(> .wp-block-heading:first-child)
  ) {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .hnt-section--about-flush .about-copy {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

@media (max-width: 767px) {
  body.home,
  .editor-styles-wrapper {
    --hnt-home-heading-size: 26px;
  }

  :is(
    .products-block__head > .display-title,
    .customization-head > .display-title,
    .production-showcase__copy > h2,
    .about-copy > .display-title,
    .cases-intro > .display-title,
    .reviews-head > .display-title,
    .news-head .display-title,
    .hnt-company-advantages > .container > .section-heading > h2,
    .hnt-company-history .section-heading > h2,
    .hnt-company-team .section-heading > h2,
    .hnt-company-certificates > .container > .section-heading > h2,
    .hnt-product-catalogue__content > h2,
    .hnt-product-detail__summary > h2,
    .hnt-product-information [data-info-panel] > header > h2,
    .hnt-product-information__panel-title,
    .hnt-related-products > .container > header > h2,
    .hnt-related-articles > .container > header > h2,
    .hnt-case-catalogue > .container > h2,
    .hnt-case-article__intro > h2,
    .hnt-news-catalogue__title,
    .hnt-news-article__title,
    .hnt-contact-inquiry__contacts > header > h2,
    .hnt-contact-location__heading h2,
    .editorial-detail__body > h2:first-child,
    .editorial-detail__related > .container > header > h2,
    .editorial-detail__cta h2,
    .archive-head > .section-title,
    .error-404 .section-title,
    .site-main > .wp-block-heading:first-child
  ) {
    font-size: 26px;
  }

  :is(
    .section-sub,
    .production-showcase__summary,
    .about-intro,
    .section-heading > p:not(.eyebrow),
    .team-description > p:first-child,
    .hnt-product-information [data-info-panel] > header > p,
    .hnt-product-catalogue__intro,
    .hnt-news-catalogue__intro,
    .hnt-case-catalogue > .container > p,
    .hnt-contact-location__heading > div > p,
    .editorial-detail__body > h2:first-child + p
  ) {
    font-size: 12px;
  }

  :is(
    .products-block,
    .customization-flow,
    .production-showcase,
    body.home .hnt-section--about:not(.hnt-section--about-flush),
    .hnt-section--case-list,
    .hnt-section--testimonials,
    .hnt-section--news-list,
    .hnt-company-advantages,
    .hnt-company-history,
    .hnt-company-team,
    .hnt-company-certificates,
    .hnt-product-catalogue,
    .hnt-product-detail,
    .hnt-product-information,
    .hnt-related-products,
    .hnt-related-articles,
    .hnt-case-catalogue,
    .hnt-case-article,
    .hnt-news-catalogue,
    .hnt-news-article,
    .hnt-contact-inquiry,
    .hnt-contact-location,
    .editorial-detail__article,
    .editorial-detail__related,
    .editorial-detail__cta,
    .aib-collection-archive__list,
    .hnt-case-archive__grid,
    .archive-page > .container,
    .error-404 > .container,
    .site-main:has(> .wp-block-heading:first-child)
  ) {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .hnt-section--about-flush .about-copy {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
