/* Zilica — site-wide polish layer.
   Loaded after every page's own <style> blocks, so a rule here with the same
   specificity wins by source order. Each page tuned its own mobile sizes; the
   fixes below override them in one place instead of editing eleven copies. */

/* ---------------------------------------------------------------------------
   Headlines: balance line lengths so a headline never ends on a single
   stranded word ("…others treat / one."). Paragraphs get the lighter
   "pretty" pass, which only avoids a one-word last line.
   ------------------------------------------------------------------------- */
h1, h2, h3, .z-display, .z-headline-lg, .z-hero2-sub { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------------------------------------------------------------------------
   Tablet and phone type scale. Body copy had been stepped down to 12–12.5px
   and eyebrows to 10px, which is below comfortable reading size on a phone.
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Body copy */
  .z-body-std,
  .z-hero2-copy,
  .z-hero-copy,
  .z-copy-short,
  .z-machines-copy,
  .t-body-lg,
  .z-why-copy,
  #partner p.t-body-lg,
  #how-it-works .z-subtext,
  #cta .z-body-std,
  #inquiry > .z-inq-grid > .z-inq-rev:first-child > p.t-body-lg { font-size: 15px !important; line-height: 1.6 !important; }

  /* Eyebrow labels above headings, and the hero eyebrow pills */
  .t-micro-cap:has(+ h1), .t-micro-cap:has(+ h2), .t-micro-cap:has(+ h3),
  .z-hero2-eyebrow .t-micro-cap,
  .z-hero-eyebrow .t-micro-cap,
  .z-spec-cap,
  .z-spot-badge { font-size: 11px !important; letter-spacing: 1.2px !important; }

  /* Small supporting text */
  .z-stat-l { font-size: 13.5px !important; line-height: 1.45 !important; }
  .z-formnote { font-size: 13.5px !important; }
  .z-inq-contactlabel { font-size: 14px !important; }
  .z-inq-location { font-size: 13px !important; }
  .t-micro { font-size: 12px !important; line-height: 1.5 !important; }
  .z-ringnote, .z-depthnote, .z-cyclenote, .z-hubcaption { font-size: 12px !important; }
}

/* ---------------------------------------------------------------------------
   Tap targets on phones. Footer lists get real spacing, so neighbouring links
   can't be mis-tapped. Standalone links and icons keep their look and get an
   invisible, larger hit area instead, so nothing around them moves.
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .z-foot-grid .z-flink { padding: 9px 0 !important; }
  .z-foot-bottom .z-flink { display: inline-flex !important; align-items: center; min-height: 40px; }

  .z-social,
  .z-header a:has(.z-brand-logo),
  #why a[href="/about"],
  #inquiry a[href^="mailto:"],
  .zo-foot a,
  .z-founder-link,
  .z-cat-all { position: relative; }

  .z-social::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }

  .z-header a:has(.z-brand-logo)::after,
  #why a[href="/about"]::after,
  #inquiry a[href^="mailto:"]::after,
  .zo-foot a::after,
  .z-founder-link::after,
  .z-cat-all::after { content: ""; position: absolute; inset: -10px -6px; }
}

/* ---------------------------------------------------------------------------
   Treatment-area photo grids. Phones used to stack them one per row, adding
   ~1,000px of scrolling per machine page. Two square-ish columns instead,
   matching LUMA; an odd last tile spans the row rather than sitting alone.
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .z-ind-grid > .z-area:last-child:nth-child(odd) { grid-column: 1 / -1 !important; }
  .z-ind-grid > .z-area:last-child:nth-child(odd) .z-area-frame { aspect-ratio: 8 / 3 !important; height: auto !important; width: 100% !important; }
}
@media (max-width: 480px) {
  .z-ind-grid { grid-template-columns: 1fr 1fr !important; gap: 11px !important; }
  /* height:auto + width:100% so the page's fixed tile heights can't widen
     the photo past its card when the aspect ratio kicks in */
  .z-ind-grid .z-area-frame { aspect-ratio: 1 / 1 !important; height: auto !important; width: 100% !important; }
  .z-ind-grid > .z-area:last-child:nth-child(odd) .z-area-frame { aspect-ratio: 2 / 1 !important; }
}

/* ---------------------------------------------------------------------------
   Machine-page hero chips on the smallest phones (≤360px): three chips no
   longer fit one row without clipping their text, so they wrap to two rows
   and size to their content.
   ------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .z-proof { flex-wrap: wrap !important; }
  .z-proof-chip { flex: 0 0 auto !important; padding: 0 11px !important; }
}

/* ===========================================================================
   Motion layer — the visual half of site-motion.js. The script only adds
   these classes when motion is allowed, and removes them once each effect
   has played, so nothing here lingers or fights the pages' hover styles.
   ========================================================================= */

/* Staggered reveals: items arrive 70ms apart instead of as one block. */
.zm-stagger > .zm-item {
  opacity: 0 !important;
  transform: translateY(16px) !important;
  transition: opacity .65s cubic-bezier(.22,.61,.36,1) var(--zm-d, 0ms),
              transform .8s cubic-bezier(.22,.61,.36,1) var(--zm-d, 0ms) !important;
}
.zm-stagger.zm-in > .zm-item { opacity: 1 !important; transform: none !important; }

/* Photo reveals: a soft-edged wipe runs top to bottom while the photo
   settles from a slight zoom. */
.zm-photo {
  transform: scale(1.07) !important;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 55%);
          mask-image: linear-gradient(180deg, #000 45%, transparent 55%);
  -webkit-mask-size: 100% 240%; mask-size: 100% 240%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 0 100%; mask-position: 0 100%;
  transition: transform 1.4s cubic-bezier(.22,.61,.36,1),
              -webkit-mask-position 1.1s cubic-bezier(.65,0,.35,1),
              mask-position 1.1s cubic-bezier(.65,0,.35,1) !important;
}
.zm-photo.zm-photo-in { transform: scale(1) !important; -webkit-mask-position: 0 0; mask-position: 0 0; }

/* Treatment-area cards: the photo eases in a touch on hover. The label strip
   sits above the scaled photo so the zoom never paints over it. */
.z-area-frame { overflow: hidden; }
.z-area > div:last-child { position: relative; z-index: 1; background: #fff; }
@media (hover: hover) and (pointer: fine) {
  .z-area img { transition: transform .8s cubic-bezier(.22,.61,.36,1); }
  .z-area:hover img { transform: scale(1.06); }
}

/* Homepage ribbon: a slow idle float on top of the scroll depth. */
@keyframes zmFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -12px, 0); } }
.zm-float { animation: zmFloat 11s cubic-bezier(.45,0,.55,1) infinite; will-change: transform; }

/* Header: slims down as it turns white on scroll. */
.z-header > div { transition: padding .35s cubic-bezier(.22,.61,.36,1); }
.z-header.is-scrolled > div { padding-top: 12px !important; padding-bottom: 12px !important; }
@media (min-width: 901px) {
  .z-header .z-head-cta {
    transition: transform .2s cubic-bezier(.22,.61,.36,1), box-shadow .22s ease, background .2s ease,
                color .2s ease, border-color .2s ease, padding .35s cubic-bezier(.22,.61,.36,1);
  }
  .z-header.is-scrolled .z-head-cta { padding-top: 10px; padding-bottom: 10px; }
}

/* Page transitions: fade out on click, fade up as the next page renders. */
@keyframes zmPageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html.zm-page-in body { animation: zmPageIn .5s cubic-bezier(.22,.61,.36,1) both; }
/* Page transitions: fade out on leaving, fade in on arriving. Opacity only, so
   the fixed header and bars don't jump (a transform on body would move them). */
html.zm-leaving body { opacity: 0; transition: opacity .2s ease; }
@keyframes zmArrive { from { opacity: 0; } to { opacity: 1; } }
html.zm-arrive body { animation: zmArrive .42s cubic-bezier(.22,.61,.36,1) both; }

/* Sticky pricing bar on machine pages (phones only). */
.zm-pbar { display: none; }
@media (max-width: 767px) {
  .zm-pbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    padding: 9px 9px 9px 16px; border-radius: 16px;
    background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid rgba(13,37,61,.08); box-shadow: 0 18px 40px -18px rgba(33,28,110,.45);
    transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none;
    transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
  }
  .zm-pbar.is-on { transform: none; opacity: 1; pointer-events: auto; }
  .zm-pbar-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .zm-pbar-name { font-size: 15px; letter-spacing: -.2px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .zm-pbar-kind { font-size: 10px; line-height: 1.35; letter-spacing: .9px; text-transform: uppercase; color: var(--ink-mute); margin-top: 2px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .zm-pbar-btn {
    flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 9999px;
    background: var(--indigo); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none;
    box-shadow: 0 8px 20px -8px rgba(83,58,253,.6);
  }
  .zm-pbar-btn:active { transform: scale(.97); }
}

@media (prefers-reduced-motion: reduce) {
  .zm-float { animation: none; }
  .zm-pbar { transition: none; }
  .z-header > div, .z-header .z-head-cta { transition: none; }
}


/* ===========================================================================
   Final phone + tablet polish
   ========================================================================= */

/* Timelines (homepage "How it works", machine-page "Supported beyond
   delivery"): the phone layout spaced steps 96–128px apart, which read as
   empty screen rather than a sequence. Tighter, with the connector intact. */
@media (max-width: 767px) {
  #how-it-works .z-step, #support .z-step { padding-bottom: 52px !important; }
  #how-it-works .z-step:last-child, #support .z-step:last-child { padding-bottom: 0 !important; }
}

/* Homepage tablet: three "why" cards in one row instead of 2 + 1, and a
   three-machine chooser tab lets its last card span the row. */
@media (min-width: 641px) and (max-width: 900px) {
  .z-pillars { grid-template-columns: repeat(3, 1fr) !important; gap: 14px !important; }
  .z-pillars .z-pcard { padding-left: 20px !important; padding-right: 20px !important; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .zo-grid.zo-n3 > .zo-card:nth-child(3) { grid-column: 1 / -1; }
}

/* About tablet: founder photo beside the bio rather than a small photo
   stranded above it. */
@media (min-width: 641px) and (max-width: 900px) {
  .z-founder-grid { grid-template-columns: 250px 1fr !important; gap: 36px !important; align-items: start !important; }
  .z-founder-media { max-width: none !important; }
}
/* About phones: the selection list's highlight bled to 6px from the screen
   edge; keep it inside the page margin like everything else. */
@media (max-width: 480px) {
  .z-sel-list { margin-left: -8px !important; margin-right: -8px !important; }
  .z-selbtn { padding-left: 8px !important; padding-right: 8px !important; }
}

/* Contact tablet: the form card now uses the full column width. */
@media (max-width: 900px) {
  #inquiry > .z-inq-grid > .z-inq-form-side { align-self: stretch !important; }
}

/* CRYO phones: the two cross-section rings sit side by side (conventional vs
   CRYO) so the comparison reads at a glance instead of stacked apart. */
@media (max-width: 767px) {
  .z-ringwrap { flex-wrap: nowrap !important; gap: 14px !important; }
  .z-ringcol { width: calc(50% - 7px) !important; max-width: none !important; }
  .z-ringsvg { width: 112px !important; height: 112px !important; }
}

/* Landscape tablets up to 900px keep the widescreen hero video: keep the
   copy to the left half so it never runs over the machine. */
@media (min-width: 768px) and (max-width: 900px) and (orientation: landscape) {
  .z-hero2-copy, .z-hero2-sub { max-width: 48% !important; }
}

/* ULTRA depth list on phones: the Face/Body tag sits beside the depth value
   instead of dropping onto its own line under the description. */
@media (max-width: 767px) {
  .z-dep .z-dep-k { grid-row: 1; grid-column: 2; align-self: center; }
}

/* Homepage hero on tablets: the ribbon ran through "modern clinics"; a wider
   readability fade keeps the headline and copy on a clean ground. */
@media (min-width: 768px) and (max-width: 1180px) {
  .z-hero-fade { background: linear-gradient(100deg, #eef1fb 22%, rgba(238,241,251,.9) 48%, rgba(238,241,251,0) 72%) !important; }
}

/* Footer wordmark: a touch larger so it anchors the footer (plain wordmark,
   not the tagline lockup, whose tagline would be unreadable at this size).
   The inline height on each page's <img> needs !important to override. */
footer .z-foot-about > .z-brand-logo { height: 36px !important; width: auto !important; max-width: none !important; }
@media (max-width: 767px) {
  footer .z-foot-about > .z-brand-logo { height: 32px !important; }
  footer .z-foot-about > .z-foot-desc { margin-top: 16px !important; }
}

/* Enquiry section (homepage + contact): cursor glow and form-card focus lift. */
#inquiry { position: relative; overflow: hidden; }
#inquiry > .z-inq-grid { position: relative; z-index: 1; }
.zm-glow {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(122,108,255,.30), rgba(143,108,240,.13) 45%, rgba(143,108,240,0) 100%);
  opacity: 0; transition: opacity .6s ease; will-change: transform;
}
.zm-glow.is-on { opacity: 1; }
.z-inq-form {
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .45s cubic-bezier(.22,.61,.36,1), border-color .45s ease;
}
.z-inq-form:focus-within {
  transform: translateY(-4px);
  border-color: rgba(83,58,253,.22) !important;
  box-shadow: 0 40px 80px -30px rgba(52,38,140,.42), 0 0 0 1px rgba(83,58,253,.10), 0 0 44px -6px rgba(122,108,255,.35), 0 4px 16px -8px rgba(20,20,60,.08) !important;
}
@media (prefers-reduced-motion: reduce) {
  .zm-glow { display: none; }
  .z-inq-form:focus-within { transform: none; }
}

/* ===========================================================================
   Interactive layer (site-interact.js)
   ========================================================================= */

/* 1 · Section menu on machine pages */
.zi-secnav {
  position: fixed; left: 0; right: 0; top: 68px; z-index: 45;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline); box-shadow: 0 6px 18px -12px rgba(13,37,61,.25);
  transform: translateY(-110%); opacity: 0; pointer-events: none;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
}
.zi-secnav.is-on { transform: none; opacity: 1; pointer-events: auto; }
.zi-secnav-track {
  max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; align-items: center; height: 46px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.zi-secnav-track::-webkit-scrollbar { display: none; }
.zi-secnav-row { position: relative; display: flex; gap: 4px; align-items: center; height: 100%; flex: none; }
/* Scroll-linked line and name strip (see initSectionNav): the browser runs
   these from the scroll position, so they stay smooth in Low Power Mode. */
@supports (animation-timeline: scroll()) {
  /* animation-name is set by the script (it changes when the layout does) */
  .zi-secnav.zi-sdt .zi-secnav-ink { animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: scroll(root block); }
  .zi-secnav.zi-sdt .zi-secnav-row { animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: scroll(root block); will-change: transform; }
}
.zi-secnav-link {
  flex: none; font-size: 13.5px; letter-spacing: -.1px; color: var(--ink-secondary); text-decoration: none;
  padding: 7px 13px; border-radius: 9999px; transition: color .25s ease, background-color .25s ease;
}
.zi-secnav-link:hover { color: var(--ink); background: rgba(83,58,253,.05); }
.zi-secnav-link.is-active { color: var(--indigo-deep); background: rgba(83,58,253,.09); }
.zi-secnav-link:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }
.zi-secnav-track { position: relative; }
/* The progress line along the bottom of the menu. It spans the menu's full
   width and is scaled by site-interact.js so its end tracks the section names;
   transform only, so it moves on the GPU. */
.zi-secnav-ink {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--indigo), #8f6cf0); pointer-events: none;
  will-change: transform;
}
@media (max-width: 767px) {
  .zi-secnav-track { height: 42px; padding: 0 12px; }
  .zi-secnav-link { font-size: 13px; padding: 6px 11px; }
}

/* Shared: chips and small captions used by the three diagrams (dark sections) */
.zi-areas, .zi-treat { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 22px auto 0; max-width: 760px; text-align: center; }
.zi-areas-k { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: rgba(214,208,255,.7); }
.zi-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.zi-chip {
  font-size: 13px; color: rgba(214,208,255,.5); padding: 6px 12px; border-radius: 9999px;
  border: 1px solid rgba(183,166,255,.14); background: rgba(255,255,255,.02);
  transition: color .35s ease, border-color .35s ease, background-color .35s ease, box-shadow .35s ease;
}
.zi-chip.is-on { color: #fff; border-color: rgba(183,166,255,.5); background: rgba(143,108,240,.16); box-shadow: 0 0 18px -6px rgba(160,130,255,.7); }

/* 2 · ULTRA depth slider */
.zi-depthctl { max-width: 620px; margin: 10px auto 34px; }
.zi-depthctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.zi-kicker { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #a6b4ff; }
.zi-readout { font-size: 14px; color: #c9c6ee; }
.zi-readout b { font-weight: 500; color: #fff; }
.zi-slider { position: relative; height: 28px; cursor: pointer; touch-action: none; outline: none; }
.zi-track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.zi-fill { height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, #a6b4ff, #cdbcff); transition: transform .35s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.zi-thumb {
  position: absolute; top: 4px; left: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(166,180,255,.25), 0 0 18px rgba(205,188,255,.9);
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .25s ease; will-change: transform;
}
/* While dragging, each move glides for a moment instead of jumping. The GPU
   draws the glide at full frame rate, so the thumb stays smooth even when the
   script only updates 30 times a second (Low Power Mode). */
.zi-slider.is-dragging .zi-thumb, .zi-slider.is-dragging .zi-fill { transition: transform .11s cubic-bezier(.2,.7,.3,1); }
.zi-slider:focus-visible .zi-thumb { box-shadow: 0 0 0 4px rgba(166,180,255,.6), 0 0 18px rgba(205,188,255,.9); }
/* The numbers are centred exactly on the thumb's five resting points
   (0, 25, 50, 75, 100% of the track), so a settled thumb sits right on its number. */
.zi-stops { position: relative; height: 40px; margin: 6px 0 0; }
.zi-stops .zi-stop { position: absolute; top: 0; transform: translateX(-50%); }
.zi-stop {
  font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; color: rgba(214,208,255,.55);
  background: none; border: 0; padding: 6px 4px; min-width: 44px; cursor: pointer; border-radius: 8px; transition: color .25s ease;
}
.zi-stop:hover, .zi-stop.is-on { color: #fff; }
.zi-desc { text-align: center; font-size: 14.5px; line-height: 1.6; color: #a6abd4; margin: 16px auto 0; max-width: 52ch; min-height: 1.6em; }
/* opacity only: animating the SVG filter below made phones redraw the diagram every frame */
#depth .z-cone, #depth .z-focus, #depth .z-dlabel { transition: opacity .3s ease; }
#depth.zi-picked .z-cone:not(.zi-on) { opacity: .28 !important; }
#depth.zi-picked .z-focus:not(.zi-on) { opacity: .35 !important; }
#depth.zi-picked .z-dlabel:not(.zi-on) { opacity: .4 !important; }
#depth .z-cone.zi-on { filter: brightness(1.45) drop-shadow(0 0 10px rgba(205,188,255,.6)); }
/* The ring round the picked focal point: a plain element, moved and pulsed
   with transform/opacity only (GPU). 26 drawing units wide, like the old SVG
   ring; top-left sits on the focal point, then centred on it. */
.zi-ring {
  position: absolute; left: 0; top: 0; width: 4.19%; aspect-ratio: 1; margin: -2.1% 0 0 -2.1%;
  border-radius: 50%; border: 1.5px solid rgba(205,188,255,.9); pointer-events: none; opacity: 0;
  transition: transform .5s cubic-bezier(.22,.61,.36,1), opacity .3s ease; will-change: transform;
}
.zi-ring.is-on { opacity: 1; }
.zi-ring::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid rgba(205,188,255,.9); opacity: 0;
}
/* two pulses per pick, then still */
.zi-ring.is-pulse::after { animation: ziRingPulse 1.6s ease-out 2; }
@keyframes ziRingPulse { 0% { opacity: .9; transform: scale(1); } 70% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; transform: scale(1.7); } }

/* 3 · LUMERA filter switch */
.zi-seg {
  position: relative; display: flex; width: fit-content; max-width: 100%; margin: 0 auto 22px; padding: 5px; gap: 4px;
  border-radius: 9999px; background: rgba(255,255,255,.05); border: 1px solid rgba(183,166,255,.18);
}
.zi-seg-btn {
  position: relative; z-index: 1; font: inherit; font-size: 14px; color: #c9c6ee; background: none; border: 0; cursor: pointer;
  padding: 10px 18px; border-radius: 9999px; white-space: nowrap; transition: color .3s ease;
}
.zi-seg-btn span { color: rgba(201,198,238,.6); margin-left: 4px; transition: color .3s ease; }
.zi-seg-btn.is-on, .zi-seg-btn.is-on span { color: #fff; }
.zi-seg-btn:focus-visible { outline: 2px solid #b3a6ff; outline-offset: 2px; }
.zi-seg-pill {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 9999px; opacity: 0;
  background: linear-gradient(150deg, rgba(106,79,240,.85), rgba(143,108,240,.85)); box-shadow: 0 6px 20px -6px rgba(143,108,240,.8);
  transform: translate3d(5px,0,0); will-change: transform;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
}
.zi-seg-pill.is-on { opacity: 1; }
#spectrum .z-diagram > div { transition: opacity .4s ease; }
#spectrum .z-diagram > div.zi-dim { opacity: .3; }
#spectrum .z-diagram.zi-filtered .z-ghostband { opacity: .35 !important; transition: opacity .4s ease; }
.zi-pass {
  position: absolute; bottom: 0; height: 16px; left: 26%; right: 30%; border-radius: 4px; opacity: 0;
  border: 1px solid rgba(255,255,255,.85); box-shadow: 0 0 18px rgba(205,188,255,.7), inset 0 0 12px rgba(205,188,255,.45);
  transition: opacity .35s ease; will-change: opacity;
}
.zi-pass.is-on { opacity: 1; }
#spectrum .zi-treat { margin: -24px auto 40px; }
@media (max-width: 560px) {
  .zi-seg { width: 100%; }
  .zi-seg-btn { flex: 1 1 0; padding: 9px 8px; font-size: 13px; white-space: normal; line-height: 1.25; }
  .zi-seg-btn span { display: block; margin: 2px 0 0; font-size: 12px; }
}

/* 4 · LUMA wavelength picker */
.zi-hint { text-align: center; font-size: 14px; color: #a6abd4; margin: -30px auto 34px; max-width: 60ch; min-height: 1.6em; }
.zi-hint b { font-weight: 500; color: #fff; }
.zi-beamhit { position: absolute; top: 0; bottom: 0; width: 52px; margin-left: -26px; background: none; border: 0; cursor: pointer; padding: 0; z-index: 2; border-radius: 12px; }
.zi-beamhit:focus-visible { outline: 2px solid #b3a6ff; outline-offset: -4px; }
#wavelengths .z-beam, #wavelengths .z-wavelabel { transition: opacity .4s ease, filter .4s ease, width .3s ease; }
#wavelengths.zi-picked .z-beam:not(.zi-on) { opacity: .25; }
#wavelengths.zi-picked .z-wavelabel:not(.zi-on) { opacity: .4 !important; }
#wavelengths .z-beam.zi-on { width: 3px !important; filter: brightness(1.5) drop-shadow(0 0 8px rgba(190,170,255,.9)); }
#wavelengths .z-beam.zi-on .z-beamdot { animation: ziDot 1.6s ease-in-out infinite !important; opacity: 1 !important; }
#wavelengths .z-wavelabel.zi-on { color: #fff !important; text-shadow: 0 0 14px rgba(190,170,255,.9); }
@keyframes ziDot { 0%,100% { transform: translate(-50%,50%) scale(1); } 50% { transform: translate(-50%,50%) scale(1.5); } }
#wcard-grid.zi-picked .z-wcard { transition: opacity .4s ease, border-color .35s ease, background .35s ease, box-shadow .35s ease; }
#wcard-grid.zi-picked .z-wcard:not(.zi-on) { opacity: .5 !important; }
#wcard-grid.zi-picked .z-wcard.zi-on { border-color: rgba(183,166,255,.55) !important; background: linear-gradient(rgba(143,108,240,.12),rgba(143,108,240,.12)), rgba(255,255,255,.035) !important; box-shadow: 0 18px 36px -16px rgba(83,58,253,.55) !important; }
#wcard-grid.zi-picked .z-wcard.zi-on .z-wnum { color: #fff !important; text-shadow: 0 0 18px rgba(160,140,255,.55) !important; }

/* 5 · Photo hotspots */
.zi-spots { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.zi-spot {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: none;
  cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
}
.zi-spot[hidden] { display: none; }
.zi-spot-dot {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(83,58,253,.85), 0 4px 14px rgba(20,20,60,.35);
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
}
.zi-spot-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9);
  animation: ziPulse 2.2s ease-out infinite;
}
@keyframes ziPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
.zi-spot:hover .zi-spot-dot, .zi-spot.is-open .zi-spot-dot { transform: scale(1.15); }
.zi-spot:focus-visible { outline: none; }
.zi-spot:focus-visible .zi-spot-dot { box-shadow: 0 0 0 4px rgba(83,58,253,.85), 0 0 0 7px #fff, 0 4px 14px rgba(20,20,60,.35); }
.zi-tip {
  position: absolute; left: 34px; top: 50%; width: 220px; padding: 11px 13px; border-radius: 12px; text-align: left;
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 16px 36px -12px rgba(33,28,110,.45); border: 1px solid rgba(13,37,61,.06);
  font-size: 13px; line-height: 1.5; color: var(--ink-secondary); font-weight: 300;
  opacity: 0; visibility: hidden; transform: translateY(-50%) translateX(-6px); pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.22,.61,.36,1), visibility .25s;
}
.zi-tip b { display: block; font-weight: 500; color: var(--ink); font-size: 13.5px; margin-bottom: 2px; }
.zi-tip.is-left { left: auto; right: 34px; transform: translateY(-50%) translateX(6px); }
.zi-tip.is-up { top: auto; bottom: 8px; transform: translateX(-6px); }
.zi-tip.is-up.is-left { transform: translateX(6px); }
.zi-spot.is-open .zi-tip { opacity: 1; visibility: visible; transform: translateY(-50%); }
.zi-spot.is-open .zi-tip.is-up { transform: none; }
.zi-spot.is-open { z-index: 2; }
@media (max-width: 480px) { .zi-tip { width: 190px; font-size: 12.5px; } }

/* 6 · Magnetic buttons: `translate` composes with each button's own hover transform */
.zi-mag { transition-property: transform, box-shadow, background, color, border-color, translate !important; }
.zi-mag:not(.is-pulled) { transition-duration: .2s, .22s, .2s, .2s, .2s, .6s !important; transition-timing-function: cubic-bezier(.22,.61,.36,1), ease, ease, ease, ease, cubic-bezier(.34,1.56,.64,1) !important; }
.zi-mag.is-pulled { transition-duration: .2s, .22s, .2s, .2s, .2s, .18s !important; }

@media (prefers-reduced-motion: reduce) {
  .zi-secnav, .zi-fill, .zi-thumb, .zi-seg-pill, .zi-pass, .zi-ring, .zi-secnav-ink { transition: none !important; }
  .zi-ring.is-pulse::after, .zi-spot-dot::after, #wavelengths .z-beam.zi-on .z-beamdot { animation: none !important; }
}
.zi-tip.is-down { top: 6px; transform: translateX(-6px); }
.zi-tip.is-down.is-left { transform: translateX(6px); }
.zi-spot.is-open .zi-tip.is-down { transform: none; }
/* Hotspot captions are placed by script (exact fit inside the photo). */
.zi-tip, .zi-tip.is-left, .zi-tip.is-up, .zi-tip.is-down { right: auto; bottom: auto; transform: translateY(4px); }
.zi-spot.is-open .zi-tip, .zi-spot.is-open .zi-tip.is-up, .zi-spot.is-open .zi-tip.is-down { transform: none; }

/* Final QA fixes */
/* Phones: comfortable tap height for the section menu and the depth stops. */
@media (max-width: 767px) {
  .zi-secnav-track { height: 48px; }
  .zi-secnav-link { display: inline-flex; align-items: center; min-height: 36px; }
  .zi-stop { min-height: 38px; }
}
/* Closed hotspot captions must not make the photo frame scrollable:
   clip (not hidden) creates no scroll container at all. */
.zi-spots { overflow: hidden; overflow: clip; }

/* ---- Link colours on touch screens ----
   The design system turns every link indigo on :hover, and a phone keeps
   :hover after a tap. Buttons and card links keep their own colours. */
.zm-pbar-btn, .zm-pbar-btn:hover, .zm-pbar-btn:active, .zm-pbar-btn:focus, .zm-pbar-btn:visited { color: #fff; }
@media (hover: none) {
  .zo-card:hover, .z-qc-item:hover { color: var(--ink); }
  .z-cat-item:hover, .z-nf-card:hover { color: var(--indigo); }
}

/* ---- Mobile menu: smooth Machines list (all pages) ----
   The links used to be centred on screen, so while the Machines list grew,
   every link shifted on every frame and the whole full-screen menu, gradients
   included, was repainted each time. Now the links sit from the top and stay
   put, the list opens below them, and the names fade in one after another.
   The nav scrolls if an open list is taller than a small phone. */
@media (max-width: 900px) {
  .z-ov-nav {
    justify-content: flex-start;
    padding-top: clamp(12px, 6vh, 64px);
    min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  }
  .z-overlay::before { transform: translateZ(0); }
  /* The list opens to full height in one step (its names start transparent),
     and the links below it glide to their new place with a GPU transform
     (site-interact.js, initMenuGlide). Animating the height itself made the
     phone re-lay out the menu every frame, which Low Power Mode turns choppy. */
  .z-ov-sub { transition: none; }
  .z-ov-sublink {
    opacity: 0; transform: translateY(-8px);
    transition: opacity .18s ease, transform .24s cubic-bezier(.32,.72,0,1);
  }
  .z-ov-acc.is-open .z-ov-sublink {
    opacity: 1; transform: none;
    transition: opacity .3s ease, transform .38s cubic-bezier(.32,.72,0,1);
  }
  .z-ov-acc.is-open .z-ov-sublink:nth-child(1) { transition-delay: .04s; }
  .z-ov-acc.is-open .z-ov-sublink:nth-child(2) { transition-delay: .075s; }
  .z-ov-acc.is-open .z-ov-sublink:nth-child(3) { transition-delay: .11s; }
  .z-ov-acc.is-open .z-ov-sublink:nth-child(4) { transition-delay: .145s; }
  .z-ov-acc.is-open .z-ov-sublink:nth-child(5) { transition-delay: .18s; }
  .z-ov-acc.is-open .z-ov-sublink:nth-child(6) { transition-delay: .215s; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .z-ov-sub, .z-ov-sublink { transition: none !important; }
  .z-ov-sublink { opacity: 1; transform: none; }
}

/* ---- Buttons on touch screens ----
   A phone treats a tap as hover and keeps it, so the lift and colour-mesh stuck
   on after the tap. On touch screens the hover look is switched off; each tap
   plays the same look briefly instead (.is-pressed, added by site-interact.js). */
@media (hover: none) {
  .z-cta--primary:hover:not(.is-pressed) {
    background-image: none; animation: none; text-shadow: none; transform: none;
    box-shadow: 0 6px 18px rgba(83,58,253,.26);
  }
  .z-cta--ghost:hover:not(.is-pressed) {
    background-image: none; animation: none; text-shadow: none; transform: none; box-shadow: none;
    color: var(--indigo-deep); border-color: rgba(83,58,253,.3);
  }
  .z-cta--ghost:hover:not(.is-pressed) .z-cta-arrow { transform: none; }
  .z-cta { -webkit-tap-highlight-color: transparent; }
}

/* ---- Hero videos on phones ----
   iPhone Safari draws a play button on a video that hasn't started yet. The
   heroes are silent background loops that start by themselves, so hide it. */
#top video::-webkit-media-controls,
#top video::-webkit-media-controls-panel,
#top video::-webkit-media-controls-overlay-play-button,
#top video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* The slow hero drift (the next section seems to rise over the video). On a
   mouse device site-motion.js runs it; on touch screens the browser runs it
   from the scroll position itself, so it keeps pace with the finger. Browsers
   without scroll-linked animations simply scroll the hero normally. */
@supports (animation-timeline: scroll()) {
  @media (hover: none), (pointer: coarse) {
    @keyframes zmHeroDrift { from { translate: 0 0; } to { translate: 0 10svh; } }
    #top video, #top img.zi-vidimg, #top img.zi-still {
      animation: zmHeroDrift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 100svh;
    }
  }
}
@media (prefers-reduced-motion: reduce) { #top video, #top img.zi-vidimg, #top img.zi-still { animation: none !important; } }

/* ---- Call-to-action machine photo (machine pages, phones) ----
   Its fade-up used to start from the page's scroll position, and could play
   before the (lazy-loaded) photo existed or while it was still just below the
   screen, so the photo seemed to pop in. Now it stays hidden until it has
   loaded AND a quarter of it is on screen (site-interact.js adds .zi-shown);
   the page's own 1.1 s transition then plays in full view. */
@media (max-width: 767px) {
  img.z-cta-machine:not(.zi-shown) { opacity: 0 !important; transform: translateY(24px) scale(.985) !important; }
  img.z-cta-machine.zi-shown { opacity: 1 !important; transform: translateY(0) scale(1) !important; }
}

/* Hero videos stay invisible until they are actually playing, then fade in.
   Until then the still frame underneath shows (an img.zi-still, or the hero's
   own poster background). This also keeps iPhone Safari's play icon out of
   sight while a video waits, e.g. in Low Power Mode before the image fallback
   takes over. site-interact.js adds .zi-live on the first "playing" event. */
#top video { transition: opacity .45s ease; }
#top video:not(.zi-live) { opacity: 0 !important; }

/* ULTRA depth slider: the readout, description and area chips change with a
   short fade-and-slide instead of popping (site-interact.js, swap()). */
.zi-readout, .zi-desc, .zi-areas { transition: opacity .26s ease, transform .32s cubic-bezier(.22,.61,.36,1); }
.zi-readout.zi-out, .zi-desc.zi-out, .zi-areas.zi-out { opacity: 0; transform: translateY(-5px); transition-duration: .16s, .16s; }
.zi-readout.zi-in, .zi-desc.zi-in, .zi-areas.zi-in { opacity: 0; transform: translateY(8px); transition: none; }
.zi-areas .zi-chip { animation: ziChipIn .42s cubic-bezier(.22,.61,.36,1) both; }
.zi-areas .zi-chip:nth-child(2) { animation-delay: .04s; } .zi-areas .zi-chip:nth-child(3) { animation-delay: .08s; }
.zi-areas .zi-chip:nth-child(4) { animation-delay: .12s; } .zi-areas .zi-chip:nth-child(5) { animation-delay: .16s; }
.zi-areas .zi-chip:nth-child(6) { animation-delay: .2s; }  .zi-areas .zi-chip:nth-child(7) { animation-delay: .24s; }
@keyframes ziChipIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .zi-readout, .zi-desc, .zi-areas { transition: none !important; }
  .zi-areas .zi-chip { animation: none !important; }
}

/* ---- Phones: keep every entrance on the GPU (smooth in Low Power Mode) ----
   Low Power Mode slows anything the phone has to redraw frame by frame. These
   swap the frame-by-frame effects for fade/slide/scale equivalents on touch
   screens; mouse devices keep the originals. */
@media (hover: none), (pointer: coarse) {
  /* Photo reveals: a fade-up and settle instead of the soft wipe (a mask that
     moved across the whole photo, redrawing it every frame). */
  .zm-photo {
    -webkit-mask-image: none !important; mask-image: none !important;
    opacity: 0; transform: translateY(18px) scale(1.04) !important;
    transition: opacity .9s ease, transform 1.2s cubic-bezier(.22,.61,.36,1) !important;
  }
  .zm-photo.zm-photo-in { opacity: 1; transform: none !important; }

  /* HYDRA hub diagram: the whole drawing fades and settles in, instead of
     lines drawing themselves and nodes popping inside the SVG. */
  .z-spoke { animation: none !important; stroke-dashoffset: 0; }
  .z-hubnode, .z-hubcore { animation: none !important; opacity: 1; }
  .z-hubsvg { opacity: 0; transform: scale(.94); transition: opacity .8s ease .15s, transform 1s cubic-bezier(.22,.61,.36,1) .15s; }
  .z-wave.is-in .z-hubsvg { opacity: 1; transform: none; }

  /* CRYO cooling rings: each ring turns and fades in whole, instead of its
     stroke drawing itself. */
  .z-ring-cold { animation: none !important; stroke-dashoffset: 0 !important; }
  .z-ringsvg { opacity: 0; transform: rotate(-40deg) scale(.92); transition: opacity .8s ease .3s, transform 1.1s cubic-bezier(.22,.61,.36,1) .3s; }
  .z-wave.is-in .z-ringsvg { opacity: 1; transform: none; }
  .z-wave.is-in .z-ringcol:nth-child(2) .z-ringsvg { transition-delay: .6s, .6s; }
}

/* LUMERA band sweep: the highlight crosses the band by transform, not by
   moving its left edge (same path, no layout per frame). */
.z-bandsweep {
  left: 0 !important; width: 100% !important;
  background: linear-gradient(90deg, transparent 43%, rgba(255,255,255,.85) 50%, transparent 57%) !important;
}
.z-wave.is-in .z-bandsweep { animation: zpsweepX 1.5s cubic-bezier(.4,0,.2,1) .5s 1 !important; }
@keyframes zpsweepX { 0% { opacity: 0; transform: translateX(-64%); } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(57%); } }

/* LUMA: the picked beam thickens in one step (animating its width re-laid out
   the diagram each frame); its glow still fades in. */
#wavelengths .z-beam, #wavelengths .z-wavelabel { transition: opacity .4s ease, filter .4s ease !important; }

/* ---- Homepage machine carousel: keep the card's text still ----
   The autoplay timer line on the active tab animates the whole time a slide is
   showing. iPhone Safari could re-draw the card's text next to it slightly
   differently from frame to frame, which looked like the text shaking (worse in
   Low Power Mode). The line gets its own layer, and the visible card's copy
   gets its own stable layer, so animating one never re-draws the other.
   Nothing moves or looks different. */
#machines .z-tab-bar { will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
#machines .z-tab, #machines .z-tab-m { isolation: isolate; }
#machines .z-slide.is-active .z-spot-grid > div:last-child { transform: translateZ(0); backface-visibility: hidden; -webkit-backface-visibility: hidden; }

/* Enquiry forms: shown under the button if sending fails */
.z-send-err {
  margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; text-align: center;
  font-size: 13.5px; line-height: 1.5; color: #9f1d1d; background: #fdf0f0; border: 1px solid #f3cccc;
}
.z-send-err a { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
