/*
Theme Name: The Man With The Hammer
Theme URI: https://themanwiththehammer.com
Author: BTO Technology Solutions
Author URI: https://btosolutionsonline.com
Description: Sacred Editorial theme for Mark Tenpenny — poet, witness, and author of His Pen, My Heart.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hammer-theme
Tags: blog, custom-menu, featured-images, poetry, christian, author
*/

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

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --ink:         #1C1410;
  --ink-deep:    #0F0A07;
  --ink-mid:     #2C1A12;
  --wine:        #5A1F2E;
  --gold:        #B8913A;
  --gold-light:  #D4AF6A;
  --gold-pale:   #EAD9A8;
  --parchment:   #F7F3EC;
  --parchment-2: #F0EBE0;
  --muted:       #6B5E52;
  --muted-light: #9E8E80;
  --cream:       #FAF8F4;
  --white:       #FFFFFF;

  --font-display: 'Cinzel', 'Palatino Linotype', serif;
  --font-body:    'EB Garamond', 'Georgia', serif;
  --font-sans:    'Lato', 'Helvetica Neue', sans-serif;

  --max-w:    1080px;
  --section:  80px;
  --section-sm: 48px;
  --radius:   3px;

  --transition: all 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.4em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.8rem;
}

.rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  display: block;
  margin: 1.5rem auto;
}

.rule--left { margin-left: 0; }

blockquote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted);
  border-left: 2px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 90%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.container--narrow {
  width: 90%;
  max-width: 720px;
  margin: 0 auto;
}

.section { padding: var(--section) 0; }
.section--sm { padding: var(--section-sm) 0; }
.section--dark { background: var(--ink); color: var(--parchment); }
.section--mid { background: var(--ink-mid); color: var(--parchment); }
.section--parchment { background: var(--parchment); }
.section--cream { background: var(--cream); }

.text-center { text-align: center; }
.text-gold { color: var(--gold); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--gold {
  background: var(--gold);
  color: var(--ink-deep);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--ink-deep);
}

.btn--outline {
  background: transparent;
  color: var(--gold-light);
  border-color: var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: var(--ink-deep);
}

.btn--outline-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline-dark:hover {
  background: var(--ink);
  color: var(--parchment);
}

/* ============================================================
   SITE HEADER & NAVIGATION
   ============================================================ */
.site-header {
  background: var(--ink-deep);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(184,145,58,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.site-branding { text-decoration: none; }

.site-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  line-height: 1;
}

.site-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.7rem;
  color: rgba(247,243,236,0.5);
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* Primary Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247,243,236,0.65);
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--gold-light);
}

.nav-cta {
  border: 1px solid rgba(184,145,58,0.4);
  padding: 7px 16px;
  border-radius: var(--radius);
  color: var(--gold) !important;
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--ink-deep) !important;
  border-color: var(--gold);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold-light);
  transition: var(--transition);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--ink);
  padding: 100px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(184,145,58,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--parchment);
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(247,243,236,0.55);
  margin-bottom: 0;
  letter-spacing: 0.04em;
}

.hero-excerpt {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(247,243,236,0.7);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FEATURED POEMS GRID
   ============================================================ */
.poems-section { background: var(--parchment); }

.poems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(92,48,28,0.15);
  border-left: 1px solid rgba(92,48,28,0.15);
}

.poem-card {
  padding: 36px 28px;
  border-right: 1px solid rgba(92,48,28,0.15);
  border-bottom: 1px solid rgba(92,48,28,0.15);
  transition: var(--transition);
  position: relative;
}

.poem-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}

.poem-card:hover::after { transform: scaleX(1); }
.poem-card:hover { background: var(--cream); }

.poem-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--ink);
}

.poem-card-excerpt {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.poem-card-link {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.poem-card-link:hover { color: var(--gold-light); }

/* ============================================================
   ABOUT / TESTIMONY SECTION
   ============================================================ */
.about-section {
  background: var(--ink-mid);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.about-content {
  padding: var(--section) 60px var(--section) 0;
}

.about-content .container { padding-left: 5%; }

.about-title { color: var(--parchment); margin-bottom: 1rem; }
.about-body { color: rgba(247,243,236,0.7); margin-bottom: 2rem; }

.about-image {
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.about-placeholder {
  text-align: center;
  color: rgba(184,145,58,0.4);
}

.about-placeholder svg { margin: 0 auto 1rem; }

.about-placeholder p {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(184,145,58,0.4);
}

/* ============================================================
   BOOK SECTION
   ============================================================ */
.book-section { background: var(--parchment-2); }

.book-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: center;
}

.book-cover {
  position: relative;
  box-shadow: 12px 12px 40px rgba(28,20,16,0.25);
  border-radius: 2px;
  overflow: hidden;
}

.book-cover img { width: 100%; }

.book-cover-placeholder {
  background: var(--ink);
  aspect-ratio: 2/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.book-cover-placeholder .title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}

.book-cover-placeholder .subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.75rem;
  color: rgba(247,243,236,0.5);
}

.book-cover-placeholder .rule {
  width: 32px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

.book-cover-placeholder .author {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184,145,58,0.7);
}

.book-title { margin-bottom: 0.4rem; }
.book-author {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.book-description { color: var(--muted); margin-bottom: 2rem; }

.book-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   EMAIL SIGNUP
   ============================================================ */
.signup-section { background: var(--ink); text-align: center; padding: 64px 0; }

.signup-title { color: var(--parchment); margin-bottom: 0.6rem; }
.signup-sub { font-style: italic; color: rgba(247,243,236,0.55); margin-bottom: 2rem; }

.signup-form {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
  border: 1px solid rgba(184,145,58,0.35);
  border-radius: var(--radius);
  overflow: hidden;
}

.signup-form input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--parchment);
  outline: none;
}

.signup-form input[type="email"]::placeholder { color: rgba(247,243,236,0.35); }

.signup-form button {
  background: var(--gold);
  border: none;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-deep);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.signup-form button:hover { background: var(--gold-light); }

/* ============================================================
   BLOG / POSTS LOOP
   ============================================================ */
.blog-section { background: var(--cream); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
  border: 1px solid rgba(92,48,28,0.12);
}

.post-card {
  background: var(--parchment);
  padding: 32px 28px;
  border-right: 1px solid rgba(92,48,28,0.12);
  border-bottom: 1px solid rgba(92,48,28,0.12);
  transition: var(--transition);
}

.post-card:hover { background: var(--white); }

.post-meta {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.post-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--gold); }

.post-card-excerpt {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.post-read-more {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ============================================================
   SINGLE POST / PAGE
   ============================================================ */
.page-hero {
  background: var(--ink);
  padding: 64px 0;
  text-align: center;
}

.page-hero h1 { color: var(--parchment); }
.page-hero .post-meta { margin-bottom: 0; }

.content-wrap {
  background: var(--parchment);
  padding: var(--section) 0;
}

.content-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink);
}

.content-body h2,
.content-body h3 { margin: 2.5rem 0 1rem; }

.content-body p { margin-bottom: 1.5rem; }

.content-body em {
  font-style: italic;
  color: var(--muted);
}

/* Poetry formatting */
.poem-content {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 2.1;
  color: var(--ink);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.poem-content p { margin-bottom: 2rem; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.testimony-section { background: var(--parchment); }

.testimony-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: start;
}

.testimony-photo {
  position: sticky;
  top: 90px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 8px 8px 32px rgba(28,20,16,0.15);
}

.testimony-photo img { width: 100%; display: block; }

.testimony-photo-placeholder {
  background: var(--ink-mid);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(92,48,28,0.12);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-year {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  padding-top: 4px;
  letter-spacing: 0.04em;
}

.timeline-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.timeline-body p { color: var(--muted); font-size: 0.95rem; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(184,145,58,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg { width: 16px; height: 16px; stroke: var(--gold); fill: none; }

.contact-label {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.contact-value { color: var(--muted); font-size: 0.95rem; }

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-input,
.form-textarea {
  background: var(--white);
  border: 1px solid rgba(92,48,28,0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-input:focus,
.form-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,145,58,0.1); }

.form-textarea { height: 160px; resize: vertical; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer { background: var(--ink-deep); color: rgba(247,243,236,0.5); }

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(184,145,58,0.1);
}

.footer-brand .site-title { color: var(--gold-light); margin-bottom: 0.8rem; display: block; }

.footer-brand p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  color: rgba(247,243,236,0.45);
  line-height: 1.7;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.footer-nav a {
  display: block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(247,243,236,0.5);
  margin-bottom: 0.6rem;
}

.footer-nav a:hover { color: var(--gold-light); }

.footer-contact p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.footer-contact a { color: rgba(247,243,236,0.5); }
.footer-contact a:hover { color: var(--gold-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: rgba(247,243,236,0.25);
}

.footer-bottom a { color: rgba(247,243,236,0.35); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 3rem 0;
}

.pagination a,
.pagination span {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  border: 1px solid rgba(92,48,28,0.2);
  border-radius: var(--radius);
  color: var(--muted);
  transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-deep);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --section: 56px; }

  .poems-grid { grid-template-columns: 1fr; }
  .about-section { grid-template-columns: 1fr; }
  .about-image { min-height: 260px; order: -1; }
  .about-content { padding: var(--section) 0; }
  .book-inner { grid-template-columns: 1fr; gap: 40px; }
  .book-cover { max-width: 240px; }
  .testimony-grid { grid-template-columns: 1fr; }
  .testimony-photo { position: static; max-width: 280px; margin-bottom: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  html { font-size: 16px; }

  .main-nav { display: none; }
  .main-nav.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--ink-deep); padding: 1rem 5%; border-top: 1px solid rgba(184,145,58,0.15); }
  .main-nav.is-open ul { flex-direction: column; gap: 0; }
  .main-nav.is-open a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(184,145,58,0.1); }
  .menu-toggle { display: flex; }

  .site-header { position: relative; }

  .hero { padding: 64px 0 56px; }
  .hero-actions { flex-direction: column; align-items: center; }

  .footer-main { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .signup-form { flex-direction: column; border: none; gap: 10px; }
  .signup-form input[type="email"] { border: 1px solid rgba(184,145,58,0.35); border-radius: var(--radius); padding: 14px 18px; }
  .signup-form button { border-radius: var(--radius); padding: 14px; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin: 0 auto; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-style: italic; font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 6px; }
.sticky { position: relative; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 1.5rem 0; }
