/* ============================================
   iCA Article Page Styles
   Author: William Leonard, CTI Global
   bill.leonard@cticorp.com
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-dark:    #1e3c72;
    --blue-mid:     #2a5298;
    --blue-accent:  #2563eb;
    --green:        #10b981;
    --text:         #1a1a2e;
    --text-muted:   #555;
    --bg-light:     #f4f7f9;
    --bg-white:     #ffffff;
    --border:       #e2e8f0;
    --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-white);
    line-height: 1.7;
    font-size: 17px;
}

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

a {
    color: var(--blue-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header --- */
.site-header {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

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

.logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.logo span {
    color: #93c5fd;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-beta {
    background: var(--green);
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-beta:hover {
    background: #059669;
    text-decoration: none;
}

/* --- Article Hero --- */
.article-hero {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
    padding: 64px 0 48px;
    color: #fff;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.article-category {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.article-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 28px;
    max-width: 820px;
}

.article-byline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.author-name {
    display: block;
    font-weight: 700;
    color: #fff;
    font-size: 15px;
}

.author-title {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.article-read-time {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

/* --- Stat Banner --- */
.stat-banner {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
}

.stat-grid {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-item.highlight .stat-number {
    color: var(--green);
}

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--blue-dark);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    max-width: 160px;
}

.stat-arrow {
    font-size: 28px;
    color: var(--blue-mid);
    font-weight: 300;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* --- Article Body --- */
.article-body {
    padding: 56px 0 80px;
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
}

.article-content p {
    margin-bottom: 20px;
    color: #2d2d2d;
}

.article-lead {
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
}

.article-content h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--blue-dark);
    margin: 48px 0 16px;
    padding-top: 16px;
    border-top: 3px solid var(--blue-accent);
    display: inline-block;
}

.article-content h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--blue-mid);
    margin: 32px 0 12px;
}

.article-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.article-content ul {
    margin: 0 0 20px 20px;
}

.article-content ul li {
    margin-bottom: 8px;
    color: #2d2d2d;
}

.article-content strong {
    color: var(--text);
    font-weight: 700;
}

/* --- Callout Box --- */
.callout-box {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
    border-radius: 12px;
    padding: 32px 40px;
    margin: 32px 0;
    color: #fff;
}

.callout-math {
    font-size: 20px;
    font-weight: 600;
    line-height: 2;
}

.math-line {
    color: rgba(255,255,255,0.85);
}

.math-result {
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 16px;
    margin-top: 8px;
}

/* --- Feature Highlight --- */
.feature-highlight {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #eff6ff;
    border-left: 4px solid var(--blue-accent);
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 28px 0;
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-text {
    font-size: 16px;
    color: #1e3a5f;
    line-height: 1.6;
}

/* --- Survey Types Grid --- */
.survey-types-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0 32px;
}

.survey-type-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
}

.survey-type-card h4 {
    color: var(--blue-dark);
    font-size: 15px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.survey-type-card ul {
    margin: 0;
    padding-left: 16px;
}

.survey-type-card ul li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* --- API Banner --- */
.api-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 20px;
}

.api-badge {
    background: #f59e0b;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* --- Integration Example --- */
.integration-example {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
}

.integration-example h4 {
    color: #166534;
    margin-bottom: 10px;
    font-size: 15px;
}

.integration-example p {
    color: #166534;
    font-size: 15px;
    margin: 0;
}

/* --- White Label Features --- */
.white-label-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 24px 0 32px;
}

.wl-feature {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-dark);
}

/* --- Beta CTA --- */
.beta-cta {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    color: #fff;
    margin-top: 56px;
}

.beta-cta h2 {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    border: none;
    padding: 0;
    display: block;
}

.beta-cta p {
    color: rgba(255,255,255,0.85);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto 24px;
}

.beta-offer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 28px 0;
    text-align: left;
}

.beta-get, .beta-give {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 18px 20px;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
}

.beta-get strong, .beta-give strong {
    display: block;
    color: #fff;
    margin-bottom: 6px;
}

.beta-tagline {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 24px auto 28px;
}

.btn-cta {
    display: inline-block;
    background: var(--green);
    color: #fff;
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 17px;
    transition: background 0.2s, transform 0.1s;
    margin-bottom: 20px;
}

.btn-cta:hover {
    background: #059669;
    text-decoration: none;
    transform: translateY(-1px);
}

.beta-contact {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.beta-contact a {
    color: #93c5fd;
}

/* --- Footer --- */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.75);
    padding: 48px 0 24px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    font-size: 18px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 14px;
    max-width: 260px;
    line-height: 1.6;
}

.footer-contact p {
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-contact a {
    color: #93c5fd;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .survey-types-grid {
        grid-template-columns: 1fr;
    }

    .beta-offer {
        grid-template-columns: 1fr;
    }

    .stat-arrow {
        display: none;
    }

    .stat-divider {
        display: none;
    }

    .callout-box {
        padding: 24px 20px;
    }

    .callout-math {
        font-size: 17px;
    }

    .math-result {
        font-size: 18px;
    }

    .beta-cta {
        padding: 36px 24px;
    }

    .footer-inner {
        flex-direction: column;
    }

    .article-title {
        font-size: 24px;
    }
}
