/* Tap Header Animation */
#header-animated h1 {
    font-size: 3em;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    animation: pulseText 6s ease-in-out infinite;
    margin: 0;
    position: relative;
    line-height: 1;
    display: flex;
    align-items: center;
}

#header-animated .tap-letter {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
    text-align: center;
    vertical-align: middle;
    line-height: 1;
}

#header-animated .lever {
    position: absolute;
    top: -0.05em;
    left: 0;
    width: 100%;
    height: 0.15em;
    background: #333;
    border-radius: 4px;
    transform-origin: center;
    animation: pullLever 6s ease-in-out infinite;
}

#header-animated .tap {
    position: absolute;
    top: 0.15em;
    left: 50%;
    transform: translateX(-50%);
    width: 0.2em;
    height: 0.85em;
    background: #333;
    border-radius: 0 0 5px 5px;
}

#header-animated .drop {
    position: absolute;
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    width: 0.15em;
    height: 0.2em;
    background: #ffca28;
    border-radius: 50% 50% 70% 70%;
    opacity: 0;
    animation: dropBeer 6s ease-in-out infinite;
    z-index: 3;
}

/* Beer Footer Animation --- */
#modern-footer {
    position: fixed;
    width: 100%;
    height: 80px;
    bottom: 0;
    left: 0;
}

#modern-footer .beer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, #f4b400, #ffca28);
    z-index: 1;
}

#modern-footer .foam {
    position: absolute;
    bottom: 60px;
    width: 100%;
    height: 30px;
    background: #e8e8e8;
    opacity: 0.95;
    animation: foamWave 3s ease-in-out infinite;
    clip-path: polygon(
        0% 100%, 5% 70%, 10% 80%, 15% 60%, 20% 75%, 25% 65%, 30% 80%, 35% 60%,
        40% 75%, 45% 65%, 50% 80%, 55% 60%, 60% 75%, 65% 65%, 70% 80%, 75% 60%,
        80% 75%, 85% 65%, 90% 80%, 95% 60%, 100% 75%, 100% 100%
    );
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

#modern-footer .bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: bubbleRise 3s linear infinite;
    z-index: 2;
}

/* Bubbles */
#modern-footer .bubble:nth-child(1) { width: 15px; height: 15px; left: 10%; animation-delay: 0.5s; }
#modern-footer .bubble:nth-child(2) { width: 10px; height: 10px; left: 20%; animation-delay: 1s; }
#modern-footer .bubble:nth-child(3) { width: 12px; height: 12px; left: 30%; animation-delay: 1.5s; }
#modern-footer .bubble:nth-child(4) { width: 8px; height: 8px; left: 40%; animation-delay: 2s; }
#modern-footer .bubble:nth-child(5) { width: 14px; height: 14px; left: 50%; animation-delay: 2.5s; }
#modern-footer .bubble:nth-child(6) { width: 11px; height: 11px; left: 60%; animation-delay: 0.8s; }
#modern-footer .bubble:nth-child(7) { width: 13px; height: 13px; left: 70%; animation-delay: 1.2s; }
#modern-footer .bubble:nth-child(8) { width: 16px; height: 16px; left: 80%; animation-delay: 1.8s; }
#modern-footer .bubble:nth-child(9) { width: 9px; height: 9px; left: 90%; animation-delay: 2.2s; }

#modern-footer .logo {
    position: absolute;
    bottom: 10px;
    right: 20px;
    width: 160px;
    height: auto;
    z-index: 3;
}

/* Keyframes */
@keyframes pullLever {
    0%, 10% { transform: rotate(0deg); }
    15%, 30% { transform: rotate(-10deg); }
    40%, 100% { transform: rotate(0deg); }
}

@keyframes dropBeer {
    0%, 15% { transform: translateY(0); opacity: 0; }
    20% { transform: translateY(0); opacity: 1; }
    35% { transform: translateY(calc(100vh - 110px)); opacity: 1; }
    40%, 100% { transform: translateY(calc(100vh - 110px)); opacity: 0; }
}

@keyframes foamWave {
    0% { clip-path: polygon(0% 100%, 5% 70%, 10% 80%, 15% 60%, 20% 75%, 25% 65%, 30% 80%, 35% 60%, 40% 75%, 45% 65%, 50% 80%, 55% 60%, 60% 75%, 65% 65%, 70% 80%, 75% 60%, 80% 75%, 85% 65%, 90% 80%, 95% 60%, 100% 75%, 100% 100%); }
    50% { clip-path: polygon(0% 100%, 5% 80%, 10% 60%, 15% 70%, 20% 80%, 25% 60%, 30% 75%, 35% 65%, 40% 80%, 45% 60%, 50% 75%, 55% 65%, 60% 80%, 65% 60%, 70% 75%, 75% 65%, 80% 80%, 85% 60%, 90% 75%, 95% 65%, 100% 80%, 100% 100%); }
    100% { clip-path: polygon(0% 100%, 5% 70%, 10% 80%, 15% 60%, 20% 75%, 25% 65%, 30% 80%, 35% 60%, 40% 75%, 45% 65%, 50% 80%, 55% 60%, 60% 75%, 65% 65%, 70% 80%, 75% 60%, 80% 75%, 85% 65%, 90% 80%, 95% 60%, 100% 75%, 100% 100%); }
}

@keyframes bubbleRise {
    0% { bottom: 0; opacity: 0.5; }
    100% { bottom: 55px; opacity: 0; transform: translateX(10px); }
}

@keyframes pulseText {
    0%, 80% { transform: scale(1); }
    90% { transform: scale(1.05); }
    100% { transform: scale(1); }
}