/*
Theme Name: dds_tomlecancre.com
Author: Алиса Ветрова
Description: Культурологический онлайн-журнал о визуальном стиле и арт-дирекшне во французских видеоиграх.
Version: 1.1
Text Domain: tlc
*/

/* ============================================================
   Базовые переменные и сброс
   ============================================================ */
:root {
    --ink:        #16131c;
    --ink-soft:   #1d1927;
    --ink-card:   #221d2d;
    --line:       #342e42;
    --cream:      #ece4d6;
    --cream-dim:  #b3aa99;
    --cream-fade: #877f70;
    --gold:       #c9a45c;
    --gold-soft:  #ddc28a;
    --rose:       #c07e84;
    --teal:       #6f9a92;
    --shadow:     0 18px 40px -22px rgba(0,0,0,.75);
    --serif:      "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans:       "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--ink);
    color: var(--cream);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 12% -10%, rgba(192,126,132,.10), transparent 55%),
        radial-gradient(ellipse at 95% 0%, rgba(111,154,146,.10), transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.22;
    color: var(--cream);
    margin: 0 0 .55em;
    letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

a { color: var(--gold); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold-soft); }

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

/* ============================================================
   Контейнер ширины — единый источник
   ============================================================ */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}
.shell-wide { width: min(92%, 1340px); margin-inline: auto; }

/* ============================================================
   Шапка
   ============================================================ */
.site-head {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(34,29,45,.6), transparent);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 26px 0 22px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    text-decoration: none;
}
.brand-logo { width: 56px; height: 56px; display: block; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.32rem;
    color: var(--cream);
    line-height: 1.2;
    display: block;
    max-width: 46ch;
}
.brand-desc {
    color: var(--cream-fade);
    font-size: .8rem;
    margin-top: 4px;
    display: block;
    max-width: 60ch;
}

.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin: 0;
    padding: 0;
}
.main-nav a {
    display: inline-block;
    padding: 8px 14px;
    color: var(--cream-dim);
    font-size: .96rem;
    border-radius: 4px;
    letter-spacing: .02em;
}
.main-nav a:hover { color: var(--cream); background: rgba(201,164,92,.1); }
.main-nav .current-menu-item > a { color: var(--gold); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    color: var(--cream);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

/* ============================================================
   Каркас страниц
   ============================================================ */
.site-main { padding: 38px 0 60px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 46px;
    align-items: start;
}
.layout-single .content-area { width: 85%; margin-inline: auto; }
.layout-single .content-area.full { width: 100%; }

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 40px; }
    .layout-single .content-area { width: 100%; }
}

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: .85rem;
    color: var(--cream-fade);
    margin: 0 0 26px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.breadcrumbs a { color: var(--cream-dim); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { margin: 0 7px; color: var(--gold); }

/* ============================================================
   Карточки записей
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--ink-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb-fallback {
    aspect-ratio: 16 / 10;
    display: block;
    background:
        linear-gradient(135deg, rgba(201,164,92,.22), rgba(192,126,132,.18)),
        var(--ink-soft);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 24px;
}
.card-meta {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--gold);
    margin-bottom: 9px;
}
.card-title { font-size: 1.24rem; margin: 0 0 10px; }
.card-title a { color: var(--cream); }
.card-title a:hover { color: var(--gold-soft); }
.card-excerpt { color: var(--cream-dim); font-size: .95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 14px;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* Горизонтальная карточка (список архива) */
.card-row {
    flex-direction: row;
    align-items: stretch;
}
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-row .card-thumb-wrap .card-thumb-fallback {
    position: absolute;
    inset: 0;
    height: 100%;
}
@media (max-width: 600px) {
    .card-row { flex-direction: column; }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a { position: static; }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-row .card-thumb-wrap .card-thumb-fallback {
        position: static;
        aspect-ratio: 16 / 9;
        height: auto;
    }
}

.post-list { display: flex; flex-direction: column; gap: 26px; }

/* ============================================================
   Контент статьи
   ============================================================ */
.entry-header { margin-bottom: 26px; }
.entry-meta { color: var(--gold); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.entry-thumb { width: 100%; border-radius: 10px; margin: 0 0 28px; display: block; }
.entry-content { font-size: 1.06rem; }
.entry-content img { border-radius: 8px; display: block; }
.entry-content h2 { margin-top: 1.5em; }
.entry-content h3 { margin-top: 1.3em; }
.entry-content blockquote {
    border-left: 3px solid var(--gold);
    margin: 1.5em 0;
    padding: .4em 0 .4em 22px;
    color: var(--cream-dim);
    font-family: var(--serif);
    font-size: 1.18rem;
    font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* Таблицы */
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.5em 0; }
.entry-content table,
.entry-content th,
.entry-content td { border: 1px solid var(--line); }
.entry-content th, .entry-content td { padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--ink-soft); color: var(--gold-soft); }

/* ============================================================
   Сайдбар + виджеты
   ============================================================ */
.sidebar { min-width: 0; }
.widget {
    background: var(--ink-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px 22px 24px;
    margin-bottom: 26px;
    color: var(--cream);
}
.widget-title {
    font-family: var(--serif);
    font-size: 1.18rem;
    color: var(--cream);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px dashed var(--line); }
.widget li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.widget a { color: var(--cream-dim); }
.widget a:hover { color: var(--gold); }
.widget .post-date { display: block; color: var(--cream-fade); font-size: .78rem; margin-top: 3px; }

/* ============================================================
   Главная
   ============================================================ */
.hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 52px;
    border: 1px solid var(--line);
}
.hero-slider { position: relative; }
.slide {
    position: relative;
    display: none;
}
.slide.is-active { display: block; }
.slide img {
    width: 100%;
    height: clamp(320px, 52vh, 560px);
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 60px 7% 36px;
    background: linear-gradient(0deg, rgba(13,11,18,.92), transparent);
}
.slide-caption h2 { color: #fff; max-width: 22ch; }
.slide-caption p { color: var(--cream-dim); max-width: 56ch; margin: 0; }
.slider-dots {
    position: absolute;
    bottom: 18px; right: 7%;
    display: flex;
    gap: 9px;
    z-index: 2;
}
.slider-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.slider-dot.is-active { background: var(--gold); }
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(236,228,214,.35);
    background: rgba(22,19,28,.55);
    color: var(--cream);
    font-size: 1.3rem;
    cursor: pointer;
}
.slider-arrow.prev { left: 18px; }
.slider-arrow.next { right: 18px; }
.slider-arrow:hover { background: rgba(201,164,92,.3); }

.section { margin-bottom: 58px; }
.section-eyebrow {
    color: var(--gold);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.section-lead { color: var(--cream-dim); max-width: 70ch; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
    margin-top: 30px;
}
.feature {
    background: var(--ink-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
}
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.feature-body { padding: 20px 22px 24px; }
.feature-body h3 { color: var(--cream); }
.feature-body p { color: var(--cream-dim); font-size: .95rem; margin: 0; }

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 30px;
}
.split img { width: 100%; border-radius: 12px; display: block; aspect-ratio: 5 / 4; object-fit: cover; }
.split .split-text { min-width: 0; }
.split .split-text p { color: var(--cream-dim); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 26px; } }

.steps { counter-reset: step; margin-top: 26px; display: grid; gap: 18px; }
.step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 22px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--gold);
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
}
.step h3 { margin: 0 0 5px; font-size: 1.1rem; color: var(--cream); }
.step p { margin: 0; color: var(--cream-dim); font-size: .95rem; }

.home-posts-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 44px;
}
.pagination .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--cream-dim);
    background: var(--ink-card);
}
.pagination a.page-numbers:hover { border-color: var(--gold); color: var(--gold); }
.pagination .page-numbers.current {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    font-weight: 600;
}
.pagination .page-numbers.dots { border: none; background: none; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list li { margin-bottom: 22px; }
.comment-body {
    background: var(--ink-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
}
.comment-author { font-weight: 600; color: var(--cream); }
.comment-meta { font-size: .8rem; color: var(--cream-fade); margin-bottom: 8px; }
.comment-list .children { list-style: none; margin: 18px 0 0; padding-left: 26px; border-left: 1px solid var(--line); }
.comment-respond {
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 24px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--ink);
    border: 1px solid var(--line);
    color: var(--cream);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: .96rem;
    margin-top: 5px;
}
.comment-form label { font-size: .9rem; color: var(--cream-dim); }
.comment-form p { margin-bottom: 14px; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn, .form-submit input[type="submit"], .comment-form input[type="submit"], .search-submit, button.more-link {
    display: inline-block;
    background: var(--gold);
    color: var(--ink);
    border: 1px solid var(--gold);
    border-radius: 6px;
    padding: 11px 22px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    letter-spacing: .02em;
}
.btn:hover, .comment-form input[type="submit"]:hover, .search-submit:hover {
    background: var(--gold-soft);
    border-color: var(--gold-soft);
    color: var(--ink);
}
.btn-ghost {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}
.btn-ghost:hover { background: rgba(201,164,92,.12); color: var(--gold-soft); }

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form { display: flex; gap: 8px; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    background: var(--ink);
    border: 1px solid var(--line);
    color: var(--cream);
    border-radius: 6px;
    padding: 10px 13px;
    font-size: .96rem;
}

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: 30px 0 50px; }
.error-404 .code { font-family: var(--serif); font-size: clamp(4rem, 14vw, 8rem); color: var(--gold); line-height: 1; }
.error-404 .search-form { max-width: 460px; margin: 26px auto 0; }

/* ============================================================
   Контакты (статичные)
   ============================================================ */
.contact-block { margin-top: 22px; }
.contact-block a { font-weight: 600; }
.social-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.social-links a {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 16px;
    color: var(--cream-dim);
}
.social-links a:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   Подвал
   ============================================================ */
.site-foot {
    border-top: 1px solid var(--line);
    background: #100d15;
    padding: 50px 0 0;
    margin-top: 40px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr; gap: 30px; } }

/* Виджеты в подвале — тёмный фон, светлый текст (контраст) */
.site-foot .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--cream-dim);
}
.site-foot .widget-title { color: var(--gold-soft); border-bottom-color: var(--line); }
.site-foot .widget a { color: var(--cream-dim); }
.site-foot .widget a:hover { color: var(--gold); }
.site-foot .widget li { border-bottom: 1px dashed var(--line); }
.site-foot .widget .post-date { color: var(--cream-fade); }

.foot-bottom {
    margin-top: 44px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--cream-fade);
    font-size: .85rem;
}

/* ============================================================
   Cookie-баннер
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: var(--ink-card);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    max-width: 720px;
    margin-inline: auto;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: .9rem; color: var(--cream-dim); }
.cookie-banner button { white-space: nowrap; }

/* ============================================================
   Адаптив навигации
   ============================================================ */
@media (max-width: 760px) {
    .nav-toggle { display: inline-block; margin-left: auto; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { display: block; }
}
