/*
 * Blog — index card list + long-form article typography (headings, tables,
 * blockquotes, callouts, spec lists, FAQ) layered on top of .lfs-prose.
 * Loaded only on /blog/ pages.
 */

/* Colour and type follow BRAND.md (frozen 2026-08-01): one accent, reached
   only through the brand tokens, and headings on the §2 scale. Every
   surface here sits on a light background, so --brand is correct; a dark
   section would need the light variant instead. Never a raw hex. */

/* ================================================================
   BLOG INDEX — card list
   ================================================================ */
.lfs-blog-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.lfs-blog-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 48rem) {
    .lfs-blog-card {
        grid-template-columns: 18rem 1fr;
    }
}

.lfs-blog-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: var(--shadow-lg);
}

.lfs-blog-card__media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-raised);
    overflow: hidden;
}

.lfs-blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lfs-blog-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.lfs-blog-card__meta {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
}

.lfs-blog-card__title {
    margin: 0 0 0.6rem;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 1.1875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.lfs-blog-card__title a {
    color: var(--text);
    text-decoration: none;
}

.lfs-blog-card__title a:hover {
    color: var(--brand-hover);
}

.lfs-blog-card__excerpt {
    margin: 0 0 1.1rem;
    color: var(--body);
    line-height: 1.6;
    font-size: 0.9375rem;
    flex: 1;
}

.lfs-blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.lfs-blog-card__cta::after {
    content: "\2192";
    font-weight: 700;
    transition: transform 0.2s ease;
}

.lfs-blog-card:hover .lfs-blog-card__cta::after {
    transform: translateX(3px);
}

/* ================================================================
   ARTICLE — header meta + figure
   ================================================================ */
.lfs-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    justify-content: center;
    margin: 0.9rem 0 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.lfs-article-figure {
    margin: 0 0 2rem;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.lfs-article-figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* ================================================================
   ARTICLE BODY — long-form typography
   ================================================================ */
.lfs-article-body {
    max-width: 46rem;
    margin: 0 auto;
    color: var(--text);
}

.lfs-article-body h2 {
    margin: 2.75rem 0 1.1rem;
    padding-top: 1.85rem;
    border-top: 1px solid var(--border);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: clamp(1.5rem, 2.6vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text);
}

.lfs-article-body > h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.lfs-article-body h3 {
    margin: 1.85rem 0 0.85rem;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 1.1875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text);
}

.lfs-article-body p {
    margin: 0 0 1.15rem;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--body);
}

.lfs-article-body ul,
.lfs-article-body ol {
    margin: 0 0 1.35rem;
    padding-left: 1.35rem;
    color: var(--body);
    line-height: 1.65;
}

.lfs-article-body li {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
}

.lfs-article-body ul > li::marker {
    color: var(--brand);
}

.lfs-article-body strong {
    color: var(--text);
    font-weight: 700;
}

.lfs-article-body em {
    font-style: italic;
}

.lfs-article-body a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 0.15s ease;
}

.lfs-article-body a:hover {
    color: var(--brand-hover);
}

/* ================================================================
   TABLES — always horizontally scrollable, never overflow the page
   ================================================================ */
.lfs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
}

.lfs-article-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 0.9375rem;
}

.lfs-article-table--wide {
    min-width: 54rem;
}

.lfs-article-table th,
.lfs-article-table td {
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

.lfs-article-table thead th {
    background: var(--surface-alt);
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.lfs-article-table tbody tr:nth-child(even) {
    background: var(--surface-alt);
}

.lfs-article-table tbody tr:last-child td {
    border-bottom: none;
}

.lfs-article-table td strong {
    color: var(--text);
}

/* ================================================================
   BLOCKQUOTES — merchant testimonials + quoted app-listing copy
   ================================================================ */
.lfs-article-body blockquote {
    margin: 0 0 1.35rem;
    padding: 1.1rem 1.35rem;
    border-left: 4px solid var(--brand);
    border-radius: 0 var(--r) var(--r) 0;
    background: var(--surface-alt);
    box-shadow: var(--shadow-sm);
}

.lfs-article-body blockquote p {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
    font-style: italic;
    color: var(--text);
}

.lfs-article-body blockquote p:last-of-type {
    margin-bottom: 0;
}

.lfs-article-body blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
    color: var(--muted);
}

/* ================================================================
   CALLOUTS — "watch out for" / honest-downside call-outs
   ================================================================ */
.lfs-article-body .lfs-callout--watch {
    max-width: none;
    margin: 0 0 1.35rem;
    border-left-color: var(--amber);
    background: var(--amber-soft);
}

.lfs-article-body .lfs-callout--watch p {
    color: var(--ink-light);
}

.lfs-article-body .lfs-callout--watch p:last-child {
    margin-bottom: 0;
}

.lfs-article-body .lfs-callout--watch strong {
    color: var(--ink);
}

/* ================================================================
   APP SPEC LIST — Type / Developer / Rating / Pricing / Built for Shopify
   ================================================================ */
.lfs-app-specs {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 1rem 1.25rem;
    display: grid;
    gap: 0.4rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--r);
}

.lfs-app-specs li {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--body);
}

.lfs-app-specs li strong {
    margin-right: 0.3em;
    color: var(--text);
}

.lfs-app-specs__link {
    margin-top: 0.15rem;
}

.lfs-app-specs__link a {
    font-weight: 600;
}

/* ================================================================
   FAQ
   ================================================================ */
.lfs-faq-item {
    padding-bottom: 1.35rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--border);
}

.lfs-faq-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.lfs-faq-item h3 {
    margin: 0 0 0.5rem;
}

.lfs-faq-item p {
    margin: 0;
}
