/* Cameroon Journal — modern editorial redesign */
:root {
  --ink: #141414;
  --muted: #66635f;
  --paper: #ffffff;
  --soft: #f3f1ed;
  --line: #ddd9d3;
  --accent: #9d1d20;
  --accent-dark: #6f1013;
  --serif: "PT Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", Inter, Arial, Helvetica, sans-serif;
  --max: 1180px;
  --shadow: 0 18px 50px rgba(20, 20, 20, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.utility-bar {
  border-bottom: 1px solid var(--line);
  font: 12px/1.2 var(--sans);
  color: #57534e;
}
.utility-inner,
.masthead-inner,
.primary-nav-inner,
.page-wrap,
.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}
.utility-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.utility-links { display: flex; gap: 18px; flex-wrap: wrap; }
.utility-date { letter-spacing: .02em; }

.masthead { background: #fff; }
.masthead-inner {
  min-height: 118px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.menu-button,
.search-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #191919;
  border-radius: 2px;
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font: 14px var(--sans);
}
.search-button { justify-self: end; width: 40px; padding: 0; justify-content: center; }
.menu-icon { width: 18px; display: grid; gap: 4px; }
.menu-icon span { height: 1.5px; background: currentColor; display: block; }
.brand { text-align: center; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.035em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-tagline {
  margin-top: 7px;
  color: var(--muted);
  font: 12px var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.primary-nav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  position: sticky;
  top: 0;
  z-index: 50;
}
.primary-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}
.primary-nav-inner::-webkit-scrollbar { display:none; }
.primary-nav a {
  padding: 16px 12px;
  white-space: nowrap;
  font: 15px/1.2 var(--sans);
}
.primary-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

.page-wrap { flex: 1; }
.date-rule {
  margin: 26px 0 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.date-rule strong { font-size: 16px; }
.date-rule span { color: var(--muted); font: 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, .72fr) minmax(230px, .72fr);
  gap: 28px;
  align-items: start;
}
.story-image { overflow: hidden; background: #e8e5df; }
.story-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a:hover .story-image img { transform: scale(1.018); }
.hero-card .story-image { aspect-ratio: 16 / 10; }
.kicker {
  margin: 13px 0 7px;
  color: var(--accent);
  font: 700 11px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-title {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.hero-dek { margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
.story-meta { margin-top: 10px; color: #7a7773; font: 12px var(--sans); }

.stack-card { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.stack-card:last-child { margin-bottom: 0; }
.stack-card .story-image { aspect-ratio: 4 / 3; }
.stack-card h2 { font-size: 21px; line-height: 1.08; margin: 10px 0 0; }

.dont-miss { background: #efefef; padding: 18px 18px 8px; }
.dont-miss h2 { margin: 0 0 10px; font: 700 21px var(--sans); }
.dont-miss ol { list-style: none; counter-reset: dm; margin: 0; padding: 0; }
.dont-miss li { counter-increment: dm; display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 11px 0; border-top: 1px solid rgba(0,0,0,.09); }
.dont-miss li::before { content: counter(dm); color: var(--accent); font: italic 22px/1 var(--serif); }
.dont-miss a { font-size: 15px; line-height: 1.3; }

.section { margin: 42px 0 54px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a1a1a;
  margin-bottom: 22px;
}
.section-heading h2 { margin:0; font-size: 24px; line-height:1; }
.section-heading p { margin:0; color: var(--muted); font: 12px var(--sans); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px 24px; }
.story-card { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.story-card .story-image { aspect-ratio: 16/10; }
.story-card h3 { margin: 10px 0 5px; font-size: 21px; line-height: 1.12; letter-spacing: -.015em; }
.story-card p { margin:0; color: var(--muted); font-size: 14px; line-height:1.4; }

.guide-grid { display:grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.guide-card { padding: 18px 18px 22px 0; margin-right:18px; border-right:1px solid var(--line); }
.guide-card:last-child { border-right:0; margin-right:0; }
.guide-no { color: var(--accent); font: 700 12px var(--sans); }
.guide-card h3 { margin: 10px 0 6px; font-size: 18px; line-height:1.12; }
.guide-card p { margin:0; color:var(--muted); font: 12px/1.45 var(--sans); }

/* Article pages */
.article-layout { display:grid; grid-template-columns:minmax(0, 780px) minmax(220px, 300px); gap:70px; align-items:start; margin-top:36px; }
.breadcrumb { margin: 26px 0 0; color:var(--muted); font:12px var(--sans); }
.article-kicker { margin-top: 20px; }
.article-title { margin: 8px 0 12px; font-size: clamp(34px, 5vw, 62px); line-height: .99; letter-spacing: -.035em; }
.article-dek { margin: 0 0 16px; color:var(--muted); font-size:18px; line-height:1.45; }
.article-byline { border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding: 10px 0; color:#6a6763; font:12px var(--sans); display:flex; gap:14px; flex-wrap:wrap; }
.article-hero { margin: 26px 0 28px; aspect-ratio:16/9; background:var(--soft); overflow:hidden; }
.article-hero img { width:100%; height:100%; object-fit:cover; }
.article-body { font-size: 18px; line-height:1.75; }
.article-body p { margin: 0 0 1.25em; }
.article-body h2 { font-size: 31px; line-height:1.1; margin: 1.55em 0 .55em; }
.article-body h3 { font-size: 24px; line-height:1.15; margin: 1.35em 0 .5em; }
.article-body blockquote { margin: 1.5em 0; padding: 8px 0 8px 22px; border-left: 3px solid var(--accent); font-size: 22px; line-height:1.45; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body a { text-decoration: underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.article-body img { margin: 22px auto; border-radius: 1px; }
.article-body .wp-caption { max-width:100% !important; }
.article-aside { position:sticky; top:80px; }
.aside-box { border-top:3px solid #171717; padding-top:12px; }
.aside-box h2 { margin:0 0 8px; font:700 18px var(--sans); }
.aside-link { padding:12px 0; border-top:1px solid var(--line); font-size:15px; line-height:1.25; }

/* Archive/list pages */
.archive-header { margin: 38px 0 26px; padding-bottom:18px; border-bottom:2px solid #171717; }
.archive-header h1 { margin:0; font-size: clamp(36px,5vw,60px); line-height:1; }
.archive-header p { margin:9px 0 0; color:var(--muted); }
.archive-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap: 0 34px; margin-bottom:54px; }
.archive-item { padding:20px 0; border-bottom:1px solid var(--line); }
.archive-item h2 { margin:0; font-size:24px; line-height:1.12; }
.archive-item p { margin:7px 0 0; color:var(--muted); font-size:14px; }

.site-footer { margin-top:auto; background:#121212; color:#eee; }
.footer-inner { padding:38px 0 28px; }
.footer-grid { display:grid; grid-template-columns: 1.2fr 1fr 1fr; gap:40px; }
.footer-brand { font-size:26px; font-weight:700; line-height:1; }
.footer-copy { color:#aaa; font:12px/1.6 var(--sans); max-width:48ch; margin-top:10px; }
.footer-links { display:grid; gap:8px; font:13px var(--sans); }
.footer-bottom { border-top:1px solid #303030; margin-top:28px; padding-top:16px; color:#8e8e8e; font:11px var(--sans); display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1.45fr .8fr; }
  .dont-miss { grid-column: 1 / -1; display:grid; grid-template-columns: 160px 1fr; gap:18px; }
  .dont-miss ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; }
  .story-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .guide-grid { grid-template-columns:repeat(2,minmax(0,1fr)); border-bottom:0; }
  .guide-card { border-bottom:1px solid var(--line); }
  .article-layout { grid-template-columns:minmax(0,1fr); gap:35px; }
  .article-aside { position:static; }
}

@media (max-width: 700px) {
  .utility-links { display:none; }
  .utility-inner, .masthead-inner, .primary-nav-inner, .page-wrap, .footer-inner { width:min(100% - 26px,var(--max)); }
  .masthead-inner { min-height:92px; grid-template-columns:44px 1fr 44px; gap:8px; }
  .menu-button { width:40px; padding:0; justify-content:center; }
  .menu-button .menu-label { display:none; }
  .brand-name { font-size:27px; }
  .brand-tagline { font-size:9px; letter-spacing:.05em; }
  .primary-nav { display:none; }
  .primary-nav.is-open { display:block; position:fixed; inset:92px 0 auto 0; background:#fff; box-shadow:var(--shadow); }
  .primary-nav.is-open .primary-nav-inner { width:100%; display:grid; padding: 8px 18px 16px; }
  .primary-nav.is-open a { border-bottom:1px solid var(--line); padding:13px 3px; }
  .date-rule { margin:18px 0 22px; }
  .hero-grid { grid-template-columns:1fr; gap:24px; }
  .hero-title { font-size:34px; }
  .hero-dek { font-size:15px; }
  .secondary-stack { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .stack-card { margin:0; }
  .stack-card h2 { font-size:18px; }
  .dont-miss { grid-column:auto; display:block; }
  .dont-miss ol { display:block; }
  .story-grid, .archive-list, .footer-grid { grid-template-columns:1fr; }
  .guide-grid { grid-template-columns:1fr; }
  .guide-card { margin-right:0; border-right:0; }
  .section { margin:34px 0 42px; }
  .section-heading { align-items:flex-end; }
  .section-heading p { display:none; }
  .article-title { font-size:40px; }
  .article-body { font-size:17px; }
  .article-layout { margin-top:22px; }
}

@media (max-width: 460px) {
  .secondary-stack { grid-template-columns:1fr; }
  .stack-card { display:grid; grid-template-columns: 118px 1fr; gap:12px; padding-bottom:14px; }
  .stack-card .story-image { aspect-ratio:1.1; }
  .stack-card .kicker { margin-top:0; }
  .stack-card h2 { margin-top:5px; }
}
