/* ============================================================
   nm-motion.css (plugin 1.4.0)
   Static helpers for nm-motion.js. Every timing and distance lives in the JS;
   here only: the pre-paint start poses, masks, and the CSS hooks that let JS
   animate pseudo-elements through custom properties.

   Everything that hides is scoped to html.nm-motion-ready (written by the head
   gate). Without that class this file changes nothing on screen.
   ============================================================ */

/* ---------- 1. pre-paint start poses (until JS writes html.nm-motion-live) ----------
   Only the header and the first screen are pre-posed, so they do not flash before
   the engine starts. The LCP candidates are never opacity:0:
     hero / page-hero media  painted at once, zoomed (transform only)
     hero H1                 clipped from below, then rises in lines from masks
     thank-you H1            painted at once, lowered 28px (transform only) */
html.nm-motion-ready:not(.nm-motion-live) .nm-header__inner>*{opacity:0}
html.nm-motion-ready:not(.nm-motion-live) .nm-hero__inner>:not(h1):not(.nm-hero__sub),
html.nm-motion-ready:not(.nm-motion-live) .nm-pagehero__inner>:not(h1):not(.nm-pagehero__sub),
html.nm-motion-ready:not(.nm-motion-live) .nm-hero__scroll{opacity:0}
html.nm-motion-ready:not(.nm-motion-live) .nm-hero h1,
html.nm-motion-ready:not(.nm-motion-live) .nm-pagehero h1{clip-path:inset(0 0 100% 0)}
/* the hero paragraph can be the LCP on phones (biggest text block): painted at once, only lowered */
html.nm-motion-ready:not(.nm-motion-live) :is(.nm-hero__sub,.nm-pagehero__sub){transform:translate3d(0,24px,0)}
html.nm-motion-ready:not(.nm-motion-live) .nm-hero__media,
html.nm-motion-ready:not(.nm-motion-live) .nm-pagehero__media{transform:scale(1.12)}
/* thank-you has no hero image: its text is the LCP, so every block is painted at once, only lowered */
html.nm-motion-ready:not(.nm-motion-live) .nm-ty__inner>*{transform:translate3d(0,28px,0)}
/* the widget right under a hero is usually on the first screen too */
html.nm-motion-ready:not(.nm-motion-live) :is(.elementor-widget-nm_hero,.elementor-widget-nm_page_hero)+.elementor-widget>.elementor-widget-container>section>.container,
html.nm-motion-ready:not(.nm-motion-live) :is(.elementor-widget-nm_hero,.elementor-widget-nm_page_hero)+.elementor-widget>section>.container{opacity:0}

/* ---------- 2. while JS owns an element, CSS transitions must not chase its inline values ---------- */
html.nm-motion-ready [data-nm-m],
html.nm-motion-ready [data-nm-m] .nm-mline{transition:none!important}

/* ---------- 3. line masks (SplitText / <br> split) ----------
   a little room under each line so Hebrew descenders (ק ך ן ף ץ) are never cut */
.nm-mmask{padding-bottom:.12em;margin-bottom:-.12em}

/* ---------- 4. pseudo-element hooks (custom properties, default = final state) ---------- */
/* eyebrow rules grow from the text outward (RTL: ::before sits right of the text, ::after left) */
html.nm-motion-ready .eyebrow::before{transform:scaleX(var(--nm-eb,1));transform-origin:0% 50%}
html.nm-motion-ready .eyebrow.center::after,
html.nm-motion-ready .eyebrow.balanced::after{transform:scaleX(var(--nm-eb,1));transform-origin:100% 50%}
/* centered divider under section titles grows from its middle */
html.nm-motion-ready .section-head.center h2::after,
html.nm-motion-ready .nm-facility-intro h2::after,
html.nm-motion-ready .nm-method h2::after,
html.nm-motion-ready .nm-connect h2::after{transform:translateX(-50%) scaleX(var(--nm-rule,1))}
/* orbit nodes: the individual `scale` property composes with their translate() placement,
   so a node grows out of the centre to its seat without touching the layout transform */
html.nm-motion-ready .nm-node{scale:var(--nm-ns,1)}
html.nm-motion-ready .nm-orbit__center{scale:var(--nm-cs,1)}
/* CTA band: the soft light drifts once on entrance (transform on the pseudo, never the gradient) */
html.nm-motion-ready .nm-ctaband::before{transform:translate3d(var(--nm-gx,0px),var(--nm-gy,0px),0)}
/* steps: on desktop the bottom bar of each step lights up in order as the section scrolls */
html.nm-motion-live .nm-steps[data-nm-steps] .nm-step::after{height:4px;transform:scaleX(var(--nm-sp,0));
  transform-origin:100% 50%;transition:transform .22s var(--nm-ease)}
html.nm-motion-live .nm-steps[data-nm-steps] .nm-step:hover::after{transform:scaleX(1)}
/* counters keep a fixed width while they run */
.nm-counting{font-variant-numeric:tabular-nums}

/* ---------- 5. press feedback (buttons, entries, filters): 0.97, never a magnet ---------- */
@media (prefers-reduced-motion:no-preference){
  html:not(.nm-still) .nm-btn:active,
  html:not(.nm-still) .nm-entry:active{transform:translateY(0) scale(.97)}
  html:not(.nm-still) .nm-filters button.nm-filter:active{transform:scale(.97)}
  .nm-filters button.nm-filter{transition:background .18s var(--nm-ease),border-color .18s var(--nm-ease),color .18s var(--nm-ease),transform .14s var(--nm-ease)}
}

/* ============================================================
   CURSOR B "the double rule" (1.4.0). docs/round2-cursor-menu-options.md.
   The system cursor is never hidden (no rule ever hides it): this layer only
   accompanies it. Fixed at physical top/left (never inset-inline: RTL trap),
   moved by translate3d only. Shapes change through custom properties per data-state.
   ============================================================ */
.nmc{position:fixed;top:0;left:0;width:0;height:0;z-index:10000;pointer-events:none;opacity:0;transition:opacity .2s var(--nm-ease)}
.nmc[hidden]{display:none}
.nmc.is-on{opacity:1}
.nmc.is-on.is-idle:not([data-state="video"]):not([data-state="image"]){opacity:0;transition-duration:.6s}
.nmc.is-on.is-kbd,.nmc.is-on[data-state="field"]{opacity:0;transition-duration:.12s}
.nmc svg{position:absolute;top:0;left:0;overflow:visible}
.nmc{--gap:9;--len:12;--y:0;--rot:0deg;--lo:1;--o:.9;--press:1;--cho:0;--tagy:34}
.nmc .b-wrap{position:absolute;top:0;left:0;opacity:var(--o);transition:opacity .2s var(--nm-ease)}
.nmc .b-dash{position:absolute;top:-1px;left:0;width:0;height:2px;transition:transform .32s var(--nm-ease),opacity .2s}
.nmc .b-r{transform:translate(calc(var(--gap) * var(--press) * 1px),calc(var(--y) * 1px)) rotate(var(--rot))}
.nmc .b-l{opacity:var(--lo);transform:translate(calc(var(--gap) * var(--press) * -1px),calc(var(--y) * 1px))}
.nmc .b-len{position:absolute;top:0;width:24px;height:2px;transform:scaleX(calc(var(--len) / 24));transition:transform .32s var(--nm-ease)}
.nmc .b-r .b-len{left:0;transform-origin:0 50%}
.nmc .b-l .b-len{right:0;transform-origin:100% 50%}
.nmc .b-bar{display:block;width:100%;height:100%;border-radius:2px;transition:background .2s}
.nmc .b-r .b-bar{background:linear-gradient(90deg,#26898F,#4CB976)}
.nmc .b-l .b-bar{background:linear-gradient(90deg,#005AA9,#26898F)}
.nmc.is-down{--press:.5}
.nmc.is-down .b-dash{transition-duration:.09s;transition-timing-function:cubic-bezier(0,0,.2,1)}
.nmc .b-chev{position:absolute;top:calc(var(--y) * 1px - 5px);left:0;width:10px;height:10px;opacity:var(--cho);
  transform:translateX(calc((var(--gap) * var(--press) + var(--len)) * -1px - 8px));transition:transform .32s var(--nm-ease),opacity .2s;color:#005AA9}
.nmc .b-pill{position:absolute;top:0;left:0;display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;
  font-family:inherit;font-size:13px;font-weight:700;line-height:1;white-space:nowrap;direction:rtl;opacity:0;
  transform:translate(-50%,-50%) scale(.9);transition:opacity .2s,transform .26s var(--nm-ease);box-shadow:0 6px 18px rgba(0,30,60,.22)}
.nmc .b-pill svg{position:static;width:12px;height:12px}
.nmc .b-play{background:#005AA9;color:#fff}
.nmc .b-zoom{background:#fff;color:#005AA9}
/* small word for contact buttons ("בואו להכיר") and treatment-page links ("לקריאה") */
.nmc .b-tag{position:absolute;top:0;left:0;font-family:inherit;font-size:12px;font-weight:700;line-height:1;letter-spacing:.2px;white-space:nowrap;direction:rtl;
  color:#005AA9;opacity:0;transform:translate(-50%,calc(var(--tagy) * 1px)) translateY(4px);transition:opacity .2s,transform .26s var(--nm-ease)}
.nmc.has-tag .b-tag{opacity:1;transform:translate(-50%,calc(var(--tagy) * 1px))}
/* tone: white lines on dark sections (hero, page hero, CTA band, footer, gradient panels) */
.nmc[data-tone="dark"] .b-bar{background:#fff!important}
.nmc[data-tone="dark"] .b-chev{color:#fff}
.nmc[data-tone="dark"] .b-tag{color:#fff;text-shadow:0 1px 8px rgba(0,30,60,.45)}
/* states */
.nmc[data-state="text"]{--gap:8;--len:7;--y:13;--o:.4}
.nmc[data-state="link"]{--gap:20;--len:16;--y:14;--cho:1;--o:1}
.nmc[data-state="cta"]{--gap:var(--tgap,60);--len:10;--o:1}
.nmc[data-state="nav"]{--gap:0;--len:var(--tlen,20);--y:var(--ty,18);--o:1}
.nmc[data-state="subnav"]{--gap:var(--tgap,120);--len:var(--tlen,20);--y:var(--ty,-10);--rot:90deg;--lo:0;--o:1}
.nmc[data-state="video"],.nmc[data-state="image"]{--gap:56;--len:14;--o:1}
.nmc[data-state="video"] .b-bar,.nmc[data-state="image"] .b-bar{background:#fff!important;box-shadow:0 0 0 1px rgba(0,40,80,.28)}
.nmc[data-state="video"] .b-play,.nmc[data-state="image"] .b-zoom{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:.05s}
.nmc[data-state="disabled"]{--gap:6;--len:9;--o:.7}
.nmc[data-state="disabled"] .b-bar{background:#7A7676!important}
.nmc[data-state="loading"]{--gap:9;--len:12;--y:0;--rot:0deg;--lo:1;--o:.95}
.nmc[data-state="loading"] .b-r .b-bar{animation:nmcB-breathe 1.4s cubic-bezier(.45,0,.55,1) infinite alternate;transform-origin:0 50%}
.nmc[data-state="loading"] .b-l .b-bar{animation:nmcB-breathe 1.4s cubic-bezier(.45,0,.55,1) -.7s infinite alternate;transform-origin:100% 50%}
@keyframes nmcB-breathe{from{transform:scaleX(.35)}to{transform:scaleX(1)}}
/* the layer becomes the play affordance on story cards; keyboard and touch keep the static button */
html.nmc-on .nm-vcard:not(.is-playing):hover .nm-vcard__play-ico{opacity:0;transform:scale(.85)}
html.nm-still .nmc{display:none!important}
