:root {
    --midnight: #0a1628;
    --deep-ocean: #0f2847;
    --golden-sand: #d4a853;
    --warm-gold: #e8c47c;
    --sunset-coral: #e07a5f;
    --tropical-teal: #2d9596;
    --teal-light: #3db9b9;
    --ivory: #faf8f5;
    --pearl: #f0ede8;
    --slate: #64748b;
    --charcoal: #1e293b;

    --font-display: "Playfair Display", serif;
    --font-body: "DM Sans", sans-serif;
}

/* =============================================
   HOW IT WORKS - V3 (LIGHT + HOVER REVEAL)
============================================= */
.how-it-works {
    background: linear-gradient(
        180deg,
        var(--ivory) 0%,
        var(--pearl) 50%,
        var(--ivory) 100%
    );
    padding: 100px 40px 80px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

/* Subtle Background Decoration */
.how-it-works::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 15% 30%,
            rgba(45, 149, 150, 0.06) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 85% 70%,
            rgba(212, 168, 83, 0.06) 0%,
            transparent 40%
        );
    pointer-events: none;
}

.how-it-works .section-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
.how-it-works .section-header {
    text-align: center;
    margin-bottom: 70px;
}

.how-it-works .header-line,
.how-it-works .section-header-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.how-it-works .header-line span,
.how-it-works .section-header-line .eyebrow-line-left {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--golden-sand));
    display: block;
}

.how-it-works .header-line span:last-child,
.how-it-works .section-header-line .eyebrow-line-right {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, var(--golden-sand), transparent);
    display: block;
}

.how-it-works .header-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--golden-sand);
}

.how-it-works .section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.how-it-works .section-title span {
    font-style: italic;
    color: var(--tropical-teal);
}

.how-it-works .section-subtitle {
    font-size: 1.1rem;
    color: var(--slate);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== TIMELINE ===== */
.how-it-works .timeline-wrapper {
    position: relative;
    margin: 60px 0 80px;
}

/* Horizontal Line */
.how-it-works .timeline-line {
    position: absolute;
    top: 70px;
    left: 8%;
    right: 8%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--tropical-teal) 0%,
        var(--golden-sand) 50%,
        var(--tropical-teal) 100%
    );
    border-radius: 2px;
    z-index: 0;
}

/* Steps Container */
.how-it-works .timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* Individual Step */
.how-it-works .timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 18%;
    text-align: center;
    cursor: pointer;
    position: relative;
}

/* Step Circle */
.how-it-works .step-circle {
    width: 140px;
    height: 140px;
    background: var(--ivory);
    border: 4px solid var(--tropical-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(45, 149, 150, 0.15);
}

.how-it-works .timeline-step:hover .step-circle {
    background: linear-gradient(
        135deg,
        var(--tropical-teal) 0%,
        var(--teal-light) 100%
    );
    border-color: transparent;
    transform: scale(1.12);
    box-shadow: 0 25px 60px rgba(45, 149, 150, 0.35);
}

/* Step Number Badge */
.how-it-works .step-number {
    position: absolute;
    top: -8px;
    right: 0px;
    width: 40px;
    height: 40px;
    background: linear-gradient(
        135deg,
        var(--golden-sand) 0%,
        var(--warm-gold) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--midnight);
    box-shadow: 0 6px 20px rgba(212, 168, 83, 0.5);
    transition: all 0.4s ease;
    border: 3px solid var(--ivory);
}

.how-it-works .timeline-step:hover .step-number {
    transform: scale(1.2) rotate(-15deg);
    box-shadow: 0 10px 30px rgba(212, 168, 83, 0.6);
}

/* Icon */
.how-it-works .step-icon svg {
    width: 52px;
    height: 52px;
    color: var(--tropical-teal);
    transition: all 0.4s ease;
}

.how-it-works .timeline-step:hover .step-icon svg {
    color: #fff;
    transform: scale(1.1);
}

/* Step Title (Always Visible) */
.how-it-works .step-title {
    margin-top: 24px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    transition: color 0.3s ease;
}

.how-it-works .timeline-step:hover .step-title {
    color: var(--tropical-teal);
}

/* ===== HOVER POPUP ===== */
.how-it-works .step-popup {
    position: absolute;
    bottom: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 280px;
    background: linear-gradient(
        135deg,
        var(--midnight) 0%,
        var(--deep-ocean) 100%
    );
    border-radius: 20px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(10, 22, 40, 0.3);
    z-index: 100;
}

/* Arrow pointer */
.how-it-works .step-popup::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--deep-ocean);
}

.how-it-works .timeline-step:hover .step-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.how-it-works .popup-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--golden-sand);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.how-it-works .popup-title span {
    width: 28px;
    height: 28px;
    background: var(--golden-sand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--midnight);
}

.how-it-works .popup-text {
    font-size: 0.95rem;
    color: rgba(250, 248, 245, 0.85);
    line-height: 1.7;
}

/* ===== QUOTE BANNER ===== */
.how-it-works .quote-banner {
    background: linear-gradient(
        135deg,
        var(--midnight) 0%,
        var(--deep-ocean) 100%
    );
    border-radius: 24px;
    padding: 50px 60px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.how-it-works .quote-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle,
        rgba(212, 168, 83, 0.1) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.how-it-works .quote-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(
        135deg,
        var(--golden-sand) 0%,
        var(--warm-gold) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.how-it-works .quote-icon svg {
    width: 36px;
    height: 36px;
    color: var(--midnight);
}

.how-it-works .quote-content {
    flex: 1;
}

.how-it-works .quote-text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-style: italic;
    color: var(--ivory);
    line-height: 1.7;
    margin-bottom: 16px;
}

.how-it-works .quote-text mark {
    background: transparent;
    color: var(--golden-sand);
}

.how-it-works .quote-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.how-it-works .author-line {
    width: 30px;
    height: 2px;
    background: var(--golden-sand);
}

.how-it-works .author-name {
    font-size: 0.85rem;
    color: rgba(250, 248, 245, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* CTA Button in Quote */
.how-it-works .quote-cta {
    flex-shrink: 0;
}

.how-it-works .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(
        135deg,
        var(--golden-sand) 0%,
        var(--warm-gold) 100%
    );
    color: var(--midnight);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 60px;
    transition: all 0.4s ease;
    box-shadow: 0 15px 40px rgba(212, 168, 83, 0.3);
}

.how-it-works .cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(212, 168, 83, 0.45);
}

.how-it-works .cta-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.how-it-works .cta-button:hover svg {
    transform: translateX(5px);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1100px) {
    .how-it-works .timeline-line {
        display: none;
    }

    .how-it-works .timeline-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 60px 40px;
    }

    .how-it-works .timeline-step {
        width: 30%;
    }

    .how-it-works .step-popup {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        opacity: 1;
        visibility: visible;
        width: 100%;
        margin-top: 16px;
        padding: 20px;
    }

    .how-it-works .step-popup::before {
        display: none;
    }

    .how-it-works .timeline-step:hover .step-popup {
        transform: none;
    }
}

@media (max-width: 900px) {
    .how-it-works .quote-banner {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }

    .how-it-works .quote-author {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .how-it-works {
        padding: 70px 24px;
    }

    .how-it-works .timeline-steps {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }

    .how-it-works .timeline-step {
        width: 100%;
        max-width: 300px;
    }

    .how-it-works .step-circle {
        width: 120px;
        height: 120px;
    }

    .how-it-works .step-icon svg {
        width: 44px;
        height: 44px;
    }

    .how-it-works .step-popup {
        background: var(--pearl);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    .how-it-works .popup-title {
        color: var(--tropical-teal);
    }

    .how-it-works .popup-title span {
        background: var(--tropical-teal);
        color: #fff;
    }

    .how-it-works .popup-text {
        color: var(--slate);
    }
}

@media (max-width: 500px) {
    .how-it-works .quote-banner {
        padding: 32px 24px;
    }

    .how-it-works .quote-icon {
        width: 60px;
        height: 60px;
    }

    .how-it-works .quote-icon svg {
        width: 28px;
        height: 28px;
    }

    .how-it-works .cta-button {
        padding: 16px 28px;
        font-size: 0.95rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .how-it-works *,
    .how-it-works *::before,
    .how-it-works *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
