/* SLT scroll motion layer v2 (CEO 2026-12-05 'ulprusのように、下にスクロールすると色々と付いてきて変わる').
   Added after slt-style.css. Everything is scoped by .slt-mo, which slt-motion.js sets only when motion is allowed.
   Script writes CSS variables only (--slt-hp, --slt-ip, --slt-fp, --slt-sp, --slt-mq, --slt-ac, --slt-fc);
   the look lives here. Without .slt-mo the page is exactly as before. */

/* ---------- 1. the first screen: only the tool pages' own first screen is animated; the top page's hero is left exactly as the site has it ---------- */
/* plays once at load (the script adds .slt-mo-intro) */
@keyframes slt-mo-word { from { opacity: 0; transform: translate3d(0, 80%, 0) scale(1.12); filter: blur(18px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes slt-mo-up { from { opacity: 0; transform: translate3d(0, 34px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes slt-mo-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.slt-mo.slt-mo-intro .slt-rn-hero__text > *, .slt-mo.slt-mo-intro .slt-rn-hero__art { animation: slt-mo-up 1.1s var(--slt-ease) both; }
.slt-mo.slt-mo-intro .slt-rn-hero__text > :nth-child(2) { animation-delay: .12s; }
.slt-mo.slt-mo-intro .slt-rn-hero__text > :nth-child(3) { animation-delay: .24s; }
.slt-mo.slt-mo-intro .slt-rn-hero__text > :nth-child(4) { animation-delay: .36s; }
.slt-mo.slt-mo-intro .slt-rn-hero__text > :nth-child(5) { animation-delay: .48s; }
.slt-mo.slt-mo-intro .slt-rn-hero__art { animation-delay: .35s; animation-duration: 1.4s; }
/* while scrolling away: the title grows and blurs out, the dot field falls behind (--slt-hp is 0 .. 1) */
.slt-mo .slt-rn-hero__text { translate: 0 calc(var(--slt-hp, 0) * 70px); opacity: calc(1 - var(--slt-hp, 0) * 1.1); }
.slt-mo .slt-rn-hero__art { translate: 0 calc(var(--slt-hp, 0) * -50px); scale: calc(1 + var(--slt-hp, 0) * .06); }

/* ---------- 2. blocks come up out of a blur, from the side when they sit in a row ---------- */
.slt-mo [data-slt-reveal] {
  opacity: 0; filter: blur(9px);
  transform: translate3d(var(--slt-x, 0px), 86px, 0) scale(.93);
  transition: opacity 1s var(--slt-ease), transform 1.3s var(--slt-ease), filter 1s var(--slt-ease);
  transition-delay: calc(var(--slt-i, 0) * 140ms);
}
.slt-mo [data-slt-reveal].slt-is-visible { opacity: 1; filter: none; transform: none; }
.slt-mo .slt-hs [data-slt-reveal], .slt-mo .slt-tm[data-slt-reveal], .slt-mo .slt-prod__chips[data-slt-reveal] { filter: none; }
.slt-mo .slt-hs [data-slt-reveal] { transform: none; }

/* parts that follow one after another once their block is open */
.slt-mo .slt-mo-item { opacity: 0; transform: translate3d(0, 64px, 0) scale(.9); transition: opacity .8s var(--slt-ease), transform 1s var(--slt-ease); transition-delay: calc(var(--slt-i, 0) * 85ms + .12s); }
.slt-mo .slt-is-visible .slt-mo-item, .slt-mo .slt-mo-item.slt-is-visible { opacity: 1; transform: none; }

/* ---------- 3. headings: every letter rises out of a blur, then the red bar is drawn ---------- */
.slt-mo .slt-heading[data-slt-reveal] { opacity: 1; filter: none; transform: none; transition: none; }
/* !important: the site styles some 'span' descendants as blocks, which would stack the letters */
.slt-mw { display: inline-block !important; white-space: nowrap; }
.slt-mc { display: inline-block !important; }
.slt-mf { display: inline !important; }
.slt-mo .slt-mc { opacity: 0; filter: blur(9px); transform: translate3d(0, .75em, 0) rotate(7deg); transform-origin: 0 100%; transition: opacity .8s var(--slt-ease), filter .8s var(--slt-ease), transform 1.05s var(--slt-ease); transition-delay: calc(var(--slt-c, 0) * 40ms + .08s); }
.slt-mo .slt-is-visible .slt-mc { opacity: 1; filter: none; transform: none; }
.slt-mo .slt-heading[data-slt-reveal] .slt-heading__ja::before { transform: scaleX(0); transform-origin: left center; transition: transform 1s var(--slt-ease) .55s; }
.slt-mo .slt-heading[data-slt-reveal].slt-is-visible .slt-heading__ja::before { transform: scaleX(1); }

/* ---------- 4. text that fills in with the scroll (--slt-fp: 0 .. 1 for the block, --slt-ci: the letter's place) ---------- */
.slt-mo .slt-mf { opacity: clamp(.13, calc(.13 + (var(--slt-fp, 1) * 1.5 - var(--slt-ci, 0) * .5) * 6), 1); }

/* ---------- 5. pictures open up as they arrive (--slt-ip: 0 .. 1) and drift against the scroll ---------- */
.slt-mo .slt-mo-wipe:not(.slt-mo-wipe-done) { clip-path: inset(calc((1 - var(--slt-ip, 1)) * 18%) calc((1 - var(--slt-ip, 1)) * 14%) round calc((1 - var(--slt-ip, 1)) * 44px)); }
.slt-mo .slt-mo-wipe > img, .slt-mo .slt-mo-wipe img:first-child { scale: calc(1.32 - var(--slt-ip, 1) * .22); translate: 0 var(--slt-py, 0px); }
.slt-mo .slt-mo-wipe-done > img, .slt-mo .slt-mo-wipe-done img:first-child { scale: 1.1; }
/* pictures that show a whole screen or product are never cropped at rest: they open from a zoom, settle at exactly 1 and do not drift (CEO 2026-12-06: the group company picture was cut at the edges on a 13-inch screen) */
.slt-mo .slt-partner__img.slt-mo-wipe > img, .slt-mo .slt-partner__img.slt-mo-wipe img:first-child,
.slt-mo .slt-rn-feat__art.slt-mo-wipe > img, .slt-mo .slt-rn-feat__art.slt-mo-wipe img:first-child { scale: calc(1.1 - var(--slt-ip, 1) * .1); translate: none; }
.slt-mo .slt-partner__img.slt-mo-wipe-done > img, .slt-mo .slt-partner__img.slt-mo-wipe-done img:first-child,
.slt-mo .slt-rn-feat__art.slt-mo-wipe-done > img, .slt-mo .slt-rn-feat__art.slt-mo-wipe-done img:first-child { scale: 1; }

/* ---------- 6. sections rise as sheets: a gray section arrives with round corners that square off (--slt-sp) ---------- */
.slt-mo .slt-mo-sheet { border-radius: calc((1 - var(--slt-sp, 1)) * 76px) calc((1 - var(--slt-sp, 1)) * 76px) 0 0; }

/* ---------- 7. things that keep moving with the scroll ---------- */
/* the big running words slide the opposite way along the scroll, on top of their own run */
.slt-mo .slt-marquee__row { translate: calc(var(--slt-mq, 0) * 1px) 0; }
.slt-mo .slt-marquee__row + .slt-marquee__row { translate: calc(var(--slt-mq, 0) * -1px) 0; }
/* the coloured dots in 'Who we are' float at different speeds */
.slt-mo .slt-about__dots span { translate: 0 calc(var(--slt-ac, 0) * var(--slt-k, 90) * 1px); rotate: calc(var(--slt-ac, 0) * var(--slt-r, 60) * 1deg); }
.slt-mo .slt-about__dots span:nth-child(1) { --slt-k: 220; --slt-r: 90; }
.slt-mo .slt-about__dots span:nth-child(2) { --slt-k: -160; --slt-r: -60; }
.slt-mo .slt-about__dots span:nth-child(3) { --slt-k: 300; --slt-r: 120; }
.slt-mo .slt-about__dots span:nth-child(4) { --slt-k: -260; --slt-r: -140; }
.slt-mo .slt-about__dots span:nth-child(5) { --slt-k: 180; --slt-r: 70; }
.slt-mo .slt-about__dots span:nth-child(6) { --slt-k: -120; --slt-r: -90; }
.slt-mo .slt-about__dots span:nth-child(7) { --slt-k: 340; --slt-r: 160; }
/* cards in a row ride at different speeds and line up when they reach the middle of the screen */
.slt-mo .slt-mo-float { translate: 0 calc(var(--slt-fc, 0) * var(--slt-fk, 0) * 1px); }
/* service cards: the one in the middle is the biggest, the ones at the sides step back */
.slt-mo .slt-hs__item { scale: var(--slt-hs, 1); opacity: var(--slt-ho, 1); }

/* ---------- 8. numbers ---------- */
.slt-mo .slt-rn-facts__n, .slt-mo .slt-mo-count { font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .slt-mo [data-slt-reveal] { filter: blur(5px); transform: translate3d(0, 56px, 0) scale(.95); }
  .slt-mo .slt-mc { transition-delay: calc(var(--slt-c, 0) * 28ms + .05s); }
    .slt-mo .slt-mo-sheet { border-radius: calc((1 - var(--slt-sp, 1)) * 40px) calc((1 - var(--slt-sp, 1)) * 40px) 0 0; }
  .slt-mo .slt-about__dots span { translate: 0 calc(var(--slt-ac, 0) * var(--slt-k, 90) * .5px); }
}
@media (prefers-reduced-motion: reduce) {
  .slt-mo [data-slt-reveal], .slt-mo .slt-mo-item, .slt-mo .slt-mc, .slt-mo.slt-mo-intro * { transition: none !important; animation: none !important; }
}

/* ---------- 9. the morphing dot field (slt-fx.js): one fixed canvas behind the page; sections let it show through ---------- */
.slt-fxcv { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: none; }
.slt-mo .slt-fxcv { display: block; }
.slt-mo main, .slt-mo .slt-footer { position: relative; z-index: 1; }
.slt-mo:not(.slt-fx-off) .slt-pagehead, .slt-mo:not(.slt-fx-off) .slt-rn-hero, .slt-mo:not(.slt-fx-off) .slt-marquee { background: transparent; }   /* the top page's first screen keeps its own background and dots */
.slt-mo:not(.slt-fx-off) .slt-section--gray:not(.slt-section--navy) { background: rgba(244, 246, 250, .5); }
/* text over the field: a soft white backing (feathered by the shadow) so the dots never cut through the letters */
.slt-mo:not(.slt-fx-off) .slt-fx-ink { background: rgba(255, 255, 255, .82); box-shadow: 0 0 20px 14px rgba(255, 255, 255, .82); border-radius: 12px; }
/* a heading's backing is only as wide as its letters (the script keeps this only where nothing moves) */
.slt-mo:not(.slt-fx-off) .slt-fx-ink--hug { width: fit-content; }
/* the site's own big coloured dots in 'Who we are' go behind the text, not over it */
.slt-mo .slt-about__dots { z-index: 0; }
.slt-mo .slt-about > .slt-container { position: relative; z-index: 1; }
/* news: the cards, filter chips and pause button have no background of their own, so the dots ran through their text (CEO 2026-12-06) */
.slt-mo:not(.slt-fx-off) .slt-nw__card { background: rgba(255, 255, 255, .88); border-radius: 14px; }
.slt-mo:not(.slt-fx-off) .slt-nw__filter:not([aria-pressed="true"]):not(:hover), .slt-mo:not(.slt-fx-off) .slt-nw__pause:not(:hover) { background: rgba(255, 255, 255, .92); }
/* .slt-fx-off is set by the script when a device is too slow for the field: the page then looks exactly as before */
