/* Переопределяем дизайн-токены платформы под высококонтрастный стильный бренд */
:root {
    --brand: #10b981;          /* Неоновый изумрудный акцент */
    --brand-2: #059669;        /* Насыщенный зеленый */
    --accent: #22c55e;         /* Яркий салатово-зеленый */
    --bg: #090d16;             /* Глубокий премиальный темно-синий/черный фон */
    --surface: #111827;        /* Карточки и блоки */
    --surface-2: #1f2937;      /* Вторичный поверхностный цвет */
    --text: #f9fafb;           /* Белоснежный текст */
    --muted: #9ca3af;          /* Приглушенный текст */
    --border: #374151;         /* Тонкая контрастная граница */
    --radius-1: 8px;
    --radius-2: 12px;
    --radius-3: 16px;
    --shadow-1: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 10px 30px rgba(16, 185, 129, 0.15);
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Шапка сайта */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

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

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
}

.nav-link.highlight {
    color: var(--brand);
    font-weight: 600;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-2);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--brand);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--brand-2);
    color: #fff;
}

.btn-accent:hover {
    background: var(--brand);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* Секция Герой */
.hero-section {
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

.hero-badge-wrapper {
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
}

.tag-accent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand);
    border-color: rgba(16, 185, 129, 0.3);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    letter-spacing: -1px;
}

.hero-line-accent {
    width: 80px;
    height: 4px;
    background: var(--brand);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand);
}

.stat-desc {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Секции общего назначения */
.section {
    padding: 5rem 0;
}

.section-dark {
    background-color: var(--surface);
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin: 0.5rem 0 1rem;
}

.section-desc {
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Фильтр шаблонов */
.template-filter {
    margin-bottom: 2.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--brand);
    color: #000;
    border-color: var(--brand);
}

/* Сетка 10 шаблонов */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.template-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
}

.template-preview {
    position: relative;
    aspect-ratio: 1 / 1.3;
    background: #000;
    overflow: hidden;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.3s ease;
}

.template-card:hover .template-preview img {
    scale: 1.05;
}

.template-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 13, 22, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.badge-premium {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #eab308;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-free {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--brand);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}

.template-info {
    padding: 1.25rem;
}

.template-cat {
    font-size: 0.75rem;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.template-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.25rem 0 0.5rem;
}

.template-desc {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-btn {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Бенто-сетка преимуществ */
.features-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius-2);
}

.bento-card.highlight-border {
    border-color: rgba(16, 185, 129, 0.4);
}

.bento-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.bento-card h3 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.bento-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Отзывы */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.review-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-2);
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand);
}

.author-name {
    font-weight: 700;
}

.author-role {
    font-size: 0.8rem;
    color: var(--muted);
}

.review-text {
    font-size: 0.95rem;
    color: var(--text);
    margin: 0;
    font-style: italic;
}

/* Секция Заявки */
.cta-box {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    padding: 3rem 2rem;
    border-radius: var(--radius-3);
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    font-size: 2rem;
    margin-top: 0;
}

.lead-form-wrapper {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.lead-form {
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-control {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-1);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-1);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--brand);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

/* Подвал */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    background: var(--bg);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Адаптивы */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .lead-form {
        grid-template-columns: 1fr;
    }
}