:root {
    /* --- NEW PALETTE BASED ON LOGO --- */
    --bg-dark: #020412; /* Глибокий темно-синій, майже чорний */

    /* Основні кольори логотипу */
    --color-cyan: #00D2FF;
    --color-purple: #9D4EDD;
    --color-blue: #3A86FF;

    /* Градієнт бренду (для кнопок і тексту) */
    --brand-gradient: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 50%, var(--color-purple) 100%);
    --brand-gradient-hover: linear-gradient(135deg, #4DE1FF 0%, #6EA8FF 50%, #C084FC 100%);

    /* Світіння */
    --primary-glow: rgba(58, 134, 255, 0.5);

    /* Скло */
    --glass-bg: rgba(10, 20, 40, 0.4); /* Більш синій відтінок скла */
    --glass-border: rgba(100, 180, 255, 0.15);

    /* Текст */
    --text-main: #FFFFFF;
    --text-muted: #94A3B8; /* Cool grey */
    --font-main: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;

    /* ОНОВЛЕНИЙ ФОН: Сині та Фіолетові плями */
    background-image:
            radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.15), transparent 40%), /* Purple Blob top-left */
            radial-gradient(circle at 90% 60%, rgba(0, 210, 255, 0.12), transparent 40%); /* Cyan Blob bottom-right */
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; margin-bottom: 1rem; color: #fff; }

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    /* Градієнтний заголовок під стиль лого */
    background: linear-gradient(to right, #ffffff 20%, #A0C4FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2, h3 {
    /* Легкий відтінок синього */
    color: #E2E8F0;
}

p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1.5rem; }
a { text-decoration: none; transition: 0.3s; }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }

/* --- GLASSMORPHISM & CARDS --- */
.glass-panel, .tech-card, .bento-item, .form-box, .navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Navbar */
.navbar {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(2, 4, 18, 0.7); /* Darker navbar */
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* Логотип в меню */
.logo { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
/* Робимо частину лого градієнтною */
.logo span {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { list-style: none; display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-main); font-size: 0.95rem; font-weight: 500; opacity: 0.8; }
.nav-links a:hover, .nav-links a.active {
    color: var(--color-cyan);
    opacity: 1;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}

/* Buttons - NEW GRADIENT STYLE */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.btn-primary {
    background: var(--brand-gradient);
    box-shadow: 0 4px 20px rgba(58, 134, 255, 0.4);
    position: relative;
    z-index: 1;
    overflow: hidden;
}
/* Ефект блиску на кнопці */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0; transition: 0.3s;
}
.btn-primary:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(157, 78, 221, 0.5);
}
.btn-primary:hover::after { opacity: 1; }

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-blue);
    color: #fff;
    margin-left: 15px;
}
.btn-secondary:hover {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

/* Hero */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
    position: relative;
}
/* Підсвітка за заголовком */
.hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 400px;
    /* Градієнтна пляма під колір лого */
    background: radial-gradient(circle, rgba(58, 134, 255, 0.15) 0%, rgba(157, 78, 221, 0.05) 50%, transparent 70%);
    z-index: -1; pointer-events: none;
}
.hero-content { max-width: 900px; margin: 0 auto; }

/* Cards Styling */
.tech-card {
    padding: 40px;
    border-radius: 24px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
/* Лінія зверху картки при ховері (градієнтна) */
.tech-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--brand-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: 0.4s;
}
.tech-card:hover::after { transform: scaleX(1); }

.tech-card:hover {
    transform: translateY(-5px);
    background: rgba(20, 30, 60, 0.6);
    border-color: var(--color-blue);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.tech-card h3 {
    font-size: 1.5rem; margin-bottom: 15px;
    background: linear-gradient(to right, #fff, #bde0fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grids & Layouts */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento-item { border-radius: 24px; padding: 30px; display: flex; flex-direction: column; justify-content: center; transition: 0.3s; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* Stats Bar */
.stats-bar {
    background: rgba(2, 4, 18, 0.8);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 40px 0;
}
.stat-number {
    display: block; font-size: 3rem; font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Forms */
.form-box { padding: 40px; border-radius: 24px; }
.form-group { margin-bottom: 20px; }
input, select, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 15px;
    border-radius: 12px;
    font-family: inherit;
    transition: 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 15px rgba(58, 134, 255, 0.2);
}

/* Page Header */
.page-header { padding: 160px 0 60px; text-align: center; }

/* Timeline */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline::after {
    content: ''; position: absolute; width: 2px;
    background: linear-gradient(180deg, var(--color-cyan), var(--color-purple));
    top: 0; bottom: 0; left: 20px; opacity: 0.5;
}
.timeline-item { padding: 20px 20px 20px 60px; position: relative; margin-bottom: 40px; }
.timeline-item::before {
    content: ''; position: absolute; left: 11px; top: 25px; width: 20px; height: 20px;
    background: var(--bg-dark); border: 2px solid var(--color-cyan); border-radius: 50%; z-index: 2;
    box-shadow: 0 0 10px var(--color-cyan);
}

/* Footer */
footer { padding: 60px 0; border-top: 1px solid var(--glass-border); margin-top: 60px; font-size: 0.9rem; color: var(--text-muted); text-align: center; }

/* Mobile */
.hamburger { display: none; font-size: 1.5rem; color: #fff; cursor: pointer; }
@media(max-width: 900px) {
    .bento-grid { grid-template-columns: 1fr; }
    .span-2, .span-3 { grid-column: span 1; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .nav-links {
        display: none; position: absolute; top: 70px; left: 0; width: 100%;
        background: rgba(2,4,18,0.95); flex-direction: column; padding: 20px;
        border-bottom: 1px solid var(--glass-border); backdrop-filter: blur(20px);
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    .btn-secondary { margin: 10px 0 0 0; display: block; width: 100%; }
}

/* Animations */
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s ease-out forwards; }

/* --- BUTTON ALIGNMENT FIX --- */

/* Контейнер для кнопок */
.hero-btns {
    display: flex;           /* Включаємо гнучку верстку */
    justify-content: center; /* Центруємо по горизонталі */
    align-items: center;     /* Центруємо по вертикалі (це вирівняє їх висоту) */
    gap: 20px;               /* Відстань між кнопками */
    margin-top: 40px;        /* Відступ від тексту зверху */
    flex-wrap: wrap;         /* Щоб на мобільному переносились, якщо не влазять */
}

/* Прибираємо старий відступ зліва у другої кнопки, бо тепер працює gap */
.btn-secondary {
    margin-left: 0 !important;
}