/* ===========================
   PawChart Blog — Brand Guide Design System
   =========================== */

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

:root {
  /* Core */
  --forest: #1B3A2D;
  --forest-vivid: #0D9488;
  --sage: #7EA58C;

  /* Warm Neutrals */
  --cream: #FAF6F0;
  --cream-mid: #F0EADE;
  --parchment: #FFFDF9;

  /* Accent */
  --amber: #C27D19;
  --amber-bright: #E8A840;
  --amber-glow: rgba(194, 125, 25, 0.08);

  /* Text */
  --ink: #1E1E1C;
  --stone: #5E5A52;
  --pebble: #918B82;

  /* Surfaces */
  --border: #DDD8CE;
  --card: #FFFFFF;
  --card-hover: #FDFCFA;

  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(30,30,28,0.04);
  --shadow-mid: 0 4px 20px rgba(30,30,28,0.07);
  --shadow-deep: 0 16px 48px rgba(30,30,28,0.1);

  /* Dark sections */
  --section-dark: var(--forest);
  --section-dark-text: #F4F0E8;
  --section-dark-muted: #B8B2A6;
  --section-dark-line: rgba(244,240,232,0.12);

  /* Radii */
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Fonts */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --forest: #2DD4BF;
    --forest-vivid: #34D399;
    --sage: #4A8A6A;
    --cream: #111110;
    --cream-mid: #191917;
    --parchment: #0D0D0C;
    --amber: #F0A838;
    --amber-bright: #FBBF24;
    --amber-glow: rgba(240, 168, 56, 0.08);
    --ink: #EAE5DB;
    --stone: #A09A90;
    --pebble: #6A645A;
    --border: #2A2826;
    --card: #1A1918;
    --card-hover: #222120;
    --section-dark: #171F1B;
    --section-dark-text: #D5D0C6;
    --section-dark-muted: #7A756C;
    --section-dark-line: rgba(213,208,198,0.08);
  }
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.68;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--forest-vivid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--forest); }

@media (prefers-color-scheme: dark) {
  a:hover { color: var(--amber-bright); }
}

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--parchment);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo:hover { color: var(--ink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--stone);
}

.nav-links a:hover { color: var(--forest-vivid); }

.nav-cta {
  background: var(--forest);
  color: var(--cream) !important;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--forest-vivid) !important;
  color: var(--cream) !important;
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
  .nav { background: var(--parchment); }
  .nav-cta {
    background: var(--forest-vivid);
    color: var(--parchment) !important;
  }
  .nav-cta:hover {
    background: var(--amber-bright) !important;
    color: var(--parchment) !important;
  }
}

/* ===========================
   BLOG INDEX
   =========================== */
.blog-header {
  text-align: center;
  padding: 4rem 24px 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.blog-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.blog-header p {
  font-size: 1.1rem;
  color: var(--stone);
  line-height: 1.6;
}

.blog-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 24px 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: var(--shadow-mid);
  transform: translateY(-2px);
}

.blog-card .tag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.blog-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.25;
}

.blog-card h2 a {
  color: var(--ink);
}

.blog-card h2 a:hover {
  color: var(--forest-vivid);
}

.blog-card .excerpt {
  font-size: 0.95rem;
  color: var(--stone);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card .meta {
  font-size: 0.82rem;
  color: var(--pebble);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===========================
   ARTICLE LAYOUT
   =========================== */
.article-hero {
  background: var(--parchment);
  padding: 4rem 24px 3rem;
  border-bottom: 1px solid var(--border);
}

.article-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.article-hero .breadcrumb {
  font-size: 0.85rem;
  color: var(--pebble);
  margin-bottom: 1.5rem;
}

.article-hero .breadcrumb a { color: var(--forest-vivid); }

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.article-hero .subtitle {
  font-size: 1.15rem;
  color: var(--stone);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.article-hero .article-meta {
  font-size: 0.85rem;
  color: var(--pebble);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-hero .article-meta .reading-time {
  color: var(--amber);
  font-weight: 600;
}

/* ===========================
   ARTICLE CONTENT
   =========================== */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 24px 5rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.article-body p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.72;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.65;
}

.article-body strong {
  font-weight: 600;
  color: var(--ink);
}

.article-body blockquote {
  border-left: 3px solid var(--amber);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--amber-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--stone);
}

.article-body blockquote p {
  margin-bottom: 0.5rem;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body blockquote em {
  font-size: 0.9rem;
  color: var(--pebble);
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  overflow-x: auto;
  display: block;
}

.article-body thead {
  background: var(--cream-mid);
}

.article-body th {
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-body tbody tr:hover {
  background: var(--amber-glow);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ===========================
   CTA BANNER (in-article)
   =========================== */
.article-cta {
  background: var(--forest);
  color: var(--section-dark-text);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .article-cta { background: var(--section-dark); }
}

.article-cta h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--section-dark-text);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.article-cta p {
  color: var(--section-dark-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.article-cta .btn {
  display: inline-block;
  background: var(--amber-bright);
  color: var(--ink);
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.article-cta .btn:hover {
  background: var(--amber);
  color: #fff;
  transform: translateY(-1px);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--forest);
  color: var(--section-dark-text);
  padding: 3rem 24px;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .footer { background: var(--section-dark); }
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--section-dark-text);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--section-dark-muted);
}

.footer-links a:hover { color: var(--section-dark-text); }

.footer-copy {
  font-size: 0.82rem;
  color: var(--section-dark-muted);
  width: 100%;
  margin-top: 1rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 920px) {
  .blog-header h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
  .nav-links { gap: 16px; }
  .blog-header { padding: 3rem 16px 1.5rem; }
  .blog-header h1 { font-size: 1.75rem; }
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 16px 4rem;
  }
  .blog-card { padding: 1.5rem; }
  .article-hero { padding: 3rem 16px 2rem; }
  .article-body { padding: 2rem 16px 4rem; }
  .article-body h2 { font-size: 1.4rem; }
  .article-body table { font-size: 0.82rem; }
  .article-body th, .article-body td { padding: 8px 10px; }
  .article-cta { padding: 2rem 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
