/* artblibs blog kit: blog.css
 * Structure only. Every colour, font and radius comes from the --blog-* variables below.
 * Per site: edit ONLY part 1 (map each variable to the site's own CSS variables) and add brand touches in part 3.
 * Part 2 is shared by all sites; leave it alone so fixes can be copied across.
 * The neutral fallbacks in part 1 are there so nothing breaks; never ship them, map every line.
 */

/* ---- 1. BRAND MAP: Afrohemian (cream, sand, terracotta, ochre, green, ink; Cormorant Garamond + Jost) ---- */
:root{
  --blog-surface:var(--cream);
  --blog-ink:var(--ink);
  --blog-muted:rgba(42,30,23,.72);
  --blog-title:var(--terra2);
  --blog-accent:var(--terra);
  --blog-line:rgba(181,82,43,.35);
  --blog-soft:var(--sand);
  --blog-head-font:var(--serif);
  --blog-body-font:var(--sans);
  --blog-head-weight:600;
  --blog-radius:22px;
  --blog-img-radius:22px;
  --blog-max:var(--max);
  --blog-prose:680px;             /* article text column */
}

/* ---- 2. STRUCTURE (shared, do not edit per site) ---------------------------------------------------------- */
[data-blog][hidden],[data-blog-nav][hidden],[data-blog-item][hidden],.blog-more-wrap[hidden]{display:none!important}

/* cards (home "From the blog", /blog/ grid, "More articles") */
.blog-grid{display:grid;grid-template-columns:1fr;gap:24px;margin:0;padding:0}
.blog-card,.blog-feature{margin:0;min-width:0}
.blog-card-link{display:flex;flex-direction:column;height:100%;color:inherit;text-decoration:none;background:var(--blog-surface);border:1px solid var(--blog-line);border-radius:var(--blog-radius);overflow:hidden;transition:transform .25s,box-shadow .25s}
.blog-card-link:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(0,0,0,.08)}
.blog-card-link:focus-visible{outline:3px solid var(--blog-accent);outline-offset:3px}
.blog-thumb{display:block;aspect-ratio:16/9;overflow:hidden;background:var(--blog-soft)}
.blog-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.blog-card-body{display:flex;flex-direction:column;gap:.45rem;padding:1.15rem 1.2rem 1.3rem;flex:1;text-align:left}
.blog-cat{font:600 .72rem/1.3 var(--blog-body-font);letter-spacing:.16em;text-transform:uppercase;color:var(--blog-accent)}
.blog-card-title{font-family:var(--blog-head-font);font-weight:var(--blog-head-weight);font-size:1.45rem;line-height:1.15;color:var(--blog-title);margin:0;overflow-wrap:break-word}
.blog-excerpt{display:block;color:var(--blog-ink);font:400 .97rem/1.55 var(--blog-body-font)}
.blog-meta{display:block;margin-top:auto;padding-top:.35rem;color:var(--blog-muted);font:400 .85rem/1.4 var(--blog-body-font)}
.no-img .blog-card-body{padding-top:1.5rem}

/* /blog/: newest post large */
.blog-index{display:grid;gap:32px}
.blog-feature .blog-card-title{font-size:clamp(1.8rem,6vw,2.6rem)}
.blog-feature .blog-excerpt{font-size:1.05rem}
.blog-more-wrap{text-align:center;margin:8px 0 0}
.blog-empty{max-width:34em;margin:0 auto;text-align:center}

/* a post */
.post{padding:2rem 0 3rem}
.post-head,.post-body,.post-cta{max-width:var(--blog-prose);margin-left:auto;margin-right:auto}
.post-crumbs{list-style:none;display:flex;flex-wrap:wrap;gap:.2rem .5rem;margin:0 0 1.2rem;padding:0;font:400 .85rem/1.4 var(--blog-body-font);color:var(--blog-muted)}
.post-crumbs li+li::before{content:"/";margin-right:.5rem;opacity:.6}
.post-crumbs a{color:inherit}
.post-title{font-family:var(--blog-head-font);font-weight:var(--blog-head-weight);font-size:clamp(2.2rem,8vw,3.6rem);line-height:1.08;color:var(--blog-title);margin:.4rem 0 .8rem;overflow-wrap:break-word}
.post-dek{font-size:1.15rem;line-height:1.55;margin:0 0 1rem}
.post-meta{display:flex;flex-wrap:wrap;gap:.2rem 0;color:var(--blog-muted);font:400 .9rem/1.5 var(--blog-body-font);margin:0 0 1.6rem}
.post-meta>span:empty{display:none}
.post-meta>span:not(:empty)~span:not(:empty)::before{content:"\00B7";margin:0 .55rem}
.post-hero{max-width:var(--blog-max);margin:0 auto 2.2rem}
.post-hero img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:var(--blog-img-radius);background:var(--blog-soft)}
.post-hero figcaption,.post-body figcaption{font-size:.85rem;color:var(--blog-muted);margin-top:.5rem;text-align:center}
.post-body{font-size:1.06rem;line-height:1.75;color:var(--blog-ink);overflow-wrap:break-word}
.post-body>*{margin-top:0;margin-bottom:1.15em}
.post-body h2{font-family:var(--blog-head-font);font-weight:var(--blog-head-weight);font-size:clamp(1.6rem,5.5vw,2.1rem);line-height:1.15;color:var(--blog-title);margin:2.2em 0 .6em}
.post-body h3{font-family:var(--blog-head-font);font-weight:var(--blog-head-weight);font-size:1.35rem;line-height:1.2;color:var(--blog-title);margin:1.8em 0 .5em}
.post-body a{color:var(--blog-accent);text-underline-offset:.18em}
.post-body ul,.post-body ol{padding-left:1.3em}
.post-body li{margin:.35em 0}
.post-body img{display:block;max-width:100%;height:auto;border-radius:var(--blog-img-radius)}
.post-body figure{margin:2em 0}
.post-body blockquote{margin:1.8em 0;padding:1.1em 1.3em;background:var(--blog-soft);border-left:3px solid var(--blog-accent);border-radius:0 var(--blog-radius) var(--blog-radius) 0;font-family:var(--blog-head-font);font-size:1.3rem;line-height:1.45}
.post-body blockquote p:last-child{margin-bottom:0}
.post-body table{width:100%;border-collapse:collapse;font-size:.95rem;display:block;overflow-x:auto}
.post-body th,.post-body td{padding:.55em .7em;border-bottom:1px solid var(--blog-line);text-align:left;vertical-align:top}
.post-body hr{border:0;border-top:1px solid var(--blog-line);margin:2.4em 0}
.post-cta{margin-top:2.6rem;margin-bottom:0;padding:1.5rem 1.4rem;background:var(--blog-soft);border:1px solid var(--blog-line);border-radius:var(--blog-radius);text-align:center}
.post-cta-title{font-family:var(--blog-head-font);font-weight:var(--blog-head-weight);font-size:1.5rem;line-height:1.2;color:var(--blog-title);margin:0 0 .4rem}
.post-cta p{margin:0 0 1rem}
.post-cta p:last-child{margin-bottom:0}
.blog-related{padding:3rem 0}
.blog-related .blog-related-title{font-family:var(--blog-head-font);font-weight:var(--blog-head-weight);color:var(--blog-title);text-align:center;margin:0 0 1.6rem}

@media (min-width:640px){
  .blog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .post-cta{padding:2rem 2.2rem}
}
/* two columns: a last card on its own row spans the width, picture beside the text */
@media (min-width:640px) and (max-width:959px){
  .blog-grid>.blog-card:last-child:nth-child(odd){grid-column:1/-1}
  .blog-grid>.blog-card:last-child:nth-child(odd) .blog-card-link{flex-direction:row}
  .blog-grid>.blog-card:last-child:nth-child(odd) .blog-thumb{flex:1;aspect-ratio:auto;min-height:220px}
  .blog-grid>.blog-card:last-child:nth-child(odd) .blog-card-body{flex:1;justify-content:center}
}
@media (min-width:960px){
  .blog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .blog-feature .blog-card-link{flex-direction:row;align-items:stretch}
  .blog-feature .blog-thumb{flex:1.35;aspect-ratio:auto;min-height:360px}
  .blog-feature .blog-card-body{flex:1;justify-content:center;padding:2rem 2.2rem}
  .blog-feature .blog-meta{margin-top:.6rem}
}
@media (prefers-reduced-motion:reduce){
  .blog-card-link{transition:none}
  .blog-card-link:hover{transform:none}
}

/* ---- 3. BRAND LAYER (per site: motifs, section backgrounds, special touches) ------------------------------ */
/* Sand sections with cream cards, like the Philosophy section on the home page */
.blog-home,.blog-list,.blog-related{background:var(--sand)}
.blog-home{text-align:center}
.blog-home h2{font-size:clamp(2rem,7vw,2.8rem);color:var(--terra2);max-width:16em;margin:0 auto .3em}
.blog-home .blog-grid,.blog-related .blog-grid{margin-top:2rem}
.blog-home-all{margin:2.4rem 0 0}
.blog-intro{text-align:center;padding:3.5rem 0 2.8rem}
.blog-intro h1{font-size:clamp(2.4rem,9vw,4rem);color:var(--terra2);max-width:13em;margin:0 auto .2em}
.blog-lede{max-width:32em;margin:0 auto;font-size:1.08rem;text-wrap:balance}
.blog-empty{margin-top:.4rem;font-size:1.08rem}
.blog-empty .btn{margin-top:.6rem}
.blog-list{padding:3rem 0 4.5rem}
.blog-related{padding:3.5rem 0 4.5rem}
.blog-related .blog-related-title{font-size:clamp(2rem,7vw,2.8rem);margin-bottom:0}
.blog-related .rule{margin-bottom:0}

/* Cards: Jost labels in green, Cormorant titles in terracotta, and the hero's mud-cloth strip along the foot of each picture */
.blog-cat{color:var(--green)}
.blog-card-link:hover{box-shadow:0 14px 30px rgba(42,30,23,.14)}
.blog-card-link:hover .blog-card-title{color:var(--terra)}
.blog-thumb{position:relative;background:linear-gradient(150deg,var(--terra),var(--ink))}
.blog-thumb::after{content:"";position:absolute;left:0;right:0;bottom:0;height:14px;background:var(--mud-t) repeat-x left center;background-color:rgba(246,238,226,.92)}
.blog-card-title{font-size:1.6rem}
.blog-feature .blog-card-link{border-radius:999px 999px 22px 22px / 140px 140px 22px 22px}
@media (min-width:960px){
  .blog-feature .blog-card-link{border-radius:22px}
  .blog-feature .blog-thumb{border-radius:0}
}

/* A post */
.post{padding:2.4rem 0 3.5rem}
.post-cat{margin:0}
.post-title{color:var(--terra2)}
.post-head .rule{margin:0 0 1.4rem}
.post-hero img{border-radius:50% 50% 22px 22px / 26% 26% 22px 22px;background:linear-gradient(150deg,var(--terra),var(--ink))}
.post-body h2{color:var(--terra2)}
.post-body h3{color:var(--green)}
.post-body blockquote{font-style:italic;font-weight:500;color:var(--terra2);border-left-color:var(--ochre)}
.post-body hr{width:150px;height:14px;border:0;margin:2.4em auto;background:var(--mud-t) repeat-x center}
.post-body a:hover{color:var(--terra2)}
.post-cta{border-radius:50% 50% 22px 22px / 64px 64px 22px 22px;padding-top:2.6rem}
.post-cta-book{display:block;width:min(240px,70%);height:auto;aspect-ratio:16/10;object-fit:cover;margin:0 auto 1.2rem;border-radius:50% 50% 12px 12px / 38% 38% 12px 12px;border:4px solid var(--cream);box-shadow:0 10px 24px rgba(42,30,23,.25);transform:rotate(-1.5deg)}

/* Nav: the Blog link makes seven items; keep each on one line between 900px and 1180px */
@media (min-width:900px){.nav a{white-space:nowrap}}
@media (min-width:900px) and (max-width:1180px){.nav ul{gap:1.05rem}.nav a{letter-spacing:.08em;font-size:.76rem}.logo{font-size:1.3rem;letter-spacing:.14em}}
.nav a[aria-current="page"]{color:var(--terra)}
.blog-intro:last-child{padding-bottom:5rem}
