/* KitCutz process cards (homepage "How it works"): the four step screens side by side on a light
   stage, with a soft beam of light behind the middle and a glowing floor. Hover or keyboard focus
   lifts a card, lights its top edge and slides its button up from the bottom (touch screens show
   the buttons all the time). kc-process.js plays the entrance once.
   Light theme: the glow is cool silver-white; KitCutz yellow stays on the site's main buttons.

   ===== CUSTOMISE ===================================================== */
.kp{
  --kp-card:#ffffff;
  --kp-line:#e4e5e8;
  --kp-radius:22px;
  --kp-glow:rgba(170,190,220,.55);     /* top-edge light on the active card */
  --kp-beam:rgba(214,222,236,.9);      /* light column behind the cards */
  --kp-floor:rgba(205,214,230,.85);    /* glowing floor under the cards */
  --kp-ease:cubic-bezier(.2,.8,.2,1);
}
/* ===================================================================== */

.kp{position:relative;overflow:hidden;overflow:clip;isolation:isolate;background:var(--white,#fff)}
.kp-beam{position:absolute;z-index:-1;left:50%;top:0;width:min(520px,60vw);height:78%;transform:translateX(-50%);pointer-events:none;
  background:radial-gradient(50% 100% at 50% 0%,var(--kp-beam),rgba(255,255,255,0) 72%);filter:blur(18px);
  animation:kp-breathe 7s ease-in-out infinite alternate}
.kp-floor{position:absolute;z-index:-1;left:-10%;right:-10%;bottom:-120px;height:360px;pointer-events:none;
  background:radial-gradient(50% 60% at 50% 40%,var(--kp-floor),rgba(255,255,255,0) 70%);filter:blur(10px)}
@keyframes kp-breathe{from{opacity:.75}to{opacity:1}}

.kp-head{text-align:center;max-width:720px;margin:0 auto}
.kp-head .sr-lede{margin-left:auto;margin-right:auto}
.kp-row{list-style:none;margin:clamp(32px,4vw,52px) 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(12px,1.6vw,20px);align-items:start}

.kp-card{position:relative;display:flex;flex-direction:column;padding:12px;border-radius:var(--kp-radius);background:var(--kp-card);
  border:1px solid var(--kp-line);box-shadow:0 1px 0 rgba(23,26,32,.03),0 26px 50px -36px rgba(23,26,32,.45);overflow:hidden;isolation:isolate;
  transition:transform .5s var(--kp-ease),box-shadow .5s var(--kp-ease),border-color .5s var(--kp-ease)}
.kp-card::before{content:"";position:absolute;z-index:0;left:-20%;right:-20%;top:-60px;height:180px;pointer-events:none;
  background:radial-gradient(50% 50% at 50% 50%,var(--kp-glow),rgba(255,255,255,0) 70%);opacity:0;transform:translateY(-20px);
  transition:opacity .5s var(--kp-ease),transform .5s var(--kp-ease)}
.kp-card > *{position:relative;z-index:1}

.kp-pill{align-self:flex-start;display:inline-flex;align-items:center;gap:7px;margin:4px 4px 12px;padding:6px 11px;border-radius:999px;
  background:var(--mist,#f4f4f4);font-size:12px;font-weight:600;line-height:1;color:var(--ink,#171a20)}
.kp-pill i{width:7px;height:7px;border-radius:50%;border:1.5px solid currentColor;transition:background-color .4s}

.kp-pic{margin:0;border-radius:calc(var(--kp-radius) - 8px);overflow:hidden;background:#f8f7f4;aspect-ratio:800 / 1776;transition:transform .5s var(--kp-ease)}
.kp-pic img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .7s var(--kp-ease)}

/* the button: hidden below the picture until the card is active, then it slides up */
.kp-reveal{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s var(--kp-ease)}
.kp-reveal > div{overflow:hidden;min-height:0}
.kp-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;margin-top:12px;border-radius:999px;
  background:var(--ink,#171a20);color:#fff;font-size:14px;font-weight:600;text-decoration:none;opacity:0;transform:translateY(10px);
  transition:opacity .45s var(--kp-ease),transform .45s var(--kp-ease),background-color .25s}
.kp-btn:hover{background:#2a2e36}
.kp-btn svg{width:16px;height:16px}
.kp-btn:focus-visible{outline:2px solid var(--ink,#171a20);outline-offset:3px}

/* active card: hover (mouse) or anything inside focused */
.kp-card.is-on,.kp-card:focus-within{transform:translateY(-6px);border-color:#d6dbe3;box-shadow:0 1px 0 rgba(23,26,32,.03),0 34px 60px -34px rgba(23,26,32,.5)}
.kp-card.is-on::before,.kp-card:focus-within::before{opacity:1;transform:none}
.kp-card.is-on .kp-pill i,.kp-card:focus-within .kp-pill i{background:currentColor}
.kp-card.is-on .kp-reveal,.kp-card:focus-within .kp-reveal{grid-template-rows:1fr}
.kp-card.is-on .kp-btn,.kp-card:focus-within .kp-btn{opacity:1;transform:none}
.kp-card.is-on .kp-pic img{transform:scale(1.015)}
@media (hover:hover){
  .kp-row{padding-bottom:58px}   /* room for the button so nothing below jumps when a card opens */
  .kp-card:hover{transform:translateY(-6px);border-color:#d6dbe3;box-shadow:0 1px 0 rgba(23,26,32,.03),0 34px 60px -34px rgba(23,26,32,.5)}
  .kp-card:hover::before{opacity:1;transform:none}
  .kp-card:hover .kp-pill i{background:currentColor}
  .kp-card:hover .kp-reveal{grid-template-rows:1fr}
  .kp-card:hover .kp-btn{opacity:1;transform:none}
  .kp-card:hover .kp-pic img{transform:scale(1.015)}
}
/* touch screens: no hover, so every button is shown */
@media (hover:none){
  .kp-reveal{grid-template-rows:1fr}
  .kp-btn{opacity:1;transform:none}
}
.kp-more{margin-top:clamp(26px,3vw,36px);text-align:center}

/* tablets: two by two */
@media (max-width:1023px){
  .kp-row{grid-template-columns:repeat(2,minmax(0,1fr));max-width:680px;margin-left:auto;margin-right:auto}
}
/* phones: a swipeable row, one screen at a time with the next peeking in */
@media (max-width:640px){
  .kp-row{display:flex;gap:12px;max-width:none;overflow-x:auto;scroll-snap-type:x mandatory;margin-left:-20px;margin-right:-20px;padding:0 20px 18px;
    scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .kp-row::-webkit-scrollbar{display:none}
  .kp-card{flex:none;width:min(74vw,300px);scroll-snap-align:center}
}
@media (prefers-reduced-motion:reduce){
  .kp-beam{animation:none}
  .kp-card,.kp-card::before,.kp-pic,.kp-pic img,.kp-reveal,.kp-btn{transition:none}
}
