@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600&family=Space+Grotesk:wght@400;500;600&display=swap');

/* ============================================
   Velvet Fold — журнальная тема
   ============================================ */

:root {
    --font-heading: 'Playfair Display', 'Times New Roman', serif;
    --font-body: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --ink: #1c1b20;
    --muted: #5c5a67;
    --canvas: #f7f4ef;
    --page: #ffffff;
    --accent: #b1184f;
    --accent-light: rgba(177, 24, 79, 0.18);
    --accent-dark: #6c0f31;
    --stroke: rgba(28, 27, 32, 0.1);
    --shadow: 0 30px 80px rgba(18, 18, 22, 0.12);
    --page-width: 1160px;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: radial-gradient(circle at top, rgba(177, 24, 79, 0.08), transparent 45%), var(--canvas);
    color: var(--ink);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    width: min(var(--page-width), 100%);
    margin: 48px auto 64px;
    background: var(--page);
    border-radius: 48px;
    padding: 48px clamp(20px, 5vw, 56px);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

.page::before {
    content: '';
    position: absolute;
    inset: 24px;
    border-radius: 36px;
    border: 1px solid rgba(28, 27, 32, 0.08);
    pointer-events: none;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Header & Footer
   ============================================ */

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 32px 0;
    position: relative;
}

.site-header::after,
.site-footer::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(28, 27, 32, 0.15), transparent);
}

.site-header::after {
    bottom: 0;
}

.site-footer::before {
    top: 0;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-weight: 600;
    font-family: var(--font-heading);
}

.brand-mark {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.brand-caption {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.site-nav {
    display: flex;
    gap: 18px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.site-nav a {
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--ink);
    border-color: var(--accent);
}

.search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(241, 237, 230, 0.6);
}

.search input {
    border: none;
    background: transparent;
    font-family: inherit;
    min-width: 220px;
}

.search input:focus {
    outline: none;
}

.search button {
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* Burger Menu */
.burger-button {
    color: var(--muted);
}

.burger-button:hover {
    color: var(--ink);
}

.burger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
}

.menu-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.menu-content {
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    border-left: 1px solid var(--stroke);
}

.menu-header {
    border-bottom: 1px solid var(--stroke);
}

.menu-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.menu-close {
    color: var(--muted);
}

.menu-close:hover {
    color: var(--ink);
}

.menu-search {
    border-bottom: 1px solid var(--stroke);
}

.menu-search form {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(241, 237, 230, 0.6);
}

.menu-search input {
    color: var(--ink);
}

.menu-search input::placeholder {
    color: var(--muted);
}

.menu-search button {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: 8px 18px;
    cursor: pointer;
}

.menu-nav {
    border-bottom: 1px solid var(--stroke);
}

.menu-nav a {
    color: var(--muted);
    font-size: 1rem;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.menu-nav a:hover,
.menu-nav a.active {
    color: var(--ink);
    border-color: var(--accent);
    font-weight: 600;
}

.menu-section-title {
    color: var(--muted);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.menu-list li a {
    color: var(--muted);
}

.menu-list li a:hover,
.menu-list li a.active {
    background: rgba(241, 237, 230, 0.6);
    color: var(--ink);
}

@media (max-width: 768px) {
    .menu-content {
        max-width: 100%;
    }
}

.footer-links {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

/* ============================================
   Utilities
   ============================================ */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(177, 24, 79, 0.35);
    color: var(--accent-dark);
    background: var(--accent-light);
}

.pill-outline {
    background: transparent;
    color: var(--muted);
}

.muted,
.description,
.excerpt,
.meta {
    color: var(--muted);
}

.meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 28px;
    border: 1px solid rgba(177, 24, 79, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: linear-gradient(120deg, #ff6b8a, var(--accent));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(177, 24, 79, 0.25);
}

.btn.secondary {
    background: rgba(28, 27, 32, 0.08);
    color: var(--ink);
    border: 1px solid var(--stroke);
}

.btn.ghost {
    background: rgba(241, 237, 230, 0.7);
}

.btn:hover {
    transform: translateY(-2px);
}

.load-more {
    display: flex;
}

.load-more-btn {
    margin: 0 auto;
    min-width: 240px;
}

.see-all,
.back-link,
.read-more {
    color: var(--accent-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ============================================
   Hero & Highlights
   ============================================ */

.hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 32px;
    padding: 32px;
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 244, 239, 0.85));
    color: var(--ink);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(177, 24, 79, 0.15);
    border-radius: 30px;
    pointer-events: none;
}

.hero-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.hero-feature {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-feature h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 2.4vw, 2.2rem);
    margin: 0;
    line-height: 1.3;
}

.hero-feature .lead {
    font-size: 1rem;
    color: var(--muted);
}

.hero-media {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(177, 24, 79, 0.18);
    box-shadow: 0 18px 40px rgba(18, 18, 22, 0.15);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bullets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--muted);
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.highlight-stack {
    border-radius: 28px;
    border: 1px solid var(--stroke);
    background: rgba(247, 244, 239, 0.7);
    padding: 0;
    overflow: hidden;
}

.highlight-card {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(28, 27, 32, 0.08);
}

.highlight-card:last-child {
    border-bottom: none;
}

.highlight-card h3 {
    margin: 8px 0;
}

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

.home-grid {
    gap: 0;
    border: 1px solid var(--stroke);
    border-radius: 36px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 36px rgba(18, 18, 22, 0.08);
}

.category-card {
    padding: 28px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--stroke);
    box-shadow: 0 12px 30px rgba(18, 18, 22, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-grid .category-card {
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 32px;
    position: relative;
}

.home-grid .category-card + .category-card {
    border-left: 1px solid rgba(28, 27, 32, 0.08);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-list li {
    border-top: 1px solid rgba(28, 27, 32, 0.08);
    padding-top: 10px;
}

.category-list-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

/* ============================================
   Cards & Lists
   ============================================ */

.search-page,
.category-page,
.article-page,
.article-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-item,
.article-card {
    border: 1px solid var(--stroke);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    box-shadow: 0 8px 24px rgba(18, 18, 22, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-item:hover,
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(18, 18, 22, 0.12);
}

.article-card a,
.article-card .card-link,
.search-item a {
    display: flex;
    gap: 18px;
    color: inherit;
}

.category-hero .hero-link {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    gap: 32px;
}

.hero-feature .feature-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.highlight-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.category-lead-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.cover {
    width: 160px;
    flex-shrink: 0;
    border-radius: 22px;
    overflow: hidden;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   Article & Category Hero
   ============================================ */

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: rgba(28, 27, 32, 0.7);
    flex-wrap: wrap;
}

.article-date {
    color: rgba(28, 27, 32, 0.7);
}

.article-separator {
    color: rgba(28, 27, 32, 0.5);
}

.article-category,
.article-tag {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.article-category:hover,
.article-tag:hover {
    opacity: 0.7;
}

.article-tag-separator {
    color: rgba(28, 27, 32, 0.5);
}

.article-header {
    margin-bottom: 24px;
}

.article-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(32px, 2vw, 35px);
    font-weight: 900;
    margin: 0 0 12px;
}

.article-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(28, 27, 32, 0.8);
    line-height: 1.6;
}

.article-cover {
    margin: 24px 0;
}

.article-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.article-body {
    margin: 24px 0;
    line-height: 1.8;
}

.rich-text-block {
    padding: 0;
    line-height: 1.8;
}

.article-author {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(28, 27, 32, 0.08);
    font-size: 0.9rem;
    color: rgba(28, 27, 32, 0.7);
}

.article-author-label {
    font-weight: 600;
    margin-right: 8px;
}

.article-author-name {
    color: rgba(28, 27, 32, 0.95);
}

.category-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    padding: 36px;
    border-radius: 36px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.95);
}

.hero-copy h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    margin: 0;
}

.hero-cover img {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    object-fit: cover;
}

.rich-text-block code {
    background: rgba(177, 24, 79, 0.12);
    padding: 2px 6px;
    border-radius: 6px;
}

/* ============================================
   Content Layout
   ============================================ */

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-layout__details {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.content-layout__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-layout__sticky {
    position: sticky;
    top: 24px;
}

@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .content-layout__sticky {
        position: static;
    }
}

/* ============================================
   Страница автора
   ============================================ */

.author-header {
    padding-bottom: 1.5rem;
}

.author-info {
    max-width: 100%;
}

.author-name {
    font-size: 23px;
    font-weight: 900;
    line-height: 29px;
    margin: 0 0 1rem 0;
}

.author-caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
}

.author-separator {
    color: var(--muted);
}

.author-caption-text {
    font-size: 0.9rem;
}

.author-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ============================================
   Error
   ============================================ */

.error {
    padding: 48px;
    display: flex;
    justify-content: center;
}

.error .panel {
    width: min(860px, 100%);
    padding: 48px;
    border-radius: 40px;
    border: 1px solid rgba(28, 27, 32, 0.12);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 32px 70px rgba(18, 18, 22, 0.18);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.error .card {
    border-radius: 26px;
    border: 1px dashed rgba(177, 24, 79, 0.35);
    padding: 20px;
    background: rgba(177, 24, 79, 0.04);
}

/* ============================================
   States
   ============================================ */

.loader,
.empty {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.loader-full {
    width: 100%;
    justify-content: center;
    padding: 48px 24px;
}

.loader-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
    animation: pulse 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(177, 24, 79, 0.3);
    border-top-color: var(--accent);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Sidebar Top News Widget
   ============================================ */

.sidebar-topnews {
    background-color: var(--page);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--stroke);
}

.sidebar-topnews__title {
    border-bottom: 2px solid var(--accent);
    font: 800 17px/20px var(--font-heading);
    padding-bottom: 16px;
    color: var(--ink);
}

.sidebar-topnews__topics {
    border-bottom: 1px solid var(--stroke);
    padding-bottom: 12px;
}

.sidebar-topnews__topics:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-topnews .btn {
    display: block;
    margin: 16px auto 0;
    max-width: max-content;
}

/* ============================================
   Card Mini Component
   ============================================ */

.card-mini {
    border-bottom: 1px solid var(--stroke);
    display: -webkit-box;
    display: flex;
    padding: 10px 0;
    text-decoration: none;
}

.card-mini:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.card-mini__image-wrap {
    -webkit-box-ordinal-group: 2;
    border-radius: 8px;
    height: 40px;
    margin: 4px 0 -4px 10px;
    min-width: 40px;
    order: 1;
    overflow: hidden;
    width: 40px;
}

.card-mini__image {
    height: auto;
    line-height: 0;
    width: 40px;
}

.card-mini__text {
    -webkit-box-flex: 1;
    flex-grow: 1;
}

.card-mini__title {
    color: var(--ink);
    display: inline;
    font: 400 14px/1.25 var(--font-body);
    -webkit-transition: color 0.2s ease-out;
    transition: color 0.2s ease-out;
    margin: 0;
}

.card-mini__title:after {
    content: ' ';
}

.card-mini:visited .card-mini__title {
    color: var(--muted);
}

@supports (-moz-appearance: none) {
    .card-mini:visited .card-mini__title {
        color: var(--ink);
    }
}

.card-mini:hover .card-mini__title {
    color: var(--accent);
}

.card-mini__info {
    -webkit-box-align: center;
    align-items: center;
    color: var(--muted);
    display: -webkit-box;
    display: flex;
    flex-wrap: wrap;
    font: 400 10px/1.35 var(--font-body);
    margin-top: 3px;
}

.card-mini__info-item {
    margin-right: 5px;
}

.card-mini__icon {
    height: 14px;
    margin-right: 5px;
    vertical-align: middle;
    width: 14px;
}

.card-mini__icon:last-child {
    margin-right: 0;
}

.card-mini__icon._play {
    fill: var(--accent);
}

.card-mini__icon._external {
    color: var(--muted);
    height: 15px;
}

.card-mini__icon._exclusive {
    height: 16px;
    margin-bottom: -1px;
    margin-top: -1px;
    width: 16px;
}

.card-mini__icon._partner {
    height: 14px;
    max-width: 80px;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
}

.card-mini__ad-title {
    -webkit-box-ordinal-group: 0;
    background-color: rgba(28, 27, 32, 0.1);
    border-radius: 4px;
    color: var(--muted);
    font: 400 10px/1.35 var(--font-body);
    order: -1;
    padding: 1px 5px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1200px) {
    .page {
        margin: 32px auto;
        border-radius: 36px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

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

    .article-card a,
    .search-item a {
        flex-direction: column;
    }

    .cover {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .page {
        padding: 32px 18px;
        border-radius: 28px;
    }

    .site-header,
    .site-footer {
        padding: 24px 0;
    }

    .site-nav {
        flex-wrap: wrap;
        letter-spacing: 0.12em;
    }

    .search input {
        min-width: 140px;
    }

    .grid,
    .home-grid {
        grid-template-columns: 1fr;
    }
}

