/* Round 12: the living owls (owls.js). The hero owl breathes, follows the pointer with its eyes (round 14: all the time), does
   an idle move every few seconds and plays along when clicked; each Customize card plays its owl's clip while it is on screen,
   over a small idle move of its own, and answers the mouse or a tap. */

/* ---------- hero ---------- */
.pl-hero__owl.is-alive .d-owl-still{animation:none}       /* phone.css's constant sway gives way to the moments */
.d-owl-rig{position:absolute;inset:0;display:block;transform-origin:50% 92%;animation:owl-breathe 3.8s ease-in-out infinite}
@keyframes owl-breathe{0%,100%{transform:scale(1,1)}50%{transform:scale(1.008,1.018)}}
.d-owl-body{position:absolute;inset:0;display:block}
.d-owl-body>.d-owl-still,.d-owl-eyes{position:absolute;inset:0;display:block;width:100%;height:100%}
/* round 14: the eyes (no pupils) and the page's pupils replace the still once loaded; the pupils sit over the clips */
.d-owl-eyes,.d-owl-pupil{visibility:hidden}
.d-owl-pupil{position:absolute;display:block;z-index:2;background:url(/assets/m/owls/owl-pupil.webp?v=r18) center/100% 100% no-repeat;will-change:transform}
.d-owl-rig.has-eyes .d-owl-eyes,.d-owl-rig.has-eyes .d-owl-pupil{visibility:visible}
.d-owl-rig.has-eyes .d-owl-still{visibility:hidden}
/* a clip covers the box at 125 %, so a hop and a wave have room */
.d-owl-body>.d-owl-clip{position:absolute;z-index:1;left:-12.5%;top:-18.75%;width:125%;height:125%;max-width:none;display:block;pointer-events:none;visibility:hidden}
.d-owl-body>.d-owl-clip.is-on{visibility:visible}
.d-owl-rig.is-moment .d-owl-still,.d-owl-rig.is-moment .d-owl-eyes{visibility:hidden}
.d-owl-rig:not(.has-eyes).is-moment .d-owl-pupil{visibility:hidden}
/* clicking the owl (round 14) */
.pl-hero__owl.is-alive.is-clickable{pointer-events:auto;cursor:pointer;-webkit-tap-highlight-color:transparent}
.pl-hero__owl.is-alive.is-ignoring{pointer-events:auto;cursor:default}
/* where no clip can play (no alpha in this browser, Save-Data): a tilt and a hop in CSS */
.d-owl-rig.is-tilt>.d-owl-body{transform-origin:50% 85%;animation:owl-tilt 1.3s ease-in-out}
.d-owl-rig.is-hop>.d-owl-body{transform-origin:50% 95%;animation:owl-hop .75s cubic-bezier(.3,0,.3,1)}
@keyframes owl-tilt{0%,100%{transform:rotate(0)}30%,65%{transform:rotate(-6deg)}}
@keyframes owl-hop{0%,100%{transform:translateY(0) scale(1,1)}18%{transform:translateY(0) scale(1.04,.94)}50%{transform:translateY(-12%) scale(.98,1.03)}80%{transform:translateY(0) scale(1.03,.96)}}

/* round 16c: no owl picture can be dragged out, selected or long-press saved (owls.js guard()); the hero's box keeps
   its clicks, the pictures inside it take no pointer events */
.pl-hero__owl,.m-end__owl,.e-bp__owl,.e-kinds{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}
.pl-hero__owl *,.m-end__owl img,.m-end__owl video,.e-kinds img{pointer-events:none;-webkit-user-drag:none;-webkit-touch-callout:none}

/* ---------- Customize cards ---------- */
/* round 16: every card's owl plays its clip (an animated AVIF over the still, owls.js) */
.d-look picture{position:relative;transform-origin:50% 88%}
.d-look .d-look-clip{position:absolute;inset:0;display:block}
.d-look .d-look-clip img{width:100%;height:100%;margin:0}
.d-look picture.is-clip>img{visibility:hidden}
/* nothing on the cards can be selected or dragged out (mouse, pen or a long press); the row still scrolls (round 16) */
.d-strip,.d-strip *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.d-strip img{-webkit-user-drag:none;pointer-events:none}

/* 2026-11-24: no two cards move alike. Under its clip each owl has one of five small idle moves (data-idle), with its own
   length, starting point and direction (--id, --il, --ix on the card); it runs only while the card is on screen
   (.is-live, owls.js). A card under the mouse, or tapped, answers in one of five ways (data-react) and its clip starts
   over. The moves use the picture's transform and the card's rotate / translate / scale, so the card's own tilt
   (transform, home.css) and the row's slide are left alone. */
.d-look.is-live picture{animation:var(--idle,look-bob) var(--id,3.4s) ease-in-out var(--il,0s) infinite}
.d-look[data-idle=tilt]{--idle:look-tilt}
.d-look[data-idle=float]{--idle:look-float}
.d-look[data-idle=hop]{--idle:look-hop}
.d-look[data-idle=sway]{--idle:look-sway}
@keyframes look-bob{0%,100%{transform:translateY(1%)}50%{transform:translateY(-3.5%)}}
@keyframes look-tilt{0%,100%{transform:rotate(calc(var(--ix,1)*-3deg))}50%{transform:rotate(calc(var(--ix,1)*3deg))}}
@keyframes look-float{0%,100%{transform:translate(0,0) rotate(0deg)}25%{transform:translate(calc(var(--ix,1)*2.2%),-2.4%) rotate(calc(var(--ix,1)*1.2deg))}50%{transform:translate(0,-4.4%) rotate(0deg)}75%{transform:translate(calc(var(--ix,1)*-2.2%),-2.4%) rotate(calc(var(--ix,1)*-1.2deg))}}
@keyframes look-hop{0%,52%,100%{transform:translateY(0) scale(1,1)}60%{transform:translateY(0) scale(1.045,.95)}74%{transform:translateY(-6.5%) scale(.98,1.035)}88%{transform:translateY(0) scale(1.03,.97)}}
@keyframes look-sway{0%,100%{transform:translateX(calc(var(--ix,1)*-3%)) rotate(calc(var(--ix,1)*-1.6deg))}50%{transform:translateX(calc(var(--ix,1)*3%)) rotate(calc(var(--ix,1)*1.6deg))}}
/* under the mouse: each kind settles differently (phones have no hover: phone.css puts the tilt back) */
.d-look{transition:transform .35s var(--spring),box-shadow .3s ease}
.d-look:hover{transform:rotate(var(--hrot,0deg)) translateY(var(--hty,-6px)) scale(var(--hsc,1.03))}
.d-look[data-react=pop]{--hsc:1.07;--hty:-4px}
.d-look[data-react=wiggle]{--hrot:calc(var(--rot,-2deg)*.4);--hty:-8px}
.d-look[data-react=lean]{--hrot:calc(var(--rot,-2deg)*-1);--hty:-6px}
.d-look[data-react=glow]{--hty:-12px;--hsc:1.02}
.d-look[data-react=jump]{--hty:-10px;--hsc:1.04}
@media (hover:hover){
  .d-look[data-react=glow]:hover,.d-look[data-react=pop]:hover{box-shadow:0 12px 0 -2px rgba(3,8,30,.55),0 0 0 4px color-mix(in srgb,var(--lc) 55%,transparent),0 22px 60px -8px var(--lc)}
}
/* a lifted card and its glow may reach past the row's top and bottom; the row still cuts off sideways */
@supports (overflow:clip){.d-owls .d-strip{overflow-x:clip;overflow-y:visible}}
/* the answer itself, once per hover or tap */
.d-look.is-react{animation:var(--re,look-re-pop) .75s cubic-bezier(.3,0,.3,1)}
.d-look[data-react=wiggle]{--re:look-re-wiggle}
.d-look[data-react=lean]{--re:look-re-lean}
.d-look[data-react=glow]{--re:look-re-glow}
.d-look[data-react=jump]{--re:look-re-jump}
@keyframes look-re-pop{0%,100%{scale:1}28%{scale:1.1}55%{scale:.97}78%{scale:1.03}}
@keyframes look-re-wiggle{0%,100%{rotate:0deg}18%{rotate:-5deg}38%{rotate:4.5deg}58%{rotate:-3deg}78%{rotate:1.5deg}}
@keyframes look-re-lean{0%,100%{rotate:0deg;translate:0 0}35%{rotate:calc(var(--rot,-2deg)*-2.4);translate:0 -8px}70%{rotate:calc(var(--rot,-2deg)*.6);translate:0 0}}
@keyframes look-re-glow{0%,100%{translate:0 0;scale:1}40%{translate:0 -10px;scale:1.05;box-shadow:0 12px 0 -2px rgba(3,8,30,.55),0 0 0 6px color-mix(in srgb,var(--lc) 70%,transparent),0 26px 70px -4px var(--lc)}}
@keyframes look-re-jump{0%,100%{translate:0 0;scale:1 1}14%{translate:0 0;scale:1.05 .94}45%{translate:0 -16px;scale:.98 1.03}76%{translate:0 0;scale:1.03 .97}}

@media (prefers-reduced-motion:reduce){
  .d-owl-rig{animation:none}
  .d-look picture,.d-look.is-react{animation:none}
}

/* round 13b, kept in round 14: a small press when the hero owl is clicked */
.pl-hero__owl.is-clickable:active .d-owl-rig{scale:.96;transition:scale .12s ease}
.pl-hero__owl.is-clickable .d-owl-rig{transition:scale .25s cubic-bezier(.2,1.4,.4,1)}
@media (prefers-reduced-motion:reduce){.pl-hero__owl.is-clickable{cursor:default}.pl-hero__owl.is-clickable:active .d-owl-rig{scale:none}}
