/* ── Tokens ── */
:root {
  --bg: #f4f1eb;
  --surface: #fff;
  --text: #1a1714;
  --text-muted: #7a756d;
  --border: #dedad1;
  --accent: #8c7a5e;
  --header-h: 48px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: "Noto Serif JP", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(244, 241, 235, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 100%;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
}

.site-title {
  font-family: "Noto Serif JP", serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  margin-right: auto;
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--text); }

/* ── Site Main ── */
.site-main { min-height: calc(100vh - var(--header-h) - 120px); }

/* ── Masthead (homepage only) ── */
.site-masthead {
  padding: 72px 32px 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.masthead-title {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
}

.masthead-sub {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

/* ── Posts Grid (5-tile asymmetric) ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 290px 290px 250px;
  gap: 2px;
  background: var(--border);
}

/* Big left: 4 cols wide, 2 rows tall */
.post-card:nth-child(1) { grid-column: 1 / 5; grid-row: 1 / 3; }
/* Small right top */
.post-card:nth-child(2) { grid-column: 5 / 7; grid-row: 1; }
/* Small right bottom */
.post-card:nth-child(3) { grid-column: 5 / 7; grid-row: 2; }
/* Bottom left half */
.post-card:nth-child(4) { grid-column: 1 / 4; grid-row: 3; }
/* Bottom right half */
.post-card:nth-child(5) { grid-column: 4 / 7; grid-row: 3; }

/* Tablet: 2-col equal */
@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
  }
  .post-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
}

/* Mobile: 1-col */
@media (max-width: 540px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* ── Post Card ── */
.post-card {
  position: relative;
  overflow: hidden;
  background: #c8c4bc;
}

.post-card-link {
  display: block;
  width: 100%;
  height: 100%;
}

.post-card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-card:hover .post-card-image { transform: scale(1.05); }

.post-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 8, 6, 0.78) 0%,
    rgba(10, 8, 6, 0.08) 55%,
    transparent 100%
  );
}

.post-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 20px 20px;
  color: #fff;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.55;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 7px;
}

/* Larger title on the big first card */
.post-card:nth-child(1) .post-card-title {
  font-size: 1.4rem;
  letter-spacing: 0.12em;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.post-card-count {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.65rem;
}

/* ── Archive Footer ── */
.archive-footer {
  padding: 36px 32px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.archive-total {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.pagination-links {
  display: flex;
  gap: 40px;
}

.pagination-link {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.pagination-link:hover { color: var(--text); }

/* ── Single Post: Hero ── */
.post-hero {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #c8c4bc;
}

@media (max-width: 700px) {
  .post-hero { aspect-ratio: 16 / 9; }
}

.post-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ── Single Post: Text Column ── */
.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 28px 0;
}

.post-header {
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.65;
  margin-bottom: 16px;
}

.post-date {
  display: block;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-category {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 2px;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.post-category:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.post-description {
  font-size: 0.94rem;
  line-height: 2.2;
  color: #3a3631;
  margin-bottom: 52px;
}

/* ── Gallery ── */
.post-gallery-section {
  margin: 0 auto 72px;
  max-width: 1200px;
}

.gallery-meta {
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 0 28px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: var(--border);
}

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

@media (max-width: 480px) {
  .post-gallery { grid-template-columns: 1fr; }
}

.gallery-item {
  overflow: hidden;
  background: #c8c4bc;
  aspect-ratio: 4 / 3;
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover img { transform: scale(1.04); }

/* ── Post Footer ── */
.post-footer-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px 72px;
}

.post-footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.back-link:hover { color: var(--text); }

/* ── Site Footer ── */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.4);
  padding: 44px 24px;
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  line-height: 2.2;
}

/* ── List / Taxonomy ── */
.list-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.list-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
