/* Bento-сетка «Решения» - 5 направлений квиза + CTA */

.solutions-bento__grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) and (max-width: 1023px) {
    .solutions-bento__grid {
        gap: 0.875rem;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-rows: minmax(5.5rem, auto);
    }

    .bento-card--crm {
        grid-column: 1 / 4;
        grid-row: 1 / 3;
    }

    .bento-card--infra {
        grid-column: 4 / 7;
        grid-row: 1 / 2;
    }

    .bento-card--web {
        grid-column: 4 / 6;
        grid-row: 2 / 4;
    }

    .bento-card--int {
        grid-column: 6 / 7;
        grid-row: 2 / 3;
    }

    .bento-card--prod {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

    .bento-card--feature {
        grid-column: 3 / 7;
        grid-row: 3 / 5;
    }
}

/* Десктоп: CTA сверху на всю ширину, ниже - без пустых ячеек */
@media (min-width: 1024px) {
    .solutions-bento__grid {
        gap: 0.75rem;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-auto-rows: minmax(5.25rem, auto);
    }

    .bento-card--feature {
        grid-column: 1 / -1;
        grid-row: 1 / 2; /* верхняя широкая CTA */
    }

    .bento-card--crm {
        grid-column: 1 / 5; /* 1/3 ширины */
        grid-row: 2 / 3; /* одна строка: ниже будет ровнее */
    }

    .bento-card--infra {
        grid-column: 5 / 9;
        grid-row: 2 / 3;
    }

    .bento-card--web {
        grid-column: 9 / 13;
        grid-row: 2 / 3;
    }

    .bento-card--int {
        grid-column: 1 / 7;
        grid-row: 3 / 4;
    }

    .bento-card--prod {
        grid-column: 7 / 13;
        grid-row: 3 / 4;
    }
}

.bento-card {
    min-height: 10.5rem;
}

@media (min-width: 1024px) {
    .bento-card {
        min-height: 0;
    }

    .bento-card--crm {
        min-height: 10.75rem;
    }

    .bento-card--infra {
        min-height: 10.25rem;
    }

    .bento-card--web {
        min-height: 10.25rem;
    }

    .bento-card--int {
        min-height: 10.25rem;
    }

    .bento-card--prod {
        min-height: 10.25rem;
    }

    .bento-card--feature {
        min-height: 10.5rem;
    }
}

.bento-card__hit {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.bento-card__hit:focus-visible {
    outline: 2px solid rgb(24 24 27);
    outline-offset: 3px;
    border-radius: 1.35rem;
}

.dark .bento-card__hit:focus-visible {
    outline-color: rgb(250 250 250);
}

.bento-card__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: inherit;
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 1.25rem;
    border: 1px solid rgb(228 228 231);
    background: #f4f4f5;
    color: inherit;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .bento-card__inner {
    background: #18181b;
    border-color: rgb(63 63 70);
}

.bento-card__hit:hover .bento-card__inner,
.bento-card__hit:focus-visible .bento-card__inner {
    background: #ececee;
    border-color: rgb(161 161 170);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.dark .bento-card__hit:hover .bento-card__inner,
.dark .bento-card__hit:focus-visible .bento-card__inner {
    background: #27272a;
    border-color: rgb(82 82 91);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.bento-card--feature .bento-card__inner {
    background: #09090b;
    color: #fafafa;
    border: 1px solid rgb(39 39 42);
}

.bento-card--feature .bento-card__inner:hover {
    background: #141416;
    border-color: rgb(63 63 70);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.bento-card__num {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgb(161 161 170);
    z-index: 2;
}

.bento-card__num--light {
    color: rgb(113 113 122);
}

.bento-card__arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: rgb(113 113 122);
    transition: color 0.2s ease, transform 0.2s ease;
}

.bento-card__hit:hover .bento-card__arrow {
    color: rgb(24 24 27);
    /* Иконка стрелки из SVG по умолчанию под 45°; докручиваем до горизонтали */
    transform: translate(2px, -2px) rotate(45deg);
}

.dark .bento-card__hit:hover .bento-card__arrow {
    color: rgb(250 250 250);
}

.bento-card__arrow--light,
.bento-card--feature .bento-card__arrow {
    color: rgb(113 113 122);
}

.bento-card--feature .bento-card__inner:hover .bento-card__arrow {
    color: #fff;
}

.bento-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.65rem;
    padding: 1.25rem 2.5rem 0 0;
}

.bento-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 9999px;
    border: 1px solid rgb(212 212 216);
    color: rgb(82 82 91);
    background: rgba(255, 255, 255, 0.6);
}

.bento-pill--area {
    font-weight: 600;
    border-color: rgb(24 24 27);
    color: rgb(24 24 27);
    background: #fff;
}

.bento-pill--feature {
    border-color: rgb(63 63 70);
    color: rgb(212 212 216);
    background: rgba(255, 255, 255, 0.06);
}

.dark .bento-pill {
    border-color: rgb(82 82 91);
    color: rgb(212 212 216);
    background: rgba(9, 9, 11, 0.5);
}

.dark .bento-pill--area {
    border-color: rgb(161 161 170);
    color: rgb(250 250 250);
    background: rgba(39, 39, 42, 0.8);
}

.bento-card__title {
    position: relative;
    z-index: 1;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgb(24 24 27);
    padding-right: 1rem;
}

.dark .bento-card__title {
    color: rgb(250 250 250);
}

.bento-card__title--feature {
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    max-width: 26rem;
    color: #fff;
}

@media (min-width: 1024px) {
    .bento-card--feature .bento-card__title--feature {
        max-width: 34rem;
    }
}

.bento-card__text {
    position: relative;
    z-index: 1;
    margin-top: 0.45rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgb(113 113 122);
    max-width: 18rem;
}

.dark .bento-card__text {
    color: rgb(161 161 170);
}

.bento-card__text--feature {
    max-width: 34rem;
    font-size: 0.875rem;
    color: rgb(161 161 170);
}

.bento-card__list {
    position: relative;
    z-index: 1;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgb(113 113 122);
}

.bento-card__list li {
    position: relative;
    padding-left: 0.875rem;
}

.bento-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgb(161 161 170);
}

.dark .bento-card__list {
    color: rgb(161 161 170);
}

.bento-card__quiz-link {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(82 82 91);
}

.bento-card__hit:hover .bento-card__quiz-link {
    color: rgb(24 24 27);
}

.dark .bento-card__quiz-link {
    color: rgb(161 161 170);
}

.dark .bento-card__hit:hover .bento-card__quiz-link {
    color: rgb(250 250 250);
}

.bento-highlight {
    display: inline;
    padding: 0.1em 0.45em;
    border-radius: 0.375rem;
    background: #fff;
    color: #09090b;
    font-weight: 500;
}

.bento-card__cta {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    margin-top: 0.875rem;
    padding: 0.55rem 1.125rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.375rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.bento-card__cta:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
}

.bento-card__visual {
    position: absolute;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.95;
}

.bento-card--crm .bento-card__visual {
    width: 46%;
    max-width: 13rem;
    height: 52%;
    max-height: 9rem;
}

.bento-card--infra .bento-card__visual {
    width: 38%;
    max-width: 8rem;
    height: 70%;
    max-height: 5.5rem;
}

.bento-card--web .bento-card__visual {
    width: 88%;
    max-width: none;
    height: 38%;
    max-height: 5rem;
    right: -4%;
    opacity: 0.85;
}

.bento-card--int .bento-card__visual {
    display: none;
}

.bento-card--prod .bento-card__visual {
    width: 50%;
    max-width: 7rem;
    height: 55%;
    max-height: 6rem;
}

@media (min-width: 1024px) {
    .bento-card--crm .bento-card__inner {
        border-radius: 1.35rem 1rem 1.25rem 1.5rem;
    }

    .bento-card--web .bento-card__inner {
        border-radius: 1rem 1.35rem 1.5rem 0.85rem;
    }

    .bento-card--int .bento-card__inner {
        padding: 1rem;
    }

    .bento-card--int .bento-card__list {
        display: none;
    }

    .bento-card--int .bento-card__tags {
        margin-bottom: 0.35rem;
    }

    .bento-card--infra .bento-card__text {
        max-width: 14rem;
    }

    .bento-card--web .bento-card__title {
        font-size: 1rem;
        max-width: 6.5rem;
    }

    .bento-card--web .bento-card__list {
        display: none;
    }
}

.bento-card--feature .bento-card__visual {
    width: 50%;
    max-width: 15rem;
    height: 55%;
    max-height: 12rem;
}

.bento-card__visual--crm {
    background:
        linear-gradient(rgba(24, 24, 27, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 24, 27, 0.06) 1px, transparent 1px);
    background-size: 14px 14px;
    mask-image: radial-gradient(ellipse 85% 85% at 72% 78%, #000 15%, transparent 68%);
}

.bento-card__visual--infra {
    background-image:
        linear-gradient(30deg, rgba(24, 24, 27, 0.12) 12%, transparent 12.5%, transparent 87%, rgba(24, 24, 27, 0.12) 87.5%),
        linear-gradient(150deg, rgba(24, 24, 27, 0.12) 12%, transparent 12.5%, transparent 87%, rgba(24, 24, 27, 0.12) 87.5%);
    background-size: 14px 24px;
    mask-image: radial-gradient(ellipse 80% 80% at 75% 80%, #000 15%, transparent 70%);
}

.bento-card__visual--web {
    background:
        linear-gradient(135deg, transparent 38%, rgba(24, 24, 27, 0.14) 38%, rgba(24, 24, 27, 0.14) 52%, transparent 52%),
        linear-gradient(45deg, transparent 48%, rgba(24, 24, 27, 0.08) 48%);
    border-radius: 1rem;
    mask-image: radial-gradient(ellipse 90% 90% at 70% 75%, #000 10%, transparent 65%);
}

.bento-card__visual--int {
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.55);
    box-shadow:
        10px 10px 0 rgba(24, 24, 27, 0.05),
        20px 20px 0 rgba(24, 24, 27, 0.04),
        0 0 0 1px rgba(24, 24, 27, 0.08) inset;
    mask-image: radial-gradient(ellipse 85% 85% at 72% 78%, #000 20%, transparent 72%);
}

.bento-card__visual--prod {
    background:
        linear-gradient(rgba(24, 24, 27, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 24, 27, 0.08) 1px, transparent 1px);
    background-size: 12px 12px;
    mask-image: radial-gradient(ellipse 80% 80% at 70% 75%, #000 12%, transparent 68%);
}

.bento-card__visual--bridge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-card__bridge-glow {
    position: absolute;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    animation: bento-bridge-pulse 2.5s ease-out infinite;
}

.bento-card__bridge-line {
    position: relative;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5) 20%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.5) 80%, transparent);
}

.bento-card__bridge-line::before,
.bento-card__bridge-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: -0.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

.bento-card__bridge-line::before {
    left: 8%;
}

.bento-card__bridge-line::after {
    right: 8%;
}

.dark .bento-card--feature .bento-card__visual--bridge {
    filter: brightness(1.28);
    opacity: 1;
}

.dark .bento-card--feature .bento-card__bridge-glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}

.dark .bento-card--feature .bento-card__bridge-line {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7) 20%, rgba(255, 255, 255, 0.98) 50%, rgba(255, 255, 255, 0.7) 80%, transparent);
}

.dark .bento-card--feature .bento-card__bridge-line::before,
.dark .bento-card--feature .bento-card__bridge-line::after {
    background: rgba(255, 255, 255, 0.92);
}

@keyframes bento-bridge-pulse {
    0% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.dark .bento-card__visual--crm,
.dark .bento-card__visual--prod {
    background:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 14px 14px;
}

.dark .bento-card__visual--infra,
.dark .bento-card__visual--web {
    filter: brightness(1.35);
}

.dark .bento-card__visual--int {
    background: rgba(39, 39, 42, 0.6);
    box-shadow:
        10px 10px 0 rgba(255, 255, 255, 0.04),
        20px 20px 0 rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

@media (prefers-reduced-motion: reduce) {
    .bento-card__bridge-glow {
        animation: none;
    }
}
