/* ========================================
   Contrative — Homepage-Specific Styles
   ======================================== */

/* Hero geometric shapes */
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.geo-shape {
    position: absolute;
    border: 1.5px solid rgba(0, 180, 166, 0.12);
    border-radius: 12px;
}

.geo-line {
    position: absolute;
    background: rgba(0, 180, 166, 0.06);
}

.geo-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 180, 166, 0.2);
}

/* Grid pattern overlay */
.grid-pattern {
    position: relative;
}
.grid-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 180, 166, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 166, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Pipeline cards */
.pipeline-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 32px rgba(15, 27, 45, 0.08), 0 2px 8px rgba(15, 27, 45, 0.04);
    border-radius: 12px;
    padding: 14px 18px;
    white-space: nowrap;
    min-width: 280px;
}

.pipeline-card-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pipeline-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Operator card */
.operator-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 16px rgba(15, 27, 45, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 40px;
}

/* Connector arrows */
.connector-h {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.connector-h .line {
    width: 24px;
    height: 1px;
    background: #E2E8F0;
}

/* Vertical branch lines */
.branch-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.branch-line-v {
    width: 1px;
    height: 20px;
    background: #E2E8F0;
}
.branch-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.branch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.branch-arm {
    width: 1px;
    height: 16px;
    background: #E2E8F0;
    position: relative;
    overflow: visible;
}
.branch-arm::after {
    content: '';
    position: absolute;
    left: -2px;
    top: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00B4A6;
    box-shadow: 0 0 6px rgba(0, 180, 166, 0.6);
    animation: data-flow-short 2s ease-in-out infinite;
    animation-delay: var(--flow-delay, 0.8s);
}
.branch-item .branch-arrow {
    color: #00B4A6;
}
.branch-horizontal {
    height: 1px;
    background: #E2E8F0;
}

/* Pipeline text transition */
.pipeline-text {
    transition: opacity 0.25s ease;
}
.pipeline-text.fade-out {
    opacity: 0;
}

/* Data flow animations */
@keyframes data-flow {
    0% { top: -2px; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: calc(100% - 3px); opacity: 0; }
}
@keyframes data-flow-short {
    0% { top: -2px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: calc(100% - 3px); opacity: 0; }
}
.pipeline-connector {
    position: relative;
    overflow: visible;
}
.pipeline-connector .connector-line {
    width: 1px;
    background: #E2E8F0;
    position: relative;
    overflow: visible;
}
.pipeline-connector .connector-line::after {
    content: '';
    position: absolute;
    left: -2px;
    top: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00B4A6;
    box-shadow: 0 0 6px rgba(0, 180, 166, 0.6);
    animation: data-flow 2s ease-in-out infinite;
    animation-delay: var(--flow-delay, 0s);
}

/* AI sparkle effects */
@keyframes sparkle-pulse {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(0, 180, 166, 0.3)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 8px rgba(0, 180, 166, 0.8)) drop-shadow(0 0 16px rgba(0, 212, 196, 0.4)); transform: scale(1.15); }
}
@keyframes sparkle-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.ai-sparkle {
    animation: sparkle-pulse 2s ease-in-out infinite;
}
.ai-icon-ring {
    position: relative;
    overflow: hidden;
}
.ai-icon-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 196, 0.15) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes ai-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 180, 166, 0.15), 0 0 2px rgba(0, 180, 166, 0.1); }
    50% { box-shadow: 0 0 20px rgba(0, 180, 166, 0.35), 0 0 40px rgba(0, 212, 196, 0.15); }
}
.ai-card {
    animation: ai-glow 2.5s ease-in-out infinite;
}

/* Pain point columns */
.pain-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.pain-visual {
    height: 180px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 27, 45, 0.04);
    margin-bottom: 20px;
}
.pain-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (max-width: 767px) {
    .pain-visual { height: 150px; }
}

/* Pain animation: Scattered Data */
.drift-chip {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 27, 45, 0.06);
    will-change: transform;
}
.drift-chip:nth-child(1) { animation: drift-tl 7s ease-in-out infinite; }
.drift-chip:nth-child(2) { animation: drift-tr 6s ease-in-out 0.5s infinite; }
.drift-chip:nth-child(3) { animation: drift-bl 8s ease-in-out 1s infinite; }
.drift-chip:nth-child(4) { animation: drift-br 7s ease-in-out 1.5s infinite; }
@keyframes drift-tl { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px,-12px); } }
@keyframes drift-tr { 0%,100% { transform: translate(0,0); } 50% { transform: translate(16px,-10px); } }
@keyframes drift-bl { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-12px,14px); } }
@keyframes drift-br { 0%,100% { transform: translate(0,0); } 50% { transform: translate(14px,12px); } }

/* Pain animation: Follow-up */
.followup-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 2px 6px rgba(15, 27, 45, 0.04);
    will-change: transform;
}
.followup-card:nth-child(1) { animation: floatB 6s ease-in-out infinite; }
.followup-card:nth-child(2) { animation: floatA 7s ease-in-out 0.8s infinite; }
.followup-card:nth-child(3) { animation: floatB 5s ease-in-out 1.6s infinite; }
.followup-date {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.followup-date.faded {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.1);
}
.followup-date.overdue {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Pain animation: Lost Contracts */
.contract-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 2px 6px rgba(15, 27, 45, 0.04);
    will-change: transform;
}
.contract-mini.lost { border-left: 3px solid #EF4444; }
.contract-mini.won { border-left: 3px solid #10B981; }
.contract-mini:nth-child(1) { animation: floatB 6s ease-in-out infinite; }
.contract-mini:nth-child(2) { animation: floatA 7s ease-in-out 0.8s infinite; }
.contract-mini:nth-child(3) { animation: floatB 5s ease-in-out 1.6s infinite; }
.loss-counter {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #EF4444;
    margin-top: 6px;
    animation: pulse-red 3s ease-in-out infinite;
}
@keyframes pulse-red { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }

/* Pain animation: No Visibility */
.blur-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    animation: blur-breathe 6s ease-in-out infinite;
}
.blur-bar {
    width: 18px;
    border-radius: 4px 4px 0 0;
    background: rgba(15, 27, 45, 0.15);
}
@keyframes blur-breathe { 0%,100% { filter: blur(4px); opacity: 0.5; } 50% { filter: blur(6px); opacity: 0.35; } }
.blur-question {
    position: absolute;
    font-size: 36px;
    font-weight: 700;
    color: #EF4444;
    opacity: 0.6;
    animation: pulse-q 3s ease-in-out infinite;
}
@keyframes pulse-q { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.1); opacity: 0.7; } }

/* Solution rows */
.solution-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0;
}
.solution-row:not(:last-child) {
    border-bottom: 1px solid #E2E8F0;
}
.solution-row.reverse .solution-visual { order: 2; }
.solution-row.reverse .solution-content { order: 1; }
.solution-visual {
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 27, 45, 0.04);
}
.solution-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mini contract table */
.mini-table {
    width: 85%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mini-table-header {
    display: grid;
    grid-template-columns: 32px 1fr 70px 50px;
    gap: 8px;
    align-items: center;
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-table-row {
    display: grid;
    grid-template-columns: 32px 1fr 70px 50px;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 1px 3px rgba(15, 27, 45, 0.03);
    will-change: transform;
}
.mini-table-row:nth-child(2) { animation: floatB 7s ease-in-out infinite; }
.mini-table-row:nth-child(3) { animation: floatA 6s ease-in-out 0.5s infinite; }
.mini-table-row:nth-child(4) { animation: floatB 8s ease-in-out 1s infinite; }
.mini-table-row:nth-child(5) { animation: floatA 7s ease-in-out 1.5s infinite; }

/* Solution follow-up cards */
.followup-solution {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-left: 3px solid #10B981;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 2px 6px rgba(15, 27, 45, 0.04);
    will-change: transform;
}
.followup-solution:nth-child(1) { animation: floatB 6s ease-in-out infinite; }
.followup-solution:nth-child(2) { animation: floatA 7s ease-in-out 0.8s infinite; }
.followup-solution:nth-child(3) { animation: floatB 5s ease-in-out 1.6s infinite; }
.followup-action {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    color: #00B4A6;
    background: rgba(0, 180, 166, 0.1);
}

/* AI insight card */
.ai-insight {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(0, 180, 166, 0.03);
    border: 1px solid rgba(0, 180, 166, 0.2);
    border-radius: 12px;
    width: 85%;
}
.ai-insight-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    color: #334155;
}

/* Clear chart (solution) */
.clear-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.clear-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.clear-bar {
    width: 22px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(135deg, #00B4A6, #00D4C4);
}
.clear-bar-label {
    font-size: 10px;
    font-weight: 600;
    color: #0F1B2D;
}

@media (max-width: 767px) {
    .solution-row {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 0;
    }
    .solution-row.reverse .solution-visual { order: 0; }
    .solution-row.reverse .solution-content { order: 0; }
    .solution-visual { height: 180px; }
}
