/*
Theme Name: Cats & Moonlight
Theme URI: https://example.com/kotiki
Author: Claude
Author URI: https://claude.ai
Description: A warm theme for a cat blog, cattery, or pet journal. Midnight-blue palette, an illustrated cat on the homepage, and paw-print dividers instead of plain lines.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: kotiki
*/

/* =========================================================
   DESIGN TOKENS
   Palette: night + moonlight + two warm accents (amber and coral)
   Fonts: Fraunces (curvy, feline-esque) + Inter (calm body text)
   ========================================================= */

:root {
  --ink: #12141f;
  --night: #1b1f3b;
  --night-soft: #242a52;
  --cream: #f6f1e4;
  --lavender: #a3a8cf;
  --amber: #f2a65a;
  --coral: #ef7d8f;
  --line: rgba(246, 241, 228, 0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 18px;
  --gap: clamp(1.25rem, 2vw, 2.5rem);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(242, 166, 90, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 50% at 100% 20%, rgba(239, 125, 143, 0.08), transparent 60%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

img { max-width: 100%; display: block; }

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--coral); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--cream);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-optical-sizing: auto; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--amber);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

p { color: var(--lavender); }

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 20, 31, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-branding { display: flex; align-items: center; gap: 0.7rem; }

.site-branding .cat-mark { width: 34px; height: 34px; flex-shrink: 0; }
.site-branding .cat-mark path { fill: var(--amber); }

.site-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  color: var(--cream);
}
.site-title a { color: inherit; }
.site-description {
  margin: 0;
  font-size: 0.8rem;
  color: var(--lavender);
  font-style: italic;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--cream);
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--amber);
  transition: right 0.25s ease;
}
.primary-nav a:hover::after,
.primary-nav a.current::after { right: 0; }

.menu-toggle { display: none; }

/* =========================================================
   HERO + CAT ILLUSTRATION (signature element)
   ========================================================= */

.hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--gap);
}

.hero-copy p { max-width: 42ch; font-size: 1.1rem; }

.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(242, 166, 90, 0.28);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }

/* Cat: sits still, tail sways, eyes blink once per cycle */
.hero-cat { position: relative; display: flex; justify-content: center; }
.hero-cat svg { width: min(100%, 380px); height: auto; }

.cat-tail {
  transform-origin: 168px 210px;
  animation: tail-sway 4.5s ease-in-out infinite;
}
.cat-eyes { animation: blink 5.5s steps(1) infinite; }

@keyframes tail-sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-9deg); }
}
@keyframes blink {
  0%, 92%, 100% { opacity: 1; }
  95% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-tail, .cat-eyes { animation: none; }
  html { scroll-behavior: auto; }
}

/* Paw-print divider instead of a plain line */
.paw-divider {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  padding: 2.5rem 0;
  opacity: 0.55;
}
.paw-divider svg { width: 22px; height: 22px; }
.paw-divider svg:nth-child(2) { transform: translateY(-6px) rotate(8deg); }
.paw-divider svg:nth-child(4) { transform: translateY(-6px) rotate(-8deg); }
.paw-divider path { fill: var(--amber); }

/* =========================================================
   POST GRID
   ========================================================= */

.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 2.5rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.post-card {
  background: var(--night-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(242, 166, 90, 0.4); }

.post-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink);
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card .body { padding: 1.4rem 1.5rem 1.7rem; flex: 1; display: flex; flex-direction: column; }

.post-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.post-meta svg { width: 13px; height: 13px; }
.post-meta path { fill: var(--amber); }

.post-card h3 { margin-bottom: 0.5rem; }
.post-card h3 a { color: var(--cream); }
.post-card h3 a:hover { color: var(--amber); }

.post-excerpt { font-size: 0.94rem; flex: 1; }

.read-more {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral);
}

/* =========================================================
   FEATURES / CARDS
   ========================================================= */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.feature-card {
  padding: 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.feature-card svg { width: 30px; height: 30px; margin-bottom: 1rem; }
.feature-card path { fill: var(--coral); }
.feature-card p { font-size: 0.92rem; }

/* =========================================================
   SINGLE POST / PAGE
   ========================================================= */

.single-article { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.single-article .entry-header { max-width: 68ch; margin-bottom: 2rem; }
.single-article .entry-meta { color: var(--amber); font-size: 0.85rem; margin-bottom: 0.8rem; }
.single-article .entry-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 2.5rem; }
.entry-content { max-width: 68ch; font-size: 1.08rem; }
.entry-content p { color: var(--cream); opacity: 0.92; margin-bottom: 1.4em; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  border-left: 3px solid var(--amber);
  margin: 2em 0;
  padding: 0.2em 0 0.2em 1.4em;
  font-style: italic;
  color: var(--lavender);
}
.entry-content img { border-radius: var(--radius); margin: 1.6em 0; }

.entry-footer { max-width: 68ch; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tag-links a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  margin: 0 0.4rem 0.4rem 0;
  color: var(--lavender);
}
.tag-links a:hover { border-color: var(--amber); color: var(--amber); }

/* Comments */
.comments-area { max-width: 68ch; margin-top: 3rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}
.comment-author { font-weight: 600; color: var(--cream); }
.comment-metadata { font-size: 0.78rem; color: var(--lavender); }

/* =========================================================
   SIDEBAR
   ========================================================= */

.content-layout { display: grid; grid-template-columns: 2.2fr 1fr; gap: var(--gap); align-items: start; }
.widget-area .widget {
  background: var(--night-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.widget-title { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 0.4rem 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.widget li:last-child { border-bottom: none; }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 2.5rem;
}
.footer-grid p { font-size: 0.9rem; }
.footer-grid h4 { font-size: 0.95rem; color: var(--amber); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a { color: var(--lavender); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--amber); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--lavender);
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-bottom .paw-divider { padding: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-copy p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-cat { order: -1; margin-bottom: 1rem; }
  .features { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .primary-nav { display: none; }
}
