/* Cinematic hero: the hospital is the stage. Two looks are built in.
   Look A "Full stage" is the default; <html data-hero="b"> selects Look B "Wide screen".
   Without scripts, or with reduced motion, the hero is one static block that shows everything. */
:root{--nav-h:72px}
@media(max-width:860px){:root{--nav-h:64px}}
.tw-hero{padding-block:0 48px;background:var(--ground);color:var(--ink)}
.tw-hero-track{position:relative}
.tw-hero-pin{position:relative;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:22px;padding:36px 20px 20px;overflow:hidden;background:var(--ground)}
.tw-hero-copy{grid-area:auto;position:relative;z-index:2;min-width:0;max-width:680px}
.tw-hero .display{margin-top:16px}
.tw-hero .lead{margin-top:20px}
.tw-hero .tw-ctas{margin-top:24px;gap:10px}
.tw-hero .hero-motion-card{position:relative;min-width:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--ink)}
.tw-hero .tw3-head{padding:0 0 8px}
.hero-motion-frame{position:relative;display:flex;justify-content:center;margin-inline:-20px}
.hero-motion-picture{position:relative;flex:none;width:100%;max-width:1536px;aspect-ratio:3/2}
.hero-motion-drift{position:absolute;inset:0;transform-origin:50% 58%}
.hero-motion-scene{position:absolute;inset:0;opacity:0;pointer-events:none}
.hero-motion-scene:first-child{opacity:1}
.hero-motion-scene:nth-child(2){transform-origin:50% 38%}
.hero-motion-scene:nth-child(3){transform-origin:24% 31%}
.hero-motion-scene>img,.hero-motion-scene>svg,.hero-motion-scene>object{position:absolute;inset:0;display:block;width:100%;height:100%;border:0}
/* The pictures carry their own night sky; a soft edge fade lets it meet the page's. */
.hero-motion-scene>img,.tw-cta-drift>img{object-fit:contain;-webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent),linear-gradient(180deg,transparent,#000 7%,#000 93%,transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent),linear-gradient(180deg,transparent,#000 7%,#000 93%,transparent);mask-composite:intersect}
.tw-hero .tw3-stats{position:relative;z-index:3;gap:12px;padding:14px 0 0;border-top:1px solid var(--rule)}
.tw-hero .tw3-stats b{font-size:26px;line-height:32px}
.tw-hero .tw3-stats span{font-size:13px;line-height:18px}
.tw-hero-pin>.tw-caption{margin:0;padding-right:52px}
.tw-hero>.tw-wrap>.tw-points{margin-top:0}
html[data-hero="b"] .tw-hero-copy{margin-inline:auto;text-align:center}
html[data-hero="b"] .tw-hero .tw-ctas{align-items:center}

/* Marks drawn over the pictures: floor light, the ambulance beacon, patients on their routes. */
.hm-fx,.hero-motion-wings{display:none}
.hm-fx{overflow:visible}
html.motion-on .hm-fx{display:block}
.hm-route{fill:none;stroke:#b6d1ff;stroke-width:2;stroke-dasharray:5 12;opacity:.2}
.hm-dot{fill:#e6efff;stroke:#0a1120;stroke-width:1.5;opacity:0}
.hm-glow{opacity:0;mix-blend-mode:screen}
.hm-beacon{fill:#ff8a73;opacity:0;transform-box:fill-box;transform-origin:center}
html.motion-on .hm-glow{animation:hm-glow 6s ease-in-out infinite}
html.motion-on .hm-beacon{animation:hm-beacon 1.6s ease-in-out infinite}
html.motion-on .hm-dot{animation:hm-r-g1 11s linear infinite}
html.motion-on .hm-dot.r-g2{animation-name:hm-r-g2}
html.motion-on .hm-dot.r-s1{animation-name:hm-r-s1}
html.motion-on .hm-dot.r-s2{animation-name:hm-r-s2}
html.motion-on .hm-dot.r-home{animation-name:hm-r-home;animation-duration:14s}
html.motion-on .hero-motion-drift{animation:hm-drift 10s ease-in-out infinite alternate}
html.motion-on .tw-cta-drift{animation:hm-drift 13s ease-in-out infinite alternate}
@keyframes hm-drift{from{transform:scale(1) translate3d(0,0,0)}to{transform:scale(1.05) translate3d(-1.2%,-.6%,0)}}
@keyframes hm-glow{0%,100%{opacity:.04}50%{opacity:.5}}
@keyframes hm-beacon{0%,100%{opacity:.12;transform:scale(.6)}50%{opacity:.95;transform:scale(1.3)}}
@keyframes hm-r-g1{0%{transform:translate(840px,945px);opacity:0}6%{transform:translate(840px,945px);opacity:1}52.1%{transform:translate(520px,783px);opacity:1}83.9%{transform:translate(300px,671px);opacity:1}94%{transform:translate(372px,640px);opacity:1}100%{transform:translate(372px,640px);opacity:0}}
@keyframes hm-r-g2{0%{transform:translate(840px,945px);opacity:0}6%{transform:translate(840px,945px);opacity:1}56%{transform:translate(610px,829px);opacity:1}77.5%{transform:translate(690px,752px);opacity:1}94%{transform:translate(765px,712px);opacity:1}100%{transform:translate(765px,712px);opacity:0}}
@keyframes hm-r-s1{0%{transform:translate(300px,770px);opacity:0}6%{transform:translate(300px,770px);opacity:1}28.8%{transform:translate(375px,742px);opacity:1}65.2%{transform:translate(500px,716px);opacity:1}94%{transform:translate(600px,700px);opacity:1}100%{transform:translate(600px,700px);opacity:0}}
@keyframes hm-r-s2{0%{transform:translate(600px,700px);opacity:0}6%{transform:translate(600px,700px);opacity:1}25.9%{transform:translate(760px,705px);opacity:1}45.8%{transform:translate(760px,545px);opacity:1}70.1%{transform:translate(760px,350px);opacity:1}94%{transform:translate(930px,440px);opacity:1}100%{transform:translate(930px,440px);opacity:0}}
@keyframes hm-r-home{0%{transform:translate(765px,712px);opacity:0}6%{transform:translate(765px,712px);opacity:1}22.5%{transform:translate(690px,752px);opacity:1}44%{transform:translate(610px,829px);opacity:1}94%{transform:translate(840px,945px);opacity:1}100%{transform:translate(840px,945px);opacity:0}}

/* Floors open: with motion on, the stage stays pinned for one and a half screens while the scroll drives the scenes.
   A stage taller than the screen pins by its lower edge, so the hospital and counters stay in view. */
html.motion-on .tw-hero-track{height:calc(var(--pin-h,100vh) + 150vh);height:calc(var(--pin-h,100svh) + 150svh)}
html.motion-on .tw-hero-pin{position:sticky;top:min(var(--nav-h),calc(100vh - var(--pin-h,100vh)));top:min(var(--nav-h),calc(100svh - var(--pin-h,100svh)))}

@media(min-width:641px){
  .tw-hero-pin{padding:48px 32px 24px;gap:28px}
  .hero-motion-frame{margin-inline:-32px}
  .tw-hero .tw3-stats b{font-size:28px;line-height:34px}
  .tw-hero .tw3-stats span{font-size:14px;line-height:20px}
}

@media(min-width:1001px) and (min-height:700px){
  /* Look A, "Full stage": the hospital is the backdrop of the whole first screen. */
  html:not([data-hero="b"]) .tw-hero-pin{display:flex;flex-direction:column;justify-content:center;min-height:calc(100vh - var(--nav-h));min-height:calc(100svh - var(--nav-h));padding:24px 0 148px 64px}
  html:not([data-hero="b"]) .tw-hero-copy{width:min(470px,34vw)}
  html:not([data-hero="b"]) .tw-hero .hero-motion-card{position:absolute;inset:0}
  html:not([data-hero="b"]) .hero-motion-card::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,#0a1120 0,#0a1120 25%,rgba(10,17,32,.8) 34%,rgba(10,17,32,0) 47%)}
  html:not([data-hero="b"]) .hero-motion-frame{position:absolute;left:0;right:0;top:0;bottom:34px;margin:0;align-items:center;justify-content:flex-end;padding-right:max(0px,calc((100vw - 2136px)/2))}
  html:not([data-hero="b"]) .hero-motion-picture{width:auto;height:min(100%,1024px,calc((100vw - 330px)/1.5))}
  html:not([data-hero="b"]) .hero-motion-scene:nth-child(3)>object{left:auto;right:0;top:50%;width:min(100%,calc(100vw - min(470px,34vw) - 96px));height:auto;aspect-ratio:800/550;transform:translateY(-50%)}
  html:not([data-hero="b"]) .hero-motion-scene:nth-child(3){transform-origin:46% 34%}
  html:not([data-hero="b"]) .tw-hero .tw3-head{position:absolute;z-index:3;top:22px;right:64px;padding:0}
  html:not([data-hero="b"]) .tw-hero .tw3-stats{position:absolute;left:0;right:0;bottom:38px;padding:22px 64px 10px;border-top:0;background:linear-gradient(180deg,rgba(10,17,32,0),rgba(10,17,32,.92) 38%,#0a1120)}
  html:not([data-hero="b"]) .tw-hero-pin>.tw-caption{position:absolute;z-index:3;left:64px;right:64px;bottom:12px}

  /* Look B, "Wide screen": headline centered on top, the hospital in one wide stage below, counters under it. */
  html[data-hero="b"] .tw-hero-pin{grid-template-rows:auto minmax(260px,1fr) auto;gap:10px;min-height:calc(100vh - var(--nav-h));min-height:calc(100svh - var(--nav-h));padding:22px 64px 12px;justify-items:center}
  html[data-hero="b"] .tw-hero-copy{max-width:1040px;display:grid;justify-items:center}
  html[data-hero="b"] .tw-hero .display{margin-top:8px;font-size:clamp(40px,3.9vw,56px)}
  html[data-hero="b"] .tw-hero .lead{max-width:1000px;margin-top:10px;font-size:19px;line-height:28px}
  html[data-hero="b"] .tw-hero .tw-ctas{flex-direction:row;justify-content:center;gap:28px;margin-top:14px}
  html[data-hero="b"] .tw-hero .hero-motion-card{width:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto}
  html[data-hero="b"] .hero-motion-frame{display:block;min-height:0;margin-inline:-64px}
  html[data-hero="b"] .hero-motion-picture{position:absolute;top:0;left:50%;width:auto;height:calc(100% + 64px);max-height:1024px;transform:translateX(-50%)}
  /* The wide stage: patients travel in along a ground line from one screen edge to the other. */
  html[data-hero="b"].motion-on .hero-motion-wings{display:block;position:absolute;left:0;right:0;top:80%;height:8px;background:linear-gradient(90deg,transparent,var(--ceil-line) 12%,var(--ceil-line) 88%,transparent) center/100% 1px no-repeat;opacity:.55}
  html[data-hero="b"].motion-on .hero-motion-wings i{position:absolute;inset:0;animation:takt-run-x 18s linear infinite}
  html[data-hero="b"].motion-on .hero-motion-wings i::after{content:"";position:absolute;right:0;top:1px;width:6px;height:6px;border-radius:50%;background:var(--ceil-strong)}
  .hero-motion-wings i:nth-child(2){animation-delay:-4.5s!important}.hero-motion-wings i:nth-child(3){animation-delay:-9s!important}.hero-motion-wings i:nth-child(4){animation-delay:-13.5s!important}
  html[data-hero="b"] .tw-hero .tw3-head{position:absolute;z-index:3;left:0;top:4px;padding:0}
  html[data-hero="b"] .tw-hero .tw3-stats{width:min(100%,900px);margin:0 auto;padding-top:10px;text-align:center;border-top:0;background:radial-gradient(closest-side,rgba(10,17,32,.9),rgba(10,17,32,0))}
  html[data-hero="b"] .tw-hero-pin>.tw-caption{text-align:center}
}

/* Closing shot: the same hospital, calm. A color filter cools the gold floor; nothing else is redrawn. */
.tw-cta{position:relative;overflow:hidden}
.tw-cta-inner{position:relative;z-index:1}
.tw-cta-defs{position:absolute}
.tw-cta-shot{position:relative;width:100%;max-width:1536px;aspect-ratio:3/2;margin:32px auto -48px;pointer-events:none}
.tw-cta-drift{position:absolute;inset:0;transform-origin:50% 58%}
.tw-cta-drift>img,.tw-cta-drift>svg{position:absolute;inset:0;display:block;width:100%;height:100%}
.tw-cta-drift>img{filter:url(#takt-calm)}
@media(min-width:1001px){
  .tw-cta .h1{max-width:640px}
  .tw-cta .lead{max-width:500px}
  .tw-cta-shot{position:absolute;right:max(0px,calc((100vw - 1700px)/2));top:50%;width:auto;height:min(112%,720px,calc((100vw - 520px)/1.5));margin:0;transform:translateY(-50%)}
  .tw-cta-shot::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--ground) 0,rgba(10,17,32,0) 30%)}
}
