/*
 * Публичный CSS-модуль.
 *
 * Модуль: home.
 *
 * Оформление:
 * - редакционная главная;
 * - главный материал и список свежих публикаций;
 * - рыночная панель;
 * - карточка обзора рынков;
 * - популярные материалы;
 * - компактный newsletter;
 * - адаптивная раскладка главной.
 *
 * Общие компоненты остаются в site-core.css:
 * - .section-kicker*;
 * - .section-heading*;
 * - .story-card*;
 * - .story-grid*;
 * - .story-card-meta;
 * - .dot-separator;
 * - .newsletter-*.
 */

/* ============================================================
   Редакционная главная
   ============================================================ */

.home-editorial {
    padding: 34px 0 42px;
    background:
        linear-gradient(
            180deg,
            rgba(251, 250, 247, .82) 0%,
            rgba(245, 243, 239, 0) 100%
        );
}

.home-editorial-heading .section-kicker {
    margin-bottom: 16px;
}

.home-editorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
    gap: 30px;
    align-items: start;
}

.home-editorial-lead {
    min-width: 0;
}

/* ============================================================
   Главный материал
   ============================================================ */

.home-lead-story {
    overflow: hidden;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.home-lead-story-media {
    display: block;
    aspect-ratio: 16 / 8.1;
    overflow: hidden;
    background: var(--soft);
    text-decoration: none;
}

.home-lead-story-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .42s ease;
}

.home-lead-story:hover .home-lead-story-media img {
    transform: scale(1.025);
}

.home-lead-story-media--placeholder {
    display: grid;
    place-items: center;
    color: rgba(23, 23, 23, .18);
    font: 800 72px/1 var(--display);
}

.home-lead-story-body {
    padding: 20px 24px 22px;
}

.home-lead-story .story-card-section {
    color: var(--accent);
    font: 700 10px/1.2 var(--ui);
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-lead-story h1 {
    max-width: 720px;
    margin: 8px 0 10px;
    color: var(--ink);
    font: 700 clamp(2rem, 2.7vw, 3rem)/1.04 var(--display) !important;
    letter-spacing: -.052em;
}

.home-lead-story h1 a {
    color: inherit;
    text-decoration: none;
}

.home-lead-story h1 a:hover {
    color: var(--accent);
}

.home-lead-story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 13px !important;
    color: var(--muted);
    font: 10px/1.35 var(--ui);
}

.home-lead-story-meta .story-card-author {
    color: var(--ink);
    text-decoration: none;
}

.home-lead-story-meta .story-card-author:hover {
    color: var(--accent);
}

.home-lead-story p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

/* ============================================================
   Свежие материалы
   ============================================================ */

.home-editorial-latest {
    min-width: 0;
    border-top: 1px solid var(--ink);
}

.home-editorial-latest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.home-editorial-latest-head h2 {
    margin: 0;
    color: var(--ink);
    font: 700 23px/1.08 var(--display);
    letter-spacing: -.035em;
}

.home-editorial-latest-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--accent);
    font: 700 18px/1 var(--ui);
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.home-editorial-latest-head a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.home-fresh-list {
    display: grid;
}

.home-fresh-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.home-fresh-item-media {
    display: block;
    width: 88px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--soft);
    text-decoration: none;
}

.home-fresh-item-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.home-fresh-item:hover .home-fresh-item-media img {
    transform: scale(1.04);
}

.home-fresh-item-media--placeholder {
    display: grid;
    place-items: center;
    color: rgba(23, 23, 23, .24);
    font: 700 22px/1 var(--display);
}

.home-fresh-item-content {
    min-width: 0;
}

.home-fresh-item-section {
    color: var(--accent);
    font: 700 9px/1.2 var(--ui);
    letter-spacing: .1em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-fresh-item h3 {
    margin: 5px 0 6px;
    color: var(--ink);
    font: 700 17px/1.12 var(--display);
    letter-spacing: -.02em;
}

.home-fresh-item h3 a {
    color: inherit;
    text-decoration: none;
}

.home-fresh-item h3 a:hover {
    color: var(--accent);
}

.home-fresh-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font: 9px/1.35 var(--ui);
}

.home-editorial-empty {
    margin: 0;
    padding: 22px 0;
    color: var(--muted);
    font: 14px/1.5 var(--ui);
}

/* ============================================================
   Панель рынков
   ============================================================ */

.home-market-panel {
    padding: 42px 0 36px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(
            circle at 91% 8%,
            rgba(23, 136, 114, .11),
            rgba(23, 136, 114, 0) 30%
        ),
        linear-gradient(
            135deg,
            #f9fbfa 0%,
            #f1f7f4 50%,
            #f8faf9 100%
        );
}

.home-market-panel-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 26px;
    align-items: stretch;
}

/* Снимок котировок */

.home-market-snapshot {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #d7e3dc;
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 28px rgba(30, 53, 43, .055);
}

.home-market-snapshot-head {
    display: grid;
    gap: 8px;
    padding: 18px 20px 15px;
    border-bottom: 1px solid #e1ebe5;
}

.home-market-snapshot-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #087b65;
    font: 800 9px/1.2 var(--ui);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-market-snapshot h2 {
    margin: 0;
    color: #192723;
    font: 700 25px/1.03 var(--display);
    letter-spacing: -.04em;
}

.home-market-snapshot-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #75827b;
    font: 10px/1.3 var(--ui);
}

.home-market-snapshot-status span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c98827;
}

.home-market-snapshot-list {
    display: grid;
    padding: 2px 20px 0;
}

.home-market-snapshot-item {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) auto auto;
    align-items: baseline;
    column-gap: 7px;
    min-height: 58px;
    padding: 10px 0;
    border-bottom: 1px solid #e2ebe6;
    color: #1c2823;
    font-family: var(--ui);
    text-decoration: none;
}

.home-market-snapshot-item:last-child {
    border-bottom: 0;
}

.home-market-snapshot-item:hover {
    color: #087b65;
}

.home-market-snapshot-name {
    display: grid;
    min-width: 0;
    gap: 2px;
    color: #27342e;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.home-market-snapshot-name small {
    overflow: hidden;
    color: #88948e;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .05em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-market-snapshot-item strong {
    color: #16241f;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.home-market-snapshot-item em {
    color: #78857e;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
}

.home-market-snapshot-change {
    grid-column: 2 / 4;
    justify-self: end;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.home-market-snapshot-change--up {
    color: #087b61;
}

.home-market-snapshot-change--down {
    color: #c54942;
}

.home-market-snapshot-change--neutral {
    color: #7b8781;
}

.home-market-snapshot-empty {
    margin: 0;
    padding: 28px 20px;
    color: #75827b;
    font: 13px/1.45 var(--ui);
}

.home-market-snapshot-footer {
    margin-top: auto;
    padding: 14px 20px 16px;
    border-top: 1px solid #e1ebe5;
}

.home-market-snapshot-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #384841;
    font: 800 10px/1.2 var(--ui);
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-market-snapshot-footer a span {
    color: #0b866e;
    font-size: 17px;
    transition: transform .16s ease;
}

.home-market-snapshot-footer a:hover {
    color: #087b65;
}

.home-market-snapshot-footer a:hover span {
    transform: translateX(3px);
}

/* Редакционная заметка или обзор рынков */

.home-market-review-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid #d3e0d9;
    border-radius: 14px;
    background:
        linear-gradient(
            130deg,
            rgba(255, 255, 255, .98) 0%,
            rgba(255, 255, 255, .91) 61%,
            rgba(230, 242, 236, .82) 100%
        );
    box-shadow: 0 14px 32px rgba(30, 53, 43, .075);
}

.home-market-review-card-content {
    position: relative;
    z-index: 1;
    width: min(100%, 780px);
    padding: 28px 32px;
}

.home-market-review-card-content .section-kicker {
    margin-bottom: 13px;
    color: #0c806a;
}

.home-market-review-card-content .section-kicker-line {
    background: #c9dcd3;
}

.home-market-review-card h2 {
    max-width: 720px;
    margin: 0;
    color: #17241f;
    font: 700 clamp(1.8rem, 2.85vw, 3rem)/1.05 var(--display);
    letter-spacing: -.05em;
}

.home-market-review-card h2 a {
    color: inherit;
    text-decoration: none;
}

.home-market-review-card h2 a:hover {
    color: #087b65;
}

.home-market-review-card p {
    max-width: 650px;
    margin: 14px 0 0;
    color: #607069;
    font-size: 16px;
    line-height: 1.55;
}

.home-market-review-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    color: #75827b;
    font: 10px/1.4 var(--ui);
}

.home-market-review-card-meta a {
    color: #45534d;
    text-decoration: none;
}

.home-market-review-card-meta a:hover {
    color: #087b65;
}

.home-market-review-card-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    color: #1c3129;
    font: 800 10px/1.2 var(--ui);
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-market-review-card-link span {
    color: #0b866e;
    font-size: 18px;
    transition: transform .16s ease;
}

.home-market-review-card-link:hover {
    color: #087b65;
}

.home-market-review-card-link:hover span {
    transform: translateX(4px);
}

.home-market-review-card-accent {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    width: min(38%, 315px);
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 60% 32%,
            rgba(16, 132, 109, .17),
            rgba(16, 132, 109, 0) 38%
        );
}

.home-market-review-card-accent > span {
    position: absolute;
    top: 32px;
    right: 34px;
    color: rgba(14, 119, 98, .09);
    font: 800 132px/.8 var(--display);
    letter-spacing: -.12em;
}

.home-market-review-card-accent i {
    position: absolute;
    right: 0;
    bottom: 0;
    display: block;
    width: 72%;
    border-top: 2px solid rgba(14, 124, 102, .22);
    transform-origin: right bottom;
}

.home-market-review-card-accent i:nth-of-type(1) {
    bottom: 31%;
    transform: rotate(-16deg);
}

.home-market-review-card-accent i:nth-of-type(2) {
    bottom: 42%;
    width: 58%;
    transform: rotate(8deg);
}

.home-market-review-card-accent i:nth-of-type(3) {
    bottom: 57%;
    width: 78%;
    transform: rotate(-27deg);
}

.home-market-review-card-accent i:nth-of-type(4) {
    bottom: 70%;
    width: 44%;
    transform: rotate(18deg);
}

.home-market-review-card--empty {
    min-height: 260px;
}

.home-market-panel-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
    color: #75827b;
    font: 10px/1.45 var(--ui);
}

.home-market-panel-note a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: #43534c;
    font-weight: 800;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-market-panel-note a span {
    color: #0b866e;
    font-size: 17px;
    transition: transform .16s ease;
}

.home-market-panel-note a:hover {
    color: #087b65;
}

.home-market-panel-note a:hover span {
    transform: translateX(3px);
}

/* ============================================================
   Популярные материалы
   ============================================================ */

.home-section--popular {
    padding: 54px 0 56px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.home-section--popular .section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink);
}

.home-section--popular .section-heading h2 {
    margin: 0;
    color: var(--ink);
    font: 700 clamp(2rem, 3vw, 3.1rem)/1 var(--display);
    letter-spacing: -.045em;
}

.home-section--popular .section-heading-note {
    display: block;
    flex: 0 0 auto;
    color: var(--muted);
    font: 700 10px/1.3 var(--ui);
    letter-spacing: .09em;
    text-align: right;
    text-transform: uppercase;
}

.home-section--popular .popular-list,
.home-section--popular .popular-list--three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 32px;
    margin: 0;
    border-top: 0;
}

.home-section--popular .popular-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 20px 0 18px;
    border-bottom: 1px solid var(--line);
}

.home-section--popular .popular-item-number {
    display: block;
    padding-top: 3px;
    color: var(--accent);
    font: 700 17px/1 var(--display);
    letter-spacing: -.03em;
}

.home-section--popular .popular-item-title {
    display: block;
    color: var(--ink);
    font: 700 18px/1.16 var(--display);
    letter-spacing: -.02em;
    text-decoration: none;
}

.home-section--popular .popular-item-title:hover {
    color: var(--accent);
}

.home-section--popular .story-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    color: var(--muted);
    font: 10px/1.35 var(--ui);
}

.home-section--popular .story-card-author {
    color: inherit;
    font-weight: 400;
}

/* ============================================================
   Компактное письмо от редакции
   ============================================================ */

.newsletter-banner--home {
    padding: 26px 0 28px;
    background: var(--dark);
    color: var(--white);
}

.newsletter-banner--home .newsletter-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
}

.newsletter-banner--home .newsletter-banner-copy {
    min-width: 0;
}

.newsletter-banner--home .section-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 7px;
    color: #e56b5e;
    font: 700 9px/1.2 var(--ui);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.newsletter-banner--home .section-kicker-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .2);
}

.newsletter-banner--home .newsletter-banner-copy h2 {
    max-width: 570px;
    margin: 0 0 5px;
    color: var(--white);
    font: 700 clamp(1.35rem, 2vw, 2.15rem)/1.05 var(--display);
    letter-spacing: -.04em;
}

.newsletter-banner--home .newsletter-banner-copy p {
    max-width: 570px;
    margin: 0;
    color: #bdb9b0;
    font-size: 13px;
    line-height: 1.45;
}

.newsletter-banner--home .newsletter-form {
    display: flex;
    width: min(100%, 380px);
    min-width: min(100%, 380px);
    flex: 0 1 380px;
    margin: 0;
    border-bottom: 1px solid #77736d;
}

.newsletter-banner--home .newsletter-form input {
    min-width: 0;
    min-height: 42px;
    padding: 10px 10px 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--white);
    font: 13px/1.3 var(--ui);
}

.newsletter-banner--home .newsletter-form input::placeholder {
    color: #9b978e;
}

.newsletter-banner--home .newsletter-form button {
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    background: var(--accent);
    color: var(--white);
    font: 700 9px/1 var(--ui);
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background .16s ease;
}

.newsletter-banner--home .newsletter-form button:hover {
    background: var(--accent-dark);
}

/* ============================================================
   Адаптивность главной
   ============================================================ */

@media (max-width: 980px) {
    .home-editorial-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(265px, .8fr);
        gap: 22px;
    }

    .home-market-panel-grid {
        grid-template-columns: minmax(250px, .9fr) minmax(0, 1.35fr);
        gap: 18px;
    }

    .home-lead-story h1 {
        font-size: 34px !important;
    }

    .home-market-review-card-content {
        padding: 24px;
    }

    .home-market-review-card h2 {
        font-size: 30px;
    }

    .home-market-review-card-accent {
        width: 32%;
    }

    .newsletter-banner--home .newsletter-banner-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .newsletter-banner--home .newsletter-form {
        width: min(100%, 460px);
        flex-basis: auto;
    }
}

@media (max-width: 760px) {
    .home-editorial {
        padding: 28px 0 34px;
    }

    .home-editorial-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .home-lead-story-media {
        aspect-ratio: 16 / 9;
    }

    .home-lead-story-body {
        padding: 18px 18px 21px;
    }

    .home-lead-story h1 {
        margin-top: 7px;
        font-size: 29px !important;
    }

    .home-lead-story p {
        font-size: 16px;
    }

    .home-editorial-latest-head h2 {
        font-size: 24px;
    }

    .home-fresh-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 11px;
    }

    .home-fresh-item-media {
        width: 76px;
    }

    .home-fresh-item h3 {
        font-size: 16px;
    }

    .home-market-panel {
        padding: 30px 0 32px;
    }

    .home-market-panel-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .home-market-snapshot-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 18px;
    }

    .home-market-snapshot-item:nth-last-child(2) {
        border-bottom: 0;
    }

    .home-market-review-card-content {
        padding: 22px 19px 24px;
    }

    .home-market-review-card h2 {
        font-size: 28px;
    }

    .home-market-review-card p {
        font-size: 16px;
    }

    .home-market-review-card-accent {
        width: 38%;
    }

    .home-market-review-card-accent > span {
        top: 34px;
        right: 17px;
        font-size: 102px;
    }

    .home-market-panel-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .home-section--popular {
        padding: 40px 0 44px;
    }

    .home-section--popular .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .home-section--popular .section-heading-note {
        text-align: left;
    }

    .home-section--popular .popular-list,
    .home-section--popular .popular-list--three {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .home-section--popular .popular-item {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 17px 0;
    }

    .newsletter-banner--home {
        padding: 24px 0 26px;
    }

    .newsletter-banner--home .newsletter-banner-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .newsletter-banner--home .newsletter-banner-copy h2 {
        font-size: 25px;
    }

    .newsletter-banner--home .newsletter-form {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
    }
}

@media (max-width: 480px) {
    .home-market-snapshot-list {
        grid-template-columns: 1fr;
    }

    .home-market-snapshot-item:nth-last-child(2) {
        border-bottom: 1px solid #e2ebe6;
    }

    .home-market-snapshot-item:last-child {
        border-bottom: 0;
    }

    .home-market-review-card-accent {
        opacity: .65;
    }
}

@media (max-width: 420px) {
    .home-fresh-item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 10px;
    }

    .home-fresh-item-media {
        width: 68px;
    }

    .newsletter-banner--home .newsletter-form button {
        padding: 0 13px;
        font-size: 8px;
    }
}