/* S. K. Agency Round 39: motion layer. Loaded after r31.css and r32.css by r31.php (preview: r39=1).
   Page crossfades, service tile lift, headline line reveals (with r39.js), stat count-up support, accordion chevron.
   Motion uses opacity and the individual translate, scale and rotate properties; reduced motion turns all of it off. */

/* 1. Page to page crossfade (cross-document View Transitions). Both pages carry this file, so it only runs inside the preview. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:220ms;animation-timing-function:cubic-bezier(.2,.7,.2,1)}
  /* The site header morphs as one piece (compact after scrolling, full on the new page) instead of showing twice */
  header{view-transition-name:sk-header}
  ::view-transition-group(sk-header){animation-duration:220ms;animation-timing-function:cubic-bezier(.2,.7,.2,1)}
}
@media (prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}

/* 2. Service tiles: lift and soft shadow on hover or keyboard focus, photo eases in slightly. Desktop pointers only.
   Overrides the Round 31 freeze (transition and transform locked with !important) with stronger selectors. */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  html .expertise .r31-tiles .wrapp{transition:border-color var(--t-fast,180ms) var(--ease,ease),translate 280ms cubic-bezier(.2,.7,.2,1),box-shadow 280ms cubic-bezier(.2,.7,.2,1)!important}
  html .expertise .r31-tiles a:hover .wrapp,html .expertise .r31-tiles a:focus-visible .wrapp{translate:0 -6px;box-shadow:0 16px 32px rgba(0,73,74,.14),0 2px 6px rgba(0,73,74,.06)!important}
  html .expertise .r31-tiles a .wrapp .img-box img{transition:transform 650ms cubic-bezier(.2,.7,.2,1)!important}
  html .expertise .r31-tiles a:hover .wrapp .img-box img,html .expertise .r31-tiles a:focus-visible .wrapp .img-box img{transform:scale(1.05)!important}
}
/* Keyboard focus ring sits on the card itself, so it moves with the lift and is never covered */
html .expertise .r31-tiles a:focus-visible{outline:none!important}
html .expertise .r31-tiles a:focus-visible .wrapp{outline:3px solid #0F8474;outline-offset:3px}

/* 3. Headline line reveals: r39.js splits below-the-fold headings into masked lines and slides them up.
   The mask gets a little vertical room so descenders are not clipped. */
.r39-line-mask{padding-bottom:.08em;margin-bottom:-.08em}

/* 4. Stat count-up: one digit style before, during and after the count, so the figure never jumps sideways.
   r39-sr holds the final value for screen readers while the visible digits count. */
.couting .count-box .sk-stat{font-variant-numeric:lining-nums tabular-nums}
.r39-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* 5. Services accordion on phones: one chevron that turns when the section opens. */
@media (max-width:767.98px){
  .services .tab-pane .card-header .btn-link .fa-chevron-up{display:none!important}
  .services .tab-pane .card-header .btn-link .fa-chevron-down{display:inline-block!important}
  .services .tab-pane .card-header .btn-link[aria-expanded="true"] .fa-chevron-down{rotate:180deg}
}
@media (max-width:767.98px) and (prefers-reduced-motion:no-preference){
  .services .tab-pane .card-header .btn-link .fa-chevron-down{transition:rotate 220ms cubic-bezier(.2,.7,.2,1)}
}
