/* 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 (edit per site) ------------------------------------------------------------------------- */
:root{
  --blog-surface:var(--card);       /* Shoji Paper, lifted */
  --blog-ink:var(--espresso);       /* type on light (canon A4.3) */
  --blog-muted:var(--muted);        /* Espresso at .74 */
  --blog-title:var(--espresso);
  --blog-accent:var(--espresso);    /* links and labels stay in Espresso: Kiln Clay is never text (canon A4.3) */
  --blog-line:var(--line);
  --blog-soft:var(--tint);          /* Shoji Paper with Wabi Ash */
  --blog-head-font:var(--display);  /* Fraunces */
  --blog-body-font:var(--body);     /* Work Sans */
  --blog-head-weight:500;
  --blog-radius:var(--radius);      /* 3px */
  --blog-img-radius:var(--radius);
  --blog-max:var(--max);
  --blog-prose:700px;
}

/* ---- 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) ------------------------------ */
/* Japandi Living. Canon: JAPANDI/_GFX/_OTHER/JAPANDI_GRAND_CANON_v2.md. Ground Shoji Paper, structure Driftwood and Wabi Ash,
   type Espresso. Kiln Clay is the one accent: a single small mark per page (the post category dot, the focus ring). Quiet, no lift. */

/* sections: the home hook sits on Shoji Paper between two tinted bands; /blog/ and "More articles" alternate */
.blog-intro{padding:calc(var(--pad)*.8) 0 calc(var(--pad)*.45);text-align:center}
.blog-intro h1{font-size:clamp(2.2rem,5vw,3.4rem);margin:0 0 .35em}
.blog-lede{max-width:34em;margin:0 auto;color:var(--muted);font-size:clamp(1.02rem,1.6vw,1.15rem)}
.blog-list{padding:0 0 var(--pad)}
.blog-related{background:var(--tint);border-top:1px solid var(--line);padding:calc(var(--pad)*.8) 0}
.blog-related .blog-related-title{font-size:clamp(1.5rem,3vw,2rem)}
.blog-home .section-head h2{margin-bottom:0}
.blog-home-all{margin:clamp(28px,4vw,44px) 0 0}

/* cards: thin rule, no shadow, no lift */
.blog-card-link{background:var(--card)}
.blog-related .blog-card-link{background:var(--shoji)}
.blog-card-link:hover{transform:none;box-shadow:none;border-color:var(--driftwood)}
.blog-card-link:hover .blog-card-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:var(--driftwood)}
.blog-thumb img{transition:opacity .3s}
.blog-card-link:hover .blog-thumb img{opacity:.92}
.blog-cat{font-weight:500;letter-spacing:.18em;color:var(--muted)}
.blog-card-title{font-size:1.35rem;letter-spacing:-.01em;line-height:1.2}
.blog-card-body{gap:.55rem;padding:1.25rem 1.3rem 1.4rem}
.blog-excerpt{color:var(--muted)}
.blog-feature .blog-card-title{letter-spacing:-.015em}
.blog-more-wrap .btn{min-width:220px}

/* a post: an editorial column with room to breathe (ma) */
.post{padding:clamp(28px,5vw,56px) 0 clamp(40px,6vw,72px)}
.post-crumbs{letter-spacing:.02em}
.post-crumbs a{text-decoration:none}
.post-crumbs a:hover{text-decoration:underline;text-decoration-color:var(--driftwood)}
.post-cat{display:inline-flex;align-items:center;gap:10px;margin:0}
.post-cat::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--kiln-clay)} /* the one Kiln Clay mark */
.post-title{font-size:clamp(2.1rem,6vw,3.3rem);letter-spacing:-.015em;line-height:1.1}
.post-dek{color:var(--muted);font-size:clamp(1.05rem,1.8vw,1.2rem)}
.post-meta{padding-bottom:1.4rem;border-bottom:1px solid var(--wabi-ash);margin-bottom:clamp(1.8rem,4vw,2.6rem)}
.post-hero{margin-bottom:clamp(2rem,5vw,3.2rem)}
.post-body{font-size:1.07rem;line-height:1.8}
.post-body h2{font-size:clamp(1.5rem,4.5vw,1.95rem);letter-spacing:-.01em;margin-top:2.4em}
.post-body h3{font-size:1.25rem}
.post-body a{color:var(--espresso);text-decoration-color:var(--driftwood);text-decoration-thickness:1px}
.post-body a:hover{text-decoration-color:var(--espresso)}
.post-body strong{font-weight:600}
.post-body ol{padding-left:1.4em}
.post-body ol>li::marker{font-family:var(--display);color:var(--driftwood)}
.post-body ul>li::marker{color:var(--driftwood)}
.post-body blockquote{background:none;border-left:1px solid var(--driftwood);border-radius:0;padding:.2em 0 .2em 1.4em;font-style:italic;font-weight:400}
.post-body figure img{width:100%}
.post-body figcaption{font-style:italic}
.post-body table{font-size:.94rem}
.post-body th{font:500 .74rem/1.3 var(--body);letter-spacing:.14em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--driftwood)}
.post-body hr{border-top-color:var(--wabi-ash);width:64px;margin:2.8em auto}

/* the Starter Guide box: guide cover beside a few lines, on the tinted ground */
.post-cta{background:var(--tint);border:0;border-top:1px solid var(--wabi-ash);border-bottom:1px solid var(--wabi-ash);border-radius:0;display:grid;gap:1.2rem;justify-items:center}
.post-cta-book{width:140px;height:auto;border-radius:var(--radius);margin:0}
.post-cta-title{font-size:1.45rem}
.post-cta p{color:var(--muted)}
.post-cta .post-cta-title,.post-cta .btn{color:var(--espresso)}
.post-cta .btn:hover{color:var(--shoji)}
@media (min-width:640px){
  .post-cta{grid-template-columns:150px 1fr;text-align:left;justify-items:start;align-items:center;column-gap:1.8rem}
  .post-cta-book{grid-column:1;grid-row:1/4;width:150px}
  .post-cta>p{grid-column:2}
}

