/* Tech Artisans theme: content templates (blog index and archives, single post, work, case study).
   Loaded after theme.css on those templates only. */

/* ---------- Shared bits ---------- */
.post-cat { display: inline-flex; align-items: center; gap: 7px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.post-cat a { color: inherit; text-decoration: none; }
.post-cat a:hover { color: var(--ta-brand-blue); text-decoration: underline; }
.post-meta { font-size: 0.9rem; color: var(--ink-2); margin: 0; font-variant-numeric: tabular-nums; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Inline placeholder chip for single facts */
.ph {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  border: 1.5px dashed var(--ta-amber); background: var(--ta-cream); color: var(--ta-amber-text);
  font-size: 0.85rem; font-weight: 500; line-height: 1.35;
}

/* Marked image placeholder */
.img-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  aspect-ratio: 2 / 1; border-radius: 16px; border: 1.5px dashed var(--ta-amber); background: var(--ta-cream);
  color: var(--ta-amber-text); padding: 20px;
}
.img-ph .bi { font-size: 1.8rem; }
.img-ph span { font-size: 0.9rem; line-height: 1.4; }
.img-ph b { display: block; color: var(--ink); font-weight: 600; }

.demo img { display: block; width: 100%; height: auto; }

/* ---------- Blog archive ---------- */
.blog-head { padding-bottom: clamp(28px, 3vw, 44px); }
.blog-head__grid { display: grid; gap: 20px 56px; align-items: end; }
.blog-head__grid > * { min-width: 0; }
@media (min-width: 992px) { .blog-head__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.blog-head__note { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 0.95rem; color: var(--ink-2); max-width: 40ch; }
.blog-head__note .bi { color: var(--ta-brand-blue); margin-top: 2px; }


/* Lead post */
.post-lead { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(40px, 5vw, 72px); }
.post-lead > * { min-width: 0; }
@media (min-width: 768px) { .post-lead { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.post-lead__img img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-soft); }
.post-lead__img:focus-visible { border-radius: 20px; }
.post-lead__new { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ta-raspberry); margin: 0 16px 10px 0; }
.post-lead h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.9rem); margin: 10px 0 16px; max-width: 18ch; }
.post-lead h2 a, .post-item__title a { color: inherit; text-decoration: none; }
.post-lead h2 a:hover, .post-item__title a:hover { color: var(--ta-brand-blue); text-decoration: underline; text-decoration-thickness: 2px; }
.post-lead__excerpt { font-size: 1.1rem; color: var(--ink-2); max-width: 52ch; }
.post-lead .post-meta { margin-bottom: 18px; }

/* Post list */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; column-gap: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line-strong); }
@media (min-width: 768px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .post-list--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 18px; align-items: start; padding-block: 22px; border-bottom: 1px solid var(--line); }
@media (min-width: 992px) { .post-item { grid-template-columns: 112px minmax(0, 1fr); gap: 22px; } }
.post-item__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.post-item__body { display: grid; gap: 6px; align-content: start; }
.post-item__title { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.015em; margin: 0; font-weight: 700; }

/* Pagination */

/* CTA band */
.cta-band { background: var(--ta-mist); }
.cta-band__grid { display: grid; gap: 28px; position: relative; z-index: 1; align-items: center; }
.cta-band__grid > * { min-width: 0; }
@media (min-width: 992px) { .cta-band__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr); } }
.cta-band .lede { max-width: 48ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 8px; }
@media (max-width: 575.98px) { .cta-band__actions .btn-ta { width: 100%; justify-content: center; white-space: normal; } }

/* Category archive variant */
.variant-wrap { padding-top: 0; }
.variant-title { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.variant-intro { max-width: 70ch; font-size: 0.975rem; }
.variant { border: 1.5px dashed var(--line-strong); border-radius: 24px; overflow: hidden; margin-top: 18px; }
.variant__inner { padding: clamp(24px, 4vw, 48px); }
.variant__h1 { font-family: var(--ta-font-headline); font-weight: 800; color: var(--ink); font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 14px; }
.variant__count { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.variant__desc { max-width: 60ch; }

/* ---------- Single post ---------- */
.post-hero { padding-block: clamp(32px, 5vw, 72px) clamp(32px, 4vw, 56px); }
.post-hero__grid { display: grid; gap: 32px; align-items: center; }
.post-hero__grid > * { min-width: 0; }
@media (min-width: 992px) { .post-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 64px; } }
.post-hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.6rem); max-width: 20ch; margin-bottom: 22px; }
.post-hero__img { display: block; width: 100%; max-width: 440px; height: auto; aspect-ratio: 1; border-radius: 20px; box-shadow: var(--shadow-soft); }
@media (max-width: 991.98px) { .post-hero__img { max-width: 300px; } }
.post-facts { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.95rem; color: var(--ink-2); }
.post-facts li { display: inline-flex; align-items: center; gap: 7px; }
.post-facts .bi { color: var(--ta-brand-blue); }
.post-dated { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-2); margin: 0; max-width: 52ch; }
.post-dated .bi { margin-top: 2px; }

.post-layout { display: grid; gap: 28px; padding-bottom: clamp(24px, 3vw, 40px); }
.post-layout > * { min-width: 0; }
@media (min-width: 992px) {
  .post-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
  .post-aside { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 4px; }
}
.toc { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.toc summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; font-weight: 600; cursor: pointer; border-radius: 16px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary .bi { transition: transform 0.25s var(--ease-out); }
.toc[open] summary .bi { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 0; padding: 0 10px 12px; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 7px 10px; border-radius: 8px; font-size: 0.925rem; line-height: 1.35;
  color: var(--ink-2); text-decoration: none; transition: background 0.2s, color 0.2s;
}
.toc a:hover { background: var(--ta-mist); color: var(--ink); }
.toc a[aria-current="true"] { background: var(--ta-mist); color: var(--ta-reverse-blue); font-weight: 600; }
@media (min-width: 992px) {
  .toc { border: 0; background: transparent; }
  .toc summary { padding: 0 10px 10px; cursor: default; pointer-events: none; font-size: 0.95rem; }
  .toc summary .bi { display: none; }
  .toc ol { padding: 0; }
}

.post-prose { max-width: 68ch; font-size: 1.15rem; line-height: 1.8; }
.post-prose > p:first-child { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.3rem); line-height: 1.65; color: var(--ink); }
.post-prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; scroll-margin-top: 100px; }
.post-prose h3 { margin-top: 1.8em; margin-bottom: 0.45em; font-size: 1.3rem; }
.post-prose h2 + h3 { margin-top: 1em; }

.share { margin-top: 18px; }
.share__label { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 42px; height: 42px; padding: 0 12px;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink);
  font: 500 0.925rem/1 var(--ta-font-body); text-decoration: none; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.share a:hover, .share button:hover { border-color: var(--ta-brand-blue); background: var(--ta-mist); color: var(--ink); }
.share button.is-copied { border-color: #3A7D38; color: #23502a; background: #e8f3e7; }
.share--aside { padding: 0 10px; margin-top: 24px; }
.share--aside a, .share--aside button { padding: 0; width: 42px; }
@media (max-width: 991.98px) { .share--aside { display: none; } }
.share--end { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line-strong); }

.author-box { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 36px; padding: clamp(22px, 3vw, 32px); border-radius: 20px; background: var(--ta-mist); max-width: 760px; }
@media (max-width: 479.98px) { .author-box { grid-template-columns: 1fr; } }
.author-box h2 { font-size: 1.35rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.author-box p { color: var(--ink-2); margin-bottom: 12px; }
.author-box__by { font-size: 0.875rem; margin-bottom: 4px !important; }
.photo-ph {
  width: 88px; height: 88px; border-radius: 50%; border: 1.5px dashed var(--ta-amber); background: var(--ta-cream); color: var(--ta-amber-text);
  display: grid; place-items: center; align-content: center; gap: 0; text-align: center;
}
.photo-ph .bi { font-size: 1.6rem; line-height: 1; }
.photo-ph span { font-size: 0.6875rem; font-weight: 600; line-height: 1.2; }

.related { border-top: 1px solid var(--line); }
.related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.related__head h2 { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }

/* ---------- Work ---------- */
.years { display: grid; gap: 24px; }
@media (min-width: 992px) { .years { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 64px; } }
.years > * { min-width: 0; }
.years__line { font-family: var(--ta-font-headline); font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); line-height: 1.25; letter-spacing: -0.025em; color: var(--ink); margin: 0; max-width: 30ch; }
.years__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.years__list li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--ta-mist); font-weight: 500; font-size: 0.95rem; }

.work-intro { max-width: 640px; margin-bottom: clamp(28px, 3vw, 44px); }
.work-intro h2 { margin-bottom: 10px; }
.work-feature { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(20px, 3.5vw, 48px); border-radius: 24px; background: var(--ta-mist); }
.work-feature > * { min-width: 0; }
@media (min-width: 992px) { .work-feature { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.work-feature h3, .work-item h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.025em; font-weight: 800; margin: 14px 0 8px; }
.work-feature .founder-note, .work-item .founder-note { margin-top: 4px; }
.work-pair { display: grid; gap: clamp(32px, 4vw, 48px); margin-top: clamp(32px, 4vw, 48px); }
.work-pair > * { min-width: 0; }
@media (min-width: 768px) { .work-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work-item .demo, .work-item .img-ph { margin-bottom: 20px; }
.work-item .demo img { aspect-ratio: 2 / 1; object-fit: cover; object-position: top; }
.work-item h3 { margin-top: 12px; }
.work-quote { max-width: 900px; margin-inline: auto; margin-top: 12px; }

.pilots { display: grid; gap: clamp(32px, 4vw, 64px); align-items: start; }
.pilots > * { min-width: 0; }
@media (min-width: 992px) { .pilots { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pilots__text .lede { max-width: 44ch; }
.pilots__text p:not(.lede) { max-width: 52ch; color: var(--ink-2); }
.pilot-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pilot-slot { background: #fff; border-radius: 20px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); }
.pilot-slot h3 { font-size: 1.25rem; margin: 14px 0 12px; color: var(--ink-2); }

.final-cta__side { display: grid; gap: 14px; justify-items: start; }
@media (max-width: 575.98px) { .final-cta__side .btn-ta { width: 100%; justify-content: center; white-space: normal; text-align: center; } }

/* ---------- Case study ---------- */
.cs-head { padding-bottom: clamp(28px, 3vw, 48px); }
.cs-head__grid { display: grid; gap: 32px 64px; align-items: start; }
.cs-head__grid > * { min-width: 0; }
@media (min-width: 992px) { .cs-head__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; } }
.cs-head h1 { max-width: 14ch; }
.cs-head__summary { max-width: 56ch; margin-top: 8px; }
.cs-facts { margin: 0; display: grid; border-top: 1px solid var(--line-strong); }
.cs-facts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
@media (max-width: 479.98px) { .cs-facts > div { grid-template-columns: 1fr; gap: 6px; } }
.cs-facts dt { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); padding-top: 3px; }
.cs-facts dd { margin: 0; font-weight: 500; }
.cs-hero { margin: 0 auto clamp(16px, 2vw, 24px); max-width: 1000px; }

.cs-block { display: grid; gap: 16px 64px; }
.cs-block > * { min-width: 0; }
@media (min-width: 992px) { .cs-block { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); } }
.cs-block h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }
.cs-block__body { max-width: 70ch; }
.owner-words { margin: 0; }
.owner-words figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--ink-2); }
.built-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.built-list li { display: grid; gap: 10px; justify-items: start; background: #fff; border-radius: 16px; padding: 18px; }
.built-list .founder-note { width: 100%; }
.metric-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 576px) { .metric-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metric-slots li { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 16px; border: 1.5px dashed var(--ta-amber); background: var(--ta-cream); }
.metric-slots__value { font-family: var(--ta-font-headline); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--ta-amber-text); }
.metric-slots__label { font-size: 0.9rem; color: var(--ta-amber-text); line-height: 1.4; }
.cs-quote { max-width: 900px; margin-inline: auto; }
.cs-shots__title { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 24px; }
.gallery-ph { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .gallery-ph { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.6fr); align-items: stretch; } }
.gallery-ph .img-ph { aspect-ratio: 16 / 10; }
.gallery-ph .img-ph--phone { aspect-ratio: auto; min-height: 220px; }
.next-cs {
  display: grid; gap: 8px; padding: clamp(24px, 3.5vw, 40px); border-radius: 24px; border: 1.5px solid var(--line-strong);
  text-decoration: none; color: var(--ink); transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.next-cs:hover { border-color: var(--ta-brand-blue); box-shadow: var(--shadow-soft); color: var(--ink); }
.next-cs__label { font-size: 0.9rem; color: var(--ink-2); font-weight: 600; }
.next-cs__title { font-family: var(--ta-font-headline); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); letter-spacing: -0.025em; line-height: 1.15; }
.next-cs:hover .link-arrow .bi { transform: translateX(4px); }

/* Footer button: a.css's `.site-footer a` colour beats `.btn-ta`, leaving slate text on blue. Restore white here. */
.site-footer .btn-ta, .site-footer .btn-ta:hover { color: #fff; text-decoration: none; }

/* ---------- Theme additions ---------- */
.blog-head__count { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 0; }
.blog-head__desc { margin-top: 14px; }
.blog-head__desc p { margin: 0; }
.author-box__photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #fff; }
/* Case study: the old write-up's points, and the screenshots */
.cs-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
@media (min-width: 768px) { .cs-points { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px; } }
.cs-points h3 { font-size: 1.1rem; margin-bottom: 6px; }
.cs-points p { color: var(--ink-2); margin: 0; }
.cs-head__summary { max-width: 60ch; }
.cs-gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
@media (min-width: 768px) { .cs-gallery { grid-template-columns: 1fr 1fr; } }
.cs-gallery img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.work-quote .quote { max-width: 860px; }
