/* Sage 2026-06-14: moved from inline <style> so CSP can drop inline allowances. */
.glass-panel {
            background: rgba(30, 41, 59, 0.4);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        }
        
        html, body {
            max-width: 100%;
            overflow-x: hidden;
        }

        body {
            background-color: #020617;
            background-image: 
                radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
            background-attachment: fixed;
            color: #f8fafc;
        }

        .gradient-text {
            background: linear-gradient(to right, #60a5fa, #a78bfa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.4; }
            100% { opacity: 1; }
        }
        .counter-dot {
            width: 6px;
            height: 6px;
            background: #10b981;
            border-radius: 50%;
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
            animation: pulse 2s infinite;
        }

        /* Hamburger menu */
        .hamburger-line {
            display: block;
            width: 24px;
            height: 2px;
            background: #94a3b8;
            border-radius: 2px;
            transition: all 0.3s;
        }
        .hamburger.open .hamburger-line:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }
        .hamburger.open .hamburger-line:nth-child(2) {
            opacity: 0;
        }
        .hamburger.open .hamburger-line:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }
        .mobile-menu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
        }
        .mobile-menu.open {
            max-height: 300px;
        }


/* Sage 2026-06-14: Yandex.Metrika noscript fallback without inline style attributes. */
.metrika-noscript {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.metrika-noscript img {
    width: 1px;
    height: 1px;
}

/* Sage visual preview for new.distantec.ru: restrained B2B motion, no heavy canvas/video. */
.visual-preview .hero-tech {
    position: relative;
    isolation: isolate;
    min-height: 720px;
}

.visual-preview .hero-tech::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 28%, rgba(59, 130, 246, .22), transparent 28%),
        radial-gradient(circle at 82% 24%, rgba(14, 165, 233, .14), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(99, 102, 241, .12), transparent 34%),
        linear-gradient(rgba(59, 130, 246, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, .08) 1px, transparent 1px);
    background-size: auto, auto, auto, 56px 56px, 56px 56px;
    transform: perspective(900px) rotateX(58deg) translateY(-8%);
    transform-origin: center top;
    animation: tech-grid-drift 18s linear infinite;
    opacity: .72;
}

.visual-preview .hero-tech::after {
    content: "";
    position: absolute;
    inset: 12% 10% auto auto;
    width: min(42vw, 520px);
    height: min(42vw, 520px);
    z-index: 0;
    pointer-events: none;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(59, 130, 246, .22), transparent 58%),
        conic-gradient(from 90deg, transparent, rgba(59, 130, 246, .18), transparent, rgba(20, 184, 166, .12), transparent);
    filter: blur(.2px);
    mask-image: radial-gradient(circle, #000 0 52%, transparent 73%);
    animation: tech-orbit 24s linear infinite;
}

.visual-preview .hero-tech > .max-w-7xl {
    position: relative;
    z-index: 1;
}

.visual-preview .glass-panel {
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease, background-color .35s ease;
}

.visual-preview #services .glass-panel,
.visual-preview #cases .glass-panel,
.visual-preview .process-step,
.visual-preview #contact .glass-panel {
    position: relative;
    overflow: hidden;
}

.visual-preview #services .glass-panel::after,
.visual-preview .process-step::after,
.visual-preview #contact .glass-panel::after {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(59, 130, 246, .16), transparent 42%);
    transition: opacity .3s ease;
}

.visual-preview #services .glass-panel:hover,
.visual-preview #cases .glass-panel:hover,
.visual-preview .process-step:hover,
.visual-preview #contact form:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, .32);
    box-shadow: 0 24px 80px rgba(2, 6, 23, .28), 0 0 0 1px rgba(59, 130, 246, .10);
}

.visual-preview #services .glass-panel:hover::after,
.visual-preview .process-step:hover::after,
.visual-preview #contact .glass-panel:hover::after {
    opacity: 1;
}

.visual-preview #services .glass-panel svg,
.visual-preview #contact svg {
    transition: transform .35s ease, filter .35s ease;
}

.visual-preview #services .glass-panel:hover svg,
.visual-preview #contact a:hover svg {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 0 14px rgba(59, 130, 246, .35));
}

.visual-preview .metric-number {
    color: #fff;
    text-shadow: 0 0 24px rgba(59, 130, 246, .22);
}

.visual-preview .process-grid::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, .45), transparent);
    pointer-events: none;
}

.visual-preview .process-num {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 14px;
    color: #60a5fa;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .08em;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .24);
    box-shadow: 0 0 0 6px rgba(2, 6, 23, .88);
}

/* Preview reveal is deliberately fail-open: elements stay visible even if observers/screenshots do not scroll. */
.visual-preview.reveal-ready [data-reveal] {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .65s ease, transform .65s ease;
}

.visual-preview.reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes tech-grid-drift {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 0 0, 0 0, 0 0, 56px 56px, 56px 56px; }
}

@keyframes tech-orbit {
    from { transform: rotate(0deg) scale(1); opacity: .72; }
    50% { transform: rotate(180deg) scale(1.04); opacity: .86; }
    to { transform: rotate(360deg) scale(1); opacity: .72; }
}

@media (max-width: 767px) {
    .visual-preview .hero-tech { min-height: auto; }
    .visual-preview .hero-tech::before { opacity: .45; background-size: auto, auto, auto, 42px 42px, 42px 42px; }
    .visual-preview .hero-tech::after { width: 280px; height: 280px; inset: 16% -80px auto auto; opacity: .5; }
    .visual-preview .process-grid::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .visual-preview *,
    .visual-preview *::before,
    .visual-preview *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
    .visual-preview.reveal-ready [data-reveal] {
        opacity: 1;
        transform: none;
    }
}



/* Sage visual preview: custom grid because production Tailwind build does not include md:grid-cols-5. */
@media (min-width: 768px) {
    .visual-preview .process-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Sage visual preview: operational trust block. */
.visual-preview .trust-section::before {
    content: "";
    position: absolute;
    inset: 18% auto auto 50%;
    width: 720px;
    height: 360px;
    transform: translateX(-50%);
    pointer-events: none;
    background: radial-gradient(circle, rgba(59, 130, 246, .12), transparent 62%);
    filter: blur(8px);
}

.visual-preview .trust-shell {
    position: relative;
    overflow: hidden;
}

.visual-preview .trust-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .45;
    background:
        linear-gradient(120deg, transparent 0 42%, rgba(59, 130, 246, .08) 50%, transparent 58% 100%),
        radial-gradient(circle at 10% 20%, rgba(20, 184, 166, .10), transparent 28%),
        radial-gradient(circle at 90% 15%, rgba(99, 102, 241, .12), transparent 30%);
}

.visual-preview .trust-heading,
.visual-preview .trust-grid,
.visual-preview .trust-tech,
.visual-preview .trust-note {
    position: relative;
    z-index: 1;
}

.visual-preview .trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.visual-preview .trust-card {
    min-height: 236px;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .045);
    transition: transform .35s ease, border-color .35s ease, background-color .35s ease, box-shadow .35s ease;
}

.visual-preview .trust-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, .34);
    background: rgba(255, 255, 255, .065);
    box-shadow: 0 20px 70px rgba(2, 6, 23, .28);
}

.visual-preview .trust-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
}

.visual-preview .trust-icon svg {
    width: 28px;
    height: 28px;
}

.visual-preview .trust-icon-blue { color: #60a5fa; background: rgba(59, 130, 246, .14); }
.visual-preview .trust-icon-purple { color: #a78bfa; background: rgba(139, 92, 246, .14); }
.visual-preview .trust-icon-teal { color: #2dd4bf; background: rgba(20, 184, 166, .14); }
.visual-preview .trust-icon-amber { color: #fbbf24; background: rgba(245, 158, 11, .14); }

.visual-preview .trust-card h3 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.visual-preview .trust-card p {
    color: rgb(156 163 175);
    font-size: 14px;
    line-height: 1.65;
}

.visual-preview .trust-tech {
    margin-top: 28px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(2, 6, 23, .34);
    border: 1px solid rgba(255, 255, 255, .08);
}

.visual-preview .trust-tech > span {
    display: block;
    margin-bottom: 14px;
    color: rgb(209 213 219);
    font-size: 14px;
}

.visual-preview .trust-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.visual-preview .trust-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    color: rgb(191 219 254);
    font-size: 13px;
    border: 1px solid rgba(59, 130, 246, .20);
    background: rgba(59, 130, 246, .08);
}

.visual-preview .trust-note {
    margin-top: 18px;
    color: rgb(107 114 128);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 1023px) {
    .visual-preview .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .visual-preview .trust-grid {
        grid-template-columns: 1fr;
    }
    .visual-preview .trust-shell {
        padding: 28px 18px;
    }
    .visual-preview .trust-card {
        min-height: auto;
    }
}

