/* ========================================================================== 
   Hemnix page ambient visuals
   Decorative-only background layers. They never change section colours and
   never intercept interaction. The goal is to give quieter sections depth
   without turning them into card-heavy layouts.
   ========================================================================== */

.page-home,
.page-services,
.page-about,
.page-portfolio,
.page-contact,
.page-blog,
.page-privacy,
.page-terms {
    --page-glow-a: rgba(99, 102, 241, .12);
    --page-glow-b: rgba(139, 92, 246, .09);
}

.page-home main,
.page-services main,
.page-about main,
.page-portfolio main,
.page-contact main,
.page-blog main,
.page-privacy main,
.page-terms main {
    position: relative;
    isolation: isolate;
}

/* A very quiet page-level aura. It sits behind all content and does not
   replace any existing section background. */
.page-home main::before,
.page-services main::before,
.page-about main::before,
.page-portfolio main::before,
.page-contact main::before,
.page-blog main::before,
.page-privacy main::before,
.page-terms main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(520px 420px at 6% 16%, var(--page-glow-a), transparent 72%),
        radial-gradient(620px 480px at 94% 44%, var(--page-glow-b), transparent 74%);
}

/* Shared visual treatment for quieter content bands. */
.page-home .hs-section,
.page-services .hs-section,
.page-about .about-story-section,
.page-about .why-section,
.page-portfolio .hs-section,
.page-contact .contact-section,
.page-contact .cta-section,
.page-blog .blog-section,
.page-blog .cta-section,
.page-privacy .about-section,
.page-terms .about-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.page-home .hs-section::before,
.page-services .hs-section::before,
.page-about .about-story-section::before,
.page-about .why-section::before,
.page-portfolio .hs-section::before,
.page-contact .contact-section::before,
.page-contact .cta-section::before,
.page-blog .blog-section::before,
.page-blog .cta-section::before,
.page-privacy .about-section::before,
.page-terms .about-section::before {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    left: -220px;
    top: -250px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(99,102,241,.10) 0%, rgba(99,102,241,.035) 34%, transparent 70%);
    filter: blur(6px);
    transform: translate3d(0,0,0);
}

.page-home .hs-section::after,
.page-services .hs-section::after,
.page-about .about-story-section::after,
.page-about .why-section::after,
.page-portfolio .hs-section::after,
.page-contact .contact-section::after,
.page-contact .cta-section::after,
.page-blog .blog-section::after,
.page-blog .cta-section::after,
.page-privacy .about-section::after,
.page-terms .about-section::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    right: -210px;
    bottom: -260px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(139,92,246,.085) 0%, rgba(139,92,246,.025) 38%, transparent 72%);
    filter: blur(8px);
}

/* Make sparse sections feel designed without inventing content. */
.page-about .why-section,
.page-services .tech-stack-section,
.page-portfolio #work,
.page-contact .cta-section,
.page-blog .cta-section {
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: center;
}

/* A restrained accent line gives long legal pages a visual spine. */
.page-privacy .about-section::after,
.page-terms .about-section::after {
    width: 2px;
    height: 58%;
    right: 7%;
    top: 21%;
    bottom: auto;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, rgba(99,102,241,.28), rgba(139,92,246,.18), transparent);
    filter: blur(.2px);
}

/* Keep the FAQ's requested appearance untouched: no new background and no
   hover treatment is introduced here. */
.page-home .faq-section::before,
.page-home .faq-section::after {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    .page-home main::before,
    .page-services main::before,
    .page-about main::before,
    .page-portfolio main::before,
    .page-contact main::before,
    .page-blog main::before,
    .page-privacy main::before,
    .page-terms main::before {
        animation: hemnix-page-aura 18s ease-in-out infinite alternate;
    }

    @keyframes hemnix-page-aura {
        from { transform: translate3d(-8px, 0, 0) scale(1); }
        to   { transform: translate3d(8px, 12px, 0) scale(1.025); }
    }
}

@media (max-width: 767.98px) {
    .page-home main::before,
    .page-services main::before,
    .page-about main::before,
    .page-portfolio main::before,
    .page-contact main::before,
    .page-blog main::before,
    .page-privacy main::before,
    .page-terms main::before {
        background:
            radial-gradient(360px 320px at 0% 12%, var(--page-glow-a), transparent 72%),
            radial-gradient(380px 340px at 100% 52%, var(--page-glow-b), transparent 74%);
    }

    .page-privacy .about-section::after,
    .page-terms .about-section::after {
        right: 4%;
        height: 40%;
    }
}
