/* Micro animations. Everything here is transform/opacity only and is switched off for "reduce motion". */

/* 1. Header: hand-drawn underline on links, wiggle + press on the pink Shop button */
.diary-top-menu .nav a:not([href="#shop"]),.diary-top-menu .nav button{position:relative}
.diary-top-menu .nav a:not([href="#shop"])::after,.diary-top-menu .nav button::after{content:"";position:absolute;left:-3px;right:-3px;bottom:-5px;height:7px;filter:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='7' viewBox='0 0 100 7' preserveAspectRatio='none'%3E%3Cpath d='M2 4.5 Q14 1 27 4 T52 3.5 T77 4 T98 2.5' fill='none' stroke='%23f7bfd3' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;clip-path:inset(0 100% 0 0);transition:clip-path .25s ease-out;pointer-events:none}
.diary-top-menu .nav a:not([href="#shop"]):focus-visible::after,.diary-top-menu .nav button:focus-visible::after{clip-path:inset(0 0 0 0)}
@media(hover:hover){.diary-top-menu .nav a:not([href="#shop"]):hover::after,.diary-top-menu .nav button:hover::after{clip-path:inset(0 0 0 0)}
.diary-top-menu .nav a[href="#shop"]:hover{animation:tpWiggle .5s ease}}
.diary-top-menu .nav a[href="#shop"]{transition:transform .12s ease,box-shadow .12s ease}
.diary-top-menu .nav a[href="#shop"]:active{transform:translate(2px,3px);box-shadow:0 0 0 #24201f;animation:none}
@keyframes tpWiggle{0%{transform:rotate(0)}25%{transform:rotate(-3deg)}55%{transform:rotate(2.5deg)}80%{transform:rotate(-1deg)}100%{transform:rotate(0)}}

/* 2. Hero: the diary settles into place once the intro has finished (or straight away if it was skipped) */
html:not(.has-intro) .complete-diary{animation:tpSettle .7s cubic-bezier(.2,.75,.3,1) both}
@keyframes tpSettle{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}

/* 3. Shop cards tilt and lift, a little differently each so the row feels hand-placed */
@media(hover:hover){
.shop-card{transition:transform .32s cubic-bezier(.3,1.5,.5,1)}
.shop-card:nth-child(odd):hover{transform:translateY(-7px) rotate(-.9deg)}
.shop-card:nth-child(even):hover{transform:translateY(-7px) rotate(.9deg)}
}

/* 4. Scroll-in: things below the fold rise and fade in, one after another */
html.js-reveal .reveal{opacity:0;transform:translateY(22px);transition:opacity .6s ease,transform .7s cubic-bezier(.2,.75,.3,1);transition-delay:var(--d,0s)}
html.js-reveal .reveal.is-in{opacity:1;transform:none}

/* 5. Confetti stickers (spawned by js/motion.js) */
.tp-confetti{position:fixed;z-index:2000;pointer-events:none;line-height:1;font-family:Arial,sans-serif;will-change:transform,opacity}

@media(prefers-reduced-motion:reduce){
.diary-top-menu .nav a::after,.diary-top-menu .nav button::after{transition:none}
.diary-top-menu .nav a[href="#shop"]:hover{animation:none}
html:not(.has-intro) .complete-diary{animation:none}
.shop-card{transition:none}.shop-card:hover{transform:none!important}
html.js-reveal .reveal{opacity:1;transform:none;transition:none}
}