/* ============================================================
   Complete AI — Brand Stylesheet
   Single source of truth for site-wide styling.
   Loaded by every page. Page-specific styles stay inline.
   Brand spec: Brand Colors.md  |  Last updated: 2026-05-13
   ============================================================ */

/* ===== Brand tokens ===== */
:root {
    --navy: #0A1E3F;
    --navy-deep: #061430;
    --accent: #5FB3F7;
    --accent-hover: #3D94DB;
    --accent-soft: #B8D9F5;
    --text: #1A2332;
    --text-light: #4A5568;
    --text-muted: #6B7280;
    --bg: #FFFFFF;
    --bg-alt: #F7F9FC;
    --bg-navy: #0A1E3F;
    --border: #E5E8ED;
    --success: #16A34A;
    --danger: #DC2626;
    --warn: #D97706;
    --shadow-sm: 0 1px 2px rgba(10, 30, 63, 0.06);
    --shadow-md: 0 4px 16px rgba(10, 30, 63, 0.08);
    --shadow-lg: 0 12px 40px rgba(10, 30, 63, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1140px;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 100px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
p { color: var(--text-light); margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent-hover); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }
strong, b { color: var(--text); font-weight: 600; }
em, i { font-style: italic; }

/* ===== Layout primitives ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--navy); color: white; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: white; }
.section-navy p { color: rgba(255,255,255,0.85); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { margin-bottom: 12px; }
.section-header .lede { color: var(--text-light); font-size: 1.125rem; max-width: 620px; margin: 0 auto; }
.section-navy .section-header .lede { color: rgba(255,255,255,0.85); }

/* ===== Icons (Lucide-style inline SVG) ===== */
.icon { width: 24px; height: 24px; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 40px; height: 40px; stroke-width: 1.8; }
.icon-xl { width: 56px; height: 56px; stroke-width: 1.5; }

/* ===== Navigation (shared on every page) ===== */
.site-nav {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    z-index: 100;
}
.site-nav .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.site-nav .logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-nav .logo img { height: 48px; width: auto; display: block; object-fit: contain; object-position: left center; }
.nav-links { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.nav-links a:hover { color: var(--accent-hover); }
.nav-cta {
    background: var(--navy);
    color: white !important;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.1s;
}
.nav-cta:hover { background: var(--navy-deep); transform: translateY(-1px); color: white !important; }
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.mobile-menu-toggle span {
    width: 26px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

@media (max-width: 1024px) {
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 0.9rem; }
}
@media (max-width: 900px) {
    .mobile-menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 1000;
        gap: 0;
        align-items: stretch;
    }
    .nav-links.active { transform: translateY(0); }
    .nav-links li { border-bottom: 1px solid var(--border); padding: 14px 0; }
    .nav-links li:last-child { border-bottom: none; padding-top: 14px; }
    .nav-links a { display: block; width: 100%; }
    .nav-cta { text-align: center; margin-top: 6px; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--navy);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    border: 2px solid var(--navy);
    cursor: pointer;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-alt); color: var(--navy); border-color: var(--navy); }
.btn-accent { background: var(--accent); color: var(--navy); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); color: white; border-color: var(--accent-hover); }
.btn-ghost-light { background: transparent; color: white; border-color: rgba(255,255,255,0.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }

/* ===== Cards ===== */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.25s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ===== Article body (for blog posts + legal pages) ===== */
.article-body { max-width: 720px; margin: 0 auto; padding: 0 24px; font-size: 1.05rem; }
.article-body h1 { font-size: 2.5rem; margin-bottom: 16px; }
.article-body h2 { font-size: 1.75rem; margin: 40px 0 16px; }
.article-body h3 { font-size: 1.3rem; margin: 28px 0 12px; }
.article-body p { color: var(--text); margin-bottom: 1.2em; }
.article-body ul, .article-body ol { margin: 0 0 1.2em 1.5em; color: var(--text); }
.article-body li { margin-bottom: 0.5em; }
.article-body a { color: var(--accent-hover); text-decoration: underline; }
.article-body a:hover { color: var(--navy); }
.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 8px 0 8px 20px;
    margin: 24px 0;
    color: var(--text-light);
    font-style: italic;
}
.article-body code {
    background: var(--bg-alt);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.92em;
    color: var(--navy);
}
.article-body img { border-radius: var(--radius-sm); margin: 20px 0; }
.article-meta {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 32px;
}
.article-meta .category {
    background: var(--accent-soft);
    color: var(--navy);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 10px;
}
.article-hero {
    background: var(--bg-alt);
    padding: 60px 0 40px;
    text-align: center;
}
.article-hero h1 { max-width: 800px; margin: 0 auto 16px; }
.article-hero .lede { color: var(--text-light); font-size: 1.15rem; max-width: 680px; margin: 0 auto; }

/* ===== Footer (shared on every page) ===== */
.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.75);
    padding: 56px 0 32px;
}
.site-footer .footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.site-footer .footer-brand img { height: 44px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.site-footer .footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.92rem; line-height: 1.6; }
.site-footer .footer-col h5 {
    font-family: 'Poppins', sans-serif;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.site-footer .footer-col ul { list-style: none; }
.site-footer .footer-col ul li { margin-bottom: 8px; }
.site-footer .footer-col a { color: rgba(255,255,255,0.72); font-size: 0.92rem; transition: color 0.2s; }
.site-footer .footer-col a:hover { color: var(--accent); }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
}
.site-footer .footer-bottom a { color: rgba(255,255,255,0.7); margin-left: 16px; }
.site-footer .footer-bottom a:first-child { margin-left: 0; }
@media (max-width: 900px) {
    .site-footer .footer-content { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 600px) {
    .site-footer .footer-content { grid-template-columns: 1fr; }
    .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
    .site-footer .footer-bottom a:first-child { margin-left: 0; }
}

/* ===== Page hero (for non-homepage pages) ===== */
.page-hero {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
    padding: 64px 0 56px;
    text-align: center;
}
.page-hero .eyebrow {
    color: var(--accent-hover);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.page-hero h1 { max-width: 820px; margin: 0 auto 16px; }
.page-hero .lede { color: var(--text-light); font-size: 1.15rem; max-width: 680px; margin: 0 auto; }

/* ===== Bullet list (with brand-blue checkmark) ===== */
.list-checks { list-style: none; margin: 8px 0 16px; padding-left: 0; }
.list-checks li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--text);
    font-size: 1rem;
}
.list-checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235FB3F7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

/* ===== Stat ===== */
.stat-block {
    padding: 18px 20px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}
.stat-block .stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.1;
}
.stat-block .stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* ===== Accessibility ===== */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ============================================================
   Glen review additions 2026-05-13:
   - Stronger card borders for "professional" look
   - Wordmark-style footer brand (avoids logo-PNG inversion issue)
   - Blog index card styling
   - Page overrides for openclaw / use-cases / case-study
   ============================================================ */

/* Stronger borders on all card-like elements */
.card, .service-card, .insight-card, .blog-card, .stat-block,
.feature-card, .package-card, .use-case-card, .step-card, .price-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    transition: all 0.25s;
}
.card:hover, .service-card:hover, .insight-card:hover, .blog-card:hover,
.feature-card:hover, .package-card:hover, .use-case-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Footer: use wordmark instead of image so it renders correctly on any background */
.site-footer .footer-brand .wordmark {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: white;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}
.site-footer .footer-brand .wordmark .dot {
    color: var(--accent);
}
/* Hide any leftover IMG inside footer-brand (legacy) */
.site-footer .footer-brand > img { display: none; }

/* ===== Blog index ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin: 40px 0;
}
.blog-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
}
.blog-card h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--navy);
}
.blog-card h2 a { color: var(--navy); }
.blog-card h2 a:hover { color: var(--accent-hover); }
.blog-card p { color: var(--text-light); font-size: 0.98rem; flex-grow: 1; margin-bottom: 14px; }
.blog-card .meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-card .meta .tag {
    background: var(--accent-soft);
    color: var(--navy);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.78rem;
}
.blog-card .read-more {
    color: var(--accent-hover);
    font-weight: 600;
    font-size: 0.92rem;
}

/* ===== Page-specific overrides (force brand palette over legacy inline styles) ===== */

/* openclaw, use-cases, case-study, blog: convert all purple/indigo/slate to brand */
.hero,
.features,
.packages,
.roi,
.demo,
.cta-section,
.use-cases-section,
.problem-section,
.solution-section,
.results-section,
.testimonials,
.faq {
    color: var(--text);
}

/* Old utility classes that used purple/indigo — force navy/accent */
.features h2, .packages h2, .roi h2, .demo h2, .cta-section h2,
.problem-section h2, .solution-section h2, .results-section h2,
.testimonials h2, .faq h2, .use-cases-section h2 {
    color: var(--navy);
}

/* Replace any inline-styled white-on-purple gradient sections with brand navy */
[style*="linear-gradient"][style*="#6366f1"],
[style*="linear-gradient"][style*="#8b5cf6"],
[style*="linear-gradient"][style*="#a78bfa"],
[style*="linear-gradient"][style*="#7c3aed"],
[style*="linear-gradient"][style*="#312e81"],
[style*="linear-gradient"][style*="#1e3a8a"],
[style*="linear-gradient"][style*="#1e40af"] {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
    color: white !important;
}

/* Any hard-coded slate dark backgrounds should be navy */
[style*="background: #1e293b"],
[style*="background:#1e293b"],
[style*="background: #0f172a"],
[style*="background:#0f172a"],
[style*="background: #1f2937"],
[style*="background:#1f2937"] {
    background: var(--navy) !important;
    color: white !important;
}

/* Light pastel backgrounds → brand soft alt */
[style*="background: #eff6ff"],
[style*="background:#eff6ff"],
[style*="background: #faf5ff"],
[style*="background:#faf5ff"],
[style*="background: #f0f9ff"],
[style*="background:#f0f9ff"],
[style*="background: #f8fafc"],
[style*="background:#f8fafc"] {
    background: var(--bg-alt) !important;
}

/* Old "primary" colored text → accent */
[style*="color: #6366f1"], [style*="color:#6366f1"],
[style*="color: #8b5cf6"], [style*="color:#8b5cf6"],
[style*="color: #7c3aed"], [style*="color:#7c3aed"],
[style*="color: #a78bfa"], [style*="color:#a78bfa"] {
    color: var(--accent-hover) !important;
}

/* Make sure all body text inside legacy pages is readable */
.hero p, .features p, .packages p, .roi p, .demo p,
.cta-section p, .problem-section p, .solution-section p,
.results-section p, .testimonials p, .faq p,
.use-cases-section p {
    color: var(--text-light);
}

/* Buttons inside legacy classes use brand */
.btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--navy) !important;
    color: white !important;
    padding: 14px 28px !important;
    border-radius: var(--radius-sm) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: 2px solid var(--navy) !important;
    transition: all 0.2s !important;
}
.btn-primary:hover {
    background: var(--navy-deep) !important;
    border-color: var(--navy-deep) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}


/* ============================================================
   Headings inside dark/navy backgrounds — force white
   Fixes the navy-on-navy contrast bug on use-cases, case-study, openclaw
   ============================================================ */
.use-case-header,
.use-case-header h1, .use-case-header h2, .use-case-header h3, .use-case-header h4 { color: white !important; }
.use-case-header .problem { color: rgba(255,255,255,0.92) !important; }

.hero h1, .hero h2, .hero h3 { /* respect page-specific hero overrides */ }

/* Any element with explicit dark/navy bg in inline style — child headings white */
[style*="background: var(--navy)"] h1, [style*="background: var(--navy)"] h2,
[style*="background: var(--navy)"] h3, [style*="background: var(--navy)"] h4,
[style*="background:var(--navy)"] h1, [style*="background:var(--navy)"] h2,
[style*="background:var(--navy)"] h3, [style*="background:var(--navy)"] h4,
[style*="background: linear-gradient"][style*="var(--navy)"] h1,
[style*="background: linear-gradient"][style*="var(--navy)"] h2,
[style*="background: linear-gradient"][style*="var(--navy)"] h3,
[style*="background: linear-gradient"][style*="var(--navy)"] h4 {
    color: white !important;
}
[style*="background: var(--navy)"] p, [style*="background:var(--navy)"] p { color: rgba(255,255,255,0.85) !important; }

/* Case study dark hero blocks (header/hero patterns commonly named) */
.case-hero, .case-hero h1, .case-hero h2, .case-hero h3,
.hero-dark, .hero-dark h1, .hero-dark h2, .hero-dark h3,
.dark-section, .dark-section h1, .dark-section h2, .dark-section h3 {
    color: white !important;
}

/* openclaw page headers with linear-gradient navy → text */
.cta-section h1, .cta-section h2, .cta-section h3 { color: white; }
.cta-section p { color: rgba(255,255,255,0.9); }

/* Blog index navy-bg headings — ensure white text */
.header h1, .header h2, .header h3, .header p { color: white !important; }
.header p { color: rgba(255,255,255,0.95) !important; }
.blog-card-header, .blog-card-header h1, .blog-card-header h2, .blog-card-header h3, .blog-card-header h4 { color: white !important; }
.blog-card-header .blog-meta, .blog-card-header p { color: rgba(255,255,255,0.92) !important; }
.blog-card-header a { color: white !important; }
.blog-card .blog-card-header h2 { color: white !important; }
