/* =====================================================================
   HÆLTH — home: hero type + care paths. After Standard, Oct 2026.
   (the scan lens styles travel with scan.js, so the lens works on every page)
   ===================================================================== */

/* hero: the banner we had, in the clinic type */
.sx-hero .vh__title em{font-family:inherit;font-style:normal;font-weight:inherit;color:var(--fg-3);font-size:1em;letter-spacing:inherit;padding:0}
.sx-hero .vh__title{letter-spacing:-.05em;line-height:.95}
@media (max-width:759px){.sx-hero .sx-sep,.sx-hero .sx-e2{display:none}}
/* the film just runs: no chapter bar, only the pause control in the corner */
.sx-hero .vh__film{width:auto;left:auto;grid-template-columns:auto;gap:0}

/* ---------- care paths ---------- */
/* arrival: the plates open from the floor one after another, the photos settle, the labels decode (paths.js) */
.paths .path{transition:flex-grow 1.1s cubic-bezier(.16,1,.3,1),clip-path 1.25s cubic-bezier(.77,0,.18,1) calc(var(--i,0) * 95ms)}
.paths .path__img{transition:scale 1.9s cubic-bezier(.16,1,.3,1) calc(var(--i,0) * 95ms + 60ms)}
.paths .path__n,.paths .path__foot{transition:opacity .9s var(--ease) calc(var(--i,0) * 95ms + 480ms),translate 1.2s cubic-bezier(.16,1,.3,1) calc(var(--i,0) * 95ms + 480ms)}
.paths.is-pre:not(.is-in) .path{clip-path:inset(100% 0 0 0)}
.paths.is-pre:not(.is-in) .path__img{scale:1.16}
.paths.is-pre:not(.is-in) .path__n,.paths.is-pre:not(.is-in) .path__foot{opacity:0;translate:0 16px}
.paths.is-in .path{clip-path:inset(0 0 0 0)}
.paths.is-done .path{clip-path:none}

/* one scan pass over the plate you open */
.path__pass{position:absolute;inset:0;z-index:4;pointer-events:none;opacity:0;transform:translateY(-1%)}
.path__pass::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(107,155,255,.75) 18%,rgba(214,226,255,.95) 50%,rgba(107,155,255,.75) 82%,transparent);box-shadow:0 0 12px 1px rgba(61,123,255,.45)}
.path__pass::after{content:"";position:absolute;left:0;right:0;top:-90px;height:90px;background:linear-gradient(0deg,rgba(61,123,255,.11),rgba(61,123,255,0))}
.path__pass.go{animation:ppass 1.3s cubic-bezier(.5,0,.25,1) forwards}
@keyframes ppass{0%{opacity:0;transform:translateY(-1%)}10%{opacity:1}80%{opacity:.85}100%{opacity:0;transform:translateY(100%)}}

/* the protocols in a path, read out on the open plate */
.path__list{display:none}

@media (min-width:1100px){
  /* photos: pointer parallax + a slow scroll drift (translate has no transition, so the drift follows the scroll exactly) */
  .paths .path__img--photo img{transform:translate3d(calc(var(--px,0) * -10px),calc(var(--py,0) * -6px),0) scale(1.05);translate:0 calc(var(--sp,0) * -14px);
    transition:transform 1.2s cubic-bezier(.16,1,.3,1)}
  .paths .path:hover .path__img--photo img{transform:translate3d(calc(var(--px,0) * -10px),calc(var(--py,0) * -6px),0) scale(1.085)}
  /* the plates you are not on dim with a veil (cheaper and cleaner than filtering big photos) */
  .paths:hover .path:not(:hover) .path__img--photo img{filter:saturate(.95)}
  .paths .path__img--photo::before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:#04060a;opacity:0;transition:opacity .9s var(--ease)}
  .paths:hover .path:not(:hover) .path__img--photo::before{opacity:.46}
  /* a soft clinic light follows the pointer across the open plate */
  .paths .path::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0;transition:opacity .8s var(--ease);mix-blend-mode:screen;
    background:radial-gradient(420px circle at calc(50% + var(--px,0) * 100%) calc(50% + var(--py,0) * 100%),rgba(150,180,255,.085),rgba(150,180,255,0) 65%)}
  .paths .path:hover::after{opacity:1}
  .paths .path:hover{border-color:rgba(214,188,138,.32)}
  .paths .path{transition:flex-grow 1.1s cubic-bezier(.16,1,.3,1),clip-path 1.25s cubic-bezier(.77,0,.18,1) calc(var(--i,0) * 95ms),border-color .6s var(--ease)}

  .path__list{display:flex;flex-wrap:wrap;align-content:flex-start;gap:7px 16px;list-style:none;margin:2px 0 0;padding:0;width:min(460px,var(--wopen,400px));min-width:0;height:var(--lh,auto);
    color:var(--fg-2);font-size:10px;letter-spacing:.14em;opacity:0;transform:translateY(10px);transition:opacity .4s var(--ease),transform .6s var(--ease)}
  .path__list>span{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
  .path__list>span::before{content:"";width:4px;height:4px;border-radius:50%;background:var(--gold);box-shadow:0 0 8px rgba(214,188,138,.55)}
  .path--big .path__list,.paths:hover .path:hover .path__list{opacity:1;transform:none;transition-delay:.28s}
  .paths:hover .path:not(:hover) .path__list{opacity:0;transform:translateY(10px);transition-delay:0s}
}
/* closed plates: the name scales to fit its plate (paths.js measures it); open plates show it whole */
@media (min-width:1100px){.path__name,.paths:hover .path .path__name{transform:scale(var(--fit,.45))}.path--big .path__name,.paths:hover .path:hover .path__name{transform:none}}
@media (prefers-reduced-motion:reduce){
  .paths .path,.paths .path__img,.paths .path__n,.paths .path__foot{transition:none}
  .path__pass{display:none}
  .paths .path__img--photo img{translate:none}
}

/* ---------- § 02 structure: real molecules in points (structure.js) ---------- */
.ms{position:relative;min-height:max(100svh,760px);padding:clamp(90px,10vw,150px) var(--gut) 56px;overflow:hidden;isolation:isolate;display:flex;flex-direction:column;gap:20px}
.ms__gl{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:0;pointer-events:none}
.ms__head,.ms__list,.ms__read,.ms__hud{position:relative;z-index:2}
.ms__head .sec-title{margin:0}
.ms__head .sec-sub{max-width:38ch}
.ms__stage{position:relative;z-index:1;height:min(112vw,62svh);margin:4px 0 0;pointer-events:none}
.ms__k{position:absolute;width:16px;height:16px;border:0 solid rgba(236,232,223,.26);transition:border-color .6s var(--ease)}
.ms__k--tl{left:0;top:0;border-top-width:1px;border-left-width:1px}.ms__k--tr{right:0;top:0;border-top-width:1px;border-right-width:1px}
.ms__k--bl{left:0;bottom:0;border-bottom-width:1px;border-left-width:1px}.ms__k--br{right:0;bottom:0;border-bottom-width:1px;border-right-width:1px}
.ms[data-state="in"] .ms__k{border-color:rgba(107,155,255,.6)}

.ms__list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line);display:grid}
.ms__list button{appearance:none;background:none;border:0;border-bottom:1px solid var(--line);width:100%;display:grid;grid-template-columns:3.4ch minmax(0,1fr) auto;align-items:baseline;gap:12px;
  padding:13px 0;color:var(--fg-3);cursor:pointer;text-align:left;position:relative;font:inherit;transition:color .4s var(--ease),padding .7s cubic-bezier(.16,1,.3,1)}
.ms__list i{font-style:normal}
.ms__list b{font:300 clamp(19px,1.6vw,26px)/1.1 var(--f-sans);letter-spacing:-.025em;color:inherit;white-space:nowrap}
.ms__list span{color:var(--fg-3);white-space:nowrap}
.ms__list button:hover{color:var(--fg-2)}
.ms__list button[aria-selected="true"]{color:var(--fg);padding-left:14px}
.ms__list button[aria-selected="true"]::before{content:"";position:absolute;left:0;top:50%;width:5px;height:5px;margin-top:-2px;border-radius:50%;background:var(--gold);box-shadow:0 0 10px 1px rgba(214,188,138,.6)}
.ms__list s{position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--gold);transform-origin:0 50%;transform:scaleX(var(--p,0));text-decoration:none;pointer-events:none}
.ms.is-held .ms__list s{opacity:0}

.ms__hud{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center;color:var(--fg-3);font-size:10px}
.ms__hud b{font-weight:400;color:var(--fg-2)}
.ms__st{display:inline-flex;align-items:center;gap:8px}
.ms__st i{width:6px;height:6px;border-radius:50%;background:var(--signal);box-shadow:0 0 0 0 rgba(61,123,255,.6)}
.ms[data-state="in"] .ms__st i,.ms[data-state="word"] .ms__st i{animation:liveb 1.1s var(--ease) infinite}
.ms[data-state="done"] .ms__st i{background:var(--gold)}
.ms[data-state="done"] .ms__st b{color:var(--fg)}
.ms__scale{display:inline-flex;align-items:center;gap:9px}
.ms__scale i{display:block;width:56px;height:6px;border:1px solid rgba(236,232,223,.55);border-top:0;transition:width .7s cubic-bezier(.16,1,.3,1)}

.ms__read{max-width:560px}
.ms__fig{margin:0;color:var(--fg-3)}
.ms__formula{margin:10px 0 0;white-space:nowrap;font:300 clamp(24px,2.3vw,40px)/1 var(--f-sans);letter-spacing:-.035em;color:var(--fg);font-feature-settings:"sinf" 1}
.ms__meta{margin:12px 0 0;color:var(--fg-2)}
.ms__seq{margin:16px 0 0;display:flex;flex-wrap:wrap;gap:5px}
.ms__seq span{padding:5px 7px 4px;border:1px solid var(--line-2);border-radius:3px;color:var(--fg-2);font-size:9.5px;letter-spacing:.08em;transition:color .25s,background .25s,border-color .25s}
.ms__seq.in span{animation:msin .55s cubic-bezier(.16,1,.3,1) calc(var(--j) * 24ms) both}
.ms__seq span.on{color:#0a0a0b;background:var(--fg);border-color:var(--fg)}
/* long chains read as a line of codes, not a wall of boxes */
.ms__seq.is-long{gap:3px 0}
.ms__seq.is-long span{padding:3px 0;border:0;border-radius:0;font-size:9.5px;color:var(--fg-3)}
.ms__seq.is-long span::after{content:"·";margin:0 5px;color:rgba(236,232,223,.22)}
.ms__seq.is-long span:last-child::after{content:none}
.ms__seq em{font-style:normal;color:var(--fg-3);padding:3px 6px 0 0}
.ms__seq.is-long span.on{background:none;color:var(--fg)}
@keyframes msin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ms__go{display:inline-flex;align-items:center;gap:10px;margin-top:22px;color:var(--gold);text-decoration:none;transition:color .3s,gap .5s var(--ease)}
.ms__go svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4}
.ms__go:hover{color:var(--fg);gap:16px}
.ms__tip{position:absolute;left:0;top:0;z-index:6;pointer-events:none;padding:7px 11px 6px;border:1px solid var(--line-2);border-radius:999px;background:rgba(8,10,14,.62);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:var(--fg);white-space:nowrap;font-size:9.5px;will-change:transform}
.ms__tip[hidden]{display:block;opacity:0}

/* phones / tablets: title, the molecule, then the list as a strip and the readout */
@media (max-width:1099px){
  .ms{padding-bottom:40px;min-height:0}
  .ms__head{order:1}.ms__hud{order:2}.ms__stage{order:3}.ms__list{order:4}.ms__read{order:5}
  .ms__list{display:flex;gap:0;overflow-x:auto;scrollbar-width:none;margin:0 calc(var(--gut) * -1);padding:0 var(--gut);border-top:0;scroll-snap-type:x proximity}
  .ms__list::-webkit-scrollbar{display:none}
  .ms__list li{flex:none;scroll-snap-align:start}
  .ms__list button{grid-template-columns:auto auto;grid-template-rows:auto auto;gap:4px 8px;padding:12px 18px 12px 0;margin-right:18px;border-bottom:1px solid var(--line)}
  .ms__list b{font-size:20px}
  .ms__list span{grid-column:1 / -1;font-size:9.5px}
  .ms__list button[aria-selected="true"]{padding-left:12px}
  .ms__hud{margin-top:4px}
  .ms__seq span{font-size:9px}
}
@media (min-width:1100px){
  .ms{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,2fr);grid-template-rows:auto auto 1fr;column-gap:var(--col-gap);row-gap:0;
    min-height:clamp(740px,100svh,960px);padding-top:clamp(84px,9vw,130px);padding-bottom:44px}
  .ms__head{grid-column:1;grid-row:1;max-width:430px}
  .ms .sec-title{font-size:clamp(46px,5.4vw,108px)}
  .ms__list{grid-column:1;grid-row:2;align-self:start;max-width:430px;margin-top:clamp(26px,4vh,46px)}
  .ms__key{grid-column:1;grid-row:3;align-self:end;max-width:430px;margin-top:28px}
  /* the molecule takes the middle and most of the height; callouts sit on its edges, the readout keeps the right column */
  .ms__stage{position:absolute;left:34%;right:max(23%,300px);top:clamp(124px,15vh,180px);bottom:clamp(34px,5vh,60px);height:auto;margin:0}
  .ms__hud{position:absolute;top:clamp(84px,9vw,130px);right:var(--gut);justify-content:flex-end}
  .ms__read{position:absolute;right:var(--gut);bottom:44px;width:min(24%,340px);text-align:right}
  .ms__seq{justify-content:flex-end;margin-left:auto}
}
@media (min-width:1100px) and (max-height:940px){.ms__list button{padding:10px 0}.ms__list b{font-size:20px}.ms__src{display:none}}
@media (prefers-reduced-motion:reduce){.ms__seq.in span{animation:none}}

/* ---------- the page index: five ticks on the right edge, names on hover ---------- */
.sidx{display:none}
@media (min-width:1100px) and (hover:hover){
  .sidx{position:fixed;right:14px;top:50%;z-index:60;display:grid;gap:2px;justify-items:end;transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity .6s var(--ease),visibility .6s}
  html.sidx-on .sidx{opacity:1;visibility:visible}
  .sidx a{display:flex;align-items:center;gap:10px;padding:6px 0 6px 12px;color:var(--fg-3);text-decoration:none;font:400 9.5px/1 var(--f-mono);letter-spacing:.14em;text-transform:uppercase}
  .sidx a::after{content:"";width:14px;height:1px;background:currentColor;transform-origin:100% 50%;transform:scaleX(.55);transition:transform .6s cubic-bezier(.16,1,.3,1),background .3s}
  .sidx i,.sidx span{font-style:normal;max-width:0;overflow:hidden;white-space:nowrap;opacity:0;transition:max-width .55s cubic-bezier(.16,1,.3,1),opacity .35s}
  .sidx a.on{color:var(--fg)}
  .sidx a.on::after{transform:scaleX(1.5);background:var(--gold)}
  .sidx:hover i,.sidx:hover span{max-width:16ch;opacity:1}
  .sidx:hover a:hover{color:var(--fg)}
  .sidx:hover{background:linear-gradient(90deg,transparent,rgba(6,8,12,.55) 40%);border-radius:4px}
}

/* word reveals: a little more room under the line so descenders never touch the mask */
.rv .w{padding-bottom:.3em;margin-bottom:-.3em}
.vh__title .ln{padding-bottom:.14em;margin-bottom:-.09em}
/* home hero: the two lines sit closer (line pitch .9em instead of 1em) */
.sx-hero .vh__title .ln:first-child{margin-bottom:-.19em}

/* structure: live callouts, legend, phases */
.ms__lines{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:visible;opacity:0;transition:opacity .7s var(--ease)}
.ms__lines.on{opacity:1}
.ms__lines path{fill:none;stroke:rgba(236,232,223,.38);stroke-width:1;vector-effect:non-scaling-stroke}
.ms__lines circle{fill:rgba(214,188,138,.16);stroke:#D6BC8A;stroke-width:1}
.ms__cos{position:absolute;inset:0;z-index:3;pointer-events:none}
.ms__co{position:absolute;left:0;top:0;display:grid;gap:5px;line-height:1.2;white-space:nowrap;opacity:0;transition:opacity .6s var(--ease) .1s}
.ms__co.on{opacity:1}
.ms__co b{font:400 13px/1.2 var(--f-sans);letter-spacing:-.005em;color:var(--fg)}
.ms__co i{font:400 9px/1.3 var(--f-mono);letter-spacing:.12em;text-transform:uppercase;font-style:normal;color:var(--fg-3)}
.ms__co.is-r{translate:-100% 0;text-align:right}
.ms__co::after{content:"";display:block;height:1px;margin-top:6px;background:linear-gradient(90deg,rgba(236,232,223,.4),transparent)}
.ms__co.is-r::after{background:linear-gradient(270deg,rgba(236,232,223,.4),transparent)}
.ms[data-state="word"] .ms__co{opacity:0}
.ms__key{position:relative;z-index:2;color:var(--fg-3);font-size:9.5px}
.ms__key p{margin:0;display:flex;flex-wrap:wrap;gap:6px 16px}
.ms__key span{display:inline-flex;align-items:center;gap:7px}
.ms__key i{width:6px;height:6px;border-radius:50%;background:#ECE8DF}
.ms__key i.ns{background:#DBBF85}.ms__key i.mod{background:#527FFF}
.ms__src{margin-top:10px!important;max-width:44ch;line-height:1.5;text-transform:none;letter-spacing:.04em;color:rgba(236,232,223,.3)}
.ms[data-state="word"] .ms__st b{color:var(--signal-2)}
@media (max-width:1099px){.ms__lines,.ms__cos{display:none}.ms__key{order:6}}
@media (hover:hover) and (pointer:fine){.ms.ms-live .ms__stage{cursor:crosshair}}

/* clinic film: the loop dips to its still for a breath instead of cutting */
.filmbg--video.is-playing.is-dip video{opacity:0;transition:opacity .45s var(--ease)}
.filmbg--video.is-playing video{transition:opacity .6s var(--ease)}

/* care paths: the action reads in the house gold (blue stays for the instrument: lens, scan pass) */
.paths .path__go{color:var(--gold)}
.paths .path__go:hover{color:var(--fg)}

/* the vial section, in plain words first */
.ms__what{margin:12px 0 0;max-width:34ch;color:var(--fg-2);font:400 15px/1.45 var(--f-sans);text-wrap:pretty}
.ms__what.in{animation:msin .7s cubic-bezier(.16,1,.3,1) both}
@media (min-width:1100px){.ms__what{margin-left:auto}}
.ms__size{margin:14px 0 0;color:var(--fg-3);font-size:9.5px;line-height:1.5;max-width:44ch}
.ms__size b{font-weight:400;color:var(--gold)}
@media (min-width:1100px){.ms__size{margin-left:auto}}
.ms__how{margin:0 0 10px!important;color:var(--fg-2)}

/* care paths: the films over their stills */
.path__vid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:var(--vpos,50% 40%);opacity:0;transition:opacity .9s var(--ease);pointer-events:none}
.path__vid.is-on{opacity:1}
@media (hover:hover){.paths:hover .path:not(:hover) .path__vid{filter:brightness(.6) saturate(.8)}}
@media (min-width:1100px){
  .paths .path__img--photo .path__vid{transform:scale(1.05);translate:0 calc(var(--sp,0) * -14px);transition:opacity .9s var(--ease),transform 1.2s cubic-bezier(.16,1,.3,1),filter .8s var(--ease)}
  .paths .path:hover .path__img--photo .path__vid{transform:scale(1.085)}
}
@media (prefers-reduced-motion:reduce){.path__vid{display:none}}
