/* WST template styles — standard content views.
 * Loaded on every non-homepage view (page / single / archive / search / 404).
 * Pairs with page.php, single.php, archive.php, search.php, 404.php and the
 * page-hero / section / card components. */

/* ---- Content section wrapper ---- */
.wst-content {
  padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 110px);
}
.wst-content--narrow .wrap { max-width: 820px; }

/* ---- Rich-text prose (the_content output) ---- */
.wst-prose {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.wst-prose > * + * { margin-top: 1.15em; }
.wst-prose h2,
.wst-prose h3,
.wst-prose h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 1.8em;
}
.wst-prose h2 { font-size: clamp(28px, 3vw, 38px); }
.wst-prose h3 { font-size: clamp(23px, 2.4vw, 29px); }
.wst-prose h4 { font-size: 20px; }
.wst-prose a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.wst-prose a:hover { color: var(--terra); }
.wst-prose strong { color: var(--ink); }
.wst-prose ul,
.wst-prose ol { padding-left: 1.3em; }
.wst-prose li + li { margin-top: .4em; }
.wst-prose img,
.wst-prose figure { border-radius: var(--r-md); max-width: 100%; height: auto; }
.wst-prose blockquote {
  margin: 1.6em 0;
  padding: 6px 0 6px 24px;
  border-left: 3px solid var(--terra);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
}
.wst-prose hr { height: 1px; background: var(--rule); border: 0; margin: 2.4em 0; }
.wst-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.wst-prose th,
.wst-prose td {
  border: 1px solid var(--rule);
  padding: 10px 14px;
  text-align: left;
}
.wst-prose th { background: var(--paper-2); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

/* ---- Landing pages (no DB record — see inc/landing-pages.php) ---- */
.wst-landing-body { padding-top: clamp(36px, 5vw, 64px); }
.wst-landing-cta {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.wst-landing-cta .btn-lg {
  padding: 16px 26px;
  font-size: 14px;
  gap: 10px;
}
.wst-landing-cta .btn-primary svg { color: currentColor; }

/* ---- Single post ---- */
.wst-single-thumb {
  margin: 0 0 clamp(28px, 4vw, 48px);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.wst-single-thumb img { display: block; width: 100%; height: auto; }
.wst-link-pages {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}
.wst-link-pages a,
.wst-link-pages > span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  margin-right: 6px;
  color: var(--ink-2);
  text-decoration: none;
}
.wst-link-pages a:hover { border-color: var(--terra); color: var(--terra); }

/* ---- Archive / blog grid ---- */
.wst-archive-desc {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Search results ---- */
.wst-search-form-wrap { margin: 0 0 8px; max-width: 620px; }
.wst-search-list { display: flex; flex-direction: column; }
.wst-search-result {
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.wst-search-result:first-child { padding-top: 0; }
.wst-search-result__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.wst-search-result__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  margin: 0 0 8px;
}
.wst-search-result__title a { color: var(--ink); text-decoration: none; }
.wst-search-result__title a:hover { color: var(--terra); }
.wst-search-result__excerpt { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }

/* ---- Pagination (the_posts_pagination output) ---- */
.wst-pagination { margin-top: clamp(36px, 5vw, 56px); }
.wst-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.wst-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.wst-pagination .page-numbers:hover { background: var(--paper-2); }
.wst-pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.wst-pagination .page-numbers.dots { border-color: transparent; }

/* ---- Empty state ---- */
.wst-empty {
  padding: 56px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ---- 404 ---- */
.wst-404 {
  padding: clamp(80px, 12vw, 150px) 0;
  text-align: center;
}
.wst-404 .eyebrow { justify-content: center; }
.wst-404-title {
  font-family: var(--serif);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.01em;
  font-size: clamp(52px, 8vw, 116px);
  margin: 16px 0 14px;
  color: var(--ink);
}
.wst-404-title em { font-style: italic; color: var(--terra); }
.wst-404-text {
  max-width: 540px;
  margin: 0 auto 32px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.wst-404-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Journal index / blog (home.php) ---- */
.wst-journal-hero {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.wst-journal-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
  margin-top: clamp(28px, 4vw, 48px);
}
.wst-journal-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--rule);
  transition: transform .25s ease, box-shadow .25s ease;
}
.wst-journal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(10, 40, 40, .25);
}
.wst-journal-card > a { display: contents; color: inherit; text-decoration: none; }
.wst-journal-card__img {
  aspect-ratio: 5/3;
  background-size: cover;
  background-position: center;
  background-color: #1a201d;
}
.wst-journal-card.is-featured .wst-journal-card__img { aspect-ratio: 4/3; }
.wst-journal-card__body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.wst-journal-card__eye {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 10px;
}
.wst-journal-card__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
.wst-journal-card.is-featured .wst-journal-card__title {
  font-size: 36px;
  line-height: 1.05;
}
.wst-journal-card__excerpt {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 18px;
}
.wst-journal-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}

@media (max-width: 1000px) {
  .wst-journal-grid { grid-template-columns: 1fr 1fr; }
  .wst-journal-card.is-featured { grid-column: span 2; }
  .wst-journal-card.is-featured .wst-journal-card__title { font-size: 30px; }
}
@media (max-width: 640px) {
  .wst-journal-grid { grid-template-columns: 1fr; gap: 18px; }
  .wst-journal-card.is-featured { grid-column: auto; }
  .wst-journal-card.is-featured .wst-journal-card__title { font-size: 24px; }
  .wst-journal-card.is-featured .wst-journal-card__img { aspect-ratio: 5/3; }
  .wst-journal-card__body { padding: 20px 20px 22px; }
}
