/* RTW Water V14 — final, intentionally bounded overrides on the V13 design.
   Load this file after v13.css. Important is limited to the shared type scale
   and image dimensions that must supersede the accumulated earlier versions. */
body:is(.v10-page, .legacy) {
  --hero-size: 38px;
  --page-size: 30px;
  --section-size: 25px;
  --card-size: 18px;
  --label-size: 13px;
  --body-size: 14.5px;
  --type-body: 14.5px;
  --type-section: 25px;
  --type-card: 18px;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 14.5px !important;
  line-height: 1.65 !important;
}

/* One text scale for both page families, including card copy and the footer. */
body:is(.v10-page, .legacy) :where(
  p, li, dd, dt, address, a, button, input, textarea, select,
  .lead, .section-lead, .note, .application-line, .feature-name,
  .feature-result strong, .purpose strong, .tech-description,
  .project-summary, .project-key span, .evidence-stats span,
  .credential-metrics dt, .footer-office-heading
) {
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 14.5px !important;
  line-height: 1.65 !important;
}
body:is(.v10-page, .legacy) .home-hero h1 {
  font-size: 38px !important;
  line-height: 1.18 !important;
}
body:is(.v10-page, .legacy) :is(.v10-banner, .photo-banner) h1 {
  font-size: 30px !important;
  line-height: 1.24 !important;
}
body:is(.v10-page, .legacy) main h2 {
  font-size: 25px !important;
  line-height: 1.28 !important;
}
body:is(.v10-page, .legacy) h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
body:is(.v10-page, .legacy) .eyebrow {
  font-size: 13px !important;
  font-weight: 600 !important;
}
body:is(.v10-page, .legacy) :is(
  .evidence-stats strong, .credential-metrics dd, .project-key strong
) {
  font-size: 30px !important;
  line-height: 1.2 !important;
}
body:is(.v10-page, .legacy) :is(
  .button span, .text-link > span:last-child
) {
  font-size: 16px !important;
  line-height: 1 !important;
}

/* Thailand examples: a landscape photograph rather than a square crop. */
body.v10-page .home-cases > article {
  grid-template-columns: 240px minmax(0, 1fr);
}
body.v10-page .home-cases figure img {
  width: 240px !important;
  max-width: 100%;
  height: 160px !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: cover;
}

/* Algorithm evidence: equal-height stages with balanced, undistorted images. */
body.legacy .model-image-frame {
  height: 175px !important;
}
body.legacy .floc-photo .model-image-frame img {
  width: 197px !important;
  max-width: 100%;
  height: auto !important;
  max-height: 151px;
  aspect-ratio: auto;
  object-fit: contain;
}
body.legacy .algorithm-photo .model-image-frame img {
  width: 240px !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 151px;
  aspect-ratio: auto;
  object-fit: contain;
}

/* Keep the complete microscope section; unify the three project photo groups. */
body.v10-page .material-image.cross-section img {
  object-fit: contain !important;
}
body.page-projects :is(.thai-media, .global-media, .partner-project) figure img {
  display: block;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover;
}
body.page-projects .thai-media figure img {
  width: 100%;
  max-width: 340px;
}
body.page-projects .global-media figure img {
  width: 100%;
  max-width: 280px;
}
body.page-projects .partner-project figure img {
  width: 100%;
}

/* Four bounded image reductions, with the existing mobile stacking preserved. */
body.v10-page .system-overview {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
body.v10-page .system-overview .cutaway img {
  max-height: 270px !important;
  height: auto;
  object-fit: contain;
}
body.legacy .industrial-overview-image img {
  max-height: 250px !important;
  height: auto;
  object-fit: contain;
}
body.legacy.page-operating-services .service-photo {
  max-width: 410px !important;
}
body.legacy .package-overview {
  align-items: center;
}
body.legacy .product-carousel {
  width: 100%;
  max-width: 450px !important;
}

@media (max-width: 1100px) {
  /* Retain V13's stacked home case cards at intermediate widths. */
  body.v10-page .home-cases > article {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  body:is(.v10-page, .legacy) .home-hero h1 {
    font-size: 30px !important;
  }
  body:is(.v10-page, .legacy) :is(.v10-banner, .photo-banner) h1 {
    font-size: 26px !important;
  }
  body:is(.v10-page, .legacy) main h2 {
    font-size: 22px !important;
  }
  body.v10-page .system-overview {
    grid-template-columns: minmax(0, 1fr);
  }
  body.legacy .product-carousel {
    justify-self: center;
  }
}
