/* ============================================================
   PETRONA JOURNAL — editorial component layer
   Loads AFTER css/main.css. Extends the existing design system;
   never overrides it. Every class is prefixed "j-" to guarantee
   zero collisions with site styles (.spec, .section, etc.).
   ============================================================ */

/* ---------- Journal homepage: featured article ---------- */
.j-featured{
  display:grid;grid-template-columns:repeat(12,1fr);
  gap:clamp(1.25rem,2.5vw,2.5rem);align-items:center;
}
.j-featured__media{grid-column:1 / span 7;position:relative;overflow:hidden;aspect-ratio:16/10}
.j-featured__media img{width:100%;height:100%;object-fit:cover;transition:transform 1.1s var(--ease)}
.j-featured:hover .j-featured__media img{transform:scale(1.04)}
.j-featured__body{grid-column:9 / span 4;display:flex;flex-direction:column;gap:1.1rem}
.j-featured__body h2{font-family:var(--font-display);font-weight:400;font-size:clamp(1.8rem,3vw,2.6rem);line-height:1.1}
.j-featured__body h2 a{transition:color .3s}
.j-featured__body h2 a:hover{color:var(--terracotta)}
.j-featured__body p{color:#4c483f}
@media (max-width:860px){
  .j-featured__media{grid-column:1 / -1}
  .j-featured__body{grid-column:1 / -1}
}

/* ---------- Journal homepage: filter bar ---------- */
.j-filters{
  display:flex;flex-wrap:wrap;gap:1rem 1.75rem;align-items:center;
  justify-content:space-between;
  margin-bottom:clamp(2rem,4vw,3rem);
  border-top:1px solid rgba(10,10,10,.16);
  padding-top:1.4rem;
}
.j-cats{display:flex;flex-wrap:wrap;gap:.5rem 1.6rem}
.j-cat{
  font-size:.72rem;font-weight:700;letter-spacing:.26em;text-transform:uppercase;
  color:var(--stone);padding-block:.35rem;position:relative;
  transition:color .3s var(--ease);
}
.j-cat::after{
  content:"";position:absolute;left:0;bottom:0;height:1px;width:0;
  background:var(--terracotta);transition:width .35s var(--ease);
}
.j-cat:hover{color:var(--onyx)}
.j-cat.is-active{color:var(--terracotta)}
.j-cat.is-active::after{width:100%}
.j-search{position:relative}
.j-search input{
  font:inherit;font-size:.95rem;color:var(--onyx);background:transparent;
  border:none;border-bottom:1px solid rgba(10,10,10,.25);
  padding:.5rem 1.6rem .5rem .1rem;width:min(240px,60vw);border-radius:0;
  transition:border-color .3s;
}
.j-search input::placeholder{color:var(--stone)}
.j-search input:focus{outline:none;border-bottom-color:var(--terracotta)}
.j-search svg{
  position:absolute;right:0;top:50%;transform:translateY(-50%);
  width:16px;height:16px;stroke:var(--stone);fill:none;stroke-width:2;
  pointer-events:none;
}

/* ---------- Journal homepage: article cards ---------- */
.j-grid{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(1.25rem,2.5vw,2.5rem);
}
@media (max-width:960px){.j-grid{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.j-grid{grid-template-columns:1fr}}
.j-card{display:flex;flex-direction:column;background:var(--white)}
.j-card__media{position:relative;overflow:hidden;aspect-ratio:4/3;display:block}
.j-card__media img{width:100%;height:100%;object-fit:cover;transition:transform 1.1s var(--ease)}
.j-card:hover .j-card__media img{transform:scale(1.05)}
.j-card__cat{
  position:absolute;top:1rem;left:1.15rem;z-index:2;
  font-size:.66rem;font-weight:700;letter-spacing:.3em;text-transform:uppercase;
  color:var(--white);text-shadow:0 1px 8px rgba(0,0,0,.35);
}
.j-card__body{padding:1.6rem 1.6rem 1.8rem;display:flex;flex-direction:column;gap:.8rem;flex:1}
.j-card__meta{
  display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;
  font-size:.68rem;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--stone);
}
.j-card__body h3{font-family:var(--font-display);font-weight:400;font-size:1.4rem;line-height:1.2}
.j-card__body h3 a{transition:color .3s}
.j-card__body h3 a:hover{color:var(--terracotta)}
.j-card__body p{font-size:.95rem;color:#4c483f;flex:1}
.j-card__body .textlink{margin-top:.3rem}
.j-empty{
  padding:3.5rem 1rem;text-align:center;color:var(--stone);
  border-top:1px solid rgba(10,10,10,.14);border-bottom:1px solid rgba(10,10,10,.14);
}

/* ---------- Article: meta strip under page-hero ---------- */
.j-artmeta{
  display:flex;flex-wrap:wrap;gap:.5rem 2.5rem;
  border-top:1px solid rgba(255,255,255,.35);
  padding-top:1.2rem;margin-top:1.8rem;
  font-size:.7rem;font-weight:700;letter-spacing:.26em;text-transform:uppercase;
  color:rgba(255,255,255,.75);
}

/* ---------- Article: body typography ---------- */
.j-prose{max-width:66ch;margin-inline:auto}
.j-prose p{margin-bottom:1.35rem;color:#2e2b26;line-height:1.7}
.j-prose p:last-child{margin-bottom:0}
.j-prose h2{
  font-family:var(--font-display);font-weight:400;
  font-size:clamp(1.7rem,3vw,2.4rem);line-height:1.12;
  margin:0 0 1.4rem;
}
.j-prose h2 em{font-style:italic}
.j-prose h3{
  font-family:var(--font-display);font-weight:400;
  font-size:clamp(1.25rem,2vw,1.55rem);line-height:1.25;
  margin:2.4rem 0 .9rem;
}
.j-prose strong{font-weight:700}
.j-prose a{color:var(--terracotta);border-bottom:1px solid rgba(184,92,60,.35);transition:border-color .3s}
.j-prose a:hover{border-color:var(--terracotta)}

.j-dropcap::first-letter{
  font-family:var(--font-display);font-style:italic;
  font-size:4.4em;line-height:.78;color:var(--terracotta);
  float:left;padding:.08em .12em 0 0;
}

/* ---------- Article: chapter folio ---------- */
.j-folio{display:flex;align-items:center;gap:1.25rem;margin-bottom:clamp(2rem,4vw,3.25rem)}
.j-folio__num{font-family:var(--font-display);font-style:italic;font-size:1.35rem;color:var(--terracotta);flex-shrink:0}
.j-folio__label{font-size:.72rem;font-weight:700;letter-spacing:.32em;text-transform:uppercase;color:var(--stone)}
.j-folio__rule{flex:1;height:1px;background:rgba(10,10,10,.18)}
.on-dark .j-folio__rule{background:rgba(255,255,255,.2)}
.on-dark .j-folio__label{color:rgba(255,255,255,.55)}

/* ---------- Article: figures ---------- */
.j-fig{margin:clamp(2.5rem,5vw,4rem) 0}
.j-fig img{width:100%;height:auto}
.j-fig--wide img{aspect-ratio:16/9;object-fit:cover}
.j-fig figcaption{
  display:flex;gap:.9rem;align-items:baseline;padding-top:.85rem;
  font-size:.85rem;color:var(--stone);line-height:1.5;
}
.j-fig figcaption::before{
  content:"";width:1.6rem;height:1px;background:var(--terracotta);
  flex-shrink:0;transform:translateY(-.28em);
}
.j-figpair{
  display:grid;grid-template-columns:1fr 1fr;gap:clamp(1rem,2.5vw,2rem);
  margin:clamp(2.5rem,5vw,4rem) 0;
}
.j-figpair img{width:100%;aspect-ratio:4/5;object-fit:cover}
.j-figpair figcaption{
  display:flex;gap:.9rem;align-items:baseline;padding-top:.85rem;
  font-size:.85rem;color:var(--stone);line-height:1.5;
}
.j-figpair figcaption::before{
  content:"";width:1.6rem;height:1px;background:var(--terracotta);
  flex-shrink:0;transform:translateY(-.28em);
}
@media (max-width:640px){.j-figpair{grid-template-columns:1fr}}

/* ---------- Article: pull quote ---------- */
.j-pull{max-width:30ch;margin:clamp(3rem,6vw,5rem) auto;text-align:center}
.j-pull::before{content:"";display:block;width:2.75rem;height:1px;background:var(--terracotta);margin:0 auto 1.6rem}
.j-pull blockquote{
  font-family:var(--font-display);font-style:italic;
  font-size:clamp(1.55rem,3.2vw,2.3rem);line-height:1.3;letter-spacing:-.01em;
}
.j-pull cite{
  display:block;margin-top:1.3rem;font-style:normal;font-family:var(--font-body);
  font-size:.7rem;font-weight:700;letter-spacing:.3em;text-transform:uppercase;color:var(--stone);
}

/* ---------- Article: callout ---------- */
.j-callout{
  background:var(--white);border-left:2px solid var(--terracotta);
  padding:clamp(1.5rem,3vw,2.25rem);margin:2.4rem 0;
}
.j-callout .eyebrow{display:block;margin-bottom:.8rem}
.j-callout p{margin:0;font-size:1rem}
.j-callout p + p{margin-top:.9rem}
.white-bg .j-callout{background:var(--bone)}

/* ---------- Article: dark stat band ---------- */
.j-stats{
  display:grid;grid-template-columns:1fr 1fr;
  gap:clamp(1.5rem,4vw,3rem);max-width:760px;margin:3rem auto 0;text-align:center;
}
.j-stats .j-stat__n{
  font-family:var(--font-display);font-style:italic;
  font-size:clamp(2.6rem,5.5vw,4rem);line-height:1;color:var(--terracotta);
}
.j-stats .j-stat__l{
  margin-top:.8rem;font-size:.72rem;font-weight:700;letter-spacing:.28em;
  text-transform:uppercase;color:rgba(255,255,255,.6);line-height:1.7;
}
@media (max-width:560px){.j-stats{grid-template-columns:1fr;gap:2.2rem}}

/* ---------- Article: comparison table (spec sheet) ---------- */
.j-table{background:var(--white);margin:clamp(2.5rem,5vw,4rem) 0}
.white-bg .j-table{border:1px solid rgba(10,10,10,.1)}
.j-table__head,.j-table__row{display:grid;grid-template-columns:1.25fr 1fr 1fr}
.j-table__head{border-bottom:2px solid var(--onyx)}
.j-table__head > div{
  padding:1.15rem 1.25rem;
  font-size:.72rem;font-weight:700;letter-spacing:.26em;text-transform:uppercase;color:var(--stone);
}
.j-table__head .j-table__mat{font-family:var(--font-display);font-size:1.05rem;font-weight:400;letter-spacing:.06em;text-transform:none;color:var(--onyx)}
.j-table__row{border-bottom:1px solid rgba(10,10,10,.09)}
.j-table__row:last-of-type{border-bottom:none}
.j-table__row > div{padding:.95rem 1.25rem;font-size:.95rem}
.j-table__crit{font-weight:700;color:var(--onyx)}
.j-table__val{color:#3d3a35}
.j-edge{
  display:inline-block;margin-right:.45rem;width:.5rem;height:.5rem;
  border-radius:50%;background:var(--terracotta);transform:translateY(-.08em);
}
.j-table__foot{
  padding:.9rem 1.25rem;font-size:.82rem;color:var(--stone);
  border-top:1px solid rgba(10,10,10,.09);
}
@media (max-width:700px){
  .j-table{overflow-x:auto}
  .j-table__head,.j-table__row{grid-template-columns:9.5rem 8.5rem 8.5rem;min-width:26.5rem}
}

/* ---------- Article: recommendation grid ---------- */
.j-recs{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(255px,1fr));
  gap:clamp(1rem,2vw,1.5rem);margin:2.5rem 0;
}
.j-rec{background:var(--white);padding:1.75rem 1.6rem 1.6rem;display:flex;flex-direction:column;gap:.75rem}
.white-bg .j-rec{background:var(--bone)}
.j-rec__app{font-size:.7rem;font-weight:700;letter-spacing:.28em;text-transform:uppercase;color:var(--stone)}
.j-rec__verdict{font-family:var(--font-display);font-style:italic;font-size:1.45rem;line-height:1.15;color:var(--terracotta)}
.j-rec__verdict--sage{color:var(--sage)}
.j-rec p{font-size:.93rem;line-height:1.6;color:#3d3a35;margin:0}

/* ---------- Article: numbered decision list ---------- */
.j-decide{counter-reset:jq;max-width:66ch;margin:2.4rem auto 0;list-style:none}
.j-decide li{
  counter-increment:jq;
  display:grid;grid-template-columns:auto 1fr;gap:1.4rem;
  padding-block:1.5rem;border-top:1px solid rgba(10,10,10,.14);
}
.j-decide li:last-child{border-bottom:1px solid rgba(10,10,10,.14)}
.j-decide li::before{
  content:"Q" counter(jq);
  font-family:var(--font-display);font-style:italic;
  font-size:1.5rem;color:var(--terracotta);line-height:1.2;
}
.j-decide h4{font-family:var(--font-display);font-weight:400;font-size:1.2rem;margin-bottom:.45rem}
.j-decide p{font-size:.97rem;color:#3d3a35;margin:0}

/* ---------- Article: author card ---------- */
.j-author{
  background:var(--white);padding:clamp(2rem,4vw,3rem);
  max-width:66ch;margin-inline:auto;display:grid;gap:1rem;
}
.j-author h3{font-family:var(--font-display);font-weight:400;font-size:1.35rem}
.j-author p{font-size:.97rem;color:#3d3a35}

/* ---------- Article: references ---------- */
.j-refs{max-width:66ch;margin-inline:auto}
.j-refs ol{margin:1.5rem 0 0 1.2rem}
.j-refs li{font-size:.92rem;color:#3d3a35;margin-bottom:.75rem;line-height:1.55}

/* ---------- Article: share bar ---------- */
.j-share{
  display:flex;flex-wrap:wrap;align-items:center;gap:.9rem 1.1rem;
  max-width:66ch;margin:clamp(2.5rem,5vw,3.5rem) auto 0;
  border-top:1px solid rgba(10,10,10,.16);padding-top:1.5rem;
}
.j-share__label{
  font-size:.7rem;font-weight:700;letter-spacing:.28em;text-transform:uppercase;
  color:var(--stone);margin-right:.6rem;
}
.j-share a,.j-share button{
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;border:1px solid rgba(10,10,10,.25);border-radius:50%;
  color:var(--onyx);transition:background .3s var(--ease),color .3s var(--ease),border-color .3s var(--ease);
}
.j-share a:hover,.j-share button:hover{background:var(--onyx);border-color:var(--onyx);color:var(--bone)}
.j-share svg{width:17px;height:17px;fill:currentColor}
.j-share__copied{font-size:.85rem;color:var(--sage);opacity:0;transition:opacity .3s}
.j-share__copied.is-visible{opacity:1}

/* ---------- Article: back link + related ---------- */
.j-back{margin-bottom:clamp(2rem,4vw,3rem)}
.j-related-head{
  display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;
  gap:1.5rem;margin-bottom:clamp(2rem,4vw,3rem);
}

/* ---------- Article: closing CTA band ---------- */
.j-cta{
  text-align:center;max-width:52rem;margin-inline:auto;
  display:flex;flex-direction:column;align-items:center;gap:1.6rem;
}
.j-cta h2{font-family:var(--font-display);font-weight:400;font-size:clamp(1.9rem,3.6vw,3rem);line-height:1.08}
.j-cta p{color:rgba(255,255,255,.72);max-width:46ch}
.j-cta__actions{display:flex;gap:1.2rem 1.8rem;flex-wrap:wrap;justify-content:center;align-items:center}


/* Journal hero background video */
.page-hero__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
