/* Homepage online tools — brand: #e31c79 / #702082 */
.home-tools {
    --ht-pink: #e31c79;
    --ht-purple: #702082;
    --ht-deep: #4a1560;
    --ht-ink: #1c1028;
    --ht-muted: rgba(28, 16, 40, 0.68);
    --ht-line: rgba(112, 32, 130, 0.12);
    position: relative;
    isolation: isolate;
    margin: 8px 0 12px;
    padding: 48px 0 56px;
    overflow: hidden;
}

.home-tools__atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(70% 55% at 8% 20%, rgba(227, 28, 121, 0.07), transparent 55%),
        radial-gradient(60% 50% at 92% 70%, rgba(112, 32, 130, 0.08), transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #faf5f9 100%);
}

.home-tools__head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 32px;
}

.home-tools__eyebrow {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(227, 28, 121, 0.2);
    background: rgba(227, 28, 121, 0.08);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ht-pink);
}

.home-tools__title {
    margin: 0 0 10px;
    font-family: Saira, Quicksand, sans-serif;
    font-size: clamp(1.65rem, 3.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ht-deep);
}

.home-tools__lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ht-muted);
}

.home-tools__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.ht-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--ht-line);
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 10px 28px rgba(42, 16, 56, 0.06);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    animation: ht-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--ht-i, 0) * 80ms);
}

.ht-card:hover {
    transform: translateY(-6px);
    border-color: rgba(227, 28, 121, 0.28);
    box-shadow: 0 22px 44px rgba(112, 32, 130, 0.14);
}

.ht-card__visual {
    position: relative;
    display: block;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 50%),
        linear-gradient(160deg, #f3e8f4 0%, #fde8f2 55%, #efe4f6 100%);
}

.ht-card__visual::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.92) 88%);
    pointer-events: none;
    z-index: 1;
}

.ht-card__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 8%;
    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.ht-card:hover .ht-card__visual img {
    transform: scale(1.04);
}

.ht-card__step {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(112, 32, 130, 0.12);
    font-family: Saira, Quicksand, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ht-purple);
    box-shadow: 0 6px 16px rgba(42, 16, 56, 0.08);
}

.ht-card__body {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    margin-top: 0px;
    padding: 18px 18px 20px;
}

.ht-card__title {
    display: block;
    font-family: Saira, Quicksand, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ht-ink);
}

.ht-card__desc {
    display: block;
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ht-muted);
}

.ht-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ht-pink);
    transition: gap 0.25s ease, color 0.25s ease;
}

.ht-card__cta svg {
    transition: transform 0.25s ease;
}

.ht-card:hover .ht-card__cta {
    color: var(--ht-purple);
    gap: 12px;
}

.ht-card:hover .ht-card__cta svg {
    transform: translateX(3px);
}

.ht-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ht-pink), var(--ht-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ht-card:hover::before {
    transform: scaleX(1);
}

@keyframes ht-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 991.98px) {
    .home-tools__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .home-tools {
        padding: 36px 0 44px;
    }

    .home-tools__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ht-card__visual {
        aspect-ratio: 16 / 10;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ht-card,
    .ht-card__visual img,
    .ht-card__cta,
    .ht-card__cta svg,
    .ht-card::before {
        animation: none !important;
        transition: none !important;
    }
}
