/* Hatch the Egg: DRAFT. Uses site vars from style.css, with fallbacks. */
.hatch{--h-ink:var(--ink,#151515);--h-sun:var(--sun,#ffc21a);--h-grass:var(--grass,#5bb535);--h-cream:var(--cream,#fff8e6);
  position:relative;overflow:hidden;padding:28px 0 0;text-align:center;
  background:linear-gradient(180deg,var(--sky-deep,#0f5fc2) 0%,var(--sky,#1e8fe8) 40%,#7fc0ef 62%,#ffd58a 82%,var(--sunset,#ff8a1f) 100%);
  font-family:ui-rounded,"Nunito","Trebuchet MS",system-ui,sans-serif;color:var(--h-ink);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
.hatch *{box-sizing:border-box}
.hatch__stage{margin-bottom:0}
.hatch__after{background:var(--dirt,#6b3f1f);border-top:0;min-height:120px}
.hatch__head{position:relative;z-index:3;padding:0 20px}
.hatch__kicker,.hatch__title,.hatch__hint,.hatch__name,.hatch__btn{font-family:"Freckle Face","Comic Sans MS",cursive;font-weight:400}
.hatch__kicker{margin:0;color:var(--h-sun);font-size:1.1rem;text-transform:uppercase;letter-spacing:.08em;text-shadow:2px 2px 0 var(--h-ink)}
.hatch__title{margin:.05em 0 .1em;color:#fff;font-size:clamp(2.2rem,10vw,3.4rem);line-height:1.05;
  text-shadow:3px 3px 0 var(--h-ink),-2px -2px 0 var(--h-ink),2px -2px 0 var(--h-ink),-2px 2px 0 var(--h-ink)}
.hatch__hint{margin:.2em 0 0;color:#fff;font-size:clamp(1.2rem,5.5vw,1.6rem);min-height:1.6em;
  text-shadow:2px 2px 0 var(--h-ink),-1px -1px 0 var(--h-ink),1px -1px 0 var(--h-ink),-1px 1px 0 var(--h-ink)}
.hatch__sound{position:absolute;top:10px;right:10px;z-index:6}
@keyframes mb-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){}
.hatch__stage{position:relative;height:min(100vw,440px);max-width:560px;margin:0 auto}
.hatch__hill{position:absolute;left:-10%;right:-10%;bottom:0;height:34%;z-index:1;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 200' preserveAspectRatio='none'%3E%3Cpath d='M0 70 Q300 -10 600 70 V200 H0Z' fill='%235bb535' stroke='%23151515' stroke-width='6'/%3E%3Cpath d='M0 150 Q300 100 600 150 V200 H0Z' fill='%236b3f1f' stroke='%23151515' stroke-width='6'/%3E%3C/svg%3E") center top/100% 100% no-repeat}
.hatch__egg{position:absolute;left:50%;bottom:22%;z-index:2;width:min(62vw,280px);aspect-ratio:200/250;margin-left:calc(min(62vw,280px)/-2);
  border:0;padding:0;background:none;cursor:pointer;touch-action:manipulation;transform-origin:50% 92%}
.hatch__egg svg{width:100%;height:100%;display:block;overflow:visible}
.hatch__egg:focus-visible{outline:4px dashed var(--h-sun);outline-offset:8px;border-radius:50%}
.hatch__crack{opacity:0;transition:opacity .15s}
.hatch__crack.on{opacity:1}
.hatch__egg.wobble{animation:hatch-wobble .45s ease}
@keyframes hatch-wobble{0%{transform:translateY(0) rotate(0)}20%{transform:translateY(-14px) rotate(-9deg)}45%{transform:translateY(0) rotate(7deg)}65%{transform:translateY(-5px) rotate(-4deg)}85%{transform:rotate(2deg)}100%{transform:none}}
.hatch__egg.burst{animation:hatch-burst .35s ease forwards;pointer-events:none}
@keyframes hatch-burst{0%{transform:scale(1)}40%{transform:scale(1.15,.9)}100%{transform:scale(1.4);opacity:0}}
.hatch__shell{position:absolute;bottom:22%;left:50%;z-index:2;width:min(40vw,180px);margin-left:calc(min(40vw,180px)/-2);opacity:0;pointer-events:none}
.hatch.is-hatched .hatch__shell{opacity:1}
.hatch__bird{position:absolute;left:50%;bottom:30%;z-index:3;width:min(58vw,250px);height:min(66vw,290px);margin-left:calc(min(58vw,250px)/-2);
  display:flex;align-items:flex-end;justify-content:center;opacity:0;transform:translateY(40px) scale(.3);pointer-events:none}
.hatch__bird img{max-width:100%;max-height:100%;width:auto;height:auto;filter:drop-shadow(5px 5px 0 rgba(21,21,21,.35))}
.hatch.is-hatched .hatch__bird{animation:hatch-pop .6s cubic-bezier(.3,1.6,.5,1) forwards}
@keyframes hatch-pop{to{opacity:1;transform:none}}
.hatch__fx{position:absolute;inset:0;z-index:4;pointer-events:none}
.hatch__bit{position:absolute;left:50%;top:58%;width:14px;height:22px;border:3px solid var(--h-ink);border-radius:50% 50% 50% 50%/60% 60% 40% 40%;
  animation:hatch-fly .9s ease-out forwards}
@keyframes hatch-fly{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(var(--dx),var(--dy)) rotate(var(--r));opacity:0}}
.hatch__card{position:relative;z-index:3;margin:0 auto;padding-top:14px;max-width:460px;padding:0 18px 30px;display:none}
.hatch.is-hatched .hatch__card{display:block;animation:hatch-in .4s .25s both}
@keyframes hatch-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.hatch__info{background:var(--h-cream);border:4px solid var(--h-ink);border-radius:22px 28px 20px 30px/28px 20px 30px 22px;box-shadow:6px 6px 0 var(--h-ink);padding:14px 18px 16px;border-top:12px solid var(--bird,var(--h-sun))}
.hatch__name{margin:0;font-size:2.3rem;line-height:1.1;color:var(--bird,var(--h-ink));text-shadow:2px 2px 0 var(--h-ink),-1px -1px 0 var(--h-ink),1px -1px 0 var(--h-ink),-1px 1px 0 var(--h-ink)}
.hatch__fact{margin:.3em 0 0;font-size:1.15rem;font-weight:700;line-height:1.4}
.hatch__btn{margin-top:18px;background:var(--h-sun);color:var(--h-ink);font-size:1.4rem;padding:.55em 1.2em;min-height:56px;border:4px solid var(--h-ink);
  border-radius:22px 28px 20px 30px/28px 20px 30px 22px;box-shadow:4px 4px 0 var(--h-ink);cursor:pointer;touch-action:manipulation}
.hatch__btn:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--h-ink)}
@media (prefers-reduced-motion:reduce){
  .hatch__egg.wobble,.hatch__egg.burst,.hatch.is-hatched .hatch__bird,.hatch.is-hatched .hatch__card,.hatch__bit{animation-duration:1ms!important;animation-delay:0s!important}
  .hatch__bit{display:none}
}

