/* 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: Extra Celestial (pearl, ice, lavender, mint, steel, deep space; Syne + Manrope) ----------- */
:root{
  --blog-surface:rgba(255,255,255,.7);  /* the site's frosted card */
  --blog-ink:var(--space);
  --blog-muted:rgba(18,22,43,.7);
  --blog-title:var(--space);
  --blog-accent:var(--steel-d);
  --blog-line:rgba(122,138,168,.3);
  --blog-soft:rgba(191,211,230,.24);    /* a pale ice wash */
  --blog-head-font:var(--display);
  --blog-body-font:var(--sans);
  --blog-head-weight:500;
  --blog-radius:24px;
  --blog-img-radius:26px;
  --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) ------------------------------ */
/* A faint constellation (thin lines, pearl stars), used on the deep-space blocks */
:root{--blog-stars:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 180'%3E%3Cg fill='none' stroke='%23BFD3E6' stroke-opacity='.32' stroke-width='1'%3E%3Cpath d='M18 128 92 96l64 26 58-70 76 18 52-46'/%3E%3Cpath d='M156 122l22 44'/%3E%3C/g%3E%3Cg fill='%23EEF0F5'%3E%3Ccircle cx='18' cy='128' r='2.2' fill-opacity='.7'/%3E%3Ccircle cx='92' cy='96' r='2.6' fill-opacity='.8'/%3E%3Ccircle cx='156' cy='122' r='2' fill-opacity='.7'/%3E%3Ccircle cx='214' cy='52' r='3' fill-opacity='.85'/%3E%3Ccircle cx='290' cy='70' r='2.2' fill-opacity='.7'/%3E%3Ccircle cx='342' cy='24' r='2.6' fill-opacity='.8'/%3E%3Ccircle cx='178' cy='166' r='1.8' fill-opacity='.6'/%3E%3C/g%3E%3C/svg%3E")}

/* Home "From the blog", the /blog/ list and "More articles": a soft iridescent wash, so the home section never sits pearl on pearl or dark on dark */
.blog-home,.blog-list,.blog-related{background:linear-gradient(160deg,rgba(191,211,230,.42),rgba(201,194,227,.34) 50%,rgba(207,232,225,.36)),var(--pearl)}
.blog-home,.blog-related{text-align:center}
.blog-home h2{font-size:clamp(1.9rem,7vw,3rem);max-width:15em;margin:0 auto .5em}
.blog-home .blog-grid,.blog-related .blog-grid{margin-top:2rem}
.blog-home-all{margin:2.4rem 0 0}
.blog-list{padding:3.5rem 0 4.5rem}
.blog-related{padding:3.5rem 0 4.5rem}
.blog-related .blog-related-title{font-size:clamp(1.9rem,7vw,2.6rem);margin-bottom:0}
.blog-related .rule{margin-bottom:0}

/* /blog/ intro: a deep-space cover with a faint star field and one thin constellation */
.blog-intro{text-align:center;padding:4rem 0 3.4rem;background:var(--blog-stars) no-repeat right 4% top 22px/min(360px,70vw) auto,linear-gradient(160deg,var(--space2),var(--space))}
.blog-intro h1{font-size:clamp(2.3rem,9vw,4rem);max-width:13em;margin:0 auto .2em}
.blog-lede{max-width:32em;margin:0 auto;font-size:1.08rem;color:var(--ice);text-wrap:balance}
.blog-empty{margin-top:.4rem;font-size:1.08rem;color:var(--ice)}
.blog-empty .btn{margin-top:.6rem}
.blog-intro:last-child{padding-bottom:5.5rem}
@media (max-width:699px){.blog-intro{padding-bottom:5.4rem;background-position:right 6% bottom 12px,0 0;background-size:170px auto,auto}}

/* Cards: the site's frosted glass, Syne titles, and a thin iridescent line under each picture */
.blog-card-link{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 8px 30px rgba(18,22,43,.06)}
.blog-card-link:hover{box-shadow:0 12px 34px rgba(122,138,168,.32),0 0 0 1px rgba(191,211,230,.9)}
.blog-thumb{position:relative;background:linear-gradient(150deg,var(--steel),var(--space))}
.blog-thumb::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--irid)}
.blog-card-title{font-size:1.4rem}

/* A post */
.post{padding:2.6rem 0 3.5rem}
.post-cat{margin:0}
.post-head .rule{margin:0 0 1.6rem}
.post-hero{padding:6px;border-radius:32px;background:var(--irid);box-shadow:0 18px 44px rgba(18,22,43,.14)}
.post-hero img{background:linear-gradient(150deg,var(--steel),var(--space))}
.post-body h3{color:var(--steel-d)}
.post-body a:hover{color:var(--space)}
.post-body blockquote{border-left:0;border-radius:0 24px 24px 0;padding-left:1.5em;background:linear-gradient(180deg,var(--ice),var(--lav),var(--mint)) left/3px 100% no-repeat,rgba(255,255,255,.62);font-weight:500;color:var(--steel-d)}
.post-body hr{width:120px;height:18px;border:0;margin:2.6em auto;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath d='M6 12 40 6l40 8 34-8' fill='none' stroke='%237A8AA8' stroke-opacity='.6'/%3E%3Cg fill='%237A8AA8'%3E%3Ccircle cx='6' cy='12' r='2'/%3E%3Ccircle cx='40' cy='6' r='2.4'/%3E%3Ccircle cx='80' cy='14' r='2'/%3E%3Ccircle cx='114' cy='6' r='2.4'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}

/* The Starter Guide box: a small deep-space cover, like the guide itself */
.post-cta{color:var(--pearl);border:1px solid rgba(191,211,230,.25);background:var(--blog-stars) no-repeat right -40px top 12px/260px auto,linear-gradient(160deg,var(--space2),var(--space));box-shadow:0 18px 44px rgba(18,22,43,.2)}
.post-cta .post-cta-title{color:var(--pearl)}
.post-cta p{color:var(--ice)}
.post-cta :focus-visible{outline-color:var(--ice)}
.post-cta-book{display:block;width:min(260px,76%);height:auto;aspect-ratio:16/9;object-fit:cover;margin:0 auto 1.3rem;padding:5px;border-radius:18px;background:var(--irid);box-shadow:0 14px 34px rgba(0,0,0,.4),0 0 40px rgba(191,211,230,.18)}

/* Nav: the Blog link makes six items; keep each on one line from 900px up */
@media (min-width:900px){.nav a{white-space:nowrap}}
@media (min-width:900px) and (max-width:1060px){.nav ul{gap:1.3rem}.nav a{letter-spacing:.1em}}
.nav a[aria-current="page"]{color:var(--ice)}
