/* Kayron Host motion: entrances, scroll reveals and hover feedback.
   Everything here is switched off for people who ask their device for reduced motion,
   and content stays visible if the script does not run (the hiding rules need html.mo). */

@keyframes mo-up{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes mo-in-right{from{opacity:0;transform:translateX(28px) scale(.98)}to{opacity:1;transform:none}}
@keyframes mo-pop{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
@keyframes mo-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes mo-shine{from{transform:translateX(-120%) skewX(-20deg)}to{transform:translateX(220%) skewX(-20deg)}}
@keyframes mo-glow{0%,100%{box-shadow:0 0 0 0 rgba(247,148,29,.45)}50%{box-shadow:0 0 0 7px rgba(247,148,29,0)}}
@keyframes mo-spin{to{transform:rotate(360deg)}}
@keyframes mo-swap{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:no-preference){
  /* ---------- Scroll reveal (any page) ---------- */
  html.mo [data-mo]{opacity:0;transform:translateY(22px);transition:opacity .6s cubic-bezier(.2,.7,.2,1),transform .6s cubic-bezier(.2,.7,.2,1);transition-delay:var(--mo-d,0ms)}
  html.mo [data-mo].is-in{opacity:1;transform:none}

  /* ---------- Public site: hero entrance ---------- */
  html.mo .pub-hero-text>*{animation:mo-up .7s cubic-bezier(.2,.7,.2,1) both}
  html.mo .pub-hero-text>*:nth-child(2){animation-delay:.08s}
  html.mo .pub-hero-text>*:nth-child(3){animation-delay:.16s}
  html.mo .pub-hero-text>*:nth-child(4){animation-delay:.24s}
  html.mo .pub-hero-text>*:nth-child(5){animation-delay:.32s}
  html.mo .pub-hero-text>*:nth-child(6){animation-delay:.40s}
  html.mo .pub-hero-card{animation:mo-in-right .8s .2s cubic-bezier(.2,.7,.2,1) both,mo-float 7s 1.2s ease-in-out infinite}
  html.mo .pub-mini-grid>div{animation:mo-pop .5s cubic-bezier(.2,.7,.2,1) both}
  html.mo .pub-mini-grid>div:nth-child(1){animation-delay:.55s}
  html.mo .pub-mini-grid>div:nth-child(2){animation-delay:.65s}
  html.mo .pub-mini-grid>div:nth-child(3){animation-delay:.75s}
  html.mo .pub-mini-grid>div:nth-child(4){animation-delay:.85s}
  html.mo .pub-checks-lg li{animation:mo-up .5s cubic-bezier(.2,.7,.2,1) both}
  html.mo .pub-checks-lg li:nth-child(1){animation-delay:.2s}
  html.mo .pub-checks-lg li:nth-child(2){animation-delay:.28s}
  html.mo .pub-checks-lg li:nth-child(3){animation-delay:.36s}
  html.mo .pub-checks-lg li:nth-child(4){animation-delay:.44s}

  /* Logo: the orange orbit turns when you point at it */
  .pub-logo svg ellipse{transform-box:fill-box;transform-origin:center}
  .pub-logo:hover svg ellipse{animation:mo-spin 1.6s cubic-bezier(.4,0,.2,1)}

  /* Header gains a shadow once the page scrolls */
  .pub-header{transition:box-shadow .25s}
  .pub-header.is-scrolled{box-shadow:0 6px 24px rgba(11,42,91,.10)}

  /* Buttons lift; orange buttons get a light sweep */
  .pub-btn{position:relative;overflow:hidden;transition:transform .18s,box-shadow .18s,background-color .18s,border-color .18s}
  .pub-btn:hover{transform:translateY(-2px);box-shadow:0 10px 22px -10px rgba(11,42,91,.45)}
  .pub-btn:active{transform:translateY(0)}
  .pub-btn-orange::after{content:"";position:absolute;top:0;left:0;width:40%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);transform:translateX(-120%) skewX(-20deg);pointer-events:none}
  .pub-btn-orange:hover::after{animation:mo-shine .8s ease}

  /* Plan cards, tiles and the hero card respond to the pointer */
  .pub-card,.pub-tile{transition:transform .25s cubic-bezier(.2,.7,.2,1),box-shadow .25s,border-color .25s}
  .pub-card:hover,.pub-tile:hover{transform:translateY(-6px);box-shadow:0 22px 44px -18px rgba(11,42,91,.30);border-color:#bcd3f5}
  .pub-card.is-popular:hover{border-color:#F7941D}
  .pub-badge{animation:mo-glow 2.6s ease-in-out infinite}
  .pub-mini-grid>div{transition:transform .2s,background-color .2s}
  .pub-mini-grid>div:hover{transform:translateY(-3px)}
  .pub-chips span{transition:transform .18s,box-shadow .18s}
  .pub-chips span:hover{transform:translateY(-2px);box-shadow:0 8px 18px -10px rgba(11,42,91,.4)}

  /* Domain search box glows when focused */
  .pub-search input{transition:box-shadow .2s,border-color .2s}
  .pub-search input:focus{box-shadow:0 0 0 4px rgba(30,111,217,.18)}

  /* Monthly / yearly switch: prices slide in */
  .pub-price.mo-swap,.pub-billed.mo-swap{animation:mo-swap .35s cubic-bezier(.2,.7,.2,1)}
  .pub-toggle button{transition:background-color .2s,color .2s,box-shadow .2s}

  /* ---------- Signed-in portal ---------- */
  html.mo main.shell>*{animation:mo-up .55s cubic-bezier(.2,.7,.2,1) both}
  html.mo main.shell>*:nth-child(2){animation-delay:.06s}
  html.mo main.shell>*:nth-child(3){animation-delay:.12s}
  html.mo main.shell>*:nth-child(4){animation-delay:.18s}
  html.mo main.shell>*:nth-child(n+5){animation-delay:.24s}
  .stat,.panel,.product-card,.market-product-card,.market-store-card,.plan-card{transition:transform .22s cubic-bezier(.2,.7,.2,1),box-shadow .22s,border-color .22s}
  .stat:hover,.product-card:hover,.market-product-card:hover,.market-store-card:hover,.plan-card:hover{transform:translateY(-4px);box-shadow:0 18px 36px -18px rgba(11,42,91,.32)}
  .k-side nav a{transition:background-color .18s,color .18s,padding-left .18s}
  .k-side nav a:hover{padding-left:18px}
  .button,.primary-link,.market-button{transition:transform .16s,box-shadow .16s,background-color .16s}
  .button:hover,.primary-link:hover,.market-button:hover{transform:translateY(-1px)}
}
