/* ==========================================================================
   Статьи: лента /post и страница статьи /text
   ========================================================================== */

.pt-page {
    --pt-bg: #fcf0ea;
    --pt-card: #f8ece5;
    --pt-card-2: #f1ddd1;
    --pt-line: #e2cbbc;
    --pt-accent: #b28663;
    --pt-accent-dark: #96694a;
    --pt-ink: #1d1d1d;
    --pt-ink-soft: rgba(29, 29, 29, 0.82);
    --pt-ink-mute: rgba(29, 29, 29, 0.58);
    --pt-shadow: 0 26px 60px rgba(122, 78, 45, 0.14);
    --pt-shadow-soft: 0 16px 38px rgba(122, 78, 45, 0.10);

    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 2%, rgba(255, 255, 255, 0.9), transparent 32%),
        radial-gradient(circle at 94% 18%, rgba(178, 134, 99, 0.12), transparent 30%),
        radial-gradient(circle at 2% 86%, rgba(178, 134, 99, 0.10), transparent 28%),
        var(--pt-bg);
}

.pt-page *,
.pt-page *::before,
.pt-page *::after {
    box-sizing: border-box;
}

.pt-container {
    width: min(1260px, 100%);
    margin: 0 auto;
    padding: 0 20px;
}

.pt-section {
    position: relative;
    padding: clamp(46px, 5.5vw, 88px) 0;
}

.pt-section--head {
    padding-bottom: clamp(20px, 2.4vw, 34px);
}

.pt-section--flush {
    padding-top: 0;
}

.pt-stars {
    position: absolute;
    top: 3%;
    right: -40px;
    width: clamp(180px, 22vw, 340px);
    opacity: 0.18;
    transform: rotate(24deg);
    pointer-events: none;
    user-select: none;
}

/* --- шапка --------------------------------------------------------------- */

.pt-head {
    text-align: center;
}

.pt-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-family: "Spectral", serif;
    font-size: 13px;
    font-style: italic;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pt-accent);
}

.pt-eyebrow::before,
.pt-head .pt-eyebrow::after {
    content: "";
    width: 40px;
    height: 1px;
    background: var(--pt-accent);
    opacity: 0.6;
}

.pt-title {
    margin: 0;
    font-family: "Forum", serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 4.2vw, 3.8rem) !important;
    line-height: 1.1;
    color: var(--pt-ink);
}

.pt-head .pt-title::after {
    content: "";
    display: block;
    width: 96px;
    height: 1px;
    margin: 26px auto 0;
    background: var(--pt-accent);
    opacity: 0.55;
}

/* ==========================================================================
   ЛЕНТА СТАТЕЙ — одна статья на строку
   ========================================================================== */

.pt-feed {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.6vw, 22px);
}

.pt-row {
    position: relative;
    display: flex;
    gap: clamp(24px, 3.2vw, 52px);
    align-items: stretch;
    padding: clamp(16px, 1.8vw, 24px);
    border-radius: 34px;
    background: transparent;
    text-decoration: none;
    transition: background-color .45s ease, box-shadow .45s ease, transform .45s cubic-bezier(.22, .61, .36, 1);
}

/* карточка «проявляется» только при наведении — в покое лента лёгкая */
.pt-row:hover,
.pt-row:focus-visible {
    background: var(--pt-card);
    box-shadow: var(--pt-shadow);
    transform: translateY(-4px);
    text-decoration: none;
}

/* тонкая линия между статьями */
.pt-row + .pt-row::before {
    content: "";
    position: absolute;
    top: calc(clamp(14px, 1.6vw, 22px) / -2);
    left: clamp(16px, 1.8vw, 24px);
    right: clamp(16px, 1.8vw, 24px);
    height: 1px;
    background: var(--pt-line);
    opacity: 0.85;
    transition: opacity .35s ease;
}

.pt-row:hover + .pt-row::before,
.pt-row:hover::before {
    opacity: 0;
}

/* --- картинка ------------------------------------------------------------ */

.pt-row__media {
    position: relative;
    flex: 0 0 clamp(240px, 30%, 380px);
    overflow: hidden;
    border-radius: 26px;
    background: var(--pt-card-2);
    min-height: clamp(280px, 24vw, 360px);
}

.pt-row:nth-child(even) .pt-row__media {
    order: 2;
}

.pt-row__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s cubic-bezier(.22, .61, .36, 1);
}

.pt-row:hover .pt-row__media img {
    transform: scale(1.07);
}

.pt-row__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(178, 134, 99, 0) 40%, rgba(122, 78, 45, 0.35) 100%);
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
}

.pt-row:hover .pt-row__media::after {
    opacity: 1;
}

/* --- текст --------------------------------------------------------------- */

.pt-row__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(6px, 1vw, 18px) clamp(4px, 1vw, 16px);
}

.pt-row__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-family: "Spectral", serif;
    font-size: 0.84rem;
    font-style: italic;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pt-accent);
}

.pt-row__meta::after {
    content: "";
    flex: 0 0 auto;
    width: 34px;
    height: 1px;
    background: var(--pt-accent);
    opacity: 0.5;
    transition: width .5s cubic-bezier(.22, .61, .36, 1);
}

.pt-row:hover .pt-row__meta::after {
    width: 76px;
}

.pt-row__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 16px;
    font-family: "Forum", serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 2.1vw, 2.15rem) !important;
    line-height: 1.2;
    letter-spacing: 0.005em;
    color: var(--pt-ink);
    transition: color .35s ease;
}

.pt-row:hover .pt-row__title {
    color: var(--pt-accent-dark);
}

.pt-row__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 24px;
    max-width: 62ch;
    font-family: "Spectral", serif;
    font-size: clamp(1rem, 1.1vw, 1.12rem);
    line-height: 1.66;
    color: var(--pt-ink-soft);
}

.pt-row__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Forum", serif;
    font-size: 1.08rem;
    color: var(--pt-accent-dark);
}

.pt-row__link i {
    position: relative;
    display: block;
    width: 46px;
    height: 1px;
    background: var(--pt-accent);
    transition: width .45s cubic-bezier(.22, .61, .36, 1);
}

.pt-row__link i::after {
    content: "";
    position: absolute;
    top: -3px;
    right: 0;
    width: 7px;
    height: 7px;
    border-top: 1px solid var(--pt-accent);
    border-right: 1px solid var(--pt-accent);
    transform: rotate(45deg);
}

.pt-row:hover .pt-row__link i {
    width: 78px;
}

/* ==========================================================================
   СТРАНИЦА СТАТЬИ
   ========================================================================== */

.pt-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 26px;
    text-align: center;
    font-family: "Spectral", serif;
    font-size: 0.92rem;
    color: var(--pt-ink-mute);
}

.pt-crumbs a {
    color: var(--pt-ink-mute);
    text-decoration: none;
    transition: color .3s ease;
}

.pt-crumbs a:hover {
    color: var(--pt-accent);
}

.pt-crumbs span[aria-hidden] {
    opacity: 0.5;
}

.pt-post__head {
    max-width: 900px;
    margin: 0 auto clamp(28px, 3.4vw, 46px);
    text-align: center;
}

.pt-post__title {
    margin: 0;
    font-family: "Forum", serif;
    font-weight: 600;
    font-size: clamp(1.9rem, 3.2vw, 3rem) !important;
    line-height: 1.16;
    color: var(--pt-ink);
}

.pt-post__date {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    font-family: "Spectral", serif;
    font-size: 0.86rem;
    font-style: italic;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pt-accent);
}

.pt-post__date::before,
.pt-post__date::after {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--pt-accent);
    opacity: 0.55;
}

.pt-post__cover {
    display: block;
    position: relative;
    overflow: hidden;
    max-width: 980px;
    margin: 0 auto clamp(28px, 3.4vw, 48px);
    border-radius: 34px;
    background: var(--pt-card-2);
    box-shadow: var(--pt-shadow-soft);
    aspect-ratio: 16 / 10;
    transition: box-shadow .45s ease;
}

.pt-post__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s cubic-bezier(.22, .61, .36, 1);
}

.pt-post__cover:hover {
    box-shadow: var(--pt-shadow);
}

.pt-post__cover:hover img {
    transform: scale(1.04);
}

/* --- типографика статьи -------------------------------------------------- */

.pt-article {
    width: min(860px, 100%);
    margin: 0 auto;
    font-family: "Spectral", serif;
    font-size: clamp(1.04rem, 1.15vw, 1.2rem);
    line-height: 1.8;
    color: var(--pt-ink-soft);
}

.pt-article > :first-child { margin-top: 0; }
.pt-article > :last-child { margin-bottom: 0; }

.pt-article p {
    margin: 0 0 22px;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* красивая первая буква */
.pt-article > p:first-of-type::first-letter {
    float: left;
    margin: 8px 14px 0 0;
    font-family: "Forum", serif;
    font-size: 3.8rem;
    line-height: 0.8;
    color: var(--pt-accent);
}

.pt-article h2,
.pt-article h3,
.pt-article h4 {
    margin: 40px 0 16px;
    font-family: "Forum", serif;
    font-weight: 600;
    line-height: 1.25;
    color: var(--pt-ink);
}

.pt-article h2 { font-size: clamp(1.5rem, 2.2vw, 2rem) !important; }
.pt-article h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem) !important; }
.pt-article h4 { font-size: 1.2rem !important; }

.pt-article strong,
.pt-article b {
    color: var(--pt-ink);
    font-weight: 600;
}

.pt-article a {
    color: var(--pt-accent-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pt-article a:hover { color: var(--pt-accent); }

.pt-article ul,
.pt-article ol {
    margin: 0 0 24px;
    padding: 0 0 0 4px;
    list-style: none;
}

.pt-article ol { counter-reset: pt-ol; }

.pt-article li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 30px;
    font-size: inherit;
    line-height: 1.7;
}

.pt-article ul > li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pt-accent);
}

.pt-article ol > li { counter-increment: pt-ol; }

.pt-article ol > li::before {
    content: counter(pt-ol);
    position: absolute;
    left: 0;
    top: 0.12em;
    font-family: "Forum", serif;
    font-size: 1.05em;
    color: var(--pt-accent);
}

.pt-article blockquote {
    margin: 28px 0;
    padding: 24px 30px;
    border-left: 3px solid var(--pt-accent);
    border-radius: 0 22px 22px 0;
    background: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.pt-article img {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 24px;
}

.pt-article table {
    width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
}

.pt-article td,
.pt-article th {
    padding: 12px 14px;
    border: 1px solid var(--pt-line);
}

/* --- кнопки под статьёй --------------------------------------------------- */

.pt-post__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    width: min(860px, 100%);
    margin: clamp(30px, 3.4vw, 46px) auto 0;
    padding-top: clamp(26px, 3vw, 38px);
    border-top: 1px solid var(--pt-line);
}

.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 60px;
    padding: 16px 34px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--pt-accent);
    color: #fff9f5;
    font-family: "Forum", serif;
    font-size: 1.1rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(150, 105, 74, 0.22);
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
}

.pt-btn:hover,
.pt-btn:focus-visible {
    background: var(--pt-accent-dark);
    color: #fff9f5;
    transform: translateY(-3px);
    box-shadow: 0 22px 38px rgba(150, 105, 74, 0.28);
}

.pt-btn__arrow { transition: transform .3s ease; }
.pt-btn:hover .pt-btn__arrow { transform: translateX(5px); }

.pt-btn--ghost {
    background: transparent;
    color: var(--pt-ink);
    border-color: var(--pt-line);
    box-shadow: none;
}

.pt-btn--ghost:hover,
.pt-btn--ghost:focus-visible {
    background: rgba(178, 134, 99, 0.08);
    border-color: var(--pt-accent);
    color: var(--pt-ink);
    box-shadow: none;
}

/* --- другие статьи -------------------------------------------------------- */

.pt-more__title {
    margin: 0 0 clamp(20px, 2.6vw, 32px);
    font-family: "Forum", serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 2.6vw, 2.3rem) !important;
    line-height: 1.2;
    text-align: center;
    color: var(--pt-ink);
}

/* ==========================================================================
   ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ (класс pt-anim ставит скрипт)
   ========================================================================== */

.pt-page.pt-anim .pt-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}

.pt-page.pt-anim .pt-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .pt-page.pt-anim .pt-reveal,
    .pt-row,
    .pt-post__cover {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   АДАПТИВ
   ========================================================================== */

@media (max-width: 991.98px) {
    .pt-row__media {
        flex-basis: 38%;
        min-height: 260px;
    }

    .pt-row__title {
        -webkit-line-clamp: 2;
    }

    .pt-row__text {
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 767.98px) {
    .pt-stars { display: none; }

    .pt-feed {
        gap: 22px;
    }

    .pt-row {
        flex-direction: column;
        gap: 18px;
        padding: 14px;
        background: var(--pt-card);
        box-shadow: var(--pt-shadow-soft);
    }

    .pt-row:nth-child(even) .pt-row__media {
        order: 0;
    }

    .pt-row + .pt-row::before {
        display: none;
    }

    .pt-row__media {
        flex-basis: auto;
        width: 100%;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .pt-row__body {
        padding: 0 8px 10px;
    }

    .pt-row__text {
        -webkit-line-clamp: unset;
        display: block;
        overflow: visible;
    }

    .pt-post__cover {
        aspect-ratio: 4 / 3;
    }

    .pt-btn {
        width: 100%;
        min-height: 58px;
        padding: 14px 20px;
        font-size: 1.02rem;
        gap: 8px;
    }

    .pt-article > p:first-of-type::first-letter {
        font-size: 3rem;
    }
}
