:root {
    color-scheme: dark;
    --bg: #05060a;
    --bg-elevated: #0c0f16;
    --accent: #f5c15b;
    --accent-soft: rgba(245, 193, 91, 0.12);
    --text-main: #f4f4f4;
    --text-muted: #9fa3b5;
    --border-soft: #1a1f2b;

    /* DESKTOP HEADER — X tuners */
    --hdr-logo-x: 70px;
    --hdr-products-x: -20px;
    --hdr-login-x: -37px;
    --hdr-gap-right: 12px;
    /* расстояние между "Продукты" и "Войти" */

    /* TEXT INSIDE PILL — tuners (двигают только слово, не pill) */
    --hdr-products-txt-x: 0px;
    --hdr-products-txt-y: -2px;
    
    --hdr-login-txt-x: 0px;
    --hdr-login-txt-y: -2px;

    /* CARET INSIDE PILL — tuners */
    --hdr-caret-x: 0px;
    --hdr-caret-y: -3px;

    --hdr-caret-open-x: var(--hdr-caret-x);
    --hdr-caret-open-y: 0px;

    /* CARET SCALE */
    --hdr-caret-scale: 0.9;
    --hdr-caret-open-scale: var(--hdr-caret-scale);

    /* HEADER TEXT COLORS */
    --hdr-products-color: var(--text-main);
    --hdr-login-color: var(--text-main);
    
    /* CARET COLOR */
    --hdr-caret-color: rgba(244, 244, 244, 0.55);
    --hdr-caret-color-open: rgba(244, 244, 244, 0.75);

    /* HEADER PILL CONTENT COLOR (text + caret) */
    --hdr-pill-fg: rgba(244, 244, 244, 0.801);
    --hdr-pill-fg-open: rgba(245, 194, 91, 0.884);

    /* DROPDOWN (Продукты) — tuners */
    --hdr-dd-x: 0px;
    /* влево/вправо */
    --hdr-dd-y: -10px;
    /* вверх/вниз (обычно в минус, чтобы ближе к pill) */

    --hdr-bg: rgba(13, 14, 19, 0.55);
    /* ← светлее/темнее */
    --hdr-blur: 16px;
    --hdr-saturate: 140%;
}

* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* АНИМИРОВАННЫЙ ФОН (без линий) */
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(185, 138, 38, 0.08), transparent 45%),
        radial-gradient(900px 500px at 80% 10%, rgba(219, 168, 65, 0.06), transparent 60%),
        linear-gradient(180deg, #151822 0%, var(--bg) 55%);

    /* 3 слоя => 3 значения */
    background-size: 200% 200%, 200% 200%, 100% 100%;
    animation: bg-flow 18s ease-in-out infinite;

    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 48px;

    position: relative;
    isolation: isolate;
    overflow: visible;
    /* важно: не режем псевдо-слой */
}

/* Линии — только в верхней части, ниже растворяются */
.page::before {
    content: "";
    position: absolute;
    top: 0;

    /* iOS-safe full-width layer (без 100vw бага) */
    left: 0;
    right: 0;
    width: auto;
    transform: none;

    height: min(62vh, 560px);

    pointer-events: none;
    z-index: -1;

    background: repeating-linear-gradient(120deg,
            rgba(245, 193, 91, 0.035),
            rgba(245, 193, 91, 0.035) 1px,
            transparent 1px,
            transparent 120px);

    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 70%,
            rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 70%,
            rgba(0, 0, 0, 0) 100%);

    opacity: 0.9;
    animation: lines-drift 55s linear infinite;
}

/* скорость/направление движения линий */
@keyframes lines-drift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 420px 0;
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.03em;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.logo span:last-child {
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.tag {
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-link {
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
}

.account-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    gap: 32px;
    align-items: center;
}

.hero-title {
    font-size: clamp(28px, 4vw, 36px);
    margin: 0 0 12px;
}

.hero-sub {
    margin: -23px 0 20px;
    /* поднимаем ближе к @marsel.mp4 */
    color: var(--text-muted);
    max-width: 420px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.hero-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    padding: 9px 18px;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;

    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;

    color: #f7d58a;

    /* SOLID вместо градиента */
    background: rgba(161, 127, 59, 0.26);

    border: 1px solid rgba(245, 193, 91, .45);
}

.btn-secondary {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--text-muted);
}

.hero-note {
    font-size: 12px;
    color: var(--text-muted);
}

.hero-card {
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    background: linear-gradient(145deg, var(--bg-elevated), #060915);
    padding: 18px 18px 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.hero-card-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.hero-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    font-size: 13px;
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-badge-big {
    font-size: 11px;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(245, 193, 91, 0.45);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Features */

.section-title {
    font-size: 16px;
    margin: 0 0 14px;
}

.section-sub {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.card {
    border-radius: 18px;
    padding: 14px 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    font-size: 13px;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Roadmap */

.roadmap {
    border-radius: 18px;
    padding: 14px 14px 16px;
    border: 1px dashed var(--border-soft);
    background: radial-gradient(circle at top, var(--accent-soft) 0, transparent 55%);
    font-size: 13px;
    color: var(--text-muted);
}

.roadmap strong {
    color: var(--text-main);
}

footer:not(.site-footer) {
    margin-top: 32px;
    padding-top: 16px;

    border-top: none;

    font-size: 11px;
    color: var(--text-muted);

    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;

    position: relative;
}

footer:not(.site-footer)::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-soft);
}

@media (max-width: 768px) {
    header {
        margin-bottom: 28px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-card {
        order: -1;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 24px 16px 32px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }

    .account-link {
        flex: 1 1 auto;
        text-align: center;
    }

    .tag {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* Header: личный кабинет */

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-link {
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
}

.account-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Личный кабинет */

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    gap: 32px;
    align-items: flex-start;
}

.account-card {
    border-radius: 18px;
    padding: 16px 16px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    font-size: 13px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.field label {
    font-size: 13px;
}

.field input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: #05060a;
    color: var(--text-main);
    font-size: 13px;
}

.field input::placeholder {
    color: rgba(159, 163, 181, 0.7);
}

.field small {
    font-size: 11px;
    color: var(--text-muted);
}

.form-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
}

.status-badge--inactive {
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.status-badge--active {
    border: 1px solid rgba(116, 214, 129, 0.6);
    color: #7be48a;
}

.status-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
}

.muted {
    color: var(--text-muted);
    font-size: 13px;
}

/* Адаптив для ЛК */
@media (max-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
}

.tab-btn {
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #090f16;
    border-radius: 6px;
    transition: all .2s ease;
}

.tab-btn.tab-active {
    color: #0d0d0d;
    background: #f5c15b;
    border-color: #f5c15b;
    font-weight: 600;
}

/* ---------- Account form: responsive UX ---------- */

/* Чтоб Safari не увеличивал шрифт и не обрезал снизу на iPhone */
html,
body {
    min-height: 100%;
}

body {
    -webkit-text-size-adjust: 100%;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Базовая типографика полей */
.account-form .field label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.3;
}

/* Важное: font-size >=16px, чтобы iOS не зумил экран при фокусе */
.account-form .field input,
.account-form .field select,
.account-form .field textarea {
    width: 100%;
    box-sizing: border-box;
    height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e6e7ea;
}

/* ТекстоваяArea повыше */
.account-form .field textarea {
    min-height: 96px;
    height: auto;
    resize: vertical;
}

/* Селект аккуратнее на iOS/Android */
.account-form .field select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23f5c15b' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Сетка для блока «Оборудование» */
.equipment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

/* Таб-переключатели — комфорт на узком экране */
.tab-switch {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .tab-switch {
        gap: 6px;
    }

    .tab-btn {
        flex: 1 1 48%;
    }
}

/* Адаптивная типографика заголовков на мобилке */
@media (max-width: 480px) {
    h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .hero-sub {
        font-size: 15px;
    }
}

/* Сжатие формы на широких экранах, чтобы не «растягивалась» */
@media (min-width: 1100px) {
    .account-form {
        max-width: 720px;
    }
}

/* Колонки «Оборудование» по брейкпоинтам */
@media (max-width: 900px) {
    .equipment-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .equipment-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes bg-flow {
    0% {
        /* radial1, radial2, base */
        background-position: 0% 0%, 100% 0%, 50% 0%;
    }

    50% {
        /* двигаем только радилы, базу держим зафиксированной */
        background-position: 100% 40%, 0% 30%, 50% 0%;
    }

    100% {
        background-position: 0% 0%, 100% 0%, 50% 0%;
    }
}

.btn.btn-card .btn-txt {
    margin-left: 16px;
}

/* ===== Arrow inside link buttons ===== */

.btn.btn-card .btn-arrow {
    width: 20px;
    height: 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.65;
    transition: opacity .25s ease, transform .25s ease;
}

.btn.btn-card .btn-arrow img {
    width: 14px;
    height: 14px;
    display: block;
}

/* Hover — микро-движение вправо */
.btn.btn-card:hover .btn-arrow {
    opacity: 0.85;
    transform: translateX(2px);
}

/* ===== Links footer tuning ===== */
footer.footer-links {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;

    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0.02em;

    line-height: 1;
    /* ⬅ именно межстрочный интервал */
    margin-top: 7vh;
    /* ⬅ опускаем блок ниже */
}

footer.footer-links {
    color: rgba(159, 163, 181, 0.65);
}

footer.footer-links>span {
    width: 100%;
}

footer.footer-links>span:last-child {
    opacity: 0.6;
}

/* [hidden] must always win (и на десктопе, и на мобилке) */
.menu-btn[hidden],
.drawer[hidden],
.drawer-backdrop[hidden] {
    display: none !important;
}

/* desktop safety: прячем мобильное меню ТОЛЬКО на десктопе */
@media (min-width: 769px) {

    .menu-btn,
    .drawer,
    .drawer-backdrop {
        display: none !important;
    }
}

/* ===== Index: H1 (DESKTOP DEFAULT) ===== */
body[data-page="index"] .hero-title-balanced {
    text-align: left;
    /* ⬅ ВАЖНО */
    width: auto;
}

body[data-page="index"] .hero-title-balanced .h1-line {
    display: block;
}

/* =========================================================
   DESKTOP FIX: header full-width + centered logo (NO MOBILE TOUCH)
   ========================================================= */
@media (min-width: 769px) {

    /* 1) header на всю ширину */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;

        transform: none !important;
        width: 100% !important;

        z-index: 1000;

        margin: 0 !important;

        /* выравниваем контент header по сетке .page:
       (960px контент + 20px паддинги) */
        padding-left: max(20px, calc((100vw - 960px) / 2 + 20px));
        padding-right: max(20px, calc((100vw - 960px) / 2 + 20px));

        height: 72px;
        /* можешь 64/72/76 */
        box-sizing: border-box;

        /* 2) центровка лого без моб-слотов */
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 16px;

        background: none;
        border: none;
        box-shadow: none;
    }

    /* на десктопе меню не участвует в раскладке */
    header .menu-btn {
        display: none !important;
    }

    header .logo {
        justify-self: center;
    }

    header .header-right {
        justify-self: end;
    }

    /* 3) стекло на всю ширину */
header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    pointer-events: none;
    z-index: -1;

    background: var(--hdr-bg);
    -webkit-backdrop-filter: blur(var(--hdr-blur)) saturate(var(--hdr-saturate));
    backdrop-filter: blur(var(--hdr-blur)) saturate(var(--hdr-saturate));
}

    /* 4) нижняя линия на всю ширину */
    header::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;

        height: 1px;
        pointer-events: none;

        background: linear-gradient(90deg,
                transparent,
                rgba(255, 255, 255, .14),
                rgba(245, 193, 91, .18),
                rgba(255, 255, 255, .14),
                transparent);
        opacity: .6;
    }

    /* 5) чтобы контент не залезал под fixed header */
    body>.page>main {
        padding-top: calc(72px + 32px) !important;
    }
}

/* =========================================================
   DESKTOP FIX — remove header rounding
   ========================================================= */
@media (min-width: 769px) {

    header,
    header::before,
    header::after {
        border-radius: 0 !important;
    }

}

/* =========================
   FOOTER — DARK / SITE STYLE
   ========================= */

footer.site-footer {
    margin: 32px 0 0;
    /* было 72 */
    padding: 18px 0 22px;
    /* было 36/42 */

    border-top: 1px solid rgba(255, 255, 255, 0.06);

    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

footer.site-footer .sf-wrap {
    width: 100%;
    max-width: 1240px;
    /* было 960 */
    padding: 0 28px;
    /* было 20 */
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
    align-items: start;
}

/* LEFT */
footer.site-footer .sf-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;

    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.03em;
}

footer.site-footer .sf-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 999px;

    background: rgba(245, 193, 91, 0.15);
    box-shadow: 0 0 0 1px rgba(245, 193, 91, 0.25) inset;
}

footer.site-footer .sf-copy {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(159, 163, 181, 0.55);
}

/* CENTER */
footer.site-footer .sf-center {
    display: grid;
    gap: 10px;
    justify-content: center;
    text-align: left;
}

footer.site-footer .sf-center a {
    color: rgba(159, 163, 181, 0.75);
    text-decoration: none;
}

footer.site-footer .sf-center a:hover {
    color: var(--text-main);
}

/* RIGHT */
footer.site-footer .sf-right {
    text-align: right;
}

footer.site-footer .sf-phone {
    font-weight: 700;
    font-size: 17px;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

footer.site-footer .sf-hours {
    margin-top: 8px;
    font-size: 12.5px;
    color: rgba(159, 163, 181, 0.6);
}

footer.site-footer .sf-mail {
    margin-top: 10px;
    display: inline-block;

    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

footer.site-footer .sf-mail:hover {
    opacity: 0.85;
}

/* =========================================================
   DESKTOP HEADER — buttons use SAME style as .account-link
   ========================================================= */
@media (min-width: 769px) {

    /* КНОПКИ В ШАПКЕ = как на других страницах */
    .nav-link,
    .header-btn {
        font-size: 13px;
        padding: 7px 14px;
        border-radius: 999px;
        border: 1px solid var(--border-soft);
        color: var(--text-main);
        text-decoration: none;
        background: rgba(255, 255, 255, 0.01);
        cursor: pointer;

        display: inline-flex;
        align-items: center;
        line-height: 1.1;        /* ⬅ двигает baseline вниз */
        padding: 8px 14px 6px;   /* ⬅ оптическая компенсация */
        gap: 8px;
    }

    .nav-link:hover,
    .header-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    /* caret можно оставить спокойным */
    .nav-caret {
    --caret-size: 8px;
    /* ⬅ уменьшай/увеличивай стрелку */
    --caret-stroke: 2px;
    /* ⬅ толщина линий */
    --caret-rot: 45deg;
    /* вниз */

    width: var(--caret-size);
    height: var(--caret-size);
    display: inline-block;
    flex: 0 0 auto;

    border-right: var(--caret-stroke) solid rgba(244, 244, 244, 0.55);
    border-bottom: var(--caret-stroke) solid rgba(244, 244, 244, 0.55);
    opacity: .75;

    /* ВАЖНО: никаких translateY внутри caret -> не будет прыжков */
    transform-origin: 50% 50%;
    transform: rotate(var(--caret-rot));
    transition: transform .14s ease, opacity .14s ease;
}

@media (min-width: 769px) {

    /* важно: pill остается на месте, двигаем только span */
    .nav-link .nav-txt,
    .header-btn .btn-txt {
        position: relative;
        display: inline-block;
        transform: translate(0, 0);
        /* на всякий */
    }

    .nav-link .nav-txt {
        transform: translate(var(--hdr-products-txt-x), var(--hdr-products-txt-y));
    }

    .header-btn .btn-txt {
        transform: translate(var(--hdr-login-txt-x), var(--hdr-login-txt-y));
    }
}

/* вертикальную подгонку делаем НЕ transform'ом, а baseline */
.nav-link,
.header-btn {
    align-items: center;
    /* чтобы caret стоял по центру строки */
}

/* открытое состояние */
.nav-item.has-dropdown:hover .nav-caret,
.nav-item.has-dropdown:focus-within .nav-caret {
    --caret-rot: -135deg;
    /* вверх */
    opacity: .9;
}

/* dropdown — POSITION TUNERS (X/Y from :root) */
.nav-dd {
    position: absolute;
    top: calc(40px + 12px);
    /* 40px = высота pill по ощущению */
    left: 50%;

    /* ⬇ единый контроллер положения меню */
    transform: translate(calc(-50% + var(--hdr-dd-x)), var(--hdr-dd-y));

    min-width: 340px;
    padding: 10px;
    border-radius: 18px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(12, 14, 20, 0.473);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.nav-item.has-dropdown:hover .nav-dd,
.nav-item.has-dropdown:focus-within .nav-dd {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    /* ⬇ держим X/Y, добавляем лёгкий “подлёт” */
    transform: translate(calc(-50% + var(--hdr-dd-x)), calc(var(--hdr-dd-y) - 2px));
}

    .nav-dd-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;

        height: 44px;
        padding: 0 12px;
        border-radius: 12px;

        font-size: 14px;
        font-weight: 450;
        color: rgba(244, 244, 244, 0.88);
        text-decoration: none;

        transition: background .14s ease, color .14s ease;
    }

    .nav-dd-link::after {
        content: "";
        width: 7px;
        height: 7px;
        border-right: 2px solid rgba(255, 255, 255, .35);
        border-bottom: 2px solid rgba(255, 255, 255, .35);
        transform: rotate(-45deg);
        margin-left: 12px;
        flex: 0 0 auto;
    }

    .nav-dd-link:hover {
        background: rgba(255, 255, 255, 0.06);
        color: rgba(244, 244, 244, 0.98);
    }

    /* разделителей нет */
    .nav-dd-link+.nav-dd-link {
        border-top: none;
    }
}

/* =========================================================
   DESKTOP HEADER — STABLE LAYOUT (NO translateX)
   logo LEFT / products+login RIGHT
   ========================================================= */
@media (min-width: 769px) {

    header.site-header {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
    }

    /* ЛОГО — X tuner */
    header.site-header .logo {
        flex: 0 0 auto;
        transform: none !important;
        position: relative;
        left: var(--hdr-logo-x);
    }

    /* "Продукты" — X tuner (через relative left, чтобы не ломать auto-правило) */
    header.site-header .site-nav {
        margin-left: auto;
        flex: 0 0 auto;
        transform: none !important;
        position: relative;
        left: var(--hdr-products-x);
    }

    /* gap между "Продукты" и "Войти" */
    header.site-header .header-right {
        flex: 0 0 auto;
        transform: none !important;
        margin-left: var(--hdr-gap-right);
        position: relative;
        left: var(--hdr-login-x);
    }
}

@media (min-width: 769px) {

    .site-nav ul,
    .site-nav li {
        list-style: none;
        margin: 0;
        padding: 0;
    }
}

@media (min-width: 769px) {

    /* родитель для absolute dropdown */
    .nav-item.has-dropdown {
        position: relative;
    }

    /* “мостик” между пилюлей и меню — чтобы hover не слетал */
.nav-item.has-dropdown::after {
    content: "";
    position: absolute;

    left: 50%;
    right: auto;
    transform: translateX(-50%);

    top: 100%;
    width: 240px;
    /* можно 220–300 */
    height: 14px;
    background: transparent;
}

/* dropdown: строго по центру кнопки "Продукты" */
.nav-dd {
    z-index: 2000;

    left: 50%;
    right: auto;

    /* transform УДАЛЁН — позиция управляется через --hdr-dd-x / --hdr-dd-y */
}
}

@media (min-width: 769px) {

    .nav-caret {
        position: relative;
        display: inline-block;
        flex: 0 0 auto;

        /* ⬇ и X, и Y */
transform:
        translate(var(--hdr-caret-x), var(--hdr-caret-y)) scale(var(--hdr-caret-scale)) rotate(var(--caret-rot));

        transform-origin: 50% 50%;
        transition: transform .14s ease, opacity .14s ease;
    }

    /* OPEN / HOVER — сохраняем translate + меняем только rot */
    .nav-item.has-dropdown:hover .nav-caret,
    .nav-item.has-dropdown:focus-within .nav-caret {
transform:
        translate(var(--hdr-caret-open-x), var(--hdr-caret-open-y)) scale(var(--hdr-caret-open-scale)) rotate(var(--caret-rot));
    }
}

@media (min-width: 769px) {

    /* текст внутри обеих pill */
    .nav-link,
    .header-btn {
        color: var(--hdr-pill-fg);
    }

    /* caret (он border’ами) */
    .nav-caret {
        border-right-color: var(--hdr-pill-fg);
        border-bottom-color: var(--hdr-pill-fg);
    }

        /* open/hover состояние (и текст, и стрелка) */
        .nav-item.has-dropdown:hover .nav-link,
        .nav-item.has-dropdown:focus-within .nav-link {
            color: var(--hdr-pill-fg-open);
        }
    
        .nav-item.has-dropdown:hover .nav-caret,
        .nav-item.has-dropdown:focus-within .nav-caret {
            border-right-color: var(--hdr-pill-fg-open);
            border-bottom-color: var(--hdr-pill-fg-open);
        }
    
        /* "Войти" — ВСЕГДА как open (текст + рамка) */
        .header-btn {
            color: var(--hdr-pill-fg-open);
            border-color: rgba(245, 193, 91, .45);
        }
    
        /* hover можно сделать чуть сильнее (опционально) */
        .header-btn:hover {
            border-color: rgba(245, 193, 91, .65);
            color: rgba(245, 194, 91, 0.95);
        }
        }