/* ===========================
   はるの記録帳 - デザイン
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;600;700&family=M+PLUS+Rounded+1c:wght@300;400;700&family=Zen+Maru+Gothic:wght@400;500&display=swap');

:root {
  --cream: #fdf8f0;
  --warm-white: #fff9f0;
  --caramel: #c8813a;
  --caramel-light: #e8a35a;
  --brown: #6b3e26;
  --brown-light: #8b5e3c;
  --golden: #f5c842;
  --golden-soft: #f9e4a0;
  --mist: #9e8272;
  --border: #e8d8c4;
  --shadow: rgba(107, 62, 38, 0.10);
  --shadow-warm: rgba(107, 62, 38, 0.18);
  --text: #3d2b1a;
  --text-light: #6b4c35;
  --card-bg: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: var(--warm-white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px var(--shadow);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
}

.logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.25rem;
  color: var(--brown);
  letter-spacing: 0.06em;
  font-weight: 600;
}

.logo-text em {
  font-style: normal;
  color: var(--caramel);
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  color: var(--mist);
  text-decoration: none;
  margin-left: 1.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  font-weight: 400;
}

nav a:hover { color: var(--caramel); }

/* ── VISITOR COUNTER ── */
.visitor-counter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 1.5rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
}

.counter-item {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.counter-label {
  font-size: 0.62rem;
  color: var(--mist);
  letter-spacing: 0.05em;
}

.counter-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  color: var(--caramel);
  font-weight: 600;
  line-height: 1;
}

.counter-unit {
  font-size: 0.62rem;
  color: var(--mist);
}

.counter-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #fdf0dc 0%, #fff5e6 50%, #fdefd8 100%);
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 15% 60%, rgba(200, 129, 58, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 250px at 85% 30%, rgba(245, 200, 66, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.paw-deco {
  font-size: 1rem;
  letter-spacing: 0.5rem;
  color: var(--caramel-light);
  margin-bottom: 1.4rem;
  opacity: 0.7;
}

.hero-icon-wrap {
  margin: 0 auto 1.4rem;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--warm-white);
  box-shadow: 0 6px 24px var(--shadow-warm), 0 0 0 3px var(--caramel-light);
  animation: gentle-float 4s ease-in-out infinite;
}

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

@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--brown);
  letter-spacing: 0.12em;
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--caramel);
}

.hero-sub {
  color: var(--mist);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.6rem;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0 auto 1.6rem;
  width: 200px;
}

.hero-divider::before, .hero-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--caramel-light), transparent);
}

.hero-divider-dot { font-size: 0.7rem; color: var(--caramel-light); }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
}

.stat-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  color: var(--brown);
  display: block;
  font-weight: 600;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--mist);
  letter-spacing: 0.12em;
  display: block;
}

/* ── CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding: 1rem 1.4rem;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.filter-btn {
  font-size: 0.78rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--mist);
  cursor: pointer;
  border-radius: 20px;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  text-decoration: none;
  font-family: 'M PLUS Rounded 1c', sans-serif;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--caramel);
  color: #fff;
  border-color: var(--caramel);
  box-shadow: 0 2px 8px rgba(200, 129, 58, 0.25);
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.35rem;
  color: var(--brown);
  letter-spacing: 0.06em;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 5px;
  height: 1.35rem;
  background: linear-gradient(180deg, var(--caramel), var(--golden));
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── ARTICLE GRID ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 2px 12px var(--shadow);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px var(--shadow-warm);
}

.card-header {
  background: linear-gradient(135deg, #fde8c0 0%, #fad9a0 100%);
  padding: 1.8rem 1.4rem 1.4rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.card-deco {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 3.5rem;
  opacity: 0.18;
  line-height: 1;
}

.card-category {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--brown);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  margin-bottom: 0.6rem;
  width: fit-content;
}

.card-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.95rem;
  color: var(--brown);
  line-height: 1.6;
  font-weight: 600;
}

.card-body {
  padding: 1.2rem 1.4rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.card-excerpt {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.75;
  flex: 1;
}

.card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  color: var(--caramel);
  background: var(--golden-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--mist);
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
}

/* ── ARTICLE DETAIL ── */
.article-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed var(--border);
}

.article-category-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--caramel);
  background: var(--golden-soft);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.article-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--brown);
  line-height: 1.55;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.article-meta {
  font-size: 0.78rem;
  color: var(--mist);
  display: flex;
  gap: 1.5rem;
}

.article-body {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.02rem;
  line-height: 2.0;
  color: var(--text-light);
}

.article-body p { margin-bottom: 1.6em; }

/* ── BACK LINK ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--mist);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

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

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--mist);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 0.9rem; line-height: 1.8; }

/* ── BUTTON ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border: none;
  cursor: pointer;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-radius: 20px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--caramel);
  color: white;
  box-shadow: 0 3px 12px rgba(200, 129, 58, 0.3);
}

.btn-primary:hover {
  background: var(--caramel-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(200, 129, 58, 0.35);
}

/* ── FOOTER ── */
footer {
  background: var(--brown);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-top: 5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-logo img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.3);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content { animation: fadeUp 0.8s ease both; }

.article-card:nth-child(1) { animation: fadeUp 0.6s ease 0.05s both; }
.article-card:nth-child(2) { animation: fadeUp 0.6s ease 0.15s both; }
.article-card:nth-child(3) { animation: fadeUp 0.6s ease 0.25s both; }
.article-card:nth-child(4) { animation: fadeUp 0.6s ease 0.35s both; }
.article-card:nth-child(5) { animation: fadeUp 0.6s ease 0.45s both; }
.article-card:nth-child(6) { animation: fadeUp 0.6s ease 0.55s both; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .visitor-counter { display: none; }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 1rem; }
  nav { display: none; }
  .container, .article-detail { padding: 2rem 1rem; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .article-grid { grid-template-columns: 1fr; }
}
