/* === Features Page — Alternating sections like Pricing === */

/* --- Base section --- */
.fp-section {
    padding: 80px 0 120px;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

.fp-section:last-child {
    border-bottom: none;
}

/* --- Odd sections: open — лёгкое затемнение матрицы --- */
.fp-open {
    background: rgba(15, 20, 25, 0.35);
}

/* --- Even sections: frosted glass over global canvas --- */
.fp-muted {
    background: rgba(15, 20, 25, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* --- Hero section --- */
.fp-hero {
    padding: 84px 0 56px;
    min-height: 38vh;
    display: flex;
    align-items: center;
}

.fp-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.fp-hero-badge {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid rgba(0, 217, 126, 0.4);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    background: rgba(0, 217, 126, 0.08);
}

.fp-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.fp-accent {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 217, 126, 0.5);
}

.fp-hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.fp-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Section titles --- */
.fp-section .section-title {
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

/* --- Feature Cards Grid --- */
.fp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.fp-card {
    background: rgba(26, 31, 46, 0.7);
    border: 1px solid rgba(0, 217, 126, 0.15);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
}

.fp-card:hover {
    animation: fp-bounce 0.6s ease;
    border-color: rgba(0, 217, 126, 0.4);
    box-shadow: 0 0 30px rgba(0, 217, 126, 0.15), 0 8px 32px rgba(0,0,0,0.4);
}

.fp-card-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.fp-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.fp-card:hover h3 {
    color: var(--primary);
    text-shadow: 0 0 12px rgba(0, 217, 126, 0.6);
}

.fp-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.fp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fp-list li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 4px 0;
    padding-left: 1.2rem;
    position: relative;
}

.fp-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* --- Comparison Table --- */
.fp-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--primary);
    margin-top: 2.5rem;
    background: rgba(10, 14, 20, 0.75);
}

.fp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fp-table th,
.fp-table td {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 217, 126, 0.4);
    border-right: 1px solid rgba(0, 217, 126, 0.24);
}

.fp-table th:last-child,
.fp-table td:last-child {
    border-right: none;
}

.fp-table th:first-child,
.fp-table td:first-child {
    text-align: left;
    color: #a0aab8;
}

.fp-table thead th {
    background: rgba(0, 217, 126, 0.06);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fp-th-us { color: var(--primary) !important; background: rgba(0, 217, 126, 0.1) !important; }
.fp-td-us { background: rgba(0, 217, 126, 0.05); }
.fp-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.fp-table tbody tr:last-child td { border-bottom: none; }
.fp-yes { color: var(--primary); font-weight: 600; }
.fp-warn { color: var(--warning); }
.fp-no { color: #8a95a3; }

/* --- Use Cases --- */
.fp-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.fp-case {
    background: rgba(26, 31, 46, 0.6);
    border: 1px solid rgba(0, 217, 126, 0.12);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 8px;
}

.fp-case:hover {
    animation: fp-bounce 0.6s ease;
    border-color: rgba(0, 217, 126, 0.35);
    box-shadow: 0 0 25px rgba(0, 217, 126, 0.12);
}

.fp-case-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.fp-case h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    transition: color 0.3s ease;
}

.fp-case:hover h3 { color: var(--primary); }

.fp-case p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* --- CTA --- */
.fp-cta { text-align: center; }

.fp-cta-inner {
    max-width: 900px;
    margin: 0 auto;
}

.fp-cta h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.fp-cta p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.fp-cta .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.fp-cta .cta-extra {
    color: var(--text-secondary);
    font-size: 1.15rem;
    white-space: normal;
}

/* --- Reveal animation --- */
@keyframes fp-bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-12px); }
    60% { transform: translateY(-5px); }
    80% { transform: translateY(-8px); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .fp-grid { grid-template-columns: repeat(2, 1fr); }
    .fp-cases-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* FIX: compensate for 2-row fixed header (~120px) */
    .fp-hero { padding: 60px 0 40px; }

    .fp-section {
        padding: 40px 0 60px;
    }

    .fp-grid {
        display: block;
        grid-template-columns: unset !important;
        overflow: visible !important;
        padding: 0 1rem !important;
        margin: 0 !important;
    }

    /* FIX: cards had no gap when display:block — add margin-bottom */
    .fp-grid .fp-card {
        margin-bottom: 1rem;
    }

    .fp-grid .fp-card:last-child {
        margin-bottom: 0;
    }

    .fp-cases-grid {
        display: block;
        grid-template-columns: unset !important;
        overflow: visible !important;
        padding: 0 1rem !important;
        margin: 0 !important;
    }

    /* FIX: use-case cards also need gap */
    .fp-cases-grid .fp-case {
        margin-bottom: 1rem;
    }

    .fp-cases-grid .fp-case:last-child {
        margin-bottom: 0;
    }

    .fp-hero-cta { flex-direction: column; align-items: center; }
    .fp-cta-checks { flex-direction: column; align-items: center; gap: 0.5rem; }

    /* Disable hover animations on touch */
    .fp-card:hover { animation: none; transform: none; }

    /* FIX: comparison table — make it scrollable with hint */
    .fp-table-wrap {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .fp-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .fp-table th,
    .fp-table td {
        padding: 10px 12px;
    }

    /* CTA section */
    .fp-cta h2 {
        font-size: 1.6rem;
    }
}

/* Header on features page — matrix canvas bleeds through backdrop-filter,
   so we match the home page header appearance with a solid-enough background */
body.features-page .site-header {
    background: rgba(15, 20, 25, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}
