/* Shared motion owner. No initial hiding, autoplay, floating KPIs or scroll lock. */
.motion-tablist { position: relative; isolation: isolate; }
.motion-tablist > :is([role="tab"], [data-mp-select]) { position: relative; z-index: 1; }
.motion-tab-indicator { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; border-radius: 99px; background: #48622e; }
#marketing-hero .motion-tab-indicator { background: #0b0d0b; }
.sc-section .motion-tab-indicator { background: #c7f45b; }

@media (prefers-reduced-motion: no-preference) {
  .motion-tabs-ready .motion-tab-indicator {
    transition: transform .24s cubic-bezier(.2,.75,.2,1), width .24s ease, height .24s ease;
  }
  #contenido .site-motion-enter { animation: site-motion-enter .4s cubic-bezier(.2,.75,.2,1) backwards; }
  #contenido .site-motion-switch { animation: site-motion-switch .24s ease-out; }
  #contenido .site-motion-field { animation: site-motion-field .16s ease-out; }
  #contenido :is(.omd-ad + .omd-ad, .mp-slide + .mp-slide).site-motion-enter { animation-delay: .08s; }
  #contenido .ois-chat.site-motion-enter { animation-delay: .1s; }
  #contenido .ois-context.site-motion-enter { animation-delay: .12s; }
  /* Highlight the existing story; messages and status text never move or dim. */
  #contenido .site-motion-story :is(.oh-message:not(.oh-message--team) .oh-message__bubble, .oh-quote, .oh-next-step) { position: relative; }
  #contenido .site-motion-story :is(.oh-message:not(.oh-message--team) .oh-message__bubble, .oh-quote, .oh-next-step)::after {
    content: ""; position: absolute; inset: 0; border: 3px solid #c7f45b;
    border-radius: inherit; pointer-events: none;
    animation: site-motion-focus .8s ease-in-out both;
  }
  #contenido .site-motion-story .oh-message:not(.oh-message--team) .oh-message__bubble::after { animation-delay: .15s; }
  #contenido .site-motion-story .oh-quote::after { animation-delay: .8s; }
  #contenido .site-motion-story .oh-next-step::after { animation-delay: 1.45s; }
  #contenido .site-motion-work li svg > path {
    stroke-dasharray: 32; animation: site-motion-check .4s ease-out .1s backwards;
  }
  #contenido .site-motion-work li:nth-child(2) svg > path { animation-delay: .3s; }
  #contenido .site-motion-work li:nth-child(3) svg > path { animation-delay: .5s; }
  #contenido .site-motion-chart svg > path[stroke] {
    stroke-dasharray: var(--motion-line-length);
    animation: site-motion-line .6s ease-out;
  }
  #contenido .site-motion-detail[open] > :not(summary) { animation: site-motion-detail .18s ease-out; }
  @keyframes site-motion-enter {
    from { opacity: .9; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes site-motion-switch {
    from { opacity: .88; transform: translateX(6px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes site-motion-field { from { opacity: .86; } to { opacity: 1; } }
  @keyframes site-motion-detail { from { opacity: .85; } to { opacity: 1; } }
  @keyframes site-motion-focus { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }
  @keyframes site-motion-check { from { stroke-dashoffset: 32; } to { stroke-dashoffset: 0; } }
  @keyframes site-motion-line {
    from { stroke-dashoffset: var(--motion-line-length); }
    to { stroke-dashoffset: 0; }
  }

  /* Native open state, keyboard and semantics stay with <details>. */
  @supports selector(::details-content) {
    @supports (interpolate-size: allow-keywords) {
      #contenido details { interpolate-size: allow-keywords; }
      #contenido details::details-content {
        block-size: 0;
        overflow: clip;
      }
      #contenido details[open]::details-content { block-size: auto; }
      .site-motion-ready #contenido details::details-content {
        transition: block-size .24s ease, content-visibility .24s allow-discrete;
      }
    }
  }

  :is(.nav-cta,.contact-submit,.hc-submit,.oh-cta,.omd-cta,.mp-cta,.os-cta,
      .bv-cta,.sc-cta,.sa-cta,.sm-cta,.sh-cta,.px-card-cta,.px-button,.px-jump) > svg {
    display: inline-block; transition: transform .16s ease;
  }
  :is(.nav-cta,.contact-submit,.hc-submit,.oh-cta,.omd-cta,.mp-cta,.os-cta,
      .bv-cta,.sc-cta,.sa-cta,.sm-cta,.sh-cta,.px-card-cta,.px-button,.px-jump):not(:disabled):focus-visible > svg {
    transform: translateX(3px);
  }
  @media (hover: hover) and (pointer: fine) {
    :is(.nav-cta,.contact-submit,.hc-submit,.oh-cta,.omd-cta,.mp-cta,.os-cta,
        .bv-cta,.sc-cta,.sa-cta,.sm-cta,.sh-cta,.px-card-cta,.px-button,.px-jump):not(:disabled):hover > svg {
      transform: translateX(3px);
    }
  }
  :is(.nav-cta,.contact-submit,.oh-cta,.omd-cta,.mp-cta,.os-cta,.sc-cta,
      .bv-cta,.sa-cta,.sm-cta,.sh-cta,.px-card-cta,.px-button):not(:disabled):active > svg {
    transform: translateX(2px);
  }
  :is(.hc-service,.hc-business,.hc-channel,.cp-choice,.mp-tabs button,.sc-mobile-tabs button,.ois-tabs button) {
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  }

  /* Progressive, same-origin navigation. No interception or loading delay. */
  @view-transition { navigation: auto; }
  .site-motion-ready .site-header { view-transition-name: mia-site-header; }
  ::view-transition-old(root) { animation: site-page-out .12s ease-out both; }
  ::view-transition-new(root) { animation: site-page-in .16s ease-out both; }
  ::view-transition-group(mia-site-header) { animation-duration: .16s; }
  @keyframes site-page-out { to { opacity: 0; } }
  @keyframes site-page-in { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  #contenido .site-motion-enter { animation-duration: .32s; }
}
@media (prefers-reduced-motion: reduce) {
  #contenido .site-motion-enter, #contenido .site-motion-switch, #contenido .site-motion-field,
  #contenido .site-motion-story *, #contenido .site-motion-story *::after,
  #contenido .site-motion-chart *, #contenido .site-motion-work *,
  #contenido .site-motion-detail > :not(summary), .motion-tab-indicator {
    animation: none !important; transition: none !important;
  }
  #contenido details::details-content { transition: none; }
  :is(.nav-cta,.contact-submit,.hc-submit,.oh-cta,.omd-cta,.mp-cta,.os-cta,
      .bv-cta,.sc-cta,.sa-cta,.sm-cta,.sh-cta,.px-card-cta,.px-button,.px-jump) > svg {
    transition: none; transform: none;
  }
  :is(.hc-service,.hc-business,.hc-channel,.cp-choice,.mp-tabs button,.sc-mobile-tabs button,.ois-tabs button) { transition: none; }
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}
