/* =============================================================
   Red Mile Records — blog.css
   Shared styles for blog hub + all individual blog posts
   ============================================================= */

/* ── Blog Hub ─────────────────────────────────────────────── */
.blog-hub-hero {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-top: calc(var(--nav-height) + var(--space-20));
  padding-bottom: var(--space-20);
}

.blog-hub-hero h1 {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
  margin-top: var(--space-4);
  margin-bottom: var(--space-5);
}

.blog-hub-hero p {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 58ch;
  line-height: var(--line-height-loose);
}

/* ── Blog Post Grid (hub page) ────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--duration-base) var(--ease-smooth),
    transform var(--duration-slow) var(--ease-smooth);
}

.blog-card:hover {
  border-color: var(--color-border-mid);
  transform: translateY(-2px);
}

.blog-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: var(--color-surface-2);
}

.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.blog-card:hover .blog-card__thumb img {
  transform: scale(1.04);
}

.blog-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
}

.blog-card__date {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.blog-card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin: 0;
}

.blog-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-loose);
  flex: 1;
  max-width: none;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  margin-top: var(--space-2);
  transition: gap var(--duration-base) var(--ease-smooth);
}

.blog-card__link:hover {
  opacity: 1;
  gap: var(--space-3);
}

.blog-card__link::after {
  content: '→';
  font-size: var(--font-size-md);
}

/* ── Single Blog Post ─────────────────────────────────────── */
.post-hero {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-12);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.post-hero__img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  margin-bottom: var(--space-10);
}

.post-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
  max-width: 20ch;
}

@media (max-width: 768px) {
  .post-hero h1 { max-width: none; }
}

.post-byline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.post-byline__sep {
  color: var(--color-border-mid);
}

.post-byline__author {
  font-weight: 600;
  color: var(--color-text);
}

/* ── Post Body ────────────────────────────────────────────── */
.post-body {
  max-width: 740px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-5);
}

.post-body p {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-6);
  max-width: none;
}

.post-body h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
}

.post-body h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.post-body h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.post-body ul,
.post-body ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-6);
}

.post-body li {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-2);
  max-width: none;
}

.post-body ul li {
  list-style-type: disc;
}

.post-body ol li {
  list-style-type: decimal;
}

.post-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.post-body em {
  font-style: italic;
}

.post-body a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.post-body a:hover {
  opacity: 0.8;
}

/* Inline callout box */
.post-callout {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.post-callout p {
  margin-bottom: 0;
}

/* Data table (podcast money post) */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  font-size: var(--font-size-sm);
}

.post-body th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.post-body td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  vertical-align: top;
}

.post-body tr:last-child td {
  border-bottom: none;
}

/* ── Related Posts ─────────────────────────────────────────── */
.related-posts {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-20) 0;
}

.related-posts__heading {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-10);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

@media (max-width: 640px) {
  .related-posts__grid { grid-template-columns: 1fr; }
}

.related-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--duration-base) var(--ease-smooth),
    transform var(--duration-slow) var(--ease-smooth);
}

.related-card:hover {
  border-color: var(--color-border-mid);
  transform: translateY(-2px);
  opacity: 1;
}

.related-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.related-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.related-card:hover .related-card__thumb img {
  transform: scale(1.04);
}

.related-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.related-card__date {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.related-card__title {
  font-size: var(--font-size-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

.related-card__arrow {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  transition: transform var(--duration-base) var(--ease-smooth);
  display: inline-block;
}

.related-card:hover .related-card__arrow {
  transform: translateX(4px);
}

/* ── Post CTA Banner ──────────────────────────────────────── */
.post-cta {
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0;
  text-align: center;
}

.post-cta h2 {
  font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-3xl));
  margin-bottom: var(--space-4);
}

.post-cta p {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .post-hero { padding-top: calc(var(--nav-height-mob) + var(--space-12)); }
  .post-body { padding: var(--space-10) 0; }
}
