/* Pacific Revenue Partners — blog styles
   Shared by /blog (index) and every post file in /blog/.
   Tokens mirror index.html so the blog stays visually identical to the main site. */

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

:root {
  --accent: #007A87;
  --accent-deep: #0D1B2A;
  --accent-soft: #4A9FA9;
  --accent-glow: #A8D8DC;
  --cream: #F7F2E6;
  --cream-soft: #EEE8D5;
  --ivory: #FAF7EF;
  --ink: #0D1B2A;
  --text: #3D4852;
  --text-muted: #6B7280;
  --border: #E0D8C8;
  --border-soft: #EAE3D2;
  --white: #FFFFFF;

  --font-display: 'Inter Tight', -apple-system, sans-serif;
  --font-ui: 'Inter Tight', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --green: #2E7D62;
  --green-soft: #4A9B7E;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.container { max-width: 78rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .container { padding: 0 2.5rem; } }

/* ---------- NAV ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 27, 42, 0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.125rem; padding-bottom: 1.125rem;
}
.logo {
  font-family: var(--font-ui); font-size: 1.375rem; font-weight: 600;
  letter-spacing: -0.02em; color: white;
  display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
}
.logo-img { height: 2rem; width: auto; display: block; flex-shrink: 0; }
.footer-brand .logo-img { height: 2.75rem; }
.nav-links { display: none; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-link { color: rgba(255,255,255,0.88); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.nav-link:hover { color: white; }
.nav-link.is-current { color: white; }
.nav-right { display: flex; gap: 0.75rem; align-items: center; }
.btn-solid-light {
  background: white; color: var(--accent-deep);
  padding: 0.625rem 1.125rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
}
.btn-solid-light:hover { background: var(--cream); }

/* ---------- HAMBURGER ---------- */
.hamburger { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger span { display: block; width: 22px; height: 2px; background: white; border-radius: 2px; transition: all 0.25s ease; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- MOBILE MENU ---------- */
@keyframes menuFadeSlide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes linkSlideIn   { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
.mobile-menu {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8,16,30,0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  z-index: 49; flex-direction: column; padding: 5.5rem 2.5rem 2.5rem; overflow-y: auto;
}
.mobile-menu.open { display: flex; animation: menuFadeSlide 0.28s ease forwards; }
.mobile-menu-brand {
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); margin-bottom: 2rem;
}
.mobile-nav-links { display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,0.08); }
.mobile-nav-links a {
  color: white; text-decoration: none; font-family: var(--font-ui);
  font-size: 1.625rem; font-weight: 600; letter-spacing: -0.02em;
  padding: 1.0625rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  opacity: 0; transition: color 0.15s ease;
}
.mobile-nav-links a::after { content: '→'; font-size: 1rem; font-weight: 400; opacity: 0.3; transition: opacity 0.15s ease, transform 0.15s ease; }
.mobile-nav-links a:hover::after { opacity: 0.8; transform: translateX(4px); }
.mobile-nav-links a:hover { color: rgba(255,255,255,0.75); }
.mobile-menu.open .mobile-nav-links a { animation: linkSlideIn 0.35s ease forwards; }
.mobile-menu.open .mobile-nav-links a:nth-child(1) { animation-delay: 0.06s; }
.mobile-menu.open .mobile-nav-links a:nth-child(2) { animation-delay: 0.10s; }
.mobile-menu.open .mobile-nav-links a:nth-child(3) { animation-delay: 0.14s; }
.mobile-menu.open .mobile-nav-links a:nth-child(4) { animation-delay: 0.18s; }
.mobile-menu.open .mobile-nav-links a:nth-child(5) { animation-delay: 0.22s; }
.mobile-menu.open .mobile-nav-links a:nth-child(6) { animation-delay: 0.26s; }
.mobile-nav-links a.mobile-nav-cta {
  margin: 1.5rem 0.75rem 0; background: white; color: var(--accent-deep) !important;
  border-radius: 0.75rem; padding: 1rem 1.25rem; font-size: 1rem; font-weight: 700;
  border-bottom: none; justify-content: center; opacity: 0;
}
.mobile-nav-links a.mobile-nav-cta::after { display: none; }
.mobile-menu.open .mobile-nav-links a.mobile-nav-cta { animation-delay: 0.32s; }
.mobile-menu-footer { padding-top: 1.75rem; display: flex; flex-direction: column; gap: 0.875rem; flex-shrink: 0; }
.mobile-menu-tagline { color: rgba(255,255,255,0.4); font-size: 0.875rem; }

/* ---------- BLOG HERO ---------- */
.blog-hero {
  background: linear-gradient(160deg, #1B3D52 0%, #102333 60%, #0A1B2A 100%);
  color: white; padding: 4.5rem 0 5rem;
}
.blog-eyebrow {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-glow); margin-bottom: 1rem;
}
.blog-hero-title {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.1; color: white; margin-bottom: 1rem; max-width: 24ch;
}
@media (min-width: 768px) { .blog-hero-title { font-size: 3.25rem; } }
.blog-hero-sub { font-size: 1.0625rem; color: rgba(255,255,255,0.72); line-height: 1.65; max-width: 46ch; }

/* ---------- POST LIST ---------- */
.blog-body { padding: 3.5rem 0 2.5rem; }

.post-list { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 900px) { .post-list { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }

.post-card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border-soft);
  border-radius: 1rem; overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
/* All card text lives in .post-card-copy — the card itself carries no padding,
   so the thumbnail can sit flush against its edges. */
.post-card-copy { display: flex; flex-direction: column; flex: 1; padding: 1.75rem; }
.post-card:hover {
  border-color: var(--accent-soft); transform: translateY(-2px);
  box-shadow: 0 12px 32px -18px rgba(13,27,42,0.35);
}
.post-card.is-featured { grid-column: 1 / -1; background: var(--cream); border-color: var(--border); }
.post-card.is-featured .post-card-copy { padding: 2.25rem; }

.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem;
}
.post-tag { color: var(--accent); font-weight: 600; }
.post-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }

.post-card-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  font-size: 1.375rem; line-height: 1.25; color: var(--ink); margin-bottom: 0.75rem;
}
.post-card.is-featured .post-card-title { font-size: 1.875rem; }
@media (min-width: 768px) { .post-card.is-featured .post-card-title { font-size: 2.25rem; } }

.post-card-excerpt { font-size: 0.9375rem; color: var(--text); line-height: 1.7; margin-bottom: 1.5rem; }
.post-card-more { margin-top: auto; font-family: var(--font-ui); font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.post-card:hover .post-card-more { color: var(--accent-deep); }

.blog-empty {
  border: 1px dashed var(--border); border-radius: 1rem; background: var(--cream);
  padding: 3.5rem 2rem; text-align: center;
}
.blog-empty h2 { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.blog-empty p { color: var(--text-muted); font-size: 0.9375rem; max-width: 44ch; margin: 0 auto; line-height: 1.7; }

/* ---------- ARTICLE ---------- */
.article-hero {
  background: linear-gradient(160deg, #1B3D52 0%, #102333 60%, #0A1B2A 100%);
  color: white; padding: 3.5rem 0 4rem;
}
.article-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); text-decoration: none; margin-bottom: 1.75rem;
}
.article-back:hover { color: white; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-bottom: 1.125rem;
}
.article-meta .post-tag { color: var(--accent-glow); }
.article-meta .post-meta-dot { background: rgba(255,255,255,0.25); }
.article-title {
  font-family: var(--font-display); font-size: 2.125rem; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.12; color: white; max-width: 22ch;
}
@media (min-width: 768px) { .article-title { font-size: 3rem; } }
/* Hero and body share the site container (78rem / 2.5rem gutter) so the article's
   left edge lines up with the logo and nav links above it. */
.article-hero .container { max-width: 78rem; }

.article-body { max-width: 78rem; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
@media (min-width: 768px) { .article-body { padding: 4.5rem 2.5rem 5.5rem; } }

/* Text keeps a readable measure inside that wider column rather than running the
   full 78rem, which would be far too long a line to read comfortably. */
.article-body > * { max-width: 54rem; }
.article-figure { max-width: 64rem; }

.article-lede {
  font-size: 1.125rem; color: var(--text); line-height: 1.75;
  margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border);
}

.article-body h2 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink); margin: 3rem 0 1rem;
}
.article-body h3 {
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 600;
  letter-spacing: -0.015em; color: var(--ink); margin: 2rem 0 0.75rem;
}
.article-body p { font-size: 1rem; color: var(--text); line-height: 1.8; margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.25rem; }
.article-body li { font-size: 1rem; color: var(--text); line-height: 1.8; margin-bottom: 0.5rem; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-deep); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body img { width: 100%; height: auto; border-radius: 0.75rem; margin: 2rem 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

.article-body blockquote {
  margin: 2rem 0; padding: 1.5rem 1.75rem;
  background: var(--cream); border-left: 3px solid var(--accent); border-radius: 0 0.75rem 0.75rem 0;
}
.article-body blockquote p { margin-bottom: 0; font-size: 1.0625rem; color: var(--ink); }

.article-callout {
  margin: 2rem 0; padding: 1.5rem 1.75rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 0.875rem;
}
.article-callout-title {
  font-family: var(--font-ui); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.article-callout p:last-child { margin-bottom: 0; }

.article-cta {
  margin-top: 3.5rem; padding: 2.25rem; border-radius: 1rem; text-align: center;
  background: linear-gradient(160deg, #1B3D52 0%, #102333 100%); color: white;
}
.article-cta h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: white; margin: 0 0 0.75rem; }
.article-cta p { color: rgba(255,255,255,0.72); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 1.5rem; }
.article-cta .btn-solid-light { display: inline-block; padding: 0.8125rem 1.5rem; font-size: 0.9375rem; }

/* ---------- FOOTER ---------- */
footer { background: white; padding: 4rem 0 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; } }
.footer-brand .logo { color: var(--ink); margin-bottom: 1.25rem; }
.footer-blurb { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.65; max-width: 22rem; }
.footer-col-title {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 1.125rem;
}
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; margin-bottom: 0.75rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border-soft); padding-top: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem; justify-content: space-between;
  color: var(--text-muted); font-size: 0.8125rem;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; align-items: center; } }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--accent); }

/* ---------- ARTICLE FIGURE ---------- */
.article-figure { margin: 0 0 2.5rem; }
.article-figure img {
  width: 100%; height: auto; display: block;
  border-radius: 0.875rem; border: 1px solid var(--border-soft);
}
.article-figure figcaption { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- POST CARD THUMBNAIL ---------- */
.post-card-thumb {
  display: block; width: 100%; height: auto; margin: 0;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 900px) {
  .post-card.is-featured {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
    align-items: stretch;
  }
  .post-card.is-featured .post-card-thumb {
    width: 100%; height: 100%;
    aspect-ratio: auto;     /* the grid row height wins, not the 3:2 ratio */
    align-self: stretch;
    border-bottom: none; border-right: 1px solid var(--border-soft);
  }
  .post-card.is-featured .post-card-copy { justify-content: center; }
}

/* ---------- MOBILE OVERRIDES ----------
   Mirrors the @media (max-width: 767px) / (max-width: 480px) rules in index.html.
   Without these the nav row (full logo + Book a Call + hamburger) is wider than a
   phone screen and pushes the whole page sideways. */
@media (max-width: 767px) {
  .nav-right .btn-solid-light { display: none; }
  .logo { font-size: 0.875rem; gap: 0.375rem; }
  .logo-img { height: 1.625rem; }

  .blog-hero { padding: 3rem 0 3.5rem; }
  .blog-hero-title { font-size: 2rem; }
  .blog-hero-sub { font-size: 1rem; }
  .blog-body { padding: 2.5rem 0 2rem; }

  .article-hero { padding: 2.75rem 0 3rem; }
  .article-title { font-size: 1.875rem; }
  .article-body { padding: 2.5rem 1.5rem 3.5rem; }
  .article-lede { font-size: 1.0625rem; margin-bottom: 2rem; padding-bottom: 2rem; }
  .article-body h2 { font-size: 1.3125rem; margin: 2.25rem 0 0.875rem; }
  .article-cta { padding: 1.75rem 1.25rem; }
  .article-cta h2 { font-size: 1.25rem; margin-top: 0; }
  .article-callout, .article-body blockquote { padding: 1.25rem 1.25rem; }

  .post-card-copy { padding: 1.5rem; }
  .post-card.is-featured .post-card-copy { padding: 1.5rem; }
  .post-card.is-featured .post-card-title { font-size: 1.5rem; }
  .footer-grid { gap: 2rem; }
}

@media (max-width: 480px) {
  nav .container { padding-top: 0.875rem; padding-bottom: 0.875rem; }
  .blog-hero-title { font-size: 1.75rem; }
  .article-title { font-size: 1.625rem; }
  .post-card-title { font-size: 1.1875rem; }
  .post-card.is-featured .post-card-title { font-size: 1.375rem; }
}

/* Nothing should ever force a horizontal scrollbar. */
img, table, pre { max-width: 100%; }
