/* ============================================================
   REJUUV MED — Journal (blog) layer.
   Asymmetric, text-forward editorial layout on the Emerald &
   Champagne theme. No per-post photos (the source reused a
   handful of images across dozens of posts); visual interest
   comes from scale, a featured story, index numerals and
   champagne accents. Reuses base CSS variables.
   ============================================================ */

/* ---- HERO (fixes the base .blog-hero, which flips to cream under the
   emerald theme; also stops the oversized title colliding with the back link) ---- */
.blog-hero {
  background:
    radial-gradient(ellipse 70% 60% at 82% 8%, rgba(205, 174, 116, 0.14), transparent 58%),
    linear-gradient(158deg, #14497a 0%, #0f3d66 55%, #0b2c4c 100%);
  color: var(--plum);
  padding: clamp(8rem, 14vh, 11rem) 0 clamp(2.5rem, 5vh, 3.5rem);
}
.blog-hero .lede { color: rgba(238, 231, 216, 0.7); max-width: 46ch; }
.blog-hero em.accent { color: var(--rose); }
/* block-level + fit-content so the category eyebrow drops to its own line below */
.blog-hero .article-back { display: flex; width: fit-content; margin-bottom: 1.5rem; color: rgba(238, 231, 216, 0.6); }
.blog-hero .article-back:hover { color: var(--rose); }
.blog-hero .eyebrow { margin-top: 0; }
.blog-hero h1 { margin-top: 0.7rem; }
.blog-hero .display-lg { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }   /* smaller than page heroes so 2 lines never overlap the eyebrow */
.blog-hero .post-meta {
  margin-top: 1.1rem; color: rgba(238, 231, 216, 0.5);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
}

/* ---- INDEX: category filter chips ---- */
.blog-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin-top: 1.8rem; }
.blog-cats button {
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.06em;
  padding: 0.5rem 1.15rem; border: 1px solid var(--line); border-radius: 100px;
  background: transparent; color: rgba(238, 231, 216, 0.7); cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.blog-cats button:hover { color: var(--plum); border-color: rgba(238, 231, 216, 0.32); }
.blog-cats button.is-active { background: var(--rose); border-color: var(--rose); color: #16110a; }

/* pagination */
.blog-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; margin-top: clamp(2rem, 4vw, 3rem); }
.blog-pager .pg-btn { min-width: 2.5rem; height: 2.5rem; padding: 0 0.6rem; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: rgba(238, 231, 216, 0.7); font-family: var(--sans); font-size: 0.82rem; cursor: pointer; transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease); }
.blog-pager .pg-btn:hover:not(:disabled) { color: var(--plum); border-color: rgba(238, 231, 216, 0.32); }
.blog-pager .pg-btn.is-active { background: var(--rose); border-color: var(--rose); color: #16110a; }
.blog-pager .pg-btn:disabled { opacity: 0.35; cursor: default; }

/* ---- FEATURED story ---- */
.blog-featured {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center; min-height: clamp(260px, 34vw, 380px);
  padding: clamp(1.8rem, 3.5vw, 3.2rem);
  margin-bottom: clamp(1rem, 1.8vw, 1.6rem);
  background:
    radial-gradient(ellipse 80% 90% at 88% 15%, rgba(205, 174, 116, 0.16), transparent 58%),
    linear-gradient(150deg, #154d80 0%, #0d3357 100%);
  border: 1px solid var(--line); border-radius: 8px; position: relative; overflow: hidden;
}
.blog-featured::after {
  content: "01"; position: absolute; right: clamp(1rem, 3vw, 2.4rem); bottom: -1.4rem;
  font-family: var(--serif); font-weight: 700; font-size: clamp(6rem, 14vw, 12rem);
  line-height: 1; color: rgba(205, 174, 116, 0.07); pointer-events: none;
}
.blog-featured .bf-tag { font-size: 0.64rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose); }
.blog-featured h2 {
  font-family: var(--serif); font-weight: 700; color: var(--plum);
  font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1.08; margin: 0.9rem 0 1rem;
}
.blog-featured p { color: rgba(238, 231, 216, 0.72); max-width: 52ch; }
.blog-featured .bf-meta { margin-top: 1.2rem; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(238, 231, 216, 0.45); }
.blog-featured .bf-go { display: inline-block; margin-top: 1.4rem; color: var(--rose); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; transition: gap 0.3s; }
.blog-featured:hover { border-color: rgba(205, 174, 116, 0.4); }
.blog-featured:hover .bf-go { color: var(--plum); }
.blog-featured .bf-aside { align-self: stretch; border-left: 1px solid var(--line); padding-left: clamp(1.2rem, 2.4vw, 2.2rem); display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; }
.blog-featured .bf-aside .k { font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(238, 231, 216, 0.4); }
.blog-featured .bf-aside .v { font-family: var(--serif); font-size: 1.2rem; color: var(--plum); }

/* ---- BENTO grid of text tiles (varied widths, dense packing) ---- */
.blog-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(0.9rem, 1.5vw, 1.35rem); grid-auto-rows: 1fr; grid-auto-flow: row dense; }
.b-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: clamp(190px, 22vw, 250px);
  padding: clamp(1.35rem, 2vw, 1.9rem);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.b-tile:hover { transform: translateY(-6px); border-color: rgba(205, 174, 116, 0.4); background: var(--panel-2); }
.b-tile .b-cat { font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--rose); }
.b-tile .b-num { position: absolute; top: 0.7rem; right: 1.1rem; font-family: var(--serif); font-weight: 700; font-size: 2.3rem; line-height: 1; color: rgba(205, 174, 116, 0.1); }
.b-tile h3 { font-family: var(--serif); color: var(--plum); line-height: 1.16; margin-top: auto; }
.b-tile p { color: rgba(238, 231, 216, 0.58); font-size: 0.9rem; margin-top: 0.7rem; }
.b-tile .b-meta { margin-top: 0.9rem; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(238, 231, 216, 0.4); }
.b-tile .b-go { color: var(--rose); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0; transform: translateX(-6px); transition: opacity 0.4s, transform 0.4s; margin-top: 0.8rem; }
.b-tile:hover .b-go { opacity: 1; transform: none; }
/* widths */
.b-tile.s2 { grid-column: span 2; }
.b-tile.s3 { grid-column: span 3; }
.b-tile.s4 { grid-column: span 4; }
.b-tile.s4 h3 { font-size: clamp(1.45rem, 2.1vw, 1.95rem); }
.b-tile.s3 h3 { font-size: clamp(1.3rem, 1.8vw, 1.7rem); }
.b-tile.s2 h3 { font-size: 1.16rem; }
.b-tile.s2 p { display: none; }   /* narrow tiles stay title-only */

/* photo tiles: reusable, attributed image behind a scrim, with a small credit */
.b-tile.has-img { border-color: rgba(205, 174, 116, 0.24); }
.b-tile .b-cover { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center 26%; transition: transform 0.6s var(--ease); }
.b-tile .b-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 26, 46, 0.94), rgba(8, 26, 46, 0.55) 50%, rgba(8, 26, 46, 0.45)); }
.b-tile.has-img > :not(.b-cover) { position: relative; z-index: 1; }
.b-tile.has-img:hover .b-cover { transform: scale(1.04); }
.b-tile .b-credit { position: absolute; bottom: 0.65rem; right: 0.9rem; z-index: 1; font-size: 0.54rem; letter-spacing: 0.06em; color: rgba(238, 231, 216, 0.5); }

/* scroll-in stagger (works with the site's .reveal observer; degrades fine without) */
.blog-bento .b-tile { transition-delay: calc(var(--i, 0) * 40ms); }

@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .bf-aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1.2rem; flex-direction: row; gap: 2rem; }
  .blog-bento { grid-template-columns: repeat(2, 1fr); }
  .b-tile.s2, .b-tile.s3, .b-tile.s4 { grid-column: span 2; }
  .b-tile.s2 p { display: block; }
}
@media (max-width: 560px) {
  .blog-bento { grid-template-columns: 1fr; }
  .b-tile.s2, .b-tile.s3, .b-tile.s4 { grid-column: span 1; }
}

/* ---- ARTICLE: left-aligned reading column that lines up with the hero
   (the base .article-col centres a 720px column; here it sits at the container's
   left edge, and the references live inside it so nothing breaks flush-left) ---- */
.article-body { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 2rem); }
.article-body .article-col { max-width: 760px; width: auto; margin: 0; }
.article-body .article-citations { margin-top: 2.6rem; }

/* lead photo (attributed) at the top of the reading column */
.article-lead { margin: 0 0 2.4rem; }
.article-lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 26%; border-radius: 6px; }
.article-lead figcaption { margin-top: 0.55rem; font-size: 0.72rem; color: rgba(238, 231, 216, 0.45); }
.article-lead figcaption a { color: rgba(238, 231, 216, 0.62); text-decoration: underline; text-underline-offset: 2px; }

/* open-access medical illustration shown as a framed archival plate (cream card,
   whole diagram visible) so light diagrams read as intentional on the dark page */
.article-lead.plate { background: #efe7d9; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; padding: clamp(1.2rem, 2.4vw, 2rem) clamp(1.2rem, 2.4vw, 2rem) 0.9rem; text-align: center; }
.article-lead.plate img { width: auto; max-width: 100%; max-height: 440px; aspect-ratio: auto; object-fit: contain; border-radius: 0; margin: 0 auto; }
.article-lead.plate figcaption { margin-top: 0.9rem; color: rgba(40, 34, 30, 0.62); font-size: 0.7rem; }
.article-lead.plate figcaption a { color: rgba(40, 34, 30, 0.8); }

/* ---- ARTICLE: prose rhythm (image-free) ---- */
.article-col > h2 { color: var(--plum); margin: 2.6rem 0 0.9rem; }
.article-col > h3 { color: var(--plum); margin: 1.9rem 0 0.6rem; font-size: 1.18rem; }
.article-col > p { color: rgba(238, 231, 216, 0.82); margin: 0 0 1.35rem; }
.article-col > p:first-of-type { font-size: 1.12rem; color: rgba(238, 231, 216, 0.92); }
.article-col ul, .article-col ol { margin: 0 0 1.5rem; padding-left: 1.4rem; color: rgba(238, 231, 216, 0.82); }
.article-col ul { list-style: disc; }
.article-col ol { list-style: decimal; }
.article-col li { margin: 0.5rem 0; padding-left: 0.2rem; }
.article-col li::marker { color: var(--rose); }

.callout { margin: 2rem 0; padding: 1.4rem 1.7rem; background: var(--panel-2); border-left: 3px solid var(--rose); border-radius: 5px; }
.callout .callout__label { font-family: var(--sans); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose); margin-bottom: 0.55rem; }
.callout p { margin: 0; color: var(--plum); font-style: italic; }

.cited-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.3rem; margin-top: 1.2rem; padding: 0.95rem 0 0.2rem; border-top: 1px solid var(--line); font-size: 0.8rem; }
.cited-strip .k { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--rose); }
.cited-strip a { color: rgba(238, 231, 216, 0.66); text-decoration: underline; text-underline-offset: 3px; }
.cited-strip a:hover { color: var(--plum); }
.article-citations .src { color: var(--mauve); font-size: 0.82rem; margin-left: 0.35rem; }

/* ---- standing "not medical advice" note ---- */
.article-col > p.article-disclaimer,
.blog-hero p.article-disclaimer { font-size: 0.82rem; line-height: 1.65; color: rgba(238, 231, 216, 0.46); font-style: italic; }
.article-col > p.article-disclaimer { margin: 2.4rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.blog-hero p.article-disclaimer { margin: 1rem 0 0; max-width: 46rem; }

/* ---- related strip (reuses the bento tiles) ---- */
.article-related { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2.4rem; }
.article-related .eyebrow { margin-bottom: 1.4rem; }
