/* ── Quant49 Articles — shared stylesheet ────────────────────────────
   Used by /articles/index.html and every article page.
   Mirrors the main site's identity (src/App.css): palette, type,
   nav and footer treatment, quiet motion. */

:root {
  --white: #ffffff;
  --black: #0a0a0a;
  --black-alt: #111111;
  --bg-warm: #0f0d0b;
  --rule: rgba(255, 255, 255, 0.08);
  --gold: #e0c193;
  --gold-muted: rgba(224, 193, 147, 0.55);
  --gold-dim: rgba(224, 193, 147, 0.2);
  --gold-fill: #cda56f;
  --text: rgba(255, 255, 255, 0.82);
  --text-muted: rgba(255, 255, 255, 0.45);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; }

::selection { background: rgba(224, 193, 147, 0.25); color: #fff; }

/* ── Navigation (static mirror of the SPA nav) ── */
.jnav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  background: rgba(10, 10, 10, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.jnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jnav .logo-img { height: 36px; width: auto; display: block; object-fit: contain; }
.jnav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.jnav-link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}
.jnav-link:hover { color: var(--gold); }
.jnav-link-active { color: var(--gold); }
.jnav-cta {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 12px 24px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.jnav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
@media (max-width: 700px) {
  .jnav-links li.jnav-hide-mobile { display: none; }
  .jnav-inner { padding: 0 20px; }
}

/* ── Shared primitives ── */
.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.rule {
  width: 44px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
  border: none;
}
.btn-gold {
  display: inline-block;
  background: var(--gold-fill);
  color: var(--black);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 17px 38px;
  transition: background 0.3s;
}
.btn-gold:hover { background: var(--gold); }

/* ── Articles hub ── */
.hub-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(150px, 18vw, 220px) 28px clamp(56px, 7vw, 88px);
}
.hub-header h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 6.5vw, 76px);
  font-weight: 300;
  line-height: 1.06;
  color: #fff;
  margin: 18px 0 0;
}
.hub-header .rule { margin: 34px 0; }
.hub-standfirst {
  max-width: 620px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 2;
}
.hub-standfirst a { border-bottom: 1px solid var(--gold-dim); }

.hub-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px clamp(90px, 11vw, 150px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 56px 40px;
}
.card { display: block; }
.card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--black-alt);
  margin-bottom: 26px;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.card:hover .card-img img { transform: scale(1.04); }
.card .eyebrow { font-size: 9px; }
.card-title {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 300;
  line-height: 1.22;
  color: #fff;
  margin: 12px 0 10px;
  transition: color 0.3s;
}
.card:hover .card-title { color: var(--gold); }
.card-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 14px;
}
.card-meta {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hub-empty {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px clamp(110px, 13vw, 170px);
}
.hub-empty p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 560px;
}
.hub-empty a { border-bottom: 1px solid var(--gold-dim); font-style: normal; }

/* ── Article page ── */
.article-header {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(150px, 18vw, 210px) 24px 0;
}
.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5.4vw, 58px);
  font-weight: 300;
  line-height: 1.12;
  color: #fff;
  margin: 18px 0 22px;
}
.article-standfirst {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 30px;
}
.article-meta {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 38px;
}
.article-meta span { color: var(--gold-muted); padding: 0 10px; }

.article-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.article-hero img { width: 100%; }

figcaption {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding-top: 14px;
}

/* Article body typography */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 76px) 24px 0;
}
.article-body p { margin-bottom: 26px; }
.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(27px, 3.4vw, 34px);
  font-weight: 300;
  line-height: 1.25;
  color: #fff;
  margin: 62px 0 22px;
}
.article-body h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.3;
  color: #fff;
  margin: 44px 0 16px;
}
.article-body a {
  border-bottom: 1px solid var(--gold-dim);
  transition: border-color 0.3s;
}
.article-body a:hover { border-color: var(--gold-muted); }
.article-body ul, .article-body ol {
  margin: 0 0 26px 22px;
}
.article-body li { margin-bottom: 10px; }
.article-body li::marker { color: var(--gold-muted); }
.article-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  border-left: 1px solid var(--gold-muted);
  padding: 6px 0 6px 30px;
  margin: 44px 0;
}
.article-body figure { margin: 48px 0; }
.article-body strong { font-weight: 500; color: rgba(255, 255, 255, 0.95); }
.article-body em { font-family: var(--serif); font-size: 1.06em; }

/* Stat row — big serif numbers for key figures */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 0;
  margin: 48px 0;
}
.stat-value {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
}
.stat-label {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 180px;
  line-height: 1.7;
}

/* Mid-article + end CTA */
.article-cta {
  background: var(--bg-warm);
  border: 1px solid var(--gold-dim);
  padding: clamp(40px, 5vw, 60px) clamp(28px, 4vw, 52px);
  margin: 64px 0;
  text-align: center;
}
.article-cta .eyebrow { font-size: 9px; }
.article-cta-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 33px);
  font-weight: 300;
  line-height: 1.25;
  color: #fff;
  margin: 14px 0 14px;
}
.article-cta p {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 30px;
}
.article-cta-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 20px;
}
.article-cta-sub a { border-bottom: 1px solid var(--gold-dim); }

/* FAQ */
.article-faq { margin: 64px 0 0; }
.article-faq h2 {
  font-family: var(--serif);
  font-size: clamp(27px, 3.4vw, 34px);
  font-weight: 300;
  color: #fff;
  margin-bottom: 10px;
}
.article-faq details {
  border-bottom: 1px solid var(--rule);
}
.article-faq details:first-of-type { border-top: 1px solid var(--rule); margin-top: 28px; }
.article-faq summary {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 300;
  color: #fff;
  padding: 22px 36px 22px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color 0.3s;
}
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-muted);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 300;
  transition: transform 0.4s var(--ease);
}
.article-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.article-faq summary:hover { color: var(--gold); }
.article-faq details p {
  font-size: 14px;
  color: var(--text-muted);
  padding: 0 0 26px;
  max-width: 640px;
}

/* Sources & author */
.article-sources { margin: 72px 0 0; border-top: 1px solid var(--rule); padding-top: 40px; }
.article-sources h2 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.article-sources ol { margin-left: 18px; }
.article-sources li {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.8;
}
.article-sources a { border-bottom: 1px solid var(--gold-dim); word-break: break-word; }

.article-author {
  display: flex;
  align-items: baseline;
  gap: 6px 14px;
  flex-wrap: wrap;
  margin: 56px 0 0;
  border-top: 1px solid var(--rule);
  padding: 36px 0 clamp(80px, 10vw, 120px);
}
.article-author-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
}
.article-author-role {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.article-author-role a { color: var(--gold-muted); }
.article-author-role a:hover { color: var(--gold); }

/* Back to articles */
.article-back {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.3s;
}
.article-back:hover { color: var(--gold); }

/* ── Footer (static mirror of the SPA footer) ── */
.jfooter {
  background: #030302;
  border-top: 1px solid rgba(224, 193, 147, 0.18);
  text-align: center;
  padding: 52px 24px;
}
.jfooter-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.jfooter .logo-img { height: 32px; width: auto; object-fit: contain; }
.jfooter-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}
.jfooter-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.jfooter-nav a { color: var(--text-muted); transition: color 0.3s; }
.jfooter-nav a:hover { color: var(--gold); }
.jfooter-nav span { color: var(--gold-dim); }
.jfooter-copy {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
}
.jfooter-links {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.2);
}
.jfooter-links a { color: rgba(255, 255, 255, 0.35); transition: color 0.3s; }
.jfooter-links a:hover { color: var(--gold); }

/* ── Reveal motion (quiet) ──
   Gated behind html.js (set by an inline script) so content is never
   hidden from crawlers or users without JavaScript. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card-img img, .card:hover .card-img img { transition: none; transform: none; }
}
