/* Pat Mazza — independent journalism
   Palette: newsprint, press ink, editor's vermilion */
:root {
  --newsprint: #f2ede2;
  --newsprint-2: #e9e2d3;
  --ink: #121826;
  --ink-2: #2c3342;
  --muted: #696555;
  --rule: #cdc4b1;
  --red: #c23b1a;
  --red-dark: #9c2d12;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 44px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--newsprint);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--newsprint); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--newsprint); padding: 8px 12px; z-index: 10; }

.kicker {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
  margin: 0 0 14px;
}
.kicker.muted { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #c9c4b7; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.04em; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; }
.topbar a { color: var(--newsprint); text-decoration: none; font-weight: 600; }
.topbar a:hover { color: #f08a6c; }
.topbar .dot { display: inline-block; width: 7px; height: 7px; background: var(--red); border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* ---------- Masthead ---------- */
.masthead { text-align: center; padding: clamp(22px, 4vw, 40px) 0 0; }
.nameplate {
  display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 20px);
  text-decoration: none; color: var(--ink);
}
.nameplate:hover { color: var(--ink); }
.mark {
  display: inline-grid; place-items: center;
  width: clamp(40px, 5vw, 58px); height: clamp(40px, 5vw, 58px);
  background: var(--red); color: var(--newsprint);
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.05rem, 1.6vw, 1.5rem); letter-spacing: -0.02em;
}
.nameplate b {
  font-family: var(--serif); font-weight: 900; letter-spacing: -0.035em;
  font-size: clamp(2.7rem, 8vw, 5.6rem); line-height: 1;
}
.masthead .motto {
  font-family: var(--serif); font-style: italic; color: var(--ink-2);
  font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 10px 0 18px;
}
.masthead nav {
  border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px clamp(16px, 3.4vw, 40px);
  padding: 11px 0; font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.masthead nav a { text-decoration: none; }
.masthead nav a[aria-current="page"] { color: var(--red); }
.masthead.compact .nameplate b { font-size: clamp(2.2rem, 5vw, 3.4rem); }

/* ---------- Lead ---------- */
.lead { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 6vw, 80px); }
.lead .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 64px); }
.lead .story { border-right: 1px solid var(--rule); padding-right: clamp(0px, 5vw, 64px); }
.lead h1 {
  font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.9rem);
  line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 22px;
}
.lead h1 mark { background: none; color: var(--red); }
.standfirst { font-size: clamp(1.18rem, 1.8vw, 1.38rem); line-height: 1.5; color: var(--ink-2); margin: 0 0 24px; max-width: 40ch; }
.byline {
  display: flex; align-items: center; gap: 12px; padding: 14px 0; margin: 0 0 28px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 0.82rem; color: var(--muted);
}
.byline img { width: 40px; height: 40px; border-radius: 50%; }
.byline strong { color: var(--ink); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; font-family: var(--sans); font-size: 0.92rem; font-weight: 600; }
.btn {
  display: inline-block; background: var(--red); color: var(--newsprint);
  padding: 14px 22px; text-decoration: none; letter-spacing: 0.01em;
}
.btn:hover { background: var(--red-dark); color: var(--newsprint); }
.btn.ink { background: var(--ink); }
.btn.ink:hover { background: var(--red); }
.textlink { text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.lead figure { margin: 0; }
.lead figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(0.15) contrast(1.03); }
figcaption {
  font-family: var(--sans); font-size: 0.78rem; line-height: 1.45; color: var(--muted);
  border-bottom: 1px solid var(--rule); padding: 10px 0;
}
figcaption b { color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

/* ---------- Purpose band ---------- */
.purpose { background: var(--ink); color: var(--newsprint); padding: clamp(56px, 8vw, 104px) 0; }
.purpose .kicker { color: #f08a6c; }
.purpose h2 {
  font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em;
  font-weight: 600; max-width: 22ch; margin: 0 0 clamp(36px, 5vw, 60px);
}
.purpose h2 em { color: #f08a6c; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.pillars li { padding: 22px clamp(16px, 2.5vw, 32px) 4px; border-left: 1px solid #3a4152; }
.pillars li:first-child { border-left: 0; padding-left: 0; }
.pillars .num { font-family: var(--sans); font-weight: 800; font-size: 0.8rem; color: #f08a6c; letter-spacing: 0.1em; }
.pillars h3 { font-size: 1.45rem; font-weight: 700; margin: 8px 0 8px; letter-spacing: -0.01em; }
.pillars p { margin: 0; color: #c9c4b7; font-size: 1.05rem; }

/* ---------- Published in ---------- */
.index { border-bottom: 1px solid var(--rule); padding: 20px 0; }
.index .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; }
.index ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.index li { font-weight: 600; font-size: 1.1rem; }
.index a { text-decoration: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--ink); padding-top: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.section-head .kicker { margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(28px, 5vw, 64px); }
.about .body p { margin: 0 0 1.1em; max-width: 64ch; }
.about .body p:first-of-type::first-letter {
  float: left; font-weight: 900; font-size: 4.3em; line-height: 0.8; padding: 0.06em 0.1em 0 0; color: var(--red);
}
.factbox { background: var(--newsprint-2); border-top: 3px solid var(--red); padding: 22px 22px 8px; align-self: start; }
.factbox img { width: 112px; height: 112px; border-radius: 50%; margin-bottom: 16px; }
.factbox dl { margin: 0; font-family: var(--sans); font-size: 0.86rem; }
.factbox dt { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; color: var(--muted); }
.factbox dd { margin: 2px 0 14px; color: var(--ink); font-weight: 500; }

/* Beat columns */
.beats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.beat { padding: 4px clamp(16px, 2.4vw, 28px) 28px; border-left: 1px solid var(--rule); }
.beat:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.beat h3 { font-size: 1.5rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; line-height: 1.15; }
.beat p { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
.beat.wide { grid-column: span 2; }

/* Book feature */
.book { background: var(--newsprint-2); }
.book .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.cover {
  background: var(--ink); color: var(--newsprint); aspect-ratio: 3 / 4; max-width: 340px; width: 100%;
  padding: 28px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 14px 14px 0 var(--red);
}
.cover small { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #c9c4b7; }
.cover strong { font-size: clamp(2.2rem, 4vw, 3rem); line-height: 0.98; font-weight: 900; letter-spacing: -0.03em; }
.cover span { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; }
.book h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 18px; }
.book p { max-width: 54ch; color: var(--ink-2); margin: 0 0 26px; }

/* Subscribe coupon */
.coupon {
  border: 2px dashed var(--ink); padding: clamp(24px, 4vw, 44px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px clamp(24px, 4vw, 56px); align-items: center;
}
.coupon h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 10px; }
.coupon p { margin: 0; color: var(--ink-2); max-width: 48ch; }
.coupon .side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.coupon .side ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: 0.9rem; }
.coupon .side li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.coupon .side li:last-child { border-bottom: 0; }

/* Timeline */
.timeline { list-style: none; margin: 28px 0 0; padding: 0; max-width: 64ch; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
.timeline b { font-family: var(--sans); font-weight: 800; font-size: 0.85rem; color: var(--red); padding-top: 3px; }

/* ---------- Writing page ---------- */
.author-head { padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 4vw, 48px); }
.author-head .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 44px); align-items: center; }
.author-head img { width: clamp(96px, 13vw, 148px); border-radius: 50%; border: 3px solid var(--red); padding: 4px; background: var(--newsprint); }
.author-head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.04; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 12px; }
.author-head p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.pubs { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.pubs li {
  counter-increment: p; display: grid; grid-template-columns: 44px 1fr 2fr 130px;
  gap: 20px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--rule);
}
.pubs li::before { content: counter(p, decimal-leading-zero); font-family: var(--sans); font-weight: 800; font-size: 0.8rem; color: var(--red); }
.pubs h3 { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; }
.pubs p { margin: 0; color: var(--ink-2); }
.pubs a { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--red); justify-self: start; }
.pubs li.own { background: var(--newsprint-2); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-top: 3px solid var(--red); }

/* ---------- 404 ---------- */
.notfound { padding: clamp(72px, 12vw, 160px) 0; }
.notfound h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 18px; }
.notfound p { max-width: 50ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9c4b7; padding: clamp(40px, 6vw, 64px) 0 36px; font-family: var(--sans); font-size: 0.85rem; }
.site-footer .top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid #3a4152; }
.site-footer .nameplate { color: var(--newsprint); }
.site-footer .nameplate b { font-size: 2rem; }
.site-footer .mark { width: 38px; height: 38px; font-size: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
.site-footer a { color: var(--newsprint); text-decoration: none; }
.site-footer a:hover { color: #f08a6c; }
.site-footer .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .lead .wrap, .about, .book .wrap, .coupon { grid-template-columns: 1fr; }
  .lead .story { border-right: 0; padding-right: 0; }
  .lead figure { max-width: 480px; }
  .pillars, .beats { grid-template-columns: 1fr; }
  .pillars li, .beat { border-left: 0; padding-left: 0; padding-right: 0; border-top: 1px solid #3a4152; }
  .beat { border-top-color: var(--rule); padding-top: 18px; }
  .pillars li:first-child, .beat:first-child { border-top: 0; }
  .beat.wide { grid-column: auto; }
  .factbox { display: grid; grid-template-columns: auto 1fr; gap: 0 20px; }
  .pubs li { grid-template-columns: 36px 1fr; gap: 4px 12px; }
  .pubs li p, .pubs li a { grid-column: 2; }
}
@media (max-width: 560px) {
  body { font-size: 1.06rem; }
  .topbar .hide-sm { display: none; }
  .topbar { font-size: 0.68rem; letter-spacing: 0.02em; }
  .topbar .wrap > * { white-space: nowrap; }
  .masthead nav { font-size: 0.72rem; letter-spacing: 0.1em; }
  .factbox { grid-template-columns: 1fr; }
  .author-head .wrap { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
