/* The blog (SMA-216, Figma 423:562). Loaded after site.css: same palette,
   cards, buttons and form, but on the sand with no beach hero. */
:root {
  --tag-update-bg: rgba(182, 246, 210, 0.5);
  --tag-update-fg: #00602A;
  --tag-article-bg: #F3E6D2;
  --tag-article-fg: #44576B;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tag-update-bg: #003224;
    --tag-update-fg: #61DA92;
    --tag-article-bg: #302844;
    --tag-article-fg: #D0B198;
  }
}

.blog-header { max-width: 1344px; margin: 0 auto; padding: 28px 48px 0; box-sizing: content-box; }
.nav a.nav-blog { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.blog-page main { max-width: 1248px; margin: 0 auto; padding: 0 24px; }

/* List pages */
.blog-head { max-width: 760px; margin: 72px auto 0; text-align: center; }
.blog-head h1 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 12px; }
.blog-head .lede { color: var(--muted); font-size: 19px; margin: 0; }
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pill {
  border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 15px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
}
.pill[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.blog-list { margin-top: 56px; display: flex; flex-direction: column; gap: 24px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.empty { text-align: center; color: var(--muted); }

.tag {
  display: inline-block; border-radius: 999px; padding: 3px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.tag-update { background: var(--tag-update-bg); color: var(--tag-update-fg); }
.tag-article { background: var(--tag-article-bg); color: var(--tag-article-fg); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }

.post-card { overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .post-card, .post-card:hover { transition: none; transform: none; } }
.post-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.post-card img { width: 100%; aspect-ratio: 1200 / 627; object-fit: cover; background: var(--line); }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 24px; flex: 1; }
.post-card h2, .post-card h3 { margin: 0; line-height: 1.2; }
.post-card h3 { font-size: 22px; }
.post-card p:not(.post-meta) { color: var(--muted); font-size: 16px; margin: 0; }
.more { color: var(--primary); font-weight: 600; font-size: 15px; margin-top: auto; }
@media (prefers-color-scheme: dark) { .more { color: var(--overline); } }

.post-card-featured { border-radius: 28px; }
.post-card-featured a { display: grid; grid-template-columns: minmax(0, 640px) 1fr; align-items: center; }
.post-card-featured img { height: 100%; }
.post-card-featured .post-card-body { padding: 32px 44px; gap: 14px; }
.post-card-featured h2 { font-size: 36px; letter-spacing: -0.01em; }
.post-card-featured p:not(.post-meta) { font-size: 18px; }
.post-card-featured .more { font-size: 16px; margin-top: 0; }

/* A post */
.post { max-width: 760px; margin: 56px auto 0; display: flex; flex-direction: column; gap: 20px; }
.back { color: var(--muted); font-weight: 500; font-size: 15px; text-decoration: none; width: fit-content; }
.back:hover { text-decoration: underline; }
.post h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.post .lede { color: var(--muted); font-size: 21px; margin: 0; }
.byline { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-size: 15px; }
.byline img { width: 32px; height: 32px; border-radius: 8px; }
.post-image { width: 100%; height: auto; aspect-ratio: 1200 / 627; object-fit: cover; border-radius: 24px; background: var(--line); }
.prose { font-size: 18px; line-height: 1.65; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose h2 { font-size: 26px; line-height: 1.25; margin: 36px 0 12px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--primary); font-weight: 600; }
@media (prefers-color-scheme: dark) { .prose a { color: var(--overline); } }

.blog-join .join { margin-top: 80px; }
.more-posts { margin-top: 80px; }
.more-posts h2 { font-size: 28px; margin: 0 0 24px; }

/* Tablet */
@media (max-width: 960px) {
  .blog-header { padding: 20px 24px 0; }
  .nav a.nav-blog { display: inline; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-card-featured a { grid-template-columns: 1fr; }
  .post-card-featured img { height: auto; }
}

/* Phones */
@media (max-width: 600px) {
  .blog-header { padding: 16px 16px 0; }
  .blog-page main { padding: 0 16px; }
  .blog-head { text-align: left; margin-top: 40px; }
  .blog-head .lede { font-size: 17px; }
  .filters { justify-content: flex-start; margin-top: 20px; }
  .blog-list { margin-top: 28px; gap: 16px; }
  .post-grid { grid-template-columns: 1fr; gap: 16px; }
  .post-card-featured .post-card-body { padding: 20px 24px 24px; gap: 10px; }
  .post-card-featured h2 { font-size: 22px; }
  .post-card-featured p:not(.post-meta) { font-size: 16px; }
  .post { margin-top: 32px; gap: 16px; }
  .post .lede { font-size: 18px; }
  .post-image { border-radius: 20px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 22px; }
  .blog-join .join { margin-top: 48px; }
  .more-posts { margin-top: 48px; }
  .more-posts h2 { font-size: 24px; margin-bottom: 16px; }
}
