/* Shared layout unit: preserve the laptop design through 1440 CSS pixels,
   then grow body text, widths, cards and spacing together up to 1.575x.
   Breakpoints stay in CSS pixels so mobile/tablet layouts keep their reflow. */
:root { --pbr-fluid-unit: clamp(1px, calc(1px + (100vw - 1440px) * .000513392857), 1.575px); }
/* Retain the approved hero sizing while making the body 10% smaller at 2560px. */
:is(.hero, .home-hero, .ppo-hero, .trt-hero, .nc-hero, .co-hero, .ct-hero, .tec-hero) {
  --pbr-fluid-unit: clamp(1px, .0694444444vw, 1.75px);
}

@media (min-width: 1441px) {
  html body { font-size: calc(14 * var(--pbr-fluid-unit)); }

  /* The inherited Bridge header/footer and legal template have their own
     1100px containers; scale those as well as the custom page modules. */
  html body .container_inner {
    width: min(calc(1100 * var(--pbr-fluid-unit)), calc(100% - 64 * var(--pbr-fluid-unit))) !important;
  }
  html body nav.main_menu > ul > li > a {
    font-size: calc(12 * var(--pbr-fluid-unit));
    padding-inline: calc(17 * var(--pbr-fluid-unit));
  }
  html body footer :is(p, li, a) { font-size: calc(14 * var(--pbr-fluid-unit)); }
  html body.pbr-legal .content :is(p, li) {
    font-size: calc(16 * var(--pbr-fluid-unit));
    line-height: 1.75;
    overflow-wrap: anywhere;
  }
  html body.pbr-legal .content h1 { font-size: calc(42 * var(--pbr-fluid-unit)); line-height: 1.2; }
  html body.pbr-legal .content h2 { font-size: calc(32 * var(--pbr-fluid-unit)); line-height: 1.25; }
  html body.pbr-legal .content h3 { font-size: calc(24 * var(--pbr-fluid-unit)); line-height: 1.3; }
}

/* Narrow phones: leave enough room for the longer names in the surgery
   accordions rather than letting the illustration squeeze the heading. */
@media (max-width: 400px) {
  .dedo-head { gap: 10px; padding: 12px; }
  .dedo-head .dedo-thumb { width: 64px; }
  .dedo-head .dedo-thumb img { max-width: 64px; }
  .dedo-head .dedo-chev { width: 28px; height: 28px; }
  .dedo-head .svc-title { font-size: 17px; overflow-wrap: anywhere; }
}

/* Hero text grows more gently than the body on large desktops.
   Keep the 1440px sizes, then cap titles and long introductory copy. */
@media (min-width: 1441px) {
  html body :is(.hero, .home-hero, .ppo-hero, .trt-hero, .nc-hero, .co-hero, .ct-hero, .tec-hero) h1 {
    font-size: clamp(2.97rem, calc(2.97rem + (100vw - 1440px) * .018), 4.5rem) !important;
  }
  html body :is(.hero, .home-hero, .ppo-hero, .trt-hero, .nc-hero, .co-hero, .ct-hero, .tec-hero) h1.h1-largo {
    font-size: clamp(2.61rem, calc(2.61rem + (100vw - 1440px) * .016), 4rem) !important;
  }
  html body :is(.hero-sub, .home-hero-sub, .ppo-hero-sub, .trt-hero-sub, .nc-hero-sub, .co-hero-sub, .ct-hero-sub, .tec-hero-sub, .hero .sub) {
    font-size: clamp(1.215rem, calc(1.215rem + (100vw - 1440px) * .007), 1.75rem) !important;
  }
}

/* The three recruitment pages use a 60px laptop heading of their own. */
@media (min-width: 1441px) {
  html body:has(.form-wrap) .hero h1 {
    font-size: clamp(3.75rem, calc(3.75rem + (100vw - 1440px) * .01), 4.5rem) !important;
  }
}

/* The home section headings use a viewport term as well as the shared unit. */
@media (min-width: 1441px) {
  html body.home .pbr-wrap .section-title {
    font-size: clamp(calc(32 * var(--pbr-fluid-unit)), calc(3.6vw - (100vw - 1440px) * .008), calc(60 * var(--pbr-fluid-unit)));
  }
}
