/* XMS v1.4.01 — targeted recovery of homepage hero, true video bleed,
   and full-building CTA. Loaded after legacy styles on purpose. */

/* Video: legacy v1.3.99 combined left:50% and a separate "center to viewport"
   negative margin from v1.3.92. Together they shifted the ENTIRE video right.
   Use ONE consistent positioning mechanism; never overflow the viewport. */
html:has(body.xms-home-study.xms-has-home-video),
body.xms-theme.xms-home-study.xms-has-home-video {overflow-x:clip !important;}
body.xms-theme.xms-home-study.xms-has-home-video .xms-main > .xms-top-video {
  position:relative !important;
  left:0 !important;
  right:auto !important;
  transform:none !important;
  display:block !important;
  grid-column:1 / -1 !important;
  width:100vw !important;
  max-width:100vw !important;
  min-width:100vw !important;
  margin-left:calc(50% - 50vw) !important;
  margin-right:0 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}
body.xms-theme.xms-home-study.xms-has-home-video .xms-main > .xms-top-video > .xms-top-video-frame {
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  background-color:#bfc0c6 !important;
  background-position:center center !important;
  background-size:cover !important;
}
/* Preserve uncropped source text/logo in the foreground. Side extension is
   the live blurred canvas for bundled MP4, otherwise the matching poster. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-native,
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-embed {
  left:50% !important;
  right:auto !important;
  top:0 !important;
  margin:0 !important;
  transform:translateX(-50%) !important;
  height:100% !important;
  max-height:100% !important;
  width:min(100vw,calc(var(--xms-video-h) * 16 / 9)) !important;
  max-width:100vw !important;
  object-fit:contain !important;
  object-position:center center !important;
}
/* Properly fill the side bleed even before the first video frame renders. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame::before {
  content:"";
  display:block;
  position:absolute;
  inset:-20px;
  background:var(--xms-video-poster) center center / cover no-repeat;
  opacity:.54;
  filter:blur(20px) saturate(.8);
  pointer-events:none;
}
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame .xms-top-video-edge-canvas{
  z-index:1 !important;
}
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame .xms-top-video-native,
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame .xms-top-video-embed{
  z-index:2 !important;
}

/* Home introduction: restore the tidy, square-sided split card. Remove the
   old 6.5% image overscan which was cropping the selected globe artwork. */
body.xms-theme.xms-home-study .xms-main > .xms-section-study_hero {
  transform:none !important;
  overflow:hidden !important;
}
body.xms-theme.xms-home-study .xms-section-study_hero .xms-study-hero-visual.xms-study-hero-single img {
  transform:none !important;
  object-position:center center !important;
}
@media (min-width:701px){
 body.xms-theme.xms-home-study .xms-section-study_hero .xms-study-hero-single::before {
  width:32% !important;
  background:linear-gradient(90deg,#f9f9f9 0%,rgba(249,249,249,.9) 22%,rgba(249,249,249,0) 100%) !important;
 }
}

/* Contact CTA: gray background goes across the COMPLETE card, but the
   actual 1200x628 building photo is fitted by HEIGHT, never by 'cover'.
   No top/bottom building clipping regardless of the card's wide aspect. */
body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact {
  position:relative !important;
  overflow:hidden !important;
  isolation:isolate !important;
  background:linear-gradient(90deg,#f8f8f8 0%,#f5f5f5 37%,#ececec 65%,#dedfe0 100%) !important;
}
body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-orbit {
  position:absolute !important;
  display:block !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  opacity:1 !important;
  z-index:1 !important;
  border-radius:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
  background:linear-gradient(90deg,#f8f8f8 0%,#f5f5f5 46%,#ebebec 76%,#d9dadb 100%) !important;
}
body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-orbit img {
  position:relative !important;
  display:block !important;
  float:none !important;
  margin:0 0 0 auto !important;
  padding:0 !important;
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  height:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:right bottom !important;
  transform:none !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  filter:grayscale(1) contrast(1.02) !important;
}
body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-orbit::before {
  content:"" !important;
  position:absolute !important;
  display:block !important;
  inset:0 !important;
  z-index:2 !important;
  pointer-events:none !important;
  background:linear-gradient(90deg,
    #f8f8f8 0%,
    rgba(247,247,247,.99) 33%,
    rgba(245,245,245,.96) 46%,
    rgba(242,242,242,.76) 53%,
    rgba(238,238,238,.32) 64%,
    rgba(238,238,238,0) 79%) !important;
}
body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-copy,
body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-details {
 position:relative !important;
 z-index:3 !important;
}
@media(max-width:700px){
 body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-orbit {
   inset:0 !important;
   width:100% !important;
   height:100% !important;
   opacity:1 !important;
 }
 body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-orbit img {
   width:auto !important;
   max-width:none !important;
   height:72% !important;
   max-height:72% !important;
   margin:0 0 0 auto !important;
   position:absolute !important;
   right:0 !important;
   bottom:0 !important;
   opacity:.43 !important;
 }
 body.xms-theme.xms-home-study .xms-main > .xms-section-study_contact .xms-study-contact-orbit::before {
   background:linear-gradient(180deg,#f8f8f8 0%,rgba(247,247,247,.96) 25%,rgba(244,244,244,.83) 46%,rgba(238,238,238,.48) 69%,rgba(238,238,238,.04) 100%) !important;
 }
}
