/* ==========================================================================
   AUXILIUM МОДЕЛЬ V — движение
   Логика как у референса: элементы помечаются .axv-anim, при попадании
   в вид получают .is-in; выноски прорисовываются, точки проявляются.
   ========================================================================== */

.axv-anim {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity .7s cubic-bezier(.22, .61, .36, 1),
        transform .7s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
}

.axv-anim.is-in {
    opacity: 1;
    transform: none;
}

/* ---------- Плашка: сканирующая линия ---------- */

.axv-plate__scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 120px;
    top: 6%;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(186, 169, 143, 0) 0%,
        rgba(186, 169, 143, .07) 55%,
        rgba(186, 169, 143, 0) 100%);
    animation: axvScan 9s cubic-bezier(.45, 0, .55, 1) infinite;
}

@keyframes axvScan {
    0% { top: 2%; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { top: 86%; opacity: 0; }
}

/* ---------- Выноски: прорисовка ---------- */

.axv-pin__dot {
    transform: scale(.6);
    opacity: 0;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), opacity .35s ease;
    transition-delay: var(--d, .15s);
}

.axv-pin__ln {
    transform: scaleX(0);
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--d, .1s);
}

.axv-pin__ln--l { transform-origin: right center; }
.axv-pin__ln--r { transform-origin: left center; }

.axv-pin__label {
    opacity: 0;
    transition: opacity .4s ease;
    transition-delay: calc(var(--d, .1s) + .18s);
}

.axv-plate.is-in .axv-pin__dot { transform: none; opacity: 1; }
.axv-plate.is-in .axv-pin__ln { transform: scaleX(1); }
.axv-plate.is-in .axv-pin__label { opacity: 1; }

/* ---------- Карточки и строки: отклик на курсор ---------- */

.axv-card,
.axv-mod {
    transition:
        border-color .25s ease,
        transform .3s cubic-bezier(.22, .61, .36, 1),
        background-color .25s ease;
}

.axv-card:hover,
.axv-mod:hover {
    border-color: rgba(186, 169, 143, .55);
    transform: translateY(-3px);
}

.axv-mod:hover .axv-mod__code { color: #ffffff; }

.part {
    transition: background-color .2s ease, padding-left .25s ease;
}

.part:hover {
    background: rgba(255, 255, 255, .025);
}

.part:hover .part__name { color: #baa98f; }

/* ---------- FAQ: плавное раскрытие ---------- */

.axv-faq__a {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transition: max-height .45s cubic-bezier(.22, .61, .36, 1),
                opacity .3s ease,
                padding .45s cubic-bezier(.22, .61, .36, 1);
}

.axv-faq__item.is-open .axv-faq__a {
    max-height: 320px;
    opacity: 1;
    padding: 0 0 18px;
}

/* ---------- Полоса доверия ---------- */

.axv-strip span {
    transition: color .25s ease;
}

.axv-strip span:hover { color: #baa98f; }

/* ---------- Кнопки ---------- */

.axv-btn {
    position: relative;
    overflow: hidden;
}

.axv-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .16);
    transform: translateX(-101%);
    transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}

.axv-btn:hover::after { transform: translateX(0); }

.axv-btn > * { position: relative; z-index: 1; }

/* ---------- Светлая тема ---------- */

html[data-theme="light"] .axv-plate__scan {
    background: linear-gradient(180deg,
        rgba(138, 106, 68, 0) 0%,
        rgba(138, 106, 68, .09) 55%,
        rgba(138, 106, 68, 0) 100%);
}

/* ---------- Уважение к настройкам системы ---------- */

@media (prefers-reduced-motion: reduce) {
    .axv-anim,
    .axv-pin__dot,
    .axv-pin__ln,
    .axv-pin__label {
        transition: none !important;
        animation: none !important;
    }

    .axv-anim { opacity: 1; transform: none; }
    .axv-pin__dot { transform: none; opacity: 1; }
    .axv-pin__ln { transform: scaleX(1); }
    .axv-pin__label { opacity: 1; }
    .axv-plate__scan { display: none; }
    .axv-card:hover,
    .axv-mod:hover { transform: none; }
}

/* ==========================================================================
   Взрыв-схема: слои разъезжаются по наведению
   ========================================================================== */

.axv-layers {
    position: absolute;
    inset: 0;
}

.axv-layer-wrap {
    position: absolute;
    inset: 0;
    transition: transform .95s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}

.axv-layer-wrap > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, .5));
}

/* Выноски живут внутри слоя и едут вместе с деталью */
.axv-explode .axv-pin {
    opacity: 0;
    transition: opacity .45s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--pd, 0s);
    transform: translate(-50%, -50%) scale(.92);
}

.axv-explode.is-open .axv-pin {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Порядок проявления выносок */
.axv-layer-wrap--spine .axv-pin { --pd: .18s; }
.axv-layer-wrap--legs .axv-pin:nth-of-type(1) { --pd: .24s; }
.axv-layer-wrap--legs .axv-pin:nth-of-type(2) { --pd: .30s; }
.axv-layer-wrap--legs .axv-pin:nth-of-type(3) { --pd: .42s; }
.axv-layer-wrap--knee .axv-pin { --pd: .36s; }

/* Разлёт деталей */
.axv-explode.is-open .axv-layer-wrap--spine { transform: translate(-11%, -9%) rotate(-2deg); }
.axv-explode.is-open .axv-layer-wrap--legs  { transform: translate(2%, 7%); }
.axv-explode.is-open .axv-layer-wrap--knee  { transform: translate(15%, 6%) rotate(3deg); }

/* Подсказка */
.axv-plate__hint {
    position: absolute;
    left: 14px;
    top: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #6b6b6b;
    opacity: 1;
    transition: opacity .35s ease;
    pointer-events: none;
}

.axv-explode.is-open .axv-plate__hint { opacity: 0; }

.axv-explode { cursor: crosshair; outline: none; }
.axv-explode:focus-visible { border-color: #baa98f; }

@media (hover: none) {
    .axv-plate__hint::after { content: ' (коснитесь)'; }
}

html[data-theme="light"] .axv-plate__hint { color: #8a6a44; }

@media (prefers-reduced-motion: reduce) {
    .axv-layer-wrap { transition: none; }
    .axv-explode .axv-pin { opacity: 1; transform: translate(-50%, -50%); }
    .axv-explode.is-open .axv-layer-wrap--spine,
    .axv-explode.is-open .axv-layer-wrap--legs,
    .axv-explode.is-open .axv-layer-wrap--knee { transform: none; }
    .axv-plate__hint { display: none; }
}

/* Плашка взрыв-схемы выше обычной: объект узкий и длинный */
.axv-explode {
    aspect-ratio: 3 / 4;
}

.axv-explode.is-open .axv-layer-wrap--spine { transform: translate(-11%, -6%) rotate(-3deg); }
.axv-explode.is-open .axv-layer-wrap--legs  { transform: translate(2%, 2%); }
.axv-explode.is-open .axv-layer-wrap--knee  { transform: translate(20%, 3%) rotate(4deg); }

/* ---------- Размер плашки и масштаб модели ---------- */

.axv-explode {
    height: 100%;
    min-height: 460px;
    aspect-ratio: auto;
}

/* в первом экране плашка тянется по высоте текстового блока */
.axv-hero .axv-explode {
    height: 100%;
    min-height: 100%;
}

/* модель внутри меньше, чтобы разбор помещался целиком */
.axv-explode .axv-layer-wrap { inset: 12% 0; }

.axv-explode.is-open .axv-layer-wrap--spine { transform: translate(-9%, -5%) rotate(-3deg); }
.axv-explode.is-open .axv-layer-wrap--legs  { transform: translate(2%, 2%); }
.axv-explode.is-open .axv-layer-wrap--knee  { transform: translate(16%, 2%) rotate(4deg); }

@media (max-width: 991px) {
    .axv-explode { height: auto; aspect-ratio: 1 / 1.15; }
    .axv-explode .axv-layer-wrap { inset: 6% 0; }
}
