/* Melodic Escape blog (index, posts, tag pages). Loaded after site.css; uses its tokens.
   Design: design_handoff_melodic_escape_quest/Blog.dc.html and BlogPost.dc.html. */

.section-tight { padding: clamp(48px, 7vw, 88px) var(--side) 0; }
.blog-narrow { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.blog-h2 { margin: 0; font-weight: 600; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.35; }
.blog-empty .blog-h2 { font-size: clamp(24px, 3vw, 34px); }
.blog-empty-copy { display: flex; flex-direction: column; gap: 14px; }
.blog-empty-copy .body-text { max-width: 58ch; }
:where(.blog-card, .blog-feature-card, .tag-chip, .share-btn, .post-tag, .post-back, .blog-ks-btn, .post-body a):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ---------- Intro band ---------- */
.blog-intro { background: var(--purple); border-bottom: 1px solid var(--line-soft); padding: clamp(56px, 8vw, 104px) var(--side); }
.blog-intro .wrap { display: flex; flex-direction: column; gap: 20px; }
.blog-h1 { margin: 0; max-width: 20ch; font-weight: 600; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.3; text-wrap: balance; }
.blog-intro-text { margin: 0; max-width: 60ch; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.8; color: #dcdcf5; text-wrap: pretty; }

/* ---------- Featured card ---------- */
.blog-featured .wrap { display: flex; flex-direction: column; gap: 20px; }
.blog-kicker { font-size: 13px; letter-spacing: 0.03em; color: var(--text-muted); }
.blog-feature-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  text-decoration: none; color: var(--text); background: var(--bg-alt);
  border: 1px solid rgba(134,196,207,0.22); border-radius: 6px; overflow: hidden; transition: border-color 0.2s;
}
.blog-feature-card:hover { border-color: rgba(134,196,207,0.6); color: var(--text); }
.blog-feature-media { display: flex; align-items: center; justify-content: center; background: var(--bg); min-height: 240px; }
.blog-feature-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-feature-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.blog-feature-title { font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; text-wrap: pretty; }
.blog-feature-excerpt { font-size: 16px; line-height: 1.8; color: var(--text-body); text-wrap: pretty; }
.blog-feature-cta { font-size: 14px; font-weight: 500; color: var(--accent); }
.blog-first-note { padding: 32px var(--side) 0; }
.blog-first-note .body-text { font-size: 16px; line-height: 1.8; }

/* ---------- Cards ---------- */
.blog-all .wrap, .blog-related .wrap { display: flex; flex-direction: column; gap: 24px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.blog-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--bg-alt);
  border: 1px solid rgba(134,196,207,0.2); border-radius: 6px; overflow: hidden; transition: border-color 0.2s;
}
.blog-card:hover { border-color: rgba(134,196,207,0.6); color: var(--text); }
.blog-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg); }
.blog-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.blog-card-tag { font-size: 12px; letter-spacing: 0.03em; color: var(--accent); }
.blog-card-title { font-weight: 600; font-size: 18px; line-height: 1.5; text-wrap: pretty; }
.blog-card-excerpt { font-size: 14px; line-height: 1.8; color: var(--text-body); text-wrap: pretty; }
.blog-card-meta { font-size: 12px; color: var(--text-muted); }
.blog-feature-body .blog-card-meta { font-size: 13px; }

.tag-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-chip {
  font-family: inherit; font-size: 13px; letter-spacing: 0.02em; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer;
}
.tag-chip:hover { border-color: var(--accent); background: rgba(134,196,207,0.1); }
.tag-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--btn-text); }

.blog-pager { display: flex; justify-content: space-between; gap: 16px; padding: 40px var(--side) 0; }

/* ---------- Signup box ---------- */
.blog-signup-section { padding-left: var(--side); padding-right: var(--side); }
.blog-signup {
  width: 100%; background: var(--bg-alt); border: 1px solid rgba(134,196,207,0.25); border-radius: 6px;
  padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 16px;
}
.blog-signup-title { margin: 0; font-weight: 600; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.4; }
.blog-signup-text { margin: 0; font-size: 16px; line-height: 1.8; color: var(--text-body); max-width: 56ch; text-wrap: pretty; }
.blog-signup [data-signup] { max-width: 520px; }
.signup--inline { gap: 12px; }
.signup--inline .signup-fields { flex-direction: column; }
.signup--inline .signup-fields .field { flex: none; }
.signup--inline .input { padding: 0 12px; }
.signup--inline .signup-row .btn { flex: none; padding: 0 20px; font-size: 14px; }
.blog-signup .form-status { font-size: 15px; }
.blog-signup-ks {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid rgba(134,196,207,0.15);
}
.blog-signup-ks span { font-size: 14px; color: var(--text-body); }
.blog-ks-btn {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--btn); color: var(--text); font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
}
.blog-ks-btn:hover { background: var(--btn); color: var(--btn-text); }

/* ---------- Post ---------- */
.post { padding: clamp(40px, 6vw, 72px) var(--side) 0; }
.post-header { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.post-back {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 13px; letter-spacing: 0.02em; color: var(--text-body); text-decoration: none;
}
.post-back:hover { color: var(--text); }
.blog-all .post-back { margin-bottom: -8px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-tag {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 12px; color: var(--accent); text-decoration: none;
  position: relative;
}
/* 44px tap target without making the chip look bigger */
.post-tag::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
.post-tag:hover { border-color: var(--accent); }
.post-title { margin: 0; font-weight: 600; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.32; text-wrap: balance; }
.post-byline { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-muted); }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  font-family: inherit; font-size: 13px; letter-spacing: 0.02em; color: var(--text);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 3px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.share-btn:hover { border-color: var(--accent); background: rgba(134,196,207,0.08); }
.share-btn.is-copied { color: var(--accent); border-color: var(--accent); background: rgba(134,196,207,0.1); }
.share-btn svg { flex: none; }

.post-hero { max-width: 1000px; margin: clamp(32px, 5vw, 56px) auto 0; display: flex; flex-direction: column; gap: 12px; }
.post-hero img {
  display: block; width: 100%; height: auto; background: var(--bg);
  border: 1px solid rgba(134,196,207,0.25); border-radius: 4px;
}
.post-hero figcaption { font-size: 13px; line-height: 1.6; color: var(--text-muted); max-width: 760px; margin: 0 auto; width: 100%; }

.post-body { max-width: 680px; margin: clamp(36px, 5vw, 56px) auto 0; display: flex; flex-direction: column; gap: 22px; }
.post-body > * { margin: 0; }
.post-body p, .post-body li { font-size: 17px; line-height: 1.95; color: #d6dee1; text-wrap: pretty; overflow-wrap: break-word; }
.post-body > p.post-lead { font-size: 19px; color: var(--text); }
.post-body > p.post-callout { font-size: 19px; font-weight: 500; color: var(--text); }
.post-body > p:last-child { color: var(--text); }
.post-body h2 { margin-top: 24px; font-weight: 600; font-size: clamp(21px, 2.4vw, 26px); line-height: 1.4; color: var(--text); }
.post-body h3 { margin-top: 12px; font-weight: 600; font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--text); }
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.post-body a:hover { color: var(--accent-hover); }
.post-body ul, .post-body ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.post-body blockquote { margin: 16px 0; padding: 8px 0 8px 28px; border-left: 2px solid var(--purple-eyebrow); }
.post-body blockquote p { margin: 0; font-size: clamp(21px, 2.6vw, 26px); font-style: italic; line-height: 1.6; color: var(--text); text-wrap: balance; }
.post-figure { margin: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.post-figure img {
  display: block; width: 100%; height: auto; border-radius: 4px;
  border: 1px solid rgba(134,196,207,0.2); background: var(--bg-alt);
}
/* Narrow images (e.g. a character cut-out) show at their own size, centred, never cropped. */
.post-figure.is-narrow img { max-width: min(280px, var(--img-w)); margin: 0 auto; border: 0; border-radius: 0; background: none; }
.post-figure figcaption, .post-body figcaption { font-size: 13px; line-height: 1.6; color: var(--text-muted); }

.post-end { padding: clamp(48px, 6vw, 72px) var(--side) 0; }
.post-end-inner {
  max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px;
  padding-top: 36px; border-top: 1px solid var(--line);
}
.post-end-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.post-end-label { font-size: 15px; font-weight: 500; }
.blog-related { padding-top: clamp(56px, 7vw, 88px); }
main > .post-end:last-of-type { padding-bottom: clamp(56px, 7vw, 88px); }
