/* Mitsiry Hero Viewport v23
   Final first-view contract: the hero always covers the initial viewport,
   while content is allowed to grow naturally on short screens. */

body.ms-orbital-theme .ms-unified-hero{
  position:relative!important;
  height:auto!important;
  min-height:100vh!important;
  min-height:100svh!important;
  min-height:100dvh!important;
  max-height:none!important;
  display:flex!important;
  align-items:stretch!important;
  overflow:hidden!important;
  isolation:isolate;
}

body.ms-orbital-theme .ms-unified-hero>.ms-hero-backdrop,
body.ms-orbital-theme .ms-unified-hero>img.ms-hero-backdrop{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  object-fit:cover!important;
}

body.ms-orbital-theme .ms-unified-hero-grid{
  position:relative!important;
  z-index:5!important;
  width:min(1360px,calc(100% - clamp(40px,6vw,96px)))!important;
  max-width:1360px!important;
  height:auto!important;
  min-height:100vh!important;
  min-height:100svh!important;
  min-height:100dvh!important;
  max-height:none!important;
  margin:0 auto!important;
  padding:clamp(108px,11vh,144px) 0 clamp(64px,8vh,92px)!important;
  align-items:center!important;
}

/* Remove the old fixed editorial footprint that caused long titles to overflow
   their own box and collide with the lead paragraph. */
body.ms-orbital-theme .ms-unified-hero-grid>.ms-unified-hero-copy{
  min-height:0!important;
  height:auto!important;
}
body.ms-orbital-theme .ms-unified-hero-copy h1,
body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title{
  min-height:0!important;
  height:auto!important;
  flex:0 0 auto!important;
  overflow:visible!important;
}
body.ms-orbital-theme .ms-unified-hero-copy>p:not(.vision-hero-eyebrow):not(.editorial-eyebrow):not(.ms-trace-kicker):not(.vision-hero-note),
body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-subtitle{
  min-height:0!important;
  height:auto!important;
  flex:0 0 auto!important;
}

/* Desktop / projector: stable two-column stage, with copy measured by content. */
@media(min-width:961px){
  body.ms-orbital-theme .ms-unified-hero-grid{
    display:grid!important;
    grid-template-columns:minmax(0,.98fr) minmax(500px,1.02fr)!important;
    grid-template-rows:auto!important;
    gap:clamp(34px,4vw,72px)!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-unified-hero-copy{
    order:1!important;
    grid-column:1!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:start!important;
    width:100%!important;
    max-width:640px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    margin:0!important;
    padding:0!important;
    text-align:left!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy :is(.editorial-eyebrow,.vision-hero-eyebrow,.ms-trace-kicker){
    min-height:0!important;
    margin:0 0 16px!important;
    text-align:left!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy h1,
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title{
    width:100%!important;
    max-width:640px!important;
    margin:0 0 22px!important;
    font-size:clamp(3rem,3.35vw,4.2rem)!important;
    line-height:1.045!important;
    letter-spacing:-.052em!important;
    text-align:left!important;
    text-wrap:balance;
  }
  body.ms-orbital-theme .ms-unified-hero-copy h1 :is(span,em),
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title :is(span,em){
    display:block!important;
    max-width:100%!important;
    line-height:inherit!important;
    position:static!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy>p:not(.vision-hero-eyebrow):not(.editorial-eyebrow):not(.ms-trace-kicker):not(.vision-hero-note),
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-subtitle{
    width:100%!important;
    max-width:600px!important;
    margin:0!important;
    font-size:clamp(1rem,1.05vw,1.12rem)!important;
    line-height:1.68!important;
    text-align:left!important;
    text-wrap:pretty;
  }
  body.ms-orbital-theme .ms-unified-hero-copy>.editorial-button{
    align-self:flex-start!important;
    width:auto!important;
    min-width:220px!important;
    margin:25px 0 0!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy :is(.vision-actions,.ms-trace-actions){
    margin:25px 0 0!important;
    min-height:0!important;
    justify-content:flex-start!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-constellation,
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-home-orbit{
    order:2!important;
    grid-column:2!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:end!important;
    width:min(44vw,620px)!important;
    max-width:620px!important;
    min-width:470px!important;
    margin:0!important;
    transform:none!important;
  }
}

/* Compact laptops: keep the split layout, but reduce type before it can collide. */
@media(min-width:961px) and (max-width:1180px){
  body.ms-orbital-theme .ms-unified-hero-grid{
    width:calc(100% - 48px)!important;
    grid-template-columns:minmax(0,1fr) minmax(450px,.96fr)!important;
    gap:26px!important;
    padding-top:110px!important;
    padding-bottom:56px!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy h1,
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title{
    font-size:clamp(2.65rem,4vw,3.55rem)!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-constellation,
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-home-orbit{
    width:min(46vw,540px)!important;
    min-width:440px!important;
  }
}

/* Tablet: content can exceed one viewport, but the background never ends before it. */
@media(max-width:960px){
  body.ms-orbital-theme .ms-unified-hero{
    display:block!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid{
    width:min(100% - 36px,780px)!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    justify-items:center!important;
    align-items:start!important;
    gap:24px!important;
    padding:104px 0 52px!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-unified-hero-copy{
    order:1!important;
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    max-width:720px!important;
    margin:0 auto!important;
    text-align:center!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy :is(.editorial-eyebrow,.vision-hero-eyebrow,.ms-trace-kicker){
    min-height:0!important;
    margin:0 auto 13px!important;
    text-align:center!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy h1,
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title{
    width:100%!important;
    max-width:720px!important;
    margin:0 auto 18px!important;
    font-size:clamp(2.65rem,7vw,4.15rem)!important;
    line-height:1.04!important;
    text-align:center!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy>p:not(.vision-hero-eyebrow):not(.editorial-eyebrow):not(.ms-trace-kicker):not(.vision-hero-note),
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-subtitle{
    max-width:650px!important;
    margin:0 auto!important;
    line-height:1.62!important;
    text-align:center!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy>.editorial-button{
    width:max-content!important;
    max-width:100%!important;
    margin:23px auto 0!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy :is(.vision-actions,.ms-trace-actions){
    margin:23px auto 0!important;
    justify-content:center!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-constellation,
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-home-orbit{
    order:2!important;
    grid-column:1!important;
    grid-row:2!important;
    width:min(86vw,540px)!important;
    max-width:540px!important;
    min-width:0!important;
    margin:0 auto!important;
    transform:none!important;
  }
}

/* Phone: tighter first view without ever forcing content into a fixed height. */
@media(max-width:560px){
  body.ms-orbital-theme .ms-unified-hero-grid{
    width:calc(100% - 28px)!important;
    gap:18px!important;
    padding:92px 0 38px!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy :is(.editorial-eyebrow,.vision-hero-eyebrow,.ms-trace-kicker){
    margin-bottom:11px!important;
    font-size:.68rem!important;
    line-height:1.35!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy h1,
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title{
    margin-bottom:16px!important;
    font-size:clamp(2.15rem,10.2vw,3.15rem)!important;
    line-height:1.045!important;
    letter-spacing:-.047em!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy>p:not(.vision-hero-eyebrow):not(.editorial-eyebrow):not(.ms-trace-kicker):not(.vision-hero-note),
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-subtitle{
    font-size:.96rem!important;
    line-height:1.58!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy>.editorial-button,
  body.ms-orbital-theme .ms-unified-hero-copy :is(.vision-actions,.ms-trace-actions){
    margin-top:20px!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-constellation,
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-home-orbit{
    width:min(94vw,430px)!important;
  }
}

/* Very short desktop windows: allow the hero to grow instead of clipping copy. */
@media(min-width:961px) and (max-height:760px){
  body.ms-orbital-theme .ms-unified-hero-grid{
    padding-top:104px!important;
    padding-bottom:48px!important;
  }
  body.ms-orbital-theme .ms-unified-hero-copy h1,
  body.ms-orbital-theme .ms-unified-hero-copy .ms-trace-title{
    font-size:clamp(2.45rem,3.65vw,3.35rem)!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-constellation,
  body.ms-orbital-theme .ms-unified-hero-grid>.ms-home-orbit{
    width:min(42vw,520px)!important;
    min-width:430px!important;
  }
}
