/* Blog-only styles. Builds on /styles.css and /products/products.css tokens.
   Pure white surfaces, Anek type, saffron accent. Nothing here restyles shared components. */

/* ---- Reading progress (CSS scroll-driven; hidden where unsupported) ---- */
.bl-progress {
    display: none;
}
@supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
        .bl-progress {
            display: block;
            position: fixed;
            inset: 0 0 auto 0;
            height: 3px;
            z-index: 60;
            background: var(--pp-accent-fill);
            transform-origin: 0 50%;
            transform: scaleX(0);
            animation: bl-grow linear both;
            animation-timeline: scroll(root block);
            pointer-events: none;
        }
    }
}
@keyframes bl-grow {
    to { transform: scaleX(1); }
}

/* ---- Article frame ------------------------------------------------------ */
.bl-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px 20px 40px;
    position: relative;
    z-index: 2;
}
.bl-head { margin-bottom: 28px; }
.bl-article h1.pp-h1 {
    font-size: clamp(2.2rem, 5.4vw, 3.5rem);
    line-height: 1.02;
    margin: 0 0 16px;
}
.bl-meta {
    margin: 0;
    font-size: 0.95rem;
    color: var(--pp-text-muted);
    font-weight: 500;
}
.bl-meta span + span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--pp-rule);
    margin: 0 10px 2px;
}

/* Answer-first box (featured snippet / AI answer target) */
.bl-answer {
    background: var(--pp-bg-card);
    border: 1px solid var(--pp-rule-soft);
    border-left: 4px solid var(--pp-accent-fill);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow-2);
    padding: 22px 24px;
    margin: 0 0 28px;
}
.bl-answer-label {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pp-gold);
}
.bl-answer p:last-child {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--pp-text);
    max-width: 65ch;
}

/* Illustration plate */
.bl-figure {
    margin: 0 0 28px;
    background: var(--pp-bg-card);
    border: 1px solid var(--pp-rule-soft);
    border-radius: var(--pp-radius-lg);
    box-shadow: var(--pp-shadow-3);
    overflow: hidden;
}
.bl-figure svg { display: block; width: 100%; height: auto; }
.bl-strips {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: clamp(180px, 34vw, 280px);
}
.bl-strips img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bl-figure figcaption {
    padding: 12px 18px;
    font-size: 0.9rem;
    color: var(--pp-text-muted);
    border-top: 1px solid var(--pp-rule-soft);
}

/* Jump links */
.bl-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}
.bl-toc a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--pp-rule);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--pp-text);
    text-decoration: none;
    transition: border-color var(--dur-hover) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.bl-toc a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
    .bl-toc a:hover { border-color: var(--pp-gold); color: var(--pp-gold); }
}

/* ---- Body typography ---------------------------------------------------- */
.bl-body section { margin: 0 0 40px; scroll-margin-top: 90px; }
.bl-body h2 {
    font-family: var(--pp-font-display);
    font-weight: 700;
    font-stretch: var(--pp-stretch-display);
    font-size: clamp(1.55rem, 3.2vw, 2.1rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--pp-text);
    margin: 0 0 14px;
    text-wrap: balance;
}
.bl-body h3 {
    font-family: var(--pp-font-display);
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.3;
    margin: 0 0 6px;
    color: var(--pp-text);
}
.bl-body p,
.bl-body li {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--pp-text);
    max-width: 68ch;
}
.bl-body p { margin: 0 0 16px; }
.bl-body ul,
.bl-body ol { margin: 0 0 16px; padding-left: 1.3em; }
.bl-body li { margin: 0 0 8px; }
.bl-body li::marker { color: var(--pp-gold); font-weight: 600; }
.bl-body a:not(.pp-btn) {
    color: var(--pp-gold);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
    .bl-body a:not(.pp-btn):hover { color: var(--pp-gold-soft); }
}
.bl-body strong { font-weight: 600; }
.bl-note {
    font-size: 0.95rem !important;
    color: var(--pp-text-muted) !important;
}

/* Tables scroll inside their own wrapper, never the page */
.bl-table-wrap {
    overflow-x: auto;
    margin: 6px 0 20px;
    -webkit-overflow-scrolling: touch;
}
.bl-table-wrap .pp-matrix { margin-top: 0; min-width: 540px; }
.bl-table-wrap .pp-matrix td,
.bl-table-wrap .pp-matrix th { font-size: 0.95rem; line-height: 1.5; }
.bl-table-wrap .pp-matrix th { font-family: var(--pp-font-display); }
.bl-table-wrap .pp-matrix td:first-child { white-space: nowrap; }

/* ---- FAQ (always visible) ------------------------------------------------ */
.bl-faq { border-top: 1px solid var(--pp-rule-soft); }
.bl-faq-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--pp-rule-soft);
}
.bl-faq-item h3 { font-size: 1.2rem; }
.bl-faq-item p { margin: 0; }

/* ---- Product link pills -------------------------------------------------- */
.bl-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 8px;
}
.bl-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--pp-rule);
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--pp-text);
    text-decoration: none;
    background: var(--pp-bg);
    transition: border-color var(--dur-hover) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.bl-links a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
    .bl-links a:hover { border-color: var(--pp-gold); color: var(--pp-gold); }
}

/* ---- CTA ---------------------------------------------------------------- */
.bl-cta {
    margin: 44px 0 0;
    padding: 32px 28px;
    border: 1px solid var(--pp-rule-soft);
    border-radius: var(--pp-radius-lg);
    box-shadow: var(--pp-shadow-3);
    background: var(--pp-bg-card);
}
.bl-cta h2 {
    font-family: var(--pp-font-display);
    font-weight: 700;
    font-stretch: var(--pp-stretch-display);
    font-size: clamp(1.6rem, 3.4vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin: 0 0 10px;
}
.bl-cta p { margin: 0 0 20px; max-width: 52ch; color: var(--pp-text-muted); font-size: 1.05rem; line-height: 1.6; }
.bl-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- More guides + hub cards -------------------------------------------- */
.bl-more { max-width: 1120px; margin: 0 auto; padding: 24px 20px 72px; position: relative; z-index: 2; }
.bl-more h2 {
    font-family: var(--pp-font-display);
    font-weight: 700;
    font-stretch: var(--pp-stretch-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.015em;
    margin: 0 0 18px;
}
.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    perspective: 1200px;
}
.bl-grid--hub { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 900px) { .bl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bl-grid, .bl-grid--hub { grid-template-columns: 1fr; } }

.bl-card {
    display: flex;
    flex-direction: column;
    background: var(--pp-bg-card);
    border: 1px solid var(--pp-rule-soft);
    border-radius: var(--pp-radius-lg);
    box-shadow: var(--pp-shadow-2);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow var(--dur-move) var(--ease-out), border-color var(--dur-hover) var(--ease-out);
}
.bl-card:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
    .bl-card:hover { box-shadow: var(--pp-shadow-4); border-color: var(--pp-rule); }
}
.bl-card-art {
    aspect-ratio: 16 / 10;
    background: var(--pp-bg-sunk);
    overflow: hidden;
}
.bl-card-art svg { display: block; width: 100%; height: 100%; }
.bl-card-art .bl-strips { height: 100%; }
.bl-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bl-card-tag { font-size: 0.9rem; font-weight: 600; color: var(--pp-gold); }
.bl-card-title {
    font-family: var(--pp-font-display);
    font-weight: 700;
    font-stretch: var(--pp-stretch-display);
    font-size: 1.45rem;
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--pp-text);
}
.bl-card-text { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--pp-text-muted); }
.bl-card-go { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 0.96rem; color: var(--pp-text); }

/* ---- Hub hero ----------------------------------------------------------- */
.bl-hub { max-width: 1120px; margin: 0 auto; padding: 44px 20px 72px; position: relative; z-index: 2; }
.bl-hub h1.pp-h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: 16px; }
.bl-hub .pp-lede { display: block; margin-bottom: 36px; }

@media (max-width: 700px) {
    .bl-article { padding-top: 24px; }
    .bl-answer { padding: 18px 18px; }
    .bl-cta { padding: 24px 20px; }
}

/* Scroll reveal is handled by script.js (.fade-in); keep static for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bl-card, .bl-toc a, .bl-links a { transition: none; }
}
