/* ============================================================
   会社案内（page-about.php）
   トップと同じトンマナ。top2.css のトークンを利用する。
   名前空間は ab-。main.css が .about-* を持っているので使わないこと。
   ============================================================ */

/* 追従して画面上部に residing する部分（ヘッダー＋タブ帯）の合計高さ。
   実測でタブ帯の下端が 122px。アンカー着地位置と、沿革の追従ロゴの
   両方がこの値に依存するので、変数にまとめて二重管理を避ける。 */
:root { --ab-stick: 122px; }


.ab-inner { max-width: var(--t2-max); margin: 0 auto; padding: 0 clamp(1.15rem, 4vw, 3rem); }

/* ---------- ページ内タブ（スクロール追従） ---------- */
.ab-tabs {
  position: sticky; top: 60px; z-index: 20;   /* 追従ヘッダーの下に貼り付く */
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--t2-green-l);
}
.ab-tabs__inner {
  max-width: var(--t2-max); margin: 0 auto;
  padding: 0 clamp(.6rem, 2vw, 1rem);
  display: flex; gap: .2rem;
  overflow-x: auto;                            /* 狭い画面は横スクロールで逃がす */
  scrollbar-width: none;
}
.ab-tabs__inner::-webkit-scrollbar { display: none; }
.ab-tab {
  flex: 1 0 auto; min-width: 7em;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .8rem .9rem .7rem;
  border-bottom: 3px solid transparent;
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
}
.t2-main a.ab-tab { color: var(--t2-text-s); }
.t2-main a.ab-tab:hover { color: var(--t2-green); background: #f9f7f3; }
.ab-tab.is-active { border-bottom-color: var(--t2-green); }
.t2-main a.ab-tab.is-active { color: var(--t2-green); }
.ab-tab__ja { font-size: .95rem; font-weight: 700; line-height: 1.4; }
.ab-tab__en {
  font-family: 'D-DIN', sans-serif; font-weight: 700;
  font-size: .62rem; letter-spacing: .1em; color: var(--t2-text-xs);
}
.ab-tab.is-active .ab-tab__en { color: var(--t2-orange); }

/* ---------- セクション共通 ---------- */
.ab-sec {
  padding: clamp(2.6rem, 5.5vw, 4.6rem) 0;
  scroll-margin-top: calc(var(--ab-stick) + .5rem);   /* ヘッダー＋タブぶん着地位置をずらす */
}
.ab-sec--alt { background: #f9f7f3; }
.ab-head { position: relative; margin-bottom: clamp(1.8rem, 3.4vw, 2.8rem); padding-top: clamp(1.8rem, 3.6vw, 3rem); }
.ab-head__title {
  position: relative; z-index: 1;
  font-family: 'Noto Sans JP', sans-serif; font-weight: 900;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; color: var(--t2-text);
}
.ab-head__bg {
  position: absolute; left: -.05em; top: 0; z-index: 0;
  font-family: 'D-DIN', sans-serif; font-weight: 700; font-style: italic;
  font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: .85;
  color: var(--t2-green); opacity: .12;
  letter-spacing: -.02em; white-space: nowrap; pointer-events: none; user-select: none;
}

/* ---------- ごあいさつ ---------- */
.ab-greet {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .52fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.ab-greet__p {
  font-size: 1rem; line-height: 2.1; color: var(--t2-text-s);
  margin-bottom: 1.1rem; word-break: auto-phrase;
}
.ab-greet__sign { margin-top: 1.6rem; line-height: 1.8; }
.ab-greet__co { display: block; font-size: .94rem; color: var(--t2-text-s); }
.ab-greet__name { display: block; font-size: 1.05rem; color: var(--t2-text); }
.ab-greet__name strong { font-size: 1.25rem; font-weight: 700; }
.ab-greet__photo {
  margin: 0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(70,55,25,.16);
}
.ab-greet__photo img { width: 100%; height: auto; display: block; }

/* 社長の幼少期エピソード */
.ab-founder {
  display: grid; grid-template-columns: minmax(0, .34fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.2rem); align-items: center;
  margin-top: clamp(2rem, 4vw, 3.2rem);
  padding: clamp(1.2rem, 2.6vw, 1.8rem);
  background: #f9f7f3; border-radius: 16px;
}
.ab-sec--alt .ab-founder { background: #fff; }
.ab-founder__photo { margin: 0; border-radius: 10px; overflow: hidden; }
.ab-founder__photo img { width: 100%; height: auto; display: block; }
.ab-founder__title { font-size: 1.1rem; font-weight: 700; color: var(--t2-text); margin-bottom: .5rem; }
.ab-founder__text { font-size: .92rem; line-height: 1.95; color: var(--t2-text-s); }

/* ---------- 会社概要 ---------- */
.ab-outline {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .5fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.ab-table { width: 100%; border-collapse: collapse; }
.ab-table th, .ab-table td {
  text-align: left; vertical-align: top;
  padding: .95rem 1.1rem; font-size: .96rem; line-height: 1.9;
  border-bottom: 1px solid var(--t2-green-l);
}
.ab-table tr:first-child th, .ab-table tr:first-child td { border-top: 1px solid var(--t2-green-l); }
.ab-table th {
  width: 9em; white-space: nowrap;
  font-weight: 700; color: var(--t2-text); background: rgba(42,92,58,.045);
}
.ab-table td { color: var(--t2-text-s); }
.ab-outline__photo { margin: 0; }
.ab-outline__photo img {
  width: 100%; height: auto; display: block;
  border-radius: 14px; box-shadow: 0 10px 26px rgba(70,55,25,.16);
}
.ab-outline__photo figcaption {
  margin-top: .6rem; font-size: .84rem; color: var(--t2-text-xs); text-align: center;
}

/* ---------- 会社沿革 ---------- */
.ab-history {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .42fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.ab-time { list-style: none; margin: 0; padding: 0; }
/* 年号の右に縦線を通してタイムラインにする */
.ab-time__item {
  position: relative;
  display: grid; grid-template-columns: 12.5em minmax(0, 1fr);
  gap: 1.4rem;
  padding: 0 0 1.5rem 0;
}
.ab-time__item::before {
  content: ''; position: absolute;
  left: calc(12.5em + .7rem - 1px); top: .55rem; bottom: -.3rem;
  width: 2px; background: var(--t2-green-l);
}
.ab-time__item:last-child::before { display: none; }
/* 16件並ぶので、白抜き＋太リングだと点が主張しすぎる。
   小さめの塗りつぶしにして、線の上の節目くらいの存在感に留める */
.ab-time__item::after {
  content: ''; position: absolute;
  left: calc(12.5em + .7rem - 3px); top: .62rem;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--t2-green);
}
.ab-time__year {
  font-size: .92rem; font-weight: 700; color: var(--t2-green);
  line-height: 1.75; text-align: right;
}
.ab-time__text { font-size: .96rem; line-height: 1.75; color: var(--t2-text-s); }
/* 沿革の右カラム＝80周年ロゴ＋キャッチコピー。
   長い年表の横に置くので、スクロールしても視界に残るよう sticky にしている。 */
.ab-history__mark {
  position: sticky;
  /* ★追従部の下端より下に置くこと。110px にしていたときは
     タブ帯（下端122px）に12px潜り込んでいた。 */
  top: calc(var(--ab-stick) + 1.5rem);
  text-align: center;
}
.ab-80th { margin: 0 auto; max-width: 300px; }
.ab-80th img { width: 100%; height: auto; display: block; }
.ab-80th__catch {
  margin-top: 1.1rem;
  font-family: 'Noto Sans JP', sans-serif; font-weight: 900;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.7;
  color: var(--t2-green); letter-spacing: .02em;
  word-break: auto-phrase; text-wrap: balance;
}

/* ---------- 営業所案内 ---------- */
.ab-locs { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.4vw, 1.8rem); }
.ab-loc {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(70,55,25,.09);
  display: flex; flex-direction: column;
}
/* 左上の「マップで開く」ボタンを消そうとiframeの上端を切る手も試したが、
   ボタンの背後にある住所ツールチップが中途半端に切れて余計に不自然だった。
   別オリジンのiframeなので中の要素はCSSで触れない。素直に全体を出す。 */
.ab-loc__map { aspect-ratio: 16/9; background: #eceae5; }
.ab-loc__map iframe { display: block; width: 100%; height: 100%; border: 0; }
.ab-loc__body { padding: clamp(1.1rem, 2.2vw, 1.5rem); display: flex; flex-direction: column; gap: .5rem; }
.ab-loc__name {
  font-size: 1.15rem; font-weight: 700; color: var(--t2-text);
  padding-left: .7rem; border-left: 4px solid var(--t2-green); line-height: 1.4;
}
.ab-loc__addr { font-size: .94rem; line-height: 1.8; color: var(--t2-text-s); }
.ab-loc__tel { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: 0; }
.ab-loc__tel > div { display: flex; align-items: baseline; gap: .5rem; }
.ab-loc__tel dt {
  font-family: 'D-DIN', sans-serif; font-weight: 700; font-size: .72rem;
  letter-spacing: .1em; color: var(--t2-text-xs);
}
.ab-loc__tel dd {
  margin: 0; font-family: 'D-DIN', sans-serif; font-weight: 700;
  font-size: 1.05rem; color: var(--t2-text);
}
.t2-main .ab-loc__tel dd a { color: var(--t2-text); }
.t2-main .ab-loc__tel dd a:hover { color: var(--t2-orange); }
.ab-loc__link {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: auto; padding-top: .5rem;
  font-size: .86rem; font-weight: 700;
}
.t2-main a.ab-loc__link { color: var(--t2-green); }
.t2-main a.ab-loc__link:hover { color: var(--t2-orange); }
.ab-loc__link svg { width: 14px; height: 14px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .ab-tabs { top: 0; }   /* この幅ではヘッダーがハンバーガーになり高さが変わる */
}
@media (max-width: 900px) {
  .ab-greet   { grid-template-columns: 1fr; }
  .ab-greet__photo { max-width: 340px; order: -1; }
  .ab-outline { grid-template-columns: 1fr; }
  .ab-outline__photo { max-width: 460px; }
  .ab-history { grid-template-columns: 1fr; }
  .ab-history__mark { position: static; margin-top: 2rem; }
  .ab-80th { max-width: 240px; }
  .ab-locs    { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ab-inner { padding: 0 1.15rem; }
  .ab-founder { grid-template-columns: 1fr; }
  .ab-founder__photo { max-width: 200px; }
  /* 年号列を上に逃がして本文の幅を確保する */
  .ab-time__item { grid-template-columns: 1fr; gap: .2rem; padding-left: 1.1rem; padding-bottom: 1.3rem; }
  .ab-time__item::before { left: 3px; top: .5rem; }
  .ab-time__item::after  { left: 1px; top: .55rem; }
  .ab-time__year { text-align: left; font-size: .86rem; }
  .ab-table th, .ab-table td { display: block; width: auto; white-space: normal; }
  .ab-table th { border-bottom: none; padding-bottom: .3rem; }
  .ab-table td { padding-top: 0; }
}
