:root {
    --footer-accent: #ff8a00;
    --footer-text: #f7f2eb;
    --footer-muted: #d3cbc1;
    --footer-bg: #120f10;
    --footer-card: rgba(22, 16, 14, 0.72);
    --footer-line: rgba(255, 160, 88, 0.18);
    --footer-badge-line: rgba(255, 191, 122, 0.55);
    --footer-badge-text: #ffd29d;
    --footer-badge-bg: rgba(255, 153, 51, 0.2);
    --footer-accent-rgb: 255, 138, 0;
}

html.theme-telegram,
body.theme-telegram {
    --footer-accent: #39a7ff;
    --footer-text: #ecf7ff;
    --footer-muted: #b8d8ef;
    --footer-bg: #0a1622;
    --footer-card: rgba(10, 34, 54, 0.72);
    --footer-line: rgba(99, 190, 255, 0.28);
    --footer-badge-line: rgba(142, 219, 255, 0.55);
    --footer-badge-text: #c5ecff;
    --footer-badge-bg: rgba(75, 185, 255, 0.22);
    --footer-accent-rgb: 57, 167, 255;
}

.landing-footer {
    position: relative;
    overflow: hidden;
    padding: 34px 0 16px;
    color: var(--footer-text);
    background:
        radial-gradient(620px 260px at 8% 0%, rgba(var(--footer-accent-rgb), 0.045), transparent 68%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.2)),
        var(--footer-bg);
    border-top: 1px solid var(--footer-line);
    box-shadow:
        inset 0 1px 0 rgba(var(--footer-accent-rgb), 0.055),
        0 -12px 40px rgba(0, 0, 0, 0.16);
}

.landing-footer::before {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    height: 1px;
    opacity: 0.56;
    background: linear-gradient(90deg, transparent, rgba(var(--footer-accent-rgb), 0.28), transparent);
}

.landing-footer-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(130px, 1fr));
    gap: 34px;
    width: min(1120px, 100% - 40px);
    margin: 0 auto;
}

.landing-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.landing-footer-logo-main {
    color: var(--footer-accent);
    font-size: 1.34rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
}

.landing-footer-logo-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    color: var(--footer-badge-text);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    background: var(--footer-badge-bg);
    border: 1px solid var(--footer-badge-line);
    border-radius: 999px;
    box-shadow: inset 0 0 10px rgba(var(--footer-accent-rgb), 0.045);
}

.landing-footer-text {
    max-width: 230px;
    margin: 0 0 18px;
    color: var(--footer-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.landing-footer-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--footer-accent);
    text-decoration: none;
    background: var(--footer-card);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 1px var(--footer-line),
        0 8px 18px rgba(0, 0, 0, 0.16);
    transition: transform .2s ease, box-shadow .2s ease;
}

.landing-footer-social:hover {
    transform: translateY(-2px);
    background: rgba(var(--footer-accent-rgb), 0.1);
    box-shadow:
        inset 0 0 0 1px rgba(var(--footer-accent-rgb), 0.28),
        0 10px 22px rgba(0, 0, 0, 0.18);
}

.landing-footer-social svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.landing-footer-col {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-left: 28px;
}

.landing-footer-col::before {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--footer-line), transparent);
}

.landing-footer-col h3 {
    margin: 0 0 7px;
    color: var(--footer-accent);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
}

.landing-footer-col a {
    color: var(--footer-muted);
    font-size: 0.76rem;
    line-height: 1.35;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.landing-footer-col a:hover {
    color: var(--footer-text);
    transform: translateX(2px);
}

.landing-footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.landing-footer-contact-icon {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--footer-accent);
    background: var(--footer-card);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--footer-line);
}

.landing-footer-contact-icon svg {
    display: block;
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.landing-footer-copy {
    position: relative;
    z-index: 1;
    width: min(1120px, 100% - 40px);
    margin: 24px auto 0;
    color: var(--footer-muted);
    font-size: 0.68rem;
    line-height: 1.4;
    text-align: center;
    opacity: 0.46;
}

@media (max-width: 980px) {
    .landing-footer-wrap {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 30px 24px;
    }

    .landing-footer-brand {
        grid-column: 1 / -1;
    }

    .landing-footer-text {
        max-width: 380px;
    }
}

@media (max-width: 640px) {
    .landing-footer {
        padding: 30px 0 16px;
    }

    .landing-footer-wrap,
    .landing-footer-copy {
        width: min(100% - 24px, 420px);
    }

    .landing-footer-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .landing-footer-brand {
        grid-column: auto;
    }

    .landing-footer-col {
        padding-left: 0;
    }

    .landing-footer-col::before {
        display: none;
    }

    .landing-footer-logo {
        flex-wrap: wrap;
    }

    .landing-footer-copy {
        text-align: left;
    }
}
