/* Blog — matches OwnDP/index.html landing tokens & chrome */

:root {
    --bg-deep: #070a12;
    --bg: #0c1018;
    --bg-card: rgba(18, 22, 34, 0.72);
    --bg-card-hover: rgba(28, 32, 48, 0.85);
    --bg-elevated: rgba(255, 255, 255, 0.04);
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.18);
    --teal: #2dd4bf;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.45);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --hero-h1-size: clamp(2.5rem, 6.75vw, 4.5rem);
    --logo-header-layout-height: 3.35rem;
    --logo-header-scale: 2.1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.blog-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-deep);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body.blog-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 70% at 50% -25%, rgba(99, 102, 241, 0.28), transparent 55%),
        radial-gradient(ellipse 80% 50% at 95% 35%, rgba(45, 212, 191, 0.09), transparent 50%),
        radial-gradient(ellipse 70% 45% at 5% 85%, rgba(99, 102, 241, 0.12), transparent 50%),
        var(--bg-deep);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-main {
    padding: 6rem 0 3rem;
}

/* Reading column: centered under nav (matches hero feel on landing) */
.blog-main .full-blog-post {
    max-width: min(47.5rem, 100%);
    margin-left: auto;
    margin-right: auto;
}

/* Site chrome only — NOT article <header class="blog-header"> (that must stay in-flow) */
body.blog-page > header {
    background: rgba(7, 10, 18, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    overflow: visible;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

body.blog-page > header.is-scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    background: rgba(7, 10, 18, 0.92);
}

body.blog-page > header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.blog-page > header .logo {
    display: flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    overflow: visible;
}

body.blog-page > header .logo img {
    height: var(--logo-header-layout-height);
    width: auto;
    max-width: min(640px, 90vw);
    object-fit: contain;
    object-position: left center;
    transform: scale(var(--logo-header-scale));
    transform-origin: left center;
    filter: drop-shadow(0 2px 14px rgba(99, 102, 241, 0.28));
    will-change: transform;
}

body.blog-page > header .nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

body.blog-page > header .nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

body.blog-page > header .nav-links a:visited {
    color: var(--text-muted);
}

body.blog-page > header .nav-links a.nav-signin {
    color: var(--text-muted);
    font-weight: 500;
}

body.blog-page > header .nav-links a.nav-signin:hover {
    color: var(--text);
}

body.blog-page > header .nav-links a.cta-button,
body.blog-page > header .nav-links a.cta-button:visited {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    color: #fff !important;
    padding: 0.55rem 1.35rem;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

body.blog-page > header .nav-links a:hover:not(.cta-button):not(.nav-signin) {
    color: var(--text);
}

body.blog-page > header .nav-links a.cta-button:hover {
    background: linear-gradient(135deg, #a5b4fc, var(--accent-hover));
    color: #fff !important;
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
}

/* Blog title block */
.blog-back {
    margin-bottom: 1.25rem;
    text-align: left;
}

.blog-back a,
.blog-back a:visited {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-back a:hover {
    color: var(--text);
}

/* Article .blog-header is nested under main — only body > header gets fixed nav styles above */
.blog-header {
    position: static;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
    text-align: center;
    margin-bottom: 2.25rem;
    max-width: 100%;
}

.blog-header .accent {
    background: linear-gradient(135deg, #c4b5fd 0%, var(--accent) 45%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topic-badge,
.free-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.topic-badge {
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c4b5fd;
}

.free-badge {
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.35);
    color: #5eead4;
}

.blog-title {
    color: var(--text);
    font-size: clamp(1.65rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.blog-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Article */
.full-blog-post {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.full-blog-post p {
    margin: 1rem 0;
    line-height: 1.7;
}

.full-blog-post h2 {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

.full-blog-post h3 {
    color: var(--accent-hover);
    font-size: 1.05rem;
    margin-top: 1.35rem;
    margin-bottom: 0.45rem;
    font-weight: 600;
}

.full-blog-post h4 {
    color: var(--text);
    font-size: 0.98rem;
    margin-top: 1rem;
    font-weight: 600;
}

.full-blog-post ul,
.full-blog-post ol {
    margin: 1rem 0;
    padding-left: 1.35rem;
}

.full-blog-post li {
    margin: 0.4rem 0;
    line-height: 1.65;
}

.highlight {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: 1.35rem 0;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(8px);
}

.highlight strong {
    color: var(--text);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.82rem;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid var(--border);
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text);
}

.comparison-table td {
    color: var(--text-muted);
    background: rgba(12, 16, 24, 0.65);
}

.cta {
    background: var(--accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.28);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.cta h3 {
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cta p {
    margin-bottom: 0.75rem !important;
}

.cta-button-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    color: #fff !important;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

/* FAQ (compact) */
.blog-faq {
    margin-top: 2rem;
}

.blog-faq .faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.blog-faq .faq-item h3 {
    margin-top: 0;
    color: var(--text);
    font-size: 1rem;
}

.blog-faq .faq-item p {
    margin-bottom: 0;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.related-posts {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.related-posts h2 {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.related-posts p {
    margin: 0.5rem 0;
}

.related-posts a {
    color: var(--accent-hover);
    font-weight: 600;
    text-decoration: none;
}

.related-posts a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Footer (landing parity) */
footer {
    background: rgba(4, 6, 12, 0.95);
    color: var(--text);
    padding: 3rem 0 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--text);
}

.footer-brand:hover {
    color: var(--text);
}

.footer-brand img {
    height: 3.75rem;
    width: auto;
    max-width: min(420px, 85vw);
    object-fit: contain;
    object-position: left center;
    transform: scale(1.35);
    transform-origin: left center;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.22));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.6;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.35rem;
}

.footer-section a:hover {
    color: var(--accent-hover);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.schema-markup {
    display: none;
}

.nav-desktop-only {
    display: list-item;
}

/* Blog index (/blog/) — post cards */
.blog-listing {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.blog-listing .blog-listing-title {
    text-align: center;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.blog-listing .blog-posts {
    margin-top: 0;
}

.blog-listing .blog-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
}

.blog-listing .blog-post:last-child {
    margin-bottom: 0;
}

.blog-listing .blog-post h3 {
    margin-bottom: 1rem;
}

.blog-listing .blog-post h3 a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.blog-listing .blog-post h3 a:hover {
    color: var(--accent-hover);
}

.blog-listing .blog-post .blog-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-listing .blog-post > p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.9375rem;
}

.blog-listing .read-more {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
}

.blog-listing .read-more:hover {
    text-decoration: underline;
    color: var(--text);
}

.blog-index-lead {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 0.5rem;
}

@media (max-width: 768px) {
    :root {
        --hero-h1-size: 3rem;
        --logo-header-layout-height: 2.85rem;
        --logo-header-scale: 1.85;
    }

    .nav-desktop-only {
        display: none;
    }

    body.blog-page > header .nav-links {
        gap: 0.65rem;
    }

    .comparison-table {
        font-size: 0.72rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px;
    }

    .footer-content {
        text-align: center;
    }
}
