/* Purposeful UI motion: CTAs now have a gentle, spaced repeating bounce. */
@media (prefers-reduced-motion: no-preference) {
  :where(.site-header .button-primary, .hero .button-primary, .closing .button-primary,
    .price-actions .button-primary, .price-commercial-quote .button, #estimate-app .btn:not(.ghost)) {
    transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease, background-color 180ms ease;
  }
  @media (hover: hover) {
    :where(.site-header .button-primary, .hero .button-primary, .closing .button-primary,
      .price-actions .button-primary, .price-commercial-quote .button, #estimate-app .btn:not(.ghost)):not(:disabled):hover {
      transform: translateY(-2px);
      box-shadow: 0 9px 22px rgb(0 74 112 / .18);
    }
    :where(.text-link, .button-primary) .action-icon,
    :where(.text-link, .button-primary) .icon {
      transition: transform 220ms cubic-bezier(.2,.8,.2,1);
    }
    :where(.text-link, .button-primary):hover :where(.icon, .action-icon) {
      transform: translateX(3px);
    }
    #estimate-app :where(.card, .service, .slot):not(:disabled) {
      transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease, background-color 170ms ease;
    }
    #estimate-app :where(.card, .service, .slot):hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgb(0 74 112 / .10);
    }
  }
  :where(.site-header .button-primary, .hero .button-primary, .closing .button-primary,
    .price-actions .button-primary, .price-commercial-quote .button, #estimate-app .btn):not(:disabled):active {
    transform: scale(.985);
  }
  /* Intro motion is confined to above-the-fold copy; keep page content available immediately. */
  body:not([data-site-page]) .hero-copy {
    animation: mj-intro 520ms cubic-bezier(.2,.8,.2,1) both;
  }
  [data-site-page="pricing"] .price-hero-copy {
    animation: mj-intro 480ms cubic-bezier(.2,.8,.2,1) both;
  }
  @keyframes mj-intro {
    from { opacity: .72; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  /* A one-time shimmer complements the subtle repeating CTA bounce. */
  :where(.hero, .price-hero) .button-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
  :where(.hero, .price-hero) .button-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 25%, rgb(255 255 255 / .30) 50%, transparent 75%);
    transform: translateX(-135%);
    animation: mj-sheen 900ms 850ms ease-out both;
  }
  @keyframes mj-sheen {
    from { transform: translateX(-135%); }
    to { transform: translateX(135%); }
  }
  /* Below-the-fold cards are enhanced only when IntersectionObserver is available.
     Default/JS-off content is never hidden. */
  [data-mj-reveal="pending"] {
    opacity: 0;
    transform: translateY(14px);
  }
  [data-mj-reveal="visible"] {
    opacity: 1;
    transform: none;
    transition: opacity 440ms ease, transform 440ms cubic-bezier(.2,.8,.2,1);
  }
  /* Pricing changes should feel like a deliberate selection, not a page reload. */
  .mj-plan-tabpanel:not([hidden]) > .mj-plan-comparison,
  .mj-plan-tabpanel:not([hidden]) .mj-plan-comparison {
    animation: mj-content-in 260ms ease-out both;
  }
  .mj-price-pair .mj-now-price, .mj-estimator-preview .mj-now-price {
    animation: mj-content-in 220ms ease-out both;
  }
  #estimate-app #stage > :first-child {
    animation: mj-content-in 260ms ease-out both;
  }
  #estimate-app #progress-meter-fill {
    transition: width 380ms cubic-bezier(.2,.8,.2,1);
  }
  @keyframes mj-content-in {
    from { opacity: .55; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}
#estimate-app .mj-services-group-label {
  margin: 8px 0 10px;
  color: #004a70;
  font-size: .9rem;
  font-weight: 800;
}
#estimate-app .mj-services-more { margin: 14px 0 12px; }
#estimate-app .mj-services-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid #9fbfce;
  border-radius: 999px;
  background: #f2f5f7;
  color: #004a70;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}
#estimate-app .mj-services-more > summary::-webkit-details-marker { display: none; }
#estimate-app .mj-services-more > summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
}
#estimate-app .mj-services-more[open] > summary::after { content: "\2212"; }
#estimate-app .mj-services-more > summary:hover { background: #e4eff5; }
#estimate-app .mj-services-more > summary:focus-visible { outline: 3px solid #007dba; outline-offset: 3px; }
#estimate-app .mj-services-more > .services { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) {
  #estimate-app #progress-meter-fill,
  :where(.site-header .button-primary, .hero .button-primary, .closing .button-primary,
    .price-actions .button-primary, .price-commercial-quote .button, #estimate-app .btn) {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Real totals, playful editorial cards. The curved line is a decorative motif, not an analytic chart. */
.mj-care-counts{
  --mj-card-ink:#004a70;--mj-card-blue:#007dba;--mj-card-yellow:#ffc727;
  position:relative;padding:clamp(48px,7vw,88px) 0;
  background:#f2f5f7;color:var(--mj-card-ink);font-family:"DM Sans",system-ui,sans-serif;
  overflow:clip;
}
.mj-care-counts :is(h2,p){margin:0}
.mj-care-shell{display:grid;gap:clamp(22px,3vw,34px)}
.mj-care-heading{max-width:760px}
.mj-care-eyebrow{
  display:inline-block;margin-bottom:12px;
  color:#006a9f;font-size:.78rem;font-weight:850;
  letter-spacing:.14em;line-height:1.4;text-transform:uppercase
}
.mj-care-heading h2{
  color:#004a70;font-size:clamp(2rem,4.1vw,3.45rem);
  line-height:1.11;letter-spacing:-.035em;font-weight:850;max-width:23ch
}
.mj-care-heading>p:not(.mj-care-support){
  margin-top:16px;font-size:clamp(1rem,1.5vw,1.14rem);
  line-height:1.55;max-width:64ch;color:#315d73
}
.mj-care-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,1.8vw,22px)}
.mj-care-stat{
  position:relative;isolation:isolate;min-width:0;
  padding:clamp(19px,2.4vw,28px);
  background:#fff;border:1px solid #d4e3ea;border-radius:23px;
  box-shadow:0 12px 30px rgb(0 74 112/.07),0 2px 5px rgb(0 74 112/.03);
  color:#004a70;overflow:hidden
}
.mj-care-stat::before{
  content:"";position:absolute;width:150px;height:150px;
  right:-72px;top:-92px;background:#f2f5f7;border-radius:50%;z-index:-1
}
.mj-care-card-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mj-care-icon{
  position:relative;display:inline-grid;place-items:center;flex:none;
  width:49px;height:49px;background:#e6f4fb;border-radius:16px;
  color:#006a9f;transform-origin:center bottom
}
.mj-care-icon svg{display:block;width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8}
.mj-care-spark{
  position:absolute;top:-9px;right:-9px;display:grid;place-items:center;
  width:23px;height:23px;border-radius:50%;border:3px solid #fff;
  background:#ffc727;color:#004a70;font-size:13px;line-height:1
}
.mj-care-period{
  color:#477387;border:1px solid #d0e2e9;border-radius:999px;
  padding:6px 10px;font-size:.68rem;font-weight:850;
  letter-spacing:.08em;white-space:nowrap
}
.mj-care-main{margin-top:18px}
.mj-care-value{
  display:block;color:#004a70;font-family:"DM Sans",system-ui,sans-serif;
  font-size:clamp(2.7rem,4.7vw,4.9rem);font-weight:850;
  font-variant-numeric:tabular-nums;letter-spacing:-.065em;
  line-height:1.08;white-space:nowrap
}
.mj-care-counts .mj-care-label{
  margin-top:9px;font-size:1.09rem;line-height:1.3;
  font-weight:850;color:#004a70
}
.mj-care-counts .mj-care-subtitle{
  margin-top:5px;font-size:.84rem;line-height:1.4;color:#4f7488
}
.mj-care-line{display:block;width:100%;height:84px;margin-top:12px;overflow:visible}
.mj-care-guide{fill:none;stroke:#e1edf3;stroke-width:1;stroke-dasharray:3 7}
.mj-care-line-path{
  fill:none;stroke:#007dba;stroke-width:3.6;
  stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke
}
.mj-care-dot-halo{fill:#e6f5fb}
.mj-care-dot{fill:#ffc727;stroke:#007dba;stroke-width:2}
.mj-care-footnote{color:#527b8b;font-size:.84rem;margin-top:-5px!important}
.mj-care-screen-reader{
  position:absolute;width:1px;height:1px;padding:0;
  margin:-1px;overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0
}
.mj-care-spotlight{padding:clamp(42px,6vw,70px) 0}
.mj-care-spotlight-inner{
  width:min(1180px,calc(100% - 80px));margin-inline:auto;
  display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  align-items:center;gap:clamp(24px,5vw,78px)
}
.mj-care-spotlight .mj-care-heading h2{font-size:clamp(2rem,3.25vw,3.1rem)}
.mj-care-spotlight .mj-care-heading .mj-care-support{
  margin-top:19px;font-size:.87rem;color:#527b8b;line-height:1.6
}
.mj-care-spotlight .mj-care-stat{width:100%;max-width:540px}
.mj-care-spotlight .mj-care-value{font-size:clamp(3.15rem,5.8vw,5.2rem)}
@media(max-width:990px){
  .mj-care-stats{gap:12px}
  .mj-care-stat{padding:17px}
  .mj-care-period{padding:5px 7px;font-size:.61rem}
  .mj-care-value{font-size:clamp(2.3rem,4.3vw,4rem)}
}
@media(max-width:720px){
  .mj-care-stats{grid-template-columns:1fr;gap:14px}
  .mj-care-spotlight-inner{width:calc(100% - 40px);grid-template-columns:1fr;gap:25px}
  .mj-care-spotlight .mj-care-stat{max-width:none}
  .mj-care-stat{padding:23px}
  .mj-care-value,.mj-care-spotlight .mj-care-value{font-size:clamp(3rem,12vw,4.7rem)}
  .mj-care-line{height:78px}
}
@media(max-width:360px){
  .mj-care-stat{padding:17px}
  .mj-care-value,.mj-care-spotlight .mj-care-value{font-size:clamp(2.6rem,11vw,4rem)}
}
@media(prefers-reduced-motion:no-preference){
  /* Two small upward hops every 3.4 seconds, beginning shortly after page load. */
  :where(.site-header .button-primary,.hero .button-primary,.sv-hero .sv-estimate,.price-hero .button-primary,
    .closing .button-primary,.sv-close .sv-estimate,.price-close .button-primary,
    .wc-hero .button-primary,.wc-close .button-primary,
    #estimate-app #next:not(:disabled),#estimate-app #submit-request:not(:disabled)){
    animation:mj-cta-bounce 3.4s ease-in-out 0s infinite
  }
  :where(.site-header .button-primary,.sv-close .sv-estimate,.wc-close .button-primary){animation-delay:.55s}
  @keyframes mj-cta-bounce{
    0%,6%,17%,28%,100%{transform:translateY(0)}
    11%{transform:translateY(-5px)}
    22%{transform:translateY(-2px)}
  }
  :where(.site-header .button-primary,.hero .button-primary,.sv-hero .sv-estimate,.price-hero .button-primary,
    .closing .button-primary,.sv-close .sv-estimate,.price-close .button-primary,
    .wc-hero .button-primary,.wc-close .button-primary,
    #estimate-app #next:not(:disabled),#estimate-app #submit-request:not(:disabled)):is(:hover,:focus-visible){
    animation:none;transform:translateY(-2px)
  }
  /* Number and line share the JS progress curve; don't animate the line
     independently or it will finish before the last-20%-sprint number. */
  [data-mj-counting="running"] .mj-care-dot,
  [data-mj-counting="running"] .mj-care-dot-halo{opacity:0}
  [data-mj-counting="running"] .mj-care-label{opacity:.25}
  [data-mj-counting="complete"] .mj-care-label{animation:mj-care-label-in 340ms ease-out both}
  [data-mj-counting="running"] .mj-care-icon{animation:mj-care-icon-bob 1.1s ease-out both}
  [data-mj-counting="complete"] .mj-care-dot{animation:mj-care-dot-pop .58s cubic-bezier(.15,.75,.25,1.2) both}
  @keyframes mj-care-label-in{from{opacity:.25;transform:translateY(6px)}to{opacity:1;transform:none}}
  @keyframes mj-care-icon-bob{0%,100%{transform:rotate(0) scale(1)}45%{transform:rotate(-8deg) scale(1.08)}}
  @keyframes mj-care-dot-pop{0%{transform:scale(.68);transform-origin:349px 10px}60%{transform:scale(1.2);transform-origin:349px 10px}100%{transform:scale(1);transform-origin:349px 10px}}
}
@media(prefers-reduced-motion:reduce){
  :where(.site-header .button-primary,.hero .button-primary,.sv-hero .sv-estimate,.price-hero .button-primary,
    .closing .button-primary,.sv-close .sv-estimate,.price-close .button-primary,
    .wc-hero .button-primary,.wc-close .button-primary,
    #estimate-app #next,#estimate-app #submit-request){
    animation:none!important;transform:none!important
  }
  .mj-care-stat *{animation:none!important;transition:none!important}
}

/* The estimator shows the *shape* of the actual price summary during a real API lookup. */
#estimate-app .mj-price-loading {
  min-height: 180px;
}
#estimate-app .mj-price-loading > h3 { margin-bottom: 8px; }
#estimate-app .mj-price-skeleton {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}
#estimate-app .mj-price-skeleton > span {
  display: block;
  height: 15px;
  width: 100%;
  border-radius: 5px;
  background: #dce8ef;
}
#estimate-app .mj-price-skeleton > span:nth-child(2) { width: 82%; }
#estimate-app .mj-price-skeleton > span:nth-child(3) { width: 55%; }
@media (prefers-reduced-motion: no-preference) {
  #estimate-app .mj-price-loading .mj-price-skeleton > span {
    background: linear-gradient(100deg, #dce8ef 25%, #f2f5f7 50%, #dce8ef 75%);
    background-size: 200% 100%;
    animation: mj-price-placeholder 1.7s ease-in-out infinite;
  }
  @keyframes mj-price-placeholder {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
  }
}


/* Site-wide motion: consistently target primary actions across modern, archived,
   blog, social, and estimate pages. Leave secondary and destructive controls still. */
@media (prefers-reduced-motion: no-preference) {
  :where(
    a.button-primary, button.button-primary,
    a.page-action-primary, button.page-action-primary,
    a.sqs-button-element--primary, button.sqs-button-element--primary,
    a.mj-btn-primary, button.mj-btn-primary,
    a.mj-btn.primary, button.mj-btn.primary,
    a.mj-cta-btn:not(.secondary), button.mj-cta-btn:not(.secondary),
    a.wc-estimate, a.sv-estimate,
    a.primary-action, a.mj-sticky-bid,
    #estimate-app .btn:not(.ghost):not(.border)
  ):not(:disabled):not([aria-disabled="true"]) {
    animation: mj-cta-bounce 3.4s ease-in-out 0s infinite;
  }
  /* Stagger header/footer CTAs so simultaneous motion never competes. */
  :where(
    .site-header .button-primary, .site-footer .button-primary,
    .closing .button-primary, .wc-close .button-primary,
    .sv-close .button-primary, .price-close .button-primary
  ):not(:disabled):not([aria-disabled="true"]) {
    animation-delay: .85s;
  }
  /* A little personality in key symbols—not bobbing whole cards or paragraphs. */
  :where(
    .trust-row .trust-item > .icon,
    .audience-links > a > .icon,
    .sv-scope-options article > .sv-icon,
    .wc-promises > div > i,
    .mj-care-spark
  ) {
    transform-origin: 50% 75%;
    animation: mj-trust-icon-nod 10.5s ease-in-out 2s infinite;
  }
  .trust-item:nth-child(2) > .icon,
  .sv-scope-options article:nth-child(2) > .sv-icon,
  .wc-promises > div:nth-child(2) > i { animation-delay: 3.7s; }
  .trust-item:nth-child(3) > .icon,
  .sv-scope-options article:nth-child(3) > .sv-icon { animation-delay: 5.2s; }
  .trust-item:nth-child(4) > .icon { animation-delay: 6.5s; }
  @keyframes mj-trust-icon-nod {
    0%,81%,95%,100% { transform: translateY(0) rotate(0deg); }
    85% { transform: translateY(-3px) rotate(-4deg); }
    89% { transform: translateY(0) rotate(2deg); }
    92% { transform: translateY(-1px) rotate(0deg); }
  }
  :where(
    a.button-primary, button.button-primary,
    a.page-action-primary, button.page-action-primary,
    a.sqs-button-element--primary, button.sqs-button-element--primary,
    a.mj-btn-primary, button.mj-btn-primary,
    a.mj-btn.primary, button.mj-btn.primary,
    a.mj-cta-btn:not(.secondary), button.mj-cta-btn:not(.secondary),
    a.wc-estimate, a.sv-estimate,
    a.primary-action, a.mj-sticky-bid,
    #estimate-app .btn:not(.ghost):not(.border)
  ):is(:hover,:focus-visible,:active) {
    animation: none;
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  :where(
    a.button-primary, button.button-primary,
    a.page-action-primary, button.page-action-primary,
    a.sqs-button-element--primary, button.sqs-button-element--primary,
    a.mj-btn-primary, button.mj-btn-primary,
    a.mj-btn.primary, button.mj-btn.primary,
    a.mj-cta-btn:not(.secondary), button.mj-cta-btn:not(.secondary),
    a.wc-estimate, a.sv-estimate,
    a.primary-action, a.mj-sticky-bid,
    #estimate-app .btn:not(.ghost):not(.border),
    .trust-row .trust-item > .icon,
    .audience-links > a > .icon,
    .sv-scope-options article > .sv-icon,
    .wc-promises > div > i, .mj-care-spark
  ) {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
