/*
Theme Name: Mail the Block
Theme URI: https://mailtheblock.com/
Author: Pinpoint Digital
Author URI: https://pinpointdigital.com/
Description: Custom WordPress theme for Mail the Block - direct mail for contractors. Postal-inspired design with warm cream backgrounds, forest green accents and refined typography.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mailtheblock
Tags: business, custom-menu, featured-images, threaded-comments, translation-ready
*/


/* ─────────────────────────────────────────────
   Interior page (page-head / page-body / prose)
─────────────────────────────────────────── */
.page-head {
  background: var(--bg-alt);
  color: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .4;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}
.page-head .wrap { position: relative; text-align: center; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: 88px;
  line-height: 1;
  margin: 0 auto;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.025em;
  max-width: 1100px;
}
.page-head h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  background: var(--red);
  margin: 28px auto 0;
  border-radius: 2px;
}

.page-body { background: var(--bg); padding: 72px 0 96px; }
.prose { max-width: 100%; margin: 0; font-size: 17px; line-height: 1.7; color: var(--ink); }
.page-body .prose { max-width: 100%; margin: 0; }
.prose p { margin: 0 0 1.25em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 2em 0 0.6em;
}
.prose h2:first-child { margin-top: 0; }
.prose a:not(.btn) { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.25em 1.25em; padding: 0; }
.prose li { margin: .35em 0; }

/* ─────────────────────────────────────────────
   Blog index — post grid
─────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
}
.post-card { display: flex; flex-direction: column; }
.post-card__media {
  display: block;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  margin-bottom: 20px;
  aspect-ratio: 3 / 2;
}
.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.post-card__media:hover .post-card__img { transform: scale(1.03); }
.post-card__body { display: flex; flex-direction: column; flex: 1; }
.post-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.65;
  margin-bottom: 10px;
}
.post-card__sep { margin: 0 8px; }
.post-card__cat { color: var(--green); text-decoration: none; }
.post-card__cat:hover { text-decoration: underline; }
.post-card__title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--green); }
.post-card__excerpt { font-size: 15px; line-height: 1.6; color: var(--ink); opacity: 0.8; }
.post-card__excerpt p { margin: 0 0 0.75em; }
.post-card__more {
  align-self: flex-start;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.post-card__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Pagination */
.post-pagination {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.post-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
}
.post-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.post-pagination a.page-numbers:hover { background: var(--ink); color: var(--bg-card); border-color: var(--ink); }
.post-pagination .page-numbers.current { background: var(--green); color: var(--bg-card); border-color: var(--green); }
.post-pagination .page-numbers.dots { border: none; }

/* ─────────────────────────────────────────────
   Single post
─────────────────────────────────────────── */
.post-head__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
  text-align: center;
  margin-bottom: 18px;
}
.post-feature {
  background: var(--bg);
  padding: 0;
}
.post-feature .wrap { padding-top: 40px; padding-bottom: 0; }
.post-feature__img {
  display: block;
  width: 100%;
  max-width: 1024px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--rule);
}
.post-prose { max-width: 760px; margin: 0 auto; }

.post-nav {
  max-width: 1024px;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.post-nav__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  padding: 16px 0;
}
.post-nav__link--next { text-align: right; }
.post-nav__direction {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.post-nav__title {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
}
.post-nav__link:hover .post-nav__title { color: var(--green); }
.post-nav__back {
  text-align: center;
  margin-top: 32px;
  font-family: var(--font-body);
  font-size: 14px;
}
.post-nav__back a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.post-nav__back a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1024px) {
  .page-head { padding: 56px 0; }
  .page-head h1 { font-size: 72px; letter-spacing: -0.022em; }
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
}
@media (max-width: 768px) {
  .page-head { padding: 44px 0; }
  .page-head h1 { font-size: 56px; letter-spacing: -0.02em; }
  .page-body { padding: 48px 0 64px; }
  .prose { font-size: 16px; line-height: 1.65; }
  .prose h2 { font-size: 26px; }
  .post-grid { grid-template-columns: 1fr; gap: 40px; }
  .post-card__title { font-size: 24px; }
  .post-nav__row { grid-template-columns: 1fr; gap: 8px; }
  .post-nav__link--next { text-align: left; }
}
@media (max-width: 480px) {
  .page-head { padding: 32px 0; }
  .page-head h1 { font-size: 42px; letter-spacing: -0.015em; }
  .page-head h1::after { width: 56px; margin-top: 18px; }
  .page-body { padding: 36px 0 48px; }
  .prose h2 { font-size: 22px; }
  .post-card__title { font-size: 22px; }
}
