/* Texture is sampled from the same photograph; the leaf rotates on its hinge. */
#physical-hatch{position:absolute;left:67.2%;top:44.2%;width:6.8%;height:30.2%;z-index:95;pointer-events:none;perspective:600px;transform-style:preserve-3d}
.hatch-opening,.hatch-leaf{position:absolute;inset:0;clip-path:polygon(0 9%,100% 0,100% 100%,0 91%)}
.hatch-opening{background:linear-gradient(110deg,#1d241b,#394130 65%,#171d16);box-shadow:inset 7px 0 10px #10150ed9;opacity:0;transition:opacity .45s ease}
.hatch-opening:before{content:'';position:absolute;inset:8% 6%;background:linear-gradient(100deg,transparent 70%,#8e9c6f26);border-right:2px solid #ad8a5033}
.hatch-leaf{background-image:url('assets/loft-realistic.png');background-size:1470.588235% 331.125828%;background-position:72.103004% 63.323782%;transform-origin:100% 50%;transform:rotateY(0deg);transition:transform .95s cubic-bezier(.25,.65,.2,1),filter .95s ease;backface-visibility:visible;box-shadow:inset 1px 0 2px #d4b17e44}
#physical-hatch.is-open .hatch-opening{opacity:1}
#physical-hatch.is-open .hatch-leaf{transform:rotateY(108deg);filter:brightness(.79)}
.realistic-loft .scene .gate-hit{left:67.2%;top:44.2%;height:30.2%;width:6.8%}
.realistic-loft .scene .gate-hit span{font-size:8px;padding:4px 6px;border-radius:7px;bottom:-4px;right:-8px;white-space:nowrap;background:#fff9e5d9;color:#6b714c}
.realistic-loft .scene .gate-hit[aria-expanded=true] span{background:#e3f1dce8;color:#4f784b}
#aerial-sky{position:relative;height:0;z-index:180;transition:height .7s ease;background:linear-gradient(#a8cce5,#b6d6eb);overflow:visible}
#aerial-sky.has-flight{height:180px}
.sky-atmosphere{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.sky-atmosphere i{position:absolute;width:33%;height:28%;left:10%;top:23%;border-radius:50%;background:radial-gradient(ellipse,#ffffff70,transparent 72%);filter:blur(9px);animation:flock-clouds 35s ease-in-out infinite alternate}
.sky-atmosphere i:nth-child(2){left:56%;top:7%;width:45%;height:49%;opacity:.6;animation-delay:-12s}
.sky-atmosphere i:nth-child(3){left:31%;top:66%;width:25%;height:22%;opacity:.5;animation-delay:-23s}
#aerial-caption{position:absolute;top:13px;left:18px;z-index:220;font-size:10px;letter-spacing:.2px;color:#557a89;opacity:0;transition:opacity .3s;pointer-events:none}
#aerial-sky.has-flight #aerial-caption{opacity:1}
#aerial-birds-layer{position:absolute;inset:0;pointer-events:none;overflow:visible;z-index:180}
#aerial-birds-layer .scene-bird{pointer-events:auto}
#aerial-sky.motion-paused *{animation-play-state:paused!important}
@keyframes flock-clouds{to{translate:25px 0}}
@media(max-width:700px){#aerial-sky.has-flight{height:130px}#aerial-caption{font-size:8px;top:9px;left:11px}.realistic-loft .scene .gate-hit span{font-size:6px;padding:3px 4px;bottom:-3px;right:-8px}}
@media(prefers-reduced-motion:reduce){#physical-hatch .hatch-leaf,#physical-hatch .hatch-opening,#aerial-sky,#aerial-caption{transition:none!important}.sky-atmosphere i{animation:none!important}}
/* Both sky areas meet at the same colour; feather only the photograph's top edge. */
.has-aerial-flight .scene{background:#b6d6eb}
/* Continue the edge foliage into the flight area using the same photograph. */
.sky-atmosphere:before{content:'';position:absolute;inset:0;background:url('assets/loft-realistic.png') center top/100% var(--sky-scene-height) no-repeat;transform:scaleY(-1);-webkit-mask-image:linear-gradient(to right,#000 10%,transparent 18% 80%,#000 90%),linear-gradient(to bottom,#000,transparent clamp(35px,6vw,85px));mask-image:linear-gradient(to right,#000 10%,transparent 18% 80%,#000 90%),linear-gradient(to bottom,#000,transparent clamp(35px,6vw,85px));mask-composite:intersect;pointer-events:none}
.has-aerial-flight .loft-photograph{-webkit-mask-image:linear-gradient(to bottom,transparent,#000 5%),linear-gradient(to right,#000 10%,transparent 18% 80%,#000 90%);mask-image:linear-gradient(to bottom,transparent,#000 5%),linear-gradient(to right,#000 10%,transparent 18% 80%,#000 90%);mask-composite:add}
.scene-bird.homing{will-change:transform;transition:none!important}.homing .natural-stack .photo-flight{display:block}.homing .natural-stack .photo-ground{display:none}
/* Fold wings while standing on the landing board, before the separate hop. */
.scene-bird.homing.homing-perched .natural-stack .photo-flight{display:none}
.scene-bird.homing.homing-perched .natural-stack .photo-ground{display:block;animation:photo-breathe 3.7s ease-in-out infinite}
.scene-bird.homing.homing-perched .natural-stack .photo-shadow{display:block;opacity:.65}
.scene-bird.homing.homing-perched{z-index:210}
.scene-bird.homing.homing-hopping .natural-stack .photo-ground{display:none}
