/* ==================== ДОПОЛНЕНИЯ: НОВЫЕ СЕКЦИИ И ЭФФЕКТЫ ==================== */

/* ---------- Полоса прогресса прокрутки ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2b45c9, #8a2be2 55%, #d473ff);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.6);
    transform: scaleX(var(--scroll-progress, 0));
    transform-origin: left center;
    pointer-events: none;
}

/* ---------- Мягкое свечение за курсором ---------- */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 520px;
    height: 520px;
    margin: -260px 0 0 -260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, rgba(43, 69, 201, 0.05) 35%, transparent 68%);
    opacity: 0;
    transform: translate3d(var(--glow-x, -999px), var(--glow-y, -999px), 0);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.cursor-glow.is-active {
    opacity: 1;
}

@media (hover: none), (pointer: coarse) {
    .cursor-glow {
        display: none;
    }
}

/* ---------- Подсветка карточек под курсором ---------- */
.service-card::after,
.review-card::after,
.process-step::after,
.faq-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(360px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(212, 115, 255, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

.service-card:hover::after,
.review-card:hover::after,
.process-step:hover::after,
.faq-item:hover::after {
    opacity: 1;
}

.section-head {
    text-align: center;
}

/* ---------- «О нас»: текст слева, 3D-барабан услуг справа ---------- */
.about .about-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    max-width: 1200px;
}

.about .about-text {
    text-align: left;
}

/* Заголовок «О нас» стоит прямо над текстом, а не высоко над секцией */
.about .about-text .section-title {
    display: block;
    margin-bottom: 36px;
    text-align: left;
}

.about .about-text .section-title::after {
    margin: 18px 0 0;
}

.services-drum {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-height: 620px;
}

@media (max-width: 992px) {
    .about .about-content {
        grid-template-columns: 1fr;
    }

    .services-drum {
        max-width: 520px;
        margin: 0 auto;
    }
}

/* ---------- Лента технологий ---------- */
.stack {
    position: relative;
    padding: 46px 0 52px;
    overflow: hidden;
    background: #08070f;
    border-top: 1px solid rgba(138, 43, 226, 0.18);
    border-bottom: 1px solid rgba(138, 43, 226, 0.18);
}

.stack-label {
    margin: 0 0 24px;
    color: #9d8fc0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
}

.stack-rows {
    display: grid;
    gap: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.stack-row {
    display: flex;
    width: max-content;
}

.stack-track {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 0 7px;
    list-style: none;
    animation: stackScroll 38s linear infinite;
}

.stack-row--right .stack-track {
    animation-direction: reverse;
    animation-duration: 44s;
}

.stack:hover .stack-track {
    animation-play-state: paused;
}

.stack-track li {
    padding: 10px 22px;
    border: 1px solid rgba(124, 77, 255, 0.22);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(43, 69, 201, 0.12), rgba(79, 47, 179, 0.14));
    color: #cbbfe6;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.stack-track li:hover {
    border-color: rgba(212, 115, 255, 0.6);
    background: rgba(138, 43, 226, 0.25);
    color: #fff;
}

@keyframes stackScroll {
    to {
        transform: translateX(-100%);
    }
}

/* ---------- Мини-опрос ---------- */
.poll {
    padding: 70px 0 64px;
}

.poll-head {
    text-align: center;
}

.poll .stack-label {
    margin-bottom: 12px;
}

.poll-title {
    margin: 0 0 10px;
    color: #f3e9ff;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.2;
}

.poll-hint {
    margin: 0 0 30px;
    color: #9d93bb;
    font-size: 15px;
}

.poll-row-label {
    margin: 0 0 10px;
    color: #7d6fa3;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
}

.poll-row {
    margin-bottom: 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* Лента останавливается, когда над ней курсор — по чипу легко попасть */
.poll .stack:hover .stack-track,
.poll-row:hover .stack-track {
    animation-play-state: paused;
}

.poll .stack-track {
    padding: 4px 7px;
}

.poll .stack-track li {
    padding: 0;
    border: 0;
    background: none;
}

.poll-chip {
    padding: 11px 24px;
    border: 1px solid rgba(124, 77, 255, 0.24);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(43, 69, 201, 0.12), rgba(79, 47, 179, 0.14));
    color: #cbbfe6;
    font: 500 15px 'Poppins', sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.poll-chip:hover {
    border-color: rgba(212, 115, 255, 0.6);
    color: #fff;
    transform: translateY(-2px);
}

.poll-chip:focus-visible {
    outline: 2px solid #d473ff;
    outline-offset: 2px;
}

.poll-chip.is-selected {
    border-color: transparent;
    background: linear-gradient(135deg, #2b45c9, #8a2be2);
    color: #fff;
    box-shadow: 0 8px 22px rgba(138, 43, 226, 0.45);
}

.poll-chip.is-selected::before {
    content: '✓ ';
}

.poll-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.poll-picked {
    min-height: 1.5em;
    margin: 0;
    color: #c9b8f0;
    font-size: 15px;
}

.poll-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.poll.is-done .poll-rows,
.poll.is-done .poll-actions,
.poll.is-done .poll-hint {
    display: none;
}

/* Благодарность */
.poll-thanks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    padding: 10px 16px 6px;
    animation: pollThanksIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.poll-thanks[hidden] {
    display: none;
}

@keyframes pollThanksIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
}

.poll-mascot {
    width: 220px;
    flex: none;
}

.poll-mascot svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.mascot-figure {
    animation: mascotBounce 1.4s ease-in-out infinite;
    transform-origin: 72px 150px;
}

.mascot-shadow {
    fill: rgba(124, 77, 255, 0.25);
}

/* Рот открывается и закрывается — «жуёт» */
.mascot-body--closed {
    animation: mascotChomp 0.5s steps(1) infinite;
}

.mascot-eyes {
    animation: mascotBlink 3.6s infinite;
    transform-origin: 72px 44px;
}

.mascot-pellets circle {
    fill: #d9c8ff;
    animation: mascotPellets 1s linear infinite;
}

@keyframes mascotBounce {
    50% {
        transform: translateY(-8px);
    }
}

@keyframes mascotChomp {
    0% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes mascotBlink {
    0%, 92%, 100% { transform: scaleY(1); }
    96% { transform: scaleY(0.1); }
}

@keyframes mascotPellets {
    from { transform: translateX(0); }
    to { transform: translateX(-30px); }
}

.poll-thanks-text h3 {
    margin: 0 0 8px;
    color: #f3e9ff;
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 800;
}

.poll-thanks-choice {
    margin: 0 0 14px;
    color: #c9b8f0;
    font-size: 17px;
}

.poll-again {
    padding: 0;
    border: 0;
    background: none;
    color: #9d7bff;
    font: 600 14px 'Poppins', sans-serif;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.poll-again:hover {
    color: #d473ff;
}

@media (max-width: 600px) {
    .poll-thanks {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }

    .poll-mascot {
        width: 170px;
    }

    .poll-chip {
        padding: 9px 18px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mascot-figure,
    .mascot-body--closed,
    .mascot-eyes,
    .mascot-pellets circle {
        animation: none;
    }
}

/* ---------- Персонаж за компьютером в «Наших работах» ---------- */
.portfolio .container {
    position: relative;
}

.portfolio-mascot {
    width: 190px;
    margin: 28px 0 0 auto;
    pointer-events: none;
}

.portfolio-mascot svg {
    display: block;
    width: 100%;
    overflow: visible;
}

/* На широком экране — в пустом правом нижнем углу рядом с четвёртой работой */
@media (min-width: 1100px) {
    .portfolio-mascot {
        position: absolute;
        right: 40px;
        bottom: 0;
        width: 230px;
        margin: 0;
    }
}

.worker-figure {
    animation: workerBob 0.9s ease-in-out infinite;
}

.worker-hand {
    animation: workerType 0.32s ease-in-out infinite;
}

.worker-hand--right {
    animation-delay: 0.16s;
}

.worker-eyes {
    animation: mascotBlink 4.2s infinite;
    transform-origin: 121px 70px;
}

.worker-glow {
    animation: workerGlow 2.4s ease-in-out infinite;
}

.worker-code text {
    opacity: 0;
    animation: workerCode 3.2s ease-out infinite;
}

.worker-code text:nth-child(2) { animation-delay: 0.8s; }
.worker-code text:nth-child(3) { animation-delay: 1.6s; }
.worker-code text:nth-child(4) { animation-delay: 2.4s; }

.worker-steam path {
    animation: workerSteam 2.6s ease-in-out infinite;
}

.worker-steam path:nth-child(2) {
    animation-delay: 0.7s;
}

.worker-antenna-ball {
    animation: workerAntenna 1.8s ease-in-out infinite;
    transform-origin: 127px 27px;
}

@keyframes workerBob {
    50% { transform: translateY(2px); }
}

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

@keyframes workerGlow {
    50% { opacity: 0.55; }
}

@keyframes workerCode {
    0% { opacity: 0; transform: translateY(14px); }
    20% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-18px); }
}

@keyframes workerSteam {
    0%, 100% { opacity: 0; transform: translateY(4px); }
    50% { opacity: 0.9; transform: translateY(-3px); }
}

@keyframes workerAntenna {
    50% { transform: scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
    .worker-figure,
    .worker-hand,
    .worker-eyes,
    .worker-glow,
    .worker-steam path,
    .worker-antenna-ball {
        animation: none;
    }

    .worker-code text {
        animation: none;
        opacity: 0.8;
    }
}

/* ---------- Код, который печатается при прокрутке ---------- */
.mosaic {
    position: relative;
    height: 300vh;
    background:
        radial-gradient(ellipse at 72% 50%, rgba(79, 47, 179, 0.16), transparent 55%),
        #06050d;
}

.mosaic-stage {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
    height: 100svh;
    padding-top: 70px;
    overflow: hidden;
}

.mosaic-video {
    position: absolute;
    inset: 0;
    opacity: var(--mosaic-video, 0);
    pointer-events: none;
}

.mosaic-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Затемнение поверх видео, чтобы текст и редактор читались */
.mosaic-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 5, 13, 0.88) 0%, rgba(6, 5, 13, 0.55) 45%, rgba(6, 5, 13, 0.35) 100%),
        linear-gradient(180deg, rgba(6, 5, 13, 0.5), transparent 25%, transparent 75%, rgba(6, 5, 13, 0.6));
}

.mosaic-video.is-missing {
    display: none;
}

.mosaic-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(28px, 4vw, 64px);
    width: 100%;
}

.mosaic-copy > * {
    max-width: 460px;
}

.mosaic-eyebrow {
    margin: 0 0 12px;
    color: #b07cff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.mosaic-title {
    margin: 0 0 18px;
    color: #f3e9ff;
    font-size: clamp(30px, 3.6vw, 46px);
    font-weight: 800;
    line-height: 1.12;
}

.mosaic-text {
    margin: 0 0 28px;
    color: #b0a6c8;
    font-size: 17px;
    line-height: 1.7;
}

.mosaic-meter {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mosaic-meter-track {
    position: relative;
    flex: 1;
    max-width: 260px;
    height: 6px;
    border-radius: 999px;
    background: rgba(124, 77, 255, 0.15);
    overflow: hidden;
}

.mosaic-meter-bar {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2b45c9, #8a2be2, #d473ff);
    transform: scaleX(var(--mosaic-progress, 0));
    transform-origin: left center;
}

.mosaic-meter-value {
    min-width: 46px;
    color: #d9c8ff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
}

.mosaic-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    margin: 0;
    color: #7d6fa3;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 0.24em;
    transform: translateX(-50%);
    opacity: calc(1 - var(--mosaic-progress, 0) * 2);
    animation: mosaicHint 2.2s ease-in-out infinite;
}

.mosaic-hint::after {
    content: '';
    display: block;
    width: 2px;
    height: 26px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: linear-gradient(#8a2be2, transparent);
}

@keyframes mosaicHint {
    50% {
        translate: 0 6px;
    }
}

/* ---------- Погружение: видео по прокрутке ---------- */
.dive {
    position: relative;
    /* Длина прокрутки секции: чем больше, тем медленнее идёт видео */
    height: 850vh;
    background: #06050d;
}

.dive-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #06050d;
}

.dive-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: var(--dive-fade, 0);
}

/* Лёгкая виньетка, чтобы надписи читались на любом кадре */
.dive-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 45%, rgba(6, 5, 13, 0.55) 100%),
        linear-gradient(180deg, rgba(6, 5, 13, 0.45), transparent 20%, transparent 80%, rgba(6, 5, 13, 0.5));
    opacity: var(--dive-fade, 0);
    pointer-events: none;
}

.dive-captions {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.dive-caption {
    position: absolute;
    top: 50%;
    max-width: min(560px, 44vw);
    margin: 0;
    opacity: 0;
    color: #f3ecff;
    font-size: clamp(26px, 3.6vw, 52px);
    font-weight: 800;
    line-height: 1.12;
    filter: drop-shadow(0 4px 22px rgba(6, 5, 13, 0.95));
    will-change: transform, opacity;
}

.dive-caption--left {
    left: max(24px, 7vw);
    transform: translate(calc(var(--cap-shift, 0px) * -1), -50%);
}

.dive-caption--right {
    right: max(24px, 7vw);
    text-align: right;
    transform: translate(var(--cap-shift, 0px), -50%);
}

.dive-caption span {
    background: linear-gradient(90deg, #ffffff, #d9c2ff 60%, #a8b8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .dive-caption {
        max-width: calc(100vw - 48px);
        font-size: 28px;
    }

    .dive-caption--left {
        top: 30%;
    }

    .dive-caption--right {
        top: 70%;
    }
}

/* ---------- Окно редактора ---------- */
.code-editor {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(124, 77, 255, 0.28);
    border-radius: 16px;
    background: #0b0918;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 0 60px rgba(79, 47, 179, 0.18);
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
}

.ce-titlebar {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 0 14px;
    background: #110e22;
    border-bottom: 1px solid rgba(124, 77, 255, 0.16);
}

.ce-dots {
    display: flex;
    gap: 7px;
    align-self: center;
}

.ce-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #2a2550;
}

.ce-dots i:nth-child(1) { background: #ff5f57; opacity: 0.75; }
.ce-dots i:nth-child(2) { background: #febc2e; opacity: 0.75; }
.ce-dots i:nth-child(3) { background: #28c840; opacity: 0.75; }

.ce-tabs {
    display: flex;
    gap: 2px;
    padding-top: 8px;
}

.ce-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px 8px 0 0;
    color: #6f6890;
    font-size: 12px;
    white-space: nowrap;
}

.ce-tab.is-active {
    background: #0b0918;
    color: #ddd3f5;
    box-shadow: inset 0 2px 0 #7c4dff;
}

.ce-file-icon {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #3d2391;
    color: #e9e0ff;
    font-size: 8px;
    font-weight: 800;
}

.ce-file-icon--css {
    background: #24308f;
}

.ce-body {
    display: flex;
    padding: 16px 0;
    --ce-lh: 1.7;
    font-size: clamp(11px, 0.95vw, 14px);
    line-height: var(--ce-lh);
}

.ce-gutter {
    flex: none;
    margin: 0;
    padding: 0 14px 0 16px;
    color: #3b3560;
    list-style: none;
    text-align: right;
    user-select: none;
}

.ce-gutter li {
    min-width: 2ch;
    transition: color 0.2s ease;
}

.ce-gutter li.is-current {
    color: #b9a6ff;
}

.ce-code {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0 16px 0 4px;
    overflow: hidden;
    font: inherit;
    white-space: pre;
}

.ce-code code {
    font: inherit;
}

.ce-line {
    display: block;
    min-height: calc(var(--ce-lh) * 1em);
    margin: 0 -16px 0 -4px;
    padding: 0 16px 0 4px;
}

.ce-line.is-current {
    background: rgba(124, 77, 255, 0.08);
}

.ce-caret {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    margin-left: 1px;
    vertical-align: -0.2em;
    background: #c9a8ff;
    box-shadow: 0 0 8px rgba(201, 168, 255, 0.8);
    animation: caretBlink 1s steps(1) infinite;
}

@keyframes caretBlink {
    50% {
        opacity: 0;
    }
}

/* Подсветка синтаксиса в тёмно-фиолетовой гамме */
.tk-comment { color: #5d5683; font-style: italic; }
.tk-keyword { color: #b07cff; }
.tk-string { color: #8ea2ff; }
.tk-number { color: #f0a8ff; }
.tk-function { color: #e0b3ff; }
.tk-class { color: #7aa0ff; }
.tk-property { color: #c7b8f0; }
.tk-key { color: #a99bd8; }
.tk-variable { color: #ddd5f5; }
.tk-punct { color: #7a72a3; }
.tk-plain { color: #ddd5f5; }

.ce-terminal {
    padding: 10px 16px 12px;
    border-top: 1px solid rgba(124, 77, 255, 0.16);
    background: #08061a;
    font-size: 12px;
}

.ce-term-label {
    display: inline-block;
    margin-bottom: 6px;
    padding-bottom: 2px;
    border-bottom: 1px solid #7c4dff;
    color: #8d84b8;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.ce-term-line {
    margin: 0;
    color: #8d84b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ce-prompt {
    color: #7c4dff;
}

.ce-terminal.is-done .ce-term-text {
    color: #c9b2ff;
}

.ce-status {
    display: flex;
    gap: 18px;
    padding: 5px 14px;
    background: linear-gradient(90deg, #24308f, #3d2391);
    color: #d8d0ff;
    font-size: 11px;
}

.ce-branch::before {
    content: '⎇ ';
}

.ce-status span:nth-child(2) {
    margin-left: auto;
}

/* ---------- Как мы работаем ---------- */
.process {
    position: relative;
    padding: 110px 0;
    background: linear-gradient(180deg, #0a0a12 0%, #0d0b1c 100%);
    overflow: hidden;
}

.process-track {
    position: relative;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.process-line {
    position: absolute;
    top: 34px;
    left: 8%;
    right: 8%;
    height: 4px;
    border-radius: 999px;
    background: rgba(124, 77, 255, 0.14);
}

.process-line span {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2b45c9, #8a2be2, #d473ff);
    box-shadow: 0 0 14px rgba(138, 43, 226, 0.55);
    transform: scaleX(var(--process-progress, 0));
    transform-origin: left center;
}

.process-step {
    position: relative;
    padding: 0 18px 26px;
    border: 1px solid rgba(124, 77, 255, 0.16);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(22, 33, 62, 0.55), rgba(15, 15, 26, 0.9));
    text-align: center;
    transition: border-color 0.35s ease, transform 0.35s ease;
}

.process-step:hover {
    border-color: rgba(212, 115, 255, 0.45);
    transform: translateY(-6px);
}

.process-num {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 4px auto 18px;
    border: 3px solid #1b1638;
    border-radius: 20px;
    background: #110d24;
    color: #8d7bc4;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.process-step.is-reached .process-num {
    border-color: transparent;
    background: linear-gradient(135deg, #2b45c9, #8a2be2);
    color: #fff;
    box-shadow: 0 10px 26px rgba(138, 43, 226, 0.45);
}

.process-step h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: #f0e8ff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.process-step p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #a99fc0;
    font-size: 14px;
    line-height: 1.6;
}

/* ---------- Частые вопросы ---------- */
.faq {
    position: relative;
    padding: 110px 0;
    background: linear-gradient(180deg, #0a0a12 0%, #100d20 100%);
}

.faq-list {
    display: grid;
    gap: 14px;
    max-width: 860px;
    margin: 0 auto;
}

.faq-item {
    position: relative;
    border: 1px solid rgba(124, 77, 255, 0.18);
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(22, 33, 62, 0.5), rgba(15, 15, 26, 0.92));
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item[open] {
    border-color: rgba(212, 115, 255, 0.45);
}

.faq-item summary {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px;
    color: #f0e8ff;
    font-size: 17px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

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

.faq-item summary:focus-visible {
    outline: 2px solid #d473ff;
    outline-offset: -2px;
    border-radius: 18px;
}

.faq-icon {
    position: relative;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(124, 77, 255, 0.16);
    transition: background 0.3s ease, transform 0.4s ease;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 3px;
    margin: -1.5px 0 0 -6px;
    border-radius: 2px;
    background: #d9c8ff;
    transition: transform 0.4s ease;
}

.faq-icon::after {
    transform: rotate(90deg);
}

.faq-item[open] .faq-icon {
    background: linear-gradient(135deg, #2b45c9, #8a2be2);
    transform: rotate(180deg);
}

.faq-item[open] .faq-icon::after {
    transform: rotate(0deg);
}

.faq-answer {
    position: relative;
    z-index: 1;
    padding: 0 26px 22px;
}

.faq-answer p {
    margin: 0;
    color: #b0a6c8;
    font-size: 15px;
    line-height: 1.7;
}

.faq-item[open] .faq-answer {
    animation: faqOpen 0.4s ease;
}

@keyframes faqOpen {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .process-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .process-line {
        display: none;
    }
}

@media (max-width: 992px) {
    .mosaic-stage {
        align-items: flex-start;
        padding-top: 96px;
    }

    .mosaic-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mosaic-copy > * {
        max-width: 560px;
    }

    .mosaic-title {
        margin-bottom: 10px;
        font-size: 26px;
    }

    .mosaic-text {
        margin-bottom: 14px;
        font-size: 14px;
    }

    .ce-body {
        padding: 8px 0;
        --ce-lh: 1.5;
        font-size: 10.5px;
    }

    .ce-term-label {
        display: none;
    }

    .ce-terminal {
        padding: 8px 14px;
    }

    .ce-tab:not(.is-active),
    .ce-status span:nth-child(3),
    .ce-status span:nth-child(4) {
        display: none;
    }

    .mosaic-hint {
        display: none;
    }
}

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

    .process-step {
        display: grid;
        grid-template-columns: 64px 1fr;
        column-gap: 16px;
        padding: 18px;
        text-align: left;
    }

    .process-num {
        grid-row: span 2;
        margin: 0;
    }

    .faq-item summary {
        padding: 18px;
        font-size: 15px;
    }

    .faq-answer {
        padding: 0 18px 18px;
    }

    .stack-track li {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stack-track,
    .mosaic-hint {
        animation: none;
    }

    .cursor-glow {
        display: none;
    }
}

/* ---------- Форма заявки: статус отправки ---------- */
.form-status {
    min-height: 1.4em;
    margin: 16px 0 0;
    color: #b0a6c8;
    font-size: 15px;
    line-height: 1.6;
}

.form-status.is-success {
    color: #9fe3b8;
}

.form-status.is-error {
    color: #ff9b9b;
}

.form-status a {
    color: #d473ff;
    text-decoration: underline;
}

.nav-account-link {
    padding: 6px 16px !important;
    border: 1px solid rgba(212, 115, 255, 0.45);
    border-radius: 999px;
}

/* ---------- Портфолио: реальные проекты ---------- */
.portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #121022 0%, #0c0a18 100%);
    cursor: default;
}

.portfolio-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b0918;
    cursor: zoom-in;
}

.portfolio-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(12, 10, 24, 0.85));
    pointer-events: none;
}

.portfolio-image img {
    height: 100%;
    object-position: top center;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.06);
}

.portfolio-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 22px 26px 26px;
}

.portfolio-kind {
    color: #9d7bff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.portfolio-info h4 {
    margin: 0;
    color: #f3ecff;
    font-size: 26px;
    font-weight: 800;
}

.portfolio-info p {
    margin: 0;
    color: #b0b0c0;
    font-size: 15px;
    line-height: 1.65;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.portfolio-tags li {
    padding: 5px 12px;
    border: 1px solid rgba(138, 43, 226, 0.35);
    border-radius: 999px;
    background: rgba(138, 43, 226, 0.08);
    color: #d9c8ff;
    font-size: 13px;
}

/* Видео вместо скриншотов: карточка не обрезает увеличенное видео */
.portfolio-item:has(.portfolio-video),
.portfolio-image:has(.portfolio-video) {
    overflow: visible;
}

.portfolio-item.has-zoom {
    z-index: 20;
}

.portfolio-video {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 19px 19px 0 0;
    background: #0b0918;
    transform-origin: center;
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), border-radius 0.45s ease, box-shadow 0.45s ease;
}

.portfolio-video.is-zoomed {
    z-index: 2;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 115, 255, 0.55);
    transform: translate(var(--zoom-x, 0px), var(--zoom-y, 0px)) scale(var(--zoom-scale, 2));
}

.portfolio-item.has-zoom .portfolio-image::after {
    opacity: 0;
}

/* Три карточки занимают весь ряд — персонаж стоит под сеткой, а не поверх неё */
@media (min-width: 1100px) {
    .portfolio-mascot {
        position: static;
        margin: 28px 0 0 auto;
    }
}

/* ---------- Просмотр скриншота на весь экран ---------- */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 5, 13, 0.92);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: zoom-out;
}

.image-modal.is-open {
    opacity: 1;
}

.image-modal img {
    max-width: min(1400px, 100%);
    max-height: 100%;
    border: 1px solid rgba(138, 43, 226, 0.35);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    cursor: default;
}

.image-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(18, 16, 34, 0.9);
    color: #f3ecff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.image-modal-close:hover {
    border-color: #8a2be2;
}

/* ---------- Главный экран: штамп APPROVED на панели ---------- */
/* Покачивается вся сцена целиком, чтобы штамп и отпечаток не съезжали с картинки */
.hero-visual {
    position: relative;
    z-index: 1;
    animation: float 10s infinite ease-in-out;
}

.hero-shake {
    position: relative;
    animation: heroShake 6s infinite;
}

.hero-image .hero-visual img {
    display: block;
    width: 100%;
    animation: none;
}

.hero-stamp {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.hs-stamp,
.hs-stamp-body,
.hs-shadow,
.hs-mark,
.hs-ring {
    transform-box: fill-box;
    transform-origin: center;
}

/* Цикл 6 с: опускается (0–20%), удар (20%), уходит (23–40%),
   отпечаток держится и постепенно гаснет (55–88%), пауза и заново */
.hs-stamp {
    animation: hsStamp 6s infinite;
}

.hs-stamp-body {
    transform-origin: center bottom;
    animation: hsSquash 6s infinite;
}

.hs-shadow {
    animation: hsShadow 6s infinite;
}

.hs-mark {
    animation: hsMark 6s infinite;
}

.hs-check {
    stroke-dasharray: 40;
    animation: hsCheck 6s infinite;
}

.hs-ring {
    animation: hsRing 6s infinite;
}

@keyframes hsStamp {
    0% { transform: translate(140px, -320px) rotate(14deg); opacity: 0; }
    6% { opacity: 1; }
    14% { transform: translate(0, -70px) rotate(0deg); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
    20% { transform: translate(0, 0) rotate(0deg); }
    24% { transform: translate(0, 0) rotate(0deg); animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1); }
    32% { transform: translate(0, -110px) rotate(-3deg); opacity: 1; }
    40%, 100% { transform: translate(-160px, -340px) rotate(-16deg); opacity: 0; }
}

@keyframes hsSquash {
    0%, 19.5% { transform: scale(1, 1); }
    21% { transform: scale(1.04, 0.9); }
    24% { transform: scale(0.99, 1.03); }
    27%, 100% { transform: scale(1, 1); }
}

@keyframes hsShadow {
    0% { opacity: 0; transform: scale(0.6); }
    14% { opacity: 0.2; transform: scale(0.85); }
    20%, 24% { opacity: 0.4; transform: scale(1); }
    34%, 100% { opacity: 0; transform: scale(0.6); }
}

@keyframes hsMark {
    0%, 19.9% { opacity: 0; transform: scale(1.12); }
    20% { opacity: 1; transform: scale(1.06); }
    24% { opacity: 1; transform: scale(1); }
    55% { opacity: 0.95; transform: scale(1); }
    88%, 100% { opacity: 0; transform: scale(1); }
}

@keyframes hsCheck {
    0%, 22% { stroke-dashoffset: 40; }
    30%, 100% { stroke-dashoffset: 0; }
}

@keyframes hsRing {
    0%, 19.9% { opacity: 0; transform: scale(1); }
    20% { opacity: 0.9; transform: scale(1); }
    32%, 100% { opacity: 0; transform: scale(1.35); }
}

/* Панель вздрагивает от удара */
@keyframes heroShake {
    0%, 19.9% { transform: translate(0, 0); }
    20.5% { transform: translate(0, 5px); }
    22% { transform: translate(-2px, -2px); }
    23.5% { transform: translate(1px, 1px); }
    25%, 100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual,
    .hero-shake,
    .hs-stamp,
    .hs-stamp-body,
    .hs-shadow,
    .hs-check,
    .hs-ring {
        animation: none;
    }

    .hs-stamp,
    .hs-ring {
        display: none;
    }

    .hs-mark {
        animation: none;
        opacity: 1;
    }
}
