/* ─────────────────────────────────────────────────────────────────────────
   blog.css - the Unvent blog (blog.unvent.app)
   SYNC COPY of the folio tokens in docs/webpage/styles.css :root
   (canon: docs/DESIGN_SYSTEM_FOLIO.md §2). If the palette changes there,
   mirror it here; blog.test.ts diffs the token block against the landing.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --bg: oklch(0.953 0.020 92);
  --bg-2: oklch(0.975 0.013 95);
  --bg-3: oklch(0.926 0.024 90);
  --ink: oklch(0.245 0.020 65);
  --ink-2: oklch(0.355 0.020 65);
  --ink-3: oklch(0.480 0.018 70);
  --ink-4: oklch(0.600 0.016 75);
  --rule: oklch(0.245 0.020 65 / 0.16);
  --rule-2: oklch(0.245 0.020 65 / 0.30);
  --accent: oklch(0.85 0.115 88);
  --accent-2: oklch(0.54 0.100 82);
  --accent-ink: oklch(0.24 0.030 85);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
.specimen {
  mix-blend-mode: multiply;
  filter: saturate(0.94) contrast(1.02);
}

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.shell-wide { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
}
.nav-inner {
  max-width: 980px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 21px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  border-radius: 7px;
  font-style: italic; font-size: 17px;
}
.brand-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  margin-left: 2px;
}
.nav-cta {
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  color: var(--bg); background: var(--ink);
  padding: 9px 18px; border-radius: 999px;
  text-decoration: none;
  transition: transform 0.12s;
}
.nav-cta:hover { transform: translateY(-1px); color: var(--bg); }
.nav-cta:active { transform: translateY(1px); }

/* ── Blog home ─────────────────────────────────────────────────────────── */
.home-hd { padding: 72px 0 40px; }
.home-hd h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.02; letter-spacing: -0.02em;
  margin: 0 0 16px; text-wrap: balance;
}
.home-hd h1 em { font-style: italic; color: var(--accent-2); padding-right: 0.04em; }
.home-hd p { color: var(--ink-2); max-width: 52ch; margin: 0; }
.home-sp { width: 110px; float: right; margin: 0 0 8px 20px; transform: rotate(6deg); }

.post-list { list-style: none; margin: 0 0 96px; padding: 0; }
.post-list li { border-top: 1px solid var(--rule); }
.post-list a {
  display: block; padding: 26px 0 24px;
  color: inherit; text-decoration: none;
}
.post-list a:hover .post-title { color: var(--accent-2); }
.post-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.post-title {
  font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.12; letter-spacing: -0.015em;
  margin: 6px 0 8px;
  transition: color 0.2s;
}
.post-teaser { color: var(--ink-2); font-size: 15px; margin: 0; max-width: 62ch; }

/* ── Article ───────────────────────────────────────────────────────────── */
.art-hd { padding: 64px 0 8px; }
.art-hd h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.04; letter-spacing: -0.02em;
  margin: 10px 0 18px; text-wrap: balance;
}
.art-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.art-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-2); }

article {
  padding-bottom: 24px;
}
article p, article li {
  font-size: 16.5px; line-height: 1.7; color: var(--ink-2);
}
article > p:first-of-type { font-size: 18px; color: var(--ink); }
article h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.12; letter-spacing: -0.015em;
  color: var(--ink);
  margin: 44px 0 12px;
}
article ul, article ol { padding-left: 24px; }
article blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent-2);
  font-family: var(--serif); font-size: 20px; line-height: 1.45;
  color: var(--ink);
}
article hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.art-sp { width: 92px; float: right; margin: 4px 0 10px 22px; transform: rotate(7deg); }

/* Share row: small round buttons, brand-colored glyphs. The svg elements
   also carry explicit width/height attributes in the HTML so the icons can
   never render at natural size if this stylesheet is stale (the ?v= query
   on the stylesheet link is the cache-buster; bump it on every css edit). */
.share {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 24px 0 4px;
}
.share-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  margin-right: 4px;
}
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-family: var(--sans); font-size: 12px;
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
}
.share-btn:hover {
  transform: translateY(-1px);
  border-color: var(--rule-2);
  box-shadow: 0 6px 14px -8px oklch(0.30 0.03 70 / 0.5);
}
.share-btn:active { transform: translateY(1px); box-shadow: none; }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; display: block; }
/* Brand colors on the glyphs; the pill stays quiet paper. */
.share-in svg   { fill: #0a66c2; }
.share-x svg    { fill: #0f1419; }
.share-fb svg   { fill: #1877f2; }
.share-wa svg   { fill: #25d366; }
.share-tg svg   { fill: #26a5e4; }
.share-mail svg { fill: var(--accent-2); }
.share-copy { width: auto; padding: 0 12px; }
.share-copy svg { fill: var(--ink-2); }
.share-copy-label { white-space: nowrap; }
/* Touch targets: the folio floor is 44px on touch widths. */
@media (max-width: 720px) {
  .share-btn { width: 44px; height: 44px; }
  .share-btn svg { width: 18px; height: 18px; }
  .share-copy { width: auto; padding: 0 16px; }
}

/* Author block */
.author {
  display: flex; gap: 14px; align-items: flex-start;
  border-top: 1px solid var(--rule);
  margin-top: 48px; padding: 22px 0 8px;
}
.author-mark {
  flex: none;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); border-radius: 9px;
  font-family: var(--serif); font-style: italic; font-size: 21px;
}
.author-body { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.author-body b { color: var(--ink); font-weight: 500; }

/* CTA box (one per article, at the end) */
.cta-box {
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  position: relative;
  padding: 26px 28px 24px;
  margin: 40px 0 24px;
  box-shadow: 0 24px 44px -30px oklch(0.30 0.03 70 / 0.45);
}
.cta-box::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid var(--rule); border-radius: 2px;
  pointer-events: none;
}
.cta-box p { margin: 0 0 14px; font-size: 15.5px; color: var(--ink-2); }
.cta-box .cta-title {
  font-family: var(--serif); font-size: 22px; color: var(--ink);
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.cta-btn {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: 999px;
  text-decoration: none;
  transition: transform 0.12s;
}
.cta-btn:hover { transform: translateY(-1px); color: var(--accent-ink); }
.cta-btn:active { transform: translateY(1px); }

/* Related posts */
.related { border-top: 1px solid var(--rule); margin-top: 8px; padding: 22px 0 0; }
.related-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 10px;
}
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related a { font-family: var(--serif); font-size: 18px; text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 72px;
  padding: 36px 24px 44px;
}
.foot-inner {
  max-width: 980px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.foot-inner a { color: var(--ink-3); text-decoration: none; }
.foot-inner a:hover { color: var(--ink); }
.foot-credit {
  flex-basis: 100%;
  font-size: 10px; letter-spacing: 0.08em; text-transform: none;
}

@media (max-width: 540px) {
  .home-sp, .art-sp { width: 72px; margin-left: 12px; }
  .home-hd { padding: 48px 0 28px; }
  .art-hd { padding: 44px 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
