/* =====================================================================
   YOGA FABRICS — Journal (Blog) Components
   Loaded AFTER main.css — reuses the design-system tokens
   (--ink, --green, --hairline, --font-head, --ease-* etc.).
   Covers: journal index cards, category chips, article prose,
   tables, key-takeaway boxes, author box, related posts, inline CTA.
   ===================================================================== */

/* ---------- Article card ---------- */
.bcard { position: relative; display: block; }
.bcard__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.bcard__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.88);
  transition: transform 1.1s var(--ease-out), filter 0.7s var(--ease-out);
}
.bcard:hover .bcard__media img { transform: scale(1.06); filter: saturate(1); }

.bcard__badge {
  position: absolute; top: 0.875rem; left: 0.875rem; z-index: 2;
  padding: 0.55em 0.95em 0.45em;
  font-family: var(--font-head); font-weight: 700; font-size: 0.6rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  background: rgba(10, 24, 38, 0.55); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

.bcard__body { padding-top: 1.15rem; }
.bcard__meta {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1.2rem;
  font-size: var(--t-tiny); font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.bcard__title {
  margin-top: 0.75rem;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.2rem, 2vw, 1.75rem); line-height: 1.05;
  transition: color 0.35s var(--ease-out);
}
.bcard:hover .bcard__title, .bcard:focus-visible .bcard__title { color: var(--green); }
.bcard__excerpt { margin-top: 0.6rem; font-size: 0.92rem; font-weight: 300; color: var(--muted); line-height: 1.7; }
.bcard__more {
  display: inline-flex; align-items: baseline; gap: 0.625rem;
  margin-top: 1.1rem;
  font-family: var(--font-head); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--green);
  transition: letter-spacing 0.4s var(--ease-out);
}
.bcard__more::before { content: ''; width: 1.6rem; height: 1px; background: var(--green); }
.bcard:hover .bcard__more { letter-spacing: 0.3em; }

/* ---------- Category chips (static, non-link) ---------- */
.cat-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cat-chip {
  padding: 0.9em 1.5em 0.78em;
  font-family: var(--font-head); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.22em; text-transform: uppercase; line-height: 1;
  border: 1px solid var(--hairline); color: var(--muted);
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

/* ---------- Journal editorial note ---------- */
.editorial-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 6vw, 7rem); align-items: start; }
.editorial-sign { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.28em; color: var(--green); }

/* =====================================================================
   ARTICLE PAGE
   ===================================================================== */

/* Hero with long titles */
.article-hero .hero__title { max-width: 15em; }
.article-hero .hero__sub { max-width: 40em; }

/* Breadcrumb already styled in main.css (dark variant) */

/* Article body — editorial prose */
.article { max-width: 46rem; margin-inline: auto; }
.article__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.article__meta {
  display: flex; flex-wrap: wrap; gap: 0.7rem 1.4rem;
  font-size: var(--t-tiny); font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted);
}
.article__meta time { white-space: nowrap; }
.article__title {
  margin-top: 1.3rem;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 0.98; letter-spacing: 0.01em;
}
.article__sub { margin-top: 1.35rem; font-size: var(--t-lead); font-weight: 300; line-height: 1.75; color: var(--muted); max-width: 36em; }

.prose { font-size: 1.02rem; font-weight: 300; line-height: 1.85; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.2rem; }
.prose h2 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.05; letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 0;
}
.prose h2::after {
  content: ''; display: block; width: 3.25rem; height: 2px;
  background: var(--green); margin-top: 0.9rem;
}
.prose h3 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.02rem, 1.5vw, 1.28rem); letter-spacing: 0.04em; line-height: 1.15;
  color: var(--ink);
  margin-top: 2.4rem;
}
.prose p { margin: 0; }
.prose ul, .prose ol { margin: 0; padding: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.6rem; }
.prose ul li::before {
  content: ''; position: absolute; left: 0; top: 0.9em;
  width: 0.7rem; height: 1px; background: var(--green);
}
.prose ul li + li, .prose ol li + li { margin-top: 0.55rem; }
.prose ol { counter-reset: step; }
.prose ol li { counter-increment: step; padding-left: 2.3rem; position: relative; }
.prose ol li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0.15em;
  font-family: var(--font-head); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.12em; color: var(--green);
}
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; transition: color 0.3s; }
.prose a:hover { color: var(--green); }

.prose blockquote {
  margin: 2.5rem 0;
  padding: 0.4rem 0 0.4rem clamp(1.4rem, 3vw, 2.4rem);
  border-left: 2px solid var(--green);
  font-size: var(--t-lead); font-weight: 400; line-height: 1.75;
  color: var(--ink); font-style: italic;
}

/* tables */
.prose table { width: 100%; border-collapse: collapse; margin: 2.2rem 0; font-size: 0.92rem; font-weight: 400; }
.prose thead th {
  font-family: var(--font-head); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase; text-align: left;
  color: var(--ink);
  padding: 0.95rem 1.1rem;
  border-bottom: 2px solid var(--ink);
}
.prose tbody th { font-weight: 600; color: var(--ink); text-align: left; }
.prose td, .prose tbody th { padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose tbody tr:last-child td, .prose tbody tr:last-child th { border-bottom: 1px solid var(--hairline); }

/* key takeaways box */
.takeaways {
  margin: 2.8rem 0;
  padding: clamp(1.5rem, 3vw, 2.3rem);
  background: var(--green-soft);
  border-left: 2px solid var(--green);
}
.takeaways__label {
  font-family: var(--font-head); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--green-dark);
}
.takeaways ul { list-style: none; margin-top: 1.1rem; padding: 0; }
.takeaways li { position: relative; padding-left: 1.6rem; }
.takeaways li::before {
  content: ''; position: absolute; left: 0; top: 0.8em;
  width: 0.7rem; height: 1px; background: var(--green);
}
.takeaways li + li { margin-top: 0.7rem; }

/* inline CTA panel */
.cta-inline {
  margin: 2.8rem 0;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: var(--ink-deep); color: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
}
.cta-inline h3 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.12; max-width: 19em;
  color: #fff; /* .prose h3 sets a dark colour globally; this box is dark, so it must win explicitly */
}
.cta-inline p { margin-top: 0.6rem; font-size: 0.85rem; font-weight: 300; color: var(--muted); }
.cta-inline .btn { flex: none; }

/* author box */
.author {
  display: flex; align-items: center; gap: 1.1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.7rem;
  border-top: 1px solid var(--hairline);
}
.author__mark {
  flex: none;
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em;
}
.author__name { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.08em; }
.author__role { margin-top: 0.25rem; font-size: var(--t-tiny); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* related posts */
.related {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--hairline);
}
.related-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.related-grid .bcard__excerpt { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .editorial-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .prose table { font-size: 0.85rem; }
  .prose td, .prose tbody th, .prose thead th { padding: 0.75rem 0.7rem; }
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
  .author { flex-wrap: wrap; }
}
