/* ---------------------------------------------------------------------------
   Orbly blog — the pages under /blog/.

   landing.css carries the tokens (colours, type, buttons, nav, footer) and
   this file adds only what a long-form page needs: the article header, the
   prose measure, tables of contents, post cards and the methods grid.

   Colours are landing.css's. Nothing here introduces a new hue: the tiles
   reuse --tile-* / --on-* (the app's methodTile pastels with the darker
   inks), so every combination here clears WCAG AA the way the landing page
   does.
--------------------------------------------------------------------------- */

body.blog { background: var(--ivory); }

/* -- Article shell ---------------------------------------------------------- */

/* One editorial column for the whole page: the header, the grids and the
   prose all sit on the same measure, so the page reads as one thing rather
   than a narrow article with wide sections bolted on. The gutter lives on
   .article so every child inherits it — a child that sets its own padding
   can't leave the text touching the screen edge. */
.article { padding: 0 20px 96px; }
.article > article,
.article > .topicblock,
.article > .postlist,
.article > .methods { max-width: 780px; margin: 0 auto; padding: 0; }

.article__head { padding: 64px 0 8px; max-width: 780px; margin: 0 auto; }
.article__head .eyebrow a { color: inherit; }
.article__head h1 {
  margin-top: 14px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.015em;
}
.article__lede { margin-top: 18px; font-size: 19px; line-height: 1.55; color: var(--muted); }
.article__meta {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--muted);
}

/* -- Table of contents ------------------------------------------------------ */

.toc {
  max-width: 780px; margin: 36px auto 0;
  padding: 22px 24px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--border);
}
@media (max-width: 460px) { .toc { padding: 18px 20px; } }
.toc__label {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lavender-ink);
}
.toc ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.toc a { color: var(--muted); font-size: 15px; }
.toc a:hover { color: var(--ink); }

/* -- Prose ------------------------------------------------------------------- */

.prose { max-width: 700px; margin: 0 auto; padding-top: 36px; font-size: 17px; line-height: 1.72; color: var(--ink); }
.prose h2 {
  margin-top: 52px; margin-bottom: 14px;
  font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.2;
  letter-spacing: -.01em;
}
.prose h3 {
  margin-top: 34px; margin-bottom: 10px;
  font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25;
}
.prose p { margin: 0 0 20px; }
.prose > p:first-of-type { font-size: 19px; line-height: 1.65; color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--lavender-deep); }
.prose strong { font-weight: 700; }
.prose blockquote {
  margin: 32px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--lavender);
  font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--muted);
}
.prose blockquote p { margin: 0; }
.prose hr { margin: 44px 0; border: 0; border-top: 1px solid var(--border); }
.prose code {
  padding: 2px 6px; border-radius: 6px;
  background: var(--tile-lavender); color: var(--on-lavender);
  font: 400 0.92em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.prose a { color: var(--lavender-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }

/* -- Post cards -------------------------------------------------------------- */

.postgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-top: 22px;
}
.postcard {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 24px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--border);
  color: var(--ink);
}
.postcard:hover { border-color: var(--lavender-deep); }
.postcard__title { font: 600 20px/1.25 var(--serif); }
.postcard__desc { font-size: 15px; line-height: 1.55; color: var(--muted); }
.postcard__meta { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* -- Topic blocks ------------------------------------------------------------ */

.topicblock { padding-top: 56px; }
.topicblock__head { max-width: 760px; }
.topicblock__head h2 { font: 600 clamp(28px, 3.6vw, 38px)/1.15 var(--serif); }
.topicblock__head h2 a { color: var(--ink); }
.topicblock__head p { margin-top: 10px; font-size: 17px; color: var(--muted); }
.topicblock .postgrid { margin-top: 24px; }

.postlist { padding-top: 56px; }
.postlist h2 { font: 600 30px/1.2 var(--serif); }

/* -- The five methods -------------------------------------------------------- */
/* .methodgrid / .methodcard live in landing.css — this file loads after it. */

.methods { padding-top: 56px; }
.methods h2 { font: 600 clamp(28px, 3.6vw, 38px)/1.15 var(--serif); }
.methods__lede { margin-top: 10px; max-width: 640px; font-size: 17px; color: var(--muted); }

.methods .methodgrid { margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
a.methodcard:hover { box-shadow: inset 0 0 0 2px var(--on); }
.methodcard .soon { margin-left: 8px; vertical-align: middle; }

/* -- Pager (previous / next inside the topic) ------------------------------ */

.pager {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 15px; font-weight: 500;
}
.pager a { color: var(--muted); }
.pager a:hover { color: var(--ink); }
.pager span { color: transparent; }

/* -- CTA band ---------------------------------------------------------------- */

.cta {
  max-width: 780px; margin: 72px auto 0; padding: clamp(28px, 4vw, 44px);
  border-radius: 26px; background: var(--ink); color: var(--ivory);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.cta .eyebrow { color: var(--apricot); }
.cta__title { margin-top: 10px; font: 600 26px/1.2 var(--serif); color: var(--ivory); }
.cta__body { margin-top: 10px; max-width: 420px; color: rgba(251,247,245,.82); font-size: 15px; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn--primary { background: var(--ivory); color: var(--ink); }
.cta .btn--primary:hover { color: var(--ink); }
.cta .btn--secondary { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 1px var(--lavender); }
.cta .btn--secondary:hover { color: var(--ivory); box-shadow: inset 0 0 0 1px var(--ivory); }

@media (max-width: 640px) {
  .article__head { padding-top: 44px; }
  .prose { font-size: 16px; }
  .cta__buttons { width: 100%; }
}
