/* --- Общие переменные и стили --- */
:root {
    --bg-dark-primary: #000000;
    --bg-dark-secondary: #202020;
    --accent-blue: #3878e1;
    --accent-blue-hover: #2f68c4;
    --text-light: #ffffff;
    --text-gray: #a7a7a7;
    --border-color: rgba(56, 120, 225, 0.4);
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* ИЗМЕНЕНО: Подключение кастомного шрифта */
@font-face {
  font-family: 'VariableFont';
  src: url('Variable.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark-primary);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
    padding-top: 110px; 
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover { color: var(--accent-blue-hover); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- Стили кнопок --- */
.btn {
    display: inline-block;
    padding: 10px 38px;
    font-weight: 600;
    border-radius: 17px;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    cursor: pointer; /* Добавлено для лучшего UX */
}


.btn-primary {
    background-color: var(--accent-blue);
    color: var(--text-light);
    border: 1px solid var(--accent-blue);
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    box-shadow: 0 4px 20px rgba(56, 120, 225, 0.35);
    transform: translateY(-2px);
    color: var(--text-light);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--accent-blue);
}

.btn-secondary:hover {
    background-color: var(--accent-blue);
    color: var(--text-light);
}

.hero__cta-button { padding-left: 60px; padding-right: 60px; }


/* --- Header --- */
.header {
    position: fixed;
    top: 15px;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-dark-secondary);
    border-bottom: 1px solid #333;
    border-radius: 17px;
    max-width: 1160px;
    margin: 0 auto;
    height: 80px;
    padding: 0 20px;
    transition: top 0.3s ease;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo { display: flex; align-items: center; }
.logo svg { height: 30px; width: auto; }

.logo svg text {
    font-family: 'VariableFont', sans-serif !important; 
    font-weight: normal !important; 
    letter-spacing: 2.5px !important; 
}

.navigation { display: flex; align-items: center; gap: 20px; }

.header__socials { display: flex; align-items: center; gap: 15px; }
.header__socials a { display: inline-block; line-height: 0; }
.header__socials svg {
    width: 28px;
    height: 28px;
    fill: var(--text-light);
    transition: fill 0.3s ease, transform 0.3s ease;
}

.header__socials a:hover svg {
    fill: var(--accent-blue);
    transform: scale(1.1);
}

.nav-link { font-size: 16px; color: var(--text-light); }
.phone-link { font-weight: 600; }

/* --- Hero Section --- */
.hero { padding: 40px 0; }
.hero__container { display: flex; align-items: center; gap: 40px; }
.hero__content { flex: 1 1 50%; z-index: 2; }
.hero__title {
    font-weight: 670;
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 35px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero__subtitle { font-size: 18px; color: var(--text-gray); margin-bottom: 60px; max-width: 700px; }
.hero__image-wrapper { flex: 1 1 50%; position: relative; }
.hero__image { margin: 0 auto; filter: drop-shadow(0 0 100px rgba(56, 121, 225, 0.17)); }

/* --- Features Section --- */
.features { padding: 80px 0; }
.features__container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-card {
    border: 2px solid var(--accent-blue);
    border-radius: 17px;
    background-color: #121212;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    padding: 18px;
    min-height: 200px;
    /* ДОБАВЛЕНО: Начальное состояние для анимации */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ДОБАВЛЕНО: Задержка анимации для каждой карточки */
.feature-card:nth-child(1) { animation-delay: 0.2s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }


.feature-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 10px 30px rgba(56, 120, 225, 0.15); }
.feature-card__content { position: relative; z-index: 2; }
.feature-card__title {
    color: var(--accent-blue);
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
}
.feature-card__text {
    color: var(--text-gray);
    font-size: 16px;
}

.feature-card__image {
    position: absolute;
    width: 140px;
    height: 140px;
    right: -30px;
    bottom: -30px;
    opacity: 1;
    transition: transform 0.4s ease;
    z-index: 1;
}
.feature-card:hover .feature-card__image { transform: scale(1.08) rotate(5deg); }


/* --- Footer --- */
.footer { background-color: var(--bg-dark-secondary); padding: 60px 0; margin-top: 80px; border-top: 1px solid #333; }
.footer__container { display: grid; grid-template-columns: 1.5fr 1fr 2fr 1fr; gap: 40px; }
.footer__column--logo { display: flex; flex-direction: column; justify-content: space-between; }
.footer__logo svg { height: 35px; width: auto; }
.footer__logo svg text { 
    fill: var(--text-light); 
    font-family: 'VariableFont', sans-serif !important; 
    font-weight: normal !important; 
    letter-spacing: 2.5px !important;
}
.footer__copyright { color: #777; font-size: 14px; }
.footer__title { font-size: 18px; color: var(--text-light); margin-bottom: 20px; }
.footer__nav-list li, .footer__contact-list li { margin-bottom: 12px; }
.footer__nav-list a, .footer__contact-list a, .footer__contact-list span { color: var(--text-gray); font-size: 15px; }
.footer__nav-list a:hover, .footer__contact-list a:hover { color: var(--accent-blue); }
.footer__contact-list li { display: flex; align-items: center; gap: 12px; }
.footer__contact-icon { flex-shrink: 0; color: var(--accent-blue); }
.footer__socials-icons { display: flex; gap: 15px; }
.footer__socials-icons a { display: inline-block; }
.footer__socials-icons img { width: 32px; height: 32px; transition: transform 0.3s ease; }
.footer__socials-icons a:hover img { transform: scale(1.15); }


/* --- Адаптивность --- */
@media (max-width: 960px) {
    .footer__container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header { padding: 0 15px; }
    .hero { padding: 40px 0; text-align: center; }
    .hero__container { flex-direction: column; }
    .hero__title { font-size: 40px; }
    .hero__subtitle { margin-bottom: 50px; margin-left: auto; margin-right: auto; }
    .hero__image-wrapper { margin-top: 40px; }
    .features__container { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
    body { padding-top: 80px; }
    .header { top: 0; border-radius: 0; max-width: 100%; height: 60px; }
    .nav-link.phone-link, .header__socials { display: none; }
    .footer__container { grid-template-columns: 1fr; text-align: center; }
    .footer__column { align-items: center; }
    .footer__contact-list li, .footer__socials-icons { justify-content: center; }
}

/* --- ДОБАВЛЕНО: Анимация появления карточек --- */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ДОБАВЛЕНО: Стили для всплывающего окна (Popup) --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    background-color: #111111;
    border-radius: 17px;
    max-width: 850px;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(56, 120, 225, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup-container {
    transform: scale(1);
}

.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}
.popup-close-btn:hover {
    color: var(--text-light);
    transform: rotate(90deg);
}

.popup-content {
    display: flex;
    align-items: center;
}

.popup-image {
    flex-shrink: 0;
    width: 40%;
    object-fit: cover;
    border-radius: 17px 0 0 17px;
}

.popup-form-wrapper {
    padding: 40px;
    width: 60%;
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
}

.popup-description {
    color: var(--text-gray);
    margin-bottom: 25px;
    font-size: 15px;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-input {
    width: 100%;
    padding: 12px 20px;
    background-color: #292929;
    border: 1px solid #444;
    border-radius: 12px;
    color: var(--text-light);
    font-size: 16px;
    font-family: var(--font-main);
    transition: border-color 0.3s ease;
}
.popup-input::placeholder {
    color: var(--text-gray);
}
.popup-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.popup-submit-btn {
    width: 100%;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 16px;
}

.popup-policy {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .popup-content { flex-direction: column; }
    .popup-image { width: 100%; max-height: 250px; border-radius: 17px 17px 0 0; }
    .popup-form-wrapper { width: 100%; padding: 30px; }
}


/* --- ДОБАВЛЕНО: Стили для плавающей кнопки (FAB) --- */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.fab-input {
    display: none;
}

.fab-main-btn {
    width: 60px;
    height: 60px;
    background-color: var(--bg-dark-secondary);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.fab-main-btn:hover {
    transform: scale(1.1);
    background-color: var(--accent-blue);
}

.fab-main-btn svg {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
}
.fab-main-btn svg path {
    stroke: var(--accent-blue);
}
.fab-main-btn:hover svg path {
    stroke: var(--text-light);
}

.fab-icon-write {
    opacity: 1;
    transform: rotate(0);
}
.fab-icon-close {
    opacity: 0;
    transform: rotate(-45deg);
    fill: var(--text-light);
}

.fab-social-link {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
    opacity: 0;
    transform: translateY(0);
    z-index: -1;
}

.fab-social-link svg {
    width: 28px;
    height: 28px;
    color: var(--text-light);
    transition: color 0.3s ease;
}
.fab-social-link:hover {
    transform: scale(1.1);
}
.fab-telegram:hover { color: #2AABEE; }
.fab-whatsapp:hover { color: #25D366; }


/* Анимация появления иконок при нажатии */
.fab-input:checked + .fab-main-btn .fab-icon-write {
    opacity: 0;
    transform: rotate(45deg);
}
.fab-input:checked + .fab-main-btn .fab-icon-close {
    opacity: 1;
    transform: rotate(0);
}
.fab-input:checked + .fab-main-btn:hover svg path { stroke: none; }

.fab-input:checked ~ .fab-social-link {
    opacity: 1;
    z-index: 1;
}
/* Позиционирование иконок с задержкой анимации */
.fab-input:checked ~ .fab-telegram {
    transform: translateY(-75px);
    transition-delay: 0.1s;
}
.fab-input:checked ~ .fab-whatsapp {
    transform: translateY(-140px);
    transition-delay: 0.2s;
}