/* ProductLabs blog — shared styles.
   Design tokens mirror the homepage (index.html) so the blog reads as the same site. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:    #0d0d0d;
  --paper:  #f5f3ee;
  --accent: #d64e12;
  --muted:  #7a7570;
  --rule:   #ddd9d2;
  --code-bg: #14130f;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── NAV ─── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 4rem;
  backdrop-filter: blur(12px);
  background: rgba(245,243,238,.85);
  border-bottom: 1px solid var(--rule);
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.1rem;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-links a {
  font-size: .85rem; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
nav a.cta-nav {
  font-size: .85rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--accent); padding-bottom: 2px; transition: color .2s;
}
nav a.cta-nav:hover { color: var(--accent); }

/* ─── SHARED BLOCKS ─── */
.wrap { max-width: 1180px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem;
}
.eyebrow::before { content: ''; display: block; width: 24px; height: 2px; background: var(--accent); }

.section-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}

.btn {
  display: inline-block; padding: .85rem 2rem;
  font-family: 'Syne', sans-serif; font-size: .88rem; font-weight: 700;
  letter-spacing: .04em; text-decoration: none; transition: all .2s;
  border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ─── BLOG HERO ─── */
.blog-hero {
  padding: 5rem 4rem 3.5rem;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.blog-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .4; pointer-events: none;
}
.blog-hero .wrap { position: relative; }
.blog-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -.03em;
  margin-bottom: 1.25rem; max-width: 16ch;
}
.blog-hero h1 em { font-style: normal; color: var(--accent); }
.blog-hero .sub {
  font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 300;
  color: var(--muted); max-width: 620px; line-height: 1.7;
}

/* ─── TOPIC NAV ─── */
.topic-bar {
  padding: 1.5rem 4rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.topic-bar .wrap { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.topic-chip {
  font-size: .8rem; font-weight: 500; text-decoration: none;
  color: var(--muted); border: 1px solid var(--rule);
  padding: .4rem 1rem; transition: all .2s; white-space: nowrap;
}
.topic-chip:hover { border-color: var(--ink); color: var(--ink); }
.topic-chip[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topic-chip .count { opacity: .5; margin-left: .35rem; }

/* ─── SECTIONS ─── */
.section { padding: 4.5rem 4rem; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: none; }
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -.02em; margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem; font-weight: 300; color: var(--muted);
  max-width: 640px; line-height: 1.7; margin-bottom: 3rem;
}

/* ─── FEATURED ─── */
.featured {
  border: 2px solid var(--ink);
  display: grid; grid-template-columns: 1.55fr 1fr;
  margin-bottom: 4rem;
}
.featured-main { padding: 3rem; }
.featured-side {
  padding: 3rem; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
}
.featured-side .section-label { color: var(--accent); }
.featured-side p { font-size: .88rem; font-weight: 300; color: rgba(255,255,255,.65); line-height: 1.7; }
.featured-main h2 {
  font-family: 'Syne', sans-serif; font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1rem;
}
.featured-main h2 a { color: var(--ink); text-decoration: none; }
.featured-main h2 a:hover { color: var(--accent); }
.featured-main .dek { font-size: 1rem; font-weight: 300; color: var(--muted); line-height: 1.7; margin-bottom: 1.75rem; }

/* ─── ARTICLE LIST ─── */
.post-list { border-top: 2px solid var(--ink); }
.post-item {
  display: grid; grid-template-columns: 8rem 1fr 11rem;
  gap: 2.5rem; padding: 2.25rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.post-item:hover .post-title a { color: var(--accent); }
.post-num {
  font-family: 'Syne', sans-serif; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; color: var(--rule); padding-top: .35rem;
}
.post-title {
  font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700;
  line-height: 1.3; letter-spacing: -.01em; margin-bottom: .6rem;
}
.post-title a { color: var(--ink); text-decoration: none; transition: color .2s; }
.post-dek { font-size: .92rem; font-weight: 300; color: var(--muted); line-height: 1.65; max-width: 62ch; }
.post-meta {
  font-size: .75rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  padding-top: .3rem; text-align: right; line-height: 1.9;
}
.post-meta .topic-tag { color: var(--accent); display: block; }
.badge-new {
  display: inline-block; font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent); color: var(--paper);
  padding: .15rem .5rem; margin-left: .5rem; vertical-align: middle;
}

/* ─── ARTICLE PAGE ─── */
.article-head {
  padding: 4rem 4rem 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.article-head .wrap { max-width: 780px; margin: 0 auto; }
.breadcrumb { font-size: .78rem; color: var(--muted); margin-bottom: 1.75rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 .5rem; opacity: .5; }
.article-head h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  margin-bottom: 1.25rem;
}
.article-head .dek {
  font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 300;
  color: var(--muted); line-height: 1.7; margin-bottom: 2rem;
}
.article-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center;
  font-size: .78rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--rule); padding-top: 1.5rem;
}
.article-meta .topic-tag { color: var(--accent); text-decoration: none; }
.article-meta .topic-tag:hover { text-decoration: underline; }

.article-body { padding: 3.5rem 4rem 5rem; }
.article-body .wrap { max-width: 780px; margin: 0 auto; }

/* Article typography */
.article-body h2 {
  font-family: 'Syne', sans-serif; font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
  margin: 3.25rem 0 1rem; padding-top: .5rem;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-family: 'Syne', sans-serif; font-size: 1.12rem; font-weight: 700;
  margin: 2.25rem 0 .75rem;
}
.article-body p { font-size: 1.02rem; font-weight: 300; line-height: 1.75; margin-bottom: 1.35rem; }
.article-body strong { font-weight: 600; }
.article-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.25rem; }
.article-body li { font-size: 1.02rem; font-weight: 300; line-height: 1.75; margin-bottom: .55rem; padding-left: .35rem; }
.article-body li::marker { color: var(--accent); }
.article-body hr { border: none; border-top: 1px solid var(--rule); margin: 3rem 0; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: .35rem 0 .35rem 1.5rem; margin: 0 0 1.6rem;
  color: var(--muted);
}
.article-body blockquote p:last-child { margin-bottom: 0; }

/* Callout — used for the "verified on" and caveat notes */
.callout {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: rgba(214,78,18,.035);
  padding: 1.4rem 1.6rem; margin: 0 0 1.8rem;
}
.callout p { font-size: .94rem; margin-bottom: .7rem; }
.callout p:last-child { margin-bottom: 0; }
.callout .callout-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .5rem;
  display: block;
}

/* Code */
.article-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: .875em; background: rgba(13,13,13,.06);
  padding: .12em .4em; border-radius: 2px; word-break: break-word;
}
.article-body pre {
  background: var(--code-bg); color: #e8e4db;
  padding: 1.4rem 1.6rem; margin: 0 0 1.8rem;
  overflow-x: auto; font-size: .84rem; line-height: 1.65;
  border-left: 3px solid var(--accent);
}
.article-body pre code {
  background: none; padding: 0; font-size: inherit; color: inherit; word-break: normal;
}

/* Tables */
.article-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.8rem; font-size: .92rem;
}
.article-body th, .article-body td {
  text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--rule);
  font-weight: 300; vertical-align: top;
}
.article-body th {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: .8rem;
  letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
}
.table-scroll { overflow-x: auto; margin-bottom: 1.8rem; }
.table-scroll table { margin-bottom: 0; }

/* ─── ARTICLE FOOTER BLOCKS ─── */
.article-foot { padding: 0 4rem 5rem; }
.article-foot .wrap { max-width: 780px; margin: 0 auto; }

.related { border-top: 2px solid var(--ink); padding-top: 2rem; margin-bottom: 3rem; }
.related h2 {
  font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700;
  margin-bottom: 1.5rem;
}
.related ul { list-style: none; margin: 0; }
.related li { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.related a {
  font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700;
  color: var(--ink); text-decoration: none; transition: color .2s;
}
.related a:hover { color: var(--accent); }
.related .rel-dek { font-size: .88rem; font-weight: 300; color: var(--muted); margin-top: .3rem; line-height: 1.6; }

.sources { margin-bottom: 3rem; }
.sources h2 { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.sources ul { list-style: none; margin: 0; }
.sources li { font-size: .88rem; font-weight: 300; line-height: 1.6; margin-bottom: .6rem; color: var(--muted); }
.sources a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.sources a:hover { color: var(--accent); }

.cta-block {
  border: 2px solid var(--ink); padding: 2.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-block h2 {
  font-family: 'Syne', sans-serif; font-size: 1.35rem; font-weight: 700;
  letter-spacing: -.01em; margin-bottom: .5rem;
}
.cta-block p { font-size: .92rem; font-weight: 300; color: var(--muted); max-width: 42ch; line-height: 1.65; }

/* ─── FOOTER ─── */
footer {
  padding: 2rem 4rem; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--muted); flex-wrap: wrap; gap: 1rem;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .featured { grid-template-columns: 1fr; }
  .featured-side { border-top: 2px solid var(--ink); }
  .post-item { grid-template-columns: 3.5rem 1fr; }
  .post-meta { grid-column: 2; text-align: left; padding-top: .75rem; }
}

@media (max-width: 768px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-links { display: none; }
  .blog-hero { padding: 3rem 1.5rem 2.5rem; }
  .topic-bar { padding: 1.25rem 1.5rem; }
  .section { padding: 3rem 1.5rem; }
  .featured-main, .featured-side { padding: 2rem 1.5rem; }
  .article-head { padding: 2.5rem 1.5rem 2rem; }
  .article-body { padding: 2.5rem 1.5rem 3.5rem; }
  .article-foot { padding: 0 1.5rem 3.5rem; }
  .article-body pre { padding: 1.1rem 1.2rem; font-size: .78rem; }
  .cta-block { padding: 2rem 1.5rem; }
  footer { padding: 2rem 1.5rem; }
  .post-item { grid-template-columns: 1fr; gap: 0; }
  .post-num { display: none; }
  .post-meta { grid-column: 1; }
}

@media print {
  nav, .topic-bar, .cta-block, .related { display: none; }
  body { background: #fff; }
  .article-body pre { background: #f4f4f4; color: #111; }
}
