/*
Theme Name: dds_domains-11.com
Author: Алексей Ковалёв
Description: Информационная тема для IT-компании, предоставляющей услуги разработки, технической поддержки и аутсорсинга. Тёмная инженерная палитра с акцентами глубокого индиго и неоново-синего, моноширинные и гротескные шрифты.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dds11
*/

/* ============================================================== *
 *  Переменные
 * ============================================================== */
:root {
    --bg:        #0a0f1a;
    --bg-2:      #0c1322;
    --panel:     #111827;
    --panel-2:   #1e293b;
    --line:      rgba(59, 130, 246, 0.22);
    --line-soft: rgba(148, 163, 184, 0.14);
    --accent:    #3b82f6;
    --indigo:    #4f46e5;
    --indigo-2:  #6366f1;
    --text:      #e6edf6;
    --muted:     #94a3b8;
    --muted-2:   #64748b;
    --white:     #ffffff;
    --glow:      0 0 18px rgba(59, 130, 246, 0.45);
    --radius:    4px;
    --shell:     1180px;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Карбоновая зернистая текстура для тёмных блоков */
.grain {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ============================================================== *
 *  Сброс и база
 * ============================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 500px at 12% -10%, rgba(79, 70, 229, 0.18), transparent 60%),
        radial-gradient(800px 480px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--indigo-2); }

h1, h2, h3, h4 {
    font-family: var(--sans);
    font-weight: 700;
    line-height: 1.22;
    color: var(--white);
    margin: 0 0 .6em;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

code, pre, kbd {
    font-family: var(--mono);
    font-size: .92em;
}
code {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .12em .4em;
    color: #c7d2fe;
}
pre {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    overflow: auto;
    line-height: 1.55;
}

/* ============================================================== *
 *  Контейнер ширины — единственный источник (см. A12.7)
 * ============================================================== */
.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

/* ============================================================== *
 *  Полоса загрузки (намёк на игровое прошлое)
 * ============================================================== */
.load-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 100%;
    z-index: 100;
    background: transparent;
    pointer-events: none;
}
.load-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--indigo), var(--accent));
    box-shadow: var(--glow);
    animation: dds11-load 1.1s ease forwards;
}
@keyframes dds11-load {
    0%   { width: 0; opacity: 1; }
    80%  { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

/* ============================================================== *
 *  Кнопки
 * ============================================================== */
.btn, .more-link, .wp-block-button__link {
    display: inline-block;
    font-family: var(--mono);
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .02em;
    padding: .68em 1.3em;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    background: rgba(59, 130, 246, 0.06);
    color: var(--text);
    cursor: pointer;
    transition: all .2s ease;
}
.btn:hover, .more-link:hover, .wp-block-button__link:hover {
    background: var(--indigo);
    border-color: var(--indigo);
    color: var(--white);
    box-shadow: var(--glow);
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}
.btn-secondary:hover {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
    box-shadow: none;
}

/* ============================================================== *
 *  Шапка
 * ============================================================== */
.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(10, 15, 26, 0.7);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.05rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.brand-logo, .brand-mark { display: block; flex: none; }
.brand-mark { width: 42px; height: 42px; }
.brand-text { min-width: 0; }
.brand-title {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--white);
    line-height: 1.2;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 46ch;
}
.brand-desc {
    display: none;
    font-size: .8rem;
    color: var(--muted);
}
.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.nav-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 1.3rem;
    flex-wrap: wrap;
}
.nav-menu a {
    color: var(--text);
    font-size: .94rem;
    font-weight: 500;
    padding: .3em 0;
    position: relative;
}
.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width .2s ease;
}
.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after { width: 100%; }
.nav-menu .current-menu-item > a { color: var(--white); }

.search-toggle {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: none;
    transition: all .2s ease;
}
.search-toggle:hover { color: var(--white); border-color: var(--accent); }
.header-search {
    border-top: 1px solid var(--line);
    background: var(--panel);
    padding: 1rem 0;
}
.header-search[hidden] { display: none !important; }

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    padding: .5em .7em;
    font-family: var(--mono);
    font-size: .85rem;
    cursor: pointer;
}

/* ============================================================== *
 *  Раскладки
 * ============================================================== */
.site-main { padding: 2.4rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single .content-area { width: 85%; max-width: 100%; }
.layout-single { display: block; }
.content-area { min-width: 0; }

/* Главная — без сайдбара, 85% */
.front-area { width: 85%; max-width: 100%; margin: 0; }

/* ============================================================== *
 *  Хлебные крошки
 * ============================================================== */
.breadcrumbs {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--line-soft);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--muted-2); margin: 0 .2em; }
.breadcrumbs span:last-child { color: var(--text); }

/* ============================================================== *
 *  Карточки записей (см. A8, A10)
 * ============================================================== */
.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-ph {
    aspect-ratio: 16 / 9;
    background: var(--panel-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-title { font-size: 1.12rem; margin-bottom: .5rem; }
.card-title a { color: var(--white); }
.card-title a:hover { color: var(--accent); }
.card-meta {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--muted);
    margin-bottom: .7rem;
}
.card-excerpt { color: var(--muted); font-size: .95rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card .more-link { align-self: flex-start; margin-top: 1rem; }

/* ============================================================== *
 *  Записи и страницы
 * ============================================================== */
.entry { 
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.9rem 2rem;
}
.entry-title { font-size: 2rem; }
.entry-meta {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}
.entry-thumb { margin: 0 0 1.6rem; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.04rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content h2, .entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.4em 0;
    padding: .4em 1.1em;
    color: var(--muted);
    background: var(--bg-2);
}
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* Таблицы */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.3em 0;
}
table, th, td { border: 1px solid var(--line); }
th, td { padding: .6em .8em; text-align: left; }
th { background: var(--panel-2); color: var(--white); }

/* ============================================================== *
 *  Сайдбар и виджеты
 * ============================================================== */
.sidebar { min-width: 0; }
.widget {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
}
.widget-title {
    font-family: var(--mono);
    font-size: .95rem;
    color: var(--white);
    margin: 0 0 .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
}
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--text); }
.sidebar .widget a { color: var(--accent); }
.sidebar .widget a:hover { color: var(--indigo-2); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
    padding: .45em 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: .92rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget .post-date,
.widget .rss-date { display: block; font-family: var(--mono); font-size: .74rem; color: var(--muted); }

/* ============================================================== *
 *  Главная — тематические секции
 * ============================================================== */
.section { margin-bottom: 3rem; }
.section-head { margin-bottom: 1.6rem; }
.section-kicker {
    font-family: var(--mono);
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: .5rem;
}
.section-title { font-size: 1.7rem; }
.section-lead { color: var(--muted); max-width: 70ch; }

.hero {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem 2.4rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.hero h1 { font-size: 2.5rem; max-width: 22ch; }
.hero p { color: var(--muted); max-width: 60ch; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.feature {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    min-width: 0;
}
.feature-icon {
    width: 40px; height: 40px;
    color: var(--accent);
    margin-bottom: 1rem;
}
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--muted); font-size: .94rem; margin: 0; }

.step-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
    counter-reset: step;
}
.step {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.3rem 1.4rem;
    min-width: 0;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    font-family: var(--mono);
    font-size: .9rem;
    color: var(--accent);
    display: block;
    margin-bottom: .7rem;
}
.step h3 { font-size: 1rem; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

.home-posts .card-list { margin-top: .4rem; }

/* ============================================================== *
 *  Комментарии
 * ============================================================== */
.comments-area { margin-top: 2.4rem; }
.comments-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.4rem; padding: 0; }
.comment-inner {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
}
.comment-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.comment-author { font-weight: 600; color: var(--white); }
.comment-date { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.comment-await { color: var(--accent); font-size: .85rem; }
.comment-reply a { font-family: var(--mono); font-size: .82rem; }

.comment-respond {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin-top: 1.6rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    padding: .65em .8em;
    font-family: var(--sans);
    font-size: .95rem;
    margin-top: .3em;
}
.comment-form label { font-size: .9rem; color: var(--muted); }
.comment-form textarea { min-height: 130px; }

/* ============================================================== *
 *  Форма поиска
 * ============================================================== */
.search-form { display: flex; gap: .6rem; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    padding: .65em .9em;
    font-family: var(--sans);
    font-size: .95rem;
}
.search-form .search-submit {
    font-family: var(--mono);
    border: 1px solid var(--accent);
    background: rgba(59, 130, 246, 0.06);
    color: var(--text);
    border-radius: var(--radius);
    padding: .65em 1.2em;
    cursor: pointer;
    transition: all .2s ease;
}
.search-form .search-submit:hover { background: var(--indigo); border-color: var(--indigo); color: var(--white); box-shadow: var(--glow); }

/* ============================================================== *
 *  Пагинация
 * ============================================================== */
.pagination { margin-top: 2.2rem; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7em;
    font-family: var(--mono);
    font-size: .88rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
}
.pagination a:hover { border-color: var(--accent); color: var(--white); }
.pagination .current {
    background: var(--indigo);
    border-color: var(--indigo);
    color: var(--white);
    box-shadow: var(--glow);
}

/* ============================================================== *
 *  Подвал
 * ============================================================== */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    padding: 2.6rem 0 1.6rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.site-footer .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}
.site-footer .widget-title { color: var(--white); border-bottom-color: var(--line); }
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: var(--muted); }
.site-footer .widget a { color: #cbd5e1; }
.site-footer .widget a:hover { color: var(--accent); }
.site-footer .widget ul li { border-bottom-color: var(--line-soft); }

.footer-contact { margin-top: .4rem; }
.footer-contact a { color: var(--accent); font-family: var(--mono); font-size: .92rem; }
.footer-social { display: flex; gap: .8rem; margin-top: 1rem; }
.footer-social a { color: var(--muted); }
.footer-social a:hover { color: var(--accent); }

.site-copyright {
    border-top: 1px solid var(--line-soft);
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--muted-2);
    text-align: center;
}

/* ============================================================== *
 *  Cookie-баннер (см. D6, A11)
 * ============================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 120;
    background: var(--panel);
    border-top: 1px solid var(--accent);
    box-shadow: 0 -8px 30px rgba(0,0,0,.4);
    padding: 1rem 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; flex: 1; min-width: 240px; font-size: .9rem; color: var(--muted); }
.cookie-inner p a { color: var(--accent); }

/* ============================================================== *
 *  404
 * ============================================================== */
.error-404 {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.4rem 2rem;
    text-align: center;
}
.error-404 .code {
    font-family: var(--mono);
    font-size: 4rem;
    color: var(--accent);
    line-height: 1;
}
.error-404 .search-form { max-width: 460px; margin: 1.6rem auto 0; }

/* ============================================================== *
 *  Адаптив
 * ============================================================== */
@media (min-width: 600px) {
    .brand-desc { display: block; }
}

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .front-area, .layout-single .content-area { width: 100%; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step-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; }
    .hero { padding: 2rem 1.4rem; }
    .hero h1 { font-size: 1.9rem; }
    .card-list { grid-template-columns: 1fr; }
    .feature-grid, .step-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .brand-title { font-size: .92rem; max-width: 20ch; }

    .menu-toggle { display: inline-block; }
    .header-nav { margin-left: auto; }
    .nav-menu {
        display: none;
        position: absolute;
        left: 0; right: 0;
        top: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--panel);
        border-top: 1px solid var(--line);
        padding: .6rem 0;
        z-index: 90;
    }
    .nav-menu.is-open { display: flex; }
    .nav-menu li { padding: 0 5%; }
    .site-header { position: relative; }
}
