/* Singbud blog
   Builds on css/styles.css (tokens, type, buttons, FAQ cards, footer). Only blog layout lives here.
   Same rules as the landing page: flat colour blocks, no gradients, no blurry shadows. */

/* ---------- Top bar ---------- */

.blog-nav { background: var(--mint); padding: 14px 0 0; }
.blog-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.blog-nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 26px; }
.blog-nav-links a {
  font-weight: 600; text-decoration: none;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.blog-nav-links a:hover, .blog-nav-links a[aria-current="page"] { border-bottom-color: var(--coral); }
.blog-nav-actions { display: flex; align-items: center; gap: 14px; }
.blog-nav .btn { flex: none; }
/* Narrow phones: Bud's mark alone keeps room for the button */
@media (max-width: 399px) { .blog-nav .brand > span:last-child { display: none; } }

/* ---------- Page hero ---------- */

.post-hero { padding: 26px 0 44px; overflow: hidden; }
.post-hero-grid { display: grid; gap: 22px; align-items: center; }
.crumbs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.95rem; color: var(--ink-soft); }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--dash); }
.crumbs a { font-weight: 600; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-title {
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.03em;
}
.post-lede { margin-top: 16px; font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
/* The blog index: text only, centred */
.post-hero.is-centered .post-hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.post-hero.is-centered .crumbs { justify-content: center; }
.post-hero.is-centered .post-title { max-width: 16ch; }
.post-hero.is-centered .post-lede { margin-left: auto; margin-right: auto; max-width: 48ch; }
.post-art { width: 100%; max-width: 440px; margin: 0 auto; }
.post-art .bud-stage { width: 100%; }
.post-art svg { width: 100%; height: auto; }

/* ---------- Illustrated scenes (blog-art.js) ---------- */

.scene-art { display: block; width: 100%; height: auto; overflow: visible; }
/* Bud inside a scene keeps the box the scene gave him; the site rule sizes a bare Bud at 100% */
.scene-figure { width: auto; height: auto; max-width: none; overflow: visible; }
.scene-bob { animation: bob 4.5s ease-in-out infinite; }
.scene-figure .bud-eye { animation: blink 5.5s infinite; }
.scene-figure.bud-sing .bud-sound { animation: sound 1.4s ease-in-out infinite; }
.scene-figure.bud-nervous .bud-sweat { transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-in-out infinite; }
.scene-flame { animation: tilt 1.6s ease-in-out infinite; }
.scene-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: tilt 5s ease-in-out infinite; }
.scene-sway:nth-of-type(2n) { animation-delay: -1.7s; }
.scene-sway:nth-of-type(3n) { animation-delay: -3.1s; }

/* ---------- Article body ---------- */

.post-body { background: var(--cream); padding: 44px 0 64px; }
.prose { max-width: 700px; margin: 0 auto; font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose .table-hint + .table-wrap { margin-top: 0.4em; }
.prose h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem);
  margin-top: 2.1em; scroll-margin-top: 24px;
}
.prose h3 { font-size: 1.35rem; margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--coral-text); font-weight: 700; }
.prose a { text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 600; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose strong { font-weight: 700; }
.prose sup { line-height: 0; font-size: 0.7em; }
.prose sup a { font-weight: 700; text-decoration: none; padding: 0 2px; }

/* Short answer box at the top of an article */
.answer {
  background: var(--white); border-radius: var(--r-card);
  box-shadow: 0 6px 0 var(--cream-deep);
  padding: 22px 24px;
}
.answer-label {
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--coral-text); margin-bottom: 6px;
}

/* On this page */
.toc { background: var(--mint); border-radius: 22px; padding: 18px 22px; }
.toc-title { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.3em; font-size: 1rem; }
.toc li + li { margin-top: 4px; }

/* A friendly aside */
.note-card {
  background: var(--sun); border-radius: 22px; padding: 18px 22px;
}
.note-card.is-mint { background: var(--belly); }
.note-card.is-blush { background: var(--blush); }
.note-card p + p { margin-top: 0.6em; }

/* Numbered steps with big coral numbers */
.prose .steps-list { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps-list > li {
  counter-increment: step;
  position: relative; padding: 16px 18px 16px 64px;
  background: var(--white); border-radius: 20px;
}
.steps-list > li + li { margin-top: 0; }
.steps-list > li::before {
  content: counter(step);
  position: absolute; left: 16px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--coral); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1;
}
.steps-list strong { display: block; font-family: var(--font-head); font-size: 1.15rem; line-height: 1.3; }

/* Figures */
.figure { margin: 1.6em 0 0; }
.figure-box { background: var(--white); border-radius: var(--r-card); padding: 18px; box-shadow: 0 6px 0 var(--cream-deep); }
.figure-box svg { width: 100%; height: auto; }
.figure figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--ink-soft); }

/* Tables scroll inside their own box, never the page */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--white); border-radius: 22px; box-shadow: 0 6px 0 var(--cream-deep);
}
.table-wrap:focus-visible { outline: 3px solid var(--ink); }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.98rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; }
.prose thead th { font-family: var(--font-head); font-size: 1.02rem; background: var(--mint); }
.prose tbody tr + tr { border-top: 2px solid var(--cream); }
.prose tbody th { font-weight: 700; }
.table-note { font-size: 0.95rem; color: var(--ink-soft); }
.table-hint { font-size: 0.92rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 0.5em; }
@media (min-width: 760px) { .table-hint { display: none; } }

/* Inline pitch-test call to action */
.cta-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center;
  background: var(--white); border-radius: var(--r-card);
  box-shadow: 0 6px 0 #CDEBEB;
  padding: 18px 20px;
  margin-top: 1.8em;
}
.cta-card .bud-stage { width: 84px; }
.cta-card h2, .cta-card .cta-card-title {
  font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1.2; margin: 0;
}
.cta-card p { margin-top: 4px; color: var(--ink-soft); font-size: 1rem; }
.cta-card .btn { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

/* FAQ uses the landing .faq-item cards */
.post-faq { display: grid; gap: 12px; }
.post-faq .faq-a p + p { margin-top: 0.6em; }

/* Sources */
.sources { font-size: 0.95rem; color: var(--ink-soft); }
.sources li { overflow-wrap: anywhere; }
.updated { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Related and blog index cards ---------- */

.related { background: var(--mint); padding: 52px 0 60px; }
.related h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem); margin-bottom: 24px; }
.post-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.post-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--white); border-radius: var(--r-card);
  box-shadow: 0 6px 0 #CDEBEB;
  overflow: hidden;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #CDEBEB; }
.post-card-art { position: relative; height: 170px; overflow: hidden; background: var(--mint); }
.post-card-art .scene-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.post-card-body { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-kicker { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--coral-text); }
.post-card h2, .post-card h3 { font-size: 1.35rem; line-height: 1.2; }
.post-card a { text-decoration: none; }
/* The whole card is one link target */
.post-card a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.post-card a:focus-visible { outline: none; }
.post-card:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.post-card p { color: var(--ink-soft); font-size: 1rem; }
.post-card-more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 0.98rem; }
.post-card-more span { border-bottom: 2px solid var(--coral); }

.blog-list { background: var(--cream); padding: 44px 0 64px; }
.blog-intro { max-width: 700px; margin: 0 0 30px; color: var(--ink-soft); }

/* ---------- Get Singbud band ---------- */

.get { background: var(--coral); color: var(--cream); padding: 52px 0 64px; }
.get-grid { display: grid; gap: 10px; align-items: center; }
.get-bud { width: 170px; margin: 0 auto; }
.get .eyebrow { color: var(--sun); }
.get h2 { color: var(--white); }
.get .sec-lede { color: #FFE9E4; margin-left: 0; }
.get-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; max-width: 520px; }
.store-btn { gap: 10px; }
.store-btn svg { width: 22px; height: 22px; flex: none; }
.get-alt { margin-top: 18px; color: #FFE9E4; }
.get-alt a { color: var(--white); font-weight: 700; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Footer additions ---------- */

.footer-side { display: grid; gap: 12px; justify-items: start; }
@media (min-width: 900px) { .footer-side { justify-items: end; } }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; font-weight: 700; }
.footer-links a { color: var(--cream); text-decoration: none; border-bottom: 2px solid transparent; }
.footer-links a:hover { border-bottom-color: var(--coral); }

/* ---------- Larger screens ---------- */

@media (min-width: 560px) {
  .get-actions { flex-direction: row; flex-wrap: wrap; }
  .cta-card { grid-template-columns: 110px 1fr auto; padding: 20px 26px; }
  .cta-card .bud-stage { width: 110px; }
  .cta-card .btn { grid-column: auto; margin-top: 0; }
  .post-cards { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 760px) {
  .blog-nav-links { display: flex; }
  .post-hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 40px; }
  .post-art { max-width: 460px; }
  .post-cards.is-three { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .post-hero { padding: 34px 0 60px; }
  .post-body { padding: 64px 0 84px; }
  .related { padding: 72px 0 84px; }
  .get { padding: 72px 0 84px; }
  .get-grid { grid-template-columns: 260px 1fr; gap: 48px; }
  .get-bud { width: 230px; }
  .blog-list { padding: 64px 0 84px; }
  .post-cards.is-index { grid-template-columns: repeat(3, 1fr); }
  .post-cards.is-index > li:first-child { grid-column: span 2; }
  .post-cards.is-index > li:first-child .post-card { flex-direction: row; }
  .post-cards.is-index > li:first-child .post-card-art { height: auto; min-height: 240px; flex: 0 0 46%; }
  .post-cards.is-index > li:first-child h2 { font-size: 1.7rem; }
}

/* ---------- Blog index: topic hubs (tools/build-blog.py) ---------- */
.hub-nav { background: var(--cream); padding: 22px 0 0; }
.hub-count { font-weight: 800; font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 10px; }
.hub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hub-chip {
  display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--white);
  box-shadow: 0 3px 0 var(--cream-deep); font-weight: 700; font-size: 0.95rem; color: var(--ink); text-decoration: none;
}
.hub-chip:hover { background: var(--sun); }
.blog-hub { padding: 34px 0 10px; scroll-margin-top: 80px; }
.blog-hub:last-of-type { padding-bottom: 64px; }
.hub-head { max-width: 62ch; margin-bottom: 18px; }
.hub-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; }
.hub-head p { margin-top: 6px; color: var(--ink-soft); }
.post-cards.is-hub { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 700px) { .post-cards.is-hub { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .post-cards.is-hub { grid-template-columns: repeat(3, 1fr); } }
/* Phones: the topic chips scroll sideways in one row instead of stacking into five */
@media (max-width: 699px) {
  .hub-nav ul { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter, 20px)); padding: 2px var(--gutter, 20px) 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .hub-nav ul::-webkit-scrollbar { display: none; }
  .hub-nav li { flex: none; }
  .blog-hub { padding-top: 26px; }
}
