/* Goodness News — visual identity
   Paper warm background, ink navy text, marigold + forest-green accents.
   Newsreader for headlines/bylines, Inter for UI and meta. */

:root {
  --paper: #FAF6EE;
  --paper-dim: #F2ECDD;
  --ink: #12141C;
  --ink-soft: #4A4C56;
  --marigold: #B4790A;
  --marigold-deep: #8F5F08;
  --forest: #2B5A4A;
  --rule: #DED4BE;
  --rule-strong: #C9BC9C;
  --white: #FFFFFF;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Topbar */
.topbar { background: var(--ink); color: var(--paper-dim); font-size: 0.8rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; }
.topbar-date { opacity: 0.7; }
.topbar-parent { font-weight: 500; }

/* Masthead */
.masthead { background: var(--paper); padding-top: 28px; }
.masthead-inner { text-align: center; }
.nameplate {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
  display: inline-block;
}
.nameplate-main { color: var(--ink); }
.nameplate-accent { color: var(--marigold); font-style: italic; font-weight: 500; }
.tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 6px 0 22px;
}
.mast-rule { height: 3px; background: var(--marigold); }

/* Nav */
.mainnav { background: var(--ink); }
.mainnav-inner { display: flex; align-items: center; padding: 0 20px; }
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
.nav-list a {
  display: block;
  color: var(--paper-dim);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 13px 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.nav-list a:hover { color: var(--marigold); background: rgba(255,255,255,0.03); }
.nav-toggle { display: none; background: none; border: 0; padding: 14px 4px; cursor: pointer; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--paper-dim); margin: 4px 0;
}

/* Layout helpers */
main { min-height: 40vh; }
.section { padding: 40px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--ink);
}
.section-head h2 {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin: 0;
}
.section-head .see-all { font-size: 0.85rem; font-weight: 600; color: var(--forest); }
.section-head .see-all:hover { color: var(--marigold); }

/* Category tag */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--forest);
  border-bottom: 2px solid var(--forest);
  padding-bottom: 2px;
  margin-bottom: 10px;
}
.tag.developing { color: var(--marigold-deep); border-color: var(--marigold); }

/* Featured / lead story grid */
.frontpage-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding: 36px 0;
}
.lead-story .lead-image { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--rule); }
.lead-story h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15; margin: 14px 0 10px;
}
.lead-story p.dek { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 12px; }
.byline { font-size: 0.8rem; color: var(--ink-soft); }

.side-stories { display: flex; flex-direction: column; gap: 22px; }
.side-story { display: flex; gap: 14px; border-top: 1px solid var(--rule); padding-top: 18px; }
.side-story:first-child { border-top: 0; padding-top: 0; }
.side-story img { width: 96px; height: 96px; object-fit: cover; flex-shrink: 0; background: var(--rule); }
.side-story h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; line-height: 1.25; }

/* Category rows */
.story-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.story-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--rule); margin-bottom: 12px; }
.story-card h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; line-height: 1.28; }
.story-card p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

/* Most read list */
.most-read { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.most-read li {
  counter-increment: rank;
  display: flex; gap: 14px; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--rule);
}
.most-read li:first-child { border-top: 0; }
.most-read li::before {
  content: counter(rank);
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--marigold);
  width: 24px; flex-shrink: 0;
}
.most-read h3 { font-size: 0.98rem; font-weight: 600; margin: 0; font-family: var(--serif); }

/* Article page */
.article-head { max-width: 760px; margin: 36px auto 0; padding: 0 20px; }
.article-head h1 {
  font-family: var(--serif); font-weight: 600; line-height: 1.15;
  font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 12px 0 14px;
}
.article-dek { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 16px; }
.article-meta { font-size: 0.85rem; color: var(--ink-soft); padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.article-hero { max-width: 900px; margin: 28px auto; padding: 0 20px; }
.article-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--rule); }
.article-body { max-width: 720px; margin: 0 auto; padding: 0 20px 60px; }
.article-body p { font-size: 1.08rem; line-height: 1.7; margin: 0 0 20px; }
.article-body h2, .article-body h3 { font-family: var(--serif); margin: 32px 0 12px; }
.developing-flag {
  background: var(--paper-dim); border-left: 3px solid var(--marigold);
  padding: 12px 16px; font-size: 0.9rem; font-style: italic; color: var(--ink-soft); margin: 0 0 20px;
}
.editor-note {
  border-top: 1px solid var(--rule); margin-top: 40px; padding-top: 20px;
  font-size: 0.85rem; color: var(--ink-soft); font-style: italic;
}

/* Static content pages */
.page-content { max-width: 720px; margin: 40px auto 60px; padding: 0 20px; }
.page-content h1 { font-family: var(--serif); font-size: 2rem; margin-bottom: 18px; }
.page-content p { font-size: 1.05rem; line-height: 1.7; margin-bottom: 18px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper-dim); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 44px 20px 28px; }
.footer-brand .nameplate-main, .footer-brand .nameplate-accent { font-family: var(--serif); font-size: 1.4rem; }
.footer-brand p { color: #A8ABBA; font-size: 0.9rem; margin-top: 12px; max-width: 42ch; }
.footer-links { display: flex; gap: 40px; }
.footer-links h4 { font-size: 0.8rem; text-transform: none; color: var(--marigold); margin: 0 0 12px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--marigold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 20px; font-size: 0.78rem; color: #7C7F8E; }

/* Responsive */
@media (max-width: 860px) {
  .frontpage-grid { grid-template-columns: 1fr; gap: 28px; }
  .story-row { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-list {
    display: none; flex-direction: column; width: 100%;
    position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); z-index: 20;
  }
  .nav-list.open { display: flex; }
  .nav-list a { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .mainnav-inner { position: relative; }
}
@media (max-width: 560px) {
  .story-row { grid-template-columns: 1fr; }
  .topbar-parent { display: none; }
}
