/* =========================================================
   Capabilities — capability atlas
   ========================================================= */

/* Hero */
.features-hero {
    padding: 34px 0 72px;
}

.features-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 20px;
    align-items: stretch;
}

.features-hero-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 92% 4%, rgba(124, 58, 237, 0.1), transparent 36%),
        var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.features-hero-copy::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 0 0 30px rgba(37, 99, 235, 0.03);
}

.features-hero-copy .hero-title {
    max-width: 14ch;
    margin-top: 4px;
    font-size: clamp(2.25rem, 4.3vw, 3.7rem);
    line-height: 1.06;
}

.features-hero-copy .hero-lead {
    max-width: 56ch;
    margin-top: 18px;
    color: var(--body);
    font-size: 15.5px;
    line-height: 1.76;
}

.feature-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 24px;
}

.feature-hero-chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted-strong);
    font-size: 11.5px;
    font-weight: 650;
}

.feature-hero-chips i {
    color: var(--blue);
    font-size: 10px;
}

/* Stat bento */
.stat-bento {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform var(--normal), box-shadow var(--normal);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.stat-card--ink {
    border-color: transparent;
    background: var(--gradient);
    box-shadow: var(--shadow-blue);
}

.stat-card--ink .stat-label,
.stat-card--ink .stat-caption {
    color: rgba(255, 255, 255, 0.76);
}

.stat-card--ink .stat-value {
    color: #fff;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted-strong);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-label i {
    color: var(--blue);
    font-size: 11px;
}

.stat-card--ink .stat-label i {
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    margin-top: 16px;
    font-family: var(--font-display);
    color: var(--ink);
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
}

.stat-caption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.stat-track {
    width: 100%;
    height: 5px;
    margin-top: 15px;
    border-radius: var(--radius-pill);
    background: var(--surface-soft);
    overflow: hidden;
}

.stat-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient);
}

.stat-card--ink .stat-track {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card--ink .stat-track span {
    background: #fff;
}

/* Tag wall */
.features-accordion-section {
    padding: 10px 0 80px;
}

.tag-wall {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.tag-wall-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: 6px;
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tag-wall-label::after {
    content: "";
    width: 26px;
    height: 1px;
    margin-left: 4px;
    background: var(--line);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--canvas);
    color: var(--body);
    font-size: 11.5px;
    font-weight: 650;
}

.tag-chip i {
    color: var(--blue);
    font-size: 10.5px;
}

/* Domain accordions */
.domain-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.domain-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: border-color var(--normal), box-shadow var(--normal);
}

.domain-card[open] {
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: var(--shadow-sm);
}

.domain-card summary {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
}

.domain-card summary::-webkit-details-marker {
    display: none;
}

.domain-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: var(--gradient-soft);
    color: var(--blue);
    font-size: 17px;
}

.domain-num {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.domain-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.domain-label {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.domain-sub {
    color: var(--muted-strong);
    font-size: 11.5px;
    font-weight: 600;
}

.domain-count {
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 10px;
}

.domain-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted-strong);
    font-size: 10px;
    transition: transform var(--normal), background var(--normal), color var(--normal);
}

.domain-card[open] .domain-chevron {
    transform: rotate(180deg);
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue);
}

.domain-body {
    padding: 0 24px 24px;
}

.domain-intro {
    max-width: 75ch;
    margin-bottom: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    color: var(--body);
    font-size: 13.5px;
    line-height: 1.75;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.module-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: var(--canvas);
    transition: border-color var(--fast), background var(--fast), transform var(--fast);
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.2);
    background: #fbfcff;
}

.module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--surface);
    color: var(--blue);
    font-size: 13px;
    box-shadow: var(--shadow-xs);
}

.status-pill {
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.status-stable {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.status-beta {
    background: rgba(245, 158, 11, 0.13);
    color: #b45309;
}

.module-card h3 {
    margin-bottom: 6px;
    font-size: 14.5px;
}

.module-card p {
    color: var(--body);
    font-size: 12.5px;
    line-height: 1.65;
}

.module-tag {
    align-self: flex-start;
    margin-top: 12px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.03em;
}

/* CTA */
.features-cta-banner {
    padding: 0 0 90px;
}

.features-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 38px 42px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 85% 20%, rgba(124, 58, 237, 0.3), transparent 42%),
        radial-gradient(circle at 12% 90%, rgba(37, 99, 235, 0.3), transparent 40%),
        #0f172a;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.features-cta-copy h2 {
    margin-bottom: 7px;
    color: #fff;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.features-cta-copy p {
    max-width: 58ch;
    color: rgba(226, 232, 240, 0.72);
    font-size: 13.5px;
}

.features-cta-actions {
    display: flex;
    flex-shrink: 0;
    gap: 9px;
}

.features-cta-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: none;
}

.features-cta-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Responsive */
@media (max-width: 1000px) {
    .features-hero-grid {
        grid-template-columns: 1fr;
    }

    .features-hero-copy {
        padding: 34px;
    }

    .stat-bento {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stat-card {
        min-height: 132px;
    }
}

@media (max-width: 820px) {
    .stat-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .domain-card summary {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .domain-num,
    .domain-count {
        display: none;
    }

    .domain-sub {
        grid-column: auto;
        margin-top: 0;
    }

    .domain-chevron {
        grid-row: 1 / span 2;
        grid-column: 3;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .features-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
    }

    .features-cta-actions {
        width: 100%;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .features-hero {
        padding-top: 10px;
    }

    .features-hero-copy {
        padding: 26px 20px;
        border-radius: 24px;
    }

    .features-hero-copy .hero-title {
        font-size: clamp(1.95rem, 9vw, 2.6rem);
    }

    .stat-card {
        padding: 18px;
        min-height: 124px;
    }

    .tag-wall {
        padding: 14px;
    }

    .domain-card summary {
        padding: 16px;
    }

    .domain-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .domain-label {
        font-size: 16px;
    }

    .domain-body {
        padding: 0 16px 18px;
    }

    .module-card {
        padding: 16px;
    }
}
