/* =====================================================
   Section Container
   ===================================================== */
.process-section {
    padding: 80px 0 60px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

    [data-theme="dark"] .process-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at 20% 30%, rgba(0, 242, 254, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(255, 0, 127, 0.06) 0%, transparent 50%);
        pointer-events: none;
        z-index: 0;
    }

    [data-theme="light"] .process-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at 20% 30%, rgb(114 137 72 / 7%) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgb(207 255 121 / 13%) 0%, transparent 50%);
        pointer-events: none;
        z-index: 0;
    }

/* =====================================================
   Process Wrapper - Two Column Layout
   ===================================================== */
.process-wrapper {
    display: flex;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* =====================================================
   Left Side Image Wrapper
   ===================================================== */
@keyframes floatImage {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-14px) rotate(0.6deg); }
}

.process-image-wrapper {
    flex: 0 0 45%;
    position: relative;
    animation: floatImage 7s ease-in-out infinite;
    z-index: 1;
}

.process-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 20px;
    background: var(--gradient-primary);
    filter: blur(48px);
    opacity: 0.14;
    z-index: -1;
    border-radius: 40px;
    transition: opacity 0.6s ease;
}
.process-image-wrapper:hover::after {
    opacity: 0.28;
}

.process-image {
    width: 100%;
    height: auto;
    border-radius: 0 0 0 24px;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.process-image-wrapper:hover .process-image {
    transform: scale(1.03);
}

/* =====================================================
   Right Side Content Wrapper
   ===================================================== */
.process-content-wrapper {
    flex: 1;
    z-index: 1;
}

/* =====================================================
   Section Header — animated entrance
   ===================================================== */
.process-header {
    margin-bottom: 40%;
}

/* Gradient subheading pill — matches wwd-subheading */
.process-subheading {
    display: inline-block;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.process-subheading.anim-in {
    opacity: 1;
    transform: translateX(0);
}

.process-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1.2;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease 0.1s, transform 0.7s ease 0.1s;
}
.process-title.anim-in {
    opacity: 1;
    transform: translateX(0);
}

.process-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}
.process-subtitle.anim-in {
    opacity: 1;
    transform: translateX(0);
}

/* =====================================================
   Process Timeline
   ===================================================== */
.process-timeline {
    position: relative;
    margin-left: 22%;
    margin-top: -15%;
    z-index: 1;
}

.timeline-container {
    overflow: hidden;
    margin-bottom: 20px;
    padding: 20px 0;
}

.timeline-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    gap: 40px;
    position: relative;
}

/* ── Track base line ── */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 44px;
    left: 20px;
    width: calc((100% + 40px) * 5 / 3 - 40px);
    height: 3px;
    background: rgba(255,255,255,0.05);
    z-index: 0;
}
[data-theme="light"] .timeline-track::before {
    background: rgba(0,0,0,0.06);
}

/* ── Glowing progress line ── */
.timeline-progress-line {
    position: absolute;
    top: 44px;
    left: 44px;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 16px var(--accent-primary), 0 0 4px var(--accent-primary);
}
/* Animated shimmer on the progress line */
.timeline-progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { opacity: 0; transform: translateX(-20px); }
    50%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(20px); }
}

/* =====================================================
   Timeline Step
   ===================================================== */
.timeline-step {
    flex: 0 0 calc(33.333% - 27px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    z-index: 1;
    cursor: default;
    animation: stepReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards, stepBounce 3s ease-in-out infinite;
    animation-delay: var(--step-delay, 0s), var(--bounce-delay, 0s);
    opacity: 0;
    transform: translateY(30px) scale(0.9);
}

.timeline-step:nth-child(1) { --step-delay: 0.1s; --bounce-delay: 0s; }
.timeline-step:nth-child(2) { --step-delay: 0.2s; --bounce-delay: 0.5s; }
.timeline-step:nth-child(3) { --step-delay: 0.3s; --bounce-delay: 1s; }
.timeline-step:nth-child(4) { --step-delay: 0.4s; --bounce-delay: 1.5s; }
.timeline-step:nth-child(5) { --step-delay: 0.5s; --bounce-delay: 2s; }

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

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

.timeline-step:hover {
    transform: translateY(-10px);
    animation: none;
}

/* Scroll reveal */
.reveal-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25,1,0.5,1), transform 0.8s cubic-bezier(0.25,1,0.5,1);
}
.reveal-item.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline Marker Row */
.timeline-marker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

/* Timeline Marker */
.timeline-marker {
    width: 44px;
    height: 44px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--shadow-color);
    flex-shrink: 0;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.25,1,0.5,1), box-shadow 0.35s ease;
}

/* Pulse ring */
.timeline-marker::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.timeline-step:hover .timeline-marker {
    transform: scale(1.15);
    box-shadow: 0 8px 28px var(--shadow-color);
}
.timeline-step:hover .timeline-marker::before {
    opacity: 1;
    animation: pulseRing 1.4s ease-in-out infinite;
}
@keyframes pulseRing {
    0%,100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.25); opacity: 0.4; }
}

.timeline-number {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

/* ── Timeline Content ── */
.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

/* Background outline number */
.step-bg-number {
    position: absolute;
    right: -4px;
    bottom: -14px;
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.04);
    pointer-events: none;
    transition: all 0.5s ease;
    user-select: none;
    z-index: -1;
}
[data-theme="light"] .step-bg-number {
    -webkit-text-stroke: 1.5px rgba(0,0,0,0.04);
}
.timeline-step:hover .step-bg-number {
    -webkit-text-stroke: 1.5px rgba(0,242,254,0.14);
    transform: scale(1.12) translateY(-6px);
}
[data-theme="light"] .timeline-step:hover .step-bg-number {
    -webkit-text-stroke: 1.5px rgba(114,137,72,0.12);
}

/* Title */
.timeline-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    transition: color 0.35s ease;
}
.timeline-step:hover .timeline-title {
    color: var(--accent-primary);
}

/* Description */
.timeline-description {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    transition: color 0.35s ease 0.05s;
}
.timeline-step:hover .timeline-description {
    color: var(--text-primary);
}

/* =====================================================
   Timeline Navigation Arrows
   ===================================================== */
.timeline-nav {
    display: flex;
    gap: 12px;
    margin-top: -10px;
}

.timeline-arrow {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25,1,0.5,1);
    color: var(--accent-primary);
    position: relative;
    overflow: hidden;
}
.timeline-arrow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent-primary);
    transform: scale(0);
    transition: transform 0.35s cubic-bezier(0.25,1,0.5,1);
    z-index: 0;
}
.timeline-arrow:hover::before {
    transform: scale(1);
}
.timeline-arrow:hover {
    color: #ffffff;
    box-shadow: 0 0 18px var(--shadow-color);
    transform: scale(1.1);
}
.timeline-arrow svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}
.timeline-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}
.timeline-arrow:focus {
    outline: none;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1024px) {
    .process-wrapper { gap: 40px; }
    .process-image-wrapper { flex: 0 0 40%; }
    .process-title { font-size: 34px; }
    .timeline-step { flex: 0 0 calc(50% - 20px); }
}

@media (max-width: 768px) {
    .process-section { padding: 40px 0; }
    .process-wrapper { flex-direction: column-reverse; gap: 36px; }
    .process-image-wrapper { flex: 0 0 auto; width: 100%; }
    .process-header { margin-bottom: 0; }
    .process-title { font-size: 30px; }
    .process-timeline { margin-left: 46%; margin-top: -30%; }
    .timeline-step { flex: 0 0 100%; padding-left: 30px; }
    .timeline-marker { width: 30px; height: 30px; }
    .timeline-number { font-size: 11px; }
    .timeline-nav { margin-top: -18px; }
    .timeline-arrow { width: 40px; height: 40px; }
    .timeline-arrow svg { width: 18px; height: 18px; }
}

@media (max-width: 490px) {
    .timeline-nav { margin-top: -60px; }
    .process-timeline { margin-left: 38%; margin-top: -34%; }
}
