/* ROUND 152 — animation fixes. See inc/round152.php. Body class sh-r152 on every page. */

/* ---- 1. Hero copy: hidden from the first paint until the entry rise starts (r63.js adds .sh-fadeup, then
         sh-r63-ready on <html>; r63.css carries the rise). Same block list as r63.js. ---- */
@keyframes sh-r152-safe{to{opacity:1;transform:none}}
@media (prefers-reduced-motion: no-preference){
  html:not(.sh-r63-ready) body.sh-r63.sh-r152 :is(.hero__copy,.gal__head,.aw__head,.pl-intro__text,.sh-hero__copy,.sd-hero__text,.kd__intro .kd__text,.dd__hero-stack,.qp-intro__text,.hl-intro__text,.bo__head,.dh__text,.sy-hero__stack,.sy-hero__text,.hld__title,.ct__hero-copy,.bp__hero-copy){
    opacity:0;transform:translateY(10px);transition:none;
    animation:sh-r152-safe 0s linear 3s forwards; /* scripts blocked or failed: the copy shows after 3s */
  }
}

/* ---- 2. Gallery tiles: the heart grows into the Save / Saved pill ---- */
.sh-r152 .gt .gt__save:not(.gt__save--pill){gap:0}
.sh-r152 .gt .gt__save:not(.gt__save--pill) .gt__save-label{display:block;max-width:0;margin-left:0;opacity:0;overflow:hidden;
  transition:max-width .35s var(--ease-soft),margin-left .35s var(--ease-soft),opacity .25s var(--ease-fade)}
.sh-r152 .gt:hover .gt__save:not(.gt__save--pill) .gt__save-label,
.sh-r152 .gt:focus-visible .gt__save:not(.gt__save--pill) .gt__save-label,
.sh-r152 .gt .gt__save:not(.gt__save--pill):focus-visible .gt__save-label{max-width:52px;margin-left:8px;opacity:1;transition:max-width .35s var(--ease-soft),margin-left .35s var(--ease-soft),opacity .3s var(--ease-fade) .08s}
.sh-r152 .gt.is-touch .gt__save .gt__save-label{display:block;max-width:0;margin-left:0;opacity:0}

/* ---- 3. Home Build Options cards: mouse-off without the hard clip ---- */
@media (min-width:1024px){
  .sh-r152.sh-r63-home .build__card-reveal{visibility:hidden;
    transition:grid-template-rows .8s var(--ease-card-close),opacity .3s var(--ease-card-close),margin-top .8s var(--ease-card-close),visibility 0s linear .8s}
  .sh-r152.sh-r63-home .build__card:hover .build__card-reveal,.sh-r152.sh-r63-home .build__card:focus-within .build__card-reveal{visibility:visible;
    transition:grid-template-rows .9s var(--ease-card-open),opacity .68s var(--ease-card-open) .06s,margin-top .9s var(--ease-card-open),visibility 0s}
  .sh-r152.sh-r63-home .build__card-reveal-in{overflow:visible} /* the card's own edge clips, while opening and closing alike */
}
