/* ============================================================
   International Printing Group — Blog
   Loaded after styles.css; uses its tokens (:root variables).
   Used by the homepage "From the Blog" section and /blog/ pages.
   ============================================================ */

/* ---------- Accent per service category ---------- */
.acc-orange { --accent: var(--ipg-orange); --accent-shade: var(--shade-orange); --accent-tint: var(--tint-orange); }
.acc-teal   { --accent: var(--ipg-teal);   --accent-shade: var(--shade-teal);   --accent-tint: var(--tint-teal); }
.acc-purple { --accent: var(--ipg-purple); --accent-shade: var(--shade-purple); --accent-tint: var(--tint-purple); }
.acc-green  { --accent: var(--ipg-green);  --accent-shade: var(--shade-green);  --accent-tint: var(--tint-green); }
.acc-dark   { --accent: var(--gray-900);   --accent-shade: #000;                --accent-tint: var(--gray-100); }

/* ---------- Small shared pieces ---------- */
.chip {
  display: inline-block; align-self: flex-start;
  font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent-shade); background: var(--accent-tint);
  padding: 5px 11px; border-radius: 999px;
}
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
}
.avatar.sm { width: 26px; height: 26px; font-size: .58rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.15rem; }

.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 52px;
}
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Post cards (homepage, listing, related) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: .25s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card .thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gray-100); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .bar { height: 6px; background: var(--accent); }
.post-card .body { padding: 22px 24px 22px; flex: 1; display: flex; flex-direction: column; }
.post-card h3 {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); font-size: 1.06rem; line-height: 1.28;
  margin: 14px 0 10px;
}
.post-card h3 a { text-decoration: none; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.post-card:hover h3 a { color: var(--accent-shade); }
.post-card p { font-size: .93rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; }
.card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-subtle);
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
}
.card-meta .sep { color: var(--gray-300); }

/* ---------- Blog listing page ---------- */
.blog-hero { background: var(--gray-900); position: relative; overflow: hidden; }
.blog-hero .globe { position: absolute; right: -70px; top: -70px; width: 340px; opacity: .08; }
.blog-hero-inner { position: relative; z-index: 1; padding: 84px 0 72px; }
.blog-hero .eyebrow { color: var(--ipg-teal); }
.blog-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); color: #fff; margin-bottom: 18px; }
.blog-hero h1 em { font-style: normal; color: var(--ipg-orange); }
.blog-hero .dek { color: var(--gray-400); max-width: 58ch; }

.post-featured {
  position: relative;
  display: grid; grid-template-columns: 7fr 5fr;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}
.post-featured .thumb { display: block; position: relative; min-height: 400px; background: var(--gray-100); }
.post-featured .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-featured .body {
  padding: 44px 44px 40px; display: flex; flex-direction: column; justify-content: center;
  border-left: 6px solid var(--accent);
}
.post-featured h2 { font-size: clamp(1.4rem, 2.3vw, 1.85rem); line-height: 1.2; margin: 16px 0 14px; }
.post-featured h2 a { text-decoration: none; }
.post-featured h2 a:hover { color: var(--accent-shade); }
.post-featured p { color: var(--text-muted); line-height: var(--lh-relaxed); margin-bottom: 22px; }
.post-featured .card-meta { margin-top: 0; }
.post-featured .btn { align-self: flex-start; margin-top: 26px; }

.related { background: var(--gray-050); }

/* ---------- Post: shared ---------- */
.crumbs {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 22px;
}
.crumbs a { text-decoration: none; color: var(--accent-shade); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--gray-300); }
.dek { font-size: 1.16rem; line-height: 1.6; color: var(--text-secondary); max-width: 60ch; }

.post-meta { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.post-meta .who { display: flex; flex-direction: column; line-height: 1.35; }
.post-meta .by { font-size: .95rem; color: var(--text-secondary); }
.post-meta .by strong { color: var(--text-primary); }
.post-meta .when { font-size: .82rem; color: var(--text-muted); }

.post-narrow { max-width: 740px; padding: 64px 0 88px; }
.post-wide   { max-width: 920px; padding: 56px 0 88px; }

.post-figure img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

/* ---------- Article text ---------- */
.prose { font-size: 1.1rem; line-height: 1.75; color: var(--text-secondary); }
.prose > * + * { margin-top: 1.2em; }
.prose h2 {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); line-height: 1.2;
  font-size: 1.5rem; color: var(--text-primary);
  margin-top: 2.1em; scroll-margin-top: 96px;
}
.prose h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; color: var(--text-primary); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { color: var(--text-primary); }
.prose a { color: var(--accent-shade); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose img { border-radius: var(--radius-lg); }
.prose blockquote {
  border-left: 5px solid var(--accent);
  padding: 4px 0 4px 26px; margin-block: 1.8em;
  font-size: 1.36rem; font-weight: 600; line-height: 1.45; color: var(--text-primary);
}
.prose .note {
  background: var(--accent-tint); border-left: 5px solid var(--accent);
  border-radius: var(--radius-md); padding: 18px 22px; font-size: 1rem;
}

.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  margin-top: 60px; padding: 28px 30px;
  background: var(--gray-050); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.author-box .label {
  display: block; font-size: .66rem; font-weight: 700; letter-spacing: .17em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
}
.author-box strong { display: block; font-size: 1.15rem; }
.author-box .role { display: block; font-size: .88rem; font-weight: 600; color: var(--accent-shade); }
.author-box p { font-size: .95rem; color: var(--text-muted); line-height: 1.6; margin-top: 8px; }

/* ---------- Template 1: Feature ---------- */
.pf-hero {
  position: relative; background: var(--gray-900); overflow: hidden;
  min-height: clamp(460px, 68vh, 660px);
  display: flex; align-items: flex-end;
}
.pf-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,24,27,.30) 0%, rgba(20,24,27,.62) 48%, rgba(20,24,27,.95) 100%);
}
.pf-hero .edge { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; display: flex; flex-direction: column; z-index: 2; }
.pf-hero .edge span { flex: 1; }
.pf-hero .edge span:nth-child(1) { background: var(--ipg-teal); }
.pf-hero .edge span:nth-child(2) { background: var(--ipg-orange); }
.pf-hero .edge span:nth-child(3) { background: var(--ipg-green); }
.pf-hero .edge span:nth-child(4) { background: var(--ipg-purple); }
.pf-hero-inner { position: relative; z-index: 2; padding: 140px 0 56px; }
.pf-hero .crumbs { color: var(--gray-300); }
.pf-hero .crumbs a { color: #fff; }
.pf-hero .crumbs span { color: var(--gray-500); }
.pf-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); color: #fff; max-width: 24ch; margin-bottom: 18px; }
.pf-hero .dek { color: var(--gray-200); }
.pf-hero .post-meta .by { color: var(--gray-300); }
.pf-hero .post-meta .by strong { color: #fff; }
.pf-hero .post-meta .when { color: var(--gray-400); }
.cat-dark .pf-hero .avatar { background: var(--ipg-orange); }
.prose-feature > p:first-child { font-size: 1.28rem; line-height: 1.65; color: var(--text-primary); }

/* ---------- Template 2: Guide ---------- */
.pg-head { background: var(--accent-tint); border-bottom: 6px solid var(--accent); padding: 60px 0 54px; }
.pg-head h1 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22ch; margin-bottom: 16px; }
.pg-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px;
  padding: 56px 0 88px; align-items: start;
}
.pg-main { grid-column: 1; grid-row: 1; min-width: 0; }
.pg-side { grid-column: 2; grid-row: 1; position: sticky; top: 98px; }
.pg-main .post-figure { margin-bottom: 40px; }
.pg-side h2 {
  font-size: .7rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.takeaways {
  background: var(--white); border: 1px solid var(--border-subtle);
  border-top: 6px solid var(--accent); border-radius: var(--radius-lg);
  padding: 22px 24px 24px; box-shadow: var(--shadow-sm);
}
.takeaways ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.takeaways li { display: flex; gap: 10px; font-size: .95rem; font-weight: 600; line-height: 1.45; color: var(--text-secondary); }
.takeaways li::before { content: '✓'; flex: none; color: var(--accent); font-weight: 900; }
.toc { margin-top: 18px; padding: 22px 24px; background: var(--gray-050); border-radius: var(--radius-lg); }
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 9px; }
.toc li { counter-increment: toc; display: flex; gap: 10px; font-size: .92rem; line-height: 1.4; }
.toc li::before { content: counter(toc); flex: none; width: 1.1em; font-weight: 700; color: var(--accent); }
.toc a { text-decoration: none; color: var(--text-secondary); }
.toc a:hover { color: var(--accent-shade); text-decoration: underline; }
.pg-side .btn { width: 100%; margin-top: 18px; }

.prose-steps { counter-reset: step; }
.prose-steps h2:not(.plain) {
  counter-increment: step;
  display: flex; align-items: center; gap: 16px;
  font-size: 1.32rem;
  padding-top: 1.5em; border-top: 1px solid var(--border-subtle);
}
.prose-steps h2:not(.plain)::before {
  content: counter(step);
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0;
}
.prose-steps h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* ---------- Template 3: Comparison ---------- */
.pc-head { padding: 64px 0 72px; border-bottom: 1px solid var(--border-subtle); overflow: hidden; }
.pc-head-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.pc-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); margin-bottom: 16px; }
.pc-figure { position: relative; margin-right: 18px; }
.pc-figure::before {
  content: ''; position: absolute; inset: 18px -18px -18px 18px;
  background: var(--accent); border-radius: var(--radius-lg);
}
.pc-figure img {
  position: relative; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.verdict {
  background: var(--gray-900); color: #fff;
  border-left: 8px solid var(--accent); border-radius: var(--radius-lg);
  padding: 28px 34px; margin-bottom: 44px;
}
.cat-dark .verdict { border-left-color: var(--ipg-orange); }
.verdict .label {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .17em;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px;
}
.verdict p { font-size: 1.22rem; font-weight: 600; line-height: 1.5; }

.prose-compare > p, .prose-compare > ul, .prose-compare > ol, .prose-compare > h3 { max-width: 740px; }
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 1.8em; }
.vs-card {
  background: var(--white); border: 1px solid var(--border-subtle);
  border-top: 6px solid var(--accent); border-radius: var(--radius-lg);
  padding: 26px 28px 28px; box-shadow: var(--shadow-sm);
}
.vs-card.alt { border-top-color: var(--gray-900); }
.vs-card .tag {
  font-size: .66rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
  color: var(--text-muted);
}
.vs-card h3 {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); font-size: 1.3rem; margin-top: 6px;
}
.vs-card ul { list-style: none; padding-left: 0; margin-top: 16px; font-size: 1rem; }
.vs-card li { display: flex; gap: 10px; line-height: 1.5; }
.vs-card li::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: .6em; background: var(--accent); }
.vs-card.alt li::before { background: var(--gray-900); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); margin-block: 1.8em; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .98rem; line-height: 1.5; }
.prose th {
  background: var(--gray-900); color: #fff; text-align: left;
  font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  padding: 15px 18px;
}
.prose td { padding: 14px 18px; border-top: 1px solid var(--border-subtle); vertical-align: top; }
.prose td:first-child { font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: var(--gray-050); }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .thumb { min-height: 0; aspect-ratio: 16 / 9; }
  .post-featured .body { border-left: none; border-top: 6px solid var(--accent); padding: 32px 28px; }
  .pg-layout { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  .pg-main, .pg-side { grid-column: 1; grid-row: auto; }
  .pg-side { position: static; }
  .pg-side .btn { display: none; }
  .pc-head { padding: 48px 0 60px; }
  .pc-head-grid { grid-template-columns: 1fr; gap: 40px; }
  .pf-hero-inner { padding-top: 110px; }
}
@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
  .section-head-row { margin-bottom: 36px; }
  .prose { font-size: 1.04rem; }
  .prose h2 { font-size: 1.28rem; }
  .prose blockquote { font-size: 1.18rem; padding-left: 18px; }
  .prose-steps h2:not(.plain) { font-size: 1.14rem; gap: 12px; }
  .prose-steps h2:not(.plain)::before { width: 38px; height: 38px; font-size: 1rem; }
  .vs-grid { grid-template-columns: 1fr; }
  .verdict { padding: 22px 22px; }
  .verdict p { font-size: 1.08rem; }
  .author-box { flex-direction: column; gap: 14px; padding: 24px 22px; }
  .post-narrow, .post-wide { padding: 44px 0 64px; }
  .blog-hero-inner { padding: 60px 0 52px; }
}
