/*
Theme Name: SahaCat
Theme URI: https://sahacat.com
Author: SahaCat
Description: A warm, playful custom theme for SahaCat — a cat health, care & behavior blog. Featuring a paw-print signature motif, rounded typography, and color-coded article tags.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sahacat
*/

/* =========================================================
   0. DESIGN TOKENS
   ========================================================= */
:root {
  /* Color */
  --color-bg: #FCEEDB;
  --color-bg-card: #FFFBF2;
  --color-bg-alt: #F7E4C4;
  --color-ink: #402E24;
  --color-ink-soft: #6B5643;
  --color-white: #FFFDF8;
  --color-marigold: #E3A23C;
  --color-marigold-dark: #C9832A;
  --color-rust: #B85C38;
  --color-rust-dark: #9C4A2C;
  --color-sage: #7E9680;
  --color-sage-dark: #64796A;
  --color-border: rgba(64, 46, 36, 0.12);

  /* Type */
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Literata', Georgia, serif;
  --font-meta: 'Nunito Sans', system-ui, sans-serif;

  /* Layout */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 30px -12px rgba(64, 46, 36, 0.25);
  --shadow-soft: 0 4px 14px -6px rgba(64, 46, 36, 0.18);
  --content-width: 1180px;
}

/* =========================================================
   1. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-rust); text-decoration: none; }
a:hover { color: var(--color-rust-dark); text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.2em; }
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}
:focus-visible {
  outline: 3px solid var(--color-marigold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Screen-reader only */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* =========================================================
   2. BUTTONS & PILLS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-meta);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--color-marigold);
  color: var(--color-ink);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--color-marigold-dark); transform: translateY(-2px); color: var(--color-ink); text-decoration: none; }

.tag-pill {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--color-white);
  background: var(--color-marigold-dark);
}
.tag-pill.sage { background: var(--color-sage-dark); }
.tag-pill.rust { background: var(--color-rust-dark); }

/* =========================================================
   3. PAW DIVIDER (signature element)
   ========================================================= */
.paw-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin: 56px 0;
  opacity: 0.55;
}
.paw-divider svg { width: 20px; height: 20px; fill: var(--color-rust); }
.paw-divider .line {
  height: 1px;
  flex: 1;
  max-width: 160px;
  background: var(--color-border);
}

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding a { text-decoration: none; }
.site-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
}
.site-tagline {
  font-family: var(--font-meta);
  font-size: 0.8rem;
  color: var(--color-ink-soft);
  margin: 0;
}
.custom-logo { max-height: 48px; width: auto; border-radius: 50%; }

.menu-toggle {
  display: none;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-meta);
  font-weight: 700;
  cursor: pointer;
}

.primary-menu {
  display: flex;
  gap: 6px;
  font-family: var(--font-meta);
  font-weight: 700;
  font-size: 0.95rem;
}
.primary-menu li a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--color-ink);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.primary-menu li a:hover,
.primary-menu li.current-menu-item a {
  background: var(--color-marigold);
  color: var(--color-ink);
}
.primary-menu .sub-menu { display: none; }

@media (max-width: 780px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 14px 0;
    gap: 4px;
  }
  .primary-menu.is-open { display: flex; }
  .site-header-inner { flex-wrap: wrap; }
}

/* =========================================================
   5. HERO / FEATURED POST
   ========================================================= */
.featured-post {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 24px;
}
.featured-post .thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4/3;
}
.featured-post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-post .eyebrow {
  font-family: var(--font-meta);
  font-weight: 800;
  color: var(--color-rust-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 10px;
  display: block;
}
.featured-post h1 a { color: inherit; text-decoration: none; }
.featured-post .excerpt { color: var(--color-ink-soft); font-size: 1.05rem; }
.featured-post .meta-line {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin: 10px 0 20px;
}

@media (max-width: 780px) {
  .featured-post { grid-template-columns: 1fr; padding-top: 32px; }
}

/* =========================================================
   6. ARTICLE GRID / CARDS
   ========================================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 48px;
}
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { font-size: 1.15rem; }
.post-card h3 a { color: var(--color-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--color-rust); }
.post-card .excerpt { color: var(--color-ink-soft); font-size: 0.92rem; margin: 0; flex: 1; }
.post-card .card-meta {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--color-ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================
   7. SINGLE POST
   ========================================================= */
.single-post-header { padding: 48px 0 20px; max-width: 780px; margin: 0 auto; text-align: center; }
.single-post-header .meta-line { font-family: var(--font-meta); color: var(--color-ink-soft); font-size: 0.9rem; margin-top: 14px; }
.single-thumb { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); margin: 0 auto 40px; max-width: 900px; }
.entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.08rem;
}
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content blockquote {
  border-left: 4px solid var(--color-marigold);
  margin: 1.6em 0;
  padding: 0.4em 1.4em;
  font-style: italic;
  color: var(--color-ink-soft);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content img { border-radius: var(--radius-md); }
.entry-content a { text-decoration: underline; }

.author-box {
  max-width: 720px;
  margin: 0 auto 40px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 26px 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.author-box .avatar img { border-radius: 50%; width: 64px; height: 64px; object-fit: cover; }
.author-box h4 { margin: 0 0 6px; font-size: 1.05rem; }
.author-box p { margin: 0; color: var(--color-ink-soft); font-size: 0.92rem; }

/* =========================================================
   8. PAGE / STATIC CONTENT
   ========================================================= */
.page-header { padding: 48px 0 12px; text-align: center; }
.page-content { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }
.page-content ul, .page-content ol { padding-left: 1.4em; list-style: disc; margin-bottom: 1.2em; }
.page-content ol { list-style: decimal; }

/* =========================================================
   9. ARCHIVE / SEARCH / 404
   ========================================================= */
.archive-header { padding: 48px 0 8px; }
.archive-header .eyebrow { font-family: var(--font-meta); text-transform: uppercase; letter-spacing: .06em; color: var(--color-rust-dark); font-size: 0.8rem; }
.not-found {
  text-align: center;
  padding: 80px 0;
  max-width: 560px;
  margin: 0 auto;
}
.not-found svg { width: 64px; height: 64px; fill: var(--color-rust); margin-bottom: 20px; }

/* =========================================================
   9b. AUTHOR ARCHIVE
   ========================================================= */
.author-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 0 8px;
}
.author-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 4px solid var(--color-bg-card);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-header .eyebrow {
  font-family: var(--font-meta);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-rust-dark);
  font-size: 0.8rem;
  font-weight: 800;
}
.author-bio { color: var(--color-ink-soft); margin: 14px 0 20px; }

/* =========================================================
   10. SIDEBAR / WIDGETS
   ========================================================= */
.widget {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}
.widget h2, .widget-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-meta);
  font-size: 0.92rem;
}
.widget ul li:last-child { border-bottom: none; }

/* =========================================================
   11. PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 60px;
  font-family: var(--font-meta);
  font-weight: 700;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--color-bg-card);
  color: var(--color-ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}
.pagination .current { background: var(--color-marigold); }
.pagination a:hover { background: var(--color-marigold); text-decoration: none; }

/* =========================================================
   11b. COMMENTS
   ========================================================= */
.comments-area { max-width: 720px; margin: 40px auto 0; }
.comments-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list li { margin-bottom: 20px; }
.comment-list .comment-body {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}
.comment-list .comment-author { font-family: var(--font-meta); font-weight: 700; font-size: 0.92rem; }
.comment-list .comment-metadata { font-family: var(--font-meta); font-size: 0.78rem; color: var(--color-ink-soft); margin-bottom: 8px; }
.comment-list .children { list-style: none; margin-left: 30px; padding: 0; margin-top: 16px; }
.comment-reply-title { font-size: 1.1rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  background: var(--color-bg-card);
  margin-bottom: 14px;
}
.comment-form label { display: block; font-family: var(--font-meta); font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }

/* =========================================================
   12. FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-ink);
  color: var(--color-bg);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 56px 0 32px;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--font-display);
  color: var(--color-bg);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.site-footer a { color: var(--color-bg-alt); }
.site-footer a:hover { color: var(--color-marigold); }
.footer-authors { display: flex; flex-direction: column; gap: 14px; }
.footer-authors .author { display: flex; gap: 10px; align-items: center; font-family: var(--font-meta); font-size: 0.9rem; }
.footer-authors .author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.footer-bottom {
  border-top: 1px solid rgba(252, 238, 219, 0.15);
  padding: 20px 0;
  font-family: var(--font-meta);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom ul { display: flex; gap: 18px; flex-wrap: wrap; }
