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

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/montserrat/montserrat-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/montserrat/montserrat-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;
}

:root {
    --color-primary: rgb(17, 26, 85);
    --color-accent: rgb(30, 138, 163);
    --color-accent-light: rgb(120, 200, 220);
    --color-link: rgb(24, 110, 130);
    --color-text: rgb(7, 14, 55);
    --color-text-muted: rgba(7, 14, 55, 0.75);
    --color-background: rgb(226, 230, 234);
    --color-white: rgb(255, 255, 255);

    --radius: 16px;
    --radius-small: 10px;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 30px rgba(17, 26, 85, 0.18);
    --content-width: 1100px;

    interpolate-size: allow-keywords;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text);
}

a {
    transition: color 0.2s ease;
}

:focus-visible {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
    border-radius: 4px;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.logo {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo a {
    text-decoration: none;
}

.main-nav {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    position: relative;
    padding: 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-link);
    text-decoration: none;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.current-link::after {
    transform: scaleX(1);
}

.main-nav a:hover {
    color: var(--color-accent);
}

.main-nav a.current-link {
    color: var(--color-text);
}

.main-nav .lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px 6px;
    border: 2px solid currentColor;
    border-radius: 999px;
    font-size: 0.9rem;
    line-height: 1;
}

.main-nav .lang-switch::after {
    display: none;
}

.telegram-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-small);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.telegram-btn {
    color: var(--color-white);
    background: linear-gradient(270deg, var(--color-primary), var(--color-link), var(--color-primary));
    background-size: 600% 600%;
    animation: gradientMove 5s ease infinite;
    box-shadow: 0 6px 18px rgba(0, 123, 255, 0.12);
}

.telegram-btn:hover {
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.telegram-btn:active,
.btn:active {
    transform: translateY(2px);
}

.btn {
    color: var(--color-link);
    background: var(--color-white);
    border: 2px solid var(--color-link);
}

.btn:hover {
    color: var(--color-white);
    background: var(--color-link);
}

.btn-light {
    color: var(--color-white);
    background: transparent;
    border-color: var(--color-white);
}

.btn-light:hover {
    color: var(--color-primary);
    background: var(--color-white);
}

.btn-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.text-short {
    display: none;
}

@keyframes gradientMove {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-block {
    background-color: var(--color-background);
    background-image: repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.15) 2px,
            transparent 2px,
            transparent 10px
    );
    padding: 48px 20px;
    text-align: center;
}

.main-block.section-light {
    background: var(--color-white);
}

section.main-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-block .container {
    max-width: 800px;
    margin: 20px auto;
}

.main-block h1,
.main-block h2 {
    font-weight: 600;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--color-text);
}

.main-block p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-text);
}

.main-block .lead {
    margin-bottom: 32px;
}

.main-block .published {
    margin: 30px 0 0;
    font-size: 1rem;
    text-align: left;
    color: var(--color-text-muted);
}

.text-link {
    color: var(--color-link);
    text-decoration: none;
}

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

.hero {
    position: relative;
    isolation: isolate;
    justify-content: center;
    min-height: 480px;
    padding: 60px 24px;
    color: var(--color-white);
}

.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(9, 2, 33, 0.9) 0%, rgba(9, 2, 33, 0.65) 55%, rgba(9, 2, 33, 0.3) 100%);
}

.hero-content {
    width: 100%;
    max-width: var(--content-width);
}

.hero h1 {
    max-width: 640px;
    margin: 0 0 20px;
    font-size: 2.6rem;
    line-height: 1.2;
}

.hero p {
    max-width: 560px;
    margin: 0 0 32px;
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cards {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: var(--content-width);
}

.cards-3 {
    grid-template-columns: repeat(3, 1fr);
}


.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow);
    text-align: left;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.card:hover,
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.main-block .card h2,
.card h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
}

.main-block .card p {
    max-width: none;
    margin: 0;
    font-size: 1rem;
}

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-link));
}

.icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-card p {
    flex-grow: 1;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 600;
}

.service-card {
    scroll-margin-top: 100px;
}

.main-block .services-note {
    margin-top: 32px;
}

.service-card:target {
    box-shadow: 0 0 0 3px var(--color-accent), var(--shadow-hover);
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: var(--content-width);
    margin-bottom: 32px;
}

.stats div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background: var(--color-background);
}

.stats strong {
    font-size: 2rem;
    color: var(--color-link);
}

.stats span {
    color: var(--color-text-muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 720px;
    margin: 16px 0 28px;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--color-link);
    background: rgba(30, 138, 163, 0.1);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: var(--content-width);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--color-background);
    text-align: left;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border-radius: 50%;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-link);
}

.steps strong {
    font-size: 1.15rem;
}

.steps span {
    line-height: 1.5;
    color: var(--color-text-muted);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
    font-size: 1.2rem;
    text-align: left;
}

.checklist li {
    display: flex;
    gap: 12px;
}

.checklist li::before {
    content: '✓';
    font-weight: 700;
    color: var(--color-link);
}

.error-page {
    padding: 80px 20px 100px;
}

.main-block .error-code {
    margin-bottom: 16px;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.accordion-container {
    padding: 0;
    list-style: none;
}

.accordion-container li:not(:first-child) {
    margin-top: 10px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-icon {
    margin-right: 20px;
    transition: transform 0.7s ease;
}

.accordion[open] .accordion-icon {
    transform: rotate(180deg);
}

.accordion::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.5s ease-out, content-visibility 0.5s allow-discrete;
}

.accordion[open]::details-content {
    block-size: auto;
}

.accordion-content {
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.15);
}

.accordion-content p {
    margin: 10px 20px;
}

footer {
    background: var(--color-white);
    box-shadow: var(--shadow);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 40px 24px;
}

.footer-about p {
    margin: 12px 0 0;
    color: var(--color-text-muted);
}

.footer-title {
    margin: 0 0 12px;
    font-weight: 700;
}

.footer-top ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-nav a,
.footer-contacts a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--color-link);
    text-decoration: none;
}

.footer-nav a:hover,
.footer-contacts a:hover {
    color: var(--color-accent);
}

.footer-nav a.current-link {
    color: var(--color-text);
}

.footer-contacts svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    padding: 16px 24px;
    text-align: center;
    color: var(--color-background);
    background: var(--color-primary);
}

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

    .telegram-btn {
        animation-duration: 20s;
    }

    .accordion-icon,
    .accordion::details-content,
    .card {
        transition-duration: 0.2s;
    }
}

@media (max-width: 1024px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        position: static;
        grid-template-columns: auto auto;
        grid-template-areas:
            "logo button"
            "nav nav";
        justify-content: space-between;
        row-gap: 12px;
        padding: 16px 24px;
    }

    header .logo {
        grid-area: logo;
        font-size: 1.3rem;
    }

    header .telegram-btn {
        grid-area: button;
    }

    .main-nav {
        grid-area: nav;
        justify-self: center;
    }

    .text-full {
        display: none;
    }

    .text-short {
        display: inline;
    }

    .hero {
        min-height: 0;
        padding: 48px 20px;
    }

    .hero::before {
        background: rgba(9, 2, 33, 0.8);
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .main-block {
        padding: 40px 16px;
    }

    .main-block h1,
    .main-block h2 {
        font-size: 1.7rem;
    }

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

    .stats div {
        min-width: 0;
        flex: 1 1 180px;
    }

    .accordion-icon {
        margin-right: 0;
    }

    .accordion-content {
        margin-right: 0;
    }

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

@media (max-width: 560px) {
    .cards-3 {
        grid-template-columns: 1fr;
    }
}

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

    .hero-actions a {
        flex: 1 1 100%;
    }
}

@media (max-width: 364px) {
    header {
        padding: 8px 12px;
    }

    .main-nav {
        gap: 14px;
    }

    .main-nav a {
        font-size: 1rem;
    }

    .main-block h1 {
        font-size: 1.5rem;
    }
}
