/* LA World motion layer (11/17, "mobile polish + motion"; plan: handoff/2026-11-17-mobile-motion/02-PLAN.md, MOTION SPEC).
   Public pages only: loaded by common.page() after v2.css; the owner dashboard (/owner/) does not load it.
   transform + opacity only; prefers-reduced-motion turns all of it off; with JS off nothing is hidden
   (the waiting state exists only on elements v2.js has tagged). */

/* The old reveal (v2.css .v-rv, styles.css .rv) hid its blocks from the first paint until a script ran, the contact cards
   at the top of /contact/ included. They are ordinary visible blocks now (its fade is gone too, so a block shown at once
   shows at once); v2.js decides what waits, below the first screen only. */
.v-rv,.rv{opacity:1;transform:none;transition:none}

/* Touch screens: a tap must not leave a photo zoomed or a tile lifted (hover movement is for the mouse; audit chrome-32,
   commerce-30). The press states below still answer the tap. */
@media (hover:none){
  .v-tile:hover img,.v-prod:hover .v-prod__img img,.v-wall button:hover img,.v-minitiles a:hover,.v-crests a:hover,.v-crestwall a:hover,
  .v-tile:hover .v-tile__go,.v-link:hover .ico,.nav__tools .pill:hover{transform:none}
}

/* Everything that moves is for screens that don't ask for less motion (so print always shows the finished page). */
@media screen and (prefers-reduced-motion:no-preference){
  /* M1 + M2 reveal. A block below the first screen waits unseen (html.mo: v2.js is running), then settles 16 px up as it
     comes 8 % into view; cards that arrive together follow each other 55 ms apart (--mo-i 0-5, set by v2.js). The delay
     belongs to the animation (fill: backwards), so it never slows a later hover; transitions sit out until it has settled.
     A waiting block can't be tapped (nothing unseen under the finger). */
  html.mo .mo-wait{opacity:0;transition:none;pointer-events:none}
  html.mo .mo-in{animation:mo-rise 420ms var(--v-ease) calc(var(--mo-i,0) * 55ms) backwards;transition:none}
  @keyframes mo-rise{from{opacity:0;transform:translateY(16px)}}

  /* M3 the running stitch sews itself in from the left: on a page head once as the page opens (html.js is set in the head,
     before the first paint), elsewhere 120 ms after its block starts to settle. Only the dashes move, never the words. */
  html.js .v-phead .v-kick::before,html.js .v-shead .v-kick::before{transform-origin:left;animation:mo-sew 450ms var(--v-ease) 120ms backwards}
  html.mo .mo-in .v-kick::before,html.mo .mo-in .v-stitch{transform-origin:left;animation:mo-sew 450ms var(--v-ease) calc(var(--mo-i,0) * 55ms + 120ms) backwards}
  @keyframes mo-sew{from{transform:scaleX(0)}}

  /* M7 a lazy photo below the first screen stays clear until it has loaded, then fades in over 300 ms; the tile's own color
     holds its box meanwhile, so nothing moves. (An animation, not a transition, so the photos' zoom transitions stay theirs.) */
  html.mo .mo-img{opacity:0}
  html.mo .mo-img-in{animation:mo-fade 300ms var(--v-ease)}
  @keyframes mo-fade{from{opacity:0}}

  /* M8 a FAQ answer fades in and rises 6 px as its question opens (the + turning to x is v2.css's) */
  .v-faq details[open]>:not(summary){animation:mo-answer 240ms var(--v-ease)}
  @keyframes mo-answer{from{opacity:0;transform:translateY(6px)}}

  /* M9 the Start a Project done screen fades in (the toast and the count bump are v2.css's) */
  html.mo .bdone .done--show{animation:mo-fade 300ms var(--v-ease)}

  /* M4 press: a quick, firm answer, 120 ms in and back at the element's own pace. Buttons and pills .97, header icon
     buttons .92 (not the menu button), chips .96, cards .99. Not the homepage hero's buttons (approved look). */
  .v-btn:not([disabled],[aria-disabled=true]):active,.nav__tools .pill:active{transform:scale(.97);transition-duration:120ms}
  .nav__tools .icon-btn:not(.nav__menu):active{transform:scale(.92);transition:transform 120ms var(--v-ease)}
  .v-chip{transition:background var(--v-fast) var(--v-ease),box-shadow var(--v-fast) var(--v-ease),transform 160ms var(--v-ease)}
  .v-chip:active{transform:scale(.96);transition-duration:120ms}
  .v-rel__i,.v-contact__c,.v-school{transition:box-shadow var(--v-fast) var(--v-ease),transform 240ms var(--v-ease)}
  .v-prod,.v-sidx__i,.v-tile,.v-wall button{transition:transform 240ms var(--v-ease)}
  :is(.v-rel__i,.v-contact__c,.v-school,.v-prod,.v-sidx__i,.v-tile,.v-wall button):active{transform:scale(.99);transition-duration:120ms}

  /* M4 hover, mouse only: cards lift 2 px (their photos already zoom); a trailing arrow nudges 3 px toward where it goes */
  @media (hover:hover) and (pointer:fine){
    :is(.v-rel__i,.v-contact__c,.v-school,.v-prod):hover{transform:translateY(-2px)}
    .v-btn .ico,.nav__tools .pill .ico,:is(.v-rel__i,.v-sidx__i,.v-school)>.ico{transition:transform 220ms var(--v-ease)}
    :is(.v-rel__i,.v-sidx__i,.v-school):hover>.ico:last-child:not(:first-child){transform:translateX(3px)}
  }
}
/* the arrow inside a button: the label is text, so the icon is found by its own shape (a rule of its own: browsers without
   :has() skip just this one) */
@media screen and (prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  :is(.v-btn,.nav__tools .pill):hover .ico:has(path[d="m12 5 7 7-7 7"]){transform:translateX(3px)}
}

/* Less motion asked for: states still change, instantly and in place (no press scaling, no lift, no nudge). */
@media (prefers-reduced-motion:reduce){
  .v-btn:active,.nav__tools .pill:hover,.v-crestwall a:hover,.v-tile:hover .v-tile__go,.v-link:hover .ico{transform:none}
  .v-link .ico,.v-tile__go,.v-crestwall a,.v-faq summary .ico{transition:none}
}
