/* =========================================================
   Proof & Praise — global styles
   Palette: soft black & white base, muted earthy accents
   ========================================================= */

:root {
  /* Base neutrals */
  --color-bg: #faf8f4;
  --color-bg-alt: #f2efe8;
  --color-surface: #ffffff;
  --color-text: #2a2924;
  --color-text-soft: #5c5a52;
  --color-border: #e4e0d6;

  /* Earthy / gender-neutral accents */
  --color-sage: #7c9473;
  --color-sage-dark: #5f7657;
  --color-dusk-blue: #7a94a3;
  --color-dusk-blue-dark: #5f7c8c;
  --color-clay: #b98a5e;
  --color-clay-dark: #9c7148;

  /* Semantic */
  --color-accent: var(--color-sage);
  --color-accent-dark: var(--color-sage-dark);
  --color-star: #c9a15a;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 2px rgba(30, 28, 20, 0.06), 0 2px 8px rgba(30, 28, 20, 0.05);
  --shadow-hover: 0 4px 16px rgba(30, 28, 20, 0.10);

  --font-heading: "Georgia", "Iowan Old Style", serif;
  --font-body: "Georgia", "Iowan Old Style", serif;

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  padding-bottom: 16px;
  position: relative;
}

.nav-toggle {
  display: none;
  position: absolute;
  top: 14px;
  right: 20px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
}

.site-nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-text-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-accent-dark);
}

/* ---------- Site hero (logo + tagline, shown on every page) ---------- */

.site-hero {
  padding: 14px 0;
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg));
  border-bottom: 1px solid var(--color-border);
}

.site-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.hero-logo {
  height: clamp(115px, 14vw, 145px);
  width: auto;
  display: block;
}

.site-hero p {
  color: var(--color-text-soft);
  margin: 0;
}

@media (min-width: 720px) {
  .site-hero-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 24px;
  }

  .site-hero p {
    flex: 1;
  }
}

/* ---------- Page hero (per-page sub-header: About, My Kitchen, Contact) ---------- */

.hero {
  padding: 40px 0 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg));
  border-bottom: 1px solid var(--color-border);
}

.hero h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.hero p {
  color: var(--color-text-soft);
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Filter / Search bar ---------- */

.filter-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .filter-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    align-items: end;
  }
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-field[hidden] {
  display: none;
}

.filter-field label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  font-weight: 600;
}

.filter-field input,
.filter-field select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

.filter-field input:focus,
.filter-field select:focus {
  outline: 2px solid var(--color-sage);
  outline-offset: 1px;
}

.btn-reset {
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-soft);
  cursor: pointer;
  white-space: nowrap;
}

.btn-reset:hover {
  border-color: var(--color-dusk-blue);
  color: var(--color-dusk-blue-dark);
}

.results-meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--color-text-soft);
}

/* ---------- Home layout / recent sidebar (desktop only) ---------- */

.recent-sidebar {
  display: none;
}

@media (min-width: 980px) {
  .home-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 32px;
    align-items: start;
  }

  .recent-sidebar {
    display: block;
    position: sticky;
    top: 84px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 28px;
  }
}

.recent-sidebar h2 {
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
}

.recent-item img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-alt);
}

.recent-item span {
  font-size: 0.85rem;
  line-height: 1.3;
}

.recent-item:hover span {
  color: var(--color-sage-dark);
}

/* ---------- Post grid / cards ---------- */

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 28px 0 48px;
}

@media (min-width: 620px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

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

.card-image {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt) center/cover no-repeat;
}

.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(124, 148, 115, 0.14);
  color: var(--color-sage-dark);
}

.tag.category-desserts    { background: rgba(185, 138, 94, 0.16); color: var(--color-clay-dark); }
.tag.category-main-dishes { background: rgba(122, 148, 163, 0.16); color: var(--color-dusk-blue-dark); }

.card h3 {
  font-size: 1.12rem;
  margin: 0;
}

.card h3 a {
  color: var(--color-text);
}

.card-meta {
  font-size: 0.78rem;
  color: var(--color-text-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.rating {
  color: var(--color-star);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-soft);
}

/* ---------- Post detail page ---------- */

.post-hero {
  padding: 32px 0 0;
}

.post-column {
  max-width: 760px;
  margin: 0 auto;
}

.post-sidebar {
  display: none;
}

@media (min-width: 1100px) {
  .post-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
  }

  .post-column {
    margin: 0;
  }

  .post-sidebar {
    display: block;
    width: 150px;
    flex-shrink: 0;
    position: sticky;
    top: 84px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
  }
}

.post-sidebar h2 {
  font-size: 0.78rem;
  margin: 0 0 10px;
}

.post-sidebar .recent-item img {
  width: 26px;
  height: 26px;
}

.post-sidebar .recent-item span {
  font-size: 0.72rem;
}

.post-hero-image {
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt) center/cover no-repeat;
  margin-bottom: 20px;
}

.post-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: var(--color-text-soft);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  color: var(--color-clay-dark);
}

.source-credit {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-dusk-blue);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 22px 0;
  font-size: 0.92rem;
}

.source-credit strong {
  color: var(--color-text);
}

.post-body img {
  border-radius: var(--radius-md);
  margin: 18px 0;
}

.post-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  font-size: 1.15rem;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.post-body li {
  margin-bottom: 0.4em;
}

.recipe-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  margin: 28px 0;
}

.recipe-box h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.modifications-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-clay);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 24px 0;
}

.modifications-box h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.05rem;
  color: var(--color-clay-dark);
}

.signature {
  margin-top: 30px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-text);
  line-height: 1.4;
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0 26px;
}

.post-gallery img {
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
}

.affiliate-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 28px 0;
}

.affiliate-box h4 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.affiliate-box ul {
  margin: 0;
  padding-left: 18px;
}

.affiliate-disclosure {
  font-size: 0.75rem;
  color: var(--color-text-soft);
  margin-top: 10px;
}

/* ---------- My Kitchen page ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 26px 0;
}

@media (min-width: 620px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 18px;
}

.tool-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 10px;
}

.tool-card a {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-sage-dark);
}

/* ---------- Contact page ---------- */

.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.social-link {
  padding: 12px 28px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
}

.social-link:hover {
  border-color: var(--color-sage);
  color: var(--color-sage-dark);
  text-decoration: none;
}

.tag-row {
  margin: 24px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.comments-section {
  margin: 20px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.comments-section h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.comments-placeholder {
  font-size: 0.88rem;
  color: var(--color-text-soft);
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.back-link {
  display: inline-block;
  margin: 24px 0 40px;
  font-weight: 600;
  color: var(--color-sage-dark);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 28px 0;
  margin-top: 20px;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.85rem;
}

/* ---------- Mobile nav ---------- */

@media (max-width: 719px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0 4px;
  }

  .site-nav a {
    display: block;
    padding: 10px 4px;
    text-align: center;
    border-top: 1px solid var(--color-border);
  }
}
