/* ═══════════════════════════════════════════
   HOW IT WORKS — Page Styles
   Inherits base from style.css
   ═══════════════════════════════════════════ */

/* ─── Container with 1px border ─── */
.hero-card {
    border: 2px solid var(--card-border) !important;
    border-radius: 28px !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
}

/* ─── Container ─── */
.hiw-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 70px 40px 60px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── Header ─── */
.hiw-header {
    text-align: center;
    margin-top: 50px;
    position: relative;
}

.hiw-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.7rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 14px;
    position: relative;
    display: inline-block;
}

/* ─── "Super simple" annotation ─── */
.super-simple-tag {
    position: absolute;
    top: -28px;
    left: -60px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    pointer-events: none;
}

.super-simple-text {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 500;
    color: var(--accent-blue);
    transform: rotate(-19deg);
    white-space: nowrap;
}

.hiw-subtitle {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── Floating Image — Top Left ─── */
.float-img--hiw-top-left {
    width: clamp(80px, 20vw, 310px);
    top: 30px;
    left: -5px;
    transform: rotate(-12deg);
    transform-origin: top center;
}

.float-img--hiw-top-left:hover {
    transform: rotate(-6deg) scale(1.05);
}

.float-img--hiw-top-left.animate-in.visible {
    opacity: 1;
    transform: rotate(-1deg) scale(1);
}

/* ─── Steps Grid (3 steps + 2 arrows = 5 columns) ─── */
.hiw-steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: start;
    gap: 16px;
    width: 100%;
}

/* ─── Individual Step ─── */
.hiw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-badge {
    position: absolute;
    top: 55px;
    left: -10px;
    font-family: 'Caveat', cursive;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
    line-height: 1;
    z-index: 5;

    /* Gorgeous hand-drawn style circle badge */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid var(--text-dark, #1a1a2e);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ─── Step Image Wrapper ─── */
.step-img-wrapper {
    width: 110%;
    position: relative;
    margin-bottom: -50px;
}

.step-img {
    width: 100%;
    height: clamp(310px, 32vw, 440px);
    object-fit: contain;
    display: block;
    border-radius: 4px;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.08));
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
}

.step-img:hover {
    transform: scale(1.06) rotate(2deg);
}

/* Visually equalize image sizes since WebP assets have different internal whitespace ratios */
.hiw-steps .hiw-step:nth-child(1) .step-img {
    transform: scale(1.16);
}

.hiw-steps .hiw-step:nth-child(1) .step-img:hover {
    transform: scale(1.23) rotate(2deg);
}

.hiw-steps .hiw-step:nth-child(3) .step-img {
    transform: scale(1.08);
}

.hiw-steps .hiw-step:nth-child(3) .step-img:hover {
    transform: scale(1.15) rotate(2deg);
}

/* ─── Arrow Between Steps ─── */
.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    margin-top: clamp(130px, 15vw, 200px);
    color: #000000;
}

.step-arrow svg {
    width: 28px;
    height: 28px;
}

/* ─── Step Titles & Descriptions ─── */
.step-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 4px;
    margin-bottom: 4px;
    text-align: center;
}

.step-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-muted);
    text-align: center;
    font-weight: 400;
    max-width: 280px;
    margin-bottom: 30px;
}

/* ─── Go Back Button (liquid fill like Get Started) ─── */
.hiw-footer {
    display: flex;
    justify-content: center;
}

.btn-go-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: none;
    border: 2px solid var(--accent-blue);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: linear-gradient(var(--accent-blue) 0 0) no-repeat calc(200% - var(--p, 0%)) 100% / 200% var(--p, 0.2em);
    transition: 0.3s var(--t, 0s),
        background-position 0.3s calc(0.3s - var(--t, 0s));
    box-shadow: 0 4px 20px rgba(74, 125, 255, 0.3),
        0 1px 4px rgba(74, 125, 255, 0.1);
}

.btn-go-back:hover {
    --p: 100%;
    --t: 0.25s;
    color: #fff;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 36px rgba(74, 125, 255, 0.45),
        0 3px 10px rgba(74, 125, 255, 0.2),
        0 0 0 4px rgba(74, 125, 255, 0.1);
}

.btn-go-back:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 4px 16px rgba(74, 125, 255, 0.3);
}

.go-back-arrow {
    font-size: 1.1rem;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-block;
}

.btn-go-back:hover .go-back-arrow {
    transform: translateX(-4px);
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Prevent horizontal scroll */
.hiw-container {
    overflow-x: hidden;
}

/* ─── 1280px — Small laptops ─── */
@media (max-width: 1280px) {
    .hiw-container {
        padding: 70px 32px 60px;
    }

    .float-img--hiw-top-left {
        width: clamp(80px, 16vw, 240px);
        top: 20px;
        left: 0;
    }
}

/* ─── 1024px — Tablet landscape ─── */
@media (max-width: 1024px) {
    .hiw-container {
        padding: 80px 24px 50px;
    }

    .hiw-title {
        font-size: 2.8rem;
    }

    .hiw-subtitle {
        font-size: 0.95rem;
    }

    .hiw-steps {
        gap: 10px;
    }

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

    .step-desc {
        font-size: 0.82rem;
        max-width: 240px;
    }

    .step-arrow svg {
        width: 22px;
        height: 22px;
    }

    .float-img--hiw-top-left {
        width: clamp(80px, 14vw, 180px);
        top: 15px;
        left: 5px;
    }

    .super-simple-tag {
        top: -26px;
        left: -40px;
    }

    .super-simple-text {
        font-size: 1.5rem;
    }
}

/* ─── 768px — Tablet portrait ─── */
@media (max-width: 768px) {
    .hiw-container {
        padding: 80px 20px 40px;
    }

    .hiw-title {
        font-size: 2.2rem;
    }

    .hiw-subtitle {
        font-size: 0.95rem;
    }

    /* Stack into single column */
    .hiw-steps {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 400px;
    }

    /* Hide arrows */
    .step-arrow {
        display: none;
    }

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

    .step-desc {
        font-size: 0.88rem;
        max-width: 300px;
    }

    /* Scale down floating image, don't hide it */
    .float-img--hiw-top-left {
        width: 100px;
        top: 10px;
        left: 5px;
        display: block;
    }

    .super-simple-tag {
        top: -24px;
        left: -20px;
    }

    .super-simple-text {
        font-size: 1.2rem;
    }

    /* Go back button touch target */
    .btn-go-back {
        min-height: 44px;
        padding: 14px 30px;
    }
}

/* ─── 480px — Phone ─── */
@media (max-width: 480px) {
    .hiw-container {
        padding: 70px 1.25rem 30px;
    }

    .hiw-header {
        margin-top: 30px;
    }

    .hiw-title {
        font-size: 1.7rem;
    }

    .hiw-subtitle {
        font-size: 0.88rem;
    }

    .hiw-steps {
        max-width: 300px;
        gap: 32px;
    }

    .step-badge {
        width: 42px;
        height: 42px;
        font-size: 2rem;
        top: 45px;
        left: -6px;
    }

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

    .step-desc {
        font-size: 0.82rem;
        max-width: 260px;
        margin-bottom: 16px;
    }

    /* Floating image: very small accent */
    .float-img--hiw-top-left {
        width: 180px;
        height: 180px;
        top: 1px;
        left: -30px;
    }

    .super-simple-tag {
        top: -22px;
        left: -10px;
    }

    .super-simple-text {
        font-size: 1rem;
    }

    .btn-go-back {
        min-height: 44px;
        font-size: 0.88rem;
        padding: 12px 26px;
    }
}