/* ==========================================================================
   Orbit Fast — Blog
   Editorial, image-forward layout (inspired by the ElevenLabs blog) rendered in
   the site's monochrome identity: white / black / Inter, bold tight headlines,
   rounded covers with an overlaid category chip, pill filters, a split featured
   hero, and a clean long-form reading column.
   ========================================================================== */

:root {
  --bg: #fff;
  --ink: #000;
  --ink-body: rgba(0, 0, 0, 0.82);
  --muted: rgba(0, 0, 0, 0.5);
  --line: #e8e8e8;
  --panel: #f3f3f4;
  --yellow: #fff700;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.blog {
  background: var(--bg);
  color: var(--ink-body);
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
body.blog a { color: inherit; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.dot { margin: 0 0.5em; color: var(--muted); }

/* --- top bar -------------------------------------------------------------- */
.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-article .topbar { max-width: 768px; }
.topbar__home { display: inline-flex; color: var(--ink); }
.topbar .brandmark { display: block; }
.topbar__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.topbar__link:hover,
.topbar__link--current { color: var(--ink); }

/* --- shared cover frame (image or branded orbit art) + category chip ------ */
.cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}
.cover__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.cover__chip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --- blog index ----------------------------------------------------------- */
.blog-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 112px;
}
.blog-head { padding: 28px 0 44px; }
.blog-head__title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink);
}
.blog-head__sub {
  margin-top: 14px;
  max-width: 52ch;
  font-size: 1.0625rem;
  color: var(--muted);
}

/* featured (newest) — text on one side, large cover on the other */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 48px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding-bottom: 52px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.feature__body { grid-column: 1; grid-row: 1; }
.feature__media { grid-column: 2; grid-row: 1; }
.feature .cover { aspect-ratio: 16 / 11; }
.feature__title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}
.feature__dek {
  margin-top: 16px;
  max-width: 42ch;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--muted);
}
.feature__meta { margin-top: 18px; font-size: 0.875rem; color: var(--muted); }
.feature__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s ease;
}
.feature:hover .feature__cta { background: #222; }
.feature:hover .feature__title { text-decoration: underline; text-underline-offset: 3px; }
.feature:hover .cover__media { transform: scale(1.03); }

/* category filter pills */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.filter:hover { border-color: #c9c9c9; color: var(--ink); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}
.card { text-decoration: none; color: inherit; }
.card__title {
  margin-top: 18px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
.card__dek {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta { margin-top: 14px; font-size: 0.8125rem; color: var(--muted); }
.card:hover .card__title { text-decoration: underline; text-underline-offset: 3px; }
.card:hover .cover__media { transform: scale(1.03); }

.feed-empty { padding: 64px 0; text-align: center; color: var(--muted); }

/* --- article -------------------------------------------------------------- */
.post {
  max-width: 768px;
  margin: 0 auto;
  padding: 8px 24px 112px;
}
.post__back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.post__back:hover { color: var(--ink); }
.post__head { margin-bottom: 36px; }
.post__title {
  margin-top: 14px;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
}
.post__dek {
  margin-top: 20px;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
}
.post__meta { margin-top: 22px; font-size: 0.9375rem; color: var(--muted); }
.post__cover { aspect-ratio: 16 / 9; margin-bottom: 44px; }
.post__foot { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.backlink {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.backlink:hover { color: var(--ink); }

/* --- author bio card ------------------------------------------------------ */
.post__author {
  margin-top: 56px;
  padding: 24px 26px;
  background: var(--panel);
  border-radius: 14px;
}
.post__author-name { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.post__author-title { margin: 2px 0 0; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.post__author-bio { margin: 12px 0 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-body); }

/* --- "keep reading" related posts ----------------------------------------- */
.post__related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.post__related-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 28px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.related-grid .card__title { font-size: 1.0625rem; margin-top: 14px; }
.related-grid .card__meta { margin-top: 10px; }
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* --- compact inline CTA (auto-injected mid-article) ----------------------- */
.cta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0;
  padding: 20px 24px;
  background: #faf9f6;
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  border-radius: 14px;
}
.cta-inline__text { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink-body); flex: 1 1 260px; }
.cta-inline__text strong { color: var(--ink); }
/* two classes so this beats `body.blog a { color: inherit }` (0,1,2) */
.cta-inline .cta-inline__btn {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  background: #000;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.cta-inline .cta-inline__btn:hover { background: #333; color: #fff; }

/* --- prose (article body) ------------------------------------------------- */
.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-body); }
.prose > * + * { margin-top: 1.5em; }
.prose h2 {
  margin-top: 2.4em;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
.prose h3 {
  margin-top: 2em;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.prose h2 + *, .prose h3 + * { margin-top: 0.8em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a:not(.cta-inline__btn):not(.app-cta__btn) {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  transition: background-color 0.15s ease;
}
.prose a:not(.cta-inline__btn):not(.app-cta__btn):hover {
  color: var(--ink);
  background: var(--yellow);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--muted); }
.prose blockquote {
  padding-left: 20px;
  border-left: 3px solid var(--ink);
  color: var(--ink-body);
  font-style: italic;
}
.prose blockquote > * + * { margin-top: 1em; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f3f3f3;
  padding: 0.15em 0.4em;
  border-radius: 5px;
}
.prose pre {
  background: #0a0d14;
  color: #f5f5f5;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose figure img,
.prose p > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.prose figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); text-align: center; }

/* comparison tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose th { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: none; }

/* --- app CTA ({{cta:...}} shortcode) -------------------------------------- */
.app-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.app-cta__icon { width: 72px; height: 72px; border-radius: 16px; flex: none; }
.app-cta__body { flex: 1; min-width: 0; }
.app-cta__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.app-cta__name { margin-top: 4px; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.app-cta__blurb { margin-top: 6px; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-body); }
.app-cta__btn { display: inline-block; margin-top: 14px; }
.app-cta__btn img { display: block; height: 40px; width: auto; }

/* --- responsive ----------------------------------------------------------- */
@media screen and (max-width: 680px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 40px;
    margin-bottom: 36px;
  }
  .feature__body, .feature__media { grid-column: auto; grid-row: auto; }
  .feature .cover { aspect-ratio: 16 / 10; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .post__dek { font-size: 1.125rem; }
  .post__cover { aspect-ratio: 16 / 10; }
}
@media screen and (max-width: 560px) {
  .app-cta { flex-direction: column; align-items: flex-start; }
}
