/* POLY — Specialist services (dark) --------------------------------------- */

.poly-specialists {
    background:
        radial-gradient(120% 90% at 88% 0%, rgba(57, 67, 155, .42) 0%, rgba(11, 17, 48, 0) 62%),
        var(--poly-ink);
}

.poly-specialists__head {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(24px, 4vw, 72px);
    align-items: end;
    margin-bottom: clamp(44px, 5vw, 76px);
}

.poly-specialists__title { max-width: 17ch; }

.poly-specialists__intro {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, .66);
}

/* ----------------------------------------------------------------- cards */

.poly-specialists__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .1);
}

.poly-spec-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 258px;
    padding: clamp(26px, 2.2vw, 34px);
    background: var(--poly-ink);
    isolation: isolate;
    overflow: hidden;
}

.poly-spec-card__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity .6s var(--poly-ease), transform 1.2s var(--poly-ease-out);
}

.poly .poly-spec-card__bg img { width: 100%; height: 100%; object-fit: cover; }

.poly-spec-card__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 17, 48, .74) 0%, rgba(11, 17, 48, .92) 100%);
}

.poly-spec-card:hover .poly-spec-card__bg,
.poly-spec-card:focus-within .poly-spec-card__bg {
    opacity: 1;
    transform: none;
}

.poly-spec-card__no {
    position: absolute;
    top: clamp(22px, 2vw, 30px);
    right: clamp(22px, 2vw, 30px);
    font-family: var(--poly-font-display);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .40);
    transition: color .45s var(--poly-ease);
}

.poly-spec-card:hover .poly-spec-card__no { color: var(--poly-accent-200); }

.poly-spec-card__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: auto;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--poly-radius);
    color: var(--poly-accent-200);
    transition: background-color .45s var(--poly-ease), color .45s var(--poly-ease), border-color .45s var(--poly-ease);
}

.poly-spec-card__icon .poly-icon { width: 22px; height: 22px; }

.poly-spec-card:hover .poly-spec-card__icon {
    background: var(--poly-accent-200);
    border-color: var(--poly-accent-200);
    color: var(--poly-ink);
}

.poly-spec-card__title {
    margin-top: 2.25rem;
    font-size: clamp(1.15rem, 1.5vw, 1.375rem);
    letter-spacing: -.02em;
    color: var(--poly-white);
}

.poly-spec-card__text {
    margin-top: .65rem;
    font-size: .875rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .6);
}

/* --------------------------------------------------------------- cta tile */

.poly-spec-card--cta {
    background: var(--poly-brand);
    justify-content: flex-end;
}

.poly-spec-card--cta .poly-spec-card__title { margin-top: 0; }
.poly-spec-card--cta .poly-spec-card__text { color: rgba(255, 255, 255, .78); }

.poly-spec-card__link {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    margin-top: 1.5rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--poly-white);
    text-decoration: none;
}

.poly-spec-card__link::after { content: ""; position: absolute; inset: 0; }

.poly-spec-card__link .poly-icon {
    width: 16px;
    height: 16px;
    transition: transform .4s var(--poly-ease-out);
}

.poly-spec-card--cta:hover .poly-spec-card__link .poly-icon { transform: translateX(5px); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1200px) {
    .poly-specialists__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .poly-specialists__head { grid-template-columns: 1fr; align-items: start; }
    .poly-specialists__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .poly-spec-card { min-height: 226px; }
}

@media (max-width: 560px) {
    .poly-specialists__grid { grid-template-columns: 1fr; }
    .poly-spec-card { min-height: 0; }
    .poly-spec-card__title { margin-top: 1.5rem; }
}

/* ------------------------------------------------------- linked cards */

/* The title link stretches over the card so the whole tile is clickable,
   while the accessible name stays the service title. */
.poly-spec-card__stretch {
    color: inherit;
    text-decoration: none;
}

.poly-spec-card__stretch::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.poly-spec-card:has(.poly-spec-card__stretch) { cursor: pointer; }

.poly .poly-spec-card__stretch:focus-visible { outline: none; }

.poly-spec-card:has(.poly-spec-card__stretch:focus-visible) {
    outline: 2px solid var(--poly-accent-200);
    outline-offset: -4px;
}
