/* ==========================================================================
   base.css — палитра, сброс, типографика, каркас страницы
   Шапка, меню, герой, хлебные крошки, кнопки, подвал, кнопка «наверх».
   Подключается на всех страницах первым.
   ========================================================================== */

/* --- Палитра и метрики. Единственное место, где заданы цвета сайта. ------ */

:root {
    /* Поверхности и текст */
    --bg: #34343a;
    --surface: #404046;
    --surface-2: #48484e;
    --surface-soft: rgba(64, 64, 70, .72);   /* полупрозрачная карточка поверх фона */
    --surface-dark: #2a2a30;                /* подложка под фото */
    --text: #ffffff;
    --text-soft: #e8e8ee;
    --muted: #cacad0;
    --dim: #8e8e94;

    /* Бирюзовый акцент: от самого лёгкого к самому плотному */
    --accent: #3ea294;
    --accent-dark: #2a8e80;
    --accent-wash: rgba(62, 162, 148, .08);        /* градиент на карточке */
    --accent-soft: rgba(62, 162, 148, .12);        /* фоновые пятна, кольцо фокуса */
    --accent-fill: rgba(62, 162, 148, .16);        /* заливки и активные состояния */
    --accent-line: rgba(62, 162, 148, .42);        /* рамка акцентного блока */
    --accent-line-hover: rgba(62, 162, 148, .5);   /* рамка при наведении */

    /* Фиолетовый акцент — блоки про документы */
    --purple: #a270a8;
    --purple-dark: #8e5c94;
    --purple-light: #deace4;
    --purple-wash: rgba(162, 112, 168, .09);
    --purple-soft: rgba(162, 112, 168, .16);
    --purple-line: rgba(162, 112, 168, .42);

    /* Синий акцент — официальные документы */
    --blue: #5c84c6;
    --blue-wash: rgba(92, 132, 198, .1);
    --blue-line-hover: rgba(92, 132, 198, .5);

    /* Линии, скругления, тени, метрики */
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(255, 255, 255, .15);
    --radius-sm: 6px;
    --radius: 9px;
    --shadow: 0 18px 36px rgba(0, 0, 0, .12);
    --shadow-lift: 0 24px 44px rgba(0, 0, 0, .2);
    --container: 1180px;
    --gap-section: 92px;
}

/* --- Шрифты -------------------------------------------------------------- */

@font-face {
    font-family: 'Rubik';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../font/Rubik-Regular.ttf) format('truetype');
}

@font-face {
    font-family: 'Rubik';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../font/Rubik-Bold.ttf) format('truetype');
}

@font-face {
    font-family: 'Line Awesome Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url(../font/la-solid-900.woff2) format('woff2');
}

/* Иконочный шрифт назначается точечно — только этим псевдоэлементам.
   Раньше правило было глобальным (:after, :before) и задевало все
   декоративные элементы нового дизайна. */
.logo::before,
.burger::before,
.phone::before,
.mail::before,
.map-marker::before,
.reestr::before,
.reestr::after,
.to-top::before {
    display: inline-block;
    font-family: 'Line Awesome Free';
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    text-rendering: optimizeLegibility;
}

/* --- Сброс --------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

input { font: inherit; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 'Rubik', Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --- Типографика --------------------------------------------------------- */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; }

h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(27px, 3.6vw, 42px); }
h3 { font-size: 20px; line-height: 1.3; }

/* Надзаголовок секции. Один класс на весь сайт. */
.kicker {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.kicker--purple { color: var(--purple-light); }

/* --- Каркас -------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

.page {
    padding-bottom: 86px;
    overflow: hidden;
    background:
        radial-gradient(circle at 4% 10%, var(--accent-soft), transparent 24%),
        radial-gradient(circle at 96% 58%, var(--purple-wash), transparent 25%),
        var(--bg);
}

/* --- Шапка --------------------------------------------------------------- */

.header {
    position: relative;
    overflow: hidden;
    background-image: var(--hero-image, url(../images/bg.jpg));
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.header > .container { position: relative; z-index: 1; }

.header__top { position: relative; }

.header__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 20px;
    padding-top: 20px;
}

.logo {
    position: relative;
    margin-right: auto;
    padding-left: 50px;
    font-size: 22px;
    font-weight: 700;
    line-height: 24px;
    text-transform: uppercase;
}

.logo::before {
    content: '\f7d9';
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    font-size: 44px;
}

.logo span {
    display: block;
    font-size: 16px;
    text-transform: none;
}

.header__phone {
    flex-basis: 100%;
    order: 3;
    padding-top: 18px;
    text-align: center;
    font-size: 18px;
}

.phone::before { content: '\f095'; }
.mail::before { content: '\f0e0'; }
.map-marker::before { content: '\f041'; }

.phone::before,
.mail::before,
.map-marker::before {
    width: 22px;
    margin-right: 4px;
    font-size: 20px;
    vertical-align: -2px;
}

.burger {
    width: 40px;
    height: 40px;
    font-size: 40px;
    line-height: 40px;
}

.burger::before { content: '\f0c9'; }
.burger[aria-expanded="true"]::before { content: '\f00d'; color: var(--purple-light); }

/* --- Меню ---------------------------------------------------------------- */

.nav {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 40;
    display: none;
    min-width: 240px;
    padding: 6px 24px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(0, 0, 0, .92);
}

.nav.is-open { display: block; }

.nav a {
    display: block;
    margin-top: 16px;
    overflow: hidden;
    font-size: 17px;
    line-height: 24px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav a:hover { color: var(--purple-light); }

/* --- Герой --------------------------------------------------------------- */

.hero {
    padding: 44px 0 72px;
    text-align: center;
}

.hero h1 { max-width: 920px; margin: 0 auto; }

.hero__lead {
    max-width: 760px;
    margin: 22px auto 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.62;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.hero__facts {
    display: grid;
    max-width: 900px;
    margin: 34px auto 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(5px);
}

.hero__facts li {
    padding: 17px;
    color: var(--muted);
    font-size: 12px;
    line-height: 17px;
}

.hero__facts strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 17px;
}

/* --- Кнопки -------------------------------------------------------------- */

.btn {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 26px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-align: center;
}

.btn--primary { background: var(--accent); color: var(--text); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn--ghost { color: var(--text); }
.btn--ghost:hover { background: var(--accent-fill); }

.btn--purple { background: var(--purple); border-color: var(--purple); color: var(--text); }
.btn--purple:hover { background: var(--purple-dark); border-color: var(--purple-dark); }

.btn--lg { min-height: 58px; font-size: 20px; }

/* --- Хлебные крошки ------------------------------------------------------ */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 20px;
    color: var(--dim);
    font-size: 13px;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

/* --- Подвал -------------------------------------------------------------- */

.footer {
    padding: 34px 0 46px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer .logo {
    display: inline-block;
    margin: 0 0 16px;
    text-align: left;
}

.footer p { margin-top: 12px; color: var(--muted); font-size: 15px; }
.footer p a { text-decoration: underline; }
.footer p a:hover { color: var(--accent); text-decoration: none; }

/* Только прямые потомки абзацев — иначе правило задело бы <span> в логотипе. */
.footer p > span { display: inline-block; margin: 0 10px; }

.footer__links > a,
.footer__links > span { margin-top: 12px; }

.reestr { margin-left: 6px; white-space: nowrap; }
.reestr::before { content: '\f022'; width: 22px; margin-right: 4px; font-size: 20px; vertical-align: -2px; }
.reestr::after { content: '\f061'; margin-left: 5px; font-size: 14px; transform: rotate(-45deg); }

/* --- Кнопка «наверх» ----------------------------------------------------- */

.to-top {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 60;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: rgba(0, 0, 0, .55);
    color: var(--text);
    font-size: 22px;
    line-height: 42px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease, background-color .2s ease;
}

.to-top::before { content: '\f106'; }
.to-top.is-visible { opacity: .92; visibility: visible; }
.to-top:hover { background: var(--accent); opacity: 1; }

/* --- Адаптив ------------------------------------------------------------- */

@media (min-width: 600px) {
    .hero__facts { grid-template-columns: repeat(3, 1fr); }
    .hero__facts li + li { border-left: 1px solid var(--line-strong); }
}

@media (min-width: 1020px) {
    .container { padding: 0 20px; }

    .burger { display: none; }

    .header__phone {
        flex-basis: auto;
        order: 0;
        padding-top: 0;
        font-size: 18px;
    }

    .nav {
        position: static;
        display: flex;
        justify-content: space-around;
        min-width: 0;
        margin-top: 20px;
        padding: 0 16px;
        border-radius: var(--radius);
        background: rgba(0, 0, 0, .42);
    }

    .nav a { margin: 0 12px; line-height: 60px; }

    .hero { padding: 48px 0 76px; }

    .to-top { right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: var(--radius-sm); line-height: 46px; }
}

@media (max-width: 499px) {
    .logo { font-size: 19px; padding-left: 44px; }
    .logo::before { width: 38px; font-size: 38px; }
    .logo span { font-size: 14px; }

    .hero { padding: 30px 0 56px; }
    .hero__actions .btn { width: 100%; }
    .page { padding-bottom: 64px; }
}
