/* =========================================
   1. ЗМІННІ ТА БАЗА
========================================= */
:root {
    --bg-main: #080a0f;
    --bg-surface: rgba(21, 24, 30, 0.4);
    --bg-surface-solid: #15181e;

    --text-main: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;

    --accent: #dc2626;
    --accent-hover: #ef4444;
    --accent-glow: rgba(220, 38, 38, 0.4);
    --accent-gradient: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);

    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Segoe UI', sans-serif; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
            radial-gradient(circle at 10% 10%, rgba(220, 38, 38, 0.1), transparent 30%),
            radial-gradient(circle at 90% 90%, rgba(59, 130, 246, 0.05), transparent 30%);
    background-attachment: fixed;
}

h1, h2, h3 { font-weight: 800; margin-bottom: 15px; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; }
.text-accent { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: var(--text-muted); margin-bottom: 50px; font-size: 1.15rem; font-weight: 400; text-align: center; }
.mt-3 { margin-top: 1.5rem; }

/* =========================================
   2. GLASSMORPHISM
========================================= */
.neu-flat, .neu-pressed {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

/* =========================================
   3. КНОПКИ ТА НАВІГАЦІЯ
========================================= */
.btn {
    display: inline-flex; justify-content: center; align-items: center; gap: 10px;
    padding: 14px 28px; border-radius: 12px;
    text-decoration: none; font-weight: 600; font-size: 1rem;
    transition: all var(--transition); border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: 0 4px 20px var(--accent-glow); border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); border-color: rgba(255, 255, 255, 0.4); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); color: var(--text-main); border: 1px solid var(--border-strong); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.btn-large { padding: 18px 36px; font-size: 1.1rem; }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 3%; position: sticky; top: 15px; margin: 0 20px; z-index: 1000; border-radius: 100px; }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--accent); }
.nav-links a { color: var(--text-secondary); text-decoration: none; margin-left: 20px; font-weight: 500; transition: color var(--transition); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text-main); }
.nav-links .btn { margin-left: 20px; }

/* =========================================
   4. HERO СЕКЦІЯ
========================================= */
.hero { display: flex; align-items: center; justify-content: space-between; padding: 120px 5% 80px; min-height: 90vh; }
.hero-content { flex: 1; padding-right: 50px; }
.badge-new { display: inline-block; padding: 6px 16px; border-radius: 20px; background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.3); color: #ef4444; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.hero-content h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; }
.hero-content p { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 40px; font-weight: 400; }
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }

.hero-image { flex: 1; max-width: 500px; animation: float 6s ease-in-out infinite; position: relative; }
.hero-image::before { content: ''; position: absolute; inset: -30px; background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25), transparent 70%); z-index: -1; filter: blur(40px); }

.chat-mockup { display: flex; flex-direction: column; gap: 15px; padding: 25px; background: rgba(15, 17, 21, 0.8); border-radius: var(--radius-lg); border: 1px solid var(--border-strong); }
.message { padding: 16px 20px; border-radius: 20px; max-width: 85%; font-size: 0.95rem; line-height: 1.5; }
.message.user { align-self: flex-end; background: var(--bg-surface-solid); border: 1px solid var(--border); border-bottom-right-radius: 4px; }
.message.bot { align-self: flex-start; background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.2); border-bottom-left-radius: 4px; }
.chat-img { width: 100%; border-radius: 12px; margin-top: 10px; border: 1px solid var(--border); }

/* =========================================
   5. BENTO GRID (Екосистема)
========================================= */
.features { padding: 100px 5%; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.bento-card { padding: 35px; display: flex; flex-direction: column; justify-content: center; }
.bento-card.span-2 { grid-column: span 2; }
.bento-card:hover { transform: translateY(-5px); border-color: rgba(220, 38, 38, 0.3); background: rgba(30, 35, 45, 0.6); }
.bento-card i { font-size: 2.5rem; margin-bottom: 20px; }
.bento-card h3 { font-size: 1.4rem; margin-bottom: 15px; }
.bento-card p { color: var(--text-muted); font-size: 1rem; }

/* =========================================
   6. ІНФО-СЕКЦІЇ (Studio, Nodes, Bot)
========================================= */
.info-section { padding: 100px 5%; display: flex; align-items: center; justify-content: center; }
.alternate-bg { background: linear-gradient(90deg, rgba(220,38,38,0.03) 0%, transparent 100%); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.info-container { display: flex; gap: 60px; max-width: 1200px; align-items: center; }
.info-container.reverse { flex-direction: row-reverse; }
.info-text { flex: 1; }
.info-text p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 30px; }
.info-visual { flex: 1; padding: 20px; display: flex; justify-content: center; align-items: center; position: relative; }

/* --- НОВИЙ ДИЗАЙН ТАБЛИЧОК (Списків) --- */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Відстань між рядками */
    margin-top: 20px;
}

.feature-list li {
    display: grid;
    grid-template-columns: 32px 180px 1fr; /* 3 колонки: Іконка | Заголовок | Текст */
    gap: 20px;
    align-items: start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02); /* Легкий фон */
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
}

.feature-list li:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(220, 38, 38, 0.3);
    transform: translateX(5px); /* Анімація зсуву при наведенні */
}

.feature-list i {
    color: var(--accent);
    background: rgba(220, 38, 38, 0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-top: 2px;
}

.feature-list strong {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.4;
}

.feature-list span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Ідеальний адаптив цієї таблички для телефонів */
@media(max-width: 768px) {
    .feature-list li {
        grid-template-columns: 32px 1fr;
        grid-template-areas:
            "icon title"
            "icon desc";
        gap: 6px 15px;
    }
    .feature-list i { grid-area: icon; }
    .feature-list strong { grid-area: title; margin-bottom: 5px; }
    .feature-list span { grid-area: desc; }
}
/* Мокап для нодів */
.node-mockup { flex-direction: column; gap: 15px; background: #0f1115; background-image: radial-gradient(#333 1px, transparent 1px); background-size: 20px 20px; min-height: 300px; }
.node-box { background: var(--bg-surface-solid); border: 1px solid var(--border-strong); padding: 15px 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); font-family: monospace; font-size: 1rem; position: relative; z-index: 2; }
.active-node { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.node-line { width: 3px; height: 40px; background: var(--accent); opacity: 0.7; }
.bot-mockup { background: transparent; box-shadow: none; border: none; }

/* =========================================
   7. ГАЛЕРЕЯ ТА РЕДАГУВАННЯ
========================================= */
.showcase, .editing-demo { padding: 100px 0; text-align: center; }
.gallery-filters { display: flex; justify-content: center; gap: 12px; margin: 0 auto 50px; flex-wrap: wrap; }
.filter-btn { padding: 12px 24px; background: rgba(255,255,255,0.03); color: var(--text-muted); border: 1px solid var(--border); border-radius: 30px; cursor: pointer; font-weight: 600; transition: all var(--transition); backdrop-filter: blur(10px); }
.filter-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 15px var(--accent-glow); }

.carousel-container { position: relative; width: 100%; min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: hidden; padding-top: 20px; }
.carousel-track { position: relative; width: 100%; height: 400px; perspective: 1200px; }
.carousel-slide { position: absolute; top: 50%; left: 50%; width: 280px; height: 400px; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 15px 40px rgba(0,0,0,0.8); will-change: transform, opacity, filter; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, filter 0.5s ease; transform: translate(-50%, -50%) scale(0.6); opacity: 0; pointer-events: none; border: 1px solid rgba(255,255,255,0.1); }
.carousel-slide img, .carousel-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-slide.active { pointer-events: auto; box-shadow: 0 0 40px rgba(220, 38, 38, 0.3); border-color: rgba(220, 38, 38, 0.5); }

.carousel-nav { display: flex; gap: 20px; margin-top: 30px; z-index: 20; }
.nav-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--bg-surface-solid); border: 1px solid var(--border-strong); color: var(--text-main); font-size: 1.2rem; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all var(--transition); }
.nav-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.1); }

.compare-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; padding: 0 5%; }
.compare-card { padding: 30px; width: 100%; max-width: 550px; }
.compare-card h3 { margin-bottom: 25px; font-size: 1.3rem; }
.comparison-widget { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--border); }
.comparison-widget img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compare-img-after { position: absolute; top: 0; left: 0; }
.compare-img-before-wrapper { position: absolute; top: 0; left: 0; width: 50%; height: 100%; overflow: hidden; border-right: 3px solid var(--accent); box-shadow: 5px 0 15px rgba(0,0,0,0.3); }
.compare-img-before { width: 100vw; max-width: none; }
.compare-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 10; }
.compare-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--accent); z-index: 5; pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,0.6); font-size: 1rem; }

/* =========================================
   8. ПРАЙСИНГ ТА ФУТЕР
========================================= */
.premium { padding: 100px 5% 120px; text-align: center; }
.pricing-grid { display: flex; justify-content: center; align-items: stretch; gap: 30px; margin-top: 50px; flex-wrap: wrap; }
.price-card { padding: 40px 30px; width: 340px; position: relative; display: flex; flex-direction: column; text-align: left; }
.price-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.price-card h3 { font-size: 1.5rem; text-align: center; }
.price-card .price { font-size: 3rem; font-weight: 800; text-align: center; margin: 20px 0 30px; }
.price-card .price span { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.price-card ul { list-style: none; margin-bottom: 40px; flex: 1; }
.price-card ul li { margin-bottom: 15px; color: var(--text-secondary); display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.price-card ul li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--accent); font-size: 12px; background: rgba(220, 38, 38, 0.15); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.price-card .btn { width: 100%; justify-content: center; }

.accent-card { border: 2px solid var(--accent); box-shadow: 0 10px 40px var(--accent-glow); transform: scale(1.05); background: linear-gradient(180deg, rgba(220, 38, 38, 0.08) 0%, rgba(21, 24, 30, 0.8) 100%); }
.accent-card:hover { transform: scale(1.05) translateY(-5px); border-color: var(--accent-hover); }
.badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--accent-gradient); color: white; padding: 6px 20px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4); white-space: nowrap; }

footer { padding: 40px 5%; border-top: 1px solid var(--border); background: rgba(10, 12, 16, 0.8); }
.footer-content { display: flex; justify-content: space-between; align-items: center; background: transparent; box-shadow: none; border: none; padding: 0; }
.socials { display: flex; gap: 15px; }
.socials a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-surface-solid); border: 1px solid var(--border); color: var(--text-muted); font-size: 1.2rem; transition: all var(--transition); text-decoration: none; }
.socials a:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); }

/* =========================================
   9. АДАПТИВ
========================================= */
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } }

@media(max-width: 1024px) {
    .bento-grid { grid-template-columns: 1fr 1fr; }
    .bento-card.span-2 { grid-column: span 1; }
    .info-container, .info-container.reverse { flex-direction: column; text-align: center; gap: 40px; }
    .feature-list li { text-align: left; }
}

@media(max-width: 768px) {
    /* Робимо плашку компактною, в один рядок (пігулкою) */
    .navbar {
        flex-wrap: nowrap;
        padding: 10px 20px;
        margin: 10px;
        border-radius: 100px; /* Заокруглені краї */
    }

    .logo {
        font-size: 1.2rem; /* Трохи менше лого для телефону */
    }

    /* Ховаємо всі посилання, крім кнопки */
    .nav-links {
        width: auto;
        margin-top: 0;
        display: flex;
        align-items: center;
    }
    .nav-links a:not(.btn) { display: none; }

    /* Робимо кнопку маленькою та акуратною */
    .nav-links .btn {
        margin-left: 0;
        width: auto;
        padding: 8px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .hero { flex-direction: column; text-align: center; padding-top: 80px; }
    .hero-content { padding-right: 0; margin-bottom: 50px; }
    .hero-content h1 { font-size: 3rem; }
    .hero-buttons { justify-content: center; }
    .hero-buttons .btn { width: 100%; }

    .bento-grid { grid-template-columns: 1fr; }
    .accent-card { transform: scale(1); }
    .accent-card:hover { transform: translateY(-5px); }

    .carousel-slide { width: 220px; height: 320px; }
    .carousel-track { height: 320px; }
    .carousel-container { min-height: 420px; }

    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}