/* 21 · Strike the Iron (buttons) · prefix stk
   THE TREATMENT (ships site-wide): .stk-heat on any ember <a>/<button>. CSS does the heat; piece.js only throws sparks.
   .stk-ember is a stand-in for the site's existing ember pill. .stk-seal is the hanko seal variant (glint).
   Everything under "DEMO" is lab staging only. */

/* ---------- THE TREATMENT ---------- */
.stk-heat{
  --stk-x:50%;
  position:relative;isolation:isolate;-webkit-tap-highlight-color:transparent;
  transition:transform .6s cubic-bezier(.34,1.56,.64,1),text-shadow .9s cubic-bezier(.25,.7,.3,1);
}
/* inner heat: the fill deepens to hot orange, hottest low and under the hand, with an inner glow */
.stk-heat::before,.stk-heat::after{content:"";position:absolute;border-radius:inherit;pointer-events:none;z-index:-1}
.stk-heat::before{
  inset:0;opacity:0;transform:translateY(8%) scaleY(.9);transform-origin:50% 100%;
  background:
    radial-gradient(70% 120% at var(--stk-x) 128%,rgba(255,214,140,.95),rgba(255,138,52,.72) 40%,rgba(222,70,20,0) 78%),
    linear-gradient(180deg,#c73a11,#d8430f 70%,#e2511a);
  box-shadow:inset 0 0 0 1px rgba(255,190,120,.32),inset 0 -7px 14px -6px rgba(255,220,150,.75),inset 0 6px 10px -8px rgba(255,236,200,.5);
  transition:opacity .95s cubic-bezier(.22,.7,.3,1),transform .95s cubic-bezier(.22,.7,.3,1);
}
/* the edge: a hot halo whose air wavers for a moment, then holds */
.stk-heat::after{
  inset:-3px;opacity:0;transform:scale(.97);
  box-shadow:0 0 0 1px rgba(255,196,130,.26),0 0 16px 2px rgba(255,112,40,.45),0 10px 26px -8px rgba(230,73,37,.7);
  transition:opacity 1.1s cubic-bezier(.22,.7,.3,1),transform 1.1s cubic-bezier(.22,.7,.3,1);
}
.stk-heat:hover,.stk-heat:focus-visible{text-shadow:0 1px 2px rgba(96,18,0,.5),0 0 1px rgba(96,18,0,.4)}
.stk-heat:hover::before,.stk-heat:focus-visible::before{
  opacity:1;transform:none;
  transition-duration:.42s,.42s;transition-timing-function:cubic-bezier(.55,0,.25,1);
}
.stk-heat:hover::after,.stk-heat:focus-visible::after{
  opacity:1;transform:none;transition-duration:.5s,.5s;
  animation:stk-haze 2.6s .25s cubic-bezier(.45,0,.55,1) 1 both;
}
@keyframes stk-haze{
  0%{transform:none;opacity:1}
  18%{transform:scale(1.012,1.07);opacity:.82}
  37%{transform:scale(1.004,.99);opacity:1}
  58%{transform:scale(1.016,1.05);opacity:.86}
  80%{transform:scale(1.002,1.01);opacity:.97}
  100%{transform:none;opacity:1}
}
.stk-heat:focus{outline:none}
.stk-heat:focus-visible{outline:3px solid var(--stk-ring,#ffcd8e);outline-offset:4px}
/* the press: down fast, rings back up like struck iron */
.stk-heat:active{transform:translateY(1px) scale(.972);transition:transform .07s cubic-bezier(.5,0,.75,0)}
.stk-heat.stk-struck::before{animation:stk-flash .5s cubic-bezier(.16,1,.3,1) 1}
@keyframes stk-flash{0%{opacity:1;filter:brightness(1.28) saturate(1.1)}100%{opacity:1;filter:none}}

/* spark layer (piece.js adds it on press, removes it after) */
.stk-sparks{position:absolute;inset:0;pointer-events:none;overflow:visible;z-index:2;border-radius:inherit}
.stk-spark,.stk-flash{position:absolute;left:0;top:0;display:block;pointer-events:none;will-change:transform,opacity}
.stk-spark{height:2.5px;border-radius:2px;transform-origin:0 50%;box-shadow:0 0 6px 1px rgba(255,170,80,.85)}
.stk-flash{width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,250,232,.95),rgba(255,206,130,.55) 35%,rgba(255,120,40,0) 70%)}

/* ---------- seal variant: the red hanko "Free first draft", a glint runs across it ---------- */
.stk-seal{
  display:inline-grid;place-items:center;box-sizing:border-box;width:7.25rem;height:7.25rem;border-radius:50%;
  padding:.9rem;text-align:center;text-decoration:none;color:#fff;cursor:pointer;
  font:600 1.05rem/1.05 var(--fx-serif);
  background:radial-gradient(circle at 38% 30%,#d8362f,#b81f1c 62%,#9c1416);
  box-shadow:inset 0 0 0 5px #b81f1c,inset 0 0 0 6.5px rgba(255,236,224,.82),inset 0 0 0 9px rgba(156,20,22,.0),
    0 10px 24px -10px rgba(20,4,4,.7);
  transform:rotate(-9deg);
  transition:transform .6s cubic-bezier(.34,1.56,.64,1);
}
.stk-seal.stk-heat::before{
  inset:0;transform:none;opacity:1;box-shadow:none;
  background:linear-gradient(115deg,rgba(255,255,255,0) 38%,rgba(255,244,214,.62) 47%,rgba(255,255,255,.9) 50%,rgba(255,232,190,.5) 53%,rgba(255,255,255,0) 62%) 160% 0/320% 100% no-repeat;
  mix-blend-mode:screen;z-index:1;transition:none;
}
.stk-seal.stk-heat:hover::before,.stk-seal.stk-heat:focus-visible::before{animation:stk-glint 1.15s .05s cubic-bezier(.45,.05,.2,1) 1 both}
@keyframes stk-glint{from{background-position:160% 0}to{background-position:-60% 0}}
.stk-seal.stk-heat:hover,.stk-seal.stk-heat:focus-visible{transform:rotate(-6deg) scale(1.03);text-shadow:none}
.stk-seal.stk-heat:active{transform:rotate(-6deg) scale(.95)}
.stk-seal.stk-heat.stk-struck::before{animation:stk-glint .7s cubic-bezier(.16,1,.3,1) 1 both}
.stk-seal-t{position:relative;z-index:2;display:block}

/* ---------- still: reduced motion or the site pause = colour change only ----------
   Only hover/focus/press states are touched, so flipping the pause never starts a transition at rest. */
@media (prefers-reduced-motion: reduce){
  .stk-heat::before,.stk-heat::after{transform:none}
  .stk-heat:hover::before,.stk-heat:focus-visible::before,.stk-heat:hover::after,.stk-heat:focus-visible::after{transition:opacity .2s linear!important;animation:none!important}
  .stk-heat.stk-struck::before{animation:none!important}
  .stk-heat:active,.stk-heat:hover,.stk-heat:focus-visible{transform:none!important;transition:none!important}
  .stk-seal.stk-heat,.stk-seal.stk-heat:hover,.stk-seal.stk-heat:focus-visible,.stk-seal.stk-heat:active{transform:rotate(-9deg)!important}
  .stk-seal.stk-heat:hover::before,.stk-seal.stk-heat:focus-visible::before{animation:none!important;background-position:50% 0;opacity:.4}
}
html.a11ym-paused .stk-heat:hover::before,html.a11ym-paused .stk-heat:focus-visible::before{transform:translateY(8%) scaleY(.9);transition:opacity .2s linear!important}
html.a11ym-paused .stk-heat:hover::after,html.a11ym-paused .stk-heat:focus-visible::after{transform:scale(.97);transition:opacity .2s linear!important;animation:none!important}
html.a11ym-paused .stk-heat.stk-struck::before{animation:none!important}
html.a11ym-paused .stk-heat:active,html.a11ym-paused .stk-heat:hover,html.a11ym-paused .stk-heat:focus-visible{transform:none!important;transition:none!important}
html.a11ym-paused .stk-seal.stk-heat,html.a11ym-paused .stk-seal.stk-heat:hover,html.a11ym-paused .stk-seal.stk-heat:focus-visible,html.a11ym-paused .stk-seal.stk-heat:active{transform:rotate(-9deg)!important}
html.a11ym-paused .stk-seal.stk-heat:hover::before,html.a11ym-paused .stk-seal.stk-heat:focus-visible::before{transform:none;animation:none!important;background-position:50% 0;opacity:.4}
@media (forced-colors: active){.stk-heat::before,.stk-heat::after,.stk-sparks{display:none}}
