/* ==========================================================================
   Укок — первый экран и шапка сайта
   Собственный блок, не зависит от движка Zero Block (t396).
   ========================================================================== */

:root {
    --uk-green: #0ea563;
    --uk-green-hi: #11a667;
    --uk-green-dk: #0b8b53;
    --uk-dark: #2e2e2e;
    --uk-head-h: 88px;
    --uk-head-h-sm: 64px;
    --uk-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --uk-sans: 'TildaSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Плавная прокрутка к якорям с поправкой на фиксированную шапку */
html { scroll-behavior: smooth; }
a[name], .uk-anchor { scroll-margin-top: calc(var(--uk-head-h) + 12px); }

.uk-hero-rec { position: relative; }
.uk-hero-rec *, .uk-hero-rec *::before, .uk-hero-rec *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- ШАПКА -- */

.uk-head {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 900;
    height: var(--uk-head-h);
    display: flex;
    align-items: center;
    font-family: var(--uk-sans);
    transition: background-color .35s ease, box-shadow .35s ease, height .35s ease;
}
.uk-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
    opacity: 1;
    transition: opacity .35s ease;
    pointer-events: none;
}
.uk-head.is-stuck {
    height: 68px;
    background: rgba(26, 26, 26, .94);
    box-shadow: 0 2px 24px rgba(0, 0, 0, .28);
}
.uk-head.is-stuck::before { opacity: 0; }

.uk-head__in {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 28px;
}

/* Логотип */
.uk-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 0 0 auto;
    color: #fff; /* перебиваем :where(.t-records) a{color:#ff8562} из CSS Tilda */
}
.uk-logo__img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    transition: width .35s ease, height .35s ease;
}
.uk-head.is-stuck .uk-logo__img { width: 42px; height: 42px; }
.uk-logo__txt { line-height: 1.1; }
.uk-logo__name {
    display: block;
    font-family: var(--uk-serif);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
}
.uk-logo__sub {
    display: block;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
    margin-top: 3px;
}

/* Меню */
.uk-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.uk-nav__link {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    padding: 6px 0;
    opacity: .92;
    transition: opacity .2s ease;
}
.uk-nav__link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--uk-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.uk-nav__link:hover { opacity: 1; }
.uk-nav__link:hover::after, .uk-nav__link:focus-visible::after { transform: scaleX(1); }

/* Телефон и кнопка.
   ВАЖНО про вес селекторов: в CSS Tilda есть правило
   :where(.t-records) a[href^=tel] { color: inherit }  — вес (0,1,1).
   Одного класса (0,1,0) не хватает, телефон стал бы чёрным на тёмном
   фоне. Поэтому у телефонных ссылок здесь составные селекторы. */
.uk-head__side { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.uk-head a.uk-phone,
.uk-head .uk-phone,
.uk-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
}
/* Цвет дублируем на самом тексте: даже если какое-то правило Tilda
   перебьёт цвет ссылки, номер останется белым. */
.uk-head a.uk-phone span,
.uk-phone span { color: #fff; }
.uk-phone svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .85; color: #fff; }
.uk-head a.uk-phone:hover,
.uk-head a.uk-phone:hover span,
.uk-phone:hover { color: #fff; }
.uk-phone:hover span { text-decoration: underline; text-underline-offset: 3px; }

.uk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    font-family: var(--uk-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.uk-btn:active { transform: translateY(1px); }
.uk-btn--primary {
    background: var(--uk-green);
    color: #fff;
    box-shadow: 0 6px 20px rgba(14, 165, 99, .32);
}
.uk-btn--primary:hover { background: var(--uk-green-hi); color: #fff; box-shadow: 0 8px 26px rgba(14, 165, 99, .42); }
.uk-btn--ghost {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.uk-btn--ghost:hover { background: rgba(255, 255, 255, .95); color: var(--uk-dark); border-color: #fff; }
.uk-btn--lg { height: 58px; padding: 0 34px; font-size: 16px; }

/* Бургер */
.uk-burger {
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
    padding: 0;
    position: relative;
    flex: 0 0 auto;
}
.uk-burger span {
    position: absolute;
    left: 13px;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .28s ease, opacity .2s ease, top .28s ease;
}
.uk-burger span:nth-child(1) { top: 16px; }
.uk-burger span:nth-child(2) { top: 22px; }
.uk-burger span:nth-child(3) { top: 28px; }
.uk-burger.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.uk-burger.is-open span:nth-child(2) { opacity: 0; }
.uk-burger.is-open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* -------------------------------------------------------- МОБИЛЬНОЕ МЕНЮ -- */

.uk-drawer {
    position: fixed;
    inset: 0;
    z-index: 899;
    background: rgba(26, 26, 26, .97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--uk-head-h-sm) + 24px) 28px 32px;
    font-family: var(--uk-sans);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    /* visibility переключаем мгновенно (при закрытии — после анимации),
       а не «анимируем»: так состояние не зависит от того, успел ли
       браузер проиграть переход. */
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
    overflow-y: auto;
}
.uk-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear 0s;
}
.uk-drawer__link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-family: var(--uk-serif);
    font-size: 28px;
    font-weight: 500;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.uk-drawer__link:hover, .uk-drawer__link:focus-visible { color: var(--uk-green); }
.uk-drawer__foot { margin-top: 28px; display: grid; gap: 14px; }
/* тот же случай с a[href^=tel] — нужен составной селектор */
.uk-drawer a.uk-drawer__phone,
.uk-drawer .uk-drawer__phone,
.uk-drawer__phone {
    color: #fff;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
}
.uk-drawer__mail { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: 15px; }

/* ------------------------------------------------------------ ПЕРВЫЙ ЭКРАН */

.uk-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    background: #1c1c1c;
}

/* Фон первого экрана.
   overflow:hidden живёт здесь, а не на секции: иначе на низких экранах
   (ноутбук, телефон в альбомной ориентации) текст и кнопки обрезались бы. */
.uk-hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.uk-hero__slide {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Кадр подбирается под экран: браузер скачивает только подходящий файл.
     до 1400px  — hero-desktop-1400.jpg   1400x781   271 КБ
     от 1400px  — hero-desktop.jpg        2000x1116  414 КБ
   Телефон в портретной ориентации получает вертикальный кадр:
     обычный экран — hero-mobile-750.jpg   750x1344   230 КБ
     плотный (2x+) — hero-mobile.jpg      1000x1792   371 КБ
   В альбомной ориентации телефон намеренно берёт горизонтальный кадр. */
/* У каждого кадра два файла: WebP (на ~30-40% легче) и JPEG.
   Первая строка — JPEG для совсем старых браузеров; вторая строка
   (image-set с type) их не понимает и отбрасывается, остальные берут WebP. */
.uk-hero__slide {
    background-image: url('../images/hero-desktop-1400.jpg');
    background-image: image-set(url('../images/hero-desktop-1400.webp') type('image/webp'), url('../images/hero-desktop-1400.jpg') type('image/jpeg'));
}

@media screen and (min-width: 1401px) {
    .uk-hero__slide {
        background-image: url('../images/hero-desktop.jpg');
        background-image: image-set(url('../images/hero-desktop.webp') type('image/webp'), url('../images/hero-desktop.jpg') type('image/jpeg'));
    }
}

@media screen and (max-width: 900px) and (orientation: portrait) {
    .uk-hero__slide {
        background-image: url('../images/hero-mobile-750.jpg');
        background-image: image-set(url('../images/hero-mobile-750.webp') type('image/webp'), url('../images/hero-mobile-750.jpg') type('image/jpeg'));
    }
}
@media screen and (max-width: 900px) and (orientation: portrait) and (min-resolution: 2dppx) {
    .uk-hero__slide {
        background-image: url('../images/hero-mobile.jpg');
        background-image: image-set(url('../images/hero-mobile.webp') type('image/webp'), url('../images/hero-mobile.jpg') type('image/jpeg'));
    }
}


/* Затемнение, чтобы текст читался.
   Значения подобраны замером: для каждой строки считался худший
   контраст белого текста к тому, что под ним, с учётом самого кадра
   и этой вуали. Текст занимает левые ~55% ширины, поэтому затемнение
   держится плотным до середины и быстро спадает — правая часть кадра
   (костёр, гирлянды) остаётся яркой.
   Худший контраст при 1440px: H1 6.3, абзац 4.9, плашки 6.9
   (норма WCAG AA: крупный текст 3, обычный 4.5). */
.uk-hero__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to right,
            rgba(0, 0, 0, .90) 0%,
            rgba(0, 0, 0, .82) 50%,
            rgba(0, 0, 0, .30) 70%,
            rgba(0, 0, 0, .15) 85%,
            rgba(0, 0, 0, .32) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .55) 100%);
}

/* Вуаль для вертикального кадра. Условие ровно то же, что и у самого
   кадра выше, иначе затемнение и картинка разъезжались бы на
   промежуточных ширинах. Правило стоит ПОСЛЕ базового — вес у них
   одинаковый, и побеждает то, что ниже.
   Кадр вертикальный, текст идёт сверху вниз по всей высоте, поэтому
   боковой градиент тут бесполезен — нужен равномерный.
   Замер при 375x812: H1 5.5, абзац 4.4 (2-й процентиль 5.4,
   медиана 15), плашки 6.3. */
@media screen and (max-width: 900px) and (orientation: portrait) {
    .uk-hero__veil {
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, .86) 0%,
            rgba(0, 0, 0, .80) 50%,
            rgba(0, 0, 0, .88) 100%);
    }
}

.uk-hero__in {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: calc(var(--uk-head-h) + 48px) 32px 120px;
    font-family: var(--uk-sans);
    color: #fff;
}
.uk-hero__content { max-width: 760px; }

.uk-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    /* тёмная подложка, а не светлая: под белым текстом она добавляет
       контраста, светлая — отнимала бы */
    background: rgba(0, 0, 0, .30);
    margin-bottom: 26px;
}
.uk-hero__eyebrow i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--uk-green);
    flex: 0 0 auto;
}

.uk-hero__title {
    font-family: var(--uk-serif);
    font-weight: 700;
    font-size: clamp(40px, 6.4vw, 86px);
    line-height: 1.04;
    margin: 0 0 22px;
    letter-spacing: -.01em;
    text-shadow: 0 2px 30px rgba(0, 0, 0, .45);
}
.uk-hero__title em { font-style: italic; color: #fff; }

.uk-hero__lead {
    font-size: clamp(16px, 1.45vw, 21px);
    line-height: 1.55;
    color: rgba(255, 255, 255, .92);
    margin: 0 0 32px;
    max-width: 620px;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .4);
}

/* Преимущества */
.uk-hero__usp {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}
.uk-hero__usp li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    line-height: 1.2;
    color: #fff;
    padding: 11px 18px 11px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .26);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.uk-hero__usp svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--uk-green); }

.uk-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }

.uk-hero__note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
}
.uk-hero__note a { color: rgba(255, 255, 255, .92); text-decoration: underline; text-underline-offset: 3px; }
.uk-hero__note a:hover { color: #fff; }
.uk-hero__dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .4); }

/* Стрелка вниз */
.uk-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-family: var(--uk-sans);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.uk-hero__scroll:hover { color: #fff; }
/* Пока внизу висит плашка cookie, подсказка с ней пересекается —
   класс вешает ukok-hero.js. */
.uk-cookiebar .uk-hero__scroll { display: none; }
.uk-hero__scroll svg { width: 20px; height: 20px; animation: ukBob 2.2s ease-in-out infinite; }
@keyframes ukBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ------------------------------------------------------------ АДАПТИВ ---- */

@media screen and (max-width: 1180px) {
    .uk-head__in { padding: 0 24px; gap: 18px; }
    .uk-nav { gap: 18px; }
    .uk-nav__link { font-size: 14px; }
    .uk-phone { font-size: 15px; }
    .uk-btn { height: 46px; padding: 0 20px; font-size: 14px; }
}

@media screen and (max-width: 980px) {
    :root { --uk-head-h: var(--uk-head-h-sm); }
    .uk-nav, .uk-head__side .uk-btn { display: none; }
    .uk-burger { display: block; }
    .uk-head__side { margin-left: auto; gap: 12px; }
    .uk-head.is-stuck { height: var(--uk-head-h-sm); }
    .uk-logo__img { width: 40px; height: 40px; }
    .uk-head.is-stuck .uk-logo__img { width: 36px; height: 36px; }
    .uk-logo__name { font-size: 19px; }
    .uk-logo__sub { font-size: 9px; }
    .uk-phone span { display: none; }
    .uk-phone {
        width: 46px; height: 46px;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, .14);
    }
    .uk-phone svg { width: 19px; height: 19px; opacity: 1; }

    .uk-hero__in { padding: calc(var(--uk-head-h-sm) + 40px) 22px 104px; }
    .uk-hero__lead { font-size: 16px; }
    .uk-hero__usp { gap: 8px; margin-bottom: 30px; }
    .uk-hero__usp li { font-size: 13px; padding: 9px 14px 9px 12px; }
    .uk-hero__cta .uk-btn { flex: 1 1 100%; }
    .uk-hero__cta { gap: 10px; }
}

@media screen and (max-width: 560px) {
    .uk-logo__sub { display: none; }
    .uk-hero { min-height: 640px; }
    .uk-hero__in { padding-bottom: 92px; }
    .uk-hero__eyebrow { font-size: 10px; padding: 8px 14px; margin-bottom: 20px; letter-spacing: .12em; }
    .uk-hero__title { font-size: clamp(32px, 9.5vw, 46px); margin-bottom: 16px; }
    .uk-hero__lead { margin-bottom: 26px; }
    .uk-hero__usp li:nth-child(n+4) { display: none; }
    .uk-drawer__link { font-size: 24px; padding: 11px 0; }
    .uk-hero__scroll { display: none; }
    /* Ссылки переносятся на две строки — точка-разделитель теряет смысл */
    .uk-hero__dot { display: none; }
    .uk-hero__note { gap: 6px 0; }
    .uk-hero__note a { flex: 1 1 100%; }
}

/* Уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .uk-hero__scroll svg { animation: none; }
}

/* Видимый фокус для клавиатуры */
.uk-hero-rec a:focus-visible,
.uk-hero-rec button:focus-visible {
    outline: 2px solid var(--uk-green);
    outline-offset: 3px;
    border-radius: 4px;
}
