/* PTD Blog — shared styles for index + post pages */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #19270E;
  --navy-deep: #0E1A07;
  --navy-light: #2D4A1E;
  --gold: #9E7B1A;
  --gold-light: #B8922E;
  --sage: #4A7C59;
  --cream: #F5F5F0;
  --cream-paper: #FEFDFB;
  --warm-white: #FAFAF7;
  --text: #2D2D2D;
  --text-light: #5A5A57;
  --text-muted: #7A7A75;
  --border: #D8D5CC;
  --error: #B0381F;

  --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-base: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  --fs-md: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
  --fs-3xl: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);

  --space-xs: clamp(0.5rem, 0.4rem + 0.3vw, 0.75rem);
  --space-sm: clamp(0.75rem, 0.6rem + 0.5vw, 1rem);
  --space-md: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem);
  --space-xl: clamp(2rem, 1.5rem + 2vw, 4rem);
  --space-2xl: clamp(3rem, 2rem + 3vw, 6rem);

  --max-width: 1200px;
  --reading-width: 720px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}

/* ============================================================
   Skip link
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--navy);
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  z-index: 999;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}
.skip-link:focus { top: 0; color: var(--cream); }

/* ============================================================
   Phone bar
   ============================================================ */
.phone-bar {
  background: var(--navy-deep);
  color: rgba(245, 245, 240, 0.92);
  text-align: center;
  padding: 8px var(--space-md);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-xs);
}
.phone-bar a { color: var(--gold-light); font-weight: 600; }
.phone-bar a:hover { color: var(--cream); }

/* ============================================================
   Header (matches main site)
   ============================================================ */
.site-header {
  background: var(--warm-white);
  border-bottom: 1px solid rgba(25, 39, 14, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 52px;
  overflow: hidden;
}
.logo img {
  height: 64px;
  width: auto;
  object-fit: cover;
  object-position: top center;
  max-height: 64px;
}

.main-nav { display: none; }
@media (min-width: 900px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    list-style: none;
  }
  .main-nav a {
    font-family: 'DM Sans', sans-serif;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text);
    padding: 0.25rem 0;
    position: relative;
  }
  .main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
  }
  .main-nav a:hover::after,
  .main-nav a[aria-current="page"]::after { width: 100%; }
  .main-nav a:hover { color: var(--text); }
}
.nav-cta { display: none; }
@media (min-width: 900px) {
  .nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #2B5E3A;
    color: #FFFFFF !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    letter-spacing: 0.03em;
    min-height: 44px;
    box-shadow: 0 3px 10px rgba(43, 94, 58, 0.4);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
  }
  .nav-cta:hover {
    background-color: #1F4D2D;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(43, 94, 58, 0.5);
  }
  .nav-cta::after { display: none !important; }
  .nav-cta svg { flex-shrink: 0; }
}

.mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mobile-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); }
@media (min-width: 900px) { .mobile-toggle { display: none; } }

.mobile-nav { display: none; background: var(--warm-white); border-bottom: 1px solid var(--border); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; padding: var(--space-sm) var(--space-md); }
.mobile-nav li { padding: 0.6rem 0; border-bottom: 1px solid rgba(25, 39, 14, 0.06); }
.mobile-nav li:last-child { border-bottom: 0; }
.mobile-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
}
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* ============================================================
   Blog index hero
   ============================================================ */
.blog-hero {
  background: var(--cream-paper);
  padding: var(--space-2xl) 0;
  border-bottom: 3px solid var(--gold-light);
}
.blog-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.blog-hero .eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.blog-hero h1 {
  font-size: var(--fs-3xl);
  max-width: 820px;
  margin-bottom: var(--space-sm);
}
.blog-hero .lede {
  font-size: var(--fs-md);
  color: var(--text-light);
  max-width: 740px;
}

/* ============================================================
   Post grid (index page)
   ============================================================ */
.post-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  background: var(--cream-paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(25, 39, 14, 0.10);
}
.post-card:hover .post-card-image img { transform: scale(1.03); }
.post-card a { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-card-image {
  position: relative;
  aspect-ratio: 1200 / 630;
  background: var(--navy);
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 26, 7, 0.15) 0%, rgba(14, 26, 7, 0.45) 55%, rgba(14, 26, 7, 0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md) var(--space-lg) var(--space-md);
  gap: 0.5rem;
}
.post-card-overlay-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}
.post-card-overlay h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.2;
  color: var(--cream);
  margin: 0;
}
.post-card-body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.post-card-excerpt {
  color: var(--text-light);
  font-size: var(--fs-sm);
  margin: 0;
}
.post-card-read {
  margin-top: auto;
  padding-top: var(--space-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-xs);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   Article (single post) — hero + body
   ============================================================ */
.article-hero {
  position: relative;
  background: var(--navy);
  color: var(--cream);
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.article-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.article-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 26, 7, 0.88) 0%, rgba(14, 26, 7, 0.72) 45%, rgba(14, 26, 7, 0.45) 100%),
    linear-gradient(180deg, rgba(14, 26, 7, 0.10) 0%, rgba(14, 26, 7, 0.45) 100%);
  z-index: 1;
}
.article-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  width: 100%;
}
.article-breadcrumbs {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 240, 0.75);
  margin-bottom: var(--space-md);
}
.article-breadcrumbs a { color: var(--gold-light); }
.article-breadcrumbs a:hover { color: var(--cream); }
.article-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--cream);
  max-width: 900px;
  margin-bottom: var(--space-sm);
}
.article-hero-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-sm);
  color: rgba(245, 245, 240, 0.78);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.article-hero-meta time { color: var(--gold-light); font-weight: 600; }
.article-hero-meta .dot { color: rgba(245, 245, 240, 0.45); }

.article-body {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}
.article-body h2 {
  font-size: var(--fs-xl);
  margin: var(--space-xl) 0 var(--space-sm);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: var(--fs-lg);
  margin: var(--space-lg) 0 var(--space-sm);
}
.article-body p,
.article-body ul,
.article-body ol {
  margin-bottom: var(--space-md);
}
.article-body p { font-size: var(--fs-base); }
.article-body strong { color: var(--navy); }
.article-body ul,
.article-body ol { padding-left: 1.25rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.article-body a:hover { color: var(--gold); }

.article-cta {
  background: var(--cream-paper);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}
.article-cta h3 {
  font-size: var(--fs-md);
  margin-bottom: 0.5rem;
}
.article-cta p { margin-bottom: 0.75rem; font-size: var(--fs-sm); }
.article-body .article-cta-phone,
.article-cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #2B5E3A;
  color: #FFFFFF !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 8px;
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  min-height: 48px;
  box-shadow: 0 3px 10px rgba(43, 94, 58, 0.4);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.article-body .article-cta-phone:hover,
.article-cta-phone:hover {
  background-color: #1F4D2D;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(43, 94, 58, 0.5);
}
.article-cta-phone svg { flex-shrink: 0; }

.article-footer-cta {
  background: var(--navy);
  color: var(--cream);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}
.article-footer-cta-inner { max-width: 760px; margin: 0 auto; }
.article-footer-cta h2 {
  color: var(--cream);
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-sm);
}
.article-footer-cta p { font-size: var(--fs-md); color: rgba(245, 245, 240, 0.85); margin-bottom: var(--space-md); }
.article-footer-cta a.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #2B5E3A;
  color: #FFFFFF !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 8px;
  font-size: var(--fs-md);
  letter-spacing: 0.03em;
  text-decoration: none !important;
  min-height: 48px;
  box-shadow: 0 4px 14px rgba(43, 94, 58, 0.45);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.article-footer-cta a.btn-phone:hover {
  background-color: #1F4D2D;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}
.article-footer-cta a.btn-phone svg { flex-shrink: 0; }

/* ============================================================
   Related posts
   ============================================================ */
.related {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}
.related h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-md);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 768px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Footer (matches main site)
   ============================================================ */
.site-footer {
  background: var(--navy);
  padding: var(--space-2xl) var(--space-md) var(--space-lg);
  color: rgba(245, 245, 240, 0.6);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand { max-width: 320px; }
.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: var(--fs-lg);
  color: var(--cream);
  margin-bottom: var(--space-sm);
}
.footer-brand p { font-size: var(--fs-sm); line-height: 1.7; margin-bottom: var(--space-md); }
.footer-heading {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-sm);
  color: rgba(245, 245, 240, 0.65);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--cream); }
.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(245, 245, 240, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
}
