:root {
    --peti-noite: #061b16;
    --peti-mata: #0b3d2f;
    --peti-mata-clara: #2e7d32;
    --peti-dourado: #f6b443;
    --peti-rio: #64d8cb;
}

.hero {
    position: relative;
    min-height: 100svh;
    height: 100vh;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(100, 216, 203, 0.26), transparent 30%),
        linear-gradient(180deg, #082a30 0%, #0b3d2f 42%, #061b16 100%);
    color: var(--white);
}

.peti-hero-stage {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.peti-hero-bg {
    position: absolute;
    inset: -8%;
    background:
        linear-gradient(rgba(6, 27, 22, 0.28), rgba(6, 27, 22, 0.82)),
        url('../imagens/otimizadas/banner-hero-1280.webp') center / cover no-repeat;
    transform: scale(1.05) translateZ(0);
}

@media (min-width: 1400px) and (min-resolution: 1.5dppx) {
    .peti-hero-bg {
        background-image:
            linear-gradient(rgba(6, 27, 22, 0.22), rgba(6, 27, 22, 0.8)),
            url('../imagens/otimizadas/banner-hero.webp');
    }
}

.peti-hero-haze,
.peti-hero-glow,
.peti-hero-canopy,
.peti-hero-foreground {
    position: absolute;
    inset: 0;
}

.peti-hero-haze {
    background:
        radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.24), transparent 24%),
        radial-gradient(circle at 76% 18%, rgba(100, 216, 203, 0.22), transparent 28%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 40%, rgba(255, 255, 255, 0.08));
    mix-blend-mode: screen;
    opacity: 0.82;
}

.peti-hero-glow {
    background:
        radial-gradient(circle at 64% 48%, rgba(246, 180, 67, 0.32), transparent 22%),
        radial-gradient(circle at 50% 72%, rgba(46, 125, 50, 0.48), transparent 34%);
    opacity: 0.86;
}

.peti-hero-canopy {
    background:
        radial-gradient(ellipse at 12% 5%, rgba(3, 31, 20, 0.96) 0 18%, transparent 19%),
        radial-gradient(ellipse at 31% 0%, rgba(4, 42, 24, 0.94) 0 15%, transparent 16%),
        radial-gradient(ellipse at 61% -3%, rgba(3, 33, 20, 0.9) 0 19%, transparent 20%),
        radial-gradient(ellipse at 88% 7%, rgba(6, 46, 27, 0.95) 0 18%, transparent 19%);
    transform: translateY(-5%);
}

.peti-hero-foreground {
    background:
        radial-gradient(ellipse at 8% 107%, rgba(5, 37, 21, 0.98) 0 23%, transparent 24%),
        radial-gradient(ellipse at 42% 112%, rgba(7, 48, 24, 0.96) 0 26%, transparent 27%),
        radial-gradient(ellipse at 84% 106%, rgba(4, 32, 20, 0.98) 0 25%, transparent 26%),
        linear-gradient(180deg, transparent 62%, rgba(3, 18, 12, 0.98) 100%);
    z-index: 1;
}

.peti-fireflies {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.86;
}

.peti-hero-animal {
    position: absolute;
    right: clamp(-2rem, 5vw, 7rem);
    bottom: clamp(4.5rem, 12vw, 10rem);
    z-index: 2;
    width: clamp(180px, 28vw, 420px);
    filter: drop-shadow(0 30px 34px rgba(0, 0, 0, 0.5));
    transform-origin: 50% 90%;
}

.peti-hero-animal img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 30% 70% 54% 46% / 42% 38% 62% 58%;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero-content {
    position: relative;
    width: min(980px, 92vw);
    min-height: 100svh;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: clamp(7rem, 13vh, 10rem) 0 clamp(5rem, 10vh, 7rem);
    z-index: 2;
}

.peti-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--fonte-subtitulo);
    font-size: clamp(0.78rem, 1.25vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.peti-kicker::before {
    content: '';
    width: 2.7rem;
    height: 2px;
    background: linear-gradient(90deg, var(--peti-dourado), var(--peti-rio));
}

.hero h1.peti-hero-title {
    max-width: 820px;
    margin: 0 0 1.25rem;
    color: transparent;
    font-size: clamp(3rem, 8.5vw, 7.9rem);
    line-height: 0.9;
    letter-spacing: -0.065em;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.65);
    background: linear-gradient(105deg, #ffffff 0%, #f6b443 34%, #64d8cb 62%, #ffffff 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: petiTitleGradient 7s ease-in-out infinite alternate;
}

.hero.peti-hero-paused .peti-hero-title,
.hero.peti-hero-paused .peti-scroll-cue span {
    animation-play-state: paused;
}

.peti-title-word {
    display: inline-block;
    white-space: nowrap;
}

.peti-title-char {
    display: inline-block;
}

.peti-title-space {
    display: inline-block;
    width: 0.28em;
}

.hero p.peti-hero-subtitle {
    max-width: 640px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.7vw, 1.32rem);
    line-height: 1.7;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.peti-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.peti-hero-actions .btn {
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(230, 81, 0, 0.26);
}

.peti-ghost-link {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0.65rem 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.peti-ghost-link:hover,
.peti-ghost-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(246, 180, 67, 0.78);
    background: rgba(255, 255, 255, 0.1);
}

.peti-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    display: grid;
    place-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.peti-scroll-cue span {
    width: 2px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, var(--peti-dourado), transparent);
    animation: petiScrollCue 1.8s ease-in-out infinite;
}

.peti-cycle-return {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 998;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1rem;
    color: var(--white);
    background: linear-gradient(135deg, var(--verde-medio), var(--verde-escuro));
    border: 1px solid rgba(246, 180, 67, 0.42);
    border-radius: 999px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.peti-cycle-return.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@keyframes petiTitleGradient {
    from {
        background-position: 0% center;
    }

    to {
        background-position: 100% center;
    }
}

@keyframes petiScrollCue {
    0%, 100% {
        opacity: 0.35;
        transform: scaleY(0.65);
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 620px;
        height: 100svh;
    }

    .peti-hero-foreground {
        opacity: 0.72;
        background:
            radial-gradient(ellipse at 10% 112%, rgba(5, 37, 21, 0.96) 0 20%, transparent 21%),
            radial-gradient(ellipse at 76% 110%, rgba(4, 32, 20, 0.94) 0 22%, transparent 23%),
            linear-gradient(180deg, transparent 70%, rgba(3, 18, 12, 0.98) 100%);
    }

    .hero-content {
        width: min(92vw, 620px);
        align-items: center;
        text-align: center;
        padding: 6.5rem 1rem 5.5rem;
        z-index: 4;
    }

    .peti-kicker::before {
        width: 1.8rem;
    }

    .hero h1.peti-hero-title {
        font-size: clamp(2.55rem, 13vw, 4.5rem);
        line-height: 0.94;
    }

    .hero p.peti-hero-subtitle {
        max-width: 22rem;
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .peti-hero-actions {
        justify-content: center;
    }

    .peti-hero-animal {
        right: auto;
        left: 50%;
        bottom: 5.5rem;
        width: min(54vw, 230px);
        opacity: 0.72;
        translate: -50% 0;
    }

    .peti-scroll-cue {
        bottom: 1.15rem;
        font-size: 0.7rem;
    }

    .peti-cycle-return {
        right: 0.8rem;
        bottom: 0.8rem;
        max-width: calc(100vw - 1.6rem);
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero h1.peti-hero-title,
    .peti-scroll-cue span {
        animation: none;
    }

    .peti-title-char,
    .peti-hero-layer,
    .peti-hero-animal {
        transform: none !important;
    }
}
