/* ============================================================
   LeedAB LAB Notes . shared blog styles
   Mirrors the tokens used in /site/index.html so the blog reads
   as a quieter, longer-form room in the same building.
   ============================================================ */

:root {
  --ink:    #F5F0E6;
  --ink-2:  #D9D2C2;
  --ink-3:  #8A8474;
  --ink-4:  #4F4B40;
  --paper:  #000000;
  --accent: #C28A4A;
  --serif:  "Instrument Serif", "Times New Roman", serif;
  --serif-2: "Cormorant Garamond", "Times New Roman", serif;
  --mono:   "Geist Mono", ui-monospace, monospace;
  --container: 760px;
  --container-wide: 1100px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============ Nav (matches index) ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-mark {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  min-width: 132px;
  text-align: center;
  transition: background 200ms ease, color 200ms ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

/* ============ Theme swatch . dot toggle in nav ============ */
.nav-meta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.theme-swatch {
  width: 30px; height: 30px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.theme-swatch:active { transform: scale(0.9); }
.theme-swatch .ts-glyph {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transition: background 0.3s ease, box-shadow 0.2s ease, transform 0.25s ease;
}
.theme-swatch:hover .ts-glyph,
.theme-swatch:focus-visible .ts-glyph {
  box-shadow: 0 0 0 1px var(--accent);
  transform: scale(1.12);
}
.theme-swatch:focus-visible { outline: 0; }
html[data-theme="light"] .theme-swatch .ts-glyph { background: #15130E; }

/* ============ Light theme overrides ============ */
html[data-theme="light"] {
  --ink:    #15130E;
  --ink-2:  #4F4B40;
  --ink-3:  #8A8474;
  --ink-4:  #D9D2C2;
  --paper:  #F7F4EE;
}
html[data-theme="light"] body { background: var(--paper); color: var(--ink); }
html[data-theme="light"] .nav { mix-blend-mode: normal; }
html[data-theme="light"] .nav-mark,
html[data-theme="light"] .nav-cta { color: var(--ink); }
html[data-theme="light"] .nav-cta { border-color: var(--ink); }
html[data-theme="light"] .nav-cta:hover { background: var(--ink); color: var(--paper); }

html[data-theme="light"] .blog-hero,
html[data-theme="light"] .article-header,
html[data-theme="light"] .post-list li,
html[data-theme="light"] .article-foot,
html[data-theme="light"] .site-footer { border-color: rgba(21, 19, 14, 0.10); }
html[data-theme="light"] .article-body code { background: rgba(21, 19, 14, 0.06); }
html[data-theme="light"] .article-body a { border-bottom-color: rgba(21, 19, 14, 0.3); }
html[data-theme="light"] .article-body hr { border-top-color: rgba(21, 19, 14, 0.12); }
html[data-theme="light"] .compare,
html[data-theme="light"] .metrics { border-color: rgba(21, 19, 14, 0.10); }
html[data-theme="light"] .article-body strong { color: var(--ink); }

/* Mobile nav padding */
@media (max-width: 720px) {
  .nav { padding: 16px 20px; }
  .nav-cta { min-width: 0; padding: 8px 14px; font-size: 10px; }
  .nav-meta { gap: 12px; }
  .page-pad { padding-top: 110px; padding-bottom: 72px; }
  .blog-hero { padding-bottom: 40px; margin-bottom: 40px; }
  .blog-hero h1 { font-size: clamp(40px, 11vw, 72px); }
  .article-header { padding-bottom: 36px; margin-bottom: 40px; }
  .article-header h1 { font-size: clamp(34px, 9vw, 52px); }
  .article-body { font-size: 17px; }
  .article-body h2 { margin: 44px 0 14px; }
}

/* ============ Shared shell ============ */
.shell {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell-wide {
  max-width: var(--container-wide);
}

.page-pad {
  padding-top: 140px;
  padding-bottom: 96px;
}

/* ============ Editorial header ============ */
.editorial-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.editorial-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(194, 138, 74, 0.55);
}
.editorial-eyebrow .sep {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--ink-4);
}
.editorial-eyebrow a {
  color: inherit;
  transition: color 180ms ease;
}
.editorial-eyebrow a:hover { color: var(--ink); }

/* ============ Listing ============ */
.blog-hero {
  border-bottom: 1px solid rgba(245, 240, 230, 0.08);
  padding-bottom: 56px;
  margin-bottom: 64px;
}
.blog-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 24px 0 18px;
  color: var(--ink);
}
.blog-hero h1 .em { font-style: italic; color: var(--ink-2); }
.blog-hero p {
  font-family: var(--serif-2);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-list li {
  border-bottom: 1px solid rgba(245, 240, 230, 0.08);
}
.post-list li:last-child { border-bottom: none; }
.post-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 28px 0;
  transition: opacity 180ms ease;
}
.post-card:hover { opacity: 0.85; }
.post-card .pc-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.post-card .pc-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  color: var(--ink);
}
.post-card .pc-title .em { font-style: italic; color: var(--ink-2); }
.post-card .pc-arrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 180ms ease, transform 180ms ease;
}
.post-card:hover .pc-arrow { color: var(--accent); transform: translateX(3px); }
.post-card .pc-excerpt {
  grid-column: 2 / 3;
  grid-row: 2;
  font-family: var(--serif-2);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-top: 10px;
  max-width: 60ch;
}

@media (max-width: 720px) {
  .post-card {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }
  .post-card .pc-date {
    grid-column: 1 / 3;
    grid-row: 1;
  }
  .post-card .pc-title {
    grid-column: 1 / 2;
    grid-row: 2;
  }
  .post-card .pc-arrow {
    grid-column: 2 / 3;
    grid-row: 2;
  }
  .post-card .pc-excerpt {
    grid-column: 1 / 3;
    grid-row: 3;
  }
}

/* ============ Article ============ */
.article-header {
  border-bottom: 1px solid rgba(245, 240, 230, 0.08);
  padding-bottom: 48px;
  margin-bottom: 56px;
}
.article-header h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.014em;
  margin: 24px 0 20px;
  color: var(--ink);
}
.article-header h1 .em { font-style: italic; color: var(--ink-2); }
.article-header .lede {
  font-family: var(--serif-2);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
}
.article-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.article-body {
  font-family: var(--serif-2);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
}
.article-body p {
  margin: 0 0 24px;
}
.article-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 56px 0 18px;
}
.article-body h2 .em { font-style: italic; color: var(--ink-2); }
.article-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
  margin: 40px 0 14px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 28px;
  padding-left: 24px;
}
.article-body li {
  margin-bottom: 10px;
}
.article-body strong {
  color: var(--ink);
  font-weight: 500;
}
.article-body em {
  color: var(--ink-2);
  font-style: italic;
}
.article-body a {
  color: var(--ink);
  border-bottom: 1px solid rgba(245, 240, 230, 0.3);
  transition: border-color 180ms ease, color 180ms ease;
}
.article-body a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.article-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-2);
}
.article-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(245, 240, 230, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
}
.article-body hr {
  border: none;
  border-top: 1px solid rgba(245, 240, 230, 0.1);
  margin: 56px auto;
  width: 80px;
}

/* Comparison / contrast block . used by "LeedAB vs X" style posts */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 36px 0;
  border-top: 1px solid rgba(245, 240, 230, 0.1);
  border-bottom: 1px solid rgba(245, 240, 230, 0.1);
  padding: 32px 0;
}
.compare > div {
  padding: 0 4px;
}
.compare h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.compare p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
@media (max-width: 640px) {
  .compare { grid-template-columns: 1fr; gap: 28px; }
}

/* Numbers callout . used by case studies */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 36px 0;
  border-top: 1px solid rgba(245, 240, 230, 0.1);
  border-bottom: 1px solid rgba(245, 240, 230, 0.1);
  padding: 32px 0;
}
.metrics .m-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.metrics .m-value {
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1;
  color: var(--ink);
}
.metrics .m-value .em { font-style: italic; color: var(--ink-2); }
@media (max-width: 640px) {
  .metrics { grid-template-columns: 1fr; gap: 24px; }
}

/* ============ Article footer / back ============ */
.article-foot {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid rgba(245, 240, 230, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.article-foot .back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 180ms ease;
}
.article-foot .back:hover { color: var(--ink); }
.article-foot .cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 200ms ease, color 200ms ease;
}
.article-foot .cta:hover { background: var(--ink); color: var(--paper); }

/* ============ Simple footer ============ */
.site-footer {
  border-top: 1px solid rgba(245, 240, 230, 0.06);
  padding: 32px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.site-footer a { color: var(--ink-3); transition: color 180ms ease; }
.site-footer a:hover { color: var(--ink); }
.site-footer .links { display: flex; gap: 22px; }
.site-footer .mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  text-transform: none;
}
