/* =============== 基本トークン（色・余白・角丸など） =============== */
/* ここを変えるだけで全体の雰囲気を一括調整 */
:root {
    --base: #222;           /* 文字の基本色 */
    --muted: #6e6e6e;          /* 補助テキスト色 */
    --bg: #f5efe7;             /* 背景 */
    --accent: #bfa980;         /* 強調色（ボタン・ラインなど）*/
    --line: #e6e1d9;           /* 罫線 */
    --card: #ffffff;        /* カード背景の薄グレー */
    --maxw: 1080px;           /* ページ最大幅 */
    --radius: 12px;           /* 角丸 */
    --space: clamp(16px, 2.4vw, 28px);      /* 余白スケール：画面幅に追従 */
}

/* =========== ベーススタイル ========== */
html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--base);
    line-height: 1.7;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

/* リンク：通常は下線なし、ホバーで下線 */
a { 
    color: var(--accent);
    text-decoration: none; 
}
a:hover { 
    color: #a68d66;
    text-decoration: underline; 
}

/* メインの横幅と左右余白調整 */
.container {
    width: min(100% - 32px, var(--maxw));
    margin-inline: auto;
}

/* ==== 見出しデザイン ==== */

/* ページタイトル（例：h1） */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #333;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}
h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #8c7a50), transparent);
  border-radius: 2px;
}

/* セクション見出し（例：h2） */
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #444;
  position: relative;
  padding-left: 1rem;
  margin: 2.5rem 0 1rem;
  border-left: 4px solid var(--accent, #bfa980);
  letter-spacing: 0.03em;
}

/* 小見出し（例：h3） */
h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #555;
  margin: 1.2rem 0 0.6rem;
  position: relative;
}
h3::before {
  content: "◆";
  color: var(--accent, #bfa980);
  margin-right: 0.4rem;
  font-size: 0.9em;
}

/* 見出し下の文章（p）も少し余白を調整 */
p {
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.lead {
    color: var(--muted);
    margin-top: 0.3em;
}

/* ========== ヘッダー（上部固定）========== */
.site-header {
    background: #bfa980;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(6px);     /* 半透明風の見せ方（対応ブラウザで効く）*/
    padding-block: calc(var(--space) * 1.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 10px 30px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: none;
    display: block;
    border: none;
    box-shadow: none;
}

.header-bar{
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
}

/* brand をリンクで使うので再定義（既存の .brand はそのまま活かす） */
.header-bar .brand{ display:flex; align-items:center; gap:12px; text-decoration:none; color:#fff; }
.header-bar .brand .title{ font-weight:700; font-size:1.3rem; color:#fff; }

/* ==== Main Nav ==== */
.main-nav ul{
  display:flex; align-items:center; gap: clamp(12px, 2.4vw, 28px);
  list-style:none; margin:0; padding:0;
}
.main-nav a{
  position:relative;
  color:#fff; text-decoration:none; font-weight:600;
  padding: 6px 2px;
}
.main-nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px;
  background: rgba(255,255,255,.85); transform:scaleX(0); transform-origin:left; transition:transform .2s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after{ transform:scaleX(1); }

/* small画面でナビが詰まる場合の折り返し */
@media (max-width: 900px){
  .header-bar{ flex-wrap: wrap; gap: 10px 16px; }
  .main-nav ul{ flex-wrap: wrap; gap: 12px 18px; }
}

/* ========== セクション共通 ========== */
section {
    padding-block: calc(var(--space) * 2);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
section:last-of-type { border-bottom: none; }

/* 代表あいさつの2カラム全体をちょいキレイに整える */
section[aria-labelledby="greeting-title"] .grid-2 {
  align-items: center;
  gap: 32px;
  grid-template-columns: 1.5fr 0.8fr;
}

/* 写真側のカラムを中央寄せ */
section[aria-labelledby="greeting-title"] .grid-2 > div:last-child {
  display: flex;
  justify-content: center;
}
/* =========================================================
   社長アバター（確実に反映される完全版）
   ========================================================= */
section[aria-labelledby="greeting-title"] .ceo-card {
  background: linear-gradient(145deg, #ffffff, #f0e8dd);
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(0,0,0,.14);
  padding: 32px 28px 28px;
  max-width: 340px;   /* ← ★ カード全体のサイズUP */
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 20px;          /* 画像と名前の隙間を広めに */
  border: none;
  transform: translateY(6px); /* ← ★ ほんの少し下に下げて全体の調和をとる */
}

/* ====== アバター丸枠 ====== */
section[aria-labelledby="greeting-title"] .ceo-avatar {
  width: 240px;       /* ← ★ 大きめの丸枠に変更 */
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 10px;      /* 外枠の太さ */
  background: conic-gradient(
    from 220deg,
    #bfa980,
    #e9dcc4,
    #ffffff,
    #c7b28d
  );
  display: flex;
  align-items: center;
  justify-content: center;

  /* ★ 位置とバランス調整 */
  transform: translateY(-4px);
}

/* ====== 画像 ====== */
section[aria-labelledby="greeting-title"] .ceo-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.22); /* ← ★ 影を強めて存在感UP */
}

/* ====== キャプション ====== */
section[aria-labelledby="greeting-title"] .ceo-caption {
  font-size: 1rem;             /* ← 少し大きく */
  font-weight: 600;
  letter-spacing: .14em;
  color: #444;
  text-align: center;
  transform: translateY(-6px); /* ← ★ 調整して全体を引き締める */
}
/* ====== スマホ調整 ====== */
@media (max-width: 768px) {
  section[aria-labelledby="greeting-title"] .ceo-card {
    max-width: 300px;
    padding: 28px 24px 24px;
    transform: none; /* スマホでは中央寄せが自然に見える */
  }

  section[aria-labelledby="greeting-title"] .ceo-avatar {
    width: 200px;
    transform: none;
  }
}

/* 視覚的に非表示だがスクリーンリーダーには読ませたい要素に使用 */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ========== レイアウト：２カラム（スマホ→PCで分岐） ========== */
.grid-2 {
    display: grid;
    gap: var(--space);
    grid-template-columns: 1.3fr 1fr;
    width: 100%;
    align-items: center;
}
/* CEO写真カードを整える */
.grid-2 .card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-2 .card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}

/* テキストブロックの余白と読みやすさ */
.grid-2 p {
    font-size: 1rem;
    color: #333;
    line-height: 1.9;
}

.grid-2 p:last-child {
    font-weight: 600;
    text-align: right;
    margin-top: 12px;
}
@media (max-width: 820px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-2 .card {
        max-width: 320px;
        margin: 0 auto;
    }
}

.greeting p {
    margin-bottom: 1.5rem;
}

/* 社長カード本体 */
.ceo-card {
  background: linear-gradient(145deg, #ffffff, #f5efe7);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  padding: 20px 22px 18px;
  max-width: 260px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* アバターの丸枠 */
.ceo-avatar {
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1 / 1;          /* 正方形 */
  border-radius: 50%;           /* まん丸 */
  padding: 6px;
  background: conic-gradient(
    from 200deg,
    #bfa980,
    #e4d3b2,
    #fff,
    #bfa980
  );                            /* うっすらグラデの縁 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 実際の社長写真 */
.ceo-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

/* 名前のキャプション */
.ceo-caption {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-align: center;
  color: #444;
}

/* スマホのときはちょっとだけ小さく */
@media (max-width: 768px) {
  .ceo-card {
    max-width: 220px;
    padding: 16px 18px 14px;
  }
  .ceo-avatar {
    width: 150px;
  }
}

/* =========== カード＆カードグリッド（事業内容に使用）========== */
/* ----- 事業部ごとに色を変えるかもしれない ----- */
.cards {
    display: grid;
    gap: var(--space);
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    margin-top: var(--space);
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    border-radius: var(--radius);
    padding: clamp(14px, 2vw, 20px);
}
.card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.card h3 { margin-top: 0; }

/* ========== 会社概要テーブル ========== */
.profile {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;       /* 角丸を効かせるため */
}
.profile th, .profile td {
    text-align: left;
    padding: 12px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}
.profile th {
    width: 28%;
    background: #f0ece5;
    font-weight: 600;
}
.profile td {
    word-break: break-all;
    overflow-wrap: anywhere;
}
.profile td a {
    color: inherit;
    text-decoration: underline;
}
.indent {
    display: inline-block;
    margin-left: 2.1rem;
}

/* =============== 沿革のタイムライン =============== */
/* =============== 沿革のタイムライン =============== */
.timeline {
  margin-left: 8px;
  padding-left: 18px;
  list-style: none;
  padding-top: 4px;
}

.timeline li {
  margin: 0.35em 0;
  display: flex;
  gap: 1.5rem;          /* 日付と内容の間のスペース */
  position: relative;
}

/* 左の丸ポチ */
.timeline li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0.85em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* 日付部分をきれいにそろえる */
.timeline .year {
  min-width: 11em;      /* ここで幅を調整するとそろいやすい */
  font-weight: 600;
  white-space: nowrap;
}

/* 文章部分 */
.timeline .event {
  flex: 1;
}


/* =========== Googleマップ埋め込みのレスポンシブ =========== */
.map-wrap {
    position: relative;
    width: 65%;
    aspect-ratio: 5 / 3;       /* 比率指定で高さを維持 */
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #ddd;
}
.map-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========== フッター ========== */
footer {
    padding: 40px 0;
    background: #bfa980;
    color: #f5f3ef;
    font-size: .92rem;
    text-align: center;
    border-top: 1px solid var(--line);
    border-top: none;
    position: relative;
}
.ft-copy{
  max-width: 1100px;
  margin: 10px auto;
  text-align: center;
  font-size: .85rem;
  opacity: .85;
}

/* =========================================================
   スマホ表示用のレイアウト調整
   画面幅 640px 以下（スマホ縦持ち想定）
========================================================= */
@media (max-width: 640px) {

  /* ------------------------------
     ① ヘッダーまわり（ロゴ・ナビ）
  ------------------------------ */

  .site-header {
    /* ヘッダーの上下左右の余白を狭くしてスマホでも圧迫感を減らす */
    padding: 8px 14px;          /* 上下8px・左右14px */
  }

  .header-bar {
    /* ロゴとナビが狭い幅で折り返せるようにする */
    flex-wrap: wrap;            /* 必要に応じて次の行に回り込む */
    gap: 6px 12px;              /* 上下6px・左右12px の間隔 */
  }

  .header-bar .brand img {
    /* ロゴ画像を少し小さくして、ナビのスペースを確保 */
    width: 52px;                /* 横幅 52px */
    height: 52px;               /* 高さ 52px */
  }

  .header-bar .brand .title {
    /* サイト名の文字をやや小さめにしてバランスを取る */
    font-size: 1.05rem;
  }

  .main-nav ul {
    /* ナビメニューも折り返し前提で詰めて並べる */
    flex-wrap: wrap;            /* 横幅が足りないときは折り返す */
    gap: 4px 12px;              /* 上下4px・左右12px */
  }

  .main-nav a {
    /* メニューリンクのタップしやすさを残しつつ少しコンパクトに */
    font-size: 0.86rem;         /* 文字を少し小さく */
    padding: 4px 2px;           /* クリック(タップ)領域の内側余白 */
  }

  /* ------------------------------
     ② 見出しサイズの微調整
  ------------------------------ */

  h1 {
    /* ページタイトルをスマホ幅に合わせて一回り小さく */
    font-size: 1.7rem;
  }

  h2 {
    /* セクション見出しも少しだけ小型化 */
    font-size: 1.3rem;
  }

  h3 {
    /* 小見出しも微調整 */
    font-size: 1.05rem;
  }

  /* ------------------------------
     ③ 代表あいさつ（grid-2 レイアウト）
  ------------------------------ */

  /* =========================================================
   代表あいさつ：スマホでは「写真 → 文章」の順にする
========================================================= */
@media (max-width: 640px) {

  /* レイアウトをflexにして順番を入れ替える */
  section[aria-labelledby="greeting-title"] .grid-2 {
    display: flex;          /* grid → flex にする */
    flex-direction: column; /* 上から下に縦並び */
    gap: 18px;
  }

  /* 文章ブロック（最初のdiv）は下側に移動 */
  section[aria-labelledby="greeting-title"] .grid-2 > div:first-child {
    order: 2;
  }

  /* 写真ブロック（2番目のdiv）は上側に移動＆中央寄せ */
  section[aria-labelledby="greeting-title"] .grid-2 > div:last-child {
    order: 1;
    display: flex;
    justify-content: center;
  }

  /* 社長カードの余白をスマホ向けに少しだけコンパクトに */
  section[aria-labelledby="greeting-title"] .ceo-card {
    margin: 0 auto 4px;   /* 上は詰めて、下だけ少し余白 */
  }

  /* 一番最後の「代表取締役〜」の下を詰める（間延び防止） */
  section[aria-labelledby="greeting-title"] p:last-child {
    margin-bottom: 0;
  }
}
}