/* ============================================================================
   Стили для блоков, добавленных по требованиям приказа Минцифры РФ № 511.
   Подключается во всех layout (default, home, product).
   ============================================================================ */

/* ============================================================================
   Hero — анимированный фон (animated GIF / WebP из дизайна).
   Прижимаем к низу секции и не апскейлим выше нативного 1280×768,
   чтобы не было размытия. Контент остаётся в верхней части.
   ============================================================================ */
.hero-spline-background {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    display: flex !important;
    justify-content: center;
    align-items: flex-end;
}
.hero-anim {
    display: block;
    width: 100%;
    max-width: 1280px;
    line-height: 0;
    margin: 0 auto;
    /* Сдвиг чуть-чуть вправо для визуального центрирования чипа под текстом */
    transform: translateX(40px);
}
.hero-anim img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    object-position: center bottom;
    image-rendering: auto;
}
/* На больших экранах не апскейлим картинку выше её нативного размера */
@media (min-width: 1281px) {
    .hero-anim img {
        max-width: 1280px;
        width: auto;
    }
}
@media (max-width: 768px) {
    .hero-anim {
        transform: translateX(15px);
    }
}
/* На маленьких экранах ужимаем под половину высоты, чтобы текст не накладывался */
@media (max-width: 768px) {
    .hero-anim img {
        max-height: 45vh;
    }
}
/* Контент hero должен быть поверх фоновой анимации */
.hero .hero-content {
    position: relative;
    z-index: 1;
}

.cyber-anim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

/* Корпус чипа — циклическое «нажатие» */
.ca-chip {
    transform-box: fill-box;
    transform-origin: 600px 360px;
    animation: caChipPress 3s ease-in-out infinite;
}
.ca-chip-body {
    transform-box: fill-box;
    transform-origin: center;
    animation: caChipShadow 3s ease-in-out infinite;
}
@keyframes caChipPress {
    0%, 30%, 100% { transform: translateY(0) scale(1);     }
    35%           { transform: translateY(3px) scale(0.97); }
    50%           { transform: translateY(0) scale(1);     }
}
@keyframes caChipShadow {
    0%, 30%, 100% { filter: drop-shadow(0 0 0 rgba(236, 30, 36, 0)); }
    35%           { filter: drop-shadow(0 0 22px rgba(236, 30, 36, 0.9)); }
    50%           { filter: drop-shadow(0 0 12px rgba(236, 30, 36, 0.45)); }
    80%           { filter: drop-shadow(0 0 0 rgba(236, 30, 36, 0)); }
}

/* Красное свечение под чипом — вспыхивает в момент нажатия */
.ca-press-glow {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: caPressGlow 3s ease-out infinite;
}
@keyframes caPressGlow {
    0%, 30%, 100% { opacity: 0;    transform: scale(0.7); }
    35%           { opacity: 1;    transform: scale(1);   }
    70%           { opacity: 0.25; transform: scale(1.3); }
    90%           { opacity: 0;    transform: scale(1.5); }
}

/* «Мозг» — лёгкое мерцание линий */
.ca-brain {
    animation: caBrainGlow 3s ease-in-out infinite;
}
@keyframes caBrainGlow {
    0%, 100% { opacity: 0.85; }
    35%      { opacity: 1;    }
    70%      { opacity: 0.7;  }
}

/* Нейроны (точки внутри мозга) — мерцают вразнобой */
.ca-neuron { animation: caNeuron 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ca-neurons .ca-neuron:nth-child(1) { animation-delay: 0s;   }
.ca-neurons .ca-neuron:nth-child(2) { animation-delay: 0.2s; }
.ca-neurons .ca-neuron:nth-child(3) { animation-delay: 0.4s; }
.ca-neurons .ca-neuron:nth-child(4) { animation-delay: 0.6s; }
.ca-neurons .ca-neuron:nth-child(5) { animation-delay: 0.8s; }
.ca-neurons .ca-neuron:nth-child(6) { animation-delay: 1.0s; }
.ca-neurons .ca-neuron:nth-child(7) { animation-delay: 1.2s; }
.ca-neurons .ca-neuron:nth-child(8) { animation-delay: 1.4s; }
@keyframes caNeuron {
    0%, 100% { opacity: 0.25; transform: scale(0.7); }
    50%      { opacity: 1;    transform: scale(1.4); }
}

/* Концевые точки трасс — вспыхивают, когда добежит импульс */
.ca-endpoint {
    transform-box: fill-box;
    transform-origin: center;
    animation: caEndpoint 2.5s ease-in-out infinite;
}
@keyframes caEndpoint {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50%      { opacity: 1;    transform: scale(1.6); }
}

/* Адаптив + reduce-motion */
@media (max-width: 768px) {
    .ca-chip { transform-origin: center; }
}
@media (prefers-reduced-motion: reduce) {
    .cyber-anim * { animation: none !important; }
}

/* --- Юридические страницы /offer и /privacy: общая обёртка --- */
.legal-page {
    padding: 140px 0 80px;
    color: #fff;
}
.legal-page .section-title {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: #fff;
}
.legal-page__updated {
    color: var(--color-text-muted, #acacac);
    font-size: 0.9rem;
    margin-bottom: 32px;
}
.legal-page p {
    line-height: 1.6;
    color: #fff;
    margin: 0 0 12px;
}
.legal-page a {
    color: var(--color-accent, #59c2ff);
    text-decoration: none;
}
.legal-page a:hover {
    text-decoration: underline;
}
.legal-page .company-page__h2 {
    font-size: 1.4rem;
    margin: 36px 0 14px;
    border-bottom: 1px solid var(--color-border, #343434);
    padding-bottom: 8px;
    color: #fff;
}
@media (max-width: 768px) {
    .legal-page {
        padding: 100px 16px 60px;
    }
    .legal-page .section-title {
        font-size: 1.5rem;
    }
    .legal-page .company-page__h2 {
        font-size: 1.15rem;
    }
}

/* --- Раздел «Услуги»: заголовок рядом с иконкой --- */
.services-section .services-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}
.services-section-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
}
@media (max-width: 640px) {
    .services-section .services-header {
        gap: 14px;
    }
    .services-section-title {
        font-size: 1.4rem;
    }
}

/* --- Cookie consent banner --- */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    background: rgba(20, 25, 35, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--color-border, #343434);
    border-radius: 18px;
    padding: 18px 22px;
    color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 1100px;
    margin: 0 auto;
}
.cookie-banner--visible {
    transform: translateY(0);
    opacity: 1;
}
.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-banner__text {
    flex: 1 1 320px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--color-text-muted, #cfd6df);
}
.cookie-banner__text strong { color: #fff; margin-right: 4px; }
.cookie-banner__text a { color: var(--color-accent, #59c2ff); text-decoration: none; }
.cookie-banner__text a:hover { text-decoration: underline; }
.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cookie-banner__accept {
    padding: 12px 28px;
    font-size: 0.95rem;
    border-radius: 999px;
}
.cookie-banner__decline {
    padding: 12px 22px;
    font-size: 0.9rem;
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-muted, #cfd6df);
    border: 1px solid var(--color-border, #343434);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.cookie-banner__decline:hover {
    color: #fff;
    border-color: #fff;
}
@media (max-width: 640px) {
    .cookie-banner { padding: 14px 16px; }
    .cookie-banner__inner { gap: 12px; }
    .cookie-banner__accept, .cookie-banner__decline { flex: 1; }
}

/* --- Кнопки "Получить консультацию" и т. п. — без подчёркивания --- */
a.btn-primary,
.btn-primary,
a.btn-center,
a.btn-about,
.btn-about {
    text-decoration: none !important;
}
a.btn-primary:hover,
.btn-primary:hover,
a.btn-center:hover,
a.btn-about:hover,
.btn-about:hover {
    text-decoration: none !important;
}

/* --- Серые и не-кликабельные элементы навигации (OFFTac, Блог) --- */
.nav-submenu-link--soon,
.mobile-submenu-link--soon,
.nav-link--soon,
.mobile-nav-link--soon,
.footer-link--soon {
    color: #6c7280 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.7;
}

/* --- Карточка продукта в статусе «скоро» (OFFTac) --- */
.btn-about--soon {
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border, #343434);
    filter: blur(1.6px);
    opacity: 0.85;
    transition: filter 0.25s ease, opacity 0.25s ease;
}
.btn-about--soon span {
    color: #fff;
}
/* При наведении на саму карточку — снимаем размытие, чтобы пользователь
   смог прочитать текст. Поведение «не кликабельно» сохраняется. */
.product-card--soon:hover .btn-about--soon {
    filter: blur(0);
    opacity: 1;
}

/* --- Оценка защищённости: тире перед каждым пунктом списка.
       Перебиваем дефолтный ::before из project.css, где стоит bullet.png 10×10. --- */
.assessment-list {
    list-style: none;
    padding-left: 0;
}
.assessment-list li {
    position: relative;
    padding-left: 22px;
}
.assessment-list li::before {
    content: "—" !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent, #59c2ff);
    font-weight: 700;
    font-size: 1em;
    line-height: inherit;
}

/* --- Форма заявки: honeypot и textarea --- */
.ow-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
.form-textarea {
    width: 100%;
    min-height: 100px;
    margin-top: 16px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 12px 14px;
}

/* --- AJAX form result block --- */
.form-result-slot {
    margin-top: 16px;
    min-height: 0;
}
.form-result {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.form-result--ok {
    background: rgba(89, 194, 255, 0.12);
    border: 1px solid var(--color-accent);
    color: #fff;
}

/* --- Подсветка не заполненных обязательных полей --- */
.ow-input-error {
    border: 1.5px solid #EC1E24 !important;
    box-shadow: 0 0 0 3px rgba(236, 30, 36, 0.18) !important;
    background-color: rgba(236, 30, 36, 0.06) !important;
}
.form-checkbox input.ow-input-error + label {
    color: #EC1E24;
}
/* Чекбокс — обводим саму галочку */
input[type="checkbox"].ow-input-error {
    outline: 2px solid #EC1E24;
    outline-offset: 2px;
}

/* --- Success block с зелёной галочкой --- */
.form-success {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 22px 14px 14px;
    border-radius: 12px;
    background: rgba(30, 184, 84, 0.12);
    border: 1px solid #1eb854;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.45;
    animation: owSuccessIn 0.32s ease-out;
}
.form-success__check {
    display: inline-flex;
    flex-shrink: 0;
}
.form-success__text {
    color: #fff;
}
@keyframes owSuccessIn {
    from { transform: translateY(6px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

/* --- Inline brand logo --- */
.logo .brand-logo,
.footer-logo .brand-logo {
    display: block;
    width: 100%;
    height: auto;
    max-width: 210px;
}


/* --- Footer: блок реквизитов --- */
.footer-legal {
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
    margin-top: 32px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-legal p {
    margin: 0 0 6px 0;
}

.footer-legal a {
    color: var(--color-accent);
    text-decoration: none;
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* --- Страница «Сведения о компании» --- */
.company-page {
    padding: 140px 0 80px;
    color: #fff;
}

.company-page .section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #fff;
}

.company-page__legal-note {
    background: var(--color-bg-card);
    border-left: 3px solid var(--color-accent);
    padding: 16px 20px;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.company-page__h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 40px 0 16px;
    color: #fff;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

.company-page__details {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 12px 30px;
    margin-bottom: 16px;
}

.company-page__details dt {
    color: var(--color-text-muted);
    font-weight: 500;
}

.company-page__details dd {
    color: #fff;
    margin: 0;
    word-break: break-word;
}

.company-page__list {
    list-style: disc;
    padding-left: 24px;
    margin: 12px 0;
}

.company-page__list li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.company-page__list a {
    color: var(--color-accent);
    text-decoration: none;
}

.company-page__list a:hover {
    text-decoration: underline;
}

.company-page__table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--color-bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.company-page__table th,
.company-page__table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.company-page__table th {
    background: var(--color-bg-dark);
    color: #fff;
    font-weight: 600;
    text-transform: none;
}

.company-page__table tr:last-child td {
    border-bottom: none;
}

.company-page__table td:nth-child(2) {
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
}

.company-page__updated {
    margin-top: 60px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: right;
}

.company-page a[href^="mailto:"],
.company-page a[href^="tel:"] {
    color: var(--color-accent);
    text-decoration: none;
}

.company-page a[href^="mailto:"]:hover,
.company-page a[href^="tel:"]:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .company-page {
        padding: 100px 16px 60px;
    }
    .company-page .section-title {
        font-size: 1.6rem;
    }
    .company-page__h2 {
        font-size: 1.2rem;
    }
    .company-page__details {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    .company-page__details dt {
        margin-top: 12px;
    }
    .company-page__table {
        font-size: 0.85rem;
    }
    .company-page__table th,
    .company-page__table td {
        padding: 10px 12px;
    }
    .company-page__table td:nth-child(2) {
        white-space: normal;
    }
}
