/* YM Trans — visual refinement for the existing homepage. */
:root {
    --ym-ink: #20252b;
    --ym-muted: #545b64;
    --ym-accent: #a94510;
    --ym-orange: #f8a042;
    --ym-paper: #f7f7f5;
    --ym-line: #dedfdf;
    --ym-surface: #fff;
    --ym-radius: 24px;
    --ym-gutter: clamp(16px, 3.2vw, 44px);
    --ym-wrap: 1360px;
    --ym-section: clamp(56px, 6.5vw, 100px);
    --ym-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --ym-shadow: 0 1px 2px rgb(23 25 28 / 5%), 0 12px 36px rgb(23 25 28 / 7%);
    --primary-transition-config: 150ms var(--ym-ease);
    --primary-text-1000: var(--ym-ink);
    --primary-text-900: var(--ym-muted);
    --primary-box-shadow: var(--ym-shadow);
}

body {
    background: var(--ym-paper);
    color: var(--ym-ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.wrap {
    max-width: var(--ym-wrap);
    padding-inline: var(--ym-gutter);
}

:where(a, button, input, textarea, select):focus-visible {
    outline: 2px solid var(--ym-accent);
    outline-offset: 3px;
}

.header {
    height: 72px;
    background: rgb(255 255 255 / 95%);
    border-color: rgb(32 37 43 / 9%);
}

@supports (backdrop-filter: blur(16px)) {
    .header {
        background: rgb(255 255 255 / 84%);
        backdrop-filter: blur(16px) saturate(145%);
    }
}

.header_container { column-gap: 22px; }
.header__logotype { height: 46px; min-width: 100px; margin-inline-end: 0; }
.header_nav > ul { column-gap: clamp(12px, 2.15vw, 34px); }

.header_nav__link {
    font-size: 14px;
    font-weight: 550;
    letter-spacing: -0.01em;
}

.header_nav__link[data-active] { color: var(--ym-accent); }
.header_nav__link[data-active]::after {
    inset: auto 0 13px;
    width: 15px;
    height: 2px;
    border-radius: 2px;
}

.button-primary {
    min-height: 44px;
    height: 46px;
    padding-inline: 24px;
    border: 1px solid transparent;
    background: var(--ym-orange);
    color: #29180d;
    font-weight: 650;
    font-size: 14px;
    transition: background-color var(--primary-transition-config), scale var(--primary-transition-config);
}

.button-primary::before { display: none; }
.button-primary:active:not(:disabled) { scale: 0.97; transition-duration: 100ms; }
.button-primary:disabled { opacity: 0.65; }

.burger-menu-trigger, .burger-menu-content__close-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.burger-menu-trigger > svg { margin: auto; }

.burger-menu-content {
    background: #23272c;
    width: min(100%, 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    transition: transform 250ms var(--ym-ease), opacity 180ms var(--ym-ease), visibility 250ms;
}

.burger-menu-content--show { visibility: visible; }

.home-page-introduction {
    height: clamp(480px, 48vw, 730px);
    background: #efeeeb;
}

.home-page-introduction_container {
    height: 100%;
    padding-top: 0;
    display: flex;
    align-items: center;
}

.home-page-introduction_content {
    width: min(100%, 540px);
    padding: clamp(26px, 3.3vw, 48px);
    row-gap: 18px;
    border-radius: var(--ym-radius);
    border: 1px solid rgb(255 255 255 / 80%);
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 16px 48px rgb(23 25 28 / 12%);
}

.home-page-introduction_content::before {
    width: 44px;
    height: 3px;
    inset: 0 auto auto clamp(26px, 3.3vw, 48px);
    border-radius: 0 0 3px 3px;
    background: var(--ym-orange);
}

.home-page-introduction_content > h1 {
    max-width: 100%;
    color: var(--ym-ink);
    font-size: clamp(35px, 3.7vw, 52px);
    font-weight: 690;
    letter-spacing: -0.056em;
    line-height: 1.03;
}

.home-page-introduction_content > p {
    max-width: 38ch;
    color: var(--ym-muted);
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.5;
}

.home-page-introduction_content > .button-primary { align-self: start; margin-top: 5px; }

.home-page-stats { margin: 0 0 var(--ym-section); padding: clamp(24px, 4vw, 54px) 0 0; }

.home-page-stats__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    width: calc(100% - var(--ym-gutter) * 2);
    max-width: calc(var(--ym-wrap) - var(--ym-gutter) * 2);
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--ym-line);
    border-radius: var(--ym-radius);
    background: var(--ym-line);
    animation: none;
}

.home-page-stats__item {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: clamp(14px, 2vw, 28px);
    background: var(--ym-surface);
}

.home-page-stats__item[aria-hidden="true"] { display: none; }

.home-page-stats__value {
    align-items: baseline;
    gap: 3px;
    margin-bottom: 6px;
    color: var(--ym-ink);
    font-size: clamp(26px, 3vw, 41px);
    font-variant-numeric: tabular-nums;
    font-weight: 670;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.home-page-stats__value > sup { color: var(--ym-accent); font-size: 0.56em; line-height: 1; }
.home-page-stats__label { color: var(--ym-muted); font-size: clamp(13px, 1.2vw, 16px); white-space: normal; }

.home-page_news { margin-bottom: var(--ym-section); }
.home-page_news.section, .home-page_services.section { row-gap: clamp(20px, 3vw, 36px); }

.home-page_news .section__title, .home-page_services .section__title, .home-page__title {
    color: var(--ym-ink);
    font-size: clamp(28px, 3.3vw, 46px);
    font-weight: 670;
    letter-spacing: -0.047em;
    line-height: 1.13;
    text-wrap: balance;
}

.section__title::before {
    width: 3px;
    height: 0.68em;
    flex: 0 0 3px;
    border-radius: 3px;
    background: var(--ym-orange);
}

.home-page__desc {
    max-width: 66ch;
    margin: 16px auto clamp(22px, 3.5vw, 42px);
    color: var(--ym-muted);
    font-size: clamp(15px, 1.45vw, 19px);
    line-height: 1.55;
    text-wrap: pretty;
}

.home-page-news_list, .home-page-services_list { gap: clamp(12px, 1.65vw, 24px); }

.home-page-news_list__item {
    padding: clamp(12px, 1.4vw, 18px);
    gap: 13px;
    border: 1px solid var(--ym-line);
    border-radius: var(--ym-radius);
    box-shadow: none;
}

.home-page-news_list__item__preview-container {
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #edeeec;
}

.home-page-news_list__item__preview-container > span {
    inset: auto 10px 10px auto;
    width: auto;
    height: auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff4e6;
    color: #602e15;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.home-page-news_list__item > h3 {
    color: var(--ym-ink);
    font-size: clamp(17px, 1.5vw, 21px);
    font-weight: 650;
    letter-spacing: -0.022em;
    line-height: 1.28;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.home-page-news_list__item > p { font-size: 14px; line-height: 1.5; }
.home-page-news_list__item:hover img { transform: none; }

.home-page-services_list__item { border-radius: var(--ym-radius); background: #30343a; box-shadow: none; }
.home-page-services_list__item:hover { box-shadow: none; }
.home-page-services_list__item:hover > h3 { color: white; }
.home-page-services_list__item::after { display: none; }

.home-page-services_list__item__preview-container::before {
    z-index: 1;
    opacity: 1;
    background: linear-gradient(0deg, rgb(15 17 20 / 90%) 0%, rgb(15 17 20 / 48%) 45%, transparent 88%);
}

.home-page-services_list li > .home-page-services_list__item > h3 {
    z-index: 1;
    inset: auto 58px 24px 24px;
    max-width: 24ch;
    font-size: clamp(17px, 1.75vw, 26px);
    font-weight: 650;
    line-height: 1.16;
    letter-spacing: -0.018em;
    text-wrap: balance;
}

.home-page-services_list li:nth-child(-n+2) > .home-page-services_list__item > h3 {
    inset: auto 62px 29px 29px;
    font-size: clamp(21px, 2.45vw, 35px);
}

.home-page-services_list__item__link::after {
    content: "↗";
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 50%;
    background: rgb(24 27 32 / 52%);
    color: white;
    font-size: 18px;
    line-height: 1;
    transition: background-color var(--primary-transition-config), color var(--primary-transition-config);
}

.home-page-news_list__item > a:focus-visible, .home-page-services_list__item__link:focus-visible {
    outline-offset: -4px;
    border-radius: inherit;
}

.home-page-services_list__item__link:focus-visible { outline-color: #fff; }

.home-page-calculator, .home-page-map { margin-top: var(--ym-section); }
#home-page-calculator-title { scroll-margin-top: 94px; }

.home-page-calculator {
    width: calc(100% - var(--ym-gutter) * 2);
    max-width: calc(var(--ym-wrap) - var(--ym-gutter) * 2);
    padding: clamp(22px, 4vw, 62px);
    border: 1px solid var(--ym-line);
    border-radius: var(--ym-radius);
    box-shadow: var(--ym-shadow);
}

.home-page-calculator__form { gap: 14px 18px; }

.home-page-calculator__form > fieldset {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    zoom: 1;
}

.form-label-radio {
    gap: 8px;
    min-height: 44px;
    padding: 7px 12px;
    border: 1px solid #898e96;
    border-radius: 999px;
    color: var(--ym-ink);
    font-size: 14px;
}

.form-label-radio:has(input:checked) { border-color: var(--ym-accent); background: #fff0de; }
.form-label-radio__icon { width: 27px; height: 23px; }
.radio-custom { width: 17px; height: 17px; border-color: #777e86; }
.radio-custom::after { width: 8px; height: 8px; background: var(--ym-accent); }

.home-page-calculator .form-label,
.home-page-calculator .custom-select__trigger,
.request .request__input {
    min-height: 54px;
    gap: 12px;
    border: 1px solid #898e96;
    background: #fafaf9;
}

.home-page-calculator .form-label { min-width: 0; }
.home-page-calculator .form-label input { min-width: 0; font: inherit; }
.home-page-calculator .form-label input::placeholder { color: var(--ym-muted); }
.home-page-calculator .custom-select__selected { color: var(--ym-muted); }

.home-page-calculator .form-label:focus-within,
.home-page-calculator .custom-select.open .custom-select__trigger {
    border-color: var(--ym-accent);
    box-shadow: 0 0 0 2px rgb(169 69 16 / 16%);
}

.home-page-calculator .form-label.is-invalid { border-color: #b42318; }
.home-page-calculator__form__submit a { color: var(--ym-accent); text-decoration: underline; }
.home-page-calculator__form__submit p { line-height: 1.45; }

.home-page-map__item {
    padding: clamp(22px, 2.2vw, 34px);
    border: 1px solid var(--ym-line);
    border-radius: var(--ym-radius);
    box-shadow: none;
}
.home-page-map__item::before { display: none; }
.home-page-map__item__links { gap: 20px; }
.home-page-map_map-container__city--active,
.home-page-map_map-container__city--active::before { animation: none; }

.home-page-partners { padding: clamp(36px, 6vw, 76px) var(--ym-gutter); }
.home-page-partners__track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 16px 24px;
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    animation: none;
}
.home-page-partners__item { width: 100%; height: 58px; margin: 0; padding: 6px; filter: none; }
.home-page-partners__item[aria-hidden="true"] { display: none; }
.home-page-honor { margin-bottom: var(--ym-section); }

.request[open] { border-radius: var(--ym-radius); }
.request .request__input { font-size: 16px; }
.request .request__input:focus { border-color: var(--ym-accent); }

.cookie-banner {
    inset: auto auto max(16px, env(safe-area-inset-bottom)) var(--ym-gutter);
    z-index: 40;
    width: min(620px, calc(100% - var(--ym-gutter) * 2));
    padding: 13px 16px;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 20px;
    background: rgb(32 37 43 / 96%);
    box-shadow: 0 10px 32px rgb(0 0 0 / 18%);
}
.cookie-banner__inner { gap: 12px; padding: 0; }
.cookie-banner__text { color: #fff; font-size: 13px; line-height: 1.45; }
.cookie-banner__text a { color: #ffc785; text-decoration: underline; }
.cookie-banner__btn { padding-inline: 16px; }
.cookie-banner__btn:focus-visible { outline-color: #fff; }

@media (min-width: 1200px) {
    .header_nav { display: block; }
    .header .burger-menu-trigger { display: none; }
}

@media (max-width: 1199px) {
    .header_nav { display: none; }
    .header .burger-menu-trigger { display: grid; place-items: center; }
    .header__logotype { margin-inline-end: auto; }
}

@media (max-width: 767px) {
    .header { height: 62px; }
    .header__logotype { min-width: 80px; height: 38px; }
    .header_container { column-gap: 10px; }
    .home-page-introduction { height: clamp(390px, 116vw, 520px); }
    .home-page-introduction_container { padding-top: 18px; align-items: flex-start; }
    .home-page-introduction_content { padding: 22px 19px; gap: 13px; border-radius: 20px; }
    .home-page-introduction_content::before { inset-inline-start: 19px; }
    .home-page-introduction_content > h1 { font-size: clamp(29px, 8vw, 41px); }
    .home-page-introduction_content > p { font-size: 15px; }
    .home-page-introduction_content > .button-primary { width: auto; }
    .home-page-stats__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-page-services_list li > .home-page-services_list__item > h3 {
        inset: auto 58px 20px 18px !important;
        max-width: 22ch !important;
        font-size: 19px !important;
        line-height: 1.17 !important;
    }
    .home-page-calculator { padding: 24px 16px; }
    .home-page-calculator .form-label, .home-page-calculator .custom-select__trigger { gap: 2px; padding-block: 7px; }
    .home-page-calculator .custom-select__trigger span:first-of-type { font-size: 12px; opacity: 1; color: var(--ym-muted); }
    .home-page-calculator .form-label span { font-size: 12px; opacity: 1; color: var(--ym-muted); }
    .home-page-calculator .form-label input { font-size: 16px; }
    .home-page-calculator .form-label input::placeholder { opacity: 1; }
    .home-page-partners__track { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
    .home-page-partners__item { height: 48px; }
    .cookie-banner { bottom: calc(48px + env(safe-area-inset-bottom)); }
    .cookie-banner__inner { align-items: stretch; text-align: start; }
}

@media (hover: hover) and (pointer: fine) {
    .button-primary:hover:not(:disabled) { background: #ffb461; }
    .home-page-news_list__item:hover img { transform: scale(1.025); }
    .home-page-services_list__item:hover .home-page-services_list__item__link::after {
        background: var(--ym-orange);
        color: #29180d;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .home-page-introduction_content, .ym-enter, .request[open] {
        animation: ym-settle 280ms var(--ym-ease);
    }
    @keyframes ym-settle {
        from { opacity: 0.86; transform: translateY(7px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .home-page-introduction > video { display: none; }
    .home-page-introduction_content, .ym-enter, .request[open] { animation: none; }
    .button-primary, .header_nav__link, .burger-menu-content, .burger-menu-overlay,
    .home-page-news_list__item img, .home-page-services_list__item__link::after,
    .custom-select__dropdown, .custom-select__arrow, .radio-custom::after {
        transition: none;
    }
    .button-primary:active:not(:disabled) { scale: 1; }
    .home-page-news_list__item:hover img { transform: none; }
}

.home-page-quick-tracking {
    position: relative;
    z-index: 2;
    margin-top: -52px;
}

.home-page-quick-tracking__form {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--ym-line);
    border-radius: 20px;
    background: var(--ym-surface);
    box-shadow: var(--ym-shadow);
}

.home-page-quick-tracking__form > h2 {
    margin-inline-end: 8px;
    font-size: 1.25rem;
    font-weight: var(--ym-heading-weight);
}

.home-page-quick-tracking__form > input {
    display: block;
    min-width: 0;
    min-height: 46px;
    padding-inline: 14px;
    border: 1px solid #898e96;
    border-radius: 12px;
    background: #fafaf9;
    color: var(--ym-ink);
    font-size: 1rem;
}

.home-page-quick-tracking__form > input::placeholder {
    color: var(--ym-muted);
}

.home-page-stats__track {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(142px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #a9a39c transparent;
}

.home-page-stats__track:focus-visible {
    outline: 2px solid var(--ym-accent);
    outline-offset: -3px;
}

.home-page-stats__item {
    padding: 18px 12px;
    scroll-snap-align: start;
}

.home-page-stats__value {
    font-size: clamp(1.625rem, 2.1vw, 1.75rem);
    white-space: nowrap;
}

.home-page-stats__label {
    font-size: 0.875rem;
    line-height: 1.35;
}

@media (max-width: 767px) {
    .home-page-quick-tracking { margin-top: 16px; }

    .home-page-quick-tracking__form {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px;
    }

    .home-page-quick-tracking__form > h2 {
        grid-column: 1 / -1;
        font-size: 1.125rem;
    }

    .home-page-quick-tracking__form > input { padding-inline: 10px; }
    .home-page-quick-tracking__form > button { padding-inline: 14px; }

    .home-page-stats__track { grid-auto-columns: clamp(136px, 43vw, 172px); }
}

@media (max-width: 360px) {
    .home-page-quick-tracking__form { grid-template-columns: minmax(0, 1fr); }
    .home-page-quick-tracking__form > button { justify-self: stretch; }
}

@media (prefers-reduced-motion: no-preference) {
    .home-page-stats.ym-enter { animation: none; }
    .home-page-stats.ym-enter .home-page-stats__item {
        animation: ym-settle 240ms var(--ym-ease) var(--ym-stat-delay, 0ms) backwards;
    }
    .home-page-stats__item:nth-child(2) { --ym-stat-delay: 16ms; }
    .home-page-stats__item:nth-child(3) { --ym-stat-delay: 32ms; }
    .home-page-stats__item:nth-child(4) { --ym-stat-delay: 48ms; }
    .home-page-stats__item:nth-child(5) { --ym-stat-delay: 64ms; }
    .home-page-stats__item:nth-child(6) { --ym-stat-delay: 80ms; }
    .home-page-stats__item:nth-child(7) { --ym-stat-delay: 96ms; }
    .home-page-stats__item:nth-child(8) { --ym-stat-delay: 112ms; }
}


