/* UKWR motion (v655). Shared by the index pages; guides later.
   Nothing is hidden unless ukwr-motion.js has run and added html.ukwr-m,
   and that only happens when the visitor has not asked for reduced motion. */

/* 1. Scroll reveal: sections, cards and topic blocks fade up as they come into view */
html.ukwr-m .ukwr-m-r{opacity:0;transform:translateY(16px);transition:opacity .6s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.16,1,.3,1)}
html.ukwr-m .ukwr-m-r.ukwr-m-in{opacity:1;transform:none}
@media print{html.ukwr-m .ukwr-m-r{opacity:1!important;transform:none!important}}

@media (prefers-reduced-motion:no-preference){

  /* 2. Drop-downs open smoothly, links inside follow one after another */
  .cat.open .cat-body{animation:ukwrMOpen .32s cubic-bezier(.16,1,.3,1) both;transform-origin:top}
  .cat.open .cat-body>*{animation:ukwrMItem .38s cubic-bezier(.16,1,.3,1) both}
  .cat.open .cat-body>*:nth-child(2){animation-delay:.03s}
  .cat.open .cat-body>*:nth-child(3){animation-delay:.06s}
  .cat.open .cat-body>*:nth-child(4){animation-delay:.09s}
  .cat.open .cat-body>*:nth-child(5){animation-delay:.12s}
  .cat.open .cat-body>*:nth-child(6){animation-delay:.15s}
  .cat.open .cat-body>*:nth-child(n+7){animation-delay:.18s}
  .cat-chev{transition:transform .3s cubic-bezier(.16,1,.3,1),background .2s,color .2s}
  @keyframes ukwrMOpen{from{opacity:0;transform:translateY(-6px) scaleY(.97)}to{opacity:1;transform:none}}
  @keyframes ukwrMItem{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

  /* 3. Icons and cards respond to hover (mouse) and press (touch) */
  .hm-ic,.cat-emoji,.tt-section-icon{transition:transform .35s cubic-bezier(.34,1.56,.64,1)}
  .hm-tile,.tt-card,.cat-hd{transition-property:transform,border-color,background,box-shadow;transition-duration:.2s}
  @media (hover:hover){
    .hm-tile:hover .hm-ic,.cat-hd:hover .cat-emoji{transform:rotate(-8deg) scale(1.1)}
    .tt-card:hover{transform:translateY(-2px)}
  }
  .hm-tile:active,.tt-card:active,.cat-hd:active{transform:scale(.985)}

  /* 4. Homepage "Three ways in": the steps build one after another,
        joined by a gold line that grows down between them */
  html.ukwr-m .hm-steps.ukwr-m-steps{position:relative}
  html.ukwr-m .hm-steps.ukwr-m-steps::before{content:"";position:absolute;left:30px;top:28px;bottom:28px;width:2px;border-radius:2px;background:var(--gold,#c9a84c);transform:scaleY(0);transform-origin:top;transition:transform 1.2s cubic-bezier(.65,0,.35,1) .2s;z-index:0}
  html.ukwr-m .hm-steps.ukwr-m-steps li{position:relative;z-index:1;opacity:0;transform:translateX(-14px);transition:opacity .5s cubic-bezier(.16,1,.3,1),transform .5s cubic-bezier(.16,1,.3,1)}
  html.ukwr-m .hm-steps.ukwr-m-steps .hm-n{transform:scale(.4);transition:transform .45s cubic-bezier(.34,1.56,.64,1)}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in::before{transform:scaleY(1)}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li{opacity:1;transform:none}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in .hm-n{transform:none}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li:nth-child(1),html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li:nth-child(1) .hm-n{transition-delay:.05s}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li:nth-child(2),html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li:nth-child(2) .hm-n{transition-delay:.6s}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li:nth-child(3),html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-in li:nth-child(3) .hm-n{transition-delay:1.15s}
  html.ukwr-m .hm-steps.ukwr-m-steps.ukwr-m-done .hm-n{animation:ukwrMRing 1s ease-out 1}
  @keyframes ukwrMRing{0%{box-shadow:0 0 0 0 rgba(201,168,76,.55)}100%{box-shadow:0 0 0 10px rgba(201,168,76,0)}}
}
