/* ============================================
   PRACHAR PREMIUM VISUAL LAYER
   Layers ON TOP of style.css — do not edit base.
   Adds depth, glow, texture, atmosphere, and
   all JS-driven interaction styles.

   Consolidated from: premium.css + visuals.css
   ============================================ */


/* --- 1. BACKGROUND TREATMENT --- */

/* Film grain overlay — subtle analog texture on the whole page */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    will-change: transform;
}

/* Ambient radial glow behind hero area — green tinted */
body::after {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 2000px;
    height: 1000px;
    background: radial-gradient(
        ellipse 50% 45% at 50% 30%,
        rgba(74, 222, 128, 0.04) 0%,
        rgba(96, 165, 250, 0.02) 30%,
        transparent 60%
    );
    pointer-events: none;
    z-index: -1;
}


/* --- 3. NAVIGATION: Crafted, not just functional --- */

.pr-header {
    background: rgba(9, 9, 9, 0.6);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Logo gets a subtle shimmer on hover */
.pr-logo {
    transition: opacity 0.3s ease;
}

.pr-logo:hover {
    opacity: 0.8;
}

/* Nav links — subtle underline that builds on hover */
.pr-nav-link {
    position: relative;
}

.pr-nav-link:not(.pr-nav-cta):not(.pr-nav-resume)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
}

.pr-nav-link:not(.pr-nav-cta):not(.pr-nav-resume):hover::after {
    width: 100%;
}

/* CTA button — subtle glow on hover */
.pr-nav-cta:hover {
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

/* Resume button — border glow */
.pr-nav-resume:hover {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}


/* --- 4. SECTION DIVIDERS: Organic transitions --- */

/* Section spacing — extra top padding for divider element */
.pr-section {
    position: relative;
    padding-top: 20px;
}

/* Testimonials section — relative positioning for glow effects */
.pr-testimonials {
    position: relative;
}


/* --- 5. CARD REDESIGN: Depth, dimension, intrigue --- */

/* Glass-morphism card at-rest visual overrides */
.pr-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* Inner glow — faint accent-colored light inside the card, visible at top */
.pr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pr-card:hover::before {
    opacity: 1;
}

/* Per-accent card glow on hover — the card radiates its category color */
.pr-card[data-accent="positioning-gtm"]::before {
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.5), transparent);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.15);
}

.pr-card[data-accent="demand-gen"]::before {
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.15);
}

.pr-card[data-accent="sales-enablement"]::before {
    background: linear-gradient(90deg, transparent, rgba(244, 114, 182, 0.5), transparent);
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.15);
}

/* Card accent bar — thicker, with glow built in at rest too */
.pr-card-accent {
    height: 2px;
    opacity: 0.7;
    transition: height 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.pr-card:hover .pr-card-accent {
    height: 3px;
    opacity: 1;
}

/* Card content — increase padding for breathing room */
.pr-card-content {
    padding: 32px;
}

/* Card title on hover — slight brightness bump */
.pr-card:hover .pr-card-title {
    color: #fff;
}

/* Card arrow — colored on hover to match accent */
.pr-card[data-accent="positioning-gtm"]:hover .pr-card-arrow { color: #4ADE80; }
.pr-card[data-accent="demand-gen"]:hover .pr-card-arrow { color: #60A5FA; }
.pr-card[data-accent="sales-enablement"]:hover .pr-card-arrow { color: #F472B6; }


/* --- 6. TESTIMONIALS: Premium, not generic --- */

.pr-testimonial {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 36px;
    position: relative;
    overflow: hidden;
}

/* Large opening quote — gradient accent instead of flat gray */
.pr-testimonial-quote::before {
    font-size: 3rem;
    background: linear-gradient(135deg, #4ADE80 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.6;
}

/* When JS injects .pr-quote-mark, hide the CSS ::before to prevent duplicates */
.pr-testimonial-quote:has(.pr-quote-mark)::before {
    display: none;
}

/* Author section — subtle left accent line */
.pr-testimonial-author {
    border-top: none;
    padding-top: 20px;
    padding-left: 16px;
    border-left: 2px solid rgba(74, 222, 128, 0.3);
    position: relative;
}

/* Alternating accent colors for visual variety */
.pr-testimonial:nth-child(2) .pr-testimonial-author {
    border-left-color: rgba(96, 165, 250, 0.3);
}

.pr-testimonial:nth-child(3) .pr-testimonial-author {
    border-left-color: rgba(244, 114, 182, 0.3);
}

.pr-testimonial:nth-child(4) .pr-testimonial-author {
    border-left-color: rgba(96, 165, 250, 0.3);
}

/* Alternating quote marks too */
.pr-testimonial:nth-child(2) .pr-testimonial-quote::before {
    background: linear-gradient(135deg, #60A5FA 0%, #A855F7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pr-testimonial:nth-child(3) .pr-testimonial-quote::before {
    background: linear-gradient(135deg, #F472B6 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pr-testimonial:nth-child(4) .pr-testimonial-quote::before {
    background: linear-gradient(135deg, #60A5FA 0%, #4ADE80 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Oversized decorative closing quote (from visuals layer) */
.pr-testimonial::after {
    content: '\201D';
    position: absolute;
    bottom: -20px;
    right: 16px;
    font-size: 10rem;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    color: rgba(255, 255, 255, 0.015);
    pointer-events: none;
    z-index: 0;
}

.pr-testimonial:nth-child(2)::after {
    color: rgba(96, 165, 250, 0.02);
}

.pr-testimonial:nth-child(3)::after {
    color: rgba(74, 222, 128, 0.02);
}

.pr-testimonial:nth-child(4)::after {
    color: rgba(244, 114, 182, 0.02);
}

/* Keep quote text and author above the decoration */
.pr-testimonial-quote,
.pr-testimonial-author {
    position: relative;
    z-index: 1;
}


/* --- 7. FOOTER: Premium CTA zone --- */

/* Footer CTA gradient — animated shimmer */
.pr-footer-cta-gradient {
    background: linear-gradient(
        90deg,
        #F59E0B,
        #60A5FA,
        #A855F7,
        #F472B6,
        #F59E0B
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* CTA button — premium treatment */
.pr-cta-button {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pr-cta-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(255, 255, 255, 0.15),
        0 2px 8px rgba(255, 255, 255, 0.1);
}

/* Footer contact links — icon glow on hover */
.pr-footer-contact-link:hover svg {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

/* Footer divider — gradient line */
.pr-footer {
    position: relative;
}

.pr-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 20%,
        rgba(255, 255, 255, 0.06) 80%,
        transparent 100%
    );
}

/* Footer visual mesh (from visuals layer) */
.pr-footer-visual {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* Ensure footer inner content sits above the mesh */
.pr-footer .pr-footer-inner {
    position: relative;
    z-index: 1;
}

/* "made in pune, in" — keep cursor default */
.pr-footer-copy {
    cursor: default;
}


/* --- 8. POST PAGE ENHANCEMENTS --- */

/* Post title — gradient falloff for cinematic feel */
.pr-post-title {
    background: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Feature image — subtle border glow */
.pr-post-feature {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.pr-post-feature img {
    transition: transform 0.6s ease;
}

.pr-post-feature:hover img {
    transform: scale(1.02);
}

/* Post CTA strip — glass card */
.pr-post-cta-strip {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 48px 32px;
    border-top: none;
    margin-top: 80px;
}


/* --- 9. ABOUT PAGE ENHANCEMENTS --- */

.pr-about-title {
    background: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pr-about-subtitle {
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.01em;
}


/* --- 10. SCROLL ANIMATIONS: Smoother reveal --- */

/* Scroll reveal — only hide cards after JS confirms it's running */
body.pr-loading .pr-card:not(.in-view) {
    opacity: 0;
    transform: translateY(30px);
}

.pr-card.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Testimonials fade in too */
.pr-testimonial {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, background 0.4s ease;
}

.pr-testimonial.in-view {
    opacity: 1;
    transform: translateY(0);
}

.pr-testimonial:nth-child(2).in-view { transition-delay: 0.08s; }
.pr-testimonial:nth-child(3).in-view { transition-delay: 0.16s; }
.pr-testimonial:nth-child(4).in-view { transition-delay: 0.24s; }


/* --- 12. SELECTION AND CURSOR POLISH --- */

/* Custom selection colors across the site */
::selection {
    background: rgba(74, 222, 128, 0.25);
    color: #fff;
}

::-moz-selection {
    background: rgba(74, 222, 128, 0.25);
    color: #fff;
}

/* Smooth scrollbar styling for WebKit */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #090909;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* --- 13. JS-DRIVEN INTERACTION STYLES --- */

/* Custom cursor (desktop only, added by main.js) */
.pr-cursor {
    position: fixed;
    top: -10px;
    left: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    mix-blend-mode: screen;
}

.pr-cursor-hover {
    width: 40px;
    height: 40px;
    top: -20px;
    left: -20px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.1) 0%, rgba(96, 165, 250, 0.05) 50%, transparent 70%);
}

/* Section dividers — animated line from center (JS-triggered) */
.pr-section-divider {
    height: 1px;
    margin: 0 auto 40px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.pr-section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 30%,
        rgba(255, 255, 255, 0.08) 70%,
        transparent 100%
    );
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pr-section-divider.pr-divider-visible::after {
    width: 100%;
    left: 0;
}

/* Colored gradient sweep on visible divider */
.pr-section-divider.pr-divider-visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(74, 222, 128, 0.15) 25%,
        rgba(96, 165, 250, 0.15) 50%,
        rgba(244, 114, 182, 0.15) 75%,
        transparent 100%
    );
    animation: dividerGlow 3s ease-in-out infinite alternate;
}

@keyframes dividerGlow {
    0%   { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Section titles — gradient text + fade in from left */
.pr-section-title .pr-section-title-text {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pr-section-title {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pr-section-title.pr-title-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Quote chunk reveal */
.pr-quote-chunk {
    opacity: 0.2;
    transition: opacity 0.4s ease;
}

.pr-quote-chunk.pr-chunk-visible {
    opacity: 1;
}

/* Quote mark (replaces ::before when JS rebuilds the quote) */
.pr-quote-mark::before {
    content: "\201C";
    display: block;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 8px;
    font-family: Georgia, serif;
    background: linear-gradient(135deg, #4ADE80 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.6;
}

/* Inherit the alternating quote mark colors */
.pr-testimonial:nth-child(2) .pr-quote-mark::before {
    background: linear-gradient(135deg, #60A5FA 0%, #A855F7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pr-testimonial:nth-child(3) .pr-quote-mark::before {
    background: linear-gradient(135deg, #F472B6 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pr-testimonial:nth-child(4) .pr-quote-mark::before {
    background: linear-gradient(135deg, #60A5FA 0%, #4ADE80 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Author reveal */
.pr-testimonial-author {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease 0s, transform 0.4s ease 0s;
}

.pr-testimonial-author.pr-author-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Page loading state — prevent flash of unstyled content */
body.pr-loading .pr-header {
    opacity: 0;
}

/* Footer CTA shimmer — only animate when scrolled into view */
.pr-footer-cta-gradient {
    background-size: 200% auto;
    animation: none;
}

.pr-footer-cta-gradient.pr-shimmer-active {
    animation: gradientShift 6s ease-in-out infinite;
}

/* Nav active state */
.pr-nav-active {
    color: #fff !important;
}

.pr-nav-active::after {
    width: 100% !important;
    background: rgba(74, 222, 128, 0.5) !important;
}

/* Card mouse-follow radial highlight */
.pr-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.pr-card:hover {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.02) 40%,
        rgba(255, 255, 255, 0.01) 100%
    );
}


/* --- 14. MOBILE ENHANCEMENTS --- */

/* Mobile nav overlay — glass effect */
@media (max-width: 768px) {
    .pr-nav.open {
        background: rgba(9, 9, 9, 0.98);
        backdrop-filter: blur(30px) saturate(1.5);
        -webkit-backdrop-filter: blur(30px) saturate(1.5);
    }

    /* Mobile sticky bar — more glass */
    .pr-mobile-cta {
        background: rgba(9, 9, 9, 0.8);
        backdrop-filter: blur(20px) saturate(1.4);
        -webkit-backdrop-filter: blur(20px) saturate(1.4);
    }

    /* Card content padding adjustment */
    .pr-card-content {
        padding: 24px;
    }

    /* Testimonial padding adjustment */
    .pr-testimonial {
        padding: 28px;
    }

    /* Footer visual mesh — smaller on mobile */
    .pr-footer-visual {
        width: min(400px, 100%);
        height: 300px;
    }

    /* Hide custom cursor on touch/mobile devices */
    .pr-cursor {
        display: none !important;
    }

    /* Testimonial decoration — smaller on mobile */
    .pr-testimonial::after {
        font-size: 6rem;
    }
}

@media (max-width: 480px) {
    .pr-card-content {
        padding: 20px;
    }
}


/* --- 15. REDUCED MOTION OVERRIDES --- */

@media (prefers-reduced-motion: reduce) {
    .pr-footer-cta-gradient,
    .pr-footer-cta-gradient.pr-shimmer-active {
        animation: none;
    }

    .pr-testimonial {
        opacity: 1 !important;
        transform: none !important;
        transition: border-color 0.4s ease, background 0.4s ease !important;
    }

    .pr-testimonial-author {
        opacity: 1 !important;
        transform: none !important;
    }

    .pr-quote-chunk {
        opacity: 1 !important;
    }

    .pr-section-title {
        opacity: 1 !important;
        transform: none !important;
    }

    .pr-section-divider::after {
        width: 100%;
        left: 0;
    }

    .pr-section-divider.pr-divider-visible::before {
        animation: none;
        opacity: 0.7;
    }

    .pr-cursor {
        display: none;
    }

    .pr-post-feature:hover img {
        transform: none;
    }

    body::before {
        /* Keep grain, it's not motion */
    }
}
