/* ============================================================
   Doremi 2000 — Cẩm nang (blog listing + article reading)
   Reuses tokens/base/components; adds editorial reading styles.
   ============================================================ */

/* ---------------- Page intro ---------------- */
.page-head {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 1.5rem + 4vw, 5rem));
  padding-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
  text-align: center;
}
.page-head .eyebrow { margin-bottom: 1rem; }
.page-head h1 { font-size: var(--fs-display); margin-bottom: 1rem; }
.page-head p { font-size: var(--fs-lead); color: var(--muted); max-width: 60ch; margin-inline: auto; }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--fs-xs); color: var(--muted-2); margin-bottom: 1.4rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs span { color: var(--line-2); }

/* ---------------- Listing grid ---------------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.6rem);
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--grad-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 1rem + 1vw, 1.9rem);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.post-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--grad-gold); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.post-card:hover { transform: translateY(-6px); border-color: var(--line-gold); box-shadow: var(--shadow-lg); }
.post-card:hover::before { transform: scaleX(1); }
.post-card__cat {
  align-self: flex-start;
  font-size: var(--fs-label); letter-spacing: var(--tracking-wide); text-transform: uppercase;
  font-weight: 600; color: var(--gold);
  padding: 0.3rem 0.7rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-gold-soft); background: rgba(201,162,75,0.05);
  margin-bottom: 1.1rem;
}
.post-card h2 {
  font-size: 1.4rem; line-height: 1.25; margin-bottom: 0.7rem;
  transition: color var(--dur) var(--ease);
}
.post-card:hover h2 { color: var(--gold); }
.post-card__excerpt { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 1.2rem; flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-xs); color: var(--muted-2); }
.post-card__more { margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--gold); font-weight: 600; font-size: var(--fs-sm); }
.post-card__more svg { width: 15px; height: 15px; transition: transform var(--dur) var(--ease-out); }
.post-card:hover .post-card__more svg { transform: translateX(3px); }
.post-card__link { position: absolute; inset: 0; z-index: 1; }

/* ---------------- Article ---------------- */
.article { padding-top: calc(var(--header-h) + clamp(1.5rem, 1rem + 2vw, 3rem)); padding-bottom: var(--space-5); }
.article__head { max-width: 72ch; margin-inline: auto; margin-bottom: clamp(1.8rem, 1rem + 2vw, 2.8rem); }
.article__cat {
  display: inline-block;
  font-size: var(--fs-label); letter-spacing: var(--tracking-wide); text-transform: uppercase;
  font-weight: 600; color: var(--gold); margin-bottom: 0.9rem;
}
.article__head h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); line-height: 1.12; margin-bottom: 1rem; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: var(--fs-sm); color: var(--muted-2); }
.article__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.article__rule { max-width: 72ch; margin: 0 auto clamp(1.6rem, 1rem + 1.5vw, 2.4rem); }

/* Reading body */
.prose { max-width: 72ch; margin-inline: auto; color: var(--text); }
.prose > * + * { margin-top: 1.15rem; }
.prose p { font-size: 1.075rem; line-height: 1.85; color: var(--muted); }
.prose strong { color: var(--text); }
.prose h2 {
  font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  color: var(--ivory); line-height: 1.2; margin-top: 2.6rem; padding-top: 0.2rem;
}
.prose h3 { font-family: var(--font-display); font-size: 1.28rem; color: var(--ivory); margin-top: 1.8rem; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-gold); }
.prose a:hover { text-decoration-color: var(--gold); }
.prose ul, .prose ol { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.prose li { position: relative; padding-left: 1.7rem; color: var(--muted); line-height: 1.7; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg);
  background: var(--grad-gold);
}
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: 0;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  color: var(--on-gold); background: var(--grad-gold);
}
.prose blockquote {
  margin-block: 1.6rem; padding: 1rem 1.3rem;
  border-left: 3px solid var(--gold);
  background: rgba(201,162,75,0.06); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text); font-family: var(--font-display); font-style: italic; font-size: 1.12rem;
}
.prose h2:first-child, .prose p:first-child { margin-top: 0; }

/* In-article CTA box */
.article-cta {
  max-width: 72ch; margin: clamp(2.2rem, 1.5rem + 2vw, 3.2rem) auto 0;
  background: var(--grad-surface); border: 1px solid var(--line-gold-soft);
  border-radius: var(--r-xl); padding: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  box-shadow: var(--glow-soft); text-align: center;
}
.article-cta h3 { font-size: var(--fs-h3); margin-bottom: 0.6rem; }
.article-cta p { color: var(--muted); margin-bottom: 1.4rem; max-width: 48ch; margin-inline: auto; }
.article-cta .btn-row { justify-content: center; }
.article-cta__note { font-size: 0.92rem; color: var(--muted); margin: 1.2rem auto 0; max-width: 52ch; }
.article-cta__note a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.article-cta__note a:hover { color: var(--gold-deep); }

/* FAQ */
.article-faq { max-width: 72ch; margin: clamp(2.2rem, 1.5rem + 2vw, 3.2rem) auto 0; }
.article-faq h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); color: var(--ivory); margin-bottom: 1.4rem; }
.faq-q { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.faq-q h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.06rem; color: var(--ivory); margin-bottom: 0.5rem; }
.faq-q p { color: var(--muted); font-size: var(--fs-sm); }

/* Related */
.related { max-width: 72ch; margin: clamp(2.2rem, 1.5rem + 2vw, 3.2rem) auto 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.related h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--ivory); margin-bottom: 1.2rem; }
.related ul { display: flex; flex-direction: column; gap: 0.7rem; }
.related a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-weight: 500; }
.related a:hover { color: var(--gold); }
.related a svg { width: 15px; height: 15px; color: var(--gold); flex-shrink: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
