/* Small interactions without changing the site's layout, colors, or typography. */
/* Reserve the scrollbar lane so short and long pages share the same alignment. */
html { scrollbar-gutter: stable; }

/* Native document transitions keep normal links, history and form navigation.
   Unsupported browsers simply navigate normally; no hidden body or JS delay. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .fh-site-header { view-transition-name: site-header; }
  ::view-transition-group(*) { animation-duration: 180ms; }
  ::view-transition-old(root) { animation: cs-page-out 180ms ease-out both; }
  ::view-transition-new(root) { animation: cs-page-in 180ms ease-out both; }
  /* Keep the shared navigation crisp rather than crossfading its text. */
  ::view-transition-group(site-header) { animation: none; }
  ::view-transition-old(site-header) { animation: none; opacity: 0; }
  ::view-transition-new(site-header) { animation: none; mix-blend-mode: normal; }
}
@keyframes cs-page-out { to { opacity: 0; } }
@keyframes cs-page-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .cs-motion-card {
    transition: box-shadow .28s;
  }
  .cs-motion-card:hover {
    translate: none;
    box-shadow: 0 12px 26px rgba(15, 45, 70, .09);
  }
  :is(.service-btn, .qat-hero-btn, .gts-hero-btn, .cta-btn, .creatio-technology__footer a) {
    transition: box-shadow .22s;
  }
  :is(.service-btn, .qat-hero-btn, .gts-hero-btn, .cta-btn, .creatio-technology__footer a):hover {
    translate: none;
  }
  :is(.service-btn, .qat-hero-btn, .gts-hero-btn, .cta-btn):active { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-motion-card, .creatio-technology .creatio-technology__brand img {
    transition: none !important;
    translate: none !important;
    scale: none !important;
  }
  /* Existing WOW/AOS content must also remain readable without entrance effects. */
  .wow, [data-aos] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .clients-track, .techstack-slider__track { animation: none !important; }
}

/* Ambient hero decoration and restrained hover feedback. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .fh-ace-orbit { animation: cs-orbit-breathe 8s ease-in-out infinite; }
  .fh-ace-orbit-inner { animation-delay: -4s; }
  .fh-ace-chip { animation: cs-chip-float 7s ease-in-out infinite; }
  .fh-ace-scene.cs-motion-paused :is(.fh-ace-orbit,.fh-ace-chip) { animation-play-state: paused; }
  .fh-site-header .fh-header-demo,
  :is(.fh-button,.fh-stage-cta,.fh-poker-features__card,.pf-category,.pf-feature-card) {
    transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
  }
  .fh-site-header .fh-header-demo:hover,
  :is(.fh-button,.fh-stage-cta):hover { box-shadow: 0 0 24px #8cbcff24; }
  .cs-motion-card { transition: border-color .3s ease, box-shadow .3s ease; }
  .cs-motion-card:hover { border-color: #819bbd; box-shadow: 0 8px 28px #050b181c; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  :is(.fh-platform-scene,.fh-platform-overview__visual,.fh-blog-grid article) img {
    transition: scale .6s cubic-bezier(.2,.7,.3,1);
  }
  :is(.fh-platform-scene,.fh-platform-overview__visual,.fh-blog-grid article):hover img { scale: 1.025; }
}
@keyframes cs-orbit-breathe { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes cs-chip-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .fh-ace-orbit,.fh-ace-chip { animation: none !important; translate: none !important; }
  :is(.fh-platform-scene,.fh-platform-overview__visual,.fh-blog-grid article) img {
    transition: none !important; scale: none !important;
  }
  .fh-site-header .fh-header-demo,
  :is(.fh-button,.fh-stage-cta,.fh-poker-features__card,.pf-category,.pf-feature-card) { transition: none !important; }
}

/* Cinematic illustration lighting: scoped layers cannot intercept links. */
.cs-cinema-position{position:relative}
.cs-cinema-light,.cs-cinema-card-light{position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:2;overflow:hidden}
.cs-cinema-light{background:radial-gradient(ellipse at 75% 20%,#78b9fa16,transparent 65%);opacity:.6}
.cs-cinema-card-light{background:radial-gradient(220px circle at var(--light-x,50%) var(--light-y,50%),#9acbff17,transparent 75%);opacity:0;transition:opacity .35s ease}
.cs-cinema-card:hover>.cs-cinema-card-light,.cs-cinema-card:focus-within>.cs-cinema-card-light{opacity:1}
@media(prefers-reduced-motion:no-preference){
 .cs-cinema-light::after{content:'';position:absolute;inset:-30%;background:linear-gradient(115deg,transparent 35%,#c8e6ff14 48%,#ffffff1a 50%,transparent 63%);translate:-65% 0;opacity:0}
 .cs-cinema-seen>.cs-cinema-light::after{animation:cs-cinema-sweep 2.8s cubic-bezier(.2,.6,.3,1) both}
 .cs-cinema-seen>img{animation:cs-cinema-image 900ms cubic-bezier(.16,1,.3,1) both}
}
@keyframes cs-cinema-sweep{0%{translate:-65% 0;opacity:0}20%{opacity:1}80%{opacity:1}100%{translate:65% 0;opacity:0}}
@keyframes cs-cinema-image{
 from{clip-path:inset(0 0 12% 0 round 12px);translate:0 18px;scale:.97}
 to{clip-path:inset(0 0 0 0 round 0);translate:0 0;scale:1}
}
@media(prefers-reduced-motion:reduce){
 .cs-cinema-card-light{display:none}
 .cs-cinema-light::after{display:none;animation:none!important}
 .cs-cinema-seen>img{animation:none!important;scale:none!important;translate:none!important;clip-path:none!important}
}

/* One-time editorial copy entrances. No bounce, blur, looping or retained
   transform after completion: settled text returns to normal rendering. */
@media(prefers-reduced-motion:no-preference){
 .cs-copy-enter{animation:cs-copy-arrive 650ms var(--cs-copy-delay,0ms) cubic-bezier(.22,.61,.36,1) backwards}
}
@keyframes cs-copy-arrive{
 from{opacity:0;transform:translateY(14px)}
 to{opacity:1;transform:none}
}
@media(prefers-reduced-motion:reduce){
 .cs-copy-enter{animation:none!important;opacity:1!important;transform:none!important}
}

/* Left-to-right heading build, continuing naturally onto the next line.
   Words keep their normal font metrics; the section never changes height. */
.cs-heading-reveal cs-reveal-word{display:inline-block;font:inherit;letter-spacing:inherit;vertical-align:baseline}
@media(prefers-reduced-motion:no-preference){
 .cs-heading-reveal cs-reveal-word{animation:cs-word-reveal var(--cs-word-duration,260ms) var(--cs-word-delay,0ms) ease-out backwards}
}
@keyframes cs-word-reveal{
 from{opacity:0;clip-path:inset(-.12em 100% -.12em 0)}
 to{opacity:1;clip-path:inset(-.12em 0 -.12em 0)}
}
@media(prefers-reduced-motion:reduce){
 .cs-heading-reveal cs-reveal-word{animation:none!important;opacity:1!important;clip-path:none!important}
}
