/* SAGAZ AUD R331: owner-directed full-width hero contract.
   Desktop >= 761px: photo spans edge-to-edge, copy in the art's breathing space.
   Mobile <= 760px: retain its independent photographic sources and stacked copy.
   No changes to Central CRM or any operational flow. */
html,body.public-shell-page { overflow-x:clip; }
body.public-shell-page nav.sagaz-breadcrumb { display:none!important; }
/* Never leave a visual gap between canonical site header and opening section. */
body.public-shell-page .site-header + main,
body.public-shell-page .site-header + main#top,
body.public-shell-page .site-header + section,
body.public-shell-page .site-header + .hero-final { margin-top:0!important;padding-top:0!important; }
body.public-shell-page main#top > :is(.hero-final,.seo-hero,.detail-hero,.marketing-hero):first-child {
  margin-top:0!important;
}
/* Global photo framing. Do not put the user-approved artwork in rounded cards. */
body.public-shell-page :is(.hero-final.hero-split,.seo-hero,.detail-hero,.marketing-hero) {
  border-radius:0!important;
  box-shadow:none!important;
  clip-path:none!important;
  border:0!important;
}
/* Image edges remain square, with no imposed frame. */
body.public-shell-page :is(.hero-final,.seo-hero,.detail-hero,.marketing-hero) :is(picture,img,figure) {
  border-radius:0!important;
  clip-path:none!important;
}
/* Shared breakpoint contract, seven core solutions plus existing legacy routes. */
@media (min-width:761px) {
  html body.public-shell-page :is(.hero-final.hero-split,.seo-hero,.detail-hero.shell,.marketing-hero) {
    position:relative!important;
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    height:clamp(520px,46vw,690px)!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:0!important;
    background:transparent!important;
  }
  /* Solution hub: preserve the owner's layered full-width composition. */
  html body.solutions-page .hero-final.hero-split > .hero-visual.hero-media {
    display:block!important;position:absolute!important;
    inset:0!important;width:100%!important;height:100%!important;
    min-height:0!important;max-height:none!important;overflow:hidden!important;
    margin:0!important;padding:0!important;
    border-radius:0!important;background:transparent!important;
    transform:none!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-mobile-picture {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;overflow:hidden!important;
    z-index:0!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-image {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;max-width:none!important;
    object-fit:cover!important;object-position:center center!important;
    opacity:1!important;transform:none!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-content.shell {
    display:flex!important;position:relative!important;z-index:2!important;
    flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;
    width:min(1180px,calc(100% - 48px))!important;
    height:100%!important;min-height:0!important;max-width:1180px!important;
    margin:0 auto!important;padding:18px 0!important;overflow:visible!important;
    background:transparent!important;transform:none!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-content :is(h1,p,.muted) {
    max-width:min(505px,43vw)!important;
    width:auto!important;
    overflow-wrap:break-word!important;
    text-wrap:pretty;
  }
  html body.solutions-page .hero-final.hero-split .hero-content h1 {
    font-size:clamp(39px,4.25vw,57px)!important;
    line-height:1.04!important;
    margin:16px 0 18px!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-content p {
    font-size:clamp(13px,1.1vw,16px)!important;
    line-height:1.5!important;
    margin:0 0 14px!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-content .muted {
    font-size:13px!important;line-height:1.45!important;
  }
  html body.solutions-page .hero-final.hero-split .hero-content .hero-secondary-link {
    margin-top:12px!important;
  }
  /* Established SEO services: never paint a detached cream/blue background
     where the approved wide image should be. */
  html body.seo-page .seo-hero {
    color:#fff!important;
  }
  html body.seo-page .seo-hero > .seo-hero-media,
  html body.seo-page .seo-hero > figure.seo-hero-media {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;min-height:0!important;
    max-width:none!important;margin:0!important;padding:0!important;
    overflow:hidden!important;border-radius:0!important;
    background:transparent!important;transform:none!important;
  }
  html body.seo-page .seo-hero > .seo-hero-media > picture,
  html body.seo-page .seo-hero > .seo-hero-media > .hero-mobile-picture {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;
  }
  html body.seo-page .seo-hero .seo-hero-media img {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;min-width:100%!important;
    max-height:none!important;max-width:none!important;
    object-fit:cover!important;object-position:center center!important;
    opacity:1!important;transform:none!important;
  }
  html body.seo-page .seo-hero .seo-hero-media::after {
    position:absolute!important;z-index:1!important;
    inset:0!important;content:""!important;
    background:linear-gradient(90deg,rgba(4,43,49,.57) 0%,rgba(4,43,49,.12) 41%,transparent 65%)!important;
    pointer-events:none!important;border-radius:0!important;
  }
  html body.seo-page .seo-hero > .shell {
    display:flex!important;position:relative!important;z-index:2!important;
    flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;
    box-sizing:border-box!important;width:min(1180px,calc(100% - 48px))!important;
    height:100%!important;min-height:0!important;max-width:1180px!important;
    margin:0 auto!important;padding:20px 0!important;
    background:transparent!important;
  }
  html body.seo-page .seo-hero > .shell :is(h1,p,.hero-balanced-copy) {
    max-width:min(500px,42vw)!important;width:auto!important;
    overflow-wrap:break-word!important;word-break:normal!important;
    color:#fff!important;text-wrap:pretty;
  }
  html body.seo-page .seo-hero > .shell h1 {
    font-size:clamp(34px,3.6vw,54px)!important;line-height:1.09!important;
    margin:13px 0 15px!important;
  }
  html body.seo-page .seo-hero > .shell p {
    font-size:clamp(14px,1.16vw,17px)!important;line-height:1.48!important;
    margin:0 0 14px!important;
  }
  html body.seo-page .seo-hero .seo-eyebrow {color:#c8f25c!important}
  html body.seo-page .seo-hero .seo-actions {
    max-width:min(500px,42vw)!important;
    display:flex!important;flex-wrap:wrap!important;position:relative!important;z-index:2!important;
  }
  /* Automation's original image intentionally has a light left-hand text area. */
  html body.service-automacao .seo-hero .seo-hero-media::after {
    background:linear-gradient(90deg,rgba(248,243,234,.67),rgba(248,243,234,.16) 40%,transparent 59%)!important;
  }
  html body.service-automacao .seo-hero > .shell :is(h1,p,.desktop-hero-title,.desktop-hero-summary) {
    color:#0a3e47!important;
  }
  html body.service-automacao .seo-hero .seo-eyebrow {color:#436d23!important}
  /* Standalone service details: replace split cards with edge-to-edge photographic hero. */
  html body.solution-detail-page .detail-hero.shell {
    isolation:isolate!important;
  }
  html body.solution-detail-page .detail-hero > .detail-media {
    position:absolute!important;display:block!important;inset:0!important;
    width:100%!important;height:100%!important;min-height:0!important;
    max-width:none!important;margin:0!important;padding:0!important;
    overflow:hidden!important;background:transparent!important;
    border-radius:0!important;transform:none!important;
  }
  html body.solution-detail-page .detail-hero .detail-media picture,
  html body.solution-detail-page .detail-hero .detail-media .hero-mobile-picture {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;
  }
  html body.solution-detail-page .detail-hero .detail-media img {
    position:absolute!important;display:block!important;inset:0!important;
    width:100%!important;height:100%!important;max-width:none!important;
    min-height:0!important;max-height:none!important;
    object-fit:cover!important;object-position:center center!important;
    transform:none!important;
  }
  html body.solution-detail-page .detail-hero .detail-copy {
    display:flex!important;position:relative!important;z-index:2!important;
    flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;
    width:min(530px,44vw)!important;height:100%!important;min-height:0!important;
    max-width:none!important;margin:0 0 0 max(24px,calc((100vw - 1180px)/2))!important;
    padding:22px 0!important;
    box-sizing:border-box!important;
    color:#fff!important;background:transparent!important;
    transform:none!important;
  }
  html body.solution-detail-page .detail-hero .detail-copy :is(h1,p,.desktop-hero-title,.desktop-hero-summary) {
    color:#fff!important;max-width:100%!important;
    overflow-wrap:break-word!important;
  }
  html body.solution-detail-page .detail-hero .detail-copy h1 {
    font-size:clamp(33px,3.55vw,51px)!important;line-height:1.12!important;
    margin:12px 0 16px!important;
  }
  html body.solution-detail-page .detail-hero .detail-copy p {
    font-size:clamp(13px,1.12vw,16px)!important;line-height:1.5!important;
    margin:0 0 20px!important;
  }
  html body.solution-detail-page .detail-hero .detail-copy .eyebrow {color:#c8f25c!important}
  /* Distinctive wide agenda photo has a dark free left area. */
  html body.solution-detail-agenda .detail-hero > .detail-media:after {
    content:"";pointer-events:none;position:absolute;inset:0;
    background:linear-gradient(90deg,rgba(2,42,48,.36),transparent 50%);
  }
  /* Marketing stays anchored to its R328 custom 16:9 art rather than generic split. */
  html body.marketing-page .marketing-hero {
    isolation:isolate!important;
  }
  html body.marketing-page .marketing-hero .marketing-hero-media {
    position:absolute!important;display:block!important;inset:0!important;
    width:100%!important;height:100%!important;
    overflow:hidden!important;z-index:0!important;
  }
  html body.marketing-page .marketing-hero .marketing-hero-media img {
    width:100%!important;height:100%!important;max-width:none!important;
    object-fit:cover!important;object-position:center center!important;
  }
  html body.marketing-page .marketing-hero .marketing-hero-copy {
    position:relative!important;z-index:2!important;
    width:min(500px,42vw)!important;max-width:none!important;
    margin-left:max(24px,calc((100vw - 1180px)/2))!important;
    padding:0!important;
    transform:translateY(-26px)!important;
  }
  html body.marketing-page .marketing-hero .marketing-hero-copy :is(h1,p) {
    overflow-wrap:break-word!important;
  }
  /* Long orders copy must be in the original left-hand breathing space. */
  html body.solutions-three-card-blue .seo-hero .hero-balanced-copy,
  html body.solutions-three-card-blue .seo-hero .desktop-hero-summary {
    display:block!important;
    width:100%!important;max-width:min(430px,37vw)!important;
    overflow-wrap:break-word!important;line-height:1.52!important;
    white-space:normal!important;
  }
}
/* Mobile is a separate art direction. No desktop positioning inherits across this boundary. */
@media (max-width:760px) {
  html body.public-shell-page :is(.hero-final.hero-split,.seo-hero,.detail-hero.shell,.marketing-hero) {
    width:100%!important;max-width:100%!important;
    margin:0!important;padding:0!important;
    border-radius:0!important;
    background-clip:padding-box;
    overflow:visible!important;
  }
  html body.public-shell-page :is(.hero-final,.seo-hero,.detail-hero,.marketing-hero) :is(.hero-image,.seo-hero-media img,.detail-media img,.marketing-hero-media img) {
    border-radius:0!important;object-fit:contain!important;
  }
  html body.public-shell-page :is(.hero-final,.seo-hero,.detail-hero,.marketing-hero) :is(.hero-visual,.seo-hero-media,.detail-media,.marketing-hero-media) {
    border-radius:0!important;
  }
  html body.solution-detail-page .detail-hero.shell .detail-copy {
    box-sizing:border-box!important;
  }
}

/* AUD-02: older standalone solutions had a 30/40px spacer on main itself. */
html body.solution-detail-page main#top:has(> .detail-hero:first-child),
html body.solution-detail-page main:has(> .detail-hero:first-child) {
  margin-top:0!important;padding-top:0!important;
}
html body.solution-detail-page main#top > .detail-hero:first-child,
html body.solution-detail-page main > .detail-hero:first-child {
  margin-top:0!important;
}
/* AUD-13: marketing copy anchored in the approved left breathing space. */
@media (min-width:761px) {
  html body.marketing-page .marketing-hero .marketing-hero-copy {
    position:absolute!important;z-index:3!important;
    inset:50% auto auto max(24px,calc((100vw - 1180px)/2))!important;
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    justify-content:center!important;
    width:min(475px,40vw)!important;max-width:475px!important;
    height:auto!important;min-height:0!important;
    margin:0!important;padding:0!important;
    transform:translateY(calc(-50% - 23px))!important;
    background:transparent!important;
  }
  /* Each paragraph stays in the safe breathing zone, away from the woman/photo. */
  html body.marketing-page .marketing-hero .marketing-hero-copy :is(h1,p,.marketing-hero-lead) {
    max-width:100%!important;white-space:normal!important;
  }
  html body.solutions-three-card-blue .seo-hero > .shell p.hero-balanced-copy {
    max-width:min(400px,35vw)!important;
  }
}

/* Final editorial spacing: words must end before the active illustration starts. */
@media (min-width:761px) {
  html body.service-automacao .seo-hero > .shell :is(h1,p,.desktop-hero-title,.desktop-hero-summary) {
    max-width:min(400px,37vw)!important;
  }
  html body.service-automacao .seo-hero > .shell h1 {
    font-size:clamp(34px,3.3vw,47px)!important;
  }
  html body.solution-detail-agenda .detail-hero .detail-copy {
    width:min(430px,39vw)!important;
  }
}

/* At tablet width, keep marketing buttons above the image's contrasting table edge. */
@media (min-width:761px) and (max-width:1100px) {
  html body.marketing-page .marketing-hero .marketing-hero-copy h1 {
    font-size:clamp(34px,4.25vw,45px)!important;
    line-height:1.08!important;
    margin:13px 0!important;
  }
  html body.marketing-page .marketing-hero .marketing-hero-copy p {
    font-size:14px!important;
    line-height:1.43!important;
    margin-bottom:16px!important;
  }
  html body.marketing-page .marketing-hero .marketing-hero-copy {
    transform:translateY(calc(-50% - 15px))!important;
  }
}

/* Audit AUD-03 to AUD-05 applies to every existing photographic hero,
   including the assisted diagnostic experience. */
html body.public-shell-page :is(.about-hero,.request-stage,.representatives-hero,.diagnostic-intro-stage) {
  border-radius:0!important;clip-path:none!important;
}
@media (min-width:761px) {
  html body.diagnostic-page main.shell {
    width:100%!important;max-width:none!important;
    margin:0!important;padding:0!important;
    background:transparent!important;
  }
  html body.diagnostic-page .diagnostic-intro-stage {
    position:relative!important;isolation:isolate!important;
    display:block!important;width:100%!important;max-width:none!important;
    height:clamp(520px,46vw,690px)!important;
    min-height:0!important;max-height:none!important;
    padding:0!important;margin:0!important;
    border-radius:0!important;overflow:hidden!important;
    background:transparent!important;
  }
  html body.diagnostic-page .diagnostic-intro-stage>.diagnostic-mobile-visual {
    position:absolute!important;display:block!important;z-index:0!important;
    inset:0!important;width:100%!important;height:100%!important;
    max-height:none!important;max-width:none!important;min-height:0!important;
    overflow:hidden!important;margin:0!important;padding:0!important;
    background:transparent!important;transform:none!important;
  }
  html body.diagnostic-page .diagnostic-intro-stage>.diagnostic-mobile-visual picture,
  html body.diagnostic-page .diagnostic-intro-stage>.diagnostic-mobile-visual img {
    position:absolute!important;display:block!important;inset:0!important;
    width:100%!important;height:100%!important;
    max-width:none!important;max-height:none!important;
    object-fit:cover!important;object-position:center!important;
    transform:none!important;border-radius:0!important;
  }
  html body.diagnostic-page .diagnostic-intro-stage>.hero {
    display:flex!important;position:relative!important;z-index:2!important;
    flex-direction:column!important;align-items:flex-start!important;
    justify-content:center!important;
    width:min(530px,42vw)!important;max-width:none!important;
    height:100%!important;min-height:0!important;
    margin:0 0 0 max(24px,calc((100vw - 1180px)/2))!important;
    padding:0!important;background:transparent!important;
    color:#fff!important;box-sizing:border-box!important;
  }
  html body.diagnostic-page .diagnostic-intro-stage>.hero :is(h1,p,.hero-copy) {
    color:#fff!important;max-width:100%!important;overflow-wrap:break-word!important;
  }
  html body.diagnostic-page main.shell > .surface,
  html body.diagnostic-page main.shell > .footer-note {
    width:min(1120px,calc(100% - 48px))!important;
    margin:28px auto 18px!important;
  }
  html body.public-shell-page .representatives-hero.shell {
    box-sizing:border-box!important;
    width:100%!important;max-width:none!important;
    height:clamp(520px,46vw,690px)!important;
    min-height:0!important;margin:0!important;
    border-radius:0!important;
    padding-left:max(24px,calc((100vw - 1180px)/2))!important;
    padding-right:max(24px,calc((100vw - 1180px)/2))!important;
  }
}

/* Diagnostic-only header bug: a mobile action panel was leaking into desktop grid. */
@media (min-width:981px) {
  html body.diagnostic-page .site-header .links .mobile-nav-actions {
    display:none!important;width:0!important;height:0!important;
  }
  html body.diagnostic-page .site-header .links {
    height:auto!important;min-height:0!important;
    max-height:88px!important;flex-wrap:nowrap!important;
    align-items:center!important;
  }
}
