/**
 * Artcore CMS
 *
 * @copyright (c) 2026 АРТЕФАКТ. Все права защищены.
 * @license   Проприетарная лицензия, см. LICENSE.txt
 */

/*
 * Шаблон «Стандартный». Значения цветов, шрифтов и отступов —
 * из макета docs/design/frontend-variants.html (вариант data-v="c").
 * Сетка и базовый вид элементов — в ядре (assets/builder/builder.css),
 * здесь только переменные и оформление шапки, подвала и страниц.
 */

/* Шрифты: Geologica (заголовки) и Inter (текст), SIL OFL 1.1, лежат в шаблоне. */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --bg: #ffffff; --fg: #111111; --mut: #6b6b66; --line: #e5e4df; --soft: #f4f3ef;
    --acc: #0071e3; --acc-ink: #0066cc; --acc-fg: #ffffff; --dark: #111111; --dark-fg: #bdbcb6;
    --r: 0px; --hw: 500; --h1: clamp(36px, 5.2vw, 64px);
    --fh: "Geologica", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --fb: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

    /* Переменные сетки конструктора */
    --ac-text: var(--fg); --ac-muted: var(--mut); --ac-line: var(--line); --ac-surface: var(--bg);
    --ac-soft: var(--soft); --ac-accent: var(--acc-ink); --ac-accent-text: var(--acc-fg);
    --ac-dark: var(--dark); --ac-dark-text: #f4f3ef; --ac-radius: 0px; --ac-container: 1160px;
    --ac-heading-font: var(--fh); --ac-heading-weight: var(--hw);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--fb); font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--fh); font-weight: var(--hw); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.w { max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--fg); color: #fff; padding: 8px 14px; border-radius: var(--r); }
.skip:focus { left: 16px; }

/* Служебная строка */
.util { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--mut); }
.util .w { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 20px; padding-block: 8px; }
.util a { text-decoration: none; }
.util-a11y { margin-left: auto; }
.util-a11y, .util-search { color: var(--fg); }
.util-phone { color: var(--fg); }
.langs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.langs a { color: var(--mut); text-decoration: none; }
.langs a:hover { color: var(--fg); }
.langs a[aria-current] { color: var(--fg); font-weight: 500; }

/* Шапка */
.hdr > .w { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; font-family: var(--fh); font-weight: var(--hw); font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
.brand small { display: block; font-family: var(--fb); font-weight: 400; font-size: 13px; color: var(--mut); letter-spacing: 0; margin-top: 2px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a:hover, .nav [aria-current], .nav .is-active > a { color: var(--acc-ink); }
.nav li { position: relative; }
.nav ul ul {
    display: none; position: absolute; z-index: 20; top: 100%; left: -14px; min-width: 220px; padding: 8px 0;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.nav ul ul a { display: block; padding: 6px 14px; }
.nav li:hover > ul, .nav li:focus-within > ul { display: block; }
.menu-separator { display: block; padding: 6px 14px; color: var(--mut); font-size: 13px; }
.menu-group { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.menu-group::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
.nav .is-active > .menu-group, .menu-group:hover { color: var(--acc-ink); }

/* Содержимое */
main.page { padding-block: 40px 88px; }
main.full { padding: 0; }
main.page h1 { font-size: var(--h1); margin: 0 0 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--mut); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.meta { color: var(--mut); font-size: 14px; margin: 0 0 24px; }
.meta a { color: inherit; }
.lead { font-size: 19px; color: #3d3d3a; }
/* Текст материала — во всю ширину блока страницы. */
.content { max-width: none; }
.content a { color: var(--acc-ink); }
.content blockquote { margin: 24px 0; padding-left: 20px; border-left: 2px solid var(--acc); }
.ql-align-center { text-align: center; } .ql-align-right { text-align: right; } .ql-align-justify { text-align: justify; }
.notice { background: var(--soft); padding: 10px 14px; border-radius: var(--r); font-size: 15px; }
.notice.w { margin-block: 16px; }

/* Списки материалов (категория, главная без конструктора) */
.cards { list-style: none; margin: 32px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 36px 28px; }
.cards li { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cards .media { display: block; aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.cards .media img { width: 100%; height: 100%; object-fit: cover; }
.cards time { font-size: 13px; color: var(--mut); }
.cards h2 { font-size: 18px; line-height: 1.3; margin: 0; }
.cards h2 a { text-decoration: none; }
.cards h2 a:hover { color: var(--acc-ink); }
.cards p { margin: 0; color: var(--mut); font-size: 14px; }
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; }
.pager a { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--fg); }

/* Подвал */
.ftr { background: var(--dark); color: var(--dark-fg); font-size: 15px; --ac-text: #ffffff; --ac-muted: var(--dark-fg); --ac-line: #3a3a42; }
.ftr .ac-heading { color: #fff; }
.ftr .ac-section { padding-top: var(--ac-pt, 56px); }
.ftr a { text-decoration: none; }
.ftr .ac-text ul { list-style: none; margin: 0; padding: 0; }
.ftr .ac-text li + li { margin-top: 6px; }
.ftr a:hover { color: #fff; }
.cp { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-block: 20px 28px; border-top: 1px solid #3a3a42; font-size: 13px; }
.social { display: flex; gap: 12px; }
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Элементы конструктора в духе макета */
.tpl-contrast .ac-heading.ac-size-huge { font-size: var(--h1); }
.tpl-contrast h2.ac-heading { font-size: 30px; }
.tpl-contrast .ac-btn-link { text-decoration: none; border-bottom: 1px solid currentColor; padding: 0 0 2px; border-radius: 0; }

@media (max-width: 700px) {
    :root { --h1: 32px; }
    .tpl-contrast h2.ac-heading { font-size: 25px; }
    .hdr > .w { gap: 12px 20px; padding-block: 14px; }
    .brand { font-size: 19px; }
    .nav > ul { gap: 4px 18px; }
    main.page { padding-block: 24px 56px; }
}
@media (prefers-reduced-motion: no-preference) {
    .nav a, .cards h2 a { transition: color .15s; }
}

/* Вертикальное фото в карточке: целиком поверх размытой копии самого себя */
.cards .media { position: relative; }
.cards .media.is-empty { background: #d6d5d0; }
.cards .media img.media-blur { position: absolute; inset: 0; filter: blur(18px); transform: scale(1.2); }
.cards .media img.media-whole { position: relative; object-fit: contain; }

/* Изображение во всю ширину текста (задаётся в редакторе) */
img.ac-img-full { display: block; width: 100%; height: auto; }
