/*
 * БИС — эффекты интерфейса: наведение, нажатие, появление блоков.
 * Подключается последним и переопределяет базовые подчёркивания.
 */

:root {
    --bis-ease: cubic-bezier(.65, 0, .35, 1);
    --bis-ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* Подчёркивания при наведении убраны — вместо них заливка */
.bis-site-header a:hover,
.bis-site-footer a:hover,
.bis-link:hover,
.bis-news h3 a:hover,
.bis-public-page .bis-public-link:hover { text-decoration: none; }

/* ---------- Шапка: липкая, с тенью после прокрутки ---------- */
.bis-site-header {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 50;
    transition: box-shadow .35s ease, background-color .35s ease;
}
.bis-site-header.is-scrolled {
    background: rgb(255 255 255 / 92%);
    box-shadow: 0 10px 30px rgb(18 53 66 / 12%);
    backdrop-filter: saturate(1.4) blur(10px);
}
@media (max-width: 782px) {
    .bis-site-header { top: 0; }
}

/* ---------- Пункты меню: плавная оранжевая подложка ---------- */
.bis-menu { gap: clamp(2px, .8vw, 10px); }
.bis-menu > li > a,
.bis-submenu > summary,
.bis-header-phone,
.bis-site-nav .sub-menu a {
    position: relative;
    isolation: isolate;
    padding-inline: 12px;
    border-radius: 4px;
    transition: color .3s ease;
}
.bis-menu > li > a::before,
.bis-submenu > summary::before,
.bis-header-phone::before,
.bis-site-nav .sub-menu a::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 5px 0;
    border-radius: inherit;
    background: var(--bis-accent);
    opacity: 0;
    transition: opacity .25s ease;
}
.bis-site-nav .sub-menu a::before { inset: 3px -6px; }
.bis-menu > li > a:is(:hover, :focus-visible)::before,
.bis-submenu > summary:is(:hover, :focus-visible)::before,
.bis-submenu[open] > summary::before,
.bis-header-phone:is(:hover, :focus-visible)::before,
.bis-site-nav .sub-menu a:is(:hover, :focus-visible)::before,
.bis-menu .current-menu-item > a::before { opacity: 1; }

/* Компьютер: пункт меню закрашивается на всю высоту шапки */
@media (min-width: 861px) {
    .bis-header-inner { align-items: stretch; }
    .bis-site-brand, .bis-header-actions { align-self: center; }
    .bis-site-nav { display: flex; }
    .bis-menu { align-items: stretch; gap: 0; }
    .bis-menu > li { display: flex; }
    .bis-menu > li > a,
    .bis-submenu > summary { height: 100%; padding-inline: clamp(12px, 1.4vw, 20px); border-radius: 0; }
    .bis-submenu { display: flex; }
    .bis-menu > li > a::before,
    .bis-submenu > summary::before { inset: 0; border-radius: 0; }
    .bis-site-nav .sub-menu { inset: 100% auto auto 0; border-top: 0; }
}
.bis-chevron { transition: transform .35s var(--bis-ease); }

/* Выпадающее меню «О компании» появляется плавно */
.bis-submenu[open] > .sub-menu { animation: bis-drop .32s var(--bis-ease-out) both; }
.bis-site-nav .sub-menu { padding-inline: 18px; }

/* ---------- Основная кнопка: блик, свечение, нажатие ---------- */
.bis-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 0;
    cursor: pointer;
    transition: transform .25s var(--bis-ease-out), box-shadow .35s ease, background-color .3s ease;
}
.bis-button:hover,
.bis-button:focus-visible {
    background: #ffa53f;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgb(255 149 31 / 38%);
}
.bis-button:active {
    transform: translateY(0) scale(.97);
    box-shadow: 0 4px 12px rgb(255 149 31 / 30%);
    transition-duration: .08s;
}

/* Стрелка уезжает вправо */
.bis-button img,
.bis-link img,
.bis-public-link .bis-public-arrow { transition: transform .35s var(--bis-ease-out), filter .3s ease; }
.bis-button:is(:hover, :focus-visible) img,
.bis-link:is(:hover, :focus-visible) img,
.bis-public-link:is(:hover, :focus-visible) .bis-public-arrow { transform: translateX(5px); }

/* ---------- Второстепенная кнопка: контур и заливка слева ---------- */
.bis-link,
.bis-public-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgb(18 53 66 / 22%);
    border-radius: 4px;
    transition: color .3s ease, border-color .3s ease, transform .25s var(--bis-ease-out);
}
.bis-link::before,
.bis-public-link::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--bis-accent);
    opacity: 0;
    transition: opacity .25s ease;
}
.bis-link:is(:hover, :focus-visible),
.bis-public-link:is(:hover, :focus-visible) {
    color: var(--bis-dark);
    border-color: var(--bis-accent);
}
.bis-link:is(:hover, :focus-visible)::before,
.bis-public-link:is(:hover, :focus-visible)::before { opacity: 1; }
.bis-link:active,
.bis-public-link:active { transform: scale(.96); transition-duration: .08s; }

/* На тёмном фоне: светлый контур с лёгкой подложкой */
.bis-hero-objects,
.bis-production-copy .bis-link,
.bis-public-hero--dark .bis-public-link {
    border-color: rgb(255 255 255 / 45%);
    background: rgb(255 255 255 / 8%);
    backdrop-filter: blur(4px);
}
.bis-hero-objects { min-height: 52px; padding-inline: 20px; }
.bis-hero-objects:is(:hover, :focus-visible) img,
.bis-production-copy .bis-link:is(:hover, :focus-visible) img,
.bis-public-hero--dark .bis-public-link:is(:hover, :focus-visible) .bis-public-arrow { filter: none; }

/* ---------- Подвал ---------- */
.bis-site-footer a { transition: color .3s ease; }
.bis-footer-nav a,
.bis-footer-bottom a { display: inline-block; transition: color .3s ease, transform .3s var(--bis-ease-out); }
.bis-site-footer a:is(:hover, :focus-visible) { color: var(--bis-accent); }
.bis-footer-nav a:is(:hover, :focus-visible) { transform: translateX(4px); }

/* ---------- Заголовки новостей ---------- */
.bis-news-list h3 a {
    background: linear-gradient(var(--bis-accent), var(--bis-accent)) 0 100% / 0 2px no-repeat;
    transition: background-size .45s var(--bis-ease), color .3s ease;
}
.bis-news-list h3 a:is(:hover, :focus-visible) { background-size: 100% 2px; }

/* ---------- Партнёры: из серого в цвет ---------- */
.bis-partners-list img {
    filter: grayscale(1);
    opacity: .62;
    transition: filter .45s ease, opacity .45s ease, transform .45s var(--bis-ease-out);
}
.bis-partners-list li:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.08);
}

/* ---------- Услуги ---------- */
.bis-service-select { transition: background-color .3s ease, padding-left .35s var(--bis-ease-out); }
.bis-service-select::before { transition: background-color .3s ease, transform .35s var(--bis-ease-out); transform: scale(.3); }
.bis-service[open] .bis-service-select::before { transform: scale(1); }
.bis-service-select:hover { background: var(--bis-light); padding-left: 22px; }
.bis-service-select img { transition: transform .35s var(--bis-ease-out); }
@media (min-width: 861px) {
    .bis-service-select:hover img { transform: rotate(-90deg) translateY(3px); }
    .bis-service[open] .bis-service-preview { animation: bis-preview .55s var(--bis-ease-out) both; }
}
.bis-service-preview { overflow: hidden; }
.bis-service-image { transition: transform 1.2s var(--bis-ease-out); }
.bis-service-preview:hover .bis-service-image { transform: scale(1.04); }

/* ---------- Производство: фото приближается ---------- */
.bis-production-inner { position: relative; }
.bis-production-image { transition: transform 1.4s var(--bis-ease-out); }
.bis-production-inner:hover .bis-production-image { transform: scale(1.05); }

/* ---------- Как мы работаем: номер заливается ---------- */
.bis-process-number { transition: background-color .35s ease, color .35s ease, transform .35s var(--bis-ease-out), box-shadow .35s ease; }
.bis-process-list li:hover .bis-process-number {
    background: var(--bis-accent);
    color: var(--bis-dark);
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgb(255 149 31 / 15%);
}
.bis-process-copy { transition: transform .35s var(--bis-ease-out); }
.bis-process-list li:hover .bis-process-copy { transform: translateX(6px); }

/* ---------- Документы ---------- */
.bis-documents-card > img { transition: transform .6s var(--bis-ease-out), box-shadow .6s ease; }
.bis-documents-card:hover > img { transform: rotate(-2deg) scale(1.05); box-shadow: 0 18px 30px rgb(18 53 66 / 18%); }

/* ---------- Первый экран: вход и медленное приближение фото ---------- */
.bis-hero-media img { animation: bis-hero-zoom 9s var(--bis-ease-out) both; }
.bis-hero h1 { animation: bis-fade-up 1s var(--bis-ease-out) .15s both; }
.bis-hero-copy { animation: bis-fade-up 1s var(--bis-ease-out) .35s both; }
.bis-hero-actions { animation: bis-fade-up 1s var(--bis-ease-out) .55s both; }

/* ---------- Появление при прокрутке (включает effects.js) ---------- */
.bis-fx [data-bis-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s var(--bis-ease-out), transform .9s var(--bis-ease-out);
    transition-delay: var(--bis-delay, 0s);
}
.bis-fx [data-bis-reveal].is-visible { opacity: 1; transform: none; }

@keyframes bis-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bis-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes bis-hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes bis-preview { from { opacity: .3; } to { opacity: 1; } }

/* Без анимаций для тех, кто их отключил в системе */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .bis-fx [data-bis-reveal] { opacity: 1; transform: none; }
}
