/* ============================================================
   THE PEAK JOURNAL — SodaPeak's editorial magazine design.
   Deliberately distinct from the storefront pages:
   Roboto display headings + Open Sans body, newspaper rules,
   numbered cards, drop caps, pull-ledes and deal boxes.
   ============================================================ */
:root {
  --pj-head: 'Roboto', 'Segoe UI', sans-serif;
  --pj-body: 'Open Sans', Verdana, sans-serif;
  --pj-ink: #1b1512;
  --pj-paper: #fffefb;
  --pj-rule: #d9cdb8;
  --pj-soft: #5d5245;
  --pj-science: #6e1f2d;
  --pj-vitality: #8a6017;
  --pj-energy: #b35a10;
  --pj-buying: #1f3d2b;
  --pj-lifestyle: #2f4858;
  --pj-myths: #5b3a6e;
}

/* ---------- Masthead ---------- */
.pj-masthead { background: var(--pj-ink); color: #f3ead9; padding: 34px 0 26px; border-bottom: 4px double var(--sp-gold); text-align: center; }
.pj-masthead .kick { font-family: var(--pj-body); font-size: .72rem; letter-spacing: 4px; text-transform: uppercase; color: var(--sp-gold); }
.pj-masthead h1, .pj-masthead .pj-mast-title { font-family: var(--pj-head); font-weight: 900; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .06em; text-transform: uppercase; color: #fff; margin: 6px 0 4px; }
.pj-masthead .tag { font-family: var(--pj-body); font-size: .9rem; color: #cbbfa9; font-style: italic; }
.pj-catnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.pj-catnav a { font-family: var(--pj-body); font-size: .78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #e9dcc5; border: 1px solid rgba(233,220,197,.35); border-radius: 999px; padding: 6px 14px; }
.pj-catnav a:hover { background: var(--sp-gold); border-color: var(--sp-gold); color: #241502; }

/* ---------- Shared type on journal pages ---------- */
.pj { font-family: var(--pj-body); color: var(--pj-soft); }
.pj h2, .pj h3, .pj .pj-title { font-family: var(--pj-head); color: var(--pj-ink); }

/* ---------- Index: featured story ---------- */
.pj-featured { display: grid; grid-template-columns: 1.15fr .85fr; border: 1px solid var(--pj-rule); background: #fff; margin: 40px 0 10px; }
.pj-featured .txt { padding: 36px 38px; }
.pj-featured .art { background: linear-gradient(145deg, #241a16, #481019); display: flex; align-items: center; justify-content: center; padding: 26px; }
.pj-featured .art img { max-width: 320px; filter: drop-shadow(0 22px 36px rgba(0,0,0,.55)); }
.pj-flag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #fff; background: var(--pj-science); padding: 5px 12px; margin-bottom: 14px; }
.pj-featured h2 { font-weight: 900; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.15; margin-bottom: 12px; }
.pj-featured h2 a { color: var(--pj-ink); }
.pj-featured h2 a:hover { color: var(--pj-science); }
.pj-featured p { font-size: .98rem; }
.pj-readmeta { font-size: .8rem; color: #8d7f6c; letter-spacing: .4px; }

/* ---------- Index: category sections ---------- */
.pj-cathead { display: flex; align-items: baseline; gap: 16px; margin: 54px 0 20px; border-bottom: 3px solid var(--pj-ink); padding-bottom: 8px; }
.pj-cathead h2 { font-weight: 900; font-size: 1.35rem; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.pj-cathead .count { font-size: .8rem; color: #8d7f6c; }
.pj-cathead .dot { width: 12px; height: 12px; flex-shrink: 0; transform: rotate(45deg); }

/* ---------- Index: story cards ---------- */
.pj-card { border: 1px solid var(--pj-rule); background: #fff; padding: 22px 20px 18px; height: 100%; display: flex; flex-direction: column; position: relative; transition: box-shadow .2s, transform .2s; }
.pj-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(27, 21, 18, .12); }
.pj-card .no { position: absolute; top: 14px; right: 16px; font-family: var(--pj-head); font-weight: 900; font-size: 1.6rem; color: #e7dcc6; line-height: 1; }
.pj-card .cat { font-size: .68rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 10px; }
.pj-card h3 { font-weight: 700; font-size: 1.08rem; line-height: 1.3; margin-bottom: 8px; padding-right: 30px; }
.pj-card h3 a { color: var(--pj-ink); }
.pj-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--sp-gold); text-underline-offset: 3px; }
.pj-card p { font-size: .88rem; flex-grow: 1; margin-bottom: 12px; }
.pj-card .meta { font-size: .76rem; color: #8d7f6c; border-top: 1px dotted var(--pj-rule); padding-top: 10px; }

/* category accents */
.c-science .cat, .c-science .dot { color: var(--pj-science); background-color: var(--pj-science); }
.c-vitality .cat, .c-vitality .dot { color: var(--pj-vitality); background-color: var(--pj-vitality); }
.c-energy .cat, .c-energy .dot { color: var(--pj-energy); background-color: var(--pj-energy); }
.c-buying .cat, .c-buying .dot { color: var(--pj-buying); background-color: var(--pj-buying); }
.c-lifestyle .cat, .c-lifestyle .dot { color: var(--pj-lifestyle); background-color: var(--pj-lifestyle); }
.c-myths .cat, .c-myths .dot { color: var(--pj-myths); background-color: var(--pj-myths); }
.pj-card .cat, .pj-cathead .cat { background-color: transparent !important; }
.pj-card { border-top: 3px solid var(--pj-rule); }
.c-science.pj-card { border-top-color: var(--pj-science); }
.c-vitality.pj-card { border-top-color: var(--pj-vitality); }
.c-energy.pj-card { border-top-color: var(--pj-energy); }
.c-buying.pj-card { border-top-color: var(--pj-buying); }
.c-lifestyle.pj-card { border-top-color: var(--pj-lifestyle); }
.c-myths.pj-card { border-top-color: var(--pj-myths); }

/* ---------- Article page ---------- */
.pj-progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--sp-gold), var(--sp-amber)); z-index: 400; transition: width .1s linear; }
.pj-article { max-width: 780px; margin: 0 auto; padding: 48px 20px 10px; }
.pj-article .pj-crumbs { font-family: var(--pj-body); font-size: .8rem; color: #8d7f6c; margin-bottom: 20px; }
.pj-article .pj-crumbs a { color: var(--pj-science); }
.pj-chip { display: inline-block; font-family: var(--pj-body); font-size: .7rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #fff; padding: 6px 14px; margin-bottom: 16px; }
.pj-article h1 { font-family: var(--pj-head); font-weight: 900; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.12; letter-spacing: -.01em; color: var(--pj-ink); margin-bottom: 18px; }
.pj-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--pj-body); font-size: .82rem; color: #8d7f6c; border-top: 3px solid var(--pj-ink); border-bottom: 1px solid var(--pj-rule); padding: 12px 2px; margin-bottom: 26px; }
.pj-meta b { color: var(--pj-ink); font-weight: 700; }
.pj-hook { font-family: var(--pj-body); font-size: 1.18rem; line-height: 1.6; color: var(--pj-ink); border-left: 5px solid var(--sp-gold); padding: 6px 0 6px 20px; margin: 0 0 30px; font-style: italic; }
.pj-body { font-family: var(--pj-body); }
.pj-body > p:first-of-type::first-letter { font-family: var(--pj-head); font-weight: 900; font-size: 3.4em; float: left; line-height: .82; padding: 6px 10px 0 0; color: var(--pj-science); }
.pj-body h2 { font-family: var(--pj-head); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: var(--pj-ink); margin: 36px 0 12px; padding-top: 14px; border-top: 1px solid var(--pj-rule); }
.pj-body p, .pj-body li { font-size: 1.02rem; line-height: 1.75; color: var(--pj-soft); }
.pj-body ul, .pj-body ol { padding-left: 24px; margin-bottom: 18px; }
.pj-body li { margin-bottom: 8px; }
.pj-body li::marker { color: var(--sp-gold-deep); }
.pj-body a { color: var(--pj-science); text-decoration: underline; text-decoration-color: rgba(110,31,45,.35); text-underline-offset: 3px; }
.pj-body a:hover { color: var(--sp-amber-deep); }
.pj-body strong { color: var(--pj-ink); }

/* ---------- Deal box (buying-intent CTA) ---------- */
.pj-deal { background: linear-gradient(135deg, #241a16, #481019); border: 1px solid var(--sp-gold); padding: 26px 28px; margin: 34px 0; position: relative; overflow: hidden; }
.pj-deal::before { content: ''; position: absolute; top: -40%; right: -10%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(216,171,94,.25), transparent 70%); }
.pj-deal .k { font-family: var(--pj-body); font-size: .7rem; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase; color: var(--sp-gold); }
.pj-deal h3 { font-family: var(--pj-head); font-weight: 900; color: #fff; font-size: 1.35rem; margin: 8px 0 6px; }
.pj-deal p { color: #e8d9c2; font-size: .95rem; margin-bottom: 16px; }
.pj-deal .sp-btn { position: relative; z-index: 1; }

/* ---------- Related stories ---------- */
.pj-related { border-top: 3px solid var(--pj-ink); margin-top: 44px; padding-top: 18px; }
.pj-related .label { font-family: var(--pj-head); font-weight: 900; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pj-ink); margin-bottom: 16px; }
.pj-related .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pj-rel { border: 1px solid var(--pj-rule); background: #fff; padding: 16px; }
.pj-rel .cat { font-size: .64rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 6px; background: transparent !important; }
.pj-rel a.t { font-family: var(--pj-head); font-weight: 700; font-size: .94rem; line-height: 1.3; color: var(--pj-ink); display: block; }
.pj-rel a.t:hover { color: var(--pj-science); }

/* ---------- Back to journal strip ---------- */
.pj-backbar { text-align: center; margin: 40px 0 0; }
.pj-backbar a { font-family: var(--pj-body); font-weight: 700; font-size: .9rem; letter-spacing: 1px; text-transform: uppercase; color: var(--pj-ink); border: 2px solid var(--pj-ink); padding: 10px 24px; display: inline-block; }
.pj-backbar a:hover { background: var(--pj-ink); color: var(--sp-gold-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pj-featured { grid-template-columns: 1fr; }
  .pj-featured .art { order: -1; padding: 30px; }
  .pj-featured .art img { max-width: 240px; }
  .pj-related .grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pj-masthead { padding: 26px 0 20px; }
  .pj-article { padding-top: 34px; }
  .pj-hook { font-size: 1.05rem; }
  .pj-featured .txt { padding: 26px 22px; }
  .pj-deal { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pj-progress { transition: none; }
}
