/* LAC blog theme — marketing dialect per design.md. Values come from
 * tokens.css (ported from design/tokens.css); the article layout is the
 * studio ArticleSpecimen (design/studio/src/marketing/article.css). The
 * white/black rgba shadow + sheen recipes stay literal per the port rules. */

/* ─── Fonts (self-hosted, variable) ─── */
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-wght-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Squircle corners (progressive enhancement, as on landing) */
@supports (corner-shape: superellipse(1)) {
  .squircle { corner-shape: superellipse(1.8); }
  .pill { corner-shape: superellipse(2.2); }
}

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

/* ─── Header — brand pill (serif wordmark, black ink on the accent fill) ─── */
.site-head {
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.brand-pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-pill);
  padding: 8px 16px 9px; /* optical centering: serif sits high in its box */
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform calc(0.2s * var(--motion-scale)) var(--ease);
}
.brand-pill:hover { transform: translateY(-1px); }
.brand-pill:active { transform: scale(0.96); }

.head-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.head-nav > a {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color calc(0.2s * var(--motion-scale)) var(--ease);
}
.head-nav > a:hover { color: var(--ink); }

/* mk-btn-dark, from the studio marketing chrome */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  min-height: 40px;
  padding: 11px 18px 11px 20px; /* icon side = text side − 2px */
  border: 1px solid rgba(0, 0, 0, 0.9);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 14px 30px -24px rgba(0, 0, 0, 0.68);
  transition:
    transform calc(0.2s * var(--motion-scale)) var(--ease),
    background calc(0.2s * var(--motion-scale)) var(--ease),
    box-shadow calc(0.2s * var(--motion-scale)) var(--ease);
}
.btn-dark:hover {
  background: #0b0b0d;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 20px 38px -26px rgba(0, 0, 0, 0.74);
}
.btn-dark:active {
  transform: scale(0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 18px -18px rgba(0, 0, 0, 0.64);
}
.btn-arrow {
  display: inline-flex;
  width: 1em;
  height: 1em;
  opacity: 0.72;
  transition:
    opacity calc(0.2s * var(--motion-scale)) var(--ease),
    transform calc(0.2s * var(--motion-scale)) var(--ease);
}
.btn-dark:hover .btn-arrow {
  opacity: 1;
  transform: translateX(2px);
}

main { padding-block: 56px 88px; }

/* ─── Index ─── */
.blog-index .kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.blog-index h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.blog-index .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
}

.post-list {
  list-style: none;
  margin-top: 44px;
}
.post-list li + li { border-top: 1px solid var(--line); }
.post-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 26px 20px;
  margin-inline: -20px;
  border-radius: var(--radius-md);
  transition: background calc(0.2s * var(--motion-scale)) var(--ease);
}
.post-list a:hover { background: var(--select-bg); }
.post-list h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}
.post-list p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post-list .post-meta { margin-top: 10px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-tertiary);
}
.post-meta .author {
  color: var(--ink-soft);
  font-weight: 500;
}

.empty-note {
  margin-top: 44px;
  font-size: 15px;
  color: var(--ink-soft);
}
.empty-note a { color: inherit; }

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 44px;
  font-size: 14px;
  font-weight: 550;
}
.pagination a { color: var(--ink-soft); text-decoration: none; }
.pagination a:hover { color: var(--ink); }

/* ─── Article — the studio ArticleSpecimen, verbatim dialect ─── */
.article {
  max-width: 68ch;
  margin-inline: auto;
}
.article .kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.article h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  text-wrap: balance;
}
.article .post-meta { margin: 0 0 36px; }

.article-body p {
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.008em;
  text-wrap: pretty;
  color: var(--ink);
  margin: 0 0 22px;
}
.article-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color calc(0.15s * var(--motion-scale)) var(--ease);
}
.article-body a:hover { text-decoration-color: var(--ink); }

/* Drop cap — serif, spans ~3 lines of the 17px/1.7 body. */
.article-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.6em;
  line-height: 0.78;
  padding: 0.08em 0.14em 0 0;
  color: var(--ink);
}

.article-body h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 40px 0 12px;
  text-wrap: balance;
}
.article-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 30px 0 10px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 26px;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.008em;
}
.article-body li { margin: 6px 0; }
.article-body li p { margin: 0; }

/* Pull quote — serif italic between hairline rules */
.article-body blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  margin: 38px 0;
}
.article-body blockquote p {
  font: inherit;
  color: inherit;
  margin: 0;
}
.article-body blockquote p + p { margin-top: 14px; }

/* Figures */
.article-body figure,
.article-body .kg-card {
  margin: 38px 0;
}
/* Koenig width variants: wide breaks out of the 68ch column, full spans the
   viewport (minus page padding). */
.article-body .kg-width-wide {
  width: min(90vw, 960px);
  margin-inline: calc(50% - min(45vw, 480px));
}
.article-body .kg-width-full {
  width: calc(100vw - 48px);
  margin-inline: calc(50% - 50vw + 24px);
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.article-body figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-tertiary);
  text-align: left;
}

/* Machine text */
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
}
.article-body pre {
  margin: 0 0 22px;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.article-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Ledger-grade tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.article-body th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  padding: 8px var(--cell-pad-x);
}
.article-body td {
  border-bottom: 1px dotted var(--grid-line);
  padding: 8px var(--cell-pad-x);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 38px 0;
}

/* ─── Post foot — back link + the one CTA ─── */
.post-foot {
  max-width: 68ch;
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.post-foot .back {
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
}
.post-foot .back:hover { color: var(--ink); }
.post-cta {
  margin-top: 20px;
  padding: 20px 22px;
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post-cta strong { color: var(--ink); }
.post-cta a { color: inherit; }

/* ─── Footer ─── */
.site-foot { border-top: 1px solid var(--line); }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px 30px;
  font-size: 13px;
  color: var(--ink-tertiary);
}
.foot-nav { display: flex; gap: 18px; }
.foot-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.foot-nav a:hover { color: var(--ink); }

/* ─── Small screens ─── */
@media (max-width: 560px) {
  .blog-index h1, .article h1 { font-size: 30px; }
  .article-body p, .article-body ul, .article-body ol { font-size: 16px; }
  .article-body blockquote { font-size: 22px; }
  .head-nav > a.site-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
