@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched local fallback: keeps the swap to Manrope from shifting the layout. */
@font-face {
    font-family: "Manrope Fallback";
    src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
    size-adjust: 104%;
    ascent-override: 102%;
    descent-override: 29%;
    line-gap-override: 0%;
}

:root {
    /* Brand: the five fixed G3 colors. */
    --color-brand-blue: #2563ff;
    --color-brand-indigo: #6d28d9;
    --color-brand-violet: #8b5cf6;
    --color-brand-lavender: #c084fc;
    --color-brand-pale: #e0e7ff;

    /* UI derivatives, every text pair checked for WCAG AA. */
    --color-text-strong: #0b1033;
    --color-text: #1f2547;
    --color-text-muted: #4a5278;
    --color-text-on-action: #ffffff;
    --color-surface-page: #fafbff;
    --color-surface-card: #ffffff;
    --color-surface-tint: #f1f4ff;
    --color-border: #e3e7f5;
    --color-action: #2563ff;
    --color-action-hover: #1a4fe0;
    --color-focus: #6d28d9;

    /* Telegram preview, close to the Telegram light theme. */
    --color-tg-chat: #dfe8f3;
    --color-tg-out: #e6fbd5;
    --color-tg-in: #ffffff;
    --color-tg-button: #4b6a8e;
    --color-tg-quote: #2563ff;
    --color-tg-meta: #5d6b80;

    --gradient-brand: linear-gradient(120deg, var(--color-brand-blue), var(--color-brand-indigo) 60%, var(--color-brand-violet));

    --font-sans: "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --type-h1: clamp(2rem, 1.35rem + 3vw, 3.4rem);
    --type-h2: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
    --type-h3: 1.15rem;
    --type-lead: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
    --type-body: 1rem;
    --type-small: 0.875rem;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-card: 0 1px 2px rgba(11, 16, 51, 0.04), 0 8px 24px rgba(37, 99, 255, 0.06);
    --shadow-raised: 0 2px 6px rgba(11, 16, 51, 0.06), 0 24px 48px rgba(37, 99, 255, 0.12);

    --container: 1160px;
    --container-text: 720px;
    --gutter: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--type-body);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-surface-page);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3 {
    color: var(--color-text-strong);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

h1 {
    font-size: var(--type-h1);
    font-weight: 800;
    text-wrap: balance;
}

h2 {
    font-size: var(--type-h2);
    font-weight: 800;
    text-wrap: balance;
}

h3 {
    font-size: var(--type-h3);
    font-weight: 700;
}

p {
    margin: 0;
}

a {
    color: var(--color-action);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--space-9) 0;
}

.section--tint {
    background: var(--color-surface-tint);
}

.section__head {
    max-width: var(--container-text);
    margin: 0 auto var(--space-7);
    text-align: center;
}

.section__head p {
    margin-top: var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--type-lead);
}

.eyebrow {
    display: inline-block;
    margin-bottom: var(--space-4);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--color-brand-pale);
    color: var(--color-brand-indigo);
    font-size: var(--type-small);
    font-weight: 700;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 52px;
    padding: 0 var(--space-6);
    border-radius: var(--radius-md);
    background: var(--color-action);
    color: var(--color-text-on-action);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(37, 99, 255, 0.28);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
    background: var(--color-action-hover);
    transform: translateY(-1px);
}

.button--small {
    min-height: 44px;
    padding: 0 var(--space-5);
    font-size: 0.95rem;
    box-shadow: none;
}

.button svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.cta-note {
    margin-top: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--type-small);
}

/* Header */

.site-header {
    padding: var(--space-4) 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.site-header__logo img {
    width: 136px;
    height: auto;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.site-header__nav a:not(.button) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-text);
    font-weight: 600;
    text-decoration: none;
}

.site-header__nav a:not(.button):hover {
    color: var(--color-action);
}

/* Hero */

.hero {
    position: relative;
    padding: var(--space-7) 0 var(--space-9);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto 35%;
    height: 120%;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.18), rgba(37, 99, 255, 0.08) 55%, transparent);
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.hero__lead {
    margin-top: var(--space-5);
    color: var(--color-text-muted);
    font-size: var(--type-lead);
    max-width: 34em;
}

.hero__actions {
    margin-top: var(--space-6);
}

.hero__visual {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 420px;
    padding-top: 56px;
}

.hero__mascot {
    position: absolute;
    top: 0;
    right: -12px;
    width: 150px;
    z-index: 2;
}

/* Telegram preview */

.tg {
    border-radius: var(--radius-lg);
    background: var(--color-surface-card);
    box-shadow: var(--shadow-raised);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.tg__bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.tg__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-brand-pale);
    padding: 3px;
}

.tg__name {
    font-weight: 700;
    color: var(--color-text-strong);
    line-height: 1.2;
}

.tg__status {
    font-size: 0.8rem;
    color: var(--color-tg-meta);
}

.tg__chat {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--color-tg-chat);
}

.tg__msg {
    max-width: 88%;
    padding: var(--space-2) var(--space-3);
    border-radius: 14px;
    background: var(--color-tg-in);
    color: var(--color-text-strong);
    font-size: 0.92rem;
    line-height: 1.45;
    box-shadow: 0 1px 1px rgba(11, 16, 51, 0.08);
}

.tg__msg--out {
    align-self: flex-end;
    background: var(--color-tg-out);
    border-bottom-right-radius: 4px;
}

.tg__msg--in {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.tg__quote {
    margin: 0 0 var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-left: 3px solid var(--color-tg-quote);
    border-radius: 4px;
    background: rgba(37, 99, 255, 0.07);
}

.tg__meta {
    color: var(--color-tg-meta);
    font-size: 0.85rem;
}

.tg__buttons {
    display: grid;
    gap: var(--space-1);
    max-width: 88%;
    width: 100%;
}

.tg__button {
    display: block;
    padding: var(--space-2);
    border-radius: 10px;
    background: var(--color-tg-button);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.tg__label {
    padding: var(--space-2) var(--space-4);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-align: center;
    background: var(--color-surface-card);
}

/* Cards and grids */

.card {
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.compare h3 {
    margin-bottom: var(--space-4);
}

.compare ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: var(--space-3);
}

.compare li {
    position: relative;
    padding-left: 32px;
}

.compare li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-border) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6l8 8M14 6l-8 8' stroke='%234a5278' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.compare__after {
    border-color: rgba(37, 99, 255, 0.35);
}

.compare__after li::before {
    background: var(--color-action) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-brand);
    color: #ffffff;
    font-weight: 800;
}

.steps p {
    color: var(--color-text-muted);
}

.steps .tg__msg {
    margin-top: auto;
    max-width: 100%;
}

.chip {
    display: inline-block;
    padding: 2px var(--space-2);
    border-radius: 6px;
    background: var(--color-surface-tint);
    color: var(--color-text-strong);
    font-weight: 600;
    white-space: nowrap;
}

.anatomy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-8);
    align-items: center;
}

.anatomy .tg__chat {
    padding: var(--space-5);
}

.anatomy .tg__msg,
.anatomy .tg__buttons {
    max-width: 100%;
}

.anatomy h2 {
    margin-bottom: var(--space-6);
}

.anatomy ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: var(--space-5);
}

.anatomy li {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: var(--space-3);
}

.anatomy li span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-brand-pale);
    color: var(--color-brand-indigo);
    font-weight: 800;
}

.anatomy li p {
    color: var(--color-text-muted);
}

.cities {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.cities li {
    padding: var(--space-5);
    border-radius: var(--radius-md);
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
}

.cities strong {
    display: block;
    color: var(--color-text-strong);
    font-size: 1.15rem;
}

.cities span {
    color: var(--color-text-muted);
    font-size: var(--type-small);
}

.cities-note {
    max-width: var(--container-text);
    margin: var(--space-6) auto 0;
    color: var(--color-text-muted);
    text-align: center;
}

/* FAQ */

.faq {
    max-width: var(--container-text);
    margin: 0 auto;
    display: grid;
    gap: var(--space-3);
}

.faq details {
    border-radius: var(--radius-md);
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    min-height: 56px;
    padding: var(--space-3) var(--space-5);
    color: var(--color-text-strong);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    color: var(--color-action);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    padding: 0 var(--space-5) var(--space-5);
    color: var(--color-text-muted);
}

/* Final CTA */

.final {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-6);
    align-items: center;
    padding: var(--space-7);
    border-radius: var(--radius-lg);
    background: radial-gradient(120% 140% at 0% 0%, rgba(192, 132, 252, 0.28), transparent 55%), var(--color-brand-pale);
}

.final img {
    width: 120px;
}

.final p {
    margin: var(--space-3) 0 var(--space-5);
    color: var(--color-text);
    font-size: var(--type-lead);
}

/* Long-form content (city pages) */

.prose {
    max-width: var(--container-text);
    margin: 0 auto;
}

.prose h2 {
    margin: var(--space-7) 0 var(--space-4);
    font-size: 1.6rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p,
.prose li {
    margin-bottom: var(--space-3);
}

.prose ul,
.prose ol {
    padding-left: 22px;
}

.placeholder {
    background: #fff4d6;
}

/* Footer */

.site-footer {
    padding: var(--space-7) 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--type-small);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-4);
}

.site-footer p + p {
    margin-top: var(--space-2);
}

/* Motion: one entrance fade, off for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        animation: reveal 0.6s ease-out both;
    }

    .reveal--late {
        animation-delay: 0.15s;
    }

    @keyframes reveal {
        from {
            opacity: 0;
            transform: translateY(12px);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button {
        transition: none;
    }
}

/* Responsive */

@media (max-width: 960px) {
    .hero .container,
    .anatomy {
        grid-template-columns: 1fr;
        gap: var(--space-7);
    }

    .hero__visual {
        max-width: 400px;
    }

    .hero__mascot {
        right: -8px;
        width: 120px;
    }

    .steps,
    .compare {
        grid-template-columns: 1fr;
    }

    /* Text first: on one column the explanation should lead the example. */
    .anatomy > figure {
        order: 1;
    }

    .cities {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    :root {
        --gutter: 16px;
    }

    .section {
        padding: var(--space-8) 0;
    }

    .hero {
        padding: var(--space-5) 0 var(--space-8);
    }

    .site-header__nav a:not(.button) {
        display: none;
    }

    .site-header__logo img {
        width: 116px;
    }

    .button:not(.button--small) {
        width: 100%;
    }

    .card,
    .final {
        padding: var(--space-5);
    }

    .final {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .final img {
        width: 88px;
        margin: 0 auto;
    }

    .cities li {
        padding: var(--space-4);
    }
}
