/* --- Process Section (BEM) --- */
.process {
    background-color: var(--color-bg-light-grey);
    width: 100%;
    color: var(--color-text-dark);
    padding: var(--space-5xl) 0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    font-family: var(--font-main);
}

/* Background decoration */
.process__bg-shape {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(circle, var(--bg-primary-faint) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.process::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle, var(--bg-primary-fainter) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.process__container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.process__header {
    text-align: left;
    margin-bottom: var(--space-4xl);
    position: relative;
    z-index: 2;
}

.process__tagline {
    justify-content: flex-start;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-primary);
}

.process__dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 15px var(--shadow-primary-strong);
}

.process__title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    color: var(--color-text-dark);
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-transform: uppercase;
}

.process__title-highlight {
    color: transparent;
    -webkit-text-stroke: 2px var(--color-text-dark);
    transition: color 0.3s ease;
}

.process__header:hover .process__title-highlight {
    color: var(--color-primary);
    -webkit-text-stroke: 2px var(--color-primary);
}

/* Timeline Container */
.process__timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4xl) 0;
}

/* Individual Steps */
.process__step {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
}

.process__step:nth-child(1) { animation-delay: 0.1s; }
.process__step:nth-child(2) { animation-delay: 0.2s; }
.process__step:nth-child(3) { animation-delay: 0.3s; }
.process__step:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styling */
.process__card {
    background: var(--color-bg-light);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: 24px;
    box-shadow: 0 10px 30px var(--shadow-card-faint);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    border: 1px solid var(--border-dark-faint);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.process__step:hover .process__card {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px var(--shadow-card-medium);
    border-color: var(--border-primary-faint);
}

/* Icons */
.process__icon-wrapper {
    margin-bottom: var(--space-xl);
    position: relative;
}

.process__icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--bg-primary-light) 0%, var(--color-bg-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
    color: var(--color-primary);
    box-shadow: 0 10px 20px var(--shadow-primary-faint);
}

.process__icon svg {
    width: 28px;
    height: 28px;
    transition: all 0.5s ease;
}

.process__step:hover .process__icon {
    background: var(--color-primary);
    color: var(--color-bg-light);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px var(--shadow-primary-low);
}

.process__step:hover .process__icon svg {
    transform: scale(1.1);
}

/* Content */
.process__content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* The Number */
.process__number {
    position: absolute;
    top: calc(var(--space-4xl) * -1);
    right: calc(var(--space-lg) * -1);
    font-size: 6rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px var(--border-dark-faint);
    z-index: 0;
    transition: all 0.5s ease;
    font-family: var(--font-main);
    pointer-events: none;
    line-height: 1;
}

.process__step:hover .process__number {
    -webkit-text-stroke: 2px var(--border-primary-medium);
    transform: scale(1.1) translateX(-10px);
    color: var(--bg-primary-fainter);
}

.process__step-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: var(--space-md);
    letter-spacing: -0.5px;
    position: relative;
}

.process__text {
    font-size: 1.1rem;
    color: var(--color-text-grey-dark);
    line-height: 1.8;
    margin: 0;
}

/* CTA at bottom */
.process__cta {
    text-align: center;
    margin-top: var(--space-4xl);
    position: relative;
    z-index: 2;
}

.process__button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-bg-light);
    background-color: var(--color-text-dark);
    padding: var(--space-md) var(--space-2xl);
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px var(--shadow-card);
    position: relative;
    overflow: hidden;
    /* Accessibility: Minimum touch target size */
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
}

.process__button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-white-soft), transparent);
    transition: 0.5s;
}

.process__button:hover::before {
    left: 100%;
}

.process__button:hover {
    transform: scale(1.05);
    background-color: var(--color-primary);
    box-shadow: 0 15px 30px var(--shadow-primary-low);
}

.process__arrow {
    transition: transform 0.3s;
}

.process__button:hover .process__arrow {
    transform: translateX(5px);
}

/* Mobile Progress Bar */
.process__mobile-progress-container {
    display: none; /* Hidden by default */
}

/* Responsive */
@media (max-width: 1024px) {
    .process {
        padding: var(--space-4xl) 0;
    }

    .process__header {
        text-align: center;
        margin-bottom: var(--space-3xl);
    }

    .process__tagline {
        justify-content: center;
    }

    /* Change grid to flex for swiping */
    .process__timeline {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: var(--space-lg);
        padding: 0 5% var(--space-xl) 5%; /* Padding for scroll snap alignment */
        width: 100%;
        scrollbar-width: none; /* Firefox */
        margin-bottom: var(--space-xl);
    }

    .process__timeline::-webkit-scrollbar {
        display: none;
    }

    .process__step {
        flex: 0 0 85vw; /* Fixed width for cards */
        scroll-snap-align: center;
        opacity: 1; /* Ensure visible without animation delay issues on scroll */
        transform: none;
        animation: none; /* Disable fade up animation on mobile if it interferes */
    }

    /* Mobile Progress Bar */
    .process__mobile-progress-container {
        display: flex;
        justify-content: center;
        margin-bottom: var(--space-2xl);
        width: 100%;
    }

    .process__mobile-progress-bar {
        width: 200px;
        height: 4px;
        background-color: rgba(0,0,0,0.1);
        border-radius: 2px;
        overflow: hidden;
        position: relative;
    }

    .process__mobile-progress-fill {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 0%;
        background-color: var(--color-primary);
        transition: width 0.1s linear;
    }
}

@media (max-width: 768px) {
    .process {
        padding: var(--space-3xl) 0;
    }

    .process__title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    /* Removed grid-template-columns override since we are using flex now */

    .process__card {
        flex-direction: row;
        align-items: center;
        gap: var(--space-lg);
        padding: var(--space-xl);
    }

    .process__icon-wrapper {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .process__number {
        top: 50%;
        transform: translateY(-50%);
        right: 20px;
        font-size: 4rem;
        opacity: 0.1; /* Make it subtler so it doesn't interfere with text */
    }
    
    .process__step:hover .process__number {
        transform: translateY(-50%) scale(1.1);
    }

    .process__cta {
        margin-top: var(--space-2xl);
    }

    .process__button {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: var(--space-md) var(--space-lg);
    }
}

@media (max-width: 480px) {
    .process__title {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
    }

    .process__card {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-lg);
    }
    
    .process__icon-wrapper {
        margin-bottom: var(--space-md);
    }
    
    .process__number {
        top: var(--space-md);
        right: var(--space-md);
        transform: none;
        font-size: 3rem;
    }

    .process__step:hover .process__number {
        transform: scale(1.1);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .process__step,
    .process__card,
    .process__icon,
    .process__icon svg,
    .process__number,
    .process__button,
    .process__arrow,
    .process__title-highlight,
    .process__mobile-progress-fill {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }

    .process__step:hover .process__card,
    .process__step:hover .process__icon,
    .process__step:hover .process__number,
    .process__button:hover,
    .process__button:hover .process__arrow {
        transform: none !important;
    }
}