/* KAYA premium layer (2026-11-18): the "Our story" scrapbook and cute, playful motion.
   Presentation only. No checkout, cart, order, payment or ABA selectors.
   Motion uses transform, scale, translate and opacity only, and is off for reduced motion. */

/* ---------- Our story ---------- */
html:root body:not(#kp) #about.kaya-story{text-align:left!important}
html:root body:not(#kp) #about.kaya-story .kaya-story-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(40px,6vw,84px);align-items:center;max-width:1060px;margin:0 auto}
html:root body:not(#kp) #about.kaya-story .kaya-story-photo{position:relative;margin:0;justify-self:center;width:min(100%,300px);padding:18px 0 34px}
@media (min-width:761px){html:root body:not(#kp) #about.kaya-story .kaya-story-photo{margin-left:clamp(20px,4vw,56px)}}

/* Three polaroids in one stack; tap to bring the next one to the front. */
html:root body:not(#kp) #about.kaya-story .kaya-story-stack{position:relative;display:grid;cursor:pointer;-webkit-tap-highlight-color:transparent;outline:none}
html:root body:not(#kp) #about.kaya-story .kaya-story-stack:focus-visible{outline:3px solid #0A7846;outline-offset:10px;border-radius:12px}
html:root body:not(#kp) #about.kaya-story .kaya-story-polaroid{grid-area:1/1;position:relative;background:#fffdf7;padding:11px 11px 48px;border-radius:6px;box-shadow:0 1px 2px #0000000f,0 18px 40px -14px #12352548,0 4px 12px #12352514;transform-origin:50% 70%;transition:transform .7s cubic-bezier(.34,1.45,.64,1),box-shadow .4s ease}
html:root body:not(#kp) #about.kaya-story .kaya-story-polaroid img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;border-radius:3px;background:#efe6d6}
html:root body:not(#kp) #about.kaya-story .kaya-story-polaroid figcaption{position:absolute;left:10px;right:10px;bottom:14px;margin:0;text-align:center;font-size:14px;font-style:italic;font-weight:600;color:#4a5a50;line-height:1.25}
.kaya-story-stack .kaya-story-polaroid[data-pos="0"]{z-index:3;transform:rotate(-3deg)}
.kaya-story-stack .kaya-story-polaroid[data-pos="1"]{z-index:2;transform:translate(-14%,3%) rotate(-10deg)}
.kaya-story-stack .kaya-story-polaroid[data-pos="2"]{z-index:1;transform:translate(14%,5%) rotate(8deg)}
/* Photos 4 and 5 wait tucked behind the front one, so the pile looks full without spreading wider. */
.kaya-story-stack .kaya-story-polaroid[data-pos="3"]{z-index:0;transform:translate(-4%,2%) rotate(3deg)}
.kaya-story-stack .kaya-story-polaroid[data-pos="4"]{z-index:0;transform:translate(4%,1%) rotate(-7deg)}
.kaya-story-stack .kaya-story-polaroid:not([data-pos="0"]) figcaption{opacity:0;transition:opacity .3s ease}

html:root body:not(#kp) #about.kaya-story .kaya-story-stamp{position:absolute;z-index:5;right:-12px;top:2px;display:inline-block;padding:8px 13px;border-radius:999px;background:#0A7846;color:#fff8e8;font-size:12px;font-weight:800;letter-spacing:.04em;white-space:nowrap;box-shadow:0 8px 18px -6px #0a784680}
#about.kaya-story .kaya-story-stamp{transform:rotate(5deg)}

html:root body:not(#kp) #about.kaya-story .kaya-story-copy{max-width:540px}
html:root body:not(#kp) #about.kaya-story .kaya-story-copy .section-kicker{text-align:left!important;margin:0 0 10px!important;justify-content:flex-start!important}
html:root body:not(#kp) #about.kaya-story .kaya-story-copy h2{text-align:left!important;margin:0 0 22px!important;max-width:none!important}
html:root body:not(#kp) #about.kaya-story .kaya-story-copy p{margin:0 0 16px!important;font-size:17px!important;line-height:1.7!important;color:#33463d!important;text-align:left!important;max-width:34em}
html:root body:not(#kp) #about.kaya-story .kaya-story-copy p.kaya-story-sign{margin:26px 0 0!important;font-size:19px!important;font-style:italic;font-weight:600;color:#0A5F38!important}
html:root body:not(#kp) #about.kaya-story .kaya-story-sign-name{display:block;margin-top:4px;font-size:12px;font-style:normal;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#7a6a45}
html:root body:not(#kp) #about.kaya-story .kaya-story-sign-name:before{content:"— "}
@media (max-width:760px){
 html:root body:not(#kp) #about.kaya-story .kaya-story-grid{grid-template-columns:1fr;gap:30px}
 html:root body:not(#kp) #about.kaya-story .kaya-story-photo{width:min(64%,250px)}
 html:root body:not(#kp) #about.kaya-story .kaya-story-copy{max-width:none}
 html:root body:not(#kp) #about.kaya-story .kaya-story-copy p{font-size:16px!important;line-height:1.65!important}
}

/* ---------- Motion (only when the motion script has switched it on) ---------- */
.kp-progress{position:fixed;left:0;top:0;right:0;height:3px;z-index:2147482000;pointer-events:none;background:linear-gradient(90deg,#0A7846,#2fb36e 60%,#e2b04a);transform-origin:0 50%;transform:scaleX(0);will-change:transform}
html.kp-motion .site-header{transition:box-shadow .35s ease}
html.kp-motion.kp-scrolled .site-header{box-shadow:0 10px 30px -18px #0f3b2766!important}

/* Titles and labels hop up with a little bounce. */
html.kp-motion .kp-head{opacity:0;translate:0 22px;scale:.94;transition:opacity .45s ease,translate .75s cubic-bezier(.34,1.56,.64,1),scale .75s cubic-bezier(.34,1.56,.64,1)}
html.kp-motion .kp-head.kp-in{opacity:1;translate:0 0;scale:1}
html.kp-motion .kp-kicker{opacity:0;scale:.6;transition:opacity .35s ease,scale .6s cubic-bezier(.34,1.8,.64,1)}
html.kp-motion .kp-kicker.kp-in{opacity:1;scale:1}

/* Food photos pop in. */
html.kp-motion .kp-photo{opacity:0;scale:.86;transition:opacity .45s ease,scale .8s cubic-bezier(.34,1.56,.64,1)}
html.kp-motion .kp-photo.kp-in{opacity:1;scale:1}

/* Story: the photos fan out from a neat pile, the stamp lands. */
html.kp-motion .kaya-story:not(.kp-in) .kaya-story-stack .kaya-story-polaroid{transform:rotate(0deg);opacity:0;scale:.7}
html.kp-motion .kaya-story-stack .kaya-story-polaroid{transition:transform .9s cubic-bezier(.34,1.45,.64,1),opacity .4s ease,scale .7s cubic-bezier(.34,1.56,.64,1),box-shadow .4s ease}
html.kp-motion .kaya-story:not(.kp-settled) .kaya-story-polaroid[data-pos="3"],html.kp-motion .kaya-story:not(.kp-settled) .kaya-story-polaroid[data-pos="4"]{transition-delay:0s}
html.kp-motion .kaya-story:not(.kp-settled) .kaya-story-polaroid[data-pos="2"]{transition-delay:.05s}
html.kp-motion .kaya-story:not(.kp-settled) .kaya-story-polaroid[data-pos="1"]{transition-delay:.17s}
html.kp-motion .kaya-story:not(.kp-settled) .kaya-story-polaroid[data-pos="0"]{transition-delay:.29s}
html.kp-motion .kaya-story .kaya-story-stamp{transition:opacity .3s ease .85s,scale .6s cubic-bezier(.34,2,.64,1) .85s}
html.kp-motion .kaya-story:not(.kp-in) .kaya-story-stamp{opacity:0;scale:.3}
html.kp-motion .kaya-story .kaya-story-copy p{transition:opacity .5s ease,translate .7s cubic-bezier(.34,1.4,.64,1)}
html.kp-motion .kaya-story:not(.kp-in) .kaya-story-copy p{opacity:0;translate:0 16px}
html.kp-motion .kaya-story.kp-in .kaya-story-copy p:nth-of-type(1){transition-delay:.2s}
html.kp-motion .kaya-story.kp-in .kaya-story-copy p:nth-of-type(2){transition-delay:.32s}
html.kp-motion .kaya-story.kp-in .kaya-story-copy p:nth-of-type(3){transition-delay:.44s}
html.kp-motion .kaya-story.kp-in .kaya-story-copy p:nth-of-type(4){transition-delay:.6s}

/* Tap sparkles (created by the script, removed after they fade). */
.kp-spark{position:fixed;z-index:2147482500;pointer-events:none;font-size:15px;line-height:1;color:#e2b04a;text-shadow:0 1px 0 #fff8;will-change:transform,opacity}
.kp-spark.kp-green{color:#0A7846}
.kp-spark.kp-pink{color:#e86a8a}

/* Buttons: a springy press everywhere, a little lift on computers. */
html.kp-motion .hero-actions .btn,html.kp-motion .kaya-feature-order{transition:translate .35s cubic-bezier(.34,1.56,.64,1),scale .25s cubic-bezier(.34,1.56,.64,1),box-shadow .35s ease}
html.kp-motion .hero-actions .btn:active,html.kp-motion .kaya-feature-order:active,html.kp-motion .product-bottom .action-btn:active{scale:.94}
html.kp-motion .product-bottom .action-btn{transition:scale .25s cubic-bezier(.34,1.56,.64,1)}
@media (hover:hover) and (pointer:fine){
 html.kp-motion .hero-actions .btn:hover,html.kp-motion .kaya-feature-order:hover{translate:0 -3px;box-shadow:0 14px 28px -14px #0a784699}
 html.kp-motion .product-bottom .action-btn:hover{scale:1.05}
 html.kp-motion .toast-media>img,html.kp-motion .limited-media>img{transition:transform 1.2s cubic-bezier(.16,1,.3,1)}
 html.kp-motion .product-card:hover .toast-media>img,html.kp-motion .limited-card:hover .limited-media>img{transform:scale(1.05) rotate(-.6deg)}
 html.kp-motion .kaya-story.kp-in .kaya-story-stack:hover .kaya-story-polaroid[data-pos="0"]{transform:rotate(-1deg) translate(0,-6px)}
 html.kp-motion .kaya-story.kp-in .kaya-story-stack:hover .kaya-story-polaroid[data-pos="1"]{transform:translate(-18%,2%) rotate(-13deg)}
 html.kp-motion .kaya-story.kp-in .kaya-story-stack:hover .kaya-story-polaroid[data-pos="2"]{transform:translate(18%,4%) rotate(11deg)}
}

@media (prefers-reduced-motion:reduce){
 .kp-progress,.kp-spark{display:none!important}
 html.kp-motion *{transition:none!important;animation:none!important}
 html.kp-motion .kp-head,html.kp-motion .kp-kicker,html.kp-motion .kp-photo,
}

/* Khmer labels: wide letter-spacing pulls Khmer clusters apart, so keep it tight. */
html:root body.lang-km:not(#kp) .section-kicker{letter-spacing:.01em!important}
