/* Callsmith site-wide motion and polish. Paired with /js/motion.js.
   Only blocks the script marks .rv are ever hidden, and only under html.motion. */

/* scroll reveal */
.motion .rv{opacity:0;transform:translateY(18px)}
.motion .rv.rv-in{opacity:1;transform:none;transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.2,1)}
.motion .rv-now{transition:none!important}
@media print{.motion .rv{opacity:1!important;transform:none!important}}

/* sticky header shadow once scrolled */
body>header{transition:box-shadow .2s ease}
body>header.is-scrolled{box-shadow:0 2px 14px rgba(22,26,29,.3)}

/* hover and press */
@media (hover:hover){
  .card,.svc,.tile{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
  .card:hover,.svc:hover,.tile:hover{transform:translateY(-3px);box-shadow:var(--shadow-hover,0 12px 28px rgba(28,58,91,.14))}
  .btn{transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}
  .btn:hover{transform:translateY(-1px);box-shadow:var(--btn-shadow-hover,0 6px 14px rgba(22,26,29,.2))}
  .btn-outline:hover{background:rgba(28,58,91,.08)}
  .btn-ghost:hover{background:rgba(255,255,255,.1)}
}
.btn:active{transform:translateY(1px);box-shadow:none}
/* a lifted card keeps its old footprint (1px border + 3px lift) under the pointer, so it does not flicker */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .card,.svc,.tile{position:relative}
  .card:hover::after,.svc:hover::after,.tile:hover::after{content:"";position:absolute;left:0;right:0;top:100%;height:4px}
}

/* focus: navy on light, orange on navy/black, white on orange */
:where(a,button,summary):focus-visible{outline:3px solid var(--iron);outline-offset:2px}
:where(body>header,footer,.hero,.dark,.contact,.vid) :where(a,button,summary):focus-visible,.skip:focus-visible{outline-color:var(--cone-lite)}
:where(.audit,.form,.hcheck,.svc,.calc) :where(a,button,summary):focus-visible{outline-color:var(--iron)}
:where(.promise,.guarantee) :where(a,button,summary):focus-visible{outline-color:#fff}
.callbar a:focus-visible{outline:3px solid #fff;outline-offset:-6px}

/* FAQ: smooth open and close where the browser supports it, native otherwise */
@media (prefers-reduced-motion:no-preference){
  .faq details{interpolate-size:allow-keywords}
  .faq details::details-content{block-size:0;overflow-y:clip;padding-block:6px;margin-block:-6px;transition:block-size .3s ease,content-visibility .3s allow-discrete}
  .faq details[open]::details-content{block-size:auto}
  .faq summary{position:relative;z-index:1}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .motion .rv{opacity:1!important;transform:none!important}
  .rv,.card,.svc,.tile,.btn,body>header{transition:none!important}
  .card:hover,.svc:hover,.tile:hover,.btn:hover,.btn:active{transform:none!important}
}
