@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,440;9..144,500;9..144,600&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --oat: #EFEAE0;
  --paper: #F8F5EE;
  --ink: #262420;
  --ink-soft: #55524A;
  --forest: #45573E;
  --forest-dark: #313F2B;
  --ochre: #C17A34;
  --line: #DAD3C3;
  --line-soft: #E5DFD1;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Masthead ---- */
.masthead {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark span { color: var(--forest); }
nav.primary { display: flex; gap: 26px; font-size: 0.95rem; }
nav.primary a { text-decoration: none; color: var(--ink-soft); border-bottom: 1px solid transparent; padding-bottom: 2px; }
nav.primary a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---- Hero ---- */
.hero {
  padding: 92px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 64px; align-items: end; }
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 440;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
}
.hero p.lede {
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0;
}
.shelf {
  width: 100%;
  height: auto;
}

/* ---- Label tags (category system) ---- */
.tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  padding: 3px 8px 3px 0;
  border-left: 2px solid var(--forest);
  padding-left: 8px;
  color: var(--forest-dark);
}
.tag.ochre { border-color: var(--ochre); color: #7A4A1F; }

/* ---- Post grid ---- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 64px 0 28px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0;
}
.section-head .count { font-size: 0.85rem; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin-bottom: 48px;
}
.post-card {
  background: var(--paper);
  padding: 30px 26px 30px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 236px;
  transition: background 0.18s ease;
}
.post-card:hover { background: var(--white); }
.post-card:hover h3 { color: var(--forest-dark); }
.post-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.32;
  margin: 0;
  transition: color 0.18s ease;
}
.post-card p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; line-height: 1.55; flex-grow: 1; }
.post-card .read {
  font-size: 0.82rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--forest-dark);
}
.post-card.pending { opacity: 0.5; cursor: default; }
.post-card.pending:hover { background: var(--paper); }
.post-card.pending:hover h3 { color: var(--ink); }

/* ---- Disclosure banner ---- */
.disclosure-banner {
  background: var(--forest);
  color: var(--oat);
  font-size: 0.85rem;
  padding: 12px 0;
}
.disclosure-banner .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.disclosure-banner a { color: var(--oat); text-decoration: underline; }

/* ---- Article ---- */
article.post { padding: 56px 0 80px; }
article.post .kicker { margin-bottom: 14px; }
article.post h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  max-width: 24ch;
  margin: 0 0 18px;
}
article.post .dek { font-size: 1.08rem; color: var(--ink-soft); max-width: 58ch; margin-bottom: 40px; }

.product {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.product:last-of-type { border-bottom: 1px solid var(--line); }
.product-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.product-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
  padding: 10px;
}
.product h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.28rem;
  margin: 0 0 4px;
}
.price {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ochre);
  margin-bottom: 14px;
}
.product p { margin: 0 0 18px; }
.shop-btn {
  display: inline-block;
  background: var(--forest);
  color: var(--oat);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 2px;
  letter-spacing: 0.01em;
  transition: background 0.18s ease;
}
.shop-btn:hover { background: var(--forest-dark); }

/* ---- Page content (about / disclosure) ---- */
.page-content { padding: 56px 0 90px; max-width: 62ch; }
.page-content h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin: 0 0 26px;
}
.page-content h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.25rem; margin: 34px 0 12px; }
.page-content p { margin: 0 0 18px; color: var(--ink-soft); }
.page-content p strong { color: var(--ink); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--ink-soft); }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product-img { max-width: 200px; }
  nav.primary { gap: 16px; font-size: 0.88rem; }
}
