/*
Theme Name: dds_bakodungamestudios.com
Author: Алексей Воронов
Description: Тема для студии архитектурной 3D-визуализации Bakodun Studios.
Version: 1.1
Text Domain: arviz
*/

/* ============================ TOKENS ============================ */
:root {
    --ink:      #12161f;
    --ink-2:    #1b2330;
    --paper:    #f5f7fa;
    --card:     #ffffff;
    --text:     #23303f;
    --muted:    #5b6b7d;
    --line:     #dde4ec;
    --accent:   #17b6a2;
    --accent-d: #0e8878;
    --warm:     #ff7a45;
    --dark-text:#c7d3df;
    --dark-mut: #8b9bad;
    --radius:   12px;
    --shell:    1180px;
    --shadow:   0 8px 28px rgba(18,22,31,.10);
}

/* ============================ BASE ============================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--paper);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-d); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; color: var(--ink); font-weight: 700; }
h1 { font-size: 2.1rem; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .5em; }

p { margin: 0 0 1.1em; }

.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================ HEADER ============================ */
.site-header {
    background: var(--ink);
    color: var(--dark-text);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}
.brand-logo, .brand svg.brand-logo { display: block; height: 46px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.02rem;
    color: #fff;
    line-height: 1.3;
    max-width: 640px;
}
.brand-name a { color: #fff; }
.brand-desc {
    display: block;
    font-size: .82rem;
    color: var(--dark-mut);
    margin-top: 4px;
    max-width: 720px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 1rem;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    color: var(--dark-text);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .95rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: rgba(23,182,162,.16);
    color: #fff;
    text-decoration: none;
}

/* ============================ LAYOUT ============================ */
.site-main { padding: 34px 0 50px; }

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

.content-area { min-width: 0; }

/* ============================ BREADCRUMBS ============================ */
.breadcrumbs {
    font-size: .86rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--accent-d); }
.breadcrumbs .sep { color: var(--line); margin: 0 4px; }

/* ============================ CARDS ============================ */
.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}
.card-thumb-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ink-2);
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.28rem; margin: 0 0 .35em; }
.card-title a { color: var(--ink); }
.card-meta {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .7em;
    letter-spacing: .02em;
}
.card-excerpt { color: var(--text); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    padding-top: 12px;
    font-weight: 700;
    color: var(--accent-d);
}

/* ============================ SINGLE / PAGE ============================ */
.entry {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 36px;
    box-shadow: var(--shadow);
}
.entry-header { margin-bottom: 18px; }
.entry-meta { font-size: .85rem; color: var(--muted); }
.entry-thumb { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { font-size: 1.04rem; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 18px 24px;
    background: #eef7f5;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    color: var(--ink-2);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-tags { margin-top: 24px; font-size: .88rem; color: var(--muted); }
.entry-tags a {
    display: inline-block;
    background: #eef2f6;
    padding: 4px 10px;
    border-radius: 6px;
    margin: 2px 4px 2px 0;
}

/* Таблицы в контенте */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: 10px 12px; text-align: left; }
.entry-content th { background: #eef2f6; }

/* ============================ SIDEBAR ============================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: var(--ink);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: none; }
.sidebar a { color: var(--text); font-weight: 600; }
.sidebar a:hover { color: var(--accent-d); }
.sidebar .post-date { display: block; font-size: .78rem; color: var(--muted); }

/* ============================ PAGINATION ============================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 34px 0 6px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-d);
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ============================ FRONT PAGE ============================ */
.front { }
.front-section { padding: 52px 0; }
.front-section:nth-child(even) { background: #eef2f6; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); }
.eyebrow {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent-d);
    font-weight: 700;
    margin-bottom: 8px;
}

/* Hero slider */
.hero {
    position: relative;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}
.slider {
    position: relative;
    min-height: 460px;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
    pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 40px 0 48px;
    background: linear-gradient(to top, rgba(10,14,20,.86), rgba(10,14,20,0));
}
.slide-caption .shell { }
.slide-caption h2 { color: #fff; font-size: 2rem; margin-bottom: .3em; max-width: 640px; }
.slide-caption p { color: #d5dee7; max-width: 560px; margin: 0; }
.slider-nav {
    position: absolute;
    bottom: 20px; right: 0;
    z-index: 3;
    display: flex;
    gap: 8px;
}
.slider-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    padding: 0;
}
.slider-dot.is-active { background: var(--accent); }

/* Text + illustration */
.split {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 44px;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); display: block; width: 100%; }
.split-body h2 { margin-bottom: .5em; }

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 22px;
}
.feature {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}
.feature-ico {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: #e3f5f1;
    margin-bottom: 14px;
}
.feature-ico svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: .4em; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 26px 22px 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.step-num {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); margin: 0; font-size: .94rem; }

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 22px;
    text-align: center;
}
.stat { padding: 22px 14px; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--accent-d); line-height: 1; }
.stat-label { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
}
.gallery-grid figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow);
}
.gallery-grid img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.gallery-grid figure:hover img { transform: scale(1.06); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 20px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    padding: 16px 0;
    list-style: none;
    color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--accent-d); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* CTA */
.fs-cta {
    background: linear-gradient(135deg, #12161f, #1b3a3a);
    color: #fff;
    padding: 46px 42px;
    border-radius: 16px;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #cdd8e2; max-width: 600px; margin: 0 auto 22px; }

/* Latest posts row on front */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 24px;
}
.latest-grid .card { margin-bottom: 0; }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 13px 26px;
    border-radius: 9px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.btn:hover { background: var(--accent-d); text-decoration: none; color: #fff; }
.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.6);
    color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.12); }

/* ============================ FOOTER ============================ */
.site-footer {
    background: var(--ink);
    color: var(--dark-text);
    padding: 48px 0 0;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 34px;
}
.site-footer .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 14px;
}
.site-footer .widget { margin-bottom: 0; }
.site-footer .widget p { color: var(--dark-mut); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 6px 0; }
.site-footer a { color: var(--dark-text); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.site-footer .widget-title,
.site-footer .post-date { color: #fff; }
.site-footer .post-date { color: var(--dark-mut); font-size: .78rem; }
.site-copy {
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    color: var(--dark-mut);
    font-size: .86rem;
}

/* ============================ SEARCH FORM ============================ */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}
.search-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
}

/* ============================ COMMENTS ============================ */
.comments-area { margin-top: 36px; }
.comments-title { margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 28px; padding: 0; }
.comment-body {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.comment-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: .85rem; }
.comment-author { font-weight: 700; color: var(--ink); }
.comment-date { color: var(--muted); }
.comment-reply a { font-weight: 600; font-size: .88rem; }
.comment-await { color: var(--warm); font-size: .85rem; }
.comment-respond {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px 24px;
    margin-top: 20px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    margin-top: 4px;
}
.comment-form p { margin-bottom: 14px; }
.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 26px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
}

/* ============================ 404 ============================ */
.error-404 {
    text-align: center;
    padding: 40px 0;
}
.error-404 .code { font-size: 5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.error-404 .search-form { max-width: 420px; margin: 24px auto; }

/* ============================ COOKIE BANNER ============================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--ink);
    color: var(--dark-text);
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,.12);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-banner p { margin: 0; font-size: .9rem; flex: 1 1 320px; min-width: 0; }
.cookie-banner a { color: var(--accent); }
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 24px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-with-sidebar .sidebar { order: 2; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .latest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }

    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a { padding: 12px 14px; }

    .layout-single .content-area { width: 100%; }
    .split { grid-template-columns: 1fr; gap: 24px; }
    .split.reverse .split-media { order: 0; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .latest-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }

    .entry { padding: 24px 20px; }
    .fs-cta { padding: 30px 22px; }
    .slider { min-height: 380px; }
    .slide-caption h2 { font-size: 1.5rem; }
    .front-section { padding: 40px 0; }
}
