/* =========================================================
   カジミエ ブログ 共通スタイル
   LP（../index.html）のデザイントークンを流用して見た目を統一する。
   ========================================================= */

:root {
  --paper:      #efeae1;
  --paper-deep: #e6e0d4;
  --card:       #fbf9f4;
  --ink:        #221f18;
  --muted:      #6f6a5e;
  --faint:      #9b9587;
  --green:      #5e8b70;
  --green-deep: #3c5b48;
  --green-soft: #cfe0d3;
  --amber:      #c0883c;
  --amber-deep: #9d6a26;
  --terra:      #c75d4b;
  --line:       rgba(54,44,24,0.12);
  --line-soft:  rgba(54,44,24,0.07);
  --shadow:     0 30px 60px -28px rgba(60,48,24,0.45), 0 8px 22px -14px rgba(60,48,24,0.30);
  --maru: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --kaku: "Zen Kaku Gothic New", "Hiragino Sans", Meiryo, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--kaku);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* ---- atmosphere: grain ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

/* ---------------- header（LPと共通） ---------------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(239,234,225,0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
header.scrolled {
  border-bottom-color: var(--line-soft);
  background: rgba(239,234,225,0.88);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 28px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand .mark {
  font-family: var(--maru);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand .romaji {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--faint);
  letter-spacing: 0.04em;
}
nav.top { display: flex; align-items: center; gap: 28px; }
nav.top a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
nav.top a:hover { color: var(--green-deep); }
.nav-cta {
  font-family: var(--maru);
  font-weight: 700;
  font-size: 13px;
  background: var(--green);
  padding: 9px 18px;
  border-radius: 11px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
nav.top a.nav-cta,
nav.top a.nav-cta:hover,
nav.top a.nav-cta:focus,
nav.top a.nav-cta:active,
nav.top a.nav-cta:visited { color: #fff; }
.nav-cta:hover { background: var(--green-deep); transform: translateY(-1px); }
@media (max-width: 760px) {
  nav.top a.hide-sm { display: none; }
  .header-inner { padding: 0 18px; }
  .brand .romaji { display: none; }
}

/* ---------------- 共通レイアウト ---------------- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(94,139,112,0.12);
  border: 1px solid rgba(94,139,112,0.22);
}

/* ---------------- ブログ一覧（index） ---------------- */
.blog-hero {
  text-align: center;
  padding: clamp(48px, 8vw, 86px) 24px clamp(28px, 4vw, 44px);
}
.blog-hero h1 {
  font-family: var(--maru);
  font-weight: 900;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 22px 0 16px;
}
.blog-hero p {
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.9;
  color: var(--muted);
  max-width: 30em;
  margin: 0 auto;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.post-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 26px 28px;
  text-decoration: none;
  box-shadow: 0 18px 36px -28px rgba(60,48,24,0.4);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94,139,112,0.4);
  box-shadow: 0 26px 44px -28px rgba(60,48,24,0.5);
}
.post-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.post-card .tag {
  font-weight: 500;
  color: var(--green-deep);
  background: rgba(94,139,112,0.12);
  border: 1px solid rgba(94,139,112,0.22);
  padding: 3px 11px;
  border-radius: 999px;
}
.post-card h2 {
  font-family: var(--maru);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 10px;
}
.post-card p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
}
.post-card .more {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--maru);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--green-deep);
}

/* ---------------- 記事本文（article） ---------------- */
.article {
  padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 40px);
}
.breadcrumb {
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-deep); }
.article .art-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.article .tag {
  font-weight: 500;
  color: var(--green-deep);
  background: rgba(94,139,112,0.12);
  border: 1px solid rgba(94,139,112,0.22);
  padding: 3px 11px;
  border-radius: 999px;
}
.article h1 {
  font-family: var(--maru);
  font-weight: 900;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 28px;
}
.article .lead {
  font-size: clamp(15.5px, 1.8vw, 18px);
  line-height: 2;
  color: var(--muted);
  margin-bottom: 36px;
  padding-left: 16px;
  border-left: 3px solid var(--green-soft);
}
.article h2 {
  font-family: var(--maru);
  font-weight: 700;
  font-size: clamp(20px, 2.8vw, 26px);
  line-height: 1.5;
  color: var(--ink);
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.article h3 {
  font-family: var(--maru);
  font-weight: 700;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--green-deep);
  margin: 32px 0 12px;
}
.article p { margin: 0 0 20px; }
.article ul, .article ol { margin: 0 0 24px; padding-left: 1.4em; }
.article li { margin-bottom: 10px; }
.article strong { font-weight: 700; color: var(--ink); }
.article a.inline { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }

/* 手順ステップ */
.steps { list-style: none; counter-reset: step; padding-left: 0; margin: 0 0 28px; }
.steps > li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 20px 22px 20px 64px;
  margin-bottom: 14px;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--maru);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
}
.steps > li h3 { margin: 0 0 6px; }
.steps > li p:last-child { margin-bottom: 0; }

/* 補足ボックス */
.callout {
  background: rgba(192,136,60,0.08);
  border: 1px solid rgba(192,136,60,0.25);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.85;
}
.callout strong { color: var(--amber-deep); }

/* ---------------- アプリへのCTA ---------------- */
.app-cta {
  background: linear-gradient(160deg, #3c5b48, #2c4636);
  border-radius: 22px;
  padding: clamp(28px, 5vw, 44px);
  margin: 48px 0 16px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow);
}
.app-cta h2 {
  font-family: var(--maru);
  font-weight: 900;
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.5;
  color: #fff;
  border: none;
  margin: 0 0 12px;
  padding: 0;
}
.app-cta p {
  color: rgba(255,255,255,0.82);
  font-size: 14.5px;
  line-height: 1.9;
  max-width: 26em;
  margin: 0 auto 24px;
}
.app-cta .appstore-badge { display: inline-block; line-height: 0; }
.app-cta .appstore-badge img { height: 56px; width: auto; display: block; margin: 0 auto; }
.app-cta .release { margin-top: 16px; font-size: 12.5px; color: rgba(255,255,255,0.6); letter-spacing: 0.02em; }

/* ---------------- footer（LPと共通） ---------------- */
footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 70px) 28px 48px;
}
.foot-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.foot-grid .brand .mark { font-size: 19px; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.foot-links a:hover { color: var(--green-deep); }
.copy { margin-top: 22px; font-size: 12px; color: var(--faint); letter-spacing: 0.03em; }
.legal { margin-top: 12px; font-size: 11px; line-height: 1.75; color: var(--faint); letter-spacing: 0.02em; max-width: 60em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
