/* ============================================================
   1. БАЗОВОЕ (дополнение к критическому CSS)
   ============================================================ */

::selection {
    background: rgba(75, 198, 255, .35);
    color: var(--text);
}

section[id],
div[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.wrapper-page { overflow: hidden; }

.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }

/* ============================================================
   2. HERO — дополнение
   ============================================================ */

.hero__fact b,
.hero__fact span { position: relative; z-index: 1; }

/* ============================================================
   3. О КОМПАНИИ
   ============================================================ */

.intro__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.intro-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(6, 21, 50, .05);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.intro-card:hover {
    transform: translateY(-4px);
    border-color: rgba(1, 59, 193, .25);
    box-shadow: var(--shadow);
}

.intro-card--wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 24px;
    background: linear-gradient(135deg, #f1f7ff 0%, #ffffff 62%);
}

.intro-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 15px;
    background: rgba(1, 59, 193, .08);
    color: var(--primary);
}
.intro-card__icon svg { width: 27px; height: 27px; }

.intro-card__big {
    display: block;
    margin-bottom: 4px;
    font-size: clamp(1.9rem, 2.6vw, 2.35rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--primary);
}

.intro-card h3 {
    margin: 18px 0 10px;
    font-size: 1.16rem;
    line-height: 1.32;
    font-weight: 700;
}
.intro-card--wide h3 { margin-top: 4px; }

.intro-card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.62;
}

/* ============================================================
   4. ПРОИЗВОДСТВЕННЫЕ МОЩНОСТИ
   ============================================================ */

.features__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    padding: 30px 26px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(1, 59, 193, .25);
    box-shadow: var(--shadow);
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 22px;
    border-radius: 17px;
    background: #edf4ff;
}
.feature-card__icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.feature-card h3 {
    margin: 0 0 14px;
    font-size: 1.08rem;
    line-height: 1.34;
    font-weight: 700;
}

.feature-card ul {
    display: grid;
    gap: 9px;
}
.feature-card li {
    position: relative;
    padding-left: 17px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.5;
}
.feature-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .58em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--accent-dark);
}

/* ============================================================
   5. УСЛУГИ
   ============================================================ */

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.service-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(6, 21, 50, .04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(1, 59, 193, .22);
    box-shadow: var(--shadow);
}

.service-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e7eef9;
}
.service-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 21, 50, 0) 58%, rgba(6, 21, 50, .22) 100%);
    pointer-events: none;
}
.service-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}
.service-card:hover .service-card__media img { transform: scale(1.04); }

.service-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 24px 26px 28px;
}
.service-card h3 {
    font-size: 1.1rem;
    line-height: 1.34;
    font-weight: 700;
}
.service-card p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.62;
}

/* ============================================================
   6. КОНТАКТЫ И КАРТА
   ============================================================ */

.contacts {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, #061532 0%, #08245c 58%, #013bc1 140%);
    color: #fff;
}
.contacts::before {
    content: "";
    position: absolute;
    top: -220px;
    right: -160px;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(75, 198, 255, .22) 0%, rgba(75, 198, 255, 0) 68%);
    pointer-events: none;
}
.contacts .container { position: relative; z-index: 1; }
.contacts .section-head__label { color: var(--accent); }
.contacts .section-head h2 { color: #fff; }

.contacts__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 44px;
    align-items: stretch;
}

.contacts__list {
    display: grid;
    gap: 14px;
    align-content: start;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transition: background .2s ease, border-color .2s ease;
}
.contact-item:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(75, 198, 255, .38);
}

.contact-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 13px;
    background: rgba(75, 198, 255, .14);
    color: var(--accent);
}
.contact-item__icon svg { width: 23px; height: 23px; }

.contact-item__label {
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .58);
}
.contact-item__value {
    font-size: 15.5px;
    line-height: 1.48;
    font-weight: 600;
    color: #fff;
}
.contact-item__value a { color: #fff; transition: color .2s ease; }
.contact-item__value a:hover { color: var(--accent); }

.contacts__map {
    display: flex;
    min-height: 100%;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    overflow: hidden;
}

.map {
    position: relative;
    width: 100%;
    min-height: 460px;
    background: #061532;
}
.map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.map__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 32px;
    text-align: center;
    background:
        linear-gradient(rgba(6, 21, 50, .74), rgba(6, 21, 50, .74)),
        repeating-linear-gradient(0deg, rgba(75, 198, 255, .16) 0 1px, transparent 1px 44px),
        repeating-linear-gradient(90deg, rgba(75, 198, 255, .16) 0 1px, transparent 1px 44px),
        radial-gradient(circle at 30% 18%, #0b3a86 0%, #061532 72%);
}
.map__pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: rgba(75, 198, 255, .16);
    border: 1px solid rgba(75, 198, 255, .4);
    color: var(--accent);
}
.map__pin svg { width: 28px; height: 28px; }
.map__placeholder strong {
    font-size: 1.06rem;
    font-weight: 700;
    color: #fff;
}
.map__placeholder span {
    font-size: 14px;
    color: rgba(255, 255, 255, .7);
}
.map__btn {
    height: 46px;
    margin-top: 14px;
    padding: 0 24px;
}

/* ============================================================
   7. ПОДВАЛ
   ============================================================ */

.footer {
    padding: 64px 0 28px;
    background: #071a44;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1.15fr;
    gap: 44px;
}

.footer__logo {
    display: inline-block;
    margin-bottom: 18px;
}
.footer__logo img {
    height: 44px;
    width: auto;
}

.footer__brand p {
    max-width: 340px;
    line-height: 1.65;
}

.footer__col h4 {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #fff;
}
.footer__col ul {
    display: grid;
    gap: 10px;
}
.footer__col li {
    line-height: 1.5;
    color: rgba(255, 255, 255, .68);
}
.footer__col a {
    color: rgba(255, 255, 255, .72);
    transition: color .2s ease;
}
.footer__col a:hover { color: var(--accent); }

.footer__legal-block {
    margin-top: 40px;
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .58);
}
.footer__legal-block p + p { margin-top: 2px; }

.footer-docs {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .62);
}
.footer-docs a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-size: 13px;
    white-space: normal;
    transition: color .2s ease;
}
.footer-docs a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.footer-docs__sep {
    display: inline-block;
    margin: 0 10px;
    color: rgba(255, 255, 255, .3);
}
.footer-docs__note {
    margin-top: 8px;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .56);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 30px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
}
.footer__bottom-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
}
.footer__bottom-city { color: rgba(255, 255, 255, .52); }
.footer__bottom-right { display: flex; align-items: center; gap: 18px; }
.footer__dev a {
    color: rgba(255, 255, 255, .78);
    transition: color .2s ease;
}
.footer__dev a:hover { color: var(--accent); }

/* ============================================================
   8. МОБИЛЬНОЕ МЕНЮ
   ============================================================ */

.mobile-menu.is-open { display: block; }

.mobile-menu__overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 14, 36, .58);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: overlayIn .25s ease;
}

.mobile-menu__panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(400px, 90vw);
    padding: 26px 24px 30px;
    background: #fff;
    box-shadow: -20px 0 60px rgba(6, 21, 50, .22);
    overflow-y: auto;
    animation: menuIn .28s ease;
}

.mobile-menu__close {
    align-self: flex-end;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 30px;
    line-height: 1;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: background .2s ease, color .2s ease;
}
.mobile-menu__close:hover {
    background: #e9f1fc;
    color: var(--primary);
}

.mobile-menu__nav {
    display: grid;
    gap: 2px;
    margin-top: 18px;
}
.mobile-menu__nav a {
    padding: 14px 2px;
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color .2s ease;
}
.mobile-menu__nav a:hover { color: var(--primary); }

.mobile-menu__contact {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 28px;
    font-size: 15px;
    font-weight: 600;
}
.mobile-menu__contact a { color: var(--primary); }

@keyframes menuIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   9. КНОПКА «НАВЕРХ»
   ============================================================ */

.scroll-up {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(1, 59, 193, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
}
.scroll-up svg { width: 20px; height: 20px; }
.scroll-up.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-up:hover { background: var(--primary-dark); }

/* ============================================================
   10. СТРАНИЦЫ ДОКУМЕНТОВ
   ============================================================ */

.doc-page__content {
    max-width: 900px;
    font-size: 15.5px;
    line-height: 1.75;
    color: #33415a;
}
.doc-page__content > :first-child { margin-top: 0; }

.doc-page__content h2 {
    margin: 38px 0 14px;
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
}
.doc-page__content h3 {
    margin: 26px 0 10px;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
}
.doc-page__content p { margin: 0 0 14px; }

.doc-page__content ul,
.doc-page__content ol {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    padding-left: 22px;
}
.doc-page__content ul { list-style: disc; }
.doc-page__content ol { list-style: decimal; }
.doc-page__content li { padding-left: 2px; }

.doc-page__content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.doc-page__content a:hover { color: var(--primary-dark); }

.doc-page__content strong { color: var(--text); font-weight: 600; }

.doc-page__info {
    margin: 22px 0;
    padding: 18px 22px;
    background: #f1f7ff;
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    font-size: 14.5px;
    color: #2c3c56;
}

.doc-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 34px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: #f1f7ff;
    border: 1px solid #dbe8fb;
    border-radius: 999px;
    transition: background .2s ease, border-color .2s ease;
}
.doc-back:hover {
    background: #e6f1ff;
    border-color: #c4dbf7;
}

/* ============================================================
   11. ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ
   ============================================================ */

html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
html.js .reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}
