/*
 * Стили главной страницы.
 *
 * Раньше жили в storefront.css, который грузится ещё и в кабинете и на
 * страницах входа. Здесь только классы .home-*, которые встречаются
 * исключительно в home.blade.php и его компонентах.
 */


.home-section {
    padding-block: 36px;
}

.home-product-icon {
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 1rem;
    font-weight: 800;
}

.home-product-card {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.30);
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.10);
}

.home-principle-card {
    min-height: 200px;
    border: 1px solid #dbe4ee;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.045);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-principle-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.30);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.home-principle-number {
    display: inline-grid;
    min-width: 42px;
    min-height: 42px;
    place-items: center;
    border: 1px solid #fed7aa;
    border-radius: 13px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

/* Homepage product portfolio */ .home-product-card--portfolio {
    min-width: 0;
}

.home-product-card__top {
    background:
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.07), transparent 14rem),
    #ffffff;
}

.home-product-identity {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

/* Логотип и название начинаются с одной линии. Название занимает всё
   свободное место и переносится по словам, а не посимвольно. */
.home-product-identity .home-product-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding-top: 4px;
    line-height: 1.12;
    overflow-wrap: break-word;
}

/* Метки — колонкой в правом верхнем углу: так даже три метки не сжимают
   название. */
.home-product-identity > .home-product-badges {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-top: 4px;
}

/* Статус в карточке — такая же по высоте плашка, как метки, чтобы колонка
   выглядела ровной. */
.home-product-identity .home-product-status {
    height: 24px;
    align-items: center;
    justify-content: flex-end;
    padding-block: 0;
    white-space: nowrap;
}

/* Узкие экраны: метки уходят под название во всю ширину одной строкой. */
@media (max-width: 639px) {
    .home-product-identity {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .home-product-identity > .home-product-badges {
        order: 3;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 0;
    }
}

.home-product-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    object-fit: cover;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-product-card:hover .home-product-logo {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.home-product-identity .home-product-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
}

.home-product-card__meta {
    background: #f8fafc;
}

.home-product-card:hover .product-glyph {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 9px 24px rgba(15, 23, 42, 0.10);
}

.home-product-badges {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.home-product-badge {
    display: inline-flex;
    position: relative;
    align-items: center;
    min-height: 24px;
    border-radius: 9px;
    padding: 5px 9px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-product-badge--discount {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.24);
}

.home-product-badge--hit {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.26);
}

.home-product-badge--new {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

/* Подсказка к метке: чистый CSS, работает и по наведению, и с клавиатуры. */
.home-product-badge[data-tooltip] {
    cursor: help;
}

.home-product-badge[data-tooltip]::after {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 6;
    width: max-content;
    max-width: 210px;
    border-radius: 10px;
    background: #0f172a;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.24);
    padding: 8px 10px;
    color: #f8fafc;
    content: attr(data-tooltip);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    text-align: left;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
    pointer-events: none;
}

.home-product-badge[data-tooltip]:hover::after,
.home-product-badge[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.home-product-badge[data-tooltip]:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

/* На узких экранах метки стоят у левого края, и подсказка не должна
   вылезать за карточку. */
@media (max-width: 639px) {
    .home-product-badge[data-tooltip]::after {
        right: auto;
        left: 0;
    }
}

.home-product-old-price {
    display: block;
    min-height: 1.15rem;
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.15rem;
    text-decoration: line-through;
}

/* Скидки нет: строка остаётся в разметке пустой, чтобы блоки цены в
   одном ряду карточек начинались на одной высоте. */
.home-product-old-price--empty {
    text-decoration: none;
}

.home-product-benefit {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 5px 9px;
    color: #475569;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
}

.home-product-purchase-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1.5rem;
}

.home-product-license-title {
    display: block;
    margin-top: 0.3rem;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
}

.home-product-version-meta {
    min-width: 9rem;
    text-align: right;
}

.home-product-release-state {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.35rem;
    color: #15803d;
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-product-release-state__dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.10);
}

.home-product-entitlement-line {
    min-height: 1.5rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.5rem;
}

.home-product-cta {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 1px solid #fdba74;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    padding: 0.75rem 1.25rem;
    color: #9a3412;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(249, 115, 22, 0.08);
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.home-product-cta__arrow {
    display: inline-block;
    transition: transform 180ms ease;
}

.home-product-card:hover .home-product-cta, .home-product-cta:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #fdba74, #f97316);
    color: #17120d;
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.18);
}

.home-product-card:hover .home-product-cta__arrow, .home-product-cta:hover .home-product-cta__arrow {
    transform: translateX(3px);
}

.home-principle-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #f8fafc;
    color: #64748b;
}

.home-principle-icon svg {
    width: 21px;
    height: 21px;
}

.home-principle-card:hover .home-principle-icon {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

@media (max-width: 639px) {
    .home-product-benefits {
        gap: 6px;
    }

    .home-product-benefit {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-product-card:hover .product-glyph, .home-product-card:hover .home-product-cta, .home-product-cta:hover, .home-product-card:hover .home-product-cta__arrow, .home-product-cta:hover .home-product-cta__arrow {
        transform: none;
    }
}

/* Compact homepage storefront — 6-product ready */ .home-hero {
    padding-block: 38px !important;
}

.home-hero-title {
    max-width: 980px;
    margin-top: 16px !important;
    font-size: clamp(2.8rem, 5vw, 3.9rem) !important;
    line-height: 0.98 !important;
}

.home-hero-copy {
    margin-top: 18px !important;
    max-width: 760px;
    font-size: 1rem !important;
    line-height: 1.7 !important;
}

.home-hero-actions {
    margin-top: 22px !important;
}

.home-section {
    padding-block: 30px;
}

.home-products-heading {
    gap: 18px;
}

.home-products-title, .home-principles-title {
    margin-top: 8px !important;
    font-size: clamp(2rem, 3.4vw, 2.7rem) !important;
}

.home-products-intro {
    max-width: 460px;
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
}

.home-product-grid {
    margin-top: 24px !important;
    gap: 16px;
}

.home-product-card--portfolio {
    min-height: 24rem !important;
}

.home-product-card__top, .home-product-card__meta {
    padding: 20px !important;
}

.home-product-description {
    min-height: 3rem;
    margin-top: 12px !important;
    line-height: 1.55 !important;
}

.home-product-benefits {
    margin-top: 14px !important;
}

.home-product-benefit {
    min-height: 25px;
    padding: 4px 8px;
    font-size: 10px;
}

.home-product-purchase-meta {
    gap: 1rem;
}

.home-product-version-meta {
    min-width: 7rem;
}

.home-product-entitlement-line {
    margin-top: 0.7rem;
    padding-top: 0.65rem;
}

.home-product-cta {
    min-height: 2.75rem;
    margin-top: 0.9rem !important;
    padding-block: 0.65rem;
}

.home-principles-section {
    padding-top: 32px;
    padding-bottom: 32px;
}

.home-principles-grid {
    margin-top: 24px !important;
    gap: 14px;
}

.home-principle-card {
    min-height: 170px;
    padding: 18px;
}

.home-principle-card h3 {
    margin-top: 18px !important;
    font-size: 1.05rem !important;
}

.home-principle-card p {
    margin-top: 9px !important;
    font-size: 0.8rem !important;
    line-height: 1.55 !important;
}

.home-principle-number, .home-principle-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
}

@media (max-width: 767px) {
    .home-hero {
        padding-block: 30px !important;
    }

    .home-hero-title {
        font-size: clamp(2.35rem, 11vw, 3.1rem) !important;
    }

    .home-product-card--portfolio {
        min-height: 0 !important;
    }
}

/* Homepage license trust card */ .home-hero-layout {
    width: 100%;
    max-width: 1120px;
}

.home-hero-main {
    min-width: 0;
}

.home-license-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-self: center;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background:
    radial-gradient(
    circle at 100% 0%,
    rgba(251, 146, 60, 0.12),
    transparent 42%
    ),
    rgba(255, 255, 255, 0.88);
    padding: 22px;
    box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.03);
    backdrop-filter: blur(10px);
}

.home-license-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -52px;
    right: -52px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.07);
    pointer-events: none;
}

.home-license-card__head {
    display: grid;
    gap: 12px;
}

.home-license-card__eyebrow {
    margin: 0;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c2410c;
}

.home-license-card__title {
    margin: 5px 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: #0f172a;
}

.home-license-card__badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    min-height: 31px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.015em;
    color: #15803d;
}

.home-license-card__badge > span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.11);
}

.home-license-card__list {
    display: grid;
    gap: 11px;
    margin: 19px 0 0;
    padding: 0;
    list-style: none;
}

.home-license-card__list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 34px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    color: #334155;
}

.home-license-card__check {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff7ed;
    font-size: 12px;
    font-weight: 900;
    color: #ea580c;
}

@media (min-width: 1024px) {
    .home-hero-main .home-hero-title {
        max-width: 720px;
    }

    .home-hero-main .home-hero-copy {
        max-width: 690px;
    }
}

@media (max-width: 1023px) {
    .home-license-card {
        width: min(100%, 560px);
        padding: 20px;
    }
}

@media (max-width: 639px) {
    .home-license-card {
        border-radius: 20px;
        padding: 18px;
    }

    .home-license-card__title {
        font-size: 1.2rem;
    }

    .home-license-card__list {
        margin-top: 16px;
        gap: 9px;
    }
}

/* Homepage hero trust-card layout fix */ .home-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

@media (min-width: 1024px) {
    .home-hero-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: center;
        gap: 2.5rem;
        max-width: 1180px;
    }

    .home-license-card {
        width: 100%;
        align-self: center;
    }
}

@media (min-width: 1280px) {
    .home-hero-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 3.5rem;
    }
}
