/*
* Archivo de pollito Animacion CSS puro
* - Wichy Alonzo para CactusWings
*/

/* Contenedor principal con sombra y rebote */
.chick-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cuerpo del pollito */
.chick {
    position: relative;
    width: 110px;
    height: 120px;
    background: #ffd13b;
    border-radius: 55% 55% 45% 45%;
    box-shadow: inset -6px -6px 0px #f4b400;
    animation: bounce 0.6s infinite alternate ease-in-out;
    z-index: 2;
}

/* Copete / Plumas arriba */
.tuft {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 18px;
    background: #ffd13b;
    border-radius: 50% 50% 0 0;
    box-shadow: -6px 2px 0 #ffd13b, 6px 4px 0 #ffd13b;
}

/* Ojos con parpadeo */
.eyes {
    position: absolute;
    top: 38px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 28px;
}

.eye {
    width: 12px;
    height: 14px;
    background-color: #2c2c2c;
    border-radius: 50%;
    position: relative;
    animation: blink 3.5s infinite;
}

.eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background-color: #fff;
    border-radius: 50%;
}

/* Cachetes sonrojados */
.cheeks {
    position: absolute;
    top: 48px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
}

.cheek {
    width: 14px;
    height: 8px;
    background-color: #ff8a80;
    border-radius: 50%;
    opacity: 0.7;
}

/* Pico */
.beak {
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 12px;
    background-color: #ff7043;
    border-radius: 30% 30% 60% 60%;
    box-shadow: inset 0 -2px 0 #e64a19;
    animation: chirp 1.2s infinite ease-in-out;
}

/* Alas aleteando */
.wing {
    position: absolute;
    top: 50px;
    width: 24px;
    height: 38px;
    background-color: #fbc02d;
    border-radius: 50% 50% 50% 50%;
}

.wing.left {
    left: -12px;
    transform-origin: right top;
    animation: flap-left 0.6s infinite alternate ease-in-out;
}

.wing.right {
    right: -12px;
    transform-origin: left top;
    animation: flap-right 0.6s infinite alternate ease-in-out;
}

/* Patitas */
.feet {
    position: absolute;
    bottom: -10px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 25px;
    z-index: 1;
}

.foot {
    width: 12px;
    height: 14px;
    border-bottom: 4px solid #ff7043;
    border-left: 3px solid #ff7043;
    border-right: 3px solid #ff7043;
    border-radius: 0 0 4px 4px;
}

/* Sombra dinámica */
.shadow {
    width: 90px;
    height: 14px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    margin-top: 4px;
    animation: shadow-scale 0.6s infinite alternate ease-in-out;
}

/* ANIMACIONES */

/* Rebote del cuerpo */
@keyframes bounce {
    0% {
        transform: translateY(0) scaleY(0.96) scaleX(1.02);
    }

    100% {
        transform: translateY(-18px) scaleY(1.02) scaleX(0.98);
    }
}

/* Aleteo izquierdo */
@keyframes flap-left {
    0% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(-35deg);
    }
}

/* Aleteo derecho */
@keyframes flap-right {
    0% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(35deg);
    }
}

/* Parpadeo */
@keyframes blink {

    0%,
    90%,
    100% {
        transform: scaleY(1);
    }

    95% {
        transform: scaleY(0.1);
    }
}

/* Pío / Movimiento suave del pico */
@keyframes chirp {

    0%,
    100% {
        transform: translateX(-50%) scaleY(1);
    }

    50% {
        transform: translateX(-50%) scaleY(1.25);
    }
}

/* Escala de la sombra al saltar */
@keyframes shadow-scale {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.65);
        opacity: 0.4;
    }
}