/* Compact visual pass -----------------------------------------------------
 * Keep the existing type and colour system, but stop the largest editorial
 * blocks from dominating wide screens. Everything here is scoped to the
 * existing page components and leaves the mobile navigation untouched.
 */

@media (min-width: 901px) {
  /*
   * Desktop Side-by-Side Page Hero:
   * On PC and large screens across all pages except home, places the hero copy
   * (page-hero-copy / text-reveal-delay-4) beside the title (h1 / text-reveal-delay-3).
   * Both elements are formatted into exactly 2 lines each, with dynamic font
   * sizing and line-clamp safeguarding so neither element exceeds 2 lines.
   */
  .site-body:not(.page-home) .page-hero > .shell {
    display: grid !important;
    grid-template-columns: minmax(0, auto) minmax(0, auto) !important;
    justify-content: start !important;
    grid-template-areas:
      "eyebrow eyebrow"
      "title   copy" !important;
    align-items: end !important;
    column-gap: clamp(36px, 4.5vw, 76px) !important;
    row-gap: 0 !important;
    width: min(1320px, calc(100% - 72px)) !important;
  }

  .site-body:not(.page-home) .news-hero-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: end !important;
    gap: clamp(32px, 4vw, 64px) !important;
  }

  .site-body:not(.page-home) .news-hero .news-hero-copy {
    display: grid !important;
    grid-template-columns: minmax(0, auto) minmax(0, 520px) !important;
    justify-content: start !important;
    grid-template-areas:
      "eyebrow eyebrow"
      "title   copy" !important;
    align-items: end !important;
    column-gap: clamp(28px, 3.5vw, 56px) !important;
    row-gap: 0 !important;
    flex: 1 1 auto !important;
  }

  /* Extended directional overlay gradient for high readability over hero images */
  .site-body:not(.page-home) .page-hero .hero-overlay {
    background: linear-gradient(
      to right,
      color-mix(in srgb, var(--paper) 98%, transparent) 0%,
      color-mix(in srgb, var(--paper) 95%, transparent) 35%,
      color-mix(in srgb, var(--paper) 88%, transparent) 65%,
      color-mix(in srgb, var(--paper) 68%, transparent) 82%,
      color-mix(in srgb, var(--paper) 20%, transparent) 92%,
      transparent 98%
    ) !important;
  }

  [dir="rtl"].site-body:not(.page-home) .page-hero .hero-overlay,
  [dir="rtl"] .site-body:not(.page-home) .page-hero .hero-overlay {
    background: linear-gradient(
      to left,
      color-mix(in srgb, var(--paper) 98%, transparent) 0%,
      color-mix(in srgb, var(--paper) 95%, transparent) 35%,
      color-mix(in srgb, var(--paper) 88%, transparent) 65%,
      color-mix(in srgb, var(--paper) 68%, transparent) 82%,
      color-mix(in srgb, var(--paper) 20%, transparent) 92%,
      transparent 98%
    ) !important;
  }

  .site-body:not(.page-home) .page-hero .eyebrow {
    grid-area: eyebrow !important;
    margin-bottom: clamp(14px, 1.8vw, 24px) !important;
  }

  .site-body:not(.page-home) .page-hero :is(h1, .text-reveal-delay-3) {
    grid-area: title !important;
    margin-bottom: 0 !important;
    font-size: clamp(2rem, 3.1vw, 3.25rem) !important;
    line-height: 1.05 !important;
    max-width: 100% !important;
    text-wrap: balance !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
  }

  .site-body:not(.page-home) .news-hero :is(h1, .text-reveal-delay-3) {
    font-size: clamp(1.85rem, 2.5vw, 2.65rem) !important;
    line-height: 1.08 !important;
  }

  .site-body:not(.page-home) .page-hero :is(h1, .text-reveal-delay-3) > br {
    display: none !important;
  }

  .site-body:not(.page-home) .page-hero :is(h1, .text-reveal-delay-3) > span {
    display: block !important;
  }

  .site-body:not(.page-home) .page-hero :is(.page-hero-copy, .page-hero-copy.text-reveal-delay-4) {
    grid-area: copy !important;
    margin-bottom: 0 !important;
    padding-bottom: clamp(6px, 0.8vw, 12px) !important;
    color: var(--muted) !important;
    line-height: 1.55 !important;
    text-wrap: balance !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Tier 1: Short excerpts (About, Legal, Chairman) */
  .site-body:not(.page-home) :is(.about-page, .legal-page-hero) :is(.page-hero-copy, .page-hero-copy.text-reveal-delay-4) {
    max-width: clamp(280px, 24vw, 340px) !important;
    font-size: clamp(1.02rem, 1.18vw, 1.18rem) !important;
  }

  .site-body:not(.page-home) .chairman-page :is(.page-hero-copy, .page-hero-copy.text-reveal-delay-4) {
    max-width: clamp(320px, 27vw, 380px) !important;
    font-size: clamp(1rem, 1.14vw, 1.14rem) !important;
  }

  /* Tier 2: Medium excerpts (Products, Contact) */
  .site-body:not(.page-home) :is(.products-page-hero, .contact-hero) :is(.page-hero-copy, .page-hero-copy.text-reveal-delay-4) {
    max-width: clamp(380px, 32vw, 460px) !important;
    font-size: clamp(0.96rem, 1.08vw, 1.08rem) !important;
  }

  /* Tier 3: Longer excerpts (News, Search, Quality, Process, Dynamic pages) */
  .site-body:not(.page-home) :is(.news-hero, .search-page-hero, .quality-page-hero, .process-page, .dynamic-page) :is(.page-hero-copy, .page-hero-copy.text-reveal-delay-4) {
    max-width: clamp(440px, 36vw, 520px) !important;
    font-size: clamp(0.88rem, 0.98vw, 0.98rem) !important;
    line-height: 1.5 !important;
  }

  /* The Certificates route is a proof-led catalog entry point, so its hero
   * copy uses the same readable measure and scale as Products. */
  .site-body:not(.page-home) :is(.products-page-hero, .certificates-page.page-hero) :is(.page-hero-copy, .page-hero-copy.text-reveal-delay-4) {
    max-width: clamp(380px, 32vw, 460px) !important;
    font-size: clamp(.96rem, 1.08vw, 1.08rem) !important;
    line-height: 1.55 !important;
  }

  .about-page.page-hero,
  .dynamic-page.page-hero,
  .chairman-page.page-hero,
  .history-page.page-hero {
    min-height: 500px;
  }

  .home-hero-content {
    padding-top: clamp(118px, 13vh, 150px);
    padding-bottom: clamp(175px, 22vh, 245px);
  }

  .home-hero .home-hero-copy h1,
  .home-hero .home-hero-headline {
    font-size: clamp(3.35rem, 4.6vw, 5.15rem);
  }

  .home-hero .home-hero-support {
    margin-bottom: 32px;
    font-size: clamp(1rem, 1.08vw, 1.15rem);
  }

  .home-hero-products {
    width: min(55vw, 820px);
    right: clamp(24px, 2.8vw, 52px);
    bottom: clamp(132px, 17vh, 205px);
  }

  .home-hero-product img {
    max-height: 46vh;
  }

  .about-page.content-shell {
    padding-block: clamp(64px, 7vw, 98px);
  }

  .about-page.content-shell .content-intro {
    gap: clamp(30px, 5vw, 70px);
    padding-bottom: clamp(52px, 6vw, 78px);
  }

  .about-page.content-shell .content-intro h2 {
    font-size: clamp(2.15rem, 3.3vw, 3.9rem);
  }

  .about-page .editorial-section {
    gap: clamp(32px, 5.5vw, 76px);
    padding-block: clamp(54px, 6vw, 76px);
  }

  .home-story-layout {
    gap: clamp(30px, 5vw, 76px);
  }

  .home-story-lead {
    padding-block: clamp(26px, 3vw, 42px);
  }

  .home-story-lead h2 {
    font-size: clamp(1.8rem, 2.55vw, 3rem);
  }

  .home-story-lead p:not(.eyebrow) {
    font-size: clamp(.9rem, 1vw, 1rem);
  }

  .home-story-section.section {
    padding-block: clamp(52px, 6vw, 88px);
  }

  .home-story-copy h2 {
    font-size: clamp(2.15rem, 3.25vw, 3.8rem);
  }

  .home-story-image img {
    min-height: 360px;
  }

  .story-longform > .shell {
    width: min(1600px, calc(100% - 64px));
  }

  .story-slider .meta {
    padding: clamp(24px, 3vw, 46px) clamp(20px, 2.4vw, 38px);
  }

  .story-slider {
    grid-template-columns: minmax(370px, 36%) 1fr;
    min-height: clamp(680px, 72vh, 820px);
  }

  .story-slider .meta {
    padding-inline: clamp(30px, 3.8vw, 68px);
  }

  .story-slider .meta-plate {
    margin: 0;
    padding: 0;
  }

  .story-slider .stage {
    padding: clamp(24px, 2.7vw, 46px);
  }

  .story-slider .plate {
    width: min(100%, 66vw, 1000px);
  }

  .story-slider .slide-title {
    height: clamp(2.15rem, 3.2vw, 3.9rem);
    font-size: clamp(2.15rem, 3.2vw, 3.9rem);
  }

  .story-longform.section {
    padding-block: clamp(58px, 7vw, 100px);
  }

  .story-longform-intro {
    gap: clamp(32px, 6vw, 92px);
    padding-bottom: clamp(52px, 6vw, 80px);
  }

  .story-longform-item {
    gap: clamp(24px, 4vw, 62px);
    padding-block: clamp(48px, 6vw, 84px);
  }

  .story-longform-copy h3 {
    font-size: clamp(1.9rem, 2.9vw, 3.25rem);
  }
}

@media (max-width: 900px) {
  .page-hero > .shell > h1 {
    font-size: clamp(3rem, 8vw, 4.75rem);
  }

  .about-page.page-hero,
  .dynamic-page.page-hero,
  .chairman-page.page-hero,
  .history-page.page-hero {
    min-height: 490px;
  }

  .home-hero .home-hero-copy h1,
  .home-hero .home-hero-headline {
    font-size: clamp(2.55rem, 9.2vw, 3.5rem);
  }

  .home-hero-products {
    width: min(94%, 650px);
  }
}

@media (max-width: 600px) {
  /*
   * Phone page-hero compaction:
   * Reduces page-hero height on phones across all non-home pages by ~50%
   * (from ~500px-560px down to ~250px-275px, and proportionally for products & legal).
   * Gives instant visibility to page body content above the fold while keeping
   * the brand atmosphere, background artwork, and title hierarchy intact.
   */
  .site-body:not(.page-home) .page-hero,
  .site-body:not(.page-home) :is(
    .about-page.page-hero,
    .dynamic-page.page-hero,
    .chairman-page.page-hero,
    .history-page.page-hero,
    .process-page.page-hero,
    .quality-page-hero,
    .contact-hero,
    .search-page-hero,
    .news-hero
  ) {
    min-height: 260px;
    padding-top: 76px;
  }

  .site-body:not(.page-home) .about-page.page-hero {
    min-height: 250px;
  }

  .site-body:not(.page-home) :is(.dynamic-page.page-hero, .quality-page-hero, .contact-hero) {
    min-height: 265px;
  }

  .site-body:not(.page-home) :is(.chairman-page.page-hero, .history-page.page-hero, .process-page.page-hero) {
    min-height: 270px;
  }

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

  .site-body:not(.page-home) .news-hero {
    min-height: 280px;
  }

  .site-body:not(.page-home) .news-hero-inner {
    min-height: 200px;
    padding-block: 16px 20px;
  }

  .site-body:not(.page-home) :is(.products-page-hero, .certificates-page.page-hero) {
    min-height: 185px;
    padding-top: 76px;
  }

  .site-body:not(.page-home) .legal-page-hero {
    min-height: 160px;
    padding-top: 76px;
  }

  .site-body:not(.page-home) .page-hero > .shell,
  .site-body:not(.page-home) :is(.process-page, .history-page).page-hero .shell {
    padding-block: 14px 18px;
  }

  .site-body:not(.page-home) :is(.products-page-hero, .certificates-page.page-hero, .legal-page-hero) .shell {
    padding-block: 10px 14px;
  }

  .site-body:not(.page-home) .page-hero .eyebrow {
    margin-bottom: 8px;
    font-size: 0.72rem;
    letter-spacing: .16em;
  }

  .site-body:not(.page-home) .page-hero > .shell > h1,
  .site-body:not(.page-home) :is(.quality-page-hero, .contact-hero, .search-page-hero, .news-hero, .products-page-hero, .certificates-page.page-hero, .legal-page-hero) h1 {
    font-size: clamp(1.85rem, 7.8vw, 2.45rem);
    line-height: .98;
    margin-bottom: 8px;
  }

  .site-body:not(.page-home) .page-hero .page-hero-copy {
    font-size: clamp(0.85rem, 3.1vw, 0.94rem);
    line-height: 1.45;
    margin-bottom: 0;
  }

  .home-hero .home-hero-copy h1,
  .home-hero .home-hero-headline {
    font-size: clamp(2.4rem, 10.2vw, 3.3rem);
  }

  .home-hero-products {
    width: calc(100% - 34px);
  }

  .home-story-image img {
    min-height: 280px;
  }
}
