/**
 * Insights Promo Component Styles
 *
 * Reusable section showing Palomarr Insights matrix preview with animated dots.
 * Used on category landing pages and top companies pages.
 *
 * @package Palomarr
 * @since 2025-12-29
 */

/* =============================================================================
   SECTION: INSIGHTS PROMO
   ============================================================================= */

.insights-promo-section .row-bg {
    background: linear-gradient(135deg, var(--color-black) 0%, #1a4035 100%);
}

.insights-promo-section {
    color: var(--text-white);
    padding: 5rem 0;
}

.insights-promo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.insights-text h2 {
    margin-bottom: 1.5rem;
}

.insights-text p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.insights-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.insights-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    list-style: none;
}

.insights-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0.4rem;
    color: var(--color-accent);
}

.coming-soon-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-p);
    font-style: italic;
}

.insights-visual {
    display: flex;
    justify-content: center;
    height: 100%;
}

.matrix-placeholder {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: var(--border-radius-p);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 64px color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* =============================================================================
   MATRIX CURVES (concentric ellipses from top-right, rotated 45deg)
   ============================================================================= */

.matrix-curves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.matrix-curve {
    position: absolute;
    border: 1px solid #E8F0ED;
    border-radius: 50%;
    rotate: 45deg;
}

.matrix-curve-1 {
    width: 50%;
    height: 38%;
    top: 16%;
    right: -1%;
}

.matrix-curve-2 {
    width: 85%;
    height: 65%;
    top: 8%;
    right: -15%;
}

.matrix-curve-3 {
    width: 120%;
    height: 92%;
    top: 0;
    right: -29%;
}

.matrix-curve-4 {
    width: 155%;
    height: 119%;
    top: -8%;
    right: -43%;
}

.matrix-curve-5 {
    width: 190%;
    height: 146%;
    top: -16%;
    right: -57%;
}

.matrix-curve-6 {
    width: 225%;
    height: 173%;
    top: -24%;
    right: -71%;
}

/* =============================================================================
   MATRIX DOTS
   ============================================================================= */

.matrix-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Data point dots - positioned across the matrix */
.matrix-dots .dot {
    position: absolute;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    opacity: 0;
}

/* Diagonal arc from top-right (darkest) to bottom-left (lightest) */
.matrix-dots .dot:nth-child(1)  { top: 20%; left: 78%; background: #1D463A; --tx: 12px; --ty: -10px; --delay: 0s; }
.matrix-dots .dot:nth-child(2)  { top: 21%; left: 70%; background: #1D463A; --tx: -8px; --ty: 14px; --delay: 0.04s; }
.matrix-dots .dot:nth-child(3)  { top: 26%; left: 65%; background: #1D463A; --tx: 10px; --ty: 12px; --delay: 0.08s; }
.matrix-dots .dot:nth-child(4)  { top: 24%; left: 66%; background: #1D463A; --tx: -12px; --ty: -6px; --delay: 0.12s; }
.matrix-dots .dot:nth-child(5)  { top: 28%; left: 71%; background: #1D463A; --tx: 6px; --ty: -14px; --delay: 0.16s; }
.matrix-dots .dot:nth-child(6)  { top: 32%; left: 64%; background: #4A7569; --tx: -10px; --ty: 8px; --delay: 0.2s; }
.matrix-dots .dot:nth-child(7)  { top: 30%; left: 60%; background: #4A7569; --tx: 14px; --ty: 5px; --delay: 0.24s; }
.matrix-dots .dot:nth-child(8)  { top: 40%; left: 56%; background: #4A7569; --tx: -6px; --ty: -12px; --delay: 0.28s; }
.matrix-dots .dot:nth-child(9)  { top: 44%; left: 48%; background: #4A7569; --tx: 10px; --ty: 10px; --delay: 0.32s; }
.matrix-dots .dot:nth-child(10) { top: 48%; left: 60%; background: #4A7569; --tx: -8px; --ty: -8px; --delay: 0.36s; }
.matrix-dots .dot:nth-child(11) { top: 52%; left: 42%; background: #74958B; --tx: 12px; --ty: 6px; --delay: 0.4s; }
.matrix-dots .dot:nth-child(12) { top: 56%; left: 48%; background: #74958B; --tx: -6px; --ty: 12px; --delay: 0.44s; }
.matrix-dots .dot:nth-child(13) { top: 48%; left: 30%; background: #74958B; --tx: 8px; --ty: -10px; --delay: 0.48s; }
.matrix-dots .dot:nth-child(14) { top: 62%; left: 40%; background: #74958B; --tx: -10px; --ty: 5px; --delay: 0.52s; }
.matrix-dots .dot:nth-child(15) { top: 68%; left: 38%; background: #74958B; --tx: 6px; --ty: 14px; --delay: 0.56s; }
.matrix-dots .dot:nth-child(16) { top: 66%; left: 32%; background: #B3CEC6; --tx: -12px; --ty: -8px; --delay: 0.6s; }
.matrix-dots .dot:nth-child(17) { top: 66%; left: 26%; background: #B3CEC6; --tx: 10px; --ty: 8px; --delay: 0.64s; }
.matrix-dots .dot:nth-child(18) { top: 74%; left: 30%; background: #B3CEC6; --tx: -8px; --ty: -12px; --delay: 0.68s; }
.matrix-dots .dot:nth-child(19) { top: 78%; left: 22%; background: #B3CEC6; --tx: 14px; --ty: 10px; --delay: 0.72s; }
.matrix-dots .dot:nth-child(20) { top: 84%; left: 16%; background: #B3CEC6; --tx: -6px; --ty: 6px; --delay: 0.76s; }

/* Animate dots when visible - fade in first, then drift to position */
.matrix-dots.animate .dot {
    animation: dotFadeIn 0.7s ease-out forwards;
    animation-delay: var(--delay);
}

@keyframes dotFadeIn {
    0% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty));
    }
    30% {
        opacity: 1;
        transform: translate(var(--tx), var(--ty));
    }
    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* =============================================================================
   AXIS LABELS
   ============================================================================= */

.axis-label {
    position: absolute;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #252827;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.axis-label::after {
    content: '';
    width: 0.8rem;
    height: 0.8rem;
    background: url('/wp-content/uploads/2024/05/icon-arrow-right.svg') no-repeat center;
    background-size: contain;
}

.axis-label.x-axis {
    top: 0.3rem;
    left: 50%;
    transform: translateX(-50%);
}

.axis-label.y-axis {
    right: -4.7rem;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 640px) {
    .insights-text h2 {
        font-size: 2.8rem !important;
        line-height: 3rem !important;
        margin-bottom: 2rem;
    }

    .insights-promo-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .insights-features {
        display: inline-block;
        text-align: left;
    }
}
