/* Niksen — vanilla stylesheet */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Hanken+Grotesk:wght@200;300;400;500;600&display=swap');

:root {
  --serif: 'EB Garamond', Iowan Old Style, Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;

  --bg: #fdfcf8;
  --ink: #1f1e1a;
  --body: #35322b;
  --secondary: #63605a;
  --muted: #a5a29a;
  --accent: #6b9460;
  --accent-dark: #5c7a55;
  --line: rgba(31, 30, 26, 0.11);
  --line-soft: rgba(31, 30, 26, 0.085);
  --stripe: repeating-linear-gradient(45deg, #f0eee6 0 14px, #f7f5ee 14px 28px);
  --card: #fffefa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: var(--accent); color: #fff; }

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

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 48px; }
.narrow { max-width: 680px; margin: 0 auto; }

/* header + nav */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--line);
}
.logo {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.logo .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-2px);
}
.nav { display: flex; gap: 32px; font-size: 15px; font-weight: 400; }
.nav a { color: var(--secondary); }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }

/* eyebrows + headings */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 26px;
}
.eyebrow.accent { color: var(--accent); letter-spacing: 0.1em; }
.section-label {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 32px;
}

/* Serif carries the voice — headlines and prose. The grotesk stays on
   labels, nav and metadata, so the two never compete. */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }

.hero { padding: 88px 0 96px; max-width: 760px; }
.hero h1 {
  font-size: 58px;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero .lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.6;
  color: var(--secondary);
  margin: 0;
  max-width: 580px;
  text-wrap: pretty;
}

/* image placeholders */
.ph {
  background: var(--stripe);
  border-radius: 2px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.ph .cap {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #b5b5b0;
}
.ph.round { border-radius: 50%; }

/* featured post */
.featured {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
  color: inherit;
}
.featured h3 {
  font-size: 37px;
  line-height: 1.18;
  margin: 0 0 18px;
  text-wrap: balance;
}
.featured p { font-size: 17px; line-height: 1.6; color: var(--secondary); margin: 0 0 24px; text-wrap: pretty; }
.kicker { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.meta { font-size: 14px; color: var(--muted); margin: 0; }

/* post list */
.post-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 40px;
  align-items: baseline;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
}
.post-row .topic { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-row .title { display: block; font-family: var(--serif); font-size: 25px; line-height: 1.25; margin-bottom: 6px; }
.post-row .excerpt { display: block; font-size: 16px; line-height: 1.55; color: var(--secondary); max-width: 520px; }
.post-row .date { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* two-column blocks */
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 88px; }
.topic-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
}
.topic-row .name { font-family: var(--serif); font-size: 27px; }
.topic-row .count { font-size: 14px; color: var(--muted); }

.author-p { font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--body); margin: 0 0 18px; text-wrap: pretty; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 64px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer .links { display: flex; gap: 28px; }

/* article / prose */
.article { max-width: 680px; margin: 0 auto; padding: 80px 0 40px; }
.back { font-size: 14px; color: var(--muted); display: inline-block; margin-bottom: 40px; }
.article > h1 { font-size: 51px; line-height: 1.12; letter-spacing: -0.012em; margin: 0 0 28px; text-wrap: balance; }
.article .standfirst { font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--secondary); margin: 0 0 36px; text-wrap: pretty; }

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 52px;
}
.byline .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--stripe); }
.byline .name { font-size: 15px; font-weight: 500; display: block; }
.byline .sub { font-size: 14px; color: var(--muted); }

.prose p { font-family: var(--serif); font-size: 21px; line-height: 1.62; color: var(--body); margin: 0 0 26px; }
.article .prose > p:first-child::first-letter {
  font-size: 66px;
  line-height: 0.78;
  font-weight: 400;
  float: left;
  margin: 8px 12px 0 0;
  color: var(--accent);
}
.prose h2 { font-size: 30px; font-weight: 400; letter-spacing: -0.005em; line-height: 1.22; margin: 8px 0 22px; }
.prose ul { font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--body); margin: 0 0 26px; padding-left: 22px; }
.prose ul li { margin-bottom: 12px; }
/* Pull-quotes break the left edge of the measure rather than sitting inside it. */
blockquote {
  margin: 48px 0 48px -52px;
  padding: 0 0 0 28px;
  border-left: 3px solid var(--accent);
}
blockquote p { font-family: var(--serif); font-size: 27px; line-height: 1.36; color: var(--ink); margin: 0; font-style: italic; }

/* related cards */
.related-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 56px; }
.related-grid .topic { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.related-grid h3 { font-size: 27px; font-weight: 400; line-height: 1.25; margin: 0 0 10px; text-wrap: balance; }
.related-grid p { font-size: 16px; line-height: 1.55; color: var(--secondary); margin: 0; }

/* about pillars */
.pillar {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pillar .name { font-family: var(--serif); font-size: 25px; }
.pillar .desc { font-size: 16px; line-height: 1.6; color: var(--secondary); }

/* newsletter */
.newsletter {
  background: #f5f4ec;
  border: 1px solid rgba(107, 148, 96, 0.25);
  border-radius: 4px;
  padding: 40px;
}
.newsletter h2 { font-size: 24px; margin: 0 0 12px; }
.newsletter p { font-size: 16px; line-height: 1.6; color: var(--secondary); margin: 0 0 24px; max-width: 460px; }
.subscribe { display: flex; gap: 10px; max-width: 420px; }
.subscribe input {
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  padding: 13px 16px;
  border: 1px solid rgba(31, 30, 26, 0.18);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}
.subscribe input:focus { border-color: var(--accent); }
.subscribe button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  padding: 13px 22px;
  border: none;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.subscribe button:hover { background: var(--accent-dark); }

/* herbarium grid */
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 40px; }
.chip {
  font-size: 14px;
  font-weight: 400;
  padding: 8px 16px;
  border: 1px solid rgba(31, 30, 26, 0.15);
  border-radius: 40px;
  color: var(--secondary);
  background: var(--card);
  cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--accent); color: #fff; background: var(--accent); }

.herb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.herb-card {
  color: inherit;
  display: block;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}
.herb-card:hover { border-color: var(--accent); }
.herb-card .thumb { aspect-ratio: 4/3; background: var(--stripe); display: flex; align-items: flex-end; padding: 14px; }
.herb-card .thumb .cap { font-family: ui-monospace, monospace; font-size: 10px; color: #b5b5b0; }
.herb-card .body { padding: 24px 24px 26px; }
.herb-card .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.herb-card .name { font-family: var(--serif); font-size: 25px; }
.herb-card .tag { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.herb-card .latin { font-family: var(--serif); font-size: 15px; font-style: italic; color: var(--muted); margin: 0 0 14px; }
.herb-card .note { font-size: 15px; line-height: 1.55; color: var(--secondary); margin: 0; }

/* herb detail */
.herb-hero h1 { font-size: 62px; line-height: 1.06; letter-spacing: -0.015em; margin: 0 0 12px; }
.herb-hero .latin { font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--muted); margin: 0; }
.tags { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tags .primary { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0; }
.tags .sub { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.detail-cols { display: grid; grid-template-columns: 1fr 300px; gap: 72px; align-items: start; }
.detail-cols .prose h2 { font-size: 28px; font-weight: 400; letter-spacing: -0.005em; margin: 12px 0 18px; color: var(--ink); }
.detail-cols .prose p { font-size: 21px; line-height: 1.62; color: var(--body); }
.detail-cols blockquote p { font-size: 22px; line-height: 1.45; }

.aside { position: sticky; top: 32px; }
.facts { border: 1px solid var(--line); border-radius: 4px; padding: 28px; }
.facts h3 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 20px; }
.fact-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(31, 30, 26, 0.07); }
.fact-row .k { font-size: 14px; color: var(--muted); }
.fact-row .v { font-size: 14px; font-weight: 400; color: var(--body); text-align: right; }
.goodfor { border: 1px solid rgba(107, 148, 96, 0.25); background: #f5f4ec; border-radius: 4px; padding: 24px; margin-top: 20px; }
.goodfor h3 { font-size: 15px; font-weight: 400; margin: 0 0 8px; }
.goodfor p { font-size: 14px; line-height: 1.55; color: var(--secondary); margin: 0; }

.related-herbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.related-herbs .herb-card .body { padding: 20px 22px 22px; }
.related-herbs .herb-card .name { display: block; font-size: 20px; margin-bottom: 4px; }
.related-herbs .herb-card .latin { display: block; margin: 0; }

/* The reading column sits left of centre on wide screens, so the page reads
   as a page rather than as a column parked in the middle of one. Both the
   article and the .narrow sections shift together, or they'd fall out of line. */
@media (min-width: 1080px) {
  .narrow, .article { margin-left: 9%; margin-right: auto; }
}

/* responsive */
@media (max-width: 1080px) {
  blockquote { margin-left: -20px; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 28px; }
  .featured, .two-col, .detail-cols { grid-template-columns: 1fr; gap: 40px; }
  .herb-grid, .related-herbs, .related-grid { grid-template-columns: 1fr 1fr; }
  .aside { position: static; }
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 40px; }
}
@media (max-width: 560px) {
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-row .date { grid-row: 1; }
  .herb-grid, .related-herbs, .related-grid, .pillar { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .article > h1, .herb-hero h1 { font-size: 34px; }
}
