/* ============================================================================
   Ordinary WordPress templates — blog, archives, search, default pages, 404.
   The React site had none of these; they are drawn in the product pages'
   language (page wash hero, badge, display heading, white cards on --page).
   ========================================================================= */

.blog { background: var(--page); }

.blog-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(7rem, 5rem + 8vw, 11rem);
  padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  background: var(--page);
}
.blog-hero__field { position: absolute; inset: 0; background: var(--page-wash); pointer-events: none; }
.blog-hero__inner { position: relative; }
.blog-hero__title { max-width: 22ch; margin-top: 1.1rem; }
.blog-hero__title:first-child { margin-top: 0; }
.blog-hero__lead { margin-top: 1.35rem; max-width: 60ch; }
.blog-hero__lead p { margin: 0; }
.blog-hero__lead .entry-meta { font-size: var(--fs-sm); color: var(--text-secondary); }
.blog-hero__lead .entry-meta a { color: inherit; }
.blog-hero__lead .byline { margin-left: .35rem; }

.blog__section { padding-top: 0; }

/* --- Post cards ---------------------------------------------------------- */
.blog__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, .8rem + 1vw, 1.75rem);
}
@media (min-width: 700px)  { .blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .blog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border), var(--e-1);
  transition: transform var(--d-base) var(--ease-out-expo), box-shadow var(--d-base) var(--ease-out-soft);
}
.post-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--border), var(--e-3); }
.post-card__media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: .6rem; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); flex: 1; }
.post-card__meta { font-size: var(--fs-xs); font-weight: 600; color: var(--blue-600); }
.post-card__title a { color: var(--text); text-decoration: none; }
.post-card__title a:hover { color: var(--blue-600); }
.post-card__excerpt p { margin: 0; }
.post-card__more {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  padding-top: .5rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
  transition: gap var(--d-base) var(--ease-out-expo);
}
.post-card__more:hover { gap: .7rem; }

/* --- Pagination ---------------------------------------------------------- */
.blog__pagination { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.blog__pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.blog__pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 .9rem;
  border-radius: var(--r-pill);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.blog__pagination .page-numbers.current { background: var(--blue-500); color: #fff; box-shadow: none; }
.blog__pagination a.page-numbers:hover { box-shadow: inset 0 0 0 1px var(--blue-300); color: var(--blue-600); }

/* --- Single / page body -------------------------------------------------- */
.entry {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border-radius: var(--r-2xl);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border), var(--e-1);
}
.entry .post-thumbnail img { width: 100%; border-radius: var(--r-lg); margin-bottom: 2rem; }

.entry-content { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'wdth' 100;
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--tr-heading);
  margin-top: 1.8em;
}
.entry-content h2 { font-size: var(--fs-h2); }
.entry-content h3 { font-size: var(--fs-h3); }
.entry-content h4 { font-size: var(--fs-h4); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: .35em; }
.entry-content a { color: var(--link); text-decoration: underline; }
.entry-content img { border-radius: var(--r-md); }
.entry-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--yellow-300);
  border-radius: var(--r-md);
  background: var(--blue-50);
  font-size: var(--fs-lead);
}
.entry-content pre, .entry-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}
.entry-content pre { overflow-x: auto; padding: 1rem; border-radius: var(--r-md); background: var(--ink-100); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.entry-content th, .entry-content td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); text-align: left; }
.entry-content hr { border: 0; height: 3px; background: var(--loop-gradient); border-radius: 3px; }

.entry-footer { margin-top: 2rem; font-size: var(--fs-xs); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.entry-footer a { color: var(--blue-600); }

.post-navigation { margin-top: 2rem; }
.post-navigation .nav-links { display: grid; gap: 1rem; }
@media (min-width: 700px) { .post-navigation .nav-links { grid-template-columns: 1fr 1fr; } }
.post-navigation a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border);
  text-decoration: none;
}
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-subtitle { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--blue-600); }
.post-navigation .nav-title { display: block; margin-top: .2rem; font-weight: 600; color: var(--text); }

/* --- Comments ------------------------------------------------------------ */
.comments-area { margin-top: 2.5rem; }
.comments-title, .comment-reply-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); margin-bottom: 1rem; }
.comment-list { display: grid; gap: 1rem; }
.comment-list .children { margin-top: 1rem; padding-left: 1.5rem; display: grid; gap: 1rem; }
.comment-body { padding: 1.1rem 1.25rem; border-radius: var(--r-lg); background: var(--white); box-shadow: inset 0 0 0 1px var(--border); }
.comment-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: .5rem; }
.comment-author img { display: inline-block; border-radius: 50%; margin-right: .5rem; vertical-align: middle; }

.comment-form p { margin-top: 1rem; }
.comment-form label { display: block; margin-bottom: .35rem; font-size: var(--fs-sm); font-weight: 600; }

/* --- Forms: search, comments ------------------------------------------- */
.blog input[type="text"], .blog input[type="email"], .blog input[type="url"],
.blog input[type="search"], .blog textarea {
  width: 100%;
  min-height: 3rem;
  padding: .7rem .9rem;
  border: 0;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  font-size: var(--fs-sm);
}
.blog input:focus-visible, .blog textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--blue-500); }
.search-form { display: flex; gap: .6rem; max-width: 34rem; }
.search-form label { flex: 1; }
.blog .search-submit, .blog .form-submit input[type="submit"] {
  min-height: 3rem;
  padding: .7rem 1.4rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--blue-500);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.blog .search-submit:hover, .blog .form-submit input[type="submit"]:hover { background: var(--blue-600); }

.blog-empty { padding: 2rem; border-radius: var(--r-xl); background: var(--white); box-shadow: inset 0 0 0 1px var(--border); }
.blog-empty > * + * { margin-top: 1rem; }

.blog-404__actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.blog-404__search { margin-top: 2rem; }
