/* blog/style.css — same token palette + nav as the React app so the
   two halves of the site read as one product. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --paper: #F2F4EC;
  --ink: #22271F;
  --basil: #3E5C43;
  --basil-dark: #2C4230;
  --yolk: #E8A93B;
  --clay: #B5562E;
  --shelf: #DFE3D3;
  --shelf-line: #C7CDB8;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.5rem; }
p { max-width: 68ch; }
a { color: var(--basil-dark); }

/* ---- Header / nav — matches frontend/src/index.css exactly -------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--shelf-line);
}
.brand-mark { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--ink); }
.brand-mark span { white-space: nowrap; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.app-nav { display: flex; gap: 1.25rem; align-items: center; }
.app-nav a { text-decoration: none; color: var(--ink); font-weight: 500; padding: 0.3rem 0.7rem; border-radius: 999px; }
.app-nav a:hover { background: var(--shelf); }
.app-nav a.current { background: var(--basil); color: var(--paper); }
.app-nav a.current:hover { background: var(--basil-dark); }
.app-nav a.nav-cta { border: 1px solid var(--ink); }

.app-header { position: relative; }

.blog-main { max-width: 1000px; margin: 0 auto; padding: 1.5rem; }

/* ---- Latest-post hero ----------------------------------------------- */
.post-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.post-hero img { width: 100%; height: 320px; object-fit: cover; display: block; }
.post-hero .post-hero-copy { padding: 0 2rem 0 0; }
.post-hero.no-image { grid-template-columns: 1fr; padding: 2rem; }
.post-hero.no-image .post-hero-copy { padding: 0; }
.post-hero .eyebrow { font-size: 0.85rem; color: var(--basil-dark); font-weight: 500; margin-bottom: 0.25rem; }
.post-hero h1 { font-size: 2rem; margin-bottom: 0.6rem; }
.post-hero .post-date { display: block; margin-bottom: 0.5rem; }
.post-hero-copy a.read-more {
  display: inline-block; margin-top: 0.75rem; text-decoration: none;
  font-weight: 600; color: var(--basil-dark);
}

/* ---- Post grid -------------------------------------------------------- */
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 1rem; }
.eyebrow { font-size: 0.85rem; color: var(--basil-dark); font-weight: 500; margin-bottom: 0.15rem; }
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.post-card img { width: 100%; height: 160px; object-fit: cover; }
.post-card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.post-card .post-date { font-size: 0.78rem; color: var(--basil-dark); }
.post-card h3 { font-size: 1.05rem; margin: 0; }
.post-card p { font-size: 0.88rem; margin: 0; color: #4A4F41; }

/* ---- Single post ------------------------------------------------------- */
.post-body { margin: 1.5rem 0 2.5rem; }
.post-body p, .post-body div { line-height: 1.7; margin: 0 0 1rem; max-width: 68ch; }
.post-body h2 { font-size: 1.5rem; margin: 2rem 0 0.5rem; }
.post-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.4rem; }
.post-body ul, .post-body ol { line-height: 1.7; max-width: 68ch; padding-left: 1.4rem; }
.post-body blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--basil); color: #4A4F41; max-width: 68ch; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 1.25rem 0; }
.post-body hr { border: none; border-top: 1px solid var(--shelf-line); margin: 2rem 0; }
.preview-banner { background: var(--yolk); color: var(--ink); font-weight: 600; padding: 0.5rem 0.9rem; border-radius: 6px; max-width: none; }
.post-date { font-size: 0.85rem; color: var(--basil-dark); }

/* ---- Consultant widget -------------------------------------------- */
.consultant-widget {
  background: var(--shelf);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.consultant-widget h3 { margin-bottom: 0.35rem; }
.consultant-widget p { font-size: 0.92rem; margin-bottom: 1rem; }
.consultant-widget form { display: flex; flex-direction: column; gap: 0.6rem; }
.consultant-widget label { font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.25rem; }
.consultant-widget input, .consultant-widget textarea {
  font-family: var(--font-body);
  padding: 0.5rem;
  border: 1px solid var(--shelf-line);
  border-radius: 4px;
}
.consultant-widget button {
  align-self: flex-start;
  background: var(--yolk);
  border: 1px solid var(--yolk);
  color: var(--ink);
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
}
.consultant-widget button:hover { filter: brightness(0.94); }
.consultant-widget .success-note { color: var(--basil-dark); font-weight: 500; }

.nav-links, .nav-actions { display: flex; align-items: center; gap: 1.25rem; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--paper);
    border-top: 1px solid var(--shelf-line);
    box-shadow: 0 -6px 18px rgba(34, 39, 31, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 62px; padding: 6px 2px;
    color: var(--ink); text-decoration: none; font-size: 0.68rem; font-weight: 500;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav .tab-icon {
    display: flex; align-items: center; justify-content: center;
    padding: 3px 16px; border-radius: 999px;
  }
  .bottom-nav a.current { color: var(--basil-dark); font-weight: 600; }
  .bottom-nav a.current .tab-icon { background: var(--basil); color: var(--paper); }
}

@media (max-width: 700px) {
  .app-header { padding: 0.75rem 1rem; }
  .blog-main { padding: 1rem; }
  .post-hero h1 { font-size: 1.6rem; }
  .post-hero.no-image { padding: 1.25rem; }
  .post-grid { grid-template-columns: 1fr; }
  .consultant-widget { padding: 1rem; }
  .consultant-widget input, .consultant-widget textarea { font-size: 16px; }
  .consultant-widget button { min-height: 44px; width: 100%; }
  .post-hero { grid-template-columns: 1fr; }
  .post-hero .post-hero-copy { padding: 0 1.25rem 1.5rem; }
  .post-hero img { height: 220px; }
}

@media (max-width: 640px) {
  .brand-mark { gap: 0.4rem; min-width: 0; }
  .brand-mark span { font-size: 1.12rem; }
  .brand-mark svg { width: 24px; height: 24px; }
  .hide-mobile { display: none; }
}
