/* MKweb 111: progressive, accessible motion inspired by scrolling portfolio sites. */
@media (prefers-reduced-motion: no-preference) {
  html.motion-enabled .motion-reveal {
    opacity: 0;
    translate: var(--motion-x, 0px) 22px;
    scale: .985;
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), translate .78s cubic-bezier(.2,.7,.2,1), scale .78s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--motion-delay, 0ms);
  }
  html.motion-enabled .motion-reveal.motion-from-left { --motion-x: -26px; }
  html.motion-enabled .motion-reveal.motion-from-right { --motion-x: 26px; }
  html.motion-enabled .motion-reveal.motion-visible {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
  /* The headline keeps its actual text in HTML for SEO and accessibility. */
  html.motion-enabled .motion-typed-heading .motion-type-text {
    display: inline-block;
    max-width: 100%;
    background: linear-gradient(100deg, var(--blue-deep, #1f6293), var(--blue, #3f8fc4) 35%, var(--green, #1a8f4c) 65%, var(--blue-deep, #1f6293));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    clip-path: inset(0 100% 0 0);
  }
  html.motion-enabled .motion-typed-heading.motion-visible .motion-type-text {
    animation: mkweb-type-reveal 1.65s steps(25, end) .12s both;
  }
  @keyframes mkweb-type-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
  /* Keep existing hover treatments and add a gentle tactile lift. */
  a.btn-primary, a.btn-work, a.nav-cta, button.work-carousel-btn, .work-carousel-btn {
    transition: background-color .22s ease, color .22s ease, box-shadow .28s ease, translate .28s ease, transform .22s ease;
  }
  a.btn-primary:hover, a.btn-work:hover, a.nav-cta:hover, button.work-carousel-btn:hover, .work-carousel-btn:hover {
    translate: 0 -3px;
    box-shadow: 0 12px 26px -15px rgba(31,98,147,.55);
  }
  .reason-card, .process-step, .why-point, .monthly-card, .work-cta-card {
    transition: box-shadow .25s ease, translate .25s ease;
  }
  .reason-card:hover, .process-step:hover, .why-point:hover {
    translate: 0 -3px;
  }
  /* The hero glow moves gently without shifting its layout or blocking clicks. */
  .page-head .page-glow { animation: mkweb-glow 8s ease-in-out infinite alternate; }
  @keyframes mkweb-glow { from {opacity:.7;} to {opacity:1;} }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  /* Wrapped text should never be clipped mid-line on phones. */
  html.motion-enabled .motion-typed-heading .motion-type-text {clip-path:none;}
  html.motion-enabled .motion-typed-heading.motion-visible .motion-type-text {animation:none;}
  html.motion-enabled .motion-reveal {translate:var(--motion-x,0px) 13px;transition-duration:.48s;}
}
@media (prefers-reduced-motion: reduce) {
  .motion-reveal, .motion-typed-heading .motion-type-text {opacity:1 !important;translate:none !important;scale:1 !important;clip-path:none !important;animation:none !important;transition:none !important;}
}

@media print {
  .motion-reveal {opacity:1 !important;translate:none !important;scale:1 !important;}
  .motion-typed-heading .motion-type-text {clip-path:none !important;animation:none !important;}
}
