/* R280: authored portrait hero art for each public mobile archetype.
   The desktop source and desktop cascade remain untouched. */

.diagnostic-mobile-visual {
  display: none;
}

/* R285 contract: mobile is its own editorial reading, not a squeezed desktop
   headline. The full desktop wording remains in the source; short mobile
   headlines always have one intentional break and therefore two lines. */
.mobile-hero-title,
.hero-tagline-mobile,
.mobile-hero-summary {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: clip;
  }

  /* Home: the portrait is the complete authored composition. The desktop
     picture must not reappear as a second panel below the copy. */
  body.home-page .hero-final {
    display: block !important;
    height: auto !important;
    min-height: calc(100svh - var(--sagaz-header-height)) !important;
    overflow: hidden !important;
    isolation: isolate !important;
    background-color: #062c32 !important;
    background-image: url('/assets/home-hero-mobile-r280.png') !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
  }

  body.home-page .hero-final > .hero-picture {
    display: none !important;
  }

  body.home-page .hero-final > .hero-overlay {
    display: none !important;
  }

  body.home-page .hero-final > .hero-content {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100svh - var(--sagaz-header-height)) !important;
    margin: 0 !important;
    padding: 24px 24px 30px !important;
    box-sizing: border-box !important;
    background: transparent !important;
  }

  body.home-page .hero-final .hero-description {
    display: none !important;
  }

  body.home-page .hero-final .hero-secondary-link {
    display: none !important;
  }

  body.home-page .hero-final .hero-telegram-entry {
    display: grid !important;
    justify-content: start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 310px !important;
    margin-top: 0 !important;
  }

  body.home-page .hero-final .hero-telegram-entry > .button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 10px 14px !important;
    text-align: center !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }

  body.home-page .hero-final .cta-label-desktop {
    display: none !important;
  }

  body.home-page .hero-final .cta-label-mobile {
    display: inline !important;
  }

  body.home-page .hero-final .hero-content .eyebrow {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
    color: #d6f8e7 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .1em !important;
    line-height: 1.35 !important;
  }

  body.home-page .hero-final .hero-content .eyebrow-line {
    display: block !important;
    white-space: nowrap !important;
  }

  body.home-page .hero-final .hero-content h1 {
    max-width: 12ch !important;
    margin: 15px 0 13px !important;
    color: #f7f2e6 !important;
    font-size: clamp(37px, 10vw, 46px) !important;
    font-weight: 850 !important;
    line-height: .98 !important;
    letter-spacing: -.055em !important;
    text-wrap: balance !important;
  }

  body.home-page .hero-final .hero-content h1 span {
    white-space: normal !important;
  }

  body.home-page .hero-final .hero-content .hero-tagline {
    max-width: 21ch !important;
    margin: 0 0 14px !important;
    color: #c8f25c !important;
    font-size: clamp(20px, 5.8vw, 25px) !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -.045em !important;
    text-wrap: balance !important;
  }

  body.home-page .proof-strip {
    margin-top: 0 !important;
    padding: 20px 0 !important;
    background: #e7efe5 !important;
    box-shadow: 0 0 0 100vmax #e7efe5 !important;
  }

  body.home-page .proof-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  body.home-page .proof-grid article {
    min-height: 0 !important;
    padding: 18px 18px 18px 68px !important;
    border: 1px solid rgba(6, 47, 56, .12) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.home-page .proof-grid article:not(:last-child) {
    border-right: 1px solid rgba(6, 47, 56, .12) !important;
  }

  body.home-page .proof-grid .proof-icon {
    top: 18px !important;
    left: 18px !important;
    color: #0b4854 !important;
  }

  body.home-page .proof-grid small {
    color: #496f76 !important;
  }

  body.home-page .proof-grid strong {
    color: #062f38 !important;
    font-size: 21px !important;
  }

  body.home-page .proof-grid span {
    color: #456369 !important;
  }

  /* Solutions landing: the picture is its own mobile panel, never a desktop crop. */
  .solutions-page .hero-split .hero-mobile-picture {
    display: block;
    order: 0;
    width: 100%;
    height: auto;
    margin: 0;
    background: #062f3a;
  }

  .solutions-page .hero-split .hero-mobile-picture .hero-image {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto;
    object-fit: contain !important;
    object-position: center;
  }

  /* Solution details: portrait art first, readable copy second. */
  body.solution-detail-page .detail-media {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    background: #062f3a;
  }

  body.solution-detail-page .detail-media > .hero-mobile-picture {
    display: block;
    width: 100%;
    height: auto;
  }

  body.solution-detail-page .detail-media > .hero-mobile-picture img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center;
  }

  /* SEO solution pages: replace the wide banner with a complete portrait panel. */
  .seo-page .seo-hero-media {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    background: #062f3a;
  }

  .seo-page .seo-hero-media > .hero-mobile-picture {
    display: block;
    width: 100%;
    height: auto;
  }

  .seo-page .seo-hero-media > .hero-mobile-picture img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center;
  }

  /* About: no text overlay on the portrait; image and copy are separate panels. */
  .about-page .about-hero {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    min-height: 0 !important;
  }

  .about-page .about-hero::after {
    display: none !important;
  }

  .about-page .about-hero-media {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    background: #062f3a;
  }

  .about-page .about-hero-media-image {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
  }

  .about-page .about-hero-inner {
    order: 1;
    width: 100% !important;
    padding: 28px 20px 42px !important;
    background: #062f3a;
  }

  /* Representatives: the guide image gets its own full-width portrait panel. */
  .representatives-page .representatives-hero {
    display: flex !important;
    flex-direction: column;
    min-height: 0 !important;
  }

  .representatives-page .representatives-hero::after {
    display: none !important;
  }

  .representatives-page .representatives-hero > .hero-mobile-picture {
    position: static;
    order: 0;
    display: block;
    width: 100%;
    height: auto;
    background: #123b49;
  }

  .representatives-page .representatives-hero > .hero-mobile-picture img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center;
  }

  .representatives-page .representatives-hero .hero-copy {
    order: 1;
    width: 100% !important;
    padding: 28px 20px 34px !important;
    background: #123b49;
  }

  /* Request: show the complete dedicated portrait before the form content. */
  .request-page .request-stage {
    padding-top: calc(100vw * 1.24955 + 24px) !important;
    background-image: url('/assets/solicitar-hero-mobile-r280.png') !important;
    background-position: center top !important;
    background-size: 100% auto !important;
    background-repeat: no-repeat !important;
  }

  /* Diagnostic: mobile art is intentionally separate from the interactive app. */
  .diagnostic-page .diagnostic-mobile-visual {
    display: block;
    margin: 0 0 22px;
    border-radius: 20px;
    overflow: hidden;
    background: #062f3a;
  }

  .diagnostic-page .diagnostic-mobile-visual img {
    display: block;
    width: 100%;
    height: auto;
  }

  .desktop-hero-title,
  .seo-page .seo-hero h1 .desktop-hero-title {
    display: none !important;
  }

  .mobile-hero-title {
    display: inline !important;
  }

  .desktop-hero-summary {
    display: none !important;
  }

  .mobile-hero-summary {
    display: inline !important;
  }

  .seo-page .seo-hero h1,
  .solution-detail-page .detail-copy h1,
  .representatives-page .representatives-hero h1 {
    max-width: 100% !important;
    font-size: clamp(29px, 8.1vw, 36px) !important;
    line-height: .96 !important;
    letter-spacing: -.045em !important;
    text-wrap: balance !important;
  }

  .seo-page .seo-hero p:not(.seo-eyebrow),
  .diagnostic-page .hero-copy {
    max-width: 31ch !important;
    font-size: 15px !important;
    line-height: 1.42 !important;
  }

  .diagnostic-page .hero h1 {
    max-width: 100% !important;
    font-size: clamp(29px, 8vw, 35px) !important;
    line-height: .97 !important;
    letter-spacing: -.04em !important;
  }
}

/* R285: a mobile header has exactly two visible controls. Older desktop
   grid tracks must not reserve space for hidden CTA or Central access. */
@media (max-width: 760px) {
  :root {
    --sagaz-header-height: 66px;
  }

  .public-shell-page .site-header > nav {
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: calc(100% - 32px) !important;
    gap: 12px !important;
  }

  .public-shell-page .site-header .brand-logo {
    width: 122px !important;
    min-width: 0 !important;
  }

  .public-shell-page .site-header .nav-cta,
  .public-shell-page .site-header .nav-operations {
    display: none !important;
  }

  .public-shell-page .site-header .nav-menu-toggle {
    justify-self: end !important;
    min-width: 96px !important;
    margin: 0 !important;
  }
}

/* R286: every mobile Hero is one authored scene. The portrait image supplies
   intentional negative space for the short copy; it is never a decorative
   panel above or below that copy. Desktop and tablet retain their own paths. */
@media (max-width: 760px) {
  .solutions-page .hero-split .hero-visual,
  .about-page .about-hero,
  .representatives-page .representatives-hero,
  body.solution-detail-page .detail-hero,
  .seo-page .seo-hero,
  .diagnostic-page .diagnostic-intro-stage {
    position: relative !important;
    isolation: isolate !important;
    display: block !important;
    min-height: clamp(620px, calc(100svh - var(--sagaz-header-height, 0px)), 760px) !important;
    overflow: hidden !important;
  }

  .solutions-page .hero-split .hero-mobile-picture,
  .about-page .about-hero-media,
  .representatives-page .representatives-hero > .hero-mobile-picture,
  body.solution-detail-page .detail-media,
  .seo-page .seo-hero-media,
  .seo-page .seo-hero-media--cream,
  .diagnostic-page .diagnostic-mobile-visual {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .solutions-page .hero-split .hero-mobile-picture img,
  .about-page .about-hero-media-image,
  .representatives-page .representatives-hero > .hero-mobile-picture img,
  body.solution-detail-page .detail-media > .hero-mobile-picture,
  body.solution-detail-page .detail-media > .hero-mobile-picture img,
  .seo-page .seo-hero-media img,
  .diagnostic-page .diagnostic-mobile-visual img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  .seo-page .seo-hero-media > .hero-mobile-picture,
  .diagnostic-page .diagnostic-mobile-visual > picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  .seo-page .seo-hero-media > .hero-mobile-picture img,
  .diagnostic-page .diagnostic-mobile-visual > picture img {
    height: 100% !important;
  }

  .solutions-page .hero-split .hero-content,
  .about-page .about-hero-inner,
  .representatives-page .representatives-hero .hero-copy,
  .seo-page .seo-hero > .shell,
  .diagnostic-page .diagnostic-intro-stage > .hero {
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: clamp(620px, calc(100svh - var(--sagaz-header-height, 0px)), 760px) !important;
    margin: 0 !important;
    padding: 42px 24px 34px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #f7f2e6 !important;
  }

  .solutions-page .hero-split .hero-content > *,
  .about-page .about-hero-inner > *,
  .representatives-page .representatives-hero .hero-copy > *,
  .seo-page .seo-hero > .shell > *,
  .diagnostic-page .diagnostic-intro-stage > .hero > * {
    color: #f7f2e6 !important;
  }

  .solutions-page .hero-split .hero-content h1,
  .about-page .about-hero-inner h1,
  .representatives-page .representatives-hero h1,
  .seo-page .seo-hero h1,
  .diagnostic-page .diagnostic-intro-stage .hero h1 {
    max-width: 10.5ch !important;
    margin: 14px 0 !important;
    font-size: clamp(31px, 8.8vw, 36px) !important;
    line-height: .98 !important;
    letter-spacing: -.05em !important;
  }

  .solutions-page .hero-split .hero-content p,
  .about-page .about-hero-inner p,
  .representatives-page .representatives-hero .hero-copy p,
  .seo-page .seo-hero p,
  .diagnostic-page .diagnostic-intro-stage .hero-copy {
    max-width: 27ch !important;
    margin: 0 0 20px !important;
    font-size: 15px !important;
    line-height: 1.38 !important;
  }

  .solutions-page .hero-split .hero-content .muted,
  .solutions-page .hero-split .hero-secondary-link,
  .representatives-page .representatives-hero .hero-copy .muted {
    display: none !important;
  }

  .solutions-page .hero-split .hero-content .eyebrow,
  .about-page .about-kicker,
  .representatives-page .representatives-hero .eyebrow,
  .seo-page .seo-hero .seo-eyebrow,
  .diagnostic-page .diagnostic-intro-stage .eyebrow {
    color: #c8f25c !important;
  }

  .about-page .about-hero-accent,
  .representatives-page .representatives-hero h1,
  .seo-page .seo-hero h1 .mobile-hero-title {
    color: #c8f25c !important;
  }

  /* Detail art is deliberately light. Its copy stays in the blank left field
     instead of being moved to a second cream card. */
  body.solution-detail-page .detail-hero {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #f7f2e6 !important;
  }

  body.solution-detail-page .detail-copy {
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: clamp(620px, calc(100svh - var(--sagaz-header-height, 0px)), 760px) !important;
    padding: 42px 24px 34px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #073e48 !important;
  }

  body.solution-detail-page .detail-copy > * { color: #073e48 !important; }
  body.solution-detail-page .detail-copy h1 { max-width: 9.5ch !important; }
  body.solution-detail-page .detail-copy p { max-width: 25ch !important; font-size: 15px !important; line-height: 1.4 !important; }
  body.solution-detail-page .detail-copy .eyebrow { color: #4c7c1c !important; }

  .diagnostic-page .diagnostic-intro-stage > .hero { padding-top: 34px !important; }
  .diagnostic-page .diagnostic-intro-stage .hero-copy { color: #f7f2e6 !important; }

  /* The older editorial routes keep their approved wording, but their mobile
     headline is intentionally smaller so one authored break remains two real
     lines instead of turning into a third accidental line. */
  .seo-page .seo-hero h1 {
    max-width: 13ch !important;
    font-size: clamp(26px, 7.4vw, 30px) !important;
  }

  .diagnostic-page .diagnostic-intro-stage .hero h1 {
    max-width: 15ch !important;
    font-size: clamp(29px, 8vw, 32px) !important;
  }
}

/* R288: the art supplies the breathing room. Mobile copy and actions must
   never be darkened, float over a subject, or force a drawer item to overlap. */
@media (max-width: 760px) {
  @keyframes sagaz-mobile-lime-sweep {
    0%, 20% { background-position: 140% 50%; }
    55%, 100% { background-position: -40% 50%; }
  }

  .public-shell-page .mobile-hero-title {
    background: linear-gradient(110deg, #f7f2e6 35%, #f7f2e6 43%, #c8f25c 50%, #809c43 54%, #f7f2e6 61%, #f7f2e6 69%) !important;
    background-size: 240% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: sagaz-mobile-lime-sweep 6.5s ease-in-out infinite !important;
  }

  /* The lime sweep belongs to the words, never to a mask over the scene.
     The Home title does not use .mobile-hero-title, so it receives the same
     type-only treatment explicitly. */
  body.home-page .hero-final .hero-content h1 {
    background: linear-gradient(110deg, #f7f2e6 35%, #f7f2e6 43%, #c8f25c 50%, #809c43 54%, #f7f2e6 61%, #f7f2e6 69%) !important;
    background-size: 240% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: sagaz-mobile-lime-sweep 6.5s ease-in-out infinite !important;
  }

  @media (prefers-reduced-motion: reduce) {
    .public-shell-page .mobile-hero-title {
      animation: none !important;
      background-position: 50% 50% !important;
    }
  }

  /* The main solutions title has enough clear sky in the art for one natural line. */
  .solutions-page .hero-split .hero-content {
    width: 100% !important;
    min-height: 0 !important;
    padding: 34px 24px 0 !important;
  }
  .solutions-page .hero-split .hero-content h1 {
    max-width: 100% !important;
  }
  .solutions-page .hero-split .hero-content .mobile-hero-title br {
    display: none !important;
  }
  .solutions-page .hero-split .hero-content > p:not(.muted) {
    max-width: 25ch !important;
  }

  /* This legacy blue overlay duplicates the breathing room now authored in
     the mobile artwork. Removing it preserves the scene and its contrast. */
  body.solutions-page .hero-visual.hero-media::before {
    content: none !important;
    display: none !important;
    background: none !important;
  }

  /* The authored about portrait already includes its quiet upper field. Do
     not cover it with the legacy petroleum mask merely to make copy readable. */
  body.about-page .about-hero::after {
    content: none !important;
    display: none !important;
    background: none !important;
  }

  /* R280 portrait art has a dark upper-left field. Keep all detail copy there,
     in high contrast, and keep the action compact instead of crossing a person. */
  body.solution-detail-page .detail-copy,
  body.solution-detail-page .detail-copy > * {
    color: #f7f2e6 !important;
  }
  body.solution-detail-page .detail-copy {
    width: min(82%, 330px) !important;
    min-height: 0 !important;
    padding: 24px 0 0 24px !important;
  }
  body.solution-detail-page .detail-copy .eyebrow {
    color: #c8f25c !important;
  }
  body.solution-detail-page .detail-copy h1 {
    max-width: 100% !important;
    margin: 10px 0 !important;
    font-size: clamp(31px, 8.5vw, 34px) !important;
  }
  body.solution-detail-page .detail-copy p {
    max-width: 25ch !important;
    margin: 0 0 10px !important;
    font-size: 14px !important;
    line-height: 1.32 !important;
  }
  body.solution-detail-page .detail-copy .button {
    width: min(100%, 208px) !important;
    min-height: 44px !important;
    margin-top: 4px !important;
    padding-inline: 12px !important;
  }

  /* The representative portrait begins below this short left-side information field. */
  .representatives-page .representatives-hero .hero-copy {
    width: min(84%, 330px) !important;
    min-height: 0 !important;
    padding: 34px 0 0 24px !important;
  }
  .representatives-page .representatives-hero h1 {
    font-size: clamp(31px, 8.6vw, 34px) !important;
  }
  .representatives-page .representatives-hero .hero-copy > p:not(.micro) {
    max-width: 25ch !important;
    font-size: 14px !important;
    line-height: 1.32 !important;
  }
  .representatives-page .representatives-hero .hero-actions {
    width: min(100%, 208px) !important;
    margin-top: 8px !important;
  }
  .representatives-page .representatives-hero .hero-actions .ghost {
    display: none !important;
  }

  /* An expanded group is part of the drawer flow, never an absolutely
     positioned layer over the following group. */
  .public-shell-page .site-header.nav-open .links > .nav-dropdown {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    min-height: 58px !important;
    overflow: hidden !important;
  }
  .public-shell-page .site-header.nav-open .links > .nav-dropdown > .nav-context-link {
    flex: 1 1 0 !important;
  }
  .public-shell-page .site-header.nav-open .links > .nav-dropdown > .nav-caret {
    flex: 0 0 54px !important;
  }
  .public-shell-page .site-header.nav-open .links > .nav-dropdown > .nav-dropdown-menu:not([hidden]) {
    position: static !important;
    display: grid !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 10px 10px !important;
  }
  .public-shell-page .site-header.nav-open .links > .nav-dropdown > .nav-dropdown-menu[hidden] {
    display: none !important;
  }

  .public-shell-page .site-header .mobile-nav-actions {
    display: none;
  }
  .public-shell-page .site-header.nav-open .links > .mobile-nav-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 6px !important;
  }
  .public-shell-page .site-header.nav-open .mobile-nav-actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
  }
  .public-shell-page .site-header.nav-open .mobile-nav-diagnostic {
    background: #c8f25c !important;
    color: #062f38 !important;
  }
  .public-shell-page .site-header.nav-open .mobile-nav-central {
    gap: 9px !important;
    border: 1px solid rgba(247,242,230,.34) !important;
    color: #f7f2e6 !important;
  }
  .public-shell-page .site-header.nav-open .mobile-nav-central svg {
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
  }
}

