/* Motion layer of the landing. Active only while <html> has .cw-motion, which the inline script in <head> adds
   unless the visitor asked for reduced motion. Every animation ends in the approved design's exact state. */

/* Lenis (smooth wheel scrolling): its own stylesheet, plus CSS smooth scrolling off while it drives the page. */
html.lenis{scroll-behavior:auto}
html.lenis,html.lenis body{height:auto}
.lenis:not(.lenis-autoToggle).lenis-stopped{overflow:clip}
.lenis.lenis-smooth iframe{pointer-events:none}

/* Hero entrance: text, illustration, overlay chips. */
@keyframes cw-up{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes cw-fade{from{opacity:0}to{opacity:1}}
.cw-motion .cw-in{animation:cw-up .9s cubic-bezier(.2,.7,.2,1) both}
.cw-motion .cw-in-1{animation-delay:.05s}
.cw-motion .cw-in-2{animation-delay:.15s}
.cw-motion .cw-in-3{animation-delay:.28s}
.cw-motion .cw-in-4{animation-delay:.4s}
.cw-motion .cw-in-5{animation-delay:.5s}
.cw-motion .cw-in-art{animation:cw-fade 1s ease-out .2s both}
.cw-motion .cw-in-art>.cw-chip-o{animation:cw-up .7s cubic-bezier(.2,.7,.2,1) both}
.cw-motion .cw-in-art>.cw-chip-o:nth-of-type(1){animation-delay:.7s}
.cw-motion .cw-in-art>.cw-chip-o:nth-of-type(2){animation-delay:2.2s}
.cw-motion .cw-in-art>.cw-chip-o:nth-of-type(3){animation-delay:2.5s}
.cw-motion .cw-in-art.cw-wait>.cw-chip-o{animation-play-state:paused}

/* First-person marker in the hero: an extra ring that keeps pulsing out of the static one. */
.cw-beacon{transform-box:fill-box;transform-origin:center;animation:cw-beacon 2.6s cubic-bezier(.2,.6,.3,1) infinite;pointer-events:none}
@keyframes cw-beacon{0%{transform:scale(1);opacity:.75}100%{transform:scale(2.8);opacity:0}}

/* Reveal on scroll (classes added by motion.js only to elements below the first screen). */
.cw-motion .cw-rv{opacity:0;transform:translateY(22px);transition:opacity .8s cubic-bezier(.2,.7,.2,1) var(--d,0s),transform .8s cubic-bezier(.2,.7,.2,1) var(--d,0s)}
.cw-motion .cw-rv.is-in{opacity:1;transform:none}

/* Cards lift on hover once revealed. */
@media (hover:hover) and (pointer:fine){
 .cw-motion .cw-lift.cw-ready{transition:transform .45s cubic-bezier(.2,.7,.2,1),border-color .3s ease}
 .cw-motion .cw-lift.cw-ready:hover{transform:translateY(-4px);border-color:rgba(52,201,139,.38)}
}

/* Step 01: typing in the search field. */
.cw-caret{display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-.16em;background:#34c98b;border-radius:1px;animation:cw-blink .9s steps(1) infinite}
@keyframes cw-blink{50%{opacity:0}}
.cw-motion .cw-fadable{transition:opacity .45s ease}
.cw-motion .cw-gone{opacity:0}

/* Step 02: terrain contours draw, then plots get picked. */
.cw-motion .cw-draw{transition:stroke-dashoffset 1.1s cubic-bezier(.4,0,.2,1)}
.cw-motion .cw-tile{transform-box:fill-box;transform-origin:center;transition:opacity .45s ease,transform .5s cubic-bezier(.3,1.5,.5,1)}
.cw-motion .cw-tile-off{opacity:0;transform:scale(.8)}

/* Step 03: build progress chips. */
.cw-motion .cw-chip{display:inline-block;transition:opacity .35s ease,transform .4s cubic-bezier(.3,1.5,.5,1)}
.cw-motion .cw-chip-off{opacity:0;transform:scale(.75)}
.cw-pulse{animation:cw-pulse 1.6s ease-in-out infinite}
@keyframes cw-pulse{50%{opacity:.45}}

/* Cameras card: the highlight walks 1 → 5 (and follows the pointer or keys 1–5). */
.cw-motion [data-cw-cams]>div,.cw-motion [data-cw-cams]>div>span,.cw-motion [data-cw-roofs]>span,.cw-motion [data-cw-floors]+span{transition:background-color .25s ease,border-color .25s ease,color .25s ease,opacity .25s ease}
.cw-cam-lit{background:rgba(52,201,139,.16)!important;border-color:#34c98b!important}
.cw-cam-lit>span:last-child{background:#34c98b!important;color:#08201a!important;border-color:#34c98b!important}
.cw-cam-idle{background:rgba(253,248,239,.04)!important;border-color:rgba(255,255,255,.08)!important}
.cw-cam-idle>span:last-child{background:transparent!important;color:#8f97a3!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}
.cw-cam-idle>span:nth-child(3):not(:last-child){opacity:0}

/* Building card: floors count up, the roof choice steps to Mansard. */
.cw-press{background:rgba(52,201,139,.35)!important}
.cw-roof-lit{background:rgba(52,201,139,.16)!important;border-color:#34c98b!important;color:#fdf8ef!important}
.cw-roof-idle{background:rgba(253,248,239,.05)!important;border-color:rgba(255,255,255,.1)!important;color:#c8cdd6!important}
