/*
Theme Name: Money Without Noise
Author: Autumn
Version: 5.0 — Editorial Base
*/

/* ===============================
   ROOT SYSTEM
   =============================== */

:root {
  --black: #000;
  --gray: #555;
  --light: #eaeaea;

  --canvas: 1400px;
  --reading: 760px;
}

/* ===============================
   RESET
   =============================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--black);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  font-size: 16px;
}

/* ===============================
   GLOBAL WRAPPER
   =============================== */

.mwn-wrap {
  max-width: var(--canvas);
  margin: 0 auto;
  padding: 0 48px;
}

/* ===============================
   LINKS
   =============================== */

a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  opacity: 0.7;
}

/* ===============================
   TYPOGRAPHY
   =============================== */

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 20px;
  margin: 2.5rem 0 0.75rem;
}

p {
  max-width: var(--reading);
  margin: 0 0 1.4rem;
}

/* ===============================
   HEADER
   =============================== */

.mwn-header {
  border-bottom: 1px solid var(--black);
}

.mwn-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.mwn-brand a {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Navigation (desktop default) */
.mwn-nav {
  display: flex;
  gap: 32px;
}

.mwn-nav a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
}

.mwn-nav .current-menu-item a {
  color: var(--black);
  border-bottom: 1px solid var(--black);
}

/* CTA */

.mwn-cta {
  padding: 10px 18px;
  border: 1px solid var(--black);
  background: var(--black);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ===============================
   MAIN CONTENT
   =============================== */

.mwn-main {
  padding: 56px 0 88px;
}

/* Reading column (used by posts later) */
.editorial-reading {
  max-width: var(--reading);
}

/* ===============================
   ENTRY CONTENT
   =============================== */

.entry-content {
  margin-top: 48px;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content h2,
.entry-content h3 {
  max-width: var(--reading);
}

/* Lists */
.entry-content ul,
.entry-content ol {
  padding-left: 22px;
}

/* ===============================
   IMAGES — BLACK & WHITE
   =============================== */

img {
  filter: grayscale(100%) contrast(1.05);
}

figure,
.wp-block-image {
  max-width: 1100px;
  margin: 64px 0;
}

figure img,
.wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   FOOTER
   =============================== */

.mwn-footer {
  border-top: 1px solid var(--black);
  padding: 56px 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
}

.mwn-footer-signup {
  border-top: 1px solid var(--black);
  margin-top: 56px;
  padding-top: 56px;
}

.footer-signup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.footer-signup-copy strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  display: block;
  margin-bottom: 12px;
}

/* ===============================
   MOBILE — BASE ONLY
   =============================== */

@media (max-width: 900px) {

  body {
    font-size: 17px;
    line-height: 1.6;
  }

  .mwn-wrap {
    padding: 0 24px;
  }

  .mwn-header__bar {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .mwn-nav {
    display: none;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 22px;
  }

  .footer-signup-inner {
    grid-template-columns: 1fr;
  }
}
/* ======================================
   HOMEPAGE — EDITORIAL INDEX
   ====================================== */

.home-editorial {
  max-width: var(--canvas);
  margin: 0 auto;
  padding: 0 48px;
}

/* ---------- HERO ---------- */

.home-hero {
  padding: 56px 0 72px;
}

.home-hero-inner {
  max-width: var(--canvas);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: start;
}

.home-hero-copy h1 {
  max-width: 760px;
}

.home-hero-copy p {
  max-width: 520px;
}

.home-actions {
  margin-top: 24px;
  display: flex;
  gap: 16px;
}

/* Context block */
.home-context {
  border-left: 1px solid var(--black);
  padding-left: 24px;
}

.context-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
}

.context-stat {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 48px;
  line-height: 1;
  margin: 8px 0;
}

/* ---------- FEATURED ---------- */

.home-feature {
  padding: 72px 0;
}

.home-feature-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--canvas);
}

.home-feature-image {
  margin: 0;
}

.home-feature-text {
  max-width: 520px;
}

.home-feature-text .eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
  margin-bottom: 12px;
}

.read-link {
  display: inline-block;
  margin-top: 12px;
}

/* ---------- RECENT WRITING ---------- */

.home-recent {
  padding: 72px 0;
}

.editorial-section-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 32px;
}

.home-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.home-recent-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
}

.home-recent-text h4 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.home-recent-text .mwn-meta {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ======================================
   MOBILE — HOMEPAGE
   ====================================== */

@media (max-width: 900px) {

  .home-editorial {
    padding: 0 24px;
  }

  .home-hero-inner,
  .home-feature-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .home-context {
    border-left: none;
    padding-left: 0;
    margin-top: 24px;
  }

  .home-recent-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .home-recent-item {
    grid-template-columns: 72px 1fr;
  }
}
/* ======================================
   HOMEPAGE — SECTION FRONT (FIXED)
   ====================================== */

/* Homepage uses full canvas */
.home-editorial {
  width: 100%;
}

/* Kill nested centering */
.home-editorial .home-hero-inner,
.home-editorial .home-feature-inner,
.home-editorial .home-recent-inner {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Establish ONE left alignment rail */
.home-hero,
.home-feature,
.home-recent {
  padding-left: 48px;
  padding-right: 48px;
}

/* ---------- HERO ---------- */

.home-hero {
  padding-top: 56px;
  padding-bottom: 72px;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: 760px 1fr;
  gap: 64px;
  align-items: start;
}

/* ---------- FEATURED ---------- */

.home-feature {
  padding-top: 72px;
  padding-bottom: 72px;
}

.home-feature-inner {
  display: grid;
  grid-template-columns: 560px 1fr;
  gap: 64px;
  align-items: center;
}

/* ---------- RECENT ---------- */

.home-recent {
  padding-top: 72px;
  padding-bottom: 96px;
}

.home-recent-grid {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1100px;
}

/* Make recent items align to the same rail */
.home-recent-inner {
  max-width: 1100px;
}

/* ======================================
   MOBILE — STACK, SAME LOGIC
   ====================================== */

@media (max-width: 900px) {

  .home-hero,
  .home-feature,
  .home-recent {
    padding-left: 24px;
    padding-right: 24px;
  }

  .home-hero-inner,
  .home-feature-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .home-recent-grid {
    grid-template-columns: 1fr;
  }
}
/* ======================================
   RECENT WRITING — EDITORIAL CARDS
   Image defines the column width
   ====================================== */

.home-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

/* Each article is a vertical stack */
.home-recent-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}

/* Image defines the width */
.home-recent-image {
  width: 100%;
  margin-bottom: 16px;
}

.home-recent-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.05);
}

/* Text is locked to image width */
.home-recent-text {
  width: 100%;
}

/* Title sits UNDER image */
.home-recent-text h4 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 6px;
}

/* Meta stays subtle */
.home-recent-text .mwn-meta {
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.6;
}

/* ======================================
   MOBILE — STACK CLEANLY
   ====================================== */

@media (max-width: 900px) {
  .home-recent-grid {
    grid-template-columns: 1fr;
  }
}
/* ======================================
   EDITORIAL CARD SYSTEM
   Used on: homepage + single + categories
   ====================================== */

.editorial-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 32px;
}

.editorial-card {
  max-width: 260px;
}

.editorial-card-image {
  width: 100%;
  margin-bottom: 14px;
}

.editorial-card-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.05);
}

.editorial-card-text h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}

.editorial-card-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ======================================
   SINGLE PAGE CONTINUE READING
   ====================================== */

.single-related {
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid #eaeaea;
}

.editorial-section-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0.7;
}

/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 1000px) {
  .editorial-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .editorial-card-grid {
    grid-template-columns: 1fr;
  }

  .editorial-card {
    max-width: 100%;
  }
}
/* ======================================
   CATEGORY PAGES — EDITORIAL INDEX
   ====================================== */

.category .mwn-wrap {
  max-width: 1400px;
}

.category-header {
  margin-bottom: 48px;
}

.category-header h1 {
  font-size: 48px;
  line-height: 1.1;
}

/* Dense but elegant */
.category .editorial-card-grid {
  gap: 56px;
}

/* Titles stay quiet */
.category .editorial-card-text h4 {
  font-size: 17px;
  line-height: 1.3;
}

/* No meta clutter */
.category .mwn-meta {
  display: none;
}
/* ===========================
   CATEGORY PAGES — TRUE GRID
   =========================== */

/* Widen the browsing canvas */
.category-archive .mwn-wrap {
  max-width: 1400px;
}

/* Grid layout */
.category-archive .category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}

/* Card behavior */
.category-archive .category-card {
  display: flex;
  flex-direction: column;
}

/* Image first */
.category-archive .category-thumb img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 14px;
  filter: grayscale(100%);
}

/* Title stays WITH image width */
.category-archive .category-title {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 6px;
  max-width: 100%;
}

/* Meta stays quiet */
.category-archive .category-meta {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #777;
}

/* Tablet */
@media (max-width: 1100px) {
  .category-archive .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 700px) {
  .category-archive .category-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}