.cn {
    --fp-acc: #6d4cf0;
    --fp-soft: #f2efff;
    --fp-line: #ebeaf2;
    --cn-ink: #0d0c18;
    --cn-ok: #12a26b;
}

.cn-hero {
    position: relative;
    isolation: isolate;
    margin-top: -64px;
    padding: 156px 0 72px;
    overflow: clip;
    background: linear-gradient(180deg, #f6f4ff, #fff 78%);
}

.cn-hero__bg i {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(13, 12, 24, .1) 1px, transparent 1.3px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 55% 60% at 75% 40%, #000 15%, transparent 72%);
}

.cn-hero__bg span {
    position: absolute;
    z-index: -1;
    top: 8%;
    right: -6%;
    width: 640px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 123, 255, .28), transparent 65%);
    filter: blur(10px);
}

.cn-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
}

.cn-hero__grid > *,
.cn-main__grid > * {
    min-width: 0;
}

.cn-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    margin: 0 0 26px;
    padding: 0 14px 0 4px;
    border-radius: 999px;
    border: 1px solid var(--fp-line);
    background: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-weight: 500;
    color: #3a3a48;
}

.cn-eyebrow b {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--cn-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.cn-eyebrow span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cn-eyebrow i,
.cn-chat__top small i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cn-ok);
    box-shadow: 0 0 0 0 rgba(18, 162, 107, .5);
    animation: cn-ping 1.8s ease-out infinite;
}

@keyframes cn-ping {
    to { box-shadow: 0 0 0 9px rgba(18, 162, 107, 0); }
}

.cn-visual {
    position: relative;
    padding: 0 0 64px 40px;
}

.cn-visual img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 60px 120px -60px rgba(40, 20, 90, .55);
}

.cn-chat {
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(330px, 78%);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 40px 80px -30px rgba(13, 12, 24, .45);
    overflow: hidden;
}

.cn-chat__top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0eff5;
}

.cn-chat__av {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--cn-ink);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.cn-chat__top > span:last-child {
    display: grid;
}

.cn-chat__top b {
    font-size: 13.5px;
    font-weight: 600;
}

.cn-chat__top small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #6b6b7b;
}

.cn-chat__top small i {
    width: 6px;
    height: 6px;
}

.cn-chat__body {
    display: grid;
    gap: 8px;
    min-height: 150px;
    align-content: start;
    padding: 14px;
}

.cn-msg {
    max-width: 86%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .35s, transform .35s;
}

.cn-msg.is-on {
    opacity: 1;
    transform: none;
}

.cn-msg:empty {
    display: none;
}

.cn-msg.is-in {
    justify-self: end;
    border-bottom-right-radius: 5px;
    background: var(--cn-ink);
    color: #fff;
}

.cn-msg.is-out {
    border-bottom-left-radius: 5px;
    background: #f2f1f7;
    color: var(--cn-ink);
}

.cn-typing {
    display: none;
    gap: 4px;
    width: fit-content;
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f2f1f7;
}

.cn-typing.is-on {
    display: inline-flex;
}

.cn-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9b99ad;
    animation: cn-dot 1s infinite;
}

.cn-typing i:nth-child(2) { animation-delay: .15s; }
.cn-typing i:nth-child(3) { animation-delay: .3s; }

@keyframes cn-dot {
    50% { transform: translateY(-4px); opacity: .5; }
}

.cn-channels {
    position: relative;
    z-index: 2;
    margin-top: -8px;
}

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

.cn-ch-grid--n4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cn-ch-grid--n2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cn-ch-grid--n1 {
    grid-template-columns: minmax(0, 1fr);
}

.cn-ch {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--fp-line);
    background: #fff;
    color: var(--cn-ink);
    text-decoration: none;
    box-shadow: 0 30px 60px -50px rgba(13, 12, 24, .45);
    transition: transform .3s cubic-bezier(.3, .7, .2, 1), border-color .3s, box-shadow .3s;
}

.cn-ch:hover {
    transform: translateY(-4px);
    border-color: #d8d3f3;
    box-shadow: 0 40px 70px -45px rgba(60, 30, 140, .45);
}

.cn-ch__ic {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--fp-soft);
    color: var(--fp-acc);
}

.cn-ch--1 .cn-ch__ic { background: #e8f8f0; color: #12875a; }
.cn-ch--2 .cn-ch__ic { background: #fff1e6; color: #c25d14; }
.cn-ch--3 .cn-ch__ic { background: #e9f1ff; color: #2b5fd0; }

.cn-ch__ic .fp-ico {
    width: 22px;
    height: 22px;
}

.cn-ch__txt {
    display: grid;
    min-width: 0;
}

.cn-ch__txt small {
    font-size: 13px;
    color: #6b6b7b;
}

.cn-ch__txt b {
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cn-ch__go {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f5f4f9;
    transition: background .25s, color .25s, transform .25s;
}

.cn-ch__go .fp-ico {
    width: 16px;
    height: 16px;
}

.cn-ch:hover .cn-ch__go {
    background: var(--cn-ink);
    color: #fff;
    transform: rotate(45deg);
}

.cn-main__grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 22px;
    align-items: start;
}

.cn-form {
    padding: 36px;
    border-radius: 28px;
    border: 1px solid var(--fp-line);
    background: #fff;
    box-shadow: 0 50px 100px -70px rgba(13, 12, 24, .5);
}

.cn-form__head h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -.025em;
}

.cn-form__head p {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: #6b6b7b;
}

.cn-alert {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.cn-alert.is-ok {
    background: #e9f9f1;
    color: #0e7a52;
}

.cn-alert.is-err {
    background: #fdecec;
    color: #b42318;
}

.cn-fields {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.cn-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cn-field {
    display: grid;
    gap: 7px;
}

.cn-field > span {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.cn-field > span small {
    font-weight: 500;
    color: #9a99a8;
}

.cn-field input,
.cn-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid #e3e2ea;
    background: #fafafc;
    font: inherit;
    font-size: 14.5px;
    color: var(--cn-ink);
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.cn-field textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.55;
}

.cn-field input:focus,
.cn-field textarea:focus {
    border-color: var(--fp-acc);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 76, 240, .12);
}

.cn-field em {
    display: none;
    font-style: normal;
    font-size: 12.5px;
    color: #c4321f;
}

.cn-field.is-err input,
.cn-field.is-err textarea {
    border-color: #e5533d;
    background: #fff8f7;
}

.cn-field.is-err em {
    display: block;
}

.cn-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 6px;
}

.cn-submit .fp-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.cn-submit p {
    margin: 0;
    font-size: 13px;
    color: #8a899a;
}

.cn-submit a {
    color: var(--cn-ink);
}

.cn-office {
    position: sticky;
    top: 100px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--cn-ink);
    color: #fff;
    box-shadow: 0 50px 100px -60px rgba(13, 12, 24, .7);
}

.cn-map {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #1b1930;
}

.cn-map img,
.cn-map svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cn-map__water {
    fill: rgba(109, 76, 240, .28);
}

.cn-map__roads path {
    fill: none;
    stroke: rgba(255, 255, 255, .22);
    stroke-width: 7;
    stroke-linecap: round;
}

.cn-map__minor path {
    fill: none;
    stroke: rgba(255, 255, 255, .08);
    stroke-width: 2;
}

.cn-map::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(13, 12, 24, .7));
}

.cn-pin {
    position: absolute;
    left: 50%;
    top: 46%;
    z-index: 1;
}

.cn-pin i {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    translate: -50% -50%;
    background: rgba(155, 123, 255, .6);
    animation: cn-wave 2.2s ease-out infinite;
}

@keyframes cn-wave {
    from { transform: scale(1); opacity: .9; }
    to { transform: scale(5); opacity: 0; }
}

.cn-pin b {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    translate: -50% -100%;
    border-radius: 50% 50% 50% 0;
    rotate: -45deg;
    background: linear-gradient(135deg, #9b7bff, #6d4cf0);
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6);
    animation: cn-bob 3s ease-in-out infinite;
}

.cn-pin b::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    translate: -50% -50%;
    border-radius: 50%;
    background: #fff;
}

@keyframes cn-bob {
    50% { transform: translateY(-5px); }
}

.cn-map__city {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 1;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    font-size: 12.5px;
    font-weight: 600;
}

.cn-office__body {
    padding: 24px 24px 8px;
}

.cn-office__k {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #a9a6c4;
}

.cn-office__addr {
    margin: 0;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 550;
}

.cn-office__list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
}

.cn-office__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #d7d5e6;
}

.cn-office__list .fp-ico {
    width: 17px;
    height: 17px;
    color: #a48cff;
}

.cn-office__list a {
    color: #fff;
    text-decoration: none;
}

.cn-office__list a:hover {
    text-decoration: underline;
}

.cn-office__dir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    margin-top: 22px;
    padding: 0 16px;
    border-radius: 12px;
    background: #fff;
    color: var(--cn-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.cn-office__dir .fp-ico {
    width: 16px;
    height: 16px;
    transition: transform .2s;
}

.cn-office__dir:hover .fp-ico {
    transform: translate(2px, -2px);
}

.cn-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 24px 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
    color: #a9a6c4;
}

.cn-social div {
    display: flex;
    gap: 8px;
}

.cn-social a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transition: background .2s, color .2s;
}

.cn-social a:hover {
    background: #fff;
    color: var(--cn-ink);
}

.cn-social svg {
    width: 16px;
    height: 16px;
}

.cn-end {
    height: 40px;
}

@media (max-width: 1024px) {
    .cn-hero__grid,
    .cn-main__grid {
        grid-template-columns: 1fr;
    }

    .cn-office {
        position: static;
    }

    .cn-ch-grid,
    .cn-ch-grid--n4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .cn-hero {
        padding: 116px 0 48px;
    }

    .cn-visual {
        padding: 0 0 90px;
    }

    .cn-chat {
        left: 12px;
        right: 12px;
        width: auto;
    }

    .cn-ch-grid,
    .cn-ch-grid--n4,
    .cn-ch-grid--n2 {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .cn-ch {
        padding: 16px;
    }

    .cn-form {
        padding: 22px;
        border-radius: 24px;
    }

    .cn-form__head h2 {
        font-size: 24px;
    }

    .cn-row {
        grid-template-columns: 1fr;
    }

    .cn-submit .fp-btn {
        width: 100%;
    }

    .cn-office__body {
        padding: 20px 20px 4px;
    }

    .cn-social {
        margin: 16px 20px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cn-eyebrow i,
    .cn-chat__top small i,
    .cn-typing i,
    .cn-pin i,
    .cn-pin b {
        animation: none;
    }
}
