/* ============================================================================
   Pãozitto — Landing Page
   ============================================================================ */

:root {
    --brand-red: #FF1620;
    --white: #ffffff;
    --footer-opacity: 0.6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    background-color: var(--brand-red);
    color: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ----------------------------------------------------------------------------
   Canvas de bolhas (fundo animado)
   ---------------------------------------------------------------------------- */
#bubbles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ----------------------------------------------------------------------------
   Main / Logo
   ---------------------------------------------------------------------------- */
main {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    padding: 24px;
}

.logo-wrap {
    display: inline-block;
    line-height: 0;
    animation: logoGlitch 22s steps(1) 3s infinite;
    will-change: transform;
}

.logo {
    width: min(260px, 60vw);
    height: auto;
    display: block;
    opacity: 0;
    transform: translateY(10px);
    animation:
        fadeInLogo 1.2s ease-out forwards,
        glowPulse 4s ease-in-out 1.2s infinite;
    will-change: opacity, transform, filter;
}

@keyframes fadeInLogo {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0%,
    100% {
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.18));
    }
}

/* Glitch / "curto-circuito" — burst curto (~0.9s) a cada 22s */
@keyframes logoGlitch {
    0%, 94%, 100%  { transform: translate3d(0, 0, 0); }
    94.3%          { transform: translate3d(-1.5px, 0.5px, 0); }
    94.6%          { transform: translate3d(1.5px, -0.5px, 0); }
    95.1%          { transform: translate3d(-1px, 1px, 0); }
    95.6%          { transform: translate3d(1px, -1px, 0); }
    96.0%          { transform: translate3d(-1.5px, 0, 0); }
    96.4%          { transform: translate3d(0.5px, 0.5px, 0); }
    96.9%          { transform: translate3d(-0.5px, -0.5px, 0); }
    97.3%          { transform: translate3d(1px, 0, 0); }
    97.7%          { transform: translate3d(-0.5px, 0.5px, 0); }
}

/* ----------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------------- */
footer {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    padding: 20px 16px;
}

footer small {
    color: rgba(255, 255, 255, var(--footer-opacity));
    font-size: 12px;
    letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------------------
   Utilitários
   ---------------------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------------------------
   Responsividade fina
   ---------------------------------------------------------------------------- */
@media (max-width: 480px) {
    footer small {
        font-size: 11px;
    }
}

/* ----------------------------------------------------------------------------
   Acessibilidade — reduz movimento
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .logo-wrap {
        animation: none;
    }
    .logo {
        opacity: 1;
        transform: none;
        animation: none;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
