/* ==========================================================================
   Hero Animation - Abstract Flow Visualization
   ========================================================================== */

/* Particle Canvas */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Hero Visual Container - Side by Side Layout */
.hero-visual {
    position: relative;
    padding: 0 20px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.5s forwards;
}

/* Glowing backdrop for the visualization */
.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(233, 30, 140, 0.12) 0%, rgba(233, 30, 140, 0.04) 40%, transparent 70%);
    pointer-events: none;
    animation: backdropPulse 4s ease-in-out infinite;
}

@keyframes backdropPulse {
    0%, 100% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Section label above visualization */
.hero-visual-label {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
}

.hero-visual-label span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pink);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 6px 16px;
    background: rgba(233, 30, 140, 0.08);
    border: 1px solid rgba(233, 30, 140, 0.2);
    border-radius: 20px;
    display: inline-block;
}

.flow-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 280px;
    margin: 0 auto;
}

/* Central Hub */
.flow-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    z-index: 10;
}

.hub-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(233, 30, 140, 0.25), rgba(233, 30, 140, 0.1));
    border: 1px solid rgba(233, 30, 140, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 
        0 0 60px rgba(233, 30, 140, 0.4),
        0 0 120px rgba(233, 30, 140, 0.2),
        inset 0 0 30px rgba(233, 30, 140, 0.1);
    animation: hubPulse 3s ease-in-out infinite;
}

.hub-icon {
    width: 36px;
    height: 36px;
    color: var(--pink);
    filter: drop-shadow(0 0 12px rgba(233, 30, 140, 0.8));
    animation: hubIconSpin 20s linear infinite;
}

@keyframes hubIconSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes hubPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 60px rgba(233, 30, 140, 0.4),
            0 0 120px rgba(233, 30, 140, 0.2),
            inset 0 0 30px rgba(233, 30, 140, 0.1);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.08);
        box-shadow: 
            0 0 80px rgba(233, 30, 140, 0.5),
            0 0 160px rgba(233, 30, 140, 0.3),
            inset 0 0 40px rgba(233, 30, 140, 0.15);
    }
}

/* Hub Rings */
.hub-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(233, 30, 140, 0.3);
}

.hub-ring-1 {
    width: 100px;
    height: 100px;
    animation: ringExpand 2.5s ease-out infinite;
}

.hub-ring-2 {
    width: 100px;
    height: 100px;
    animation: ringExpand 2.5s ease-out infinite 0.8s;
}

.hub-ring-3 {
    width: 100px;
    height: 100px;
    animation: ringExpand 2.5s ease-out infinite 1.6s;
}

@keyframes ringExpand {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
        border-color: rgba(233, 30, 140, 0.5);
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
        border-color: rgba(233, 30, 140, 0);
    }
}

/* Flow Nodes */
.flow-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 5;
}

.node-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--dark-elevated), var(--dark-surface));
    border: 1px solid rgba(233, 30, 140, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pink);
    transition: all 0.4s ease;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(233, 30, 140, 0.1);
    animation: nodeFloat 4s ease-in-out infinite;
}

.node-research .node-icon {
    animation-delay: 0s;
}

.node-personalize .node-icon {
    animation-delay: 1.3s;
}

.node-create .node-icon {
    animation-delay: 2.6s;
}

@keyframes nodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.node-icon svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 6px rgba(233, 30, 140, 0.4));
}

.flow-node:hover .node-icon {
    border-color: rgba(233, 30, 140, 0.5);
    transform: scale(1.15) translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(233, 30, 140, 0.3),
        0 0 30px rgba(233, 30, 140, 0.2);
}

.node-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.flow-node:hover .node-label {
    color: var(--pink);
    text-shadow: 0 0 20px rgba(233, 30, 140, 0.5);
}

/* Node Positions - spread further apart */
.node-research {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.node-personalize {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
}

.node-create {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Flow Lines SVG */
.flow-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.flow-path {
    stroke-dasharray: 12 6;
    stroke-width: 2;
    animation: flowDash 1.2s linear infinite;
}

@keyframes flowDash {
    to {
        stroke-dashoffset: -36;
    }
}

/* Flow Dots - larger and more prominent */
.flow-dot {
    filter: drop-shadow(0 0 10px rgba(233, 30, 140, 1)) drop-shadow(0 0 20px rgba(233, 30, 140, 0.6));
}

/* Output indicator - shows what the system produces */
.output-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(233, 30, 140, 0.08);
    border: 1px solid rgba(233, 30, 140, 0.2);
    border-radius: 30px;
    opacity: 0;
    animation: outputAppear 0.6s ease-out 1.8s forwards;
}

.output-indicator-dot {
    width: 8px;
    height: 8px;
    background: var(--pink);
    border-radius: 50%;
    animation: outputDotPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(233, 30, 140, 0.6);
}

@keyframes outputDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.output-indicator-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-300);
    letter-spacing: 0.05em;
}

.output-indicator-text strong {
    color: var(--pink);
    font-weight: 600;
}

@keyframes outputAppear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Staggered node animations on load */
.node-research {
    opacity: 0;
    animation: nodeAppear 0.6s ease-out 0.9s forwards;
}

.node-personalize {
    opacity: 0;
    animation: nodeAppear 0.6s ease-out 1.1s forwards;
}

.node-create {
    opacity: 0;
    animation: nodeAppear 0.6s ease-out 1.3s forwards;
}

@keyframes nodeAppear {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.node-personalize {
    animation-name: nodeAppearTop;
}

@keyframes nodeAppearTop {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1100px) {
    .flow-container {
        max-width: 380px;
        height: 280px;
    }

    .hub-core {
        width: 70px;
        height: 70px;
    }

    .node-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 900px) {
    .hero-visual {
        padding: 20px 0 0;
    }

    .flow-container {
        max-width: 360px;
        height: 240px;
    }

    .hero-visual::before {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 600px) {
    .hero-visual {
        padding: 10px 0 0;
    }

    .hero-visual-label {
        margin-bottom: 12px;
    }

    .hero-visual-label span {
        font-size: 0.55rem;
        padding: 5px 12px;
    }

    .flow-container {
        height: 200px;
        max-width: 300px;
    }

    .hero-visual::before {
        width: 260px;
        height: 260px;
    }

    .hub-core {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .hub-icon {
        width: 24px;
        height: 24px;
    }

    .node-icon {
        width: 36px;
        height: 36px;
    }

    .node-icon svg {
        width: 14px;
        height: 14px;
    }

    .node-label {
        font-size: 0.55rem;
    }

    .hub-ring-1,
    .hub-ring-2,
    .hub-ring-3 {
        width: 65px;
        height: 65px;
    }

    .output-indicator {
        padding: 5px 10px;
        gap: 5px;
        bottom: 5px;
    }

    .output-indicator-text {
        font-size: 0.55rem;
    }

    .output-indicator-dot {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 400px) {
    .hero-visual {
        padding: 5px 0 0;
    }

    .flow-container {
        height: 160px;
        max-width: 240px;
    }

    .hero-visual::before {
        width: 200px;
        height: 200px;
    }

    .node-label {
        display: none;
    }

    .hub-core {
        width: 44px;
        height: 44px;
    }

    .hub-icon {
        width: 20px;
        height: 20px;
    }

    .node-icon {
        width: 30px;
        height: 30px;
    }

    .hub-ring-1,
    .hub-ring-2,
    .hub-ring-3 {
        width: 55px;
        height: 55px;
    }

    .output-indicator {
        display: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hub-core,
    .hub-ring,
    .flow-path,
    .flow-dot,
    .flow-node {
        animation: none !important;
    }

    .hub-ring {
        opacity: 0.3;
    }

    .flow-node {
        opacity: 1;
    }

    .flow-path {
        stroke-dasharray: none;
    }
}

