/* Hero mesh — live service-category grid on the homepage */

.hero__decor--nodes {
    z-index: 2;
    overflow: visible;
}

.hero-mesh {
    position: relative;
    width: 100%;
    max-width: 980px;
    aspect-ratio: 866 / 770;
}

.hero-mesh__canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-mesh__node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: clamp(44px, 6.47%, 64px);
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
    pointer-events: auto;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.hero-mesh__dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-green);
    transition:
        background-color 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease,
        opacity 0.22s ease;
}

.hero-mesh__dot svg,
.hero-mesh__icon {
    width: 42%;
    height: 42%;
}

.hero-mesh__dot svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-mesh__icon {
    display: block;
    object-fit: contain;
}

.hero-mesh__label {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translate(-50%, 4px);
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--color-white);
    box-shadow: 0 6px 18px rgba(23, 23, 23, 0.1);
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--color-heading);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.hero-mesh__node:hover .hero-mesh__dot,
.hero-mesh__node:focus-visible .hero-mesh__dot,
.hero-mesh__node.is-active .hero-mesh__dot {
    background: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-white);
    transform: scale(1.08);
    box-shadow: 0 12px 26px rgba(80, 189, 78, 0.28);
}

.hero-mesh__node:hover .hero-mesh__label,
.hero-mesh__node:focus-visible .hero-mesh__label,
.hero-mesh__node.is-active .hero-mesh__label {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hero-mesh__node:focus {
    outline: none;
}

.hero-mesh__node:focus-visible .hero-mesh__dot {
    outline: 2px solid var(--color-green);
    outline-offset: 4px;
}

.is-mesh-hovering .hero-mesh__node:not(:hover):not(.is-active) .hero-mesh__dot {
    opacity: 0.5;
}

.is-mesh-ready .hero-mesh__node {
    animation: hero-mesh-node-in 0.5s ease-out backwards;
    animation-delay: calc(0.45s + var(--i, 0) * 0.09s);
}

@keyframes hero-mesh-node-in {
    from {
        opacity: 0;
        transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px) + 10px)) scale(0.86);
    }

    to {
        opacity: 1;
        transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1);
    }
}

@media (max-width: 1280px) {
    .hero-mesh__label {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .is-mesh-ready .hero-mesh__node {
        animation: none;
    }

    .hero-mesh__dot {
        transition-duration: 0.01ms;
    }
}
