/* ============================================
   ARCHITECTURES SECTION
   ============================================ */

/* --- Hero --- */
.arch-hero {
    background: var(--gradient-hero);
    padding: var(--spacing-3xl) 0;
    color: var(--color-white);
}
.arch-hero .hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-4xl);
    margin-bottom: var(--spacing-md);
}
.arch-hero .hero-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Section Spacing --- */
.arch-section {
    padding: var(--section-spacing) 0;
}
.arch-section:nth-child(even) {
    background-color: var(--color-light);
}


/* --- Stack Pills (Landing Card) --- */
.arch-stack-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.arch-stack-pills-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.arch-stack-pill {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-accent);
    background: var(--color-accent-subtle);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

/* --- Diagram Section --- */
.arch-diagram-section {
    background: var(--color-light);
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-2xl);
}
.arch-diagram-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.arch-diagram-svg {
    display: block;
    width: 100%;
    height: auto;
    min-width: 800px;
}

/* --- Description Section --- */
.arch-description-section {
    background: var(--color-white);
}
.section-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-3xl);
    color: var(--color-text-dark);
    position: relative;
    padding-bottom: var(--spacing-sm);
}
.section-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent-soft);
    border-radius: 2px;
}
.arch-description-card {
    background: var(--color-light);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--spacing-xl);
}
.arch-description-text {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--color-text-medium);
    margin: 0;
}

/* --- Tech Stack Tabs --- */
.arch-stack-tabs {
    display: flex;
    gap: 0.5rem;
    border: none;
    background: var(--color-white);
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: fit-content;
}
.arch-stack-tab {
    border: none;
    border-radius: var(--radius-full);
    padding: 0.5rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-text-medium);
    background: transparent;
    transition: all 0.2s ease;
}
.arch-stack-tab:hover {
    color: var(--color-accent);
    background: var(--color-accent-subtle);
}
.arch-stack-tab.active {
    color: var(--color-white);
    background: var(--gradient-accent);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* --- Tech Stack Table --- */
.arch-stack-section {
    background: var(--color-light);
}
.arch-stack-table {
    background: var(--color-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.arch-stack-table thead th {
    background: var(--color-darkest);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
}
.arch-stack-table tbody tr {
    transition: background 0.15s ease;
}
.arch-stack-table tbody tr:hover {
    background: var(--color-accent-subtle);
}
.arch-stack-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.arch-stack-element {
    font-weight: 600;
    color: var(--color-text-dark);
    white-space: nowrap;
    font-size: var(--text-sm);
}
.arch-stack-options {
    color: var(--color-text-medium);
    font-size: var(--text-sm);
}

/* --- Use Case Cards --- */
.arch-usecases-section {
    background: var(--color-white);
}
.arch-usecase-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    transition: box-shadow 0.3s ease;
    background: var(--color-white);
}
.arch-usecase-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.arch-lob-pill {
    display: inline-block;
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}
.arch-usecase-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--color-text-dark);
}
.arch-usecase-block {
    margin-bottom: var(--spacing-md);
}
.arch-usecase-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}
.arch-usecase-block p {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--color-text-medium);
    margin-bottom: 0;
}
.arch-usecase-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-success);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border-light);
}

/* --- CTA Section --- */
.arch-cta-section {
    background: var(--gradient-section-dark);
    color: var(--color-white);
}
.arch-cta-section h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-white);
}
.arch-cta-section .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}
.arch-cta-btn {
    background: var(--gradient-accent);
    border: none;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.arch-cta-btn:hover {
    box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
}

/* --- Hero badge --- */
.arch-hero-badge {
    display: inline-block;
    margin-top: var(--spacing-sm);
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
}

/* --- Phase Timeline Strip --- */
.arch-phases-section {
    background: var(--color-white);
}
.arch-phases-strip {
    display: flex;
    align-items: stretch;
    gap: 0;
    justify-content: center;
}
.arch-phase-card {
    flex: 1;
    max-width: 320px;
    background: var(--color-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
}
.arch-phase-number {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    background: var(--color-accent-subtle);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-sm);
}
.arch-phase-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-sm);
}
.arch-phase-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.arch-phase-duration {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}
.arch-phase-price {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-success);
}
.arch-phase-summary {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--color-text-medium);
    margin: 0;
}
.arch-phase-arrow {
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    color: var(--color-accent);
    font-size: var(--text-lg);
}
.arch-phases-anchor {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: var(--spacing-md);
}

/* --- Explainer (Editorial Long-Read) --- */
.arch-explainer-section {
    background: var(--color-white);
}
.arch-explainer-body {
    max-width: 72ch;
    font-size: var(--text-base);
    line-height: 1.85;
    color: var(--color-text-medium);
}
.arch-explainer-body h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-2xl);
    color: var(--color-text-dark);
    margin-top: var(--spacing-3xl);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-border-light);
}
.arch-explainer-body h2:first-child {
    margin-top: 0;
}
.arch-explainer-body h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-xl);
    color: var(--color-accent);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
}
.arch-explainer-body p {
    margin-bottom: var(--spacing-lg);
}
.arch-explainer-body strong {
    color: var(--color-text-dark);
}
.arch-explainer-body code {
    font-size: 0.9em;
    background: var(--color-light);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    color: var(--color-accent);
}
.arch-explainer-body ul {
    padding-left: 1.5rem;
    margin-bottom: var(--spacing-lg);
}
.arch-explainer-body ul li {
    margin-bottom: var(--spacing-sm);
}
.arch-explainer-body em {
    font-style: italic;
    color: var(--color-text-dark);
}
.arch-explainer-aside {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-muted);
}
.arch-explainer-table {
    background: var(--color-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    font-size: var(--text-sm);
}
.arch-explainer-table thead th {
    background: var(--color-darkest);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    white-space: nowrap;
}
.arch-explainer-table tbody td {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: top;
    line-height: 1.6;
}
.arch-explainer-table tbody tr:hover {
    background: var(--color-accent-subtle);
}
.arch-explainer-table--wide {
    min-width: 800px;
}
.arch-explainer-table {
    background: var(--color-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: var(--spacing-lg);
    font-size: var(--text-sm);
    line-height: 1.5;
}
.arch-explainer-table thead th {
    background: var(--color-darkest);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    white-space: nowrap;
}
.arch-explainer-table thead th.arch-explainer-table-default {
    background: var(--color-accent);
}
.arch-explainer-table tbody tr {
    transition: background 0.15s ease;
}
.arch-explainer-table tbody tr:hover {
    background: var(--color-accent-subtle);
}
.arch-explainer-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: top;
}
.arch-explainer-table-layer {
    font-weight: 600;
    color: var(--color-text-dark);
    white-space: nowrap;
}
.arch-explainer-table-default {
    background: rgba(var(--color-accent-rgb, 124, 58, 237), 0.04);
    font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .arch-hero .hero-title {
        font-size: var(--text-3xl);
    }
    .section-heading {
        font-size: var(--text-2xl);
    }
    .arch-diagram-wrapper {
        padding: var(--spacing-sm);
    }
    .arch-section {
        padding: var(--spacing-2xl) 0;
    }
    .arch-phases-strip {
        flex-direction: column;
        align-items: center;
    }
    .arch-phase-card {
        max-width: 100%;
    }
    .arch-phase-arrow {
        transform: rotate(90deg);
        padding: var(--spacing-sm) 0;
    }
}
