/* КИПиА ЯМАЛ — облегчённый режим первого экрана.
   Демонстрационный стенд остаётся статичным; работают только индикаторы. */

.hero-stage::before,
.hero-stage::after,
.hero-stage-glow,
.hero-stage-glow::after,
.hero-stage .hero-console[data-hero-carousel],
.hero-stage .hero-console[data-hero-carousel]::before,
.hero-stage .float-chip,
.hero-stage .gauge-needle,
.hero-stage .tank-liquid,
.hero-stage .process-bar i,
.hero-stage .hero-rung::before,
.hero-stage .hero-rung em,
.hero-stage .hero-motor,
.hero-stage .hero-motor::before,
.hero-stage .hero-belt,
.hero-stage .hero-belt::after,
.hero-stage .hero-loop-ring,
.hero-stage .hero-loop-ring::after,
.hero-stage .hero-loop-terminal,
.hero-stage .hero-cal-screen,
.hero-stage .hero-cal-bar i,
.hero-stage .hero-tank-big .liquid,
.hero-stage .hero-tank-big .liquid::before,
.hero-stage .hero-sau-pipe::after,
.hero-stage .hero-sau-valve,
.hero-stage .hero-sau-sensor,
.hero-stage .hero-sau-controller .hero-sau-metric,
.hero-stage .hero-sau-trend::after,
.hero-stage .hero-wheel-big,
.hero-stage .hero-mech-arm,
.hero-stage .hero-mech-joint,
.hero-stage .hero-pointer {
    animation: none !important;
}

/* Убираем постоянные композитные слои, нужные только для движения. */
.hero-stage .hero-console[data-hero-carousel],
.hero-stage .float-chip {
    will-change: auto !important;
}

/* Стенд не плавает и не поворачивается даже при движении мыши. */
.hero-stage .hero-console[data-hero-carousel] {
    translate: none !important;
    rotate: none !important;
    transform: none !important;
}

.hero-stage-glow {
    translate: none !important;
    transform: none !important;
}

/* Оставляем только лёгкое дискретное мигание индикаторов. */
.hero-stage .status-dot,
.hero-stage .plc-head span,
.hero-stage .plc-io .on,
.hero-stage .hero-plc-leds i.on {
    animation: homeStaticIndicatorBlink 1.45s steps(2, end) infinite !important;
}

.hero-stage .plc-io .on:nth-child(2n),
.hero-stage .hero-plc-leds i.on:nth-child(2n) {
    animation-delay: .35s !important;
}

@keyframes homeStaticIndicatorBlink {
    0%, 46% {
        opacity: .48;
    }
    47%, 100% {
        opacity: 1;
    }
}

/* ============================================================
   Единые стили промо-заголовка и терминов.
   Загружаются сразу из home.php, без поздней подмены JavaScript.
   ============================================================ */
.hero-copy h1 {
    max-width: 760px;
}

.hero-title-main {
    display: block;
    white-space: nowrap;
    margin-bottom: .42em;
    color: #f5f9fc;
    font-size: clamp(1.15rem, 2.15vw, 2.45rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.hero-title-accent {
    display: block;
    max-width: 12.5ch;
    color: transparent;
    background: linear-gradient(100deg, #46aaff 0%, #39d4ff 50%, #32d6b4 96%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: .55px rgba(3, 20, 34, .62);
    text-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    font-size: clamp(2.55rem, 4.05vw, 4.5rem);
    line-height: .94;
    letter-spacing: -.055em;
    font-style: normal;
    font-weight: 950;
}

.hero-title-tail {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-top: .72em;
    padding-left: 14px;
    border-left: 3px solid #32d6b4;
    color: #b9d8e7;
    font-size: clamp(1rem, 1.35vw, 1.28rem);
    line-height: 1.35;
    letter-spacing: -.012em;
    font-weight: 750;
}

.float-chip[data-tooltip] {
    min-height: 39px;
    display: flex;
    align-items: center;
    padding: 11px 15px;
    cursor: help;
    outline: none;
    color: #f4fbff;
    border-color: rgba(111, 225, 234, .52);
    background: rgba(8, 49, 72, .95);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    font-size: clamp(.88rem, .9vw, 1rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .055em;
}

.float-chip[data-tooltip]:focus-visible {
    border-color: rgba(111, 225, 234, .86);
    box-shadow: 0 0 0 3px rgba(55, 208, 222, .18), 0 12px 28px rgba(0, 0, 0, .22);
}

.float-chip[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 20;
    top: calc(100% + 11px);
    left: 50%;
    width: max-content;
    max-width: 300px;
    padding: 11px 13px;
    border: 1px solid rgba(111, 225, 234, .28);
    border-radius: 10px;
    color: #eaf8fb;
    background: rgba(4, 23, 37, .97);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
    font-size: .8rem;
    font-weight: 650;
    line-height: 1.45;
    letter-spacing: 0;
    white-space: normal;
    text-transform: none;
    text-shadow: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    pointer-events: none;
}

.float-chip[data-tooltip]:hover::after,
.float-chip[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.float-chip.chip-one[data-tooltip]::after {
    left: 0;
    transform: translate(0, -4px);
}

.float-chip.chip-one[data-tooltip]:hover::after,
.float-chip.chip-one[data-tooltip]:focus-visible::after {
    transform: translate(0, 0);
}

.float-chip.chip-two[data-tooltip]::after,
.float-chip.chip-three[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translate(0, -4px);
}

.float-chip.chip-two[data-tooltip]:hover::after,
.float-chip.chip-two[data-tooltip]:focus-visible::after,
.float-chip.chip-three[data-tooltip]:hover::after,
.float-chip.chip-three[data-tooltip]:focus-visible::after {
    transform: translate(0, 0);
}

@media (max-width: 900px) {
    .hero-title-main {
        white-space: normal;
    }

    .hero-title-accent {
        max-width: 14ch;
    }

    .hero-title-tail {
        width: auto;
    }

    .float-chip[data-tooltip] {
        min-height: 34px;
        padding: 9px 12px;
        font-size: .82rem;
    }
}

/* ============================================================
   Первый экран — увеличенная композиция для широких экранов.
   Левая колонка и нижний край стенда привязаны к одной горизонтали.
   ============================================================ */
@media (min-width: 1181px) {
    .hero {
        --hero-main-bottom: clamp(600px, 72vh, 660px);
        min-height: calc(100vh - 72px) !important;
        grid-template-columns: minmax(760px, 48%) minmax(0, 52%) !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 22px 18px 0 !important;
    }

    .hero-copy {
        display: flex;
        flex-direction: column;
        height: var(--hero-main-bottom);
        max-width: none !important;
        min-width: 0;
        padding: 46px 0 0 42px;
        border-right: 1px solid rgba(35, 85, 111, .18);
        position: relative;
        z-index: 5;
    }

    .hero-kicker {
        width: auto;
        margin: 0 0 14px 10px !important;
        padding: 0 !important;
        background: transparent !important;
        color: #41d3ea !important;
        opacity: 1 !important;
        font-size: .95rem !important;
        line-height: 1.25 !important;
        letter-spacing: .11em !important;
    }

    .hero-copy h1 {
        max-width: none !important;
        margin: 0 !important;
        overflow: visible;
    }

    .hero-title-main {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 0 46px 8px !important;
        padding: 0 0 8px !important;
        white-space: nowrap !important;
        background: transparent !important;
        color: #f7fbff !important;
        -webkit-text-fill-color: #f7fbff !important;
        -webkit-text-stroke: .65px rgba(0, 0, 0, .38) !important;
        text-shadow: 0 3px 12px rgba(0, 0, 0, .34) !important;
        font-size: clamp(2.7rem, 3.3vw, 3.7rem) !important;
        line-height: 1.02 !important;
        letter-spacing: -.05em !important;
        font-weight: 950 !important;
    }

    .hero-title-accent {
        position: relative;
        z-index: 1;
        display: block !important;
        width: 13.5ch !important;
        max-width: 13.5ch !important;
        margin-left: 8px;
        padding: 4px 0 2px !important;
        background: linear-gradient(100deg, #43aaf4 0%, #39cbed 52%, #36d2b4 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        -webkit-text-stroke: .55px rgba(2, 18, 30, .62) !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, .30) !important;
        font-size: clamp(3.45rem, 4.35vw, 4.7rem) !important;
        line-height: .95 !important;
        letter-spacing: -.055em !important;
        font-weight: 950 !important;
    }

    .hero-title-accent::before {
        content: "";
        position: absolute;
        z-index: -1;
        left: -8px;
        right: -48px;
        top: -10px;
        bottom: -10px;
        background: transparent;
        pointer-events: none;
    }

    .hero-title-tail {
        display: block !important;
        width: max-content !important;
        max-width: 700px !important;
        margin: 0 0 0 8px !important;
        padding: 12px 0 0 16px !important;
        border-left: 3px solid #31d0bc !important;
        background: transparent !important;
        color: #d4e8f2 !important;
        -webkit-text-fill-color: #d4e8f2 !important;
        font-size: 1.16rem !important;
        line-height: 1.24 !important;
        letter-spacing: 0 !important;
        font-weight: 850 !important;
        white-space: nowrap;
    }

    .hero-lead {
        width: 680px !important;
        max-width: 680px !important;
        margin: 0 0 0 8px !important;
        padding: 22px 8px 14px !important;
        background: transparent !important;
        color: #a9c7d8 !important;
        font-size: 1.12rem !important;
        line-height: 1.7 !important;
    }

    .hero-actions {
        width: 680px;
        margin: auto 0 0 8px !important;
        padding: 8px 0 3px !important;
        background: transparent !important;
    }

    .hero-actions .btn {
        min-height: 54px;
        padding: 14px 22px;
        font-size: 1rem;
        border-radius: 14px;
    }

    .hero-points {
        width: 680px;
        margin: 0 0 0 8px !important;
        padding: 14px 0 12px !important;
        background: transparent !important;
        font-size: .94rem !important;
        gap: 16px 24px !important;
    }

    .hero-stage {
        min-height: 100% !important;
        padding-top: 0 !important;
        align-content: initial !important;
        place-items: initial !important;
    }

    .hero-stage .hero-console[data-hero-carousel] {
        position: absolute !important;
        left: 0;
        right: 0;
        top: auto !important;
        bottom: calc(100% - var(--hero-main-bottom)) !important;
        width: min(690px, 88%) !important;
        margin-inline: auto;
    }

    .hero-stage .float-chip[data-tooltip] {
        min-height: 42px !important;
        padding: 12px 18px !important;
        font-size: 1rem !important;
        border-radius: 18px !important;
    }

    .hero-stage .chip-one {
        left: 2.2% !important;
        top: 33% !important;
    }

    .hero-stage .chip-two {
        right: 2.8% !important;
        top: 29% !important;
    }

    .hero-stage .chip-three {
        right: 8% !important;
        bottom: 20% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-stage .status-dot,
    .hero-stage .plc-head span,
    .hero-stage .plc-io .on,
    .hero-stage .hero-plc-leds i.on {
        animation: none !important;
        opacity: 1 !important;
        filter: none !important;
    }
}
