/*
Theme Name: Xiao Bai Journal
Theme URI: https://c.af/
Description: A quiet cat journal child theme for c.af.
Author: OpenClaw
Template: twentytwentythree
Version: 1.0.2
*/

:root {
  --caf-paper: #fbfaf7;
  --caf-ink: #202124;
  --caf-muted: #70757a;
  --caf-line: #e8e3dc;
  --caf-blue: #5b8fb9;
  --caf-blue-soft: #eaf3f8;
  --caf-card: #ffffff;
  --caf-shadow: 0 18px 45px rgba(40, 35, 28, .09);
}

body {
  background: var(--caf-paper);
  color: var(--caf-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

body,
.wp-site-blocks {
  margin: 0;
}

.caf-home a {
  color: inherit;
  text-decoration: none;
}

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

.caf-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, .86);
  border-bottom: 1px solid rgba(232, 227, 220, .75);
  backdrop-filter: blur(18px);
}

.caf-nav {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.caf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 760;
  white-space: nowrap;
}

.caf-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--caf-blue-soft);
  color: var(--caf-blue);
  font-size: 18px;
}

.caf-menu {
  display: flex;
  gap: 24px;
  color: #4f5357;
  font-size: 14px;
}

.caf-hero {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.08fr);
  gap: 56px;
  align-items: center;
  padding: 54px 0 42px;
}

.caf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 24px;
  color: var(--caf-blue);
  font-size: 13px;
  font-weight: 720;
}

.caf-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.caf-hero-title {
  max-width: 560px;
  margin: 0;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 820;
}

.caf-intro {
  max-width: 560px;
  margin: 26px 0 0;
  color: #55595d;
  font-size: 18px;
}

.caf-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.caf-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--caf-line);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(40, 35, 28, .05);
}

.caf-button-primary {
  border-color: var(--caf-blue);
  background: var(--caf-blue);
  color: #fff !important;
}

.caf-hero-photo {
  position: relative;
  align-self: stretch;
  min-height: 560px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--caf-shadow);
}

.caf-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caf-photo-note {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  color: #2d3033;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.caf-photo-note strong {
  display: block;
  font-size: 16px;
}

.caf-section {
  padding: 72px 0;
  border-top: 1px solid var(--caf-line);
}

.caf-wrap {
  width: min(1120px, calc(100% - 40px));
  max-width: 1120px !important;
  margin: 0 auto;
}

.caf-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.caf-section h2,
.caf-section-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
}

.caf-section-head p {
  max-width: 460px;
  margin: 0;
  color: var(--caf-muted);
  font-size: 15px;
}

.caf-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 28px;
}

.caf-lead-post,
.caf-side-panel,
.caf-post-card {
  background: var(--caf-card);
  border: 1px solid var(--caf-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(40, 35, 28, .055);
}

.caf-lead-post {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(0, 1fr);
  min-height: 420px;
}

.caf-lead-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caf-post-copy {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.caf-meta {
  color: var(--caf-muted);
  font-size: 13px;
  font-weight: 650;
}

.caf-post-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: 0;
}

.caf-post-text {
  margin: 14px 0 0;
  color: #585c60;
  font-size: 16px;
}

.caf-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.caf-tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--caf-blue-soft);
  color: #326682;
  font-size: 12px;
  font-weight: 720;
}

.caf-side-panel {
  padding: 24px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  background: #fffdf9;
}

.caf-mini-list {
  display: grid;
  gap: 18px;
}

.caf-mini-post {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--caf-line);
}

.caf-mini-post:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.caf-mini-post img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
}

.caf-mini-post strong {
  display: block;
  line-height: 1.35;
}

.caf-mini-post span span {
  color: var(--caf-muted);
  font-size: 13px;
}

.caf-category-band {
  background: #f2f7f9;
}

.caf-latest .wp-block-post-template,
.caf-latest .wp-block-post-template.is-flex-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
}

.caf-latest .wp-block-post {
  display: flex;
  width: auto !important;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--caf-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(40, 35, 28, .055);
}

.caf-latest .wp-block-post-featured-image {
  margin: 0;
}

.caf-latest .wp-block-post-featured-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  object-fit: cover;
}

.caf-latest .wp-block-post-title {
  margin: 0;
  padding: 0 22px;
  font-size: 20px;
  line-height: 1.32;
  letter-spacing: 0;
}

.caf-latest .wp-block-post-date {
  order: 2;
  margin: 22px 22px 8px;
  color: var(--caf-muted);
  font-size: 13px;
  font-weight: 650;
}

.caf-latest .wp-block-post-excerpt {
  margin: 12px 22px 24px;
  color: #585c60;
  font-size: 15px;
}

.caf-latest .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.caf-latest .wp-block-query-pagination {
  margin-top: 34px;
}

.caf-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.caf-category {
  min-height: 150px;
  padding: 22px;
  border: 1px solid #dce9ef;
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.caf-category strong {
  font-size: 20px;
}

.caf-category span {
  color: var(--caf-muted);
  font-size: 14px;
}

.caf-footer {
  padding: 36px 0 46px;
  color: var(--caf-muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .caf-hero,
  .caf-featured,
  .caf-lead-post {
    grid-template-columns: 1fr;
  }

  .caf-hero {
    min-height: auto;
    gap: 32px;
    padding-top: 40px;
  }

  .caf-hero-photo {
    min-height: 460px;
  }

  .caf-latest .wp-block-post-template,
  .caf-latest .wp-block-post-template.is-flex-container,
  .caf-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .caf-lead-post img {
    aspect-ratio: 16 / 10;
    height: auto;
  }
}

@media (max-width: 640px) {
  .caf-nav,
  .caf-wrap,
  .caf-hero {
    width: min(100% - 28px, 1120px);
  }

  .caf-menu {
    gap: 14px;
    font-size: 13px;
  }

  .caf-menu a:nth-child(n+4) {
    display: none;
  }

  .caf-hero-photo {
    min-height: 360px;
  }

  .caf-photo-note {
    left: 14px;
    right: 14px;
    bottom: 14px;
    flex-direction: column;
  }

  .caf-section {
    padding: 48px 0;
  }

  .caf-section-head {
    display: block;
  }

  .caf-section-head p {
    margin-top: 10px;
  }

  .caf-latest .wp-block-post-template,
  .caf-latest .wp-block-post-template.is-flex-container,
  .caf-categories {
    grid-template-columns: 1fr;
  }

  .caf-post-copy {
    padding: 24px;
  }
}
