/* Accueil : entrées, micro-animations des cartes et états au défilement.
   Les règles s’activent une fois motion.js chargé (.motion-ready) et se
   coupent avec prefers-reduced-motion. */

/* Hero entrance */
.js .hero-copy>.enter{opacity:0}
.motion-ready .hero-copy>.enter{animation:cuisly-enter 900ms var(--ease) both;animation-delay:var(--d,0ms)}
.hero-copy>.hero-badge{--d:60ms}
.hero-copy>.intro{--d:480ms}
.hero-copy>.hero-actions{--d:600ms}
.hero-copy>.hero-proof{--d:720ms}
.js .hero-copy>h1.enter{opacity:1;animation:none}
.hero h1 .w{--d:140ms}
.js .hero-stage .device{opacity:0}
.motion-ready .hero-stage .device{animation:cuisly-phone-arrive 1200ms var(--ease) both}
.motion-ready .hero-center{animation-delay:420ms}
.motion-ready .hero-left{animation-delay:560ms}
.motion-ready .hero-right{animation-delay:660ms}
.js .stage-halo{opacity:0}
.motion-ready .stage-halo{animation:cuisly-halo 1600ms var(--ease) 300ms both}
.js .hero-note{opacity:0}
.motion-ready .hero-note{animation:cuisly-note-pop 700ms var(--spring) var(--pop-d,1150ms) both,cuisly-float var(--float-dur,7s) ease-in-out var(--float-d,0s) infinite}
.note-timer{--pop-d:1350ms}
.note-list{--pop-d:1550ms}
@keyframes cuisly-phone-arrive{from{opacity:0;translate:0 150px}to{opacity:1;translate:0 0}}
@keyframes cuisly-halo{from{opacity:0;scale:.9}to{opacity:1;scale:1}}
@keyframes cuisly-note-pop{from{opacity:0;scale:.86}to{opacity:1;scale:1}}

/* Feature cards — each piece of art plays once the card is in view */
.feature-card .recipe-tile,.feature-card .shopping-paper,.feature-card .fridge-mini-label,.feature-card .chat-question,.feature-card .chat-answer,.feature-card .timer-dial,.feature-card .portion-tag,.feature-card .widget-preview{opacity:0}
.feature-card.in :is(.recipe-tile,.shopping-paper,.fridge-mini-label,.chat-question,.chat-answer,.timer-dial,.portion-tag,.widget-preview){animation:cuisly-art-arrive 700ms var(--ease) both;animation-delay:calc(var(--d,0ms) + 200ms)}
.feature-card.in .recipe-tile:nth-child(2){animation-delay:calc(var(--d,0ms) + 320ms)}
.feature-card.in .recipe-tile:nth-child(3){animation-delay:calc(var(--d,0ms) + 440ms)}
.feature-card.in :is(.chat-answer,.portion-tag){animation-delay:calc(var(--d,0ms) + 520ms)}
@keyframes cuisly-art-arrive{from{opacity:0;translate:0 16px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
.feature-shopping.in .checked i path{animation:cuisly-check 420ms var(--ease) 700ms both}
.feature-shopping.in .checked:nth-child(3) i path{animation-delay:900ms}
@keyframes cuisly-check{to{stroke-dashoffset:0}}
.feature-fridge.in .fridge-scan{animation:cuisly-scan 1.8s var(--ease-io) 600ms both}
@keyframes cuisly-scan{0%{opacity:0;transform:translateY(-100%)}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateY(260%)}}
.feature-cooking.in .timer-ring-progress{animation:cuisly-ring 2.6s var(--ease) 500ms both}
@keyframes cuisly-ring{from{stroke-dashoffset:1}to{stroke-dashoffset:.28}}
.widget-preview p{opacity:0}
.feature-everywhere.in .widget-preview p{animation:cuisly-enter 600ms var(--ease) both;animation-delay:calc(var(--d,0ms) + 600ms)}
.feature-everywhere.in .widget-preview p+p{animation-delay:calc(var(--d,0ms) + 760ms)}

/* Fridge scrollytelling scan line on step one */
[data-step="0"] .photo-corners::after{animation:cuisly-scanline 2.4s ease-in-out infinite}
@keyframes cuisly-scanline{0%{top:0;opacity:0}10%{opacity:1}90%{opacity:1}100%{top:100%;opacity:0}}

/* Cooking timer ring */
.cooking-visual.in .cooking-timer-progress{animation:cuisly-ring-amber 3s var(--ease) 600ms both}
@keyframes cuisly-ring-amber{from{stroke-dashoffset:1}to{stroke-dashoffset:.35}}

/* Gallery screen switch */
.gallery-device.switching img{animation:cuisly-screen 460ms var(--ease)}
@keyframes cuisly-screen{from{opacity:.2;translate:0 8px}to{opacity:1;translate:0 0}}

/* Hover polish on pointer devices */
@media(hover:hover) and (pointer:fine){
  .feature-card .text-link span{transition:transform var(--fast) var(--ease)}
  .feature-card:hover .text-link span{transform:translate(3px,-3px)}
  .daily-card:hover .daily-icon{transform:rotate(-8deg) scale(1.08)}
  .daily-icon{transition:transform 500ms var(--spring)}
}

@media(prefers-reduced-motion:reduce){
  .js .hero-copy>.enter,.js .hero-stage .device,.js .stage-halo,.js .hero-note,.feature-card .recipe-tile,.feature-card .shopping-paper,.feature-card .fridge-mini-label,.feature-card .chat-question,.feature-card .chat-answer,.feature-card .timer-dial,.feature-card .portion-tag,.feature-card .widget-preview,.widget-preview p{opacity:1!important;animation:none!important}
  .shopping-line i path{stroke-dashoffset:0}
  .timer-ring-progress{stroke-dashoffset:.28}
  .cooking-timer-progress{stroke-dashoffset:.35}
  .photo-corners::after,.fridge-scan,.cooking-ring,.chat-thinking i{animation:none!important}
}
