:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.2);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-inter);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Animations */
@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(15px, -25px) scale(1.05);
    }

    66% {
        transform: translate(-10px, 10px) scale(0.95);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.container-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
    background: rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 30px var(--accent-glow);
}

.logo span span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-color);
    color: #0f172a;
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 15px 25px -5px var(--accent-glow);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-right: 1px solid var(--glass-border);
    padding-right: 20px;
}

.lang-switch button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 4px;
    transition: var(--transition);
}

.lang-switch button:hover {
    color: var(--accent-color);
}

.lang-switch button.active {
    color: var(--accent-color);
}

.nav-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.nav-auth:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.nav-auth i {
    width: 20px;
    height: 20px;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    position: relative;
    text-align: center;
}

.hero h1 .typed-text {
    color: var(--accent-color);
}

.typed-cursor {
    color: var(--accent-color);
    font-weight: 300;
}

/* Global Particles Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    /* Let clicks pass through to content */
}

/* Base Body Update for Particles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-inter);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    /* ensure particle z-index works */
}

/* Central Cursor Node */
.cursor-node {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    /* Just above particles */
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px 10px rgba(56, 189, 248, 0.4),
        0 0 40px 20px rgba(14, 165, 233, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: left, top;
}

.cursor-node.active {
    opacity: 1;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero h1 {
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -2px;
    min-height: 3.3em;
    /* Prevents layout shifting during typing */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 span[data-i18n="hero_h1_static"] {
    display: block;
    /* Forces typed text to a new line for consistency */
}

/* Wrapper to keep typed text and cursor on the exact same line */
.hero h1 .typed-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.hero h1 span.typed-text,
.hero h1 span.typed-cursor {
    background: linear-gradient(135deg, var(--accent-color), #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 80px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    border-top: 1px solid var(--glass-border);
    padding-top: 40px;
}

.stat-val {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Platforms Section */
.platforms {
    padding: 60px 0;
    background: rgba(15, 23, 42, 0.5);
}

.section-tag {
    text-align: center;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    margin-bottom: 40px;
}

.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 64px;
}

.logo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.logo-item:hover {
    color: #fff;
    transform: scale(1.05);
}

.logo-item i {
    color: var(--accent-color);
}

.logo-item.soon {
    opacity: 0.4;
    cursor: default;
}

.logo-item.soon span {
    font-size: 10px;
    background: var(--bg-accent);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Glass Card */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
}

/* Features */
.features {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-header h2 span {
    color: var(--accent-color);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 40px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px -20px var(--accent-glow);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Automation Content */
.automation {
    padding: 100px 0;
}

.automation-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 60px;
    align-items: center;
}

.automation-text h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 32px;
}

.automation-text h2 span {
    color: var(--accent-color);
}

.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.steps-list li {
    display: flex;
    gap: 20px;
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 800;
    flex-shrink: 0;
}

.step-info h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.automation-preview {
    position: relative;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-card {
    padding: 24px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    height: 520px !important;
    min-height: 520px !important;
    max-height: 520px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.chat-mockup {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: hidden;
    position: relative;
}

.msg {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    max-width: 85%;
}

.msg.user {
    background: var(--bg-secondary);
    align-self: flex-start;
    border: 1px solid var(--glass-border);
}

.msg.bot {
    background: var(--accent-color);
    color: #0f172a;
    font-weight: 500;
    align-self: flex-end;
}

.msg.typing {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: typing-dot 1.4s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.msg.file {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent-color);
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.msg.file:hover {
    background: rgba(56, 189, 248, 0.2);
}

.file-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}

.msg.hide {
    display: none;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.price-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.price-card.featured {
    border-color: var(--accent-color);
    transform: scale(1.03);
    z-index: 10;
    box-shadow: 0 0 40px var(--accent-glow);
}

.popular-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: #0f172a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.price-header h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.price-header .amount {
    height: 64px;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

/* Adjust font size for long words like 'Индивидуально' to match the visual weight and fit */
.price-header .amount.long-text {
    font-size: 34px;
    letter-spacing: -1.5px;
    line-height: 1.1;
    align-items: center;
    /* Center long text vertically in the 64px box if it's single line */
}

@media (max-width: 768px) {
    .price-header .amount {
        font-size: 32px;
    }

    .price-header .amount.long-text {
        font-size: 26px;
    }
}

.amount span {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.amount span.unit {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.price-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
    flex-grow: 1;
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.price-features i {
    color: var(--accent-color);
    font-size: 16px;
}

/* Footer Section */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 20px;
    max-width: 320px;
    font-size: 15px;
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 13px;
}

/* Responsiveness */
@media (max-width: 992px) {
    .automation-wrap {
        grid-template-columns: 1fr;
        padding: 40px;
    }

    .hero-stats {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 32px;
        min-height: 2.6em;
    }

    .hero-btns {
        gap: 10px;
    }

    .hero-btns .btn {
        font-size: 13px;
        padding: 10px 16px;
        white-space: nowrap;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .price-card.featured {
        transform: scale(1);
    }

    .preview-card,
    .automation-preview {
        height: 420px !important;
        min-height: 420px !important;
        max-height: 420px !important;
    }

    .chat-mockup {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .container-nav {
        padding: 0 16px;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
    }

    .logo-icon i {
        width: 14px;
        height: 14px;
    }

    .logo span {
        font-size: 18px;
    }

    .logo>span>span {
        display: inline;
    }

    .nav-actions {
        gap: 12px;
    }

    .lang-switch {
        padding-right: 12px;
        font-size: 12px;
        gap: 4px;
    }

    .nav-auth {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .nav-auth i {
        width: 18px;
        height: 18px;
    }
}

/* Antigravity-Style Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    will-change: opacity, transform;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1) !important;
}

.fade-up {
    transform: translateY(40px);
}

.slide-up {
    transform: translateY(60px);
}

.slide-down {
    transform: translateY(-40px);
}

.fade-in {
    transform: scale(0.98);
}

.scale-in {
    transform: scale(0.92);
}

.fade-right {
    transform: translateX(-40px);
}

.fade-left {
    transform: translateX(40px);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 1.2s;
    /* Delayed appearance matching typing effect */
}

.delay-6 {
    transition-delay: 1.6s;
    /* Delayed appearance matching typing effect */
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.bounce-in {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bounce-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1) !important;
}