/*
|--------------------------------------------------------------------------
| Главная страница
| Цвета наследуются от :root[data-theme="light|dark"] в app.css.
|--------------------------------------------------------------------------
*/

.home-hero,
.home-section,
.home-about-section {
    box-sizing: border-box;
    width: 100%;
}

/* Hero */

.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(22px, 4vw, 38px);
    min-height: 380px;
    margin-bottom: 44px;
    padding: clamp(28px, 4vw, 48px);
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 20%, rgb(96 165 250 / 18%), transparent 32%),
        radial-gradient(circle at 70% 80%, rgb(37 99 235 / 10%), transparent 38%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.home-hero-content {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    min-width: 0;
}

.home-hero .eyebrow,
.home-section-header .eyebrow,
.home-about-content .eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 680px;
    margin: 0;
    color: var(--text);
    font-size: clamp(1.7rem, 3.1vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.home-hero-text {
    max-width: 580px;
    margin: 17px 0 0;
    color: var(--text-soft);
    font-size: 1.03rem;
    line-height: 1.7;
}

.home-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 25px;
}

.home-primary-button,
.home-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    text-decoration: none;
}

.home-primary-button {
    padding: 9px 16px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    background: var(--primary);
    color: var(--primary-text);
    font-size: .91rem;
    font-weight: 750;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.home-primary-button:hover {
    border-color: var(--primary-hover);
    background: var(--primary-hover);
    color: var(--primary-text);
    transform: translateY(-1px);
}

.home-secondary-button {
    padding: 9px 15px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: .91rem;
    font-weight: 750;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.home-secondary-button:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    color: var(--primary);
    transform: translateY(-1px);
}

.home-hero-visual {
    position: relative;
    flex: 0 0 240px;
    width: 240px;
    height: 240px;
}

.home-orbit {
    position: absolute;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
}

.home-orbit.orbit-one {
    inset: 8px;
}

.home-orbit.orbit-two {
    inset: 35px;
}

.home-orbit.orbit-three {
    inset: 62px;
}

.home-hero-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 102px;
    height: 102px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: 3.1rem;
    font-weight: 850;
    letter-spacing: -.08em;
    transform: translate(-50%, -50%);
}

/* Секции */

.home-section {
    margin: 0 0 44px;
}

.home-section-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 96px;
    margin: 0 0 16px;
    padding: 22px 26px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgb(96 165 250 / 13%), transparent 45%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.home-section-header::after {
    position: absolute;
    top: -78px;
    right: -52px;
    width: 180px;
    height: 180px;
    background: var(--bg-soft);
    border-radius: 50%;
    content: "";
    opacity: .45;
    pointer-events: none;
}

.home-section-header > div,
.home-section-header > .home-section-link {
    position: relative;
    z-index: 1;
}

.home-section-header > div {
    min-width: 0;
}

.home-section-header h2,
.home-about-content h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.03em;
}

.home-section-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 39px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.home-section-link:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.home-section-link span {
    font-size: 1.02rem;
}

/* Сетки */

.home-article-grid,
.home-review-grid,
.home-wall-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-article-card,
.home-review-card,
.home-wall-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

/* Статьи */

.home-article-card {
    display: flex;
    flex-direction: column;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.home-article-card:hover {
    border-color: rgb(37 99 235 / 38%);
    box-shadow: 0 16px 34px rgb(15 23 42 / 9%);
    transform: translateY(-3px);
}

.home-article-cover {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.home-article-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .25s ease;
}

.home-article-card:hover .home-article-cover img {
    transform: scale(1.04);
}

.home-article-cover::after {
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(
        to top,
        rgb(15 23 42 / 38%),
        transparent
    );
    content: "";
    pointer-events: none;
}

.home-article-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    padding: 15px 16px 17px;
    background: var(--surface);
}

.home-article-content time {
    color: var(--text-faint);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.4;
}

.home-article-content h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.03rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.018em;
}

.home-article-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color .14s ease;
}

.home-article-content h3 a:hover {
    color: var(--primary);
}

.home-article-content p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0;
    color: var(--text-soft);
    font-size: .86rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.home-article-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 6px;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    transition: color .14s ease;
}

.home-article-link:hover {
    color: var(--primary-hover);
}

/* Стена */

.home-wall-card {
    display: flex;
    flex-direction: column;
}

.home-wall-card-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.home-wall-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-wall-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 15px 16px 16px;
}

.home-wall-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.home-wall-card-avatar-link {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.home-wall-card-avatar {
    display: block;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-soft);
    object-fit: cover;
}

.home-wall-card-author {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.home-wall-card-author a {
    overflow: hidden;
    color: var(--text);
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.3;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-wall-card-author a:hover {
    color: var(--primary);
}

.home-wall-card-author span {
    overflow-wrap: anywhere;
    color: var(--text-faint);
    font-size: .75rem;
    line-height: 1.4;
}

.home-wall-card-post-link {
    display: block;
    margin: 13px 0 0;
    color: var(--text);
    text-decoration: none;
}

.home-wall-card-post-link:hover {
    color: var(--primary);
}

.home-wall-card-post-link p {
    margin: 0;
    color: var(--text-soft);
    font-size: .87rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.home-wall-card-empty-text {
    color: var(--text-soft);
}

.home-wall-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--text-soft);
    font-size: .78rem;
}

.home-wall-card-footer a {
    margin-left: auto;
    color: var(--primary);
    font-weight: 750;
    text-decoration: none;
}

.home-wall-card-footer a:hover {
    color: var(--primary-hover);
}

.home-wall-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 11px;
    min-height: 145px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text-soft);
    text-align: center;
}

.home-wall-empty > span {
    color: var(--primary);
    font-size: 1.65rem;
}

.home-wall-empty p {
    margin: 0;
}

/* Отзывы */

.home-review-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.home-review-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.home-review-avatar {
    display: block;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-soft);
    object-fit: cover;
}

.home-review-author-data {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.home-review-author-data strong {
    overflow: hidden;
    color: var(--text);
    font-size: .88rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-review-stars {
    color: #f59e0b;
    font-size: .78rem;
    line-height: 1;
}

.home-review-stars i {
    color: var(--text-faint);
    font-style: normal;
}

.home-review-top time {
    flex: 0 0 auto;
    color: var(--text-faint);
    font-size: .72rem;
    white-space: nowrap;
}

.home-review-card h3 {
    margin: 13px 0 7px;
    color: var(--text);
    font-size: .96rem;
    font-weight: 800;
    line-height: 1.35;
}

.home-review-card > p {
    margin: 0;
    color: var(--text-soft);
    font-size: .86rem;
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.home-review-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--text-faint);
    font-size: .75rem;
}

.home-review-card footer a {
    color: var(--primary);
    font-weight: 750;
    text-decoration: none;
}

.home-review-card footer a:hover {
    color: var(--primary-hover);
}

/* О проекте */

.home-about-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 3vw, 30px);
    margin: 0 0 32px;
    padding: clamp(24px, 3vw, 34px);
    overflow: hidden;
    background:
        radial-gradient(circle at 96% 20%, rgb(96 165 250 / 15%), transparent 38%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.home-about-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    min-width: 0;
}

.home-about-content > p:not(.eyebrow) {
    max-width: 680px;
    margin: 13px 0 20px;
    color: var(--text-soft);
    font-size: .95rem;
    line-height: 1.7;
}

.home-about-content > .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.home-about-symbol {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 74px;
    place-items: center;
    width: 74px;
    height: 74px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: 1.95rem;
}

/* Адаптивность */

@media (max-width: 980px) {
    .home-hero {
        padding: 34px;
    }

    .home-hero-visual {
        flex-basis: 195px;
        width: 195px;
        height: 195px;
    }

    .home-article-grid,
    .home-review-grid,
    .home-wall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .home-hero {
        min-height: 0;
        margin-bottom: 34px;
        padding: 26px 20px;
    }

    .home-hero-visual {
        display: none;
    }

    .home-hero h1 {
        font-size: clamp(1.65rem, 7vw, 2.1rem);
    }

    .home-section {
        margin-bottom: 34px;
    }

    .home-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
        min-height: 0;
        padding: 19px;
    }

    .home-article-grid,
    .home-review-grid,
    .home-wall-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-article-cover {
        aspect-ratio: 4 / 3;
    }

    .home-about-section {
        padding: 23px 20px;
    }

    .home-about-symbol {
        display: none;
    }

    .home-review-top {
        flex-wrap: wrap;
    }

    .home-review-top time {
        margin-left: 50px;
    }

    .home-wall-empty {
        flex-direction: column;
    }
}

/* Тёмная тема */

html[data-theme="dark"] .home-hero,
html[data-theme="dark"] .home-section-header,
html[data-theme="dark"] .home-about-section {
    border-color: #1f2937;
    background:
        radial-gradient(circle at 90% 20%, rgb(59 130 246 / 14%), transparent 34%),
        #111827;
    box-shadow: none;
}

html[data-theme="dark"] .home-hero h1,
html[data-theme="dark"] .home-section-header h2,
html[data-theme="dark"] .home-about-content h2 {
    color: #f9fafb;
}

html[data-theme="dark"] .home-hero-text,
html[data-theme="dark"] .home-about-content > p:not(.eyebrow) {
    color: #9ca3af;
}

html[data-theme="dark"] .home-secondary-button {
    border-color: #1f2937;
    background: #111827;
    color: #e5e7eb;
}

html[data-theme="dark"] .home-secondary-button:hover {
    border-color: #3b82f6;
    background: rgb(59 130 246 / 10%);
    color: #60a5fa;
}

html[data-theme="dark"] .home-section-link {
    border-color: #1f2937;
    background: #0f172a;
    color: #60a5fa;
}

html[data-theme="dark"] .home-section-link:hover {
    border-color: #3b82f6;
    background: rgb(59 130 246 / 10%);
    color: #93c5fd;
}

html[data-theme="dark"] .home-article-card,
html[data-theme="dark"] .home-review-card,
html[data-theme="dark"] .home-wall-card {
    border-color: #1f2937;
    background: #111827;
    box-shadow: none;
}

html[data-theme="dark"] .home-article-card:hover {
    border-color: rgb(59 130 246 / 45%);
    box-shadow: 0 16px 34px rgb(0 0 0 / 25%);
}

html[data-theme="dark"] .home-article-cover,
html[data-theme="dark"] .home-wall-card-image-link {
    border-color: #1f2937;
    background: #0f172a;
}

html[data-theme="dark"] .home-article-content {
    background: #111827;
}

html[data-theme="dark"] .home-article-content h3,
html[data-theme="dark"] .home-wall-card-author a,
html[data-theme="dark"] .home-review-author-data strong,
html[data-theme="dark"] .home-review-card h3 {
    color: #f9fafb;
}

html[data-theme="dark"] .home-article-content p,
html[data-theme="dark"] .home-wall-card-post-link p,
html[data-theme="dark"] .home-review-card > p {
    color: #9ca3af;
}

html[data-theme="dark"] .home-article-content time,
html[data-theme="dark"] .home-wall-card-author span,
html[data-theme="dark"] .home-review-top time,
html[data-theme="dark"] .home-review-card footer {
    color: #6b7280;
}

html[data-theme="dark"] .home-wall-card-post-link {
    color: #e5e7eb;
}

html[data-theme="dark"] .home-wall-card-post-link:hover,
html[data-theme="dark"] .home-wall-card-author a:hover,
html[data-theme="dark"] .home-article-content h3 a:hover,
html[data-theme="dark"] .home-article-link,
html[data-theme="dark"] .home-review-card footer a {
    color: #60a5fa;
}

html[data-theme="dark"] .home-wall-empty {
    border-color: #1f2937;
    background: #111827;
    color: #9ca3af;
}

html[data-theme="dark"] .home-about-symbol {
    border-color: #1f2937;
    background: #0f172a;
}

@media (prefers-reduced-motion: reduce) {
    .home-article-card,
    .home-article-cover img,
    .home-primary-button,
    .home-secondary-button,
    .home-section-link {
        transition: none;
    }
}
