/* ============================================================
   CLOUDSKIN, Journal (blog) styles  ·  "Alo, in warm light"
   Editorial, magazine-grade layout rendered in the CloudSkin
   design language: warm paper canvas, near-black ink, Inter for
   UI/meta, the brand --serif (Fraunces, Georgia for Greek, Noto
   Naskh for Arabic) italic for feature headlines. Loaded only on
   /blog and /blog/<slug>. All colours + type come from main.css
   tokens so the Journal stays in lockstep with the store.
   ============================================================ */

/* ---------- shared page frame ---------- */
.jwrap { max-width: var(--maxw); margin: 0 auto; }

/* ---------- masthead ---------- */
.jmast {
  text-align: center;
  padding: clamp(64px, 9vw, 128px) var(--pad) clamp(26px, 3.4vw, 48px);
  max-width: 940px; margin: 0 auto;
}
.jmast__eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .3em;
  text-transform: uppercase; color: var(--stone);
}
.jmast__title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.7rem, 6.4vw, 5rem); line-height: 1.02;
  letter-spacing: -.012em; color: var(--ink);
  margin: clamp(12px, 1.6vw, 20px) 0 0;
}
.jmast__lead {
  font-size: clamp(15px, 1.35vw, 18px); line-height: 1.78; font-weight: 300;
  color: var(--slate); max-width: 58ch; margin: clamp(16px, 2vw, 24px) auto 0;
}

/* ---------- preview / placeholder notice (only when WP not connected) ---------- */
.jnote {
  display: none; align-items: center; justify-content: center; gap: 10px;
  text-align: center; color: var(--stone);
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: 13px var(--pad); margin: 0 auto clamp(20px, 3vw, 34px);
  background: var(--oat); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.jnote.on { display: flex; }
.jnote::before {
  content: ""; width: 7px; height: 7px; flex: none; border-radius: 1px;
  background: var(--gold); transform: rotate(45deg);
}

/* ---------- category filters (wrap, never a scroll-rail: RTL-safe) ---------- */
.jfilter {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px;
  max-width: 1100px; margin: 0 auto; padding: 0 var(--pad) clamp(34px, 4.4vw, 60px);
}
.jfilter__btn {
  font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--stone);
  padding: 10px 17px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; cursor: pointer; white-space: nowrap;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.jfilter__btn:hover { color: var(--ink); }
.jfilter__btn.is-active {
  color: var(--ink); border-color: var(--line-2); background: var(--white);
}

/* ---------- featured band (most-recent story) ---------- */
.jfeat {
  display: grid; grid-template-columns: 1.12fr .88fr; align-items: center;
  gap: clamp(26px, 4vw, 68px);
  max-width: var(--maxw); margin: 0 auto clamp(56px, 8vw, 104px); padding: 0 var(--pad);
}
.jfeat[hidden] { display: none; }
.jfeat__media {
  position: relative; overflow: hidden; background: var(--oat);
  aspect-ratio: 5 / 4; display: block;
}
.jfeat__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 28%;
  transition: transform 1.2s var(--ease);
}
.jfeat:hover .jfeat__media img { transform: scale(1.04); }
.jfeat__body { max-width: 34rem; }
.jfeat__cat {
  font-size: 10.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--stone);
}
.jfeat__title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.9rem, 3.5vw, 3.05rem); line-height: 1.06; letter-spacing: -.01em;
  color: var(--ink); margin: clamp(12px, 1.4vw, 18px) 0 clamp(14px, 1.4vw, 18px);
}
.jfeat__excerpt {
  font-size: clamp(15px, 1.2vw, 16.5px); line-height: 1.85; font-weight: 300;
  color: var(--slate); max-width: 46ch; margin: 0 0 clamp(20px, 2.2vw, 28px);
}
.jfeat__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--stone); margin-bottom: clamp(20px, 2.2vw, 28px);
}
.jfeat__meta span[aria-hidden] { color: var(--mist); }

/* ---------- section label above the grid ---------- */
.jsec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}
.jsec-head h2 {
  font-family: var(--sans); font-size: clamp(13px, 1.1vw, 15px); font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
}
.jsec-head span {
  font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--stone);
}

/* ---------- the magazine grid ---------- */
.jgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(18px, 2.2vw, 40px); row-gap: clamp(38px, 5vw, 72px);
  max-width: var(--maxw); margin: 0 auto; padding: clamp(34px, 4.4vw, 58px) var(--pad) clamp(72px, 9vw, 124px);
}

/* ---------- editorial card ---------- */
.bcard { display: flex; flex-direction: column; color: var(--ink); }
.bcard__media {
  position: relative; overflow: hidden; background: var(--oat);
  aspect-ratio: 4 / 5; margin-bottom: clamp(14px, 1.4vw, 20px);
}
.bcard__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 26%;
  transition: transform 1.25s var(--ease);
}
.bcard:hover .bcard__media img { transform: scale(1.05); }
/* honest empty state: no invented photo for a real post that has no cover image */
.bcard__media--empty { display: grid; place-items: center; background: var(--sand); }
.bcard__media--empty::after {
  content: "CLOUDSKIN"; font-family: var(--sans); font-weight: 500;
  letter-spacing: .42em; font-size: 12px; color: var(--stone); text-indent: .42em;
}
.bcard__cat {
  font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 9px;
}
.bcard__title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.24rem, 1.6vw, 1.6rem); line-height: 1.14; letter-spacing: -.005em;
  color: var(--ink); margin: 0 0 9px;
}
.bcard__excerpt {
  font-size: 13.5px; line-height: 1.72; font-weight: 300; color: var(--slate);
  margin: 0 0 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bcard__meta {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--stone);
}
.bcard__meta span[aria-hidden] { color: var(--mist); }
/* quiet underline reveal on the title as the card is hovered */
.bcard__title { position: relative; display: inline; background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .5s var(--ease); padding-bottom: 2px; }
.bcard:hover .bcard__title { background-size: 100% 1px; }

/* ---------- numbered pagination (page 1, 2, 3...) ---------- */
.jgrid:has(+ .jpager:not([hidden])) { padding-bottom: clamp(30px, 3.4vw, 46px); }
.jpager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad) clamp(72px, 9vw, 120px);
}
.jpager[hidden] { display: none; }
.jpager__pg, .jpager__nav {
  min-width: 40px; height: 40px; padding: 0 9px;
  display: inline-grid; place-items: center;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--stone); background: transparent;
  border: 1px solid var(--line); border-radius: 2px; cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.jpager__nav { font-size: 18px; line-height: 1; }
.jpager__pg:hover, .jpager__nav:hover:not([disabled]) { color: var(--ink); border-color: var(--line-2); }
.jpager__pg.is-active { color: var(--white); background: var(--ink); border-color: var(--ink); cursor: default; }
.jpager__nav[disabled] { opacity: .3; cursor: default; }
.jpager__gap { color: var(--mist); padding: 0 3px; font-size: 13px; letter-spacing: .1em; user-select: none; }

/* ---------- loading skeleton ---------- */
.jskel { display: grid; grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(18px, 2.2vw, 40px); row-gap: clamp(38px, 5vw, 72px);
  max-width: var(--maxw); margin: 0 auto; padding: clamp(34px, 4.4vw, 58px) var(--pad) clamp(72px, 9vw, 124px); }
.jskel__c { }
.jskel__img { aspect-ratio: 4 / 5; background: var(--oat); margin-bottom: 16px; }
.jskel__l { height: 12px; background: var(--oat); margin-bottom: 10px; }
.jskel__l:nth-child(2) { width: 40%; } .jskel__l:nth-child(3) { width: 88%; } .jskel__l:nth-child(4) { width: 60%; }
@media (prefers-reduced-motion: no-preference) {
  .jskel__img, .jskel__l { position: relative; overflow: hidden; }
  .jskel__img::after, .jskel__l::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    animation: jshimmer 1.5s var(--ease) infinite;
  }
}
@keyframes jshimmer { to { transform: translateX(100%); } }

/* ============================================================
   ARTICLE  (/blog/<slug>)
   ============================================================ */
.post-head {
  max-width: 760px; margin: 0 auto; text-align: center;
  padding: clamp(72px, 10vw, 142px) var(--pad) clamp(24px, 3vw, 40px);
}
.post-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone); margin-bottom: clamp(20px, 2.6vw, 34px);
  transition: color .3s var(--ease);
}
.post-back:hover { color: var(--ink); }
.post-cat {
  font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  color: var(--stone);
}
.post-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.1rem, 4.8vw, 3.9rem); line-height: 1.05; letter-spacing: -.014em;
  color: var(--ink); margin: clamp(12px, 1.6vw, 20px) auto clamp(18px, 2vw, 26px); max-width: 18ch;
}
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--stone);
}
.post-meta span[aria-hidden] { color: var(--mist); }

.post-cover {
  position: relative; overflow: hidden; background: var(--oat);
  max-width: 1180px; margin: 0 auto clamp(38px, 5.4vw, 76px);
  aspect-ratio: 16 / 9;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }

/* ---------- long-form body: styles the sanitised WordPress HTML ---------- */
.post-body {
  max-width: 720px; margin: 0 auto; padding: 0 var(--pad) clamp(20px, 3vw, 40px);
  font-size: clamp(16px, 1.28vw, 18px); line-height: 1.9; color: var(--graphite); font-weight: 400;
}
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.35em; }
.post-body h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem); line-height: 1.16; letter-spacing: -.01em;
  color: var(--ink); margin: 1.7em 0 .55em;
}
.post-body h3 {
  font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink); margin: 2em 0 .5em;
}
.post-body h4 { font-family: var(--sans); font-weight: 600; font-size: 15px; color: var(--ink); margin: 1.6em 0 .4em; }
.post-body a {
  color: var(--ink); background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 1.15em; background-repeat: no-repeat;
  transition: opacity .3s var(--ease);
}
.post-body a:hover { opacity: .6; }
.post-body strong, .post-body b { font-weight: 600; color: var(--ink); }
.post-body em, .post-body i { font-style: italic; }
.post-body ul, .post-body ol { margin: 0 0 1.35em; padding-inline-start: 1.3em; }
.post-body li { margin: 0 0 .5em; padding-inline-start: .2em; }
.post-body ul li { list-style: none; position: relative; }
.post-body ul li::before {
  content: ""; position: absolute; inset-inline-start: -1em; top: .8em;
  width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg);
}
.post-body ol { list-style: decimal; }
.post-body blockquote {
  margin: 1.7em 0; padding-inline-start: 1.15em; border-inline-start: 2px solid var(--ink);
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.4; color: var(--ink);
}
.post-body blockquote p { margin: 0 0 .4em; }
.post-body figure { margin: 2em 0; }
.post-body img { width: 100%; height: auto; display: block; background: var(--oat); }
.post-body figcaption {
  margin-top: 10px; text-align: center; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--stone);
}
.post-body hr { border: 0; height: 1px; background: var(--line-2); margin: 2.4em auto; max-width: 120px; }
.post-body code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em;
  background: var(--oat); padding: .12em .4em; border-radius: 2px; }
.post-body pre { background: var(--oat); padding: 18px 20px; overflow-x: auto; margin: 0 0 1.35em; border-radius: 2px; }
.post-body pre code { background: none; padding: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.35em; font-size: .92em; }
.post-body th, .post-body td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: start; }
.post-body th { font-weight: 600; }

/* magazine drop-cap on the opening paragraph (Latin + Greek serif; off for RTL/non-Latin) */
.post-body > p:first-of-type::first-letter {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  float: left; font-size: 3.3em; line-height: .82; padding: .04em .1em 0 0; color: var(--ink);
}
html.i18n-rtl .post-body > p:first-of-type::first-letter,
html.i18n-nolatin .post-body > p:first-of-type::first-letter { float: none; font-size: inherit; padding: 0; }

/* ---------- article footer + continue reading ---------- */
.post-foot { text-align: center; padding: clamp(20px, 3vw, 40px) var(--pad) 0; }
.post-more {
  max-width: var(--maxw); margin: clamp(64px, 9vw, 120px) auto 0; padding: clamp(48px, 6vw, 80px) var(--pad) clamp(72px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.post-more__head {
  text-align: center; font-family: var(--sans); font-size: clamp(13px, 1.1vw, 15px); font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin-bottom: clamp(30px, 4vw, 52px);
}
.post-more__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(18px, 2.2vw, 40px); row-gap: clamp(38px, 5vw, 60px);
}

/* not-found state */
.post-missing { max-width: 640px; margin: 0 auto; text-align: center;
  padding: clamp(120px, 18vw, 220px) var(--pad); }
.post-missing__title { font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 4vw, 3rem); color: var(--ink); margin-bottom: 18px; }
.post-missing p { color: var(--slate); margin-bottom: 28px; }

/* ---------- directional glyphs (RTL flips arrows) ---------- */
.jarrow { display: inline-block; transition: transform .4s var(--spring); }
html.i18n-rtl .jarrow { transform: scaleX(-1); }
.jfeat__more:hover .jarrow, .post-back:hover .jarrow { transform: translateX(3px); }
html.i18n-rtl .jfeat__more:hover .jarrow, html.i18n-rtl .post-back:hover .jarrow { transform: scaleX(-1) translateX(3px); }

/* ---------- reveal (driven by js/blog.js, with a fallback timer) ---------- */
.bcard.reveal, .jfeat.reveal { opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.bcard.reveal.in, .jfeat.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .bcard.reveal, .jfeat.reveal { opacity: 1; transform: none; transition: none; }
  .jfeat__media img, .bcard__media img { transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .jgrid, .post-more__grid { grid-template-columns: repeat(2, 1fr); }
  .jskel { grid-template-columns: repeat(2, 1fr); }
  .jskel__c:nth-child(n+5) { display: none; }
  .jfeat { grid-template-columns: 1fr; gap: clamp(20px, 4vw, 32px); }
  .jfeat__media { aspect-ratio: 16 / 10; }
  .jfeat__body { max-width: 46rem; }
}
@media (max-width: 640px) {
  .jgrid, .post-more__grid { grid-template-columns: 1fr; row-gap: clamp(34px, 8vw, 46px); }
  .jskel { grid-template-columns: 1fr; }
  .jskel__c:nth-child(n+3) { display: none; }
  .bcard__media { aspect-ratio: 4 / 5; }
  .jfeat__media { aspect-ratio: 4 / 3; }
  .post-cover { aspect-ratio: 3 / 2; }
}
