/* ============================================================
   soukyu.com「書風サンプル」v2（ギャラリー型）
   ・評価は5段階ドット（●●●○○）＋凡例を上に1回
   ・白背景の大きめサムネ／角丸14px／ホバーズーム／出現アニメ
   ・カテゴリーナビは追従タブ＋用途の一言
   トーン：白×生成り×朱／見出し明朝・本文ゴシック#4a4a46
   ============================================================ */

html { scroll-behavior: smooth; }
body { font-family: 'Noto Serif JP', serif; background: var(--bg); color: var(--sumi); overflow-x: hidden; }
img { max-width: 100%; display: block; }
section[id] { scroll-margin-top: 130px; }

/* ---------- 製図グリッド（背景の下地・白い部分にだけ見える・v5共通） ---------- */

a:focus-visible, button:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; border-radius: 4px; }

/* ---------- ヘッダー（共通） ---------- */

/* v5: ホバーは朱でなく「墨＋左から引かれる極細下線」 */

/* ---------- 本文ラッパ ---------- */
.sample-wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 72px) 96px; }
.sample-hero { max-width: 1080px; margin: 0; padding: clamp(44px, 7vw, 88px) 0 clamp(24px, 3vw, 36px); }
.ds-label { font-family: 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.24em; color: var(--shu); margin-bottom: 20px; }
/* v5: レジストレーションマークで統一 */
.ds-label::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--shu); margin-right: 10px; vertical-align: middle; }
h1 { font-size: clamp(34px, 4.4vw, 48px); font-weight: 700; letter-spacing: 0.05em; line-height: 1.35; margin-bottom: 22px; }
.sample-lead {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(16px, 1.35vw, 17.5px);
  line-height: 2.1;
  color: var(--ink-body);
  max-width: 38em;
}

/* ---------- 凡例（評価の見方・1回だけ） ---------- */
.legend {
  background: var(--cream);
  border-radius: 14px;
  padding: 22px clamp(20px, 3vw, 30px);
  margin-bottom: clamp(26px, 4vw, 38px);
  font-family: 'Noto Sans JP', sans-serif;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}
.legend-title { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--shu); }
.legend p { font-size: 14px; line-height: 1.9; color: var(--ink-body); margin: 0; }
.legend p strong { color: var(--sumi); font-weight: 700; }
.legend-demo { display: inline-flex; align-items: center; gap: 10px; }
.legend-note { font-size: 12px; color: #8a8378; }

/* ---------- カテゴリー追従タブ ---------- */
/* v5・C案: ピル型→下線タブ（worksの絞り込みタブ・ナビと同じ下線言語） */
.style-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  padding: 14px 0 0;
  margin-bottom: clamp(20px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #eae9e6;
}
.style-nav a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 2px 13px;
  color: var(--sumi);
  text-decoration: none;
  background-image: linear-gradient(var(--sumi), var(--sumi));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: 0 100%;
  transition: color 0.2s, background-size 0.3s ease;
}
.style-nav a:hover { background-size: 100% 1px; }
/* 現在見ているカテゴリに朱の下線（worksの選択中タブと同じ） */
.style-nav a.current { color: var(--sumi); background-image: linear-gradient(var(--shu), var(--shu)); background-size: 100% 2px; }
.style-nav strong { font-size: 15px; letter-spacing: 0.04em; font-family: 'Noto Sans JP', sans-serif; }
.style-nav .use { font-family: 'Noto Sans JP', sans-serif; font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; color: #8a8378; }

/* ---------- 各書風セクション ---------- */
.style-section { padding: clamp(46px, 6vw, 76px) 0; border-top: 1px solid #eae9e6; }
/* タブ直後の最初の書風セクションは上線なし（タブの下線と二重になるため）。
   :first-of-type はヒーロー（同じsection要素）が先にいるため効かない→隣接セレクタで指定 */
.style-nav + .style-section { border-top: 0; padding-top: clamp(8px, 2vw, 20px); }
.style-head { margin-bottom: clamp(30px, 4.5vw, 48px); }
.cat-en {
  display: inline-flex;
  align-items: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--shu);
  margin-bottom: 16px;
}
/* v5: 十字マーク→朱の角マーカーに統一（＋は病院連想のため撤回） */
.style-head h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  margin-bottom: 12px;
}
.use-line { font-family: 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: #8a8378; margin-bottom: 18px; }
.summary {
  max-width: 820px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(15px, 1.3vw, 16.5px);
  line-height: 2.05;
  color: var(--ink-body);
}

/* ---------- サンプル（3列・ミニマルポートフォリオ／箱なし・画像主役） ---------- */
.sample-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(56px, 6vw, 88px) clamp(22px, 2.4vw, 34px);
}
.sample-card {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.sample-list.in .sample-card { opacity: 1; transform: none; }
.sample-list.in .sample-card:nth-child(1) { transition-delay: 0.04s; }
.sample-list.in .sample-card:nth-child(2) { transition-delay: 0.1s; }
.sample-list.in .sample-card:nth-child(3) { transition-delay: 0.16s; }
.sample-list.in .sample-card:nth-child(4) { transition-delay: 0.22s; }
.sample-list.in .sample-card:nth-child(5) { transition-delay: 0.28s; }
.sample-list.in .sample-card:nth-child(6) { transition-delay: 0.34s; }
/* 画像ブロック＝主役（背景や内側余白を置かず、画像を全面表示）
   作品画像は四隅まで白いので、works・designshoと同じ細い枠で境界を示す。
   カードはリンクではないため、ホバーで拡大させない（押せる合図を出さない）。 */
.sample-thumb {
  aspect-ratio: 1/1;
  border: 1px solid #eeedea;
  border-radius: 10px;
  overflow: hidden;
}
.sample-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* キャプション（画像の下・箱なし） */
.sample-card .work-body { display: flex; flex: 1; flex-direction: column; padding: 16px 2px 0; }
.sample-card strong { display: block; font-size: 17px; line-height: 1.5; letter-spacing: 0.03em; margin-bottom: 6px; }
.sample-card .desc {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(14.5px, 1.15vw, 15.5px);
  line-height: 1.9;
  color: #6e685c;
  margin-bottom: 8px;
}

/* 5段階ドットメーター（2×2・コンパクト）
   v5.1: カード同士の行間を広げ、区切り線は外して説明文の続きに見せることで、
   「どのカードのメーターか」を距離だけで判別できるようにした */
.card-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 18px;
  margin-top: auto;
  padding-top: 6px;
  font-family: 'Noto Sans JP', sans-serif;
}
.dot-meter { display: flex; align-items: center; justify-content: flex-start; gap: 9px; }
.dot-meter .lbl { width: 4.2em; flex-shrink: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #5e584c; }
/* v5: 朱の角ドット（信頼チップ・料金リストの角マーカーと同じ記号） */
.dots { display: inline-flex; gap: 4px; }
.dots i {
  width: 7px; height: 7px; background: #e0dfda;
  transition: background 0.4s ease, transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.dots i.on { background: var(--shu); }
/* 評価フィルアニメ：画面に入ったら埋まったドットがポンと朱に点く */
.sample-list:not(.in) .dots i.on { background: #e4e3de; transform: scale(0.62); }
.sample-list.in .dots i.on { background: var(--shu); transform: scale(1); }
.sample-list.in .dots i:nth-child(1) { transition-delay: 0.26s; }
.sample-list.in .dots i:nth-child(2) { transition-delay: 0.33s; }
.sample-list.in .dots i:nth-child(3) { transition-delay: 0.40s; }
.sample-list.in .dots i:nth-child(4) { transition-delay: 0.47s; }
.sample-list.in .dots i:nth-child(5) { transition-delay: 0.54s; }
@media (prefers-reduced-motion: reduce) {
  .sample-card { opacity: 1; transform: none; transition: none; }
  .dots i { transition: none; }
  .sample-list:not(.in) .dots i.on { background: var(--shu); transform: none; }
}

/* ---------- 実例・実績への橋渡し ---------- */
.sample-next {
  margin-top: clamp(44px, 5vw, 68px);
  padding-top: clamp(34px, 4vw, 52px);
  border-top: 1px solid #eae9e6;
}
.sample-next .lead,
.sample-next .criteria-note {
  max-width: 720px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(16px, 1.35vw, 17.5px);
  line-height: 2.1;
  color: var(--ink-body);
}
.sample-next .criteria-note { margin-bottom: 16px; }
.sample-next .lead {
  margin-bottom: 22px;
}
.sample-next .criteria-note a {
  color: var(--shu);
  font-weight: 700;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.sample-next .criteria-note a:hover { color: var(--sumi); }
.next-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.next-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--link-card-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--sumi);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.next-card:hover { transform: translateY(-4px); border-color: var(--link-card-border-hover); box-shadow: 0 12px 30px rgba(31, 31, 31, 0.08); }
.next-card .eyebrow { font-family: 'Noto Sans JP', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--shu); }
.next-card strong { font-size: 17px; line-height: 1.5; letter-spacing: 0.02em; }
.next-card .sub { font-family: 'Noto Sans JP', sans-serif; font-size: 13px; line-height: 1.8; color: var(--ink-body); }
.next-card .arrow { margin-top: 6px; font-family: 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 700; color: var(--sumi); }

/* ---------- CTA ---------- */
.sample-cta {
  background: var(--cream);
  border-radius: 14px;
  padding: clamp(42px, 6vw, 64px) 24px;
  text-align: center;
  margin-top: clamp(48px, 6vw, 76px);
}
.sample-cta h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: 0.06em; line-height: 1.6; margin-bottom: 14px; }
.sample-cta p { font-family: 'Noto Sans JP', sans-serif; font-size: clamp(16px, 1.35vw, 17px); line-height: 2.05; color: var(--ink-body); margin-bottom: 26px; }

/* ---------- フッター（共通） ---------- */

.footer-sub a:hover { color: #fff; }

@media (max-width: 640px) {
  .style-nav { gap: 4px 20px; }
  .style-nav a { padding: 4px 2px 12px; }
}
@media (max-width: 980px) {
  .sample-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sample-list { gap: 28px 14px; }
  .sample-card .work-body { padding-top: 12px; }
  .sample-card strong { font-size: 15px; }
  .card-meters { grid-template-columns: 1fr; gap: 6px; padding-top: 10px; }
  .dot-meter { gap: 7px; }
  .dot-meter .lbl { font-size: 11.5px; }
  .dots { gap: 3px; }
  .dots i { width: 6px; height: 6px; }
}
