/*
 * =====================================================
 *  NexAI Enhancement Layer v1.0
 *  Precision visual upgrades — no structural changes
 *  Add to HTML after main saas-theme.css
 * =====================================================
 *
 *  TABLE OF CONTENTS
 *  1.  Animated Hero Background
 *  2.  Hero Typography & Glow Upgrades
 *  3.  Hero Mockup Enhanced Frame
 *  4.  Trust Strip Visual Polish
 *  5.  Workflow Section Depth
 *  6.  Feature Cards — Premium Redesign
 *  7.  Features Mockup Panel Shimmer
 *  8.  Demo Section Callout Polish
 *  9.  Use Cases — Depth & Hover
 * 10.  Testimonials — Premium Avatar & Quote
 * 11.  Pricing — Glow Hierarchy & Hover States
 * 12.  FAQ — Premium Accordion Polish
 * 13.  CTA — Animated Glow System
 * 14.  Button Glow Hover Effects
 * 15.  Parallax & Depth Backgrounds
 * 16.  Scrollbar Styling
 * 17.  Selection Color
 * 18.  Focus States & Accessibility
 * 19.  Mobile Refinements
 * =====================================================
 */

/* =====================================================
   1. ANIMATED HERO BACKGROUND
   ===================================================== */

/* Pulsing gradient orbs behind hero */
#intro .glow-orb {
    animation: hero-orb-float 8s ease-in-out infinite;
}

#intro .glow-orb:nth-child(2) {
    animation-delay: -4s;
    animation-duration: 10s;
}

@keyframes hero-orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
        opacity: 0.7;
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
        opacity: 1.0;
    }
}

/* Hero section: subtle animated gradient inside */
#intro.nexai-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    animation: hero-bg-shift 12s ease-in-out infinite;
}

@keyframes hero-bg-shift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* =====================================================
   2. HERO TYPOGRAPHY & GLOW UPGRADES
   ===================================================== */

.hero-headline {
    text-shadow: 0 0 80px rgba(59, 130, 246, 0.12);
}

.hero-badge {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
    animation: badge-glow 3s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

.badge-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
}

.status-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

.status-indicator i {
    font-size: 0.7rem;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.4));
}

@keyframes badge-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
    }

    50% {
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
    }
}

/* =====================================================
   3. HERO MOCKUP ENHANCED FRAME
   ===================================================== */

/* Outer glow ring that animates */
.hero-mockup-frame {
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.2),
        0 0 40px rgba(59, 130, 246, 0.15),
        0 40px 120px rgba(0, 0, 0, 0.9);
    transition: box-shadow 0.6s ease;
}

.hero-mockup-frame:hover {
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.4),
        0 0 60px rgba(59, 130, 246, 0.25),
        0 40px 120px rgba(0, 0, 0, 0.9);
}

/* Animated shimmer sweep across hero mockup */
.hero-mockup-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.04) 50%,
            transparent 100%);
    animation: shimmer-sweep 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes shimmer-sweep {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        left: 150%;
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
        left: 150%;
    }
}

/* Status dots in chrome bar */
.hero-mockup-chrome .chrome-dot--green {
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

/* =====================================================
   4. TRUST STRIP VISUAL POLISH
   ===================================================== */

/* Animated gradient highlight behind metrics */
#trust .trust-metric-value {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.3));
}

/* Fade edges on marquee viewport */
.marquee-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee-logo {
    transition: opacity 0.3s, color 0.3s;
}

.marquee-logo:hover {
    opacity: 1 !important;
    color: var(--text-primary);
}

/* =====================================================
   5. WORKFLOW SECTION DEPTH
   ===================================================== */

/* Glowing step number */
.workflow-step-num {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Icon box shine */
.workflow-step-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow-sm);
}

/* Pulsing dot on connector line (more refined) */
.workflow-connector::before {
    animation: flow-orb 3s ease-in-out infinite;
}

@keyframes flow-orb {
    0% {
        left: 0%;
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    90% {
        opacity: 0.8;
    }

    100% {
        left: 100%;
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
}

/* =====================================================
   6. FEATURE CARDS — PREMIUM REDESIGN
   ===================================================== */

/* Stronger glass base */
.feature-card {
    background: linear-gradient(135deg,
            rgba(14, 20, 38, 0.7) 0%,
            rgba(10, 14, 28, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    /* Multi-layer inner glow effect */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 4px 24px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

/* Glow sweep on hover */
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.feature-card>* {
    position: relative;
    z-index: 1;
}

.feature-card:hover {
    transform: translateX(8px) translateY(-2px);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 24px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        -4px 0 20px rgba(59, 130, 246, 0.08);
}

.feature-card:hover::before {
    opacity: 1;
}

/* Icon — pulsing glow on hover */
.feature-icon {
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.08) rotate(-3deg);
}

/* Typography in feature cards */
.feature-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.feature-content p {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* =====================================================
   7. FEATURES MOCKUP PANEL SHIMMER
   ===================================================== */

.features-mockup-frame {
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.2),
        0 0 60px rgba(139, 92, 246, 0.12),
        var(--shadow-lg);
}

/* Animated colored glow line at top */
.features-mockup-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--violet) 50%, var(--cyan) 100%);
    z-index: 2;
    animation: top-glow-scan 4s ease-in-out infinite;
}

@keyframes top-glow-scan {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
        filter: brightness(1.4);
    }
}

/* =====================================================
   8. DEMO SECTION CALLOUT POLISH
   ===================================================== */

.demo-callout {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.04));
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    transition: background 0.4s ease;
}

.demo-step {
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateX(0);
}

.demo-step.active {
    opacity: 1 !important;
}

/* Left accent bar on active demo step */
.demo-step-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.demo-step-number::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--gradient-brand);
    border-radius: 2px;
}

.demo-step h2 {
    letter-spacing: -0.04em;
}

.demo-step-link {
    transition: gap 0.3s ease, color 0.3s ease;
}

.demo-step-link:hover {
    color: var(--text-primary);
    gap: 12px;
}

/* =====================================================
   9. USE CASES — DEPTH & HOVER
   ===================================================== */

.usecase-card {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 32px rgba(0, 0, 0, 0.4);
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s ease,
        border-color 0.5s ease;
}

.usecase-card:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(59, 130, 246, 0.1);
}

/* Colored glow under each icon on hover */
.usecase-icon {
    transition: all 0.4s ease;
}

.usecase-card:hover .usecase-icon {
    transform: scale(1.1);
}

.usecase-benefits li {
    transition: color 0.3s ease;
    padding: 4px 0;
}

.usecase-benefits li:hover {
    color: var(--text-primary);
}

.usecase-benefits li i {
    transition: transform 0.3s ease;
}

.usecase-benefits li:hover i {
    transform: scale(1.3);
}

/* =====================================================
  10. TESTIMONIALS — PREMIUM AVATAR & QUOTE
   ===================================================== */

/* Larger, richer avatar using gradient background */
.testim-avatar {
    width: 48px;
    height: 48px;
    font-size: 1rem;
    font-weight: 800;
    background: var(--gradient-brand);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    letter-spacing: -0.03em;
    overflow: hidden;
    /* Ensure images don't overflow */
    display: flex;
    align-items: center;
    justify-content: center;
}

.testim-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Unique gradient per avatar using nth-child */
.testim-card:nth-child(2) .testim-avatar {
    background: linear-gradient(135deg, var(--violet), var(--cyan));
}

.testim-card:nth-child(3) .testim-avatar {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.testim-card:nth-child(4) .testim-avatar {
    background: linear-gradient(135deg, #10b981, var(--blue));
}

.testim-card:nth-child(5) .testim-avatar {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* Opening quotation mark decoration */
.testim-quote::before {
    content: '"';
    display: block;
    font-size: 3rem;
    line-height: 0.8;
    color: var(--blue);
    opacity: 0.3;
    font-family: Georgia, serif;
    margin-bottom: 8px;
}

/* Card glow on hover */
.testim-card {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.testim-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(59, 130, 246, 0.1);
    transform: translateY(-8px) scale(1.01);
}

/* =====================================================
  11. PRICING — GLOW HIERARCHY & HOVER STATES
   ===================================================== */

.pricing-card {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-card:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 32px 80px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(59, 130, 246, 0.12);
}

/* Featured (Pro) card — more prominent glow */
.pricing-card--featured {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(59, 130, 246, 0.3),
        0 0 60px rgba(59, 130, 246, 0.18),
        0 32px 80px rgba(0, 0, 0, 0.7);
    background: linear-gradient(160deg,
            rgba(20, 32, 65, 0.75) 0%,
            rgba(12, 20, 45, 0.65) 100%) !important;
}

.pricing-card--featured:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(59, 130, 246, 0.5),
        0 0 80px rgba(59, 130, 246, 0.3),
        0 40px 100px rgba(0, 0, 0, 0.8);
    transform: translateY(-12px);
}

/* Pricing amount accent */
.pricing-amount {
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--blue-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Checkmark icons */
.pricing-features-list li i.fa-check {
    background: rgba(59, 130, 246, 0.12);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--blue-bright);
    flex-shrink: 0;
}

.pricing-card--featured .pricing-features-list li i.fa-check {
    background: rgba(59, 130, 246, 0.2);
}

/* =====================================================
  12. FAQ — PREMIUM ACCORDION POLISH
   ===================================================== */

.faq-item {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item.open {
    box-shadow:
        inset 0 1px 0 rgba(59, 130, 246, 0.1),
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(59, 130, 246, 0.06);
}

.faq-question h3 {
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.faq-item.open .faq-question h3 {
    color: var(--text-primary);
}

.faq-icon {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-answer-inner {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 4px;
}

/* =====================================================
  13. CTA — ANIMATED GLOW SYSTEM
   ===================================================== */

.cta-inner {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        0 40px 120px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* Subtle shimmer across CTA background */
.cta-inner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(59, 130, 246, 0.03) 60deg,
            transparent 120deg);
    animation: cta-spin 20s linear infinite;
    pointer-events: none;
}

@keyframes cta-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
  14. BUTTON GLOW HOVER EFFECTS
   ===================================================== */

/* Primary button — pulsing glow + shimmer sweep */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.btn-primary:hover::before {
    left: 130%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 40px rgba(59, 130, 246, 0.4),
        0 0 80px rgba(59, 130, 246, 0.15),
        0 16px 40px rgba(0, 0, 0, 0.4) !important;
}

/* Secondary button */
.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05), 0 16px 40px rgba(0, 0, 0, 0.4) !important;
}

/* =====================================================
  15. PARALLAX & DEPTH BACKGROUNDS
   ===================================================== */

/* Section-specific ambient glows (static positioned, not fixed) */
#workflow::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

#features::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

#usecases::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -50px;
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

#pricing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Horizontal separator glow line between sections */
.nexai-section+.nexai-section::after,
#trust+#workflow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.05) 70%, transparent);
    pointer-events: none;
}

/* =====================================================
  16. SCROLLBAR STYLING
   ===================================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* =====================================================
  17. SELECTION COLOR
   ===================================================== */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* =====================================================
  18. FOCUS STATES & ACCESSIBILITY
   ===================================================== */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
    border-radius: 6px;
}

/* =====================================================
  19. MOBILE REFINEMENTS
   ===================================================== */
@media (max-width: 768px) {
    .feature-card:hover {
        transform: translateY(-4px) translateX(0);
    }

    .testim-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }

    .pricing-card--featured:hover {
        transform: translateY(-8px);
    }

    /* Disable heavy will-change on mobile */
    .hero-mockup-frame,
    .feature-card,
    .pricing-card,
    .testim-card {
        will-change: auto;
    }

    /* Reduce glow on mobile for performance */
    .hero-mockup-frame {
        box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 20px 60px rgba(0, 0, 0, 0.7);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================
  20. FOOTER REFINEMENTS
   ===================================================== */
#footer {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.footer-brand {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand i {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    display: flex;
    gap: var(--space-8);
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--blue-bright);
}

.copyright {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-12);
    text-align: center;
    width: 100%;
}