/* ============================================================
   MyRoad Life — 旅の道すがら、見つけた道具。
   共通スタイル
   ------------------------------------------------------------
   色  : 白練(紙) / 墨 / 藍 / 朱(スタンプ・強調のみ) / 鼠
   書体: Zen Old Mincho(見出し) + Zen Kaku Gothic New(本文)
   署名: 左端を走る「街道ライン」。各章は"宿場"として点で止まる
   ============================================================ */

:root {
  --paper: #f4f4ef;
  --paper-deep: #e9e9e2;
  --ink: #23262b;
  --ai: #1e3d5c;
  --ai-deep: #132a42;
  --shu: #b5352a;
  --nezu: #7c8187;
  --line: #d6d6cf;

  --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Noto Serif JP", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;

  --road-x: 56px;        /* 街道ラインの位置(左端からの距離) */
  --maxw: 1120px;
  --gutter: clamp(34px, 5vw, 72px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  letter-spacing: 0.04em;
}

p { margin: 0 0 1.2em; }

/* ---------- レイアウト ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* 街道ライン(署名要素) */
.road {
  position: relative;
}
.road::before {
  content: "";
  position: absolute;
  left: var(--road-x);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--ai);
  opacity: 0.55;
}
@media (max-width: 760px) {
  :root { --road-x: 14px; }
}

/* 宿場(章の頭)。ラインの上に点が止まる */
.station {
  position: relative;
  padding-top: clamp(56px, 9vw, 112px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.station::before {
  content: "";
  position: absolute;
  left: calc(var(--road-x) - 5px);
  top: calc(clamp(56px, 9vw, 112px) + 0.55em);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ai);
}
.station--here::before { background: var(--shu); border-color: var(--shu); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--ai);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--ai); }

.h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  margin-bottom: 0.6em;
}
.h3 {
  font-size: clamp(19px, 2.2vw, 24px);
}
.lead {
  font-size: 17px;
  max-width: 34em;
  color: #3a3e44;
}
.note {
  font-size: 13px;
  color: var(--nezu);
  letter-spacing: 0.04em;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.12em;
  display: flex; align-items: baseline; gap: 10px;
  white-space: nowrap;
}
@media (max-width: 560px) { .brand small { display: none; } }
.brand small {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--nezu);
}
.nav { display: flex; gap: 28px; font-size: 14px; letter-spacing: 0.08em; }
.nav a { padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ai); }
.nav a.nav--shop {
  color: var(--paper);
  background: var(--ai);
  padding: 6px 14px;
  border-radius: 2px;
}
.nav a.nav--shop:hover { background: var(--ai-deep); border-bottom-color: transparent; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0;
         flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav a { padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
  .nav a.nav--shop { border-radius: 0; }
  .nav.is-open { display: flex; }
  .nav-toggle { display: inline-block; background: none; border: 1px solid var(--ai); color: var(--ai);
                font-family: var(--font-body); font-size: 12px; letter-spacing: 0.2em; padding: 6px 12px; cursor: pointer; }
}

/* ---------- ヒーロー(縦書き) ---------- */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: stretch;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.hero__text {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 420px;
}
.hero__title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.35;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.hero__sub {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--ai);
  padding-top: 0.4em;
  white-space: nowrap;
  margin: 0;
}
.hero__meta {
  align-self: flex-end;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--nezu);
  writing-mode: horizontal-tb;
  max-width: 18em;
}
.hero__meta strong { color: var(--ink); font-weight: 500; display: block; font-size: 13px; }

.hero__visual {
  position: relative;
  min-height: 360px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 18px 24px; min-height: 0; }
  .hero__sub { writing-mode: horizontal-tb; grid-column: 1 / -1; font-size: 14px; white-space: normal; padding: 0; }
  .hero__title { grid-row: 2; height: 300px; font-size: 34px; }
  .hero__meta { grid-row: 2; align-self: end; }
  .hero__visual { min-height: 0; }
  .hero__visual .photo { height: auto !important; aspect-ratio: 4 / 3; }
  .photo span { font-size: 11px; }
}

/* 写真の差し替え枠 */
.photo {
  position: relative;
  background: var(--paper-deep);
  background-image:
    linear-gradient(135deg, transparent 0 48%, rgba(30,61,92,0.06) 48% 52%, transparent 52%);
  background-size: 28px 28px;
  display: grid; place-items: center;
  color: var(--nezu);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--square { aspect-ratio: 1; }
.photo span { padding: 12px; }

/* 朱印スタンプ(立ち寄り済) */
.stamp {
  position: absolute;
  z-index: 2;
  width: 84px; height: 84px;
  border: 2px solid var(--shu);
  border-radius: 50%;
  color: var(--shu);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  display: grid; place-items: center;
  text-align: center;
  line-height: 1.3;
  transform: rotate(-11deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.stamp::after {
  content: ""; position: absolute; inset: 4px; border: 1px solid var(--shu); border-radius: 50%;
}
.stamp--sm { width: 64px; height: 64px; font-size: 11px; }
/* 写真の上に押す場合:和紙のような下地を敷いて可読性を確保 */
.stamp--onphoto {
  mix-blend-mode: normal;
  opacity: 1;
  background: rgba(246,245,240,0.86);
  box-shadow: 0 1px 6px rgba(35,38,43,0.10);
}

/* ---------- 店長のことば ---------- */
.words {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.words__portrait { position: relative; }
.words__body { font-size: 17px; max-width: 38em; }
/* ドロップキャップは英字先頭だと不自然なため無効化 */
.signature {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--ai);
  margin-top: 8px;
}
@media (max-width: 760px) { .words { grid-template-columns: 1fr; } .words__portrait { max-width: 200px; } }

/* ---------- 旅日記カード ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 36px);
}
@media (max-width: 860px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.card { display: block; }
.card .photo { margin-bottom: 14px; }
.card__date { font-size: 12px; letter-spacing: 0.2em; color: var(--nezu); }
.card__place { font-size: 12px; letter-spacing: 0.2em; color: var(--ai); margin-left: 10px; }
.card__title { font-family: var(--font-display); font-size: 19px; margin: 6px 0 8px; line-height: 1.5; }
.card__excerpt { font-size: 14px; color: #474b50; margin: 0; }
.card:hover .card__title { color: var(--ai); }

/* ---------- 産地(街道図) ---------- */
.route {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .route { grid-template-columns: repeat(2, 1fr); } }
.route li { background: var(--paper); }
.route a, .route .route__cell {
  display: block;
  padding: 22px 20px 18px;
  min-height: 150px;
  position: relative;
}
.route a:hover { background: #fff; }
.route__region { font-size: 11px; letter-spacing: 0.24em; color: var(--nezu); }
.route__name { font-family: var(--font-display); font-size: 22px; margin: 4px 0 8px; }
.route__makers { font-size: 13px; color: #474b50; margin: 0; line-height: 1.7; }
.route__count { position: absolute; right: 16px; top: 18px; font-size: 11px; letter-spacing: 0.14em; color: var(--ai); }
.route--soon .route__name { color: var(--nezu); }
.route--soon .route__makers { color: var(--nezu); }

/* ---------- 商品 ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.6vw, 28px);
}
@media (max-width: 860px) { .products { grid-template-columns: 1fr 1fr; } }
.product { display: block; }
.product .photo { margin-bottom: 12px; }
.product__maker { font-size: 11px; letter-spacing: 0.2em; color: var(--ai); }
.product__name { font-size: 14px; line-height: 1.6; margin: 4px 0 4px; }
.product__price { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.06em; }
.product__origin { font-size: 12px; color: var(--nezu); margin: 0; }
.product:hover .product__name { color: var(--ai); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: 0.14em;
  padding: 12px 22px;
  border: 1px solid var(--ai);
  color: var(--ai);
  border-radius: 2px;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ai); color: var(--paper); }
.btn--fill { background: var(--ai); color: var(--paper); }
.btn--fill:hover { background: var(--ai-deep); }
.btn::after { content: "→"; font-family: var(--font-body); }
.btn--ext::after { content: "↗"; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- 取引先向け帯 ---------- */
.partners-band {
  background: var(--ai);
  color: var(--paper);
  padding: clamp(48px, 7vw, 96px) 0;
}
.partners-band .eyebrow { color: #b9c7d6; }
.partners-band .eyebrow::before { background: #b9c7d6; }
.partners-band .h2 { color: #fff; }
.partners-band .lead { color: #d9e1ea; }
.partners-band .btn { border-color: #fff; color: #fff; }
.partners-band .btn:hover { background: #fff; color: var(--ai); }
.partners-band .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .partners-band .wrap { grid-template-columns: 1fr; } }
.channels { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.channels li { border: 1px solid rgba(255,255,255,0.25); padding: 14px 18px; font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.channels li span:last-child { font-size: 12px; color: #b9c7d6; letter-spacing: 0.1em; }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  font-size: 13px;
  color: #474b50;
}
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 13px; letter-spacing: 0.2em; font-family: var(--font-body); color: var(--nezu); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a:hover { color: var(--ai); }
.copyright { grid-column: 1 / -1; margin-top: 24px; font-size: 12px; color: var(--nezu); letter-spacing: 0.08em; }

/* ---------- 記事(旅日記・産地ページ) ---------- */
.article { max-width: 720px; }
.article__meta { font-size: 12px; letter-spacing: 0.2em; color: var(--nezu); margin-bottom: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.article__meta b { color: var(--ai); font-weight: 500; }
.article .h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 24px; }
.article p { font-size: 16.5px; }
.article h2 { font-size: 22px; margin: 2.2em 0 0.8em; }
.article figure { margin: 32px 0; }
.article figcaption { font-size: 12px; color: var(--nezu); margin-top: 8px; letter-spacing: 0.06em; }
.pull {
  border-left: 2px solid var(--ai);
  padding: 6px 0 6px 20px;
  margin: 32px 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ai);
  line-height: 1.7;
}

/* 記事内の「出会った道具」 */
.met {
  margin: 36px 0;
  border: 1px solid var(--line);
  padding: 22px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px;
  align-items: center;
  background: #fff;
}
@media (max-width: 560px) { .met { grid-template-columns: 1fr; } }
.met__label { font-size: 11px; letter-spacing: 0.24em; color: var(--shu); margin-bottom: 6px; }
.met__name { font-family: var(--font-display); font-size: 18px; margin-bottom: 6px; }
.met p { font-size: 14px; margin-bottom: 12px; }

/* 産地ページ用: 地図状のパンくず */
.crumbs { font-size: 12px; letter-spacing: 0.16em; color: var(--nezu); margin-bottom: 32px; }
.crumbs a:hover { color: var(--ai); }
.crumbs span { margin: 0 8px; }

/* 会社概要の表 */
.spec { width: 100%; border-collapse: collapse; font-size: 15px; max-width: 760px; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec th { width: 9em; font-weight: 500; color: var(--ai); letter-spacing: 0.08em; }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.timeline li { display: grid; grid-template-columns: 8em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline li b { font-family: var(--font-display); font-weight: 500; color: var(--ai); letter-spacing: 0.08em; }

/* ---------- 取引先ページの約束 ---------- */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }
.promise div { background: var(--paper); padding: 26px 22px; }
.promise h3 { font-size: 18px; margin-bottom: 10px; }
.promise p { font-size: 14px; margin: 0; color: #474b50; }

/* ---------- 制作メモ(公開前に削除) ---------- */
.devnote {
  border: 1px dashed var(--shu);
  color: var(--shu);
  background: #fff;
  font-size: 12.5px;
  line-height: 1.7;
  padding: 10px 14px;
  margin: 0 0 24px;
  letter-spacing: 0.04em;
}
.devnote::before { content: "【制作メモ・公開前に削除】 "; font-weight: 700; }
.todo { color: var(--shu); font-size: 11px; letter-spacing: 0.1em; border: 1px solid var(--shu); padding: 1px 6px; border-radius: 2px; vertical-align: middle; margin-left: 6px; white-space: nowrap; }

/* ---------- 出現アニメーション(控えめ) ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* 肖像写真のない語りブロック */
.words--solo { grid-template-columns: 1fr; }

/* ---------- v2:角のやわらかさ ---------- */
.photo { border-radius: 4px; }
.photo--tall { border-radius: 10px; }
.words__portrait .photo { border-radius: 50%; }

/* ---------- v2:日本語の改行を語句単位に ---------- */
body { word-break: auto-phrase; line-break: strict; }
h1, h2, h3, h4, p, li, td, th, dd, dt, figcaption { text-wrap: pretty; }

/* ---------- v4:街道ラインを本文の箱に追従させる ----------
   従来は線がビューポート左端から56px固定、本文は中央寄せの箱基準だったため、
   ウィンドウ幅760〜1120pxで線が本文の内側に入り込んでいた。
   線も宿場の点も、本文の箱の左端から一定距離に置き直す。 */
.road::before {
  left: calc(max(0px, (100% - var(--maxw)) / 2) + var(--road-inset));
}
.station::before {
  left: calc(var(--road-inset) - 5px);
}
:root { --road-inset: 12px; }
