/* ============================================================
   Audeet blog — listing cards, article pages, landing teaser
   Depends on the design tokens in styles.css.
   ============================================================ */

/* ---------- post cards (blog index + landing teaser) ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 100%;
}
/* keep cards from stretching absurdly wide when there are few posts */
.post-grid > .post-card { max-width: 560px; }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 21, 38, 0.04);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.35s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: #d9dde4;
  box-shadow: var(--shadow-card);
}
.post-card-cover {
  aspect-ratio: 1200 / 630;
  background: var(--bg-warm);
  overflow: hidden;
}
.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}
.post-chip {
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 14px;
}
.post-card h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--accent-deep); }
.post-card p { font-size: 0.9063rem; color: var(--muted); line-height: 1.6; }
.post-card-meta {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.7813rem;
  color: var(--faint);
  font-weight: 500;
}

/* ---------- landing teaser section ---------- */
.blog-teaser {
  background: var(--bg);
  padding-block: clamp(88px, 11vw, 132px);
  border-top: 1px solid var(--line-soft);
}
.blog-teaser .section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.blog-all-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 10px 0; /* 44px tap target on phones */
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-deep);
}
.blog-all-link:hover { color: var(--accent); }

/* ---------- blog pages (shared) ---------- */
.blog-main {
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(40px, 6vh, 72px));
  padding-bottom: clamp(80px, 10vw, 128px);
}

/* blog index header */
.blog-head { max-width: 620px; margin-bottom: clamp(44px, 6vw, 72px); }
.blog-head h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 650;
  margin-bottom: 16px;
}
.blog-head p { font-size: 1.125rem; color: var(--muted); }

/* ---------- article page ---------- */
.article-body-bg { background: #fff; }

.article {
  max-width: 720px;
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 28px;
}
.article-back:hover { color: var(--ink); }

.article-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -0.026em;
  font-weight: 650;
  margin: 14px 0 18px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.8438rem;
  color: var(--faint);
  font-weight: 500;
}
.article-meta .sep { color: var(--line); }

.article-cover {
  margin: 32px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.article-cover img { width: 100%; height: auto; }

/* article typography */
.article-content { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-3); }
.article-content > * + * { margin-top: 1.25em; }
.article-content h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-top: 2em;
  line-height: 1.25;
}
.article-content h3 { font-size: 1.1875rem; letter-spacing: -0.015em; margin-top: 1.7em; }
.article-content p { color: var(--ink-3); }
.article-content strong { color: var(--ink); font-weight: 600; }
.article-content a { color: var(--accent-deep); text-decoration: underline; text-decoration-color: rgba(30, 86, 214, 0.3); text-underline-offset: 3px; }
.article-content a:hover { text-decoration-color: var(--accent); }
.article-content ul, .article-content ol { padding-left: 1.3em; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-top: 0.5em; }
.article-content li::marker { color: var(--faint); }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink-2);
}
.article-content .aside-note {
  background: var(--bg-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  font-size: 0.9688rem;
  color: var(--muted);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9063rem;
}
.article-content th, .article-content td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.article-content th {
  font-size: 0.7188rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.article-content td { color: var(--ink-3); }

/* double rule — the closing signature under every article */
.article-rule {
  margin: 48px 0 0;
  display: grid;
  gap: 3px;
}
.article-rule i { height: 1.5px; background: var(--ink); }
.article-rule i:last-child { opacity: 0.7; }

/* end-of-post CTA */
.article-cta {
  margin-top: 40px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.article-cta-copy h2 { font-size: 1.25rem; letter-spacing: -0.015em; margin-bottom: 6px; }
.article-cta-copy p { font-size: 0.9063rem; color: var(--muted); max-width: 34em; }

/* author box */
.article-author {
  margin-top: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-top: 1px solid var(--line-soft);
  padding-top: 28px;
}
.article-author .brand-mark { width: 40px; height: 40px; flex: none; }
.article-author-name { font-weight: 600; color: var(--ink); font-size: 0.9375rem; }
.article-author-bio { font-size: 0.875rem; color: var(--muted); margin-top: 3px; line-height: 1.6; }

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-grid > .post-card { max-width: none; }
  .article-cta { flex-direction: column; align-items: flex-start; }
}
