/* The introduction stays on the page grid; the history rail spans the viewport. */
.home .wp-block-uagb-container.uagb-is-root-container:has(.palmetto-history) {
    padding-top: clamp(64px, 6vw, 96px); padding-inline: 0; padding-bottom: 0 !important;
}
.home .wp-block-uagb-container.uagb-is-root-container:has(.palmetto-history)
    + .wp-block-uagb-container:has(> .wp-block-lazyblock-razdelitel) {
    padding-top: 0;
}
.home .wp-block-uagb-container.uagb-is-root-container:has(.palmetto-history) > .uagb-container-inner-blocks-wrap {
    width: 100%; max-width: none !important; flex-direction: column; gap: 0;
}
.home .uagb-container-inner-blocks-wrap > .wp-block-uagb-container:has(> .palmetto-history) {
    width: 100%; max-width: none; padding: 0; margin: 0;
}
.home .wp-block-lazyblock-o-kompanii-glavnaya:has(+ .wp-block-uagb-container .palmetto-history) {
    width: calc(100% - 48px) !important; max-width: 1360px; margin-inline: auto !important;
}
.home main .main_komp {
    display: grid;
    grid-template-columns: minmax(0, 1.57fr) minmax(0, 1fr);
    column-gap: clamp(32px, 4vw, 72px);
    row-gap: 28px;
}
.home main .main_komp > .title { grid-column: 1; align-self: start; margin: 0; padding: 0; }
.home main .main_komp > .desk { grid-column: 1; padding: 0; font-size: 19px; line-height: 1.5; color: var(--palmetto-brand-navy); }
.home main .main_komp > .section1 {
    grid-column: 2;
    grid-row: 1 / 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.25vw, 24px);
    padding: 0 0 0 clamp(12px, 1.2vw, 20px);
    border-inline-start: 2px solid var(--palmetto-brand-accent-cyan);
}
.home main .main_komp .block {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: clamp(12px, 1.5vw, 28px);
    margin: 0;
    background: var(--palmetto-brand-navy);
    color: var(--palmetto-brand-white);
}
.home main .main_komp .block:first-child { border-bottom-left-radius: calc(var(--palmetto-control-size, 55px) / 2); }
.home main .main_komp .block:last-child { border-top-right-radius: calc(var(--palmetto-control-size, 55px) / 2); }
.home main .main_komp .block :is(.count1, .count2) {
    padding: 0;
    margin-block: auto;
    color: inherit;
    font-family: var(--palmetto-font-heading);
    font-size: clamp(24px, 28cqi, 64px);
    line-height: 1.05;
    letter-spacing: -.035em;
    white-space: normal;
}
.home main .main_komp .block .count1 { text-transform: uppercase; }
.home main .main_komp .block .count2 { font-size: clamp(18px, 21cqi, 52px); white-space: nowrap; }
.home main .main_komp .block .count2__unit { display: block; margin-top: .2em; }
.home main .main_komp .block .title_block { color: inherit; font-size: clamp(16px, 10cqi, 19px); line-height: 1.35; overflow-wrap: break-word; }
.home main .main_komp .block::after { content: none; }
.home main .main_komp > .section2 { grid-column: 1; align-self: end; align-items: end; gap: 16px; }
.home main .main_komp .botton { margin: 0; }

.palmetto-history {
    --crane-width: clamp(240px, 27vw, 480px);
    --rail-height: clamp(40px, 4vw, 64px);
    --rail-top: calc(var(--crane-width) * .29 + 16px);
    --rail-bottom: calc(var(--rail-top) + var(--rail-height));
    --hook-width: clamp(52px, 4.5vw, 72px);
    --hook-drop: 48px;
    --history-year-size: clamp(56px, 7vw, 120px);
    --history-year-offset: calc(var(--hook-drop) + var(--hook-width) * 1.5 - 3px);
    --history-travel: 720ms;
    --history-hook-drop: 320ms;
    position: relative; isolation: isolate; overflow: clip;
    width: 100%; margin-top: clamp(32px, 4vw, 64px);
    color: var(--palmetto-brand-navy); scroll-margin-top: 120px;
}
.palmetto-history__viewport {
    --history-columns: 3;
    display: grid;
    grid-template-columns: repeat(var(--history-columns), minmax(0, 1fr));
}
.palmetto-history.is-ready .palmetto-history__event { grid-row: 1; }
.palmetto-history__event[aria-hidden="true"] { visibility: hidden; }
.palmetto-history .palmetto-history__event {
    position: relative;
    isolation: isolate;
    padding: var(--history-year-offset) 0 32px;
    background: var(--palmetto-brand-white);
}
.palmetto-history .palmetto-history__year {
    margin: 0 0 24px; padding-inline: 40px; color: var(--palmetto-brand-navy); text-align: center;
    font: 550 var(--history-year-size)/1 var(--palmetto-font-heading);
    letter-spacing: -.055em; font-variant-numeric: tabular-nums;
    transition: color 240ms ease-out;
}
body .palmetto-history__year > button,
body .palmetto-history__year > button:hover,
body .palmetto-history__year > button:active {
    --control-hover: transparent;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit;
    opacity: 1;
}
.palmetto-history__year > button:not(:disabled)::after {
    content: "";
    position: absolute;
    inset: 0;
}
body .palmetto-history__year > button:focus-visible {
    outline: 2px solid var(--palmetto-brand-accent-blue);
    outline-offset: 4px;
}
.palmetto-history__event::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(to top, rgb(61 181 230 / .35) 0%, rgb(61 181 230 / .12) 38%, transparent 68%);
    opacity: 0;
    transition: opacity 240ms ease-out;
    pointer-events: none;
}
.palmetto-history.is-crane-settled .palmetto-history__event.is-selected::before { opacity: 1; }
@media (hover: hover) {
    .palmetto-history .palmetto-history__event:has(button:hover) .palmetto-history__year {
        color: var(--palmetto-brand-accent-blue);
    }
}
.palmetto-history.is-crane-settled .is-selected .palmetto-history__year { color: var(--palmetto-brand-accent-blue); }
.palmetto-history__copy { padding-inline: clamp(24px, 3vw, 56px); max-width: 540px; margin-inline: auto; text-align: center; }
.palmetto-history__copy a { position: relative; z-index: 1; }
.palmetto-history .palmetto-history__copy p { margin: 0; font: 400 19px/1.5 var(--palmetto-font-body); text-wrap: pretty; }
.palmetto-history .palmetto-history__copy h5 { margin: 0 0 12px; font-size: 22px; color: inherit; }
.palmetto-history__flight {
    position: relative;
    height: var(--rail-bottom);
}
.palmetto-history__flight::before {
    content: "";
    position: absolute;
    inset: var(--rail-top) 0 auto;
    height: var(--rail-height);
    background: url("../images/history/crane-runway-2d.webp") center calc(50% + var(--rail-height) * .02) / 100% 500% no-repeat;
    pointer-events: none;
}
.palmetto-history__machine {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 0;
    width: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(var(--crane-x, 0px));
}
.palmetto-history.is-ready .palmetto-history__machine { visibility: visible; }
.palmetto-history.is-crane-moving .palmetto-history__machine {
    transition: transform var(--history-travel) var(--palmetto-motion-ease);
}
.palmetto-history .palmetto-history__bridge {
    display: block;
    width: var(--crane-width);
    height: auto;
    max-width: none;
    transform: translateX(-50%);
}
.palmetto-history__hoist {
    --hook-raised-offset: calc(8px - var(--hook-drop));
    position: absolute;
    top: calc(var(--crane-width) * .29 + var(--rail-height));
    left: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: var(--hook-width);
    transform: translateX(-50%);
}
.palmetto-history__cable {
    position: relative;
    width: 3px;
    height: var(--hook-drop);
    overflow: hidden;
}
.palmetto-history__cable::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--palmetto-brand-navy);
}
.palmetto-history__hoist img { display: block; width: 100%; height: auto; margin-top: -2px; }
.palmetto-history__cable::before, .palmetto-history__hoist img {
    transform: translateY(var(--hook-raised-offset));
    transition: transform var(--history-hook-drop) var(--palmetto-motion-ease);
}
.palmetto-history.is-hook-lowered .palmetto-history__cable::before,
.palmetto-history.is-hook-lowered .palmetto-history__hoist img {
    transform: translateY(0);
}
@media (max-width: 1023px) {
    .home main .main_komp { display: flex; flex-direction: column; gap: 24px; }
    .home main .main_komp > .section1 { width: 100%; }
    .home main .main_komp > .section2 { align-self: stretch; }
}
@media (max-width: 767px) {
    .palmetto-history {
        --crane-width: min(72vw, 360px);
        --history-year-size: clamp(64px, 14vw, 80px);
        scroll-margin-top: 90px;
    }
    .palmetto-history__viewport { --history-columns: 1; }
    .palmetto-history .palmetto-history__year, .palmetto-history__copy { padding-inline: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .palmetto-history *, .palmetto-history__cable::before { transition-duration: 0ms !important; }
}
