* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f0b1f;              /* Основной фон */
    --bg-soft: #18132f;         /* Карточки / блоки */
    --bg-glass: #18132fcc;      /* Header (стекло) */

    --text: #ffffff;            /* Основной текст */
    --text-soft: #cfcbe6;       /* Вторичный текст */

    --accent: #7b5cff;          /* Фиолетовый акцент */
    --accent-hover: #6a4af0;

    --radius: 14px;
    --max-width: 1100px;
    --transition: .25s ease;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

body {
    font-family: system-ui, sans-serif;
    background: radial-gradient(1200px 600px at 20% -10%, #241a4d 0%, transparent 60%),
                radial-gradient(900px 500px at 90% 10%, #1a1340 0%, transparent 60%),
                var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}




header {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity .35s ease,
        visibility .35s ease;
    width: 100%;
    padding: 18px 0;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #ffffff10;
}

header.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu {
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 26px;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 500;
    padding: 8px 6px;
    transition: var(--transition);
    display: inline-block;
}

.nav-menu a:hover {
    color: var(--accent);
}

.submenu {
    position: absolute;
    top: 130%;
    left: 0;
    min-width: 200px;
    background: linear-gradient(180deg, #1d1640, var(--bg-soft));
    border-radius: var(--radius);
    border: 1px solid #ffffff15;
    box-shadow: 0 20px 50px #00000070;
    padding: 10px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 50;
}

.submenu li {
    list-style: none;
}

.submenu a {
    padding: 10px 18px;
    display: block;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.submenu a:hover {
    background: #7b5cff20;
    color: #fff;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-submenu > a::after {
    content: "▾";
    font-size: 0.7rem;
    margin-left: 6px;
    opacity: 0.6;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}




.menu {
    display: flex;
    gap: 24px;
}

.menu a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 500;
    transition: var(--transition);
}

.menu a:hover {
    color: var(--accent);
}




.hero {
    padding: 100px 0 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-left {
    max-width: 520px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-soft);
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}




.btn-primary {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--accent), #9a84ff);
    color: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 10px 30px #7b5cff40;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px #7b5cff60;
    cursor: pointer;
}

.btn-ai {
    margin-top: 16px;

    --color: var(--accent-hover);

  padding: 10px 20px;              /* как у btn-primary */
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;

  color: var(--color);
  background: transparent;
  border: 2px solid var(--color);
  border-radius: var(--radius);
  text-decoration: none;

  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: var(--transition);
}

/* круг заливки — тот же accent, но темнее */
.btn-ai::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 240px;
  border-radius: 50%;
  z-index: -1;

  background: linear-gradient(
    135deg,
    #5f4be0,
    #6a5cff
  );

  top: 100%;
  left: 100%;
  transition: 0.35s ease;
}

/* hover */
.btn-ai:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px #5f4be040;
}

.btn-ai:hover::before {
  top: -50px;
  left: -50px;
}


.hero-right img {
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius);
    box-shadow: 0 25px 60px #00000080;
}




.cards-block {
    padding: 90px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 45px;
}

.card {
    padding: 28px;
    background: linear-gradient(180deg, #1d1640, var(--bg-soft));
    border-radius: var(--radius);
    border: 1px solid #ffffff10;
    box-shadow: 0 20px 50px #00000050;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    border-color: #7b5cff50;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-text {
    color: var(--text-soft);
}

.cards-block h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align:center;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.card-header svg {
    width: 26px;
    height: 26px;
    color: #7b5cff;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.card:hover .card-header svg {
    transform: scale(1.1);
}




.site-footer {
    background: radial-gradient(
        ellipse at 25% 40%,
        rgba(24, 19, 45, 0.95) 0%,
        rgba(15, 11, 31, 0.97) 100%
        );
    backdrop-filter: blur(12px);
    color: var(--text-soft);
    padding: 50px 20px 25px;
    font-size: 0.95rem;
    border-top: 1px solid #ffffff10;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 40px;
}

.footer-about {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-about img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: rgba(24, 19, 45, 0.3);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 0 15px rgba(123, 92, 255, 0.25);
}

.footer-about-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-about-text h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.footer-about-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-soft);
    opacity: 0.8;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact a {
    color: var(--text-soft);
    text-decoration: none;
}

.social-icons a {
    display: inline-block;
    margin-right: 10px;
}

.social-icons img {
    width: 28px;
    height: 28px;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover img {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(123, 92, 255, 0.8));
}

.footer-bottom {
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}




/* =========================
   WORKS SECTION
========================= */

.works {
    padding: 100px 0 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

/* LEFT */

.works-left {
    flex-shrink: 0;
}

.works-image {
    width: 460px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 25px 60px #00000080;
}

/* RIGHT */

.works-right {
    display: flex;
    flex-direction: column;
    gap: 42px;
    max-width: 560px;
}

/* TEXT */

.words-r-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.works-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.15;
}

.works-subtitle {
    font-size: 1.2rem;
    color: var(--text-soft);
    margin-bottom: 28px;
}

/* BUTTON — НЕ ТЯНЕТСЯ */

.tg-button {
    align-self: flex-start;
    width: auto;
    padding: 14px 26px;
    white-space: nowrap;
}

/* =========================
   SINGLE ROW CAROUSEL
========================= */

.words-r-down {
    width: 100%;
}

.portfolio-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;

    mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
}

.carousel-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: portfolioScroll 12s linear infinite;
}

.carousel-track img {
    width: 190px;
    height: 130px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 15px 35px #00000070;
    flex-shrink: 0;
    filter: brightness(0.95);
}

/* ДУБЛИРОВАНИЕ для бесконечности */
.carousel-track::after {
    content: "";
    display: flex;
}

/* ANIMATION */

@keyframes portfolioScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}



::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}

::-webkit-scrollbar-thumb {
  background: rgba(157, 78, 221, 0.15);
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(157, 78, 221, 0.4);
}




.faq-choice {
    padding: 90px 0;
}

.faq-choice .section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 45px;
}

.faq-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.faq-button {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 24px 28px;
    border-radius: var(--radius);

    background: linear-gradient(180deg, #1d1640, var(--bg-soft));
    border: 1px solid #ffffff10;
    box-shadow: 0 20px 50px #00000050;

    text-decoration: none;
    color: inherit;

    transition: transform 0.35s ease, border-color 0.25s ease;
}

.faq-button:hover {
    transform: translateY(-6px);
    border-color: #7b5cff50;
}

.faq-button-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.2rem;
    font-weight: 600;
}

.faq-button-left img {
    width: 32px;
    height: 32px;
}

.faq-button-arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.faq-button:hover .faq-button-arrow svg {
    transform: translateX(6px);
}




.services {
    padding: 90px 0;
}

.services h2 {
    text-align: center;
    font-size: 2.1rem;
    margin-bottom: 45px;
}

.services-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

/* ===== CARD BASE ===== */
.services-cards > div {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: linear-gradient(
        180deg,
        rgba(123, 92, 255, 0.08),
        rgba(10, 8, 30, 0.85)
    );
    border-radius: 22px;
    border: 1px solid rgba(123, 92, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    transition: transform .35s ease, box-shadow .35s ease;
    overflow: hidden;
}

/* Glow */
.services-cards > div::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at top left,
        rgba(123, 92, 255, 0.18),
        transparent 45%
    );
    opacity: 0;
    transition: opacity .35s ease;
}

.services-cards > div:hover::before {
    opacity: 1;
}

.services-cards > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 70px rgba(123, 92, 255, 0.25);
}

/* ===== HEADER ===== */
.services-cards h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

.header-tg-bots,
.header-web-apps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.header-tg-bots img,
.header-web-apps img {
    width: 38px;
    height: 38px;
}

/* ===== TEXT ===== */
.services-features {
    color: #cfcfe6;
    line-height: 1.55;
    margin-bottom: 18px;
}

.special-text {
    align-self: center;
    text-align: center;

    padding: 10px 16px;
    margin: 8px 0 22px;

    font-size: 0.95rem;
    font-weight: 700;

    color: #4cff88;
    border: 1px solid #4cff88;
    border-radius: 14px;

    background: rgba(76, 255, 136, 0.08);
    box-shadow: 0 0 0 3px rgba(76, 255, 136, 0.12);

    max-width: 95%;
}

/* ===== PRICE ===== */
.services-price {
    margin-top: auto;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 16px;
    align-self: center;
}

/* ===== BUTTON ===== */
.services-cards button {
    z-index: 1001;
    align-self: center;
    padding: 13px 24px;

    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2px;

    border-radius: 14px;

    color: #fff;
    background: linear-gradient(
        135deg,
        rgba(123, 92, 255, 0.9),
        rgba(154, 124, 255, 0.9)
    );

    border: 1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 8px 20px rgba(123, 92, 255, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}

.services-cards button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 34px rgba(123, 92, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: brightness(1.05);
}

.services-cards button:active {
    transform: translateY(0);
    box-shadow:
        0 6px 14px rgba(123, 92, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}



/* Scroll animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s ease;
}

.show-on-scroll {
  opacity: 1;
  transform: translateY(0);
}




.hamburger,
.mobile-menu,
.overlay {
  display: none;
}



.faq {
    padding: 80px 20px;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.faq-question:hover {
    opacity: 0.85;
}

.faq-icon {
    font-size: 26px;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
}

.faq-answer p {
    margin-bottom: 12px;
    line-height: 1.6;
    opacity: 0.9;
}

.faq-link {
    display: inline-block;
    margin-top: 8px;
    color: #a78bfa;
    text-decoration: none;
}

.faq-link:hover {
    text-decoration: underline;
}



@media (max-width: 1024px) {
    .menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 820px) {
    .hamburger {
        position: relative;
        z-index: 1200;
        width: 44px;
        height: 44px;
        background: rgba(40, 20, 70, 0.9);
        border: 1px solid rgba(157, 78, 221, 0.35);
        border-radius: 10px;
        backdrop-filter: blur(10px);
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .hamburger span {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 24px;
        height: 3px;
        background: var(--text);
        border-radius: 2px;
        transform-origin: center;
        transition: transform .35s ease, opacity .25s ease;
    }

    .hamburger span:nth-child(1) {
        transform: translate(-50%, -50%) translateY(-8px);
    }

    .hamburger span:nth-child(2) {
        transform: translate(-50%, -50%);
    }

    .hamburger span:nth-child(3) {
        transform: translate(-50%, -50%) translateY(8px);
    }

    body.menu-open .hamburger span:nth-child(1) {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    body.menu-open .hamburger span:nth-child(2) {
        opacity: 0;
    }

    body.menu-open .hamburger span:nth-child(3) {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 340px;
        height: 100vh;
        background: rgba(20, 18, 45, 0.92);
        backdrop-filter: blur(14px);
        padding: 5rem 2rem 2rem;
        transform: translateX(100%);
        transition: transform .4s ease;
        z-index: 1100;
        display: flex;
        flex-direction: column;
    }

    body.menu-open .mobile-menu {
        transform: translateX(0);
    }

    .mobile-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .mobile-menu li + li {
        margin-top: 1.2rem;
    }

    .mobile-menu a {
        display: block;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 1.05rem;
        font-weight: 600;
        text-decoration: none;
        color: #fff;
        background: rgba(123, 92, 255, 0.12);
        border: 1px solid rgba(123, 92, 255, 0.25);
        transition: .25s ease;
    }

    .mobile-menu a:hover {
        background: rgba(123, 92, 255, 0.25);
        transform: translateX(4px);
    }

    .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease;
        z-index: 50
    }

    body.menu-open .overlay {
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open {
        overflow: hidden;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 20px 90px;
        position: relative;
    }

    .hero-right {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        position: relative;
        z-index: 1;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        color: var(--text-soft);
        margin-bottom: 35px;
    }

    .hero-right img {
        width: 100%;
        max-width: 340px;
        height: auto;
    }

    .hero-right::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;

        width: 100%;
        max-width: 340px;
        height: 100%;

        border-radius: 20px;

        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.75) 100%
        );

        pointer-events: none;
        z-index: 2;
    }

    .hero-left {
        order: 2;
        margin-top: -60px;
        z-index: 2;
        max-width: 560px;
    }

    .hero-title {
        font-size: 0.9rem;
        line-height: 1.15;
    }

    .hero button,
    .hero .btn {
        margin-top: 20px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center ;
    }

    .services-cards {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 88%;
        gap: 20px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 10px 15px;
    }

    .services-cards > div {
        scroll-snap-align: center;
    }

    .services-cards::-webkit-scrollbar {
        display: none;
    }

    .works-left::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;

        width: 100%;
        max-width: 340px;
        height: 100%;

        border-radius: 20px;

        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.75) 100%
        );

        pointer-events: none;
        z-index: 2;
    }

    .works {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 60px 0 90px;
        gap: 0;
        position: relative;
    }

    /* IMAGE BLOCK (как hero-right) */
    .works-left {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        position: relative;
        z-index: 1;
    }

    .works-image {
        width: 100%;
        max-width: 340px;
        height: auto;
        border-radius: 20px;

        box-shadow: inset 0 -60px 60px -20px rgba(0, 0, 0, 0.7);
    }

    /* TEXT BLOCK (как hero-left) */
    .works-right {
        order: 2;
        margin-top: -60px;
        z-index: 2;
        max-width: 560px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .words-r-top {
        align-items: center;
    }

    .works-title {
        font-size: 2.4rem;
        line-height: 1.15;
        margin-bottom: 12px;
    }

    .works-subtitle {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }

    .tg-button {
        align-self: center;
        margin-top: 20px;
    }

    /* CAROUSEL — ПОД КНОПКОЙ */
    .words-r-down {
        width: 100%;
        margin-top: 12px;
    }

    .carousel-track img {
        width: 150px;
        height: 105px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .services-cards {
        grid-auto-columns: 92%;
    }
}
