/* ==========================================
   HOW WE WORK — V2
   Virtual Element Studios
   Responsive Layout + Hover + Scroll Reveal
========================================== */

/* 1. MAIN SECTION */
.hww {
    --hww-red: #E31E24;
    --hww-red-soft: rgba(227, 30, 36, 0.5);
    --hww-text: #4D4D4D;
    --hww-num: rgba(0, 0, 0, 0.25);
    --hww-ease: cubic-bezier(.22, .61, .36, 1);

    width: 100%;
    box-sizing: border-box;
    padding: 80px 24px;

    font-family: "Basier Circle", "Inter", "Helvetica Neue", Arial, sans-serif;
    color: #000;
    background: transparent;

    overflow: hidden;
}

.hww *,
.hww *::before,
.hww *::after {
    box-sizing: border-box;
}


/* 2. INNER LAYOUT */
.hww__inner {
    width: 100%;
    max-width: 1430px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: 40px;
}


/* 3. SECTION HEADING */
.hww__eyebrow {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 20px;
    font-weight: 400;
    color: #000;
}

.hww__title {
    margin: 0;
    font-size: 50px;
    line-height: 50px;
    font-weight: 600;
    color: #000;
}

.hww__title span {
    color: var(--hww-red);
}


/* 4. PROCESS GRID */
.hww__steps {
    list-style: none;
    margin: 0;
    padding: 0;

    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
}

.hww__step {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;
    padding: 0 8px;
    text-align: center;

    opacity: 1;
    transform: none;

    transition:
        opacity 0.8s var(--hww-ease),
        transform 0.8s var(--hww-ease);
}


/* 5. STEP LINKS — USED ONLY FOR STEPS 03–06 */
.hww__step-link {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    height: 100%;

    color: inherit;
    text-decoration: none;
    text-align: center;

    cursor: pointer;
}

.hww__step-link:hover,
.hww__step-link:active,
.hww__step-link:visited {
    color: inherit;
    text-decoration: none;
}

.hww__step-link:focus-visible {
    outline: 2px solid var(--hww-red);
    outline-offset: 5px;
    border-radius: 8px;
}


/* 6. STEP NUMBERS */
.hww__num {
    display: block;

    margin-bottom: 20px;

    font-size: 35px;
    line-height: 35px;
    font-weight: 400;

    color: var(--hww-num);

    transition: color 0.4s ease;
}


/* 7. CIRCLE WRAPPER */
.hww__circle-wrap {
    position: relative;

    display: flex;
    justify-content: center;

    width: 100%;
    margin-bottom: 20px;
}


/* 8. ICON CIRCLE */
.hww__circle {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 108px;
    width: 108px;
    height: 108px;

    border: 1px solid var(--hww-red-soft);
    border-radius: 50%;

    background: transparent;

    transition:
        transform 0.5s var(--hww-ease),
        background-color 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.5s var(--hww-ease);
}


/* 9. ICON IMAGE */
.hww__circle img {
    display: block;

    width: 56px;
    height: 56px;

    object-fit: contain;

    transition: transform 0.6s var(--hww-ease);
}


/* 10. HOVER EFFECT */
.hww__step:hover .hww__circle {
    transform: translateY(-6px);

    border-color: var(--hww-red);

    box-shadow: 0 14px 30px rgba(227, 30, 36, 0.15);
}

.hww__step:hover .hww__circle img {
    transform: scale(1.08) rotate(-3deg);
}

.hww__step:hover .hww__num {
    color: var(--hww-red);
}


/* 11. DASHED CONNECTOR */
.hww__step:not(:last-child) .hww__circle-wrap::after {
    content: "";

    position: absolute;
    top: 50%;
    left: calc(51% + 55px);

    width: calc(100% - 95px);
    height: 1px;

    background: repeating-linear-gradient(
        90deg,
        var(--hww-red-soft) 0 5px,
        transparent 5px 9px
    );

    clip-path: inset(0 0 0 0);

    transition: clip-path 0.7s var(--hww-ease);
}

/* Hide connectors only when animation is enabled */
.hww.hww--reveal-ready
.hww__step:not(:last-child)
.hww__circle-wrap::after {
    clip-path: inset(0 100% 0 0);
}


/* 12. STEP TITLES */
.hww__name {
    margin: 0 0 16px;

    font-size: 20px;
    line-height: 20px;
    font-weight: 500;

    color: #000;
}


/* 13. STEP DESCRIPTION */
.hww__desc {
    max-width: 190px;
    margin: 0;

    font-size: 16px;
    line-height: 20.8px;
    font-weight: 400;

    color: var(--hww-text);
}


/* 14. SCROLL REVEAL
   Content remains visible if JavaScript is unavailable.
*/
.hww__eyebrow,
.hww__title {
    opacity: 1;
    transform: none;

    transition:
        opacity 0.8s var(--hww-ease),
        transform 0.8s var(--hww-ease);
}

/* Initial hidden state when the reveal script is active */
.hww.hww--reveal-ready .hww__eyebrow,
.hww.hww--reveal-ready .hww__title,
.hww.hww--reveal-ready .hww__step {
    opacity: 0;
    transform: translateY(28px);
}

/* Correct visible-state selectors */
.hww.is-visible .hww__eyebrow,
.hww.is-visible .hww__title,
.hww.is-visible .hww__step {
    opacity: 1;
    transform: none;
}


/* 15. ANIMATION DELAYS */
.hww.is-visible .hww__title {
    transition-delay: 0.1s;
}

.hww.is-visible .hww__step:nth-child(1) {
    transition-delay: 0.25s;
}

.hww.is-visible .hww__step:nth-child(2) {
    transition-delay: 0.40s;
}

.hww.is-visible .hww__step:nth-child(3) {
    transition-delay: 0.55s;
}

.hww.is-visible .hww__step:nth-child(4) {
    transition-delay: 0.70s;
}

.hww.is-visible .hww__step:nth-child(5) {
    transition-delay: 0.85s;
}

.hww.is-visible .hww__step:nth-child(6) {
    transition-delay: 1s;
}


/* 16. CONNECTOR ANIMATION */
.hww.is-visible
.hww__step:not(:last-child)
.hww__circle-wrap::after {
    clip-path: inset(0 0 0 0);
}

.hww.is-visible .hww__step:nth-child(1)
.hww__circle-wrap::after {
    transition-delay: 0.55s;
}

.hww.is-visible .hww__step:nth-child(2)
.hww__circle-wrap::after {
    transition-delay: 0.70s;
}

.hww.is-visible .hww__step:nth-child(3)
.hww__circle-wrap::after {
    transition-delay: 0.85s;
}

.hww.is-visible .hww__step:nth-child(4)
.hww__circle-wrap::after {
    transition-delay: 1s;
}

.hww.is-visible .hww__step:nth-child(5)
.hww__circle-wrap::after {
    transition-delay: 1.15s;
}


/* 17. TABLET RESPONSIVE */
@media (max-width: 1200px) {

    .hww__inner {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hww__heading {
        text-align: center;
    }

    .hww__steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 50px;
    }

    .hww__step .hww__circle-wrap::after {
        display: none;
    }
}


/* 18. MOBILE RESPONSIVE */
@media (max-width: 640px) {

    .hww {
        padding: 25px 0;
    }

    .hww__inner {
        gap: 35px;
    }

    .hww__title {
        font-size: 40px;
        line-height: 40px;
    }

    .hww__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 0;
        row-gap: 40px;
    }

    .hww__step {
        padding: 0 8px;
    }

    .hww__num {
        font-size: 30px;
        line-height: 32px;
    }

    .hww__circle {
        flex-basis: 90px;
        width: 90px;
        height: 90px;
    }

    .hww__circle img {
        width: 48px;
        height: 48px;
    }

    .hww__name {
        font-size: 18px;
        line-height: 23px;
        margin-bottom: 10px;
    }

    .hww__desc {
        font-size: 14px;
        line-height: 20px;
    }
}


/* 19. SMALL MOBILE */
@media (max-width: 400px) {

    .hww__steps {
        grid-template-columns: 1fr;
        row-gap: 35px;
    }

    .hww__step-link {
        max-width: 280px;
    }

    .hww__desc {
        max-width: 220px;
    }
}


/* 20. REDUCED MOTION ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {

    .hww *,
    .hww *::before,
    .hww *::after {
        transition: none !important;
        animation: none !important;
    }

    .hww.hww--reveal-ready .hww__eyebrow,
    .hww.hww--reveal-ready .hww__title,
    .hww.hww--reveal-ready .hww__step {
        opacity: 1;
        transform: none;
    }

    .hww__step:hover .hww__circle,
    .hww__step:hover .hww__circle img {
        transform: none !important;
    }

    .hww__step:not(:last-child)
    .hww__circle-wrap::after {
        clip-path: none !important;
    }
}
