@charset "utf-8";
/* =========================================================
   スガキヤの歴史（history）固有スタイル
   - 導入（赤背景）＋ 年表タイムライン（クリーム背景）
   ※ 共通変数(--red 等)は common.css に依存
   ※ 本文・画像は支給待ちのプレースホルダ（.ph / .ph-text）
   ========================================================= */

/* ===== 導入（赤背景） ===== */
.hist-intro {
  position: relative;
  /* 多層背景：①波(赤+白スカラップ) ②上部の赤(半分から下は透過) ③年表テクスチャ(波より下) */
  background-color: transparent;
  background-image:
    url(../imgs/history/bg_historynami.png),
    linear-gradient(to bottom, var(--red), var(--red) 60%, transparent 60%),
    url(../imgs/history/bg_history.jpg);
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: center bottom 100px, top center, top center;
  background-size: 100% auto, 100% 100%, auto;
  color: #fff;
  text-align: center;
  padding: 56px 0 64px;
}
/* リボン見出し「スガキヤヒストリー」（画像 ttlHistory.svg） */
.hist-ribbon {
  display: block;
  width: 543px;
  max-width: 80%;
  height: auto;
  margin: -110px auto 28px;
}

/* 和暦ジャンプボタン（昭和／平成／令和） */
.hist-era-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
}
.hist-era-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  max-width: 38vw;
  height: 56px;
  background: #fff;
  color: var(--red);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .1em;
  text-decoration: none;
}
.hist-era-nav a::after {            /* ▼ */
  content: "";
  position: absolute;
  right: 28px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--red);
}

.hist-intro-ttl {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 20px;
}
.hist-intro-lead {
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: 15px;
  line-height: 2;
}
.hist-intro-imgs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hist-intro-imgs .ph {
  width: 120px;
  height: 120px;
  border-radius: 50%;
}
/* 導入の装飾（ラーメン/ぜんざい/犬/スーちゃんの合成PNG・2倍書き出し→実寸50%） */
.hist-intro-dec {
  position: relative;
  z-index: 2;            /* 白い波の上に装飾を重ねる */
  display: block;
  width: min(610px, 92%);
  height: auto;
  margin: 28px auto 0;
}

/* 和暦ボタンのページ内ジャンプをスムーズに（historyのみ） */
html { scroll-behavior: smooth; }

/* ===== 年表（紙テクスチャ背景・1倍／幅1366px設計でリピート） ===== */
.hist-timeline {
  background-color: var(--cream);
  background-image: url(../imgs/history/bg_history.jpg);
  background-position: top center;
  background-size: auto;         /* 1倍（ネイティブ）で敷く */
  background-repeat: repeat;
  padding: 72px 0 80px;
}
.hist-list {
  position: relative;
  max-width: 100%;          /* .container(1080px)幅いっぱい */
  margin: 0 auto;
  list-style: none;
  padding: 0;
}
/* 縦の波線（ラーメンから垂れる麺の続き。装飾の下端＝-136pxから開始） */
.hist-list::before {
  content: "";
  position: absolute;
  left: 370px;
  top: -232px;          /* 装飾(ラーメン)起点までさらに延長 */
  bottom: 6px;
  width: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='36'%3E%3Cpath d='M8 0 Q14 9 8 18 Q2 27 8 36' stroke='%23F9EBB2' stroke-width='3' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-position: center top;
}

/* 各エントリ：左＝年号／右＝イベント */
.hist-item {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 140px;
  padding-bottom: 120px;
  position: relative;
  scroll-margin-top: 100px;   /* 固定ヘッダー分のジャンプ位置オフセット */
}
/* タイムライン上のドット（波線上） */
.hist-item::before {
  content: "";
  position: absolute;
  left: 376px;
  top: 50px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #D12C3F;
  transform: translateX(-50%);
  z-index: 1;
}
/* ドット → 見出しへの短い連結線 */
.hist-item::after {
  content: "";
  position: absolute;
  left: 390px;
  top: 63px;
  width: 42px;
  height: 4px;
  background: #D12C3F;
}
.hist-year {
  text-align: left;
  line-height: 1.1;
  padding-top: 4px;
}
.hist-year .y {
  display: block;
  font-family: var(--font-mincho);   /* Zen Old Mincho（明朝） */
  font-size: 100px;
  font-weight: 700;
  color: #D12C3F;
  text-align: center;
  letter-spacing: .02em;
}
.hist-year .era {
  display: block;
  margin-top: 2px;
  text-align: center;
  font-family: var(--font-mincho);
  font-size: 24px;
  font-weight: 500;
  color: #D12C3F;
}
/* 元号は括弧付きで表示 */
.hist-year .era::before { content: "（"; }
.hist-year .era::after  { content: "）"; }
.hist-ttl {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: #D12C3F;
  line-height: 1.6;
  margin-top: 48px;
  margin-bottom: 17px;
}
/* 見出しを赤いピルにする（スーちゃん誕生・節目など） */
.hist-ttl.is-banner {
  display: inline-block;
  background: #D12C3F;
  color: #fff;
  font-size: 32px;
  padding: 1px 25px;
  border-radius: 999px;
}
.hist-text {
  font-size: 18px;
  line-height: 1.9;
}
.hist-body .ph {
  margin-top: 18px;
  width: 260px;
  max-width: 100%;
  height: 150px;
}
/* 実画像（年表内）：2倍書き出し → width属性で実寸50%（デザインサイズ）指定。
   はみ出しは max-width:100% でガード */
.hist-body .hist-img {
  display: block;
  margin-top: 18px;
  max-width: 100%;
  height: auto;
}
/* 複数画像は横並び */
.hist-imgs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-top: 18px;
}
.hist-imgs .hist-img {
  margin-top: 0;
  max-width: 100%;
  flex: 0 0 auto;
}
/* プレースホルダ文言（支給待ち） */
.ph-text { color: rgba(0, 0, 0, .35); }

/* 節目バナー（全幅・年号なし） */
.hist-milestone {
  margin: 0 0 56px;
  background: var(--red);
  color: #fff;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  padding: 16px;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}
/* 末尾（80周年ロゴ等） */
.hist-final .ph { width: 220px; height: 220px; }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .hist-intro {
    padding: 80px 0 48px;
    background-image:
      url(../imgs/history/bg_historynami.png),
      linear-gradient(to bottom, var(--red), var(--red) 75%, transparent 75%),
      url(../imgs/history/bg_history.jpg);
    background-position: center bottom 90px, top center, top center;
  }
  .hist-ribbon { max-width: 100%; }
  .hist-intro-ttl { font-size: 22px; }

  .hist-timeline { padding: 48px 0 56px; }
  .hist-list::before { left: 67px; }   /* top はデスクトップ(-232px)を継承 */
  .hist-item { grid-template-columns: 1fr; gap: 35px; padding-bottom: 48px; }
  .hist-item::before { left: 76px; top: 28px; width: 16px; height: 16px; }
  .hist-item::after { left: 80px; top: 34px; width: 16px; height: 2px; }
  .hist-year { padding-top: 2px; }
  .hist-year .y { font-size: 50px; }
  .hist-year .era { font-size: 18px; }
  .hist-ttl { font-size: 16px; margin-top: -10px; padding-left: 100px; }
  .hist-ttl.is-banner { padding: 7px 18px; font-size: 18px; margin-left: 100px; }
  .hist-text { font-size: 16px; padding-left: 100px; }
  .hist-body .hist-img { flex-direction: column; align-items: flex-start; max-width: 100%; padding-left: 100px; }
  .hist-imgs--sp-reverse { flex-wrap: wrap-reverse; }   /* 2022：SPは画像を逆順（縦積み）に */
}
