/* ==========================================================================
   Home page
   ========================================================================== */

.hm-page {
    --hm-blue: #2563eb;
    --hm-blue-soft: #eff6ff;
    --hm-ink: #0f172a;
    --hm-muted: #64748b;
    --hm-border: #e5e7eb;
    --hm-radius: 14px;
    --hm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    color: var(--hm-ink);
}

.hm-page a {
    color: inherit;
}

/* --- Hero ----------------------------------------------------------------- */
.hm-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    background: #0f172a;
    margin-bottom: 1.5rem;
}

.hm-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 50%;
}

.hm-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.88) 0%,
        rgba(15, 23, 42, 0.72) 40%,
        rgba(15, 23, 42, 0.15) 75%,
        rgba(15, 23, 42, 0) 100%
    );
}

.hm-hero__body {
    position: relative;
    max-width: 560px;
    padding: 2.25rem 2rem;
    color: #fff;
}

.hm-hero__title {
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.hm-hero__lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
    max-width: 44ch;
}

.hm-hero__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hm-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.hm-feature strong {
    display: block;
    font-size: 0.85rem;
    color: #fff;
}

.hm-feature__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
}

.hm-feature__icon--blue { background: var(--hm-blue); }
.hm-feature__icon--green { background: #16a34a; }
.hm-feature__icon--amber { background: #f59e0b; }

.hm-hero__cta {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
}

/* --- Mobile feature strip (hidden on sm and up via .d-sm-none) ------------ */
.hm-features-mobile {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.hm-feature-m {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    padding: 0.75rem 0.4rem;
    background: #fff;
    border: 1px solid var(--hm-border);
    border-radius: 12px;
    box-shadow: var(--hm-shadow);
    font-size: 0.68rem;
    color: var(--hm-muted);
    line-height: 1.25;
}

.hm-feature-m strong {
    font-size: 0.78rem;
    color: var(--hm-ink);
    margin-top: 0.3rem;
}

.hm-feature-m .hm-feature__icon {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1rem;
}

/* --- Sections ------------------------------------------------------------- */
.hm-section {
    margin-bottom: 1.75rem;
}

.hm-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.hm-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.9rem;
}

.hm-section__head .hm-section__title {
    margin-bottom: 0;
}

.hm-section__more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hm-blue) !important;
    white-space: nowrap;
}

/* --- Quick links ---------------------------------------------------------- */
.hm-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.hm-quick__card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hm-quick__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.hm-quick__img {
    display: none;
}

.hm-quick__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    background: var(--hm-blue-soft);
    color: var(--hm-blue);
    font-size: 1.2rem;
}

.hm-quick__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 0.75rem;
    color: var(--hm-muted);
    line-height: 1.3;
}

.hm-quick__text strong {
    font-size: 0.88rem;
    color: var(--hm-ink);
}

.hm-quick__chev {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.75rem;
}

/* --- Example houses ------------------------------------------------------- */
.hm-examples {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.hm-example {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hm-example:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.hm-example__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hm-example__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
}

.hm-example__text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: var(--hm-muted);
}

.hm-example__text strong {
    font-size: 0.88rem;
    color: var(--hm-ink);
}

.hm-example__chev {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* --- Steps ---------------------------------------------------------------- */
.hm-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.hm-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--hm-muted);
    line-height: 1.35;
}

.hm-step strong {
    display: block;
    font-size: 0.9rem;
    color: var(--hm-ink);
    margin-bottom: 0.15rem;
}

.hm-step__num {
    position: absolute;
    top: -0.35rem;
    left: -0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 1;
}

.hm-step__num--blue { background: var(--hm-blue); }
.hm-step__num--green { background: #16a34a; }
.hm-step__num--amber { background: #f59e0b; }
.hm-step__num--purple { background: #7c3aed; }

.hm-step__icon {
    flex-shrink: 0;
    font-size: 1.6rem;
    width: 2.2rem;
    text-align: center;
    margin-top: 0.1rem;
}

.hm-step__icon--blue { color: var(--hm-blue); }
.hm-step__icon--green { color: #16a34a; }
.hm-step__icon--amber { color: #f59e0b; }
.hm-step__icon--purple { color: #7c3aed; }

/* Arrow between steps on wide screens */
.hm-step:not(:last-child)::after {
    content: "\2192";
    position: absolute;
    right: -0.95rem;
    top: 0.6rem;
    color: #94a3b8;
    font-size: 1.1rem;
}

/* --- Tip banner ----------------------------------------------------------- */
.hm-tip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--hm-blue-soft);
    border: 1px solid #dbeafe;
    border-radius: var(--hm-radius);
    margin-bottom: 1.5rem;
}

.hm-tip__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    font-size: 1.1rem;
}

.hm-tip__text {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--hm-muted);
}

.hm-tip__text strong {
    font-size: 0.92rem;
    color: var(--hm-ink);
}

.hm-tip__btn {
    margin-left: auto;
    white-space: nowrap;
    border-radius: 10px;
    font-weight: 600;
}

/* --- Tablets -------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .hm-quick,
    .hm-examples,
    .hm-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-step:not(:last-child)::after {
        display: none;
    }
}

/* --- Phones --------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .hm-hero {
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .hm-hero__img {
        position: relative;
        height: 190px;
        object-position: 60% 50%;
    }

    .hm-hero__overlay {
        background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0) 0%,
            rgba(15, 23, 42, 0) 25%,
            rgba(15, 23, 42, 0.92) 42%,
            rgba(15, 23, 42, 1) 100%
        );
    }

    .hm-hero__body {
        padding: 1.25rem 1.1rem 1.4rem;
        max-width: none;
        margin-top: -3.25rem;
    }

    .hm-hero__title {
        font-size: 1.6rem;
    }

    .hm-hero__lead {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    /* On phones the three features move out of the hero (.hm-features-mobile). */
    .hm-hero__features {
        display: none;
    }

    .hm-hero__cta {
        width: 100%;
    }

    .hm-quick {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .hm-quick__card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0;
        overflow: hidden;
    }

    .hm-quick__img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        object-fit: cover;
    }

    .hm-quick__icon {
        display: none;
    }

    .hm-quick__text {
        padding: 0 0.75rem 0.75rem;
    }

    .hm-quick__chev {
        display: none;
    }

    .hm-examples {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .hm-example {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .hm-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hm-tip {
        flex-wrap: wrap;
    }

    .hm-tip__btn {
        margin-left: 0;
        width: 100%;
    }
}
