/* Gladmade Marketplace blog — shared styles.
   Mirrors the landing page's design tokens (indigo→cyan brand, dark chrome, light reading surface). */

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

:root {
    --ind: #6366f1;
    --cyan: #22d3ee;
    --accent-ink: #4f46e5;
    --grad: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    --grad-soft: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(34,211,238,0.12));
    --dark: #0a0e1a;
    --dark-2: #0c1120;
    --dark-card: #121a2e;
    --dark-border: #1e2942;
    --text: #e8ecf4;
    --text-secondary: #94a3b8;
    --ink: #0f172a;
    --muted: #475569;
    --muted-2: #64748b;
    --bg-light: #f7f8fb;
    --bg-white: #ffffff;
    --line: #e6e9f0;
    --radius: 12px;
    --radius-lg: 20px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    --max-w: 1140px;
    --article-w: 740px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink);
    line-height: 1.7;
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Top navigation (dark, matches landing) ---------- */
.nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 1.2rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; }
.nav-logo-sub { font-weight: 500; color: var(--text-secondary); font-size: 0.95rem; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--grad); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-mark svg { width: 17px; height: 17px; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-cta { background: var(--grad); color: #06121f !important; padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 0.875rem; transition: transform var(--transition), box-shadow var(--transition); }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(56, 132, 236, 0.35); }

/* ---------- Blog index hero ---------- */
.blog-hero { background: var(--dark); padding: 72px 0 56px; position: relative; overflow: hidden; }
.blog-hero::before { content: ''; position: absolute; top: -60%; right: -20%; width: 70%; height: 160%; background: radial-gradient(ellipse, rgba(99,102,241,0.14) 0%, transparent 70%); pointer-events: none; }
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero .eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: #b6c0ff; margin-bottom: 14px; }
.blog-hero h1 { font-size: 2.7rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 16px; max-width: 760px; }
.blog-hero h1 .gradient-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.blog-hero p { color: var(--text-secondary); font-size: 1.08rem; line-height: 1.7; max-width: 640px; }

/* ---------- Blog index cards ---------- */
.post-list { padding: 56px 0 80px; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card {
    display: flex; flex-direction: column; background: var(--bg-white);
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 28px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(15,23,42,0.08); border-color: rgba(99,102,241,0.3); }
.post-card.featured { grid-column: 1 / -1; }
.post-kicker { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); margin-bottom: 12px; }
.post-card h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); line-height: 1.3; margin-bottom: 10px; }
.post-card.featured h2 { font-size: 1.7rem; }
.post-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.65; margin-bottom: 18px; }
.post-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted-2); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }
.post-read { color: var(--accent-ink); font-weight: 700; font-size: 0.875rem; }

/* ---------- Article ---------- */
.article-head { background: var(--dark); padding: 56px 0 48px; position: relative; overflow: hidden; }
.article-head::before { content: ''; position: absolute; top: -60%; right: -25%; width: 75%; height: 170%; background: radial-gradient(ellipse, rgba(99,102,241,0.13) 0%, transparent 70%); pointer-events: none; }
.article-head .container { position: relative; z-index: 1; max-width: calc(var(--article-w) + 48px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 20px; }
.crumbs a { color: #b6c0ff; }
.crumbs a:hover { color: #fff; }
.crumbs .sep { opacity: 0.5; }
.article-head h1 { font-size: 2.45rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 18px; }
.article-head .standfirst { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.7; }
.article-head .byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; font-size: 0.82rem; color: var(--text-secondary); }
.article-head .byline .dot { width: 3px; height: 3px; border-radius: 50%; background: #3b4763; }
.article-head .byline strong { color: #e8ecf4; font-weight: 600; }

.article-body { padding: 52px 0 40px; }
.article-body .container { max-width: calc(var(--article-w) + 48px); }
article { background: var(--bg-white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 52px 56px; }

article > p, article li { font-size: 1.02rem; color: #1f2937; }
article > p { margin-bottom: 18px; }
article .lead { font-size: 1.12rem; color: var(--ink); }
article h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); margin: 44px 0 14px; line-height: 1.25; scroll-margin-top: 84px; }
article h3 { font-size: 1.17rem; font-weight: 700; color: var(--ink); margin: 30px 0 10px; scroll-margin-top: 84px; }
article ul, article ol { margin: 0 0 18px 22px; }
article li { margin-bottom: 9px; }
article li::marker { color: var(--accent-ink); }
article a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: rgba(79,70,229,0.35); text-underline-offset: 2px; }
article a:hover { text-decoration-color: var(--accent-ink); }
article strong { color: var(--ink); }
article code { font-family: var(--mono); font-size: 0.88em; background: #f1f3f9; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: #3730a3; }
article blockquote { border-left: 3px solid; border-image: var(--grad) 1; padding: 4px 0 4px 20px; margin: 24px 0; color: var(--muted); font-size: 1.02rem; }
article hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); }
article table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
article th, article td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
article th { background: var(--bg-light); font-weight: 700; color: var(--ink); font-size: 0.85rem; white-space: nowrap; }
article tr:last-child td { border-bottom: none; }

/* TOC */
.toc { background: var(--bg-light); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 28px 0 34px; }
.toc .toc-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); margin-bottom: 10px; }
.toc ol { margin: 0 0 0 20px; }
.toc li { margin-bottom: 6px; font-size: 0.94rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }

/* "From production" callout — real-world lesson boxes */
.callout { background: linear-gradient(180deg, rgba(99,102,241,0.06), rgba(34,211,238,0.05)); border: 1px solid rgba(99,102,241,0.18); border-radius: var(--radius); padding: 20px 24px; margin: 26px 0; }
.callout .co-label { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); margin-bottom: 8px; }
.callout .co-label .co-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.callout p { font-size: 0.96rem; color: #1f2937; margin-bottom: 10px; }
.callout p:last-child { margin-bottom: 0; }

/* Key takeaways */
.takeaways { background: var(--dark); border-radius: var(--radius-lg); padding: 30px 34px; margin: 34px 0 8px; }
.takeaways h2, .takeaways .tk-title { color: #fff; font-size: 1.15rem; font-weight: 800; margin: 0 0 14px; }
.takeaways ul { margin: 0 0 0 20px; }
.takeaways li { color: var(--text); font-size: 0.97rem; margin-bottom: 10px; }
.takeaways li::marker { color: var(--cyan); }
.takeaways strong { color: #fff; }

/* FAQ inside article */
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-white); margin-bottom: 12px; }
.faq-item[open] { border-color: rgba(99,102,241,0.3); box-shadow: 0 6px 24px rgba(15,23,42,0.05); }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 20px; font-size: 1rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex-shrink: 0; width: 18px; height: 18px; color: var(--accent-ink); transition: transform var(--transition); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.faq-item .faq-a a { color: var(--accent-ink); }

/* CTA card at article end */
.cta-card { text-align: center; padding: 44px 36px; border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(99,102,241,0.07), rgba(34,211,238,0.05)); border: 1px solid rgba(99,102,241,0.14); margin: 20px 0 8px; }
.cta-card h2, .cta-card .cta-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 10px; }
.cta-card p { font-size: 1rem; color: var(--muted); max-width: 480px; margin: 0 auto 22px; }
.btn-primary { display: inline-block; padding: 13px 26px; background: var(--grad); color: #06121f; font-weight: 700; font-size: 0.98rem; border: none; border-radius: 100px; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition); text-decoration: none !important; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(56, 132, 236, 0.35); }
.btn-ghost-light { display: inline-block; padding: 13px 24px; border: 1px solid #dfe4ee; color: var(--ink); font-weight: 600; font-size: 0.95rem; border-radius: 100px; margin-left: 10px; transition: all var(--transition); text-decoration: none !important; }
.btn-ghost-light:hover { border-color: var(--ind); color: var(--accent-ink); }

/* Related posts */
.related { padding: 8px 0 72px; }
.related .container { max-width: calc(var(--article-w) + 48px); }
.related h2 { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card { background: var(--bg-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: border-color var(--transition), box-shadow var(--transition); }
.related-card:hover { border-color: rgba(99,102,241,0.3); box-shadow: 0 8px 26px rgba(15,23,42,0.06); }
.related-card .rk { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); margin-bottom: 6px; }
.related-card h3 { font-size: 0.98rem; font-weight: 700; color: var(--ink); line-height: 1.4; }

/* ---------- Footer (matches landing) ---------- */
footer { padding: 44px 0; background: var(--dark); border-top: 1px solid rgba(255,255,255,0.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-size: 1rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 0.83rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-legal { text-align: center; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 20px; }
.footer-legal span { display: block; font-size: 0.8rem; color: var(--text-secondary); }
.footer-legal a { color: var(--text-secondary); text-decoration: underline; }

/* Skip link (a11y) */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--grad); color: #06121f; font-weight: 700; padding: 10px 16px; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .post-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    article { padding: 36px 28px; }
}
@media (max-width: 640px) {
    .nav-links { gap: 16px; }
    .nav-links .nav-hide-m { display: none; }
    .blog-hero h1 { font-size: 2rem; }
    .article-head h1 { font-size: 1.75rem; }
    article { padding: 28px 20px; border-radius: 14px; }
    article h2 { font-size: 1.32rem; }
    .container { padding: 0 16px; }
    .btn-ghost-light { margin-left: 0; margin-top: 10px; }
}
