/* ============================================================
   Features Page Styles — Premium Bento Layout
   Uses variables from landing-light.css
   ============================================================ */

/* Hero */
.features-hero {
    position: relative;
    padding: 170px 24px 100px;
    background:
        radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.10), transparent 50%),
        radial-gradient(circle at 15% 40%, rgba(139, 92, 246, 0.08), transparent 40%),
        radial-gradient(circle at 85% 60%, rgba(14, 165, 233, 0.06), transparent 40%),
        var(--bg-secondary);
    overflow: hidden;
    text-align: center;
}

.features-hero .hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 40% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 35%);
    z-index: 0;
}

.features-hero .hero-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 24px;
}

.hero-badge .badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 11px;
}

.features-hero h1 {
    font-size: clamp(36px, 5.5vw, 58px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
    margin-top: 64px;
}

.hero-stat {
    text-align: center;
    min-width: 140px;
}

.hero-stat .v {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.hero-stat .l {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Feature group sections */
.feature-group-section {
    padding: 80px 24px;
    background: #fff;
}

.feature-group-section.alt {
    background: var(--bg-secondary);
}

.feature-group-section .section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

/* ── Bento Grid ── */
.features-grid.bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Feature card — base (overrides landing-light.css opacity:0) */
.feature-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 4px 8px rgba(15, 23, 42, 0.04),
        0 20px 40px rgba(15, 23, 42, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-card:hover::before {
    opacity: 0.7;
}

.feature-group-section.alt .feature-card {
    background: #fff;
}

/* Bento large card — first card in each group, spans 2 columns */
.feature-card.bento-large {
    padding: 36px 32px;
}

.feature-card.bento-large::before {
    opacity: 0.5;
}

.feature-card.bento-large .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 28px;
}

.feature-card.bento-large h3 {
    font-size: 22px;
}

.feature-card.bento-large p {
    font-size: 16px;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.08) rotate(-3deg);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.feature-tags span {
    display: inline-flex;
    padding: 4px 10px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.feature-card:hover .feature-tags span {
    background: rgba(99, 102, 241, 0.06);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
}

/* FAQ Accordion */
.faq-section {
    background: #fff;
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.faq-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

.faq-list {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    background: #fff;
}

.faq-item:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

.faq-item.open {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
    gap: 16px;
    font-family: inherit;
    transition: background 0.2s ease;
}

.faq-trigger:hover {
    background: var(--bg-secondary);
}

.faq-question {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
    padding-right: 8px;
}

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1), padding 0.38s;
    padding: 0 26px;
}

.faq-item.open .faq-body {
    max-height: 600px;
    padding-bottom: 26px;
}

.faq-answer {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.faq-answer strong { color: var(--text-primary); }
.faq-answer code {
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

/* CTA */
.features-cta {
    background: var(--gradient-primary);
    padding: 90px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.features-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1), transparent 40%);
    pointer-events: none;
}

.features-cta .cta-container {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.features-cta h2 {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.features-cta p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 36px;
    line-height: 1.6;
}

.features-cta .cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-outline-white {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-outline-white:active {
    transform: translateY(0) scale(0.98);
}

/* ── Responsive Bento Layout ── */

/* Tablet: 2 columns, large card spans both */
@media (min-width: 640px) {
    .features-grid.bento {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .feature-card.bento-large {
        grid-column: span 2;
    }
}

/* Desktop: 4-column bento grid */
@media (min-width: 1024px) {
    .features-grid.bento {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    /* Large card spans 2 columns on desktop */
    .feature-card.bento-large {
        grid-column: span 2;
    }
}

@media (min-width: 900px) {
    .hero-stats-row {
        gap: 80px;
    }
}

@media (max-width: 768px) {
    .features-hero { padding: 140px 20px 80px; }
    .features-hero h1 { font-size: clamp(30px, 8vw, 40px); }
    .features-hero p { font-size: 16px; }
    .hero-stats-row { gap: 32px; }
    .hero-stat .v { font-size: 1.75rem; }
    .hero-stat .l { font-size: 11px; }
    .feature-group-section { padding: 64px 20px; }
    .feature-card { padding: 24px; }
    .feature-card.bento-large { padding: 28px 24px; }
    .faq-trigger { padding: 20px 22px; }
    .faq-question { font-size: 15px; }
    .faq-body { padding: 0 22px; }
    .faq-item.open .faq-body { padding-bottom: 22px; }
    .features-cta { padding: 72px 20px; }
    .features-cta .cta-actions { flex-direction: column; }
    .btn-outline-white { width: 100%; justify-content: center; }
}
