/*
Theme Name: KAC Blog
Theme URI: https://kayallencarr.com
Author: Jake at Cowboy Code Ranch
Description: Custom theme for Kay Allen-Carr's blog. Sage/cream editorial design with Cormorant Garamond + Outfit fonts.
Version: 1.0
License: Proprietary
Text Domain: kac-blog
*/

:root {
  --sage: #7A8B6F;
  --sage-light: #A3B18A;
  --sage-pale: #E8EFE2;
  --sage-bg: #F4F7F1;
  --cream: #FDFBF7;
  --warm-white: #FFFEF9;
  --charcoal: #2C2C2C;
  --brown: #4A4340;
  --text: #3D3A37;
  --text-light: #7A746E;
  --text-lighter: #A09890;
  --border: #E8E4DE;
  --border-light: #F0EDE8;
  --peach: #E8C4A8;
  --peach-light: #F5E6D8;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Nav */
nav.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 60px;
  background: var(--cream);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--sage); }
.mobile-menu { display: none; cursor: pointer; }
.mobile-menu span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  margin: 5px 0;
}

/* Blog Hero */
.blog-hero {
  padding: 80px 60px 60px;
  max-width: 900px;
  margin: 0 auto;
}
.blog-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}
.blog-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 600px;
}

/* Category Filter */
.category-filter {
  padding: 0 60px 40px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cat-pill {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}

/* Featured Post */
.featured-post {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 60px;
}
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
}
.featured-image {
  width: 100%;
  height: 360px;
  background: linear-gradient(135deg, var(--sage-pale) 0%, var(--peach-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.featured-image-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--sage);
  opacity: 0.6;
}
.featured-content {
  padding: 40px 40px 40px 0;
}
.featured-badge {
  display: inline-block;
  background: var(--sage);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.featured-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 12px;
}
.featured-content h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}
.featured-content h2 a:hover { color: var(--sage); }
.featured-excerpt {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}
.featured-meta {
  font-size: 0.78rem;
  color: var(--text-lighter);
  font-weight: 500;
}

/* Post Grid */
.posts-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 60px 100px;
}
.posts-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.post-card {
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(74,67,64,0.06);
  border-color: var(--sage-light);
}
.post-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--sage-pale) 0%, var(--border-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.post-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.post-card-image-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--sage-light);
}
.post-card-body { padding: 28px 24px; }
.post-card-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 10px;
}
.post-card-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 10px;
}
.post-card-body h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}
.post-card-body h3 a:hover { color: var(--sage); }
.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  font-size: 0.75rem;
  color: var(--text-lighter);
  font-weight: 500;
}

/* Article Header */
.article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  text-align: center;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sage);
  text-decoration: none;
  margin-bottom: 32px;
  transition: gap 0.3s;
}
.article-back:hover { gap: 10px; }
.article-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}
.article-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 20px;
}
.article-meta {
  font-size: 0.85rem;
  color: var(--text-lighter);
  font-weight: 400;
  margin-bottom: 8px;
}
.article-meta span { margin: 0 8px; opacity: 0.4; }

/* Featured Image */
.article-hero-image {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 24px;
}
.article-hero-image-inner {
  width: 100%;
  background: linear-gradient(135deg, var(--sage-pale) 0%, var(--peach-light) 100%);
  border-radius: 12px;
  overflow: hidden;
  max-height: 620px;
  display: flex;
  justify-content: center;
}
.article-hero-image-inner img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 620px;
  display: block;
  object-fit: contain;
}
.article-hero-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--sage);
  opacity: 0.5;
}

/* Article Body */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.article-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 24px;
  font-weight: 300;
}
.article-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 48px 0 20px;
  line-height: 1.3;
}
.article-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 36px 0 16px;
  line-height: 1.3;
}
.article-body blockquote {
  border-left: 3px solid var(--sage);
  padding: 20px 28px;
  margin: 32px 0;
  background: var(--sage-bg);
  border-radius: 0 8px 8px 0;
}
.article-body blockquote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--brown);
  margin-bottom: 0;
  line-height: 1.6;
  font-weight: 400;
}
.article-body ul, .article-body ol { margin: 20px 0 24px 20px; }
.article-body li {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 300;
}
.article-body a {
  color: var(--sage);
  text-decoration: underline;
  text-decoration-color: var(--sage-pale);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s;
}
.article-body a:hover { text-decoration-color: var(--sage); }
.article-body strong { font-weight: 600; color: var(--charcoal); }
.article-body img { width: 100%; border-radius: 8px; margin: 32px 0; }
.article-body .callout {
  background: var(--sage-bg);
  border: 1px solid var(--sage-pale);
  border-radius: 10px;
  padding: 28px 28px;
  margin: 32px 0;
}
.article-body .callout p { margin-bottom: 0; font-size: 0.95rem; }
.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* Article Author */
.article-author {
  max-width: 680px;
  margin: 0 auto 60px;
  padding: 0 24px;
}
.author-card {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 32px;
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}
.author-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--sage);
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.author-info p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Related Posts */
.related-posts {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 60px 80px;
}
.related-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.related-card {
  padding: 24px;
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}
.related-card:hover {
  border-color: var(--sage-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,67,64,0.05);
}
.related-card-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 8px;
}
.related-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 8px;
}
.related-card-meta {
  font-size: 0.75rem;
  color: var(--text-lighter);
}

/* Newsletter */
.newsletter-cta {
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 0 60px;
}
.newsletter-inner {
  background: var(--sage-bg);
  border-radius: 16px;
  padding: 52px 48px;
  text-align: center;
  border: 1px solid var(--sage-pale);
}
.newsletter-inner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 12px;
}
.newsletter-inner p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 28px;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  background: white;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}
.newsletter-form input:focus { border-color: var(--sage); }
.newsletter-form input::placeholder { color: var(--text-lighter); }
.newsletter-btn {
  padding: 14px 28px;
  background: var(--sage);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
}
.newsletter-btn:hover { background: var(--brown); }

/* Footer */
footer.site-footer {
  padding: 48px 60px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--sage); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-lighter);
}

/* Responsive */
@media (max-width: 768px) {
  nav.site-nav { padding: 20px 24px; }
  .nav-links { display: none; }
  .mobile-menu { display: block; }
  .blog-hero { padding: 48px 24px 40px; }
  .blog-hero h1 { font-size: 2.2rem; }
  .category-filter { padding: 0 24px 32px; }
  .featured-post { padding: 0 24px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-content { padding: 28px 24px; }
  .featured-image { height: 240px; }
  .posts-section { padding: 0 24px 60px; }
  .post-grid { grid-template-columns: 1fr; }
  .article-header { padding: 48px 24px 32px; }
  .article-header h1 { font-size: 2rem; }
  .article-hero-image-inner, .article-hero-image-inner img { max-height: 480px; }
  .author-card { flex-direction: column; text-align: center; }
  .related-posts { padding: 0 24px 60px; }
  .related-grid { grid-template-columns: 1fr; }
  .newsletter-cta { padding: 0 24px; }
  .newsletter-inner { padding: 36px 24px; }
  .newsletter-form { flex-direction: column; }
  footer.site-footer {
    flex-direction: column;
    gap: 16px;
    padding: 36px 24px 24px;
    text-align: center;
  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.blog-hero, .article-header { animation: fadeUp 0.7s ease-out; }
.featured-card { animation: fadeUp 0.7s ease-out 0.15s both; }
