/* =============================================
   FlowBelgium - Flow Journey Section
   Creative, immersive design with 3D effects
   ============================================= */

/* =============================================
   Section Container & Atmosphere
   ============================================= */
.flow-journey-section {
    position: relative;
    padding: var(--space-4xl) 0;
    background: linear-gradient(180deg,
        var(--color-dark) 0%,
        rgba(10, 10, 11, 1) 30%,
        rgba(15, 15, 17, 1) 70%,
        var(--color-dark) 100%
    );
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.journey-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Animated gradient mesh */
.journey-gradient-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(251, 191, 36, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    animation: meshFloat 15s ease-in-out infinite;
}

@keyframes meshFloat {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.05) translateY(-20px); }
}

/* Noise overlay for texture */
.journey-noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Particle container */
.journey-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.journey-container {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    z-index: 2;
}

/* =============================================
   Header with Typing Animation
   ============================================= */
.journey-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 50px;
    margin-bottom: var(--space-xl);
    backdrop-filter: blur(10px);
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
        transform: scale(1.1);
    }
}

.badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.journey-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
    color: var(--color-white);
}

.title-accent {
    background: linear-gradient(135deg, var(--color-primary) 0%, #f97316 50%, var(--color-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

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

.title-cursor {
    display: inline-block;
    animation: cursorBlink 1s step-end infinite;
    color: var(--color-primary);
    -webkit-text-fill-color: var(--color-primary);
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.journey-subtitle {
    font-size: 1.2rem;
    color: var(--color-gray-400);
    max-width: 500px;
    margin: 0 auto;
}

/* =============================================
   Flow Steps Container
   ============================================= */
.flow-steps-container {
    position: relative;
    padding: var(--space-2xl) 0;
}

/* Energy flow line SVG */
.energy-flow-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 200px;
    z-index: 0;
    display: none;
}

@media (min-width: 1024px) {
    .energy-flow-line {
        display: block;
    }
}

.flow-svg {
    width: 100%;
    height: 100%;
}

.flow-path-active {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: flowDash 3s ease forwards;
}

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

/* Steps Grid */
.flow-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    position: relative;
    z-index: 2;
}

/* =============================================
   Individual Step Cards
   ============================================= */
.flow-step {
    position: relative;
    perspective: 1000px;
}

/* Giant number background */
.step-number-bg {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: clamp(6rem, 10vw, 10rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(251, 191, 36, 0.08);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    transition: all 0.5s ease;
}

.flow-step:hover .step-number-bg {
    -webkit-text-stroke: 1px rgba(251, 191, 36, 0.2);
    transform: translateX(-50%) scale(1.1);
}

/* 3D Card */
.step-card-3d {
    position: relative;
    background: rgba(20, 20, 22, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    backdrop-filter: blur(20px);
    z-index: 1;
}

.step-card-3d:hover {
    transform: translateY(-12px) rotateX(2deg);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(251, 191, 36, 0.1);
}

/* Shine effect */
.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    transition: left 0.7s ease;
    z-index: 10;
    pointer-events: none;
}

.step-card-3d:hover .card-shine {
    left: 100%;
}

/* Border glow */
.card-border-glow {
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), transparent 50%, rgba(251, 191, 36, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.step-card-3d:hover .card-border-glow {
    opacity: 1;
}

.card-border-glow.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), transparent 50%, rgba(59, 130, 246, 0.1));
}

.card-border-glow.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), transparent 50%, rgba(249, 115, 22, 0.1));
}

.card-border-glow.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), transparent 50%, rgba(34, 197, 94, 0.1));
}

/* Success card special treatment */
.step-card-3d.success {
    background: linear-gradient(135deg,
        rgba(20, 20, 22, 0.9) 0%,
        rgba(34, 197, 94, 0.08) 100%
    );
    border-color: rgba(34, 197, 94, 0.2);
}

.step-card-3d.success:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(34, 197, 94, 0.2);
}

/* Success particles */
.success-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.success-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #22c55e;
    border-radius: 50%;
    opacity: 0;
}

.step-card-3d.success:hover .success-particles span {
    animation: particleFloat 2s ease-out infinite;
}

.success-particles span:nth-child(1) { left: 20%; top: 80%; animation-delay: 0s; }
.success-particles span:nth-child(2) { left: 40%; top: 90%; animation-delay: 0.2s; }
.success-particles span:nth-child(3) { left: 60%; top: 85%; animation-delay: 0.4s; }
.success-particles span:nth-child(4) { left: 80%; top: 75%; animation-delay: 0.6s; }
.success-particles span:nth-child(5) { left: 30%; top: 70%; animation-delay: 0.8s; }

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Card Content */
.step-card-content {
    position: relative;
    padding: var(--space-xl);
    z-index: 2;
}

/* =============================================
   Icon Orbs with Rings
   ============================================= */
.step-icon-orb {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: var(--space-lg);
}

.orb-rings {
    position: absolute;
    inset: 0;
}

.orb-rings span {
    position: absolute;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 50%;
    animation: ringPulse 3s ease-in-out infinite;
}

.orb-rings span:nth-child(1) {
    inset: 0;
    animation-delay: 0s;
}

.orb-rings span:nth-child(2) {
    inset: -8px;
    animation-delay: 0.5s;
}

.orb-rings span:nth-child(3) {
    inset: -16px;
    animation-delay: 1s;
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.orb-center {
    position: absolute;
    inset: 8px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.orb-center svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
    transition: all 0.4s ease;
}

.step-card-3d:hover .orb-center {
    background: var(--color-primary);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
}

.step-card-3d:hover .orb-center svg {
    color: var(--color-black);
}

/* Blue orb */
.step-icon-orb.blue .orb-rings span {
    border-color: rgba(59, 130, 246, 0.2);
}

.step-icon-orb.blue .orb-center {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
}

.step-icon-orb.blue .orb-center svg {
    color: #3b82f6;
}

.flow-step[data-step="2"] .step-card-3d:hover .orb-center {
    background: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

/* Orange orb */
.step-icon-orb.orange .orb-rings span {
    border-color: rgba(249, 115, 22, 0.2);
}

.step-icon-orb.orange .orb-center {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
}

.step-icon-orb.orange .orb-center svg {
    color: #f97316;
}

.flow-step[data-step="3"] .step-card-3d:hover .orb-center {
    background: #f97316;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

/* Green orb */
.step-icon-orb.green .orb-rings span {
    border-color: rgba(34, 197, 94, 0.2);
}

.step-icon-orb.green .orb-center {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
}

.step-icon-orb.green .orb-center svg {
    color: #22c55e;
}

.flow-step[data-step="4"] .step-card-3d:hover .orb-center {
    background: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.success-rings span {
    border-color: rgba(34, 197, 94, 0.25) !important;
}

/* =============================================
   Step Info
   ============================================= */
.step-info {
    margin-bottom: var(--space-lg);
}

.step-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.step-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.95rem;
    color: var(--color-gray-400);
    line-height: 1.6;
}

/* =============================================
   Step Meta
   ============================================= */
.step-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-badge.meta-free {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}

.meta-badge.meta-blue {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.meta-badge.meta-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.meta-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-gray-500);
}

.meta-time svg {
    color: var(--color-gray-600);
}

/* Progress indicator for step 3 */
.progress-indicator {
    width: 100%;
}

.progress-bar {
    height: 6px;
    background: var(--color-gray-800);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill-animated {
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, #f97316, #fbbf24);
    border-radius: 3px;
    position: relative;
    animation: progressPulse 2s ease-in-out infinite;
}

.progress-fill-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s linear infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-indicator span {
    font-size: 0.8rem;
    color: var(--color-gray-500);
}

/* =============================================
   Step Connectors (Mobile)
   ============================================= */
.step-connector {
    display: none;
}

/* =============================================
   CTA Section
   ============================================= */
.journey-cta {
    margin-top: var(--space-4xl);
    display: flex;
    justify-content: center;
}

.cta-card {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    padding: var(--space-xl) var(--space-2xl);
    background: rgba(20, 20, 22, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.cta-card:hover {
    border-color: rgba(251, 191, 36, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.cta-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
    border-radius: 16px;
    flex-shrink: 0;
}

.cta-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cta-label {
    font-size: 0.85rem;
    color: var(--color-gray-500);
}

.cta-value {
    font-size: 1.1rem;
    color: var(--color-white);
}

.cta-value strong {
    color: var(--color-primary);
}

.cta-button {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--color-primary);
    color: var(--color-black);
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: #f59e0b;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
}

.button-arrow {
    display: flex;
    transition: transform 0.3s ease;
}

.cta-button:hover .button-arrow {
    transform: translateX(5px);
}

/* =============================================
   Scroll Animations
   ============================================= */
.flow-step {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.flow-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.flow-step[data-step="1"] { transition-delay: 0.1s; }
.flow-step[data-step="2"] { transition-delay: 0.25s; }
.flow-step[data-step="3"] { transition-delay: 0.4s; }
.flow-step[data-step="4"] { transition-delay: 0.55s; }

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
    .flow-steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }

    .energy-flow-line {
        display: none;
    }

    .step-number-bg {
        font-size: 6rem;
    }
}

@media (max-width: 768px) {
    .flow-journey-section {
        min-height: auto;
        padding: var(--space-3xl) 0;
    }

    .flow-steps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: var(--space-xl);
    }

    .step-number-bg {
        display: none;
    }

    .journey-title {
        font-size: 2.5rem;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-xl);
        gap: var(--space-lg);
    }

    .cta-content {
        flex-direction: column;
        gap: var(--space-md);
    }

    .step-connector {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: var(--space-lg);
    }

    .connector-dot {
        width: 8px;
        height: 8px;
        background: var(--color-primary);
        border-radius: 50%;
    }

    .connector-line {
        width: 2px;
        height: 30px;
        background: linear-gradient(180deg, var(--color-primary), transparent);
    }

    .flow-step:last-child .step-connector {
        display: none;
    }
}

@media (max-width: 480px) {
    .journey-header {
        margin-bottom: var(--space-2xl);
    }

    .header-badge {
        padding: 6px 16px;
    }

    .badge-text {
        font-size: 0.75rem;
    }

    .step-card-content {
        padding: var(--space-lg);
    }

    .step-icon-orb {
        width: 60px;
        height: 60px;
    }

    .orb-center svg {
        width: 24px;
        height: 24px;
    }

    .step-title {
        font-size: 1.2rem;
    }

    .step-desc {
        font-size: 0.9rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   Dark mode optimizations
   ============================================= */
@media (prefers-color-scheme: dark) {
    .step-card-3d {
        background: rgba(15, 15, 17, 0.9);
    }
}

/* =============================================
   Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .journey-gradient-mesh,
    .orb-rings span,
    .badge-pulse,
    .title-accent,
    .title-cursor,
    .progress-fill-animated,
    .flow-path-active,
    .success-particles span {
        animation: none;
    }

    .flow-step {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .step-card-3d:hover {
        transform: translateY(-5px);
    }
}
