/* ============================================================
   style.css  — Grovemade Journal inspired design
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;600&family=Noto+Sans+JP:wght@300;400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #faf8f5;
  --bg2:      #f2efe9;
  --text:     #1c1c1a;
  --muted:    #7a7870;
  --accent:   #b8945a;
  --border:   #e2ded7;
  --white:    #ffffff;
  --serif:    'Noto Serif JP', serif;
  --sans:     'Noto Sans JP', sans-serif;
  --max-w:    1080px;
  --side-pad: clamp(1.25rem, 5vw, 3rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  height: 78px;
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--muted);
  transition: color .2s;
}

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

/* ── Hero (top page) ──────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-label {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: .02em;
  margin-bottom: 1.2rem;
}

.hero p {
  color: var(--muted);
  font-size: .95rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Section heading ──────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: .06em;
}

.section-head a {
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}

.section-head a:hover { color: var(--text); border-color: var(--text); }

/* ── Post grid ────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem 2rem;
  padding-bottom: 4rem;
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg2);
  margin-bottom: 1.2rem;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.post-card:hover .post-card-img img { transform: scale(1.03); }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}

.post-card-meta time {
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.cat-badge {
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0 .45rem;
  line-height: 1.7;
}

.post-card h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: .7rem;
  transition: color .2s;
}

.post-card:hover h3 { color: var(--accent); }

.post-card-author {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: .8rem;
}

.post-card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg2);
}

.post-card-author span {
  font-size: .78rem;
  color: var(--muted);
}

/* ── Activities (top page) ────────────────────────────────── */
.activities-section {
  background: var(--bg2);
  padding: 1.2rem 0 2.2rem;
  margin-top: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
}

.activity-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.activity-body { flex: 1; }

.activity-author {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .2rem;
}

.activity-text {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.65;
}

.activity-text a { color: var(--accent); border-bottom: 1px solid transparent; }
.activity-text a:hover { border-color: var(--accent); }

.activity-time {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .3rem;
}

/* ── Single post ──────────────────────────────────────────── */
.post-hero {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background: var(--bg2);
}

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

.post-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 4rem;
  padding: 3.5rem 0 5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .post-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.post-header { margin-bottom: 2.5rem; }

.post-header .cats {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
  margin-bottom: 1.2rem;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.post-byline img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg2);
}

.post-byline-text { font-size: .82rem; color: var(--muted); }
.post-byline-text strong { color: var(--text); display: block; }

/* ── Post body ────────────────────────────────────────────── */
.post-body {
  font-size: 1rem;
  line-height: 2;
  color: var(--text);
}

.post-body br { display: block; content: ''; margin-top: .4rem; }

/* ── Post sidebar ─────────────────────────────────────────── */
.post-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-box {
  background: var(--bg2);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-box h3 {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .7rem;
}

.sidebar-author { text-align: center; }

.sidebar-author img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  background: var(--border);
}

.sidebar-author .name {
  font-family: var(--serif);
  font-size: 1rem;
  margin-bottom: .5rem;
}

.sidebar-author .bio {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag-badge {
  font-size: .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: .2rem .6rem;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}

.tag-badge:hover { color: var(--text); border-color: var(--text); }

/* ── Authors page ─────────────────────────────────────────── */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  padding: 3rem 0 5rem;
}

.author-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg2);
  transition: box-shadow .2s;
}

.author-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); }

.author-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  background: var(--border);
}

.author-card h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: .5rem;
}

.author-card p {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Author profile page ──────────────────────────────────── */
.author-profile {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

@media (max-width: 600px) {
  .author-profile { flex-direction: column; gap: 1.5rem; }
}

.author-profile img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.author-profile h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: .7rem;
}

.author-profile .bio {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.filter-bar a {
  font-size: .8rem;
  letter-spacing: .05em;
  padding: .35rem .9rem;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
  transition: all .2s;
}

.filter-bar a:hover,
.filter-bar a.active {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-wrap {
  max-width: 640px;
  margin: 4rem auto 6rem;
}

.contact-wrap h1 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: .8rem;
}

.contact-wrap .lead {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 2.5rem;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  border-radius: 2px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 160px; }

.btn {
  display: inline-block;
  padding: .75rem 2.5rem;
  background: var(--text);
  color: var(--white);
  font-family: var(--sans);
  font-size: .85rem;
  letter-spacing: .08em;
  border: none;
  cursor: pointer;
  transition: background .2s;
  border-radius: 2px;
}

.btn:hover { background: var(--accent); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: .4rem;
  justify-content: center;
  padding: 3rem 0 5rem;
}

.pagination a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-size: .85rem;
  color: var(--muted);
  transition: all .2s;
  border-radius: 2px;
}

.pagination a:hover,
.pagination a.active {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

.site-footer p {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ── Alert ────────────────────────────────────────────────── */
.alert {
  padding: .9rem 1.2rem;
  border-radius: 2px;
  font-size: .88rem;
  margin-bottom: 1.5rem;
}

.alert-success { background: #eef7ee; color: #2d6a2d; }
.alert-error   { background: #fdf0f0; color: #8b2c2c; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .site-nav  { gap: 1.2rem; }
}

/* ── ハンバーガーメニュー（モバイル） ─────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform .25s, opacity .2s;
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

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

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: .5rem var(--side-pad) 1rem;
    gap: 0;
    z-index: 99;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
  }

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

  .site-nav a {
    font-size: .9rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    letter-spacing: .04em;
  }

  .site-nav a:last-child { border-bottom: none; }

  /* 記事グリッドをモバイルで1列 */
  .post-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* 記事詳細レイアウト */
  .post-layout { grid-template-columns: 1fr; gap: 2rem; }

  /* 著者グリッド */
  .authors-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  /* 統計カード */
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .authors-grid { grid-template-columns: 1fr; }
}

/* ── ロゴ下のdescription ───────────────────────────────────── */
.site-logo-wrap { display: flex; flex-direction: column; gap: .12rem; }

.site-desc {
  font-family: var(--serif);
  font-size: .79rem;
  font-weight: 300;
  color: var(--muted);
  opacity: 1;
  letter-spacing: .05em;
  line-height: 1.3;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .1rem;
}

/* ── ヒーロー画像 ─────────────────────────────────────────── */
.hero-img-wrap {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: var(--bg2);
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 活動情報 一行スタイル ────────────────────────────────── */
.activity-item {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .35rem;
  flex: 1;
  min-width: 0;
}

.activity-author-inline {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.activity-author-inline a { color: inherit; }
.activity-author-inline a:hover { color: var(--accent); }

.activity-sep {
  color: var(--border);
  font-size: .8rem;
}

.activity-text-inline {
  font-size: .85rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.activity-text-inline a { color: var(--accent); }

.activity-date-inline {
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
  padding-left: .5rem;
}

@media (max-width: 600px) {
  .site-desc { display: none; }
  .activity-date-inline { display: none; }
}

/* ── 記事内キャッチ画像 ───────────────────────────────────── */
.post-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg2);
  margin-bottom: 2.2rem;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .4s ease;
}

