body {
    font-family: 'Gravitas One', serif;
    background-color: #daf7b7;
    text-align: center;
    padding: 60px 20px;
}


/* cyvles throught the colors */

h1 {
    font-size: 48px;
    color: #9c1c64;
}

#flip {
    height: 55px;
    overflow: hidden;
    display: inline-block;
    transform: translateY(12px);
}

#flip div {
    height: 55px;
    display: flex;
    align-items: center;
}

#flip span {
    font-size: 42px;
    padding: 0px 18px;
    color: white;
}

#flip div:nth-child(1) span {
    background-color: #9c1c64;
    color: #c6e890;
}

#flip div:nth-child(2) span {
    background-color: #fafac0;
    color: #9c1c64;
}

#flip div:nth-child(3) span {
    background-color: #95bf7c;
    color: #fafac0;
}

#flip div:first-child {
    animation: show 5s linear infinite;
}

@keyframes show {
    0%     { margin-top: -165px; }
    5%     { margin-top: -110px; }
    33%    { margin-top: -110px; }
    38%    { margin-top: -55px; }
    66%    { margin-top: -55px; }
    71%    { margin-top: 0px; }
    99.99% { margin-top: 0px; }
    100%   { margin-top: -165px; }
}


/*scatter letters on hover */

.word {
    display: flex;
    justify-content: center;
    font-size: 90px;
    cursor: default;
    margin: 40px 0;
}

.ch {
    transition: transform 0.3s ease, color 0.3s ease;
}

.word:hover .ch:nth-child(1) {
    transform: rotate(-20deg) translateY(-20px);
    color: #9c1c64;
}

.word:hover .ch:nth-child(2) {
    transform: rotate(10deg) translateY(15px);
    color: #84ab7b;
}

.word:hover .ch:nth-child(3) {
    transform: rotate(-5deg) translateY(-25px);
    color: #9c1c64;
}

.word:hover .ch:nth-child(4) {
    transform: rotate(18deg) translateY(10px);
    color: #84ab7b;
}

.word:hover .ch:nth-child(5) {
    transform: rotate(-15deg) translateY(-15px);
    color: #9c1c64;
}

.word:hover .ch:nth-child(6) {
    transform: rotate(21deg) translateY(-20px);
    color: #84ab7b;
}


/* 3. box turned cicle */

.box {
    width: 120px;
    height: 120px;
    background-color: #9c1c64;
    border-radius: 8px;
    margin: 10px auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color:#fafac0;
    font-size: 14px;
    transition: border-radius 0.5s ease, transform 1.5s ease, background-color 0.5s ease;
    margin-top:0;
    position: relative;
    z-index:2;
    

    &:hover {
        border-radius: 50%;
        transform: rotate(360deg) scale(8); 
        background-color: #c7ed98;
        color: #9c1c64;
    }
}


/* button fills and changes text */

button .default {
    display: inline;
    transition: max-width 0.5s ease, opacity 0.3s ease;
}

button .alt {
    display: none;
    transition: max-width 0.5s ease, opacity 0.3s ease;
}

/* Hover state - hide .default, show .alt */
button:hover .default {
    display: none;
}

button:hover .alt {
    display: inline;
}

button {
    border: 4px solid #9c1c64;
    font-family: 'Gravitas One', serif;
    font-size: 20px;
    padding: 12px 32px;
    cursor: pointer;
    border-radius: 100px;
    background-color: transparent;
    color: #9c1c64;
    transition: background-color 0.8s ease, color 0.8s ease, transform 1.5s ease;
}

button:hover {
    background-color: #9c1c64;
    color: #fafac0;
}


/* bouncing balls */

.balls {
    display: flex;
    justify-content: center;
    gap: 20px;
    height: 100px;
    align-items: flex-end;
    margin-top: 40px;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: bounce 0.7s ease infinite alternate;
}

.ball-1 {
    background-color: #c7ed98;
    animation-delay: 0s;
}

.ball-2 {
    background-color: #9c1c64;
    animation-delay: 0.15s;
}

.ball-3 {
    background-color: #c7ed98;
    animation-delay: 0.3s;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-70px); }
}
