/* ============================================================
   吉村製材 ? common.css
   共通スタイル（変数・リセット・ヘッダー・フッター・ナビ）
   ============================================================ */

/* ── CSS 変数 ── */
:root {
  --walnut:        #53423B;
  --walnut-dark:   #3D312C;
  --walnut-deeper: #29201C;
  --chestnut:      #734224;
  --chestnut-lt:   #9B5C32;
  --forest:        #5B901C;
  --forest-lt:     #EFF7E2;
  --cream:         #FDFAF8;
  --w50:           #FDFAF8;
  --w100:          #F4EDE6;
  --w200:          #E8DDD2;
  --w300:          #CFC0B0;
  --text:          #3A2E28;
  --sub:           #7A6557;
  --font-serif:    'Noto Serif JP', serif;
  --font-sans:     'Noto Sans JP', sans-serif;
  --transition:    0.2s ease;
  --max-width:     1080px;
  --header-main-h: 86px;          /* タグライン込みの高さ */
  --header-h:      var(--header-main-h);
  --footer-logo-w: 210px;  /* フッターロゴ幅（subnav 位置合わせ用） */
  --footer-bg:     #EDF2E3; /* フッター背景：薄いセージグリーン */
}

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.8;
  padding-top: var(--header-h);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── 共通ユーティリティ ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--w200);
  position: relative;
  margin-bottom: 32px;
}
.sec-head::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 60px; height: 2px;
  background: var(--chestnut);
}
.sec-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--walnut);
  letter-spacing: 0.1em;
}
.sec-title-en {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--sub);
  text-transform: uppercase;
}

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--w200); }
.section--tinted { background: var(--w100); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(83,66,59,0.1);
}

/* ── ロゴ＋ナビ（下段） ── */
.header-main {
  height: var(--header-main-h);
  border-bottom: 1px solid var(--w200);
  background: #fff;
}
.header-main-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: stretch;   /* center → stretch でnavが全高に伸びる */
  gap: 0;
}

/* ロゴ PNG（タグライン込み縦並び） */
.site-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: center;        /* ヘッダー内で縦中央 */
  gap: 4px;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}
.logo-tagline {
  font-size: 11px;
  font-weight: 300;
  color: var(--sub);
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}
.logo-img {
  height: 52px;
  width: auto;
  display: block;
}

/* ── ナビゲーション ── */
.site-nav {
  margin-left: auto;
  align-self: stretch;
  display: flex;
  align-items: stretch;
}
.nav-list {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
  height: 100%;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* リンク本体：英語（上）＋日本語（下） */
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 16px;
  text-decoration: none;
  position: relative;
  transition: background var(--transition);
}
.nav-link:hover { background: var(--w100); }

.nav-link-en {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--forest);
  white-space: nowrap;
  line-height: 1;
}
.nav-link-ja {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--walnut);
  white-space: nowrap;
  line-height: 1;
}

/* アクティブ：下線＋文字色グリーン */
/*.nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--forest);
}*/
.nav-link.is-active::after {
  display: none;
}
.nav-link.is-active .nav-link-ja {
  border-bottom: 3px solid var(--forest);
  padding-bottom: 6px;
}
.nav-link.is-active .nav-link-en { color: var(--forest); }
.nav-link.is-active .nav-link-ja { color: var(--forest); }

/* ── ドロップダウン ── */
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--w200);
  border-top: 2px solid var(--chestnut);
  box-shadow: 0 6px 20px rgba(83,66,59,0.1);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}
.dropdown-link {
  display: block;
  font-size: 12.5px;
  font-weight: 300;
  color: var(--sub);
  letter-spacing: 0.04em;
  padding: 11px 18px;
  border-bottom: 1px solid var(--w200);
  transition: color var(--transition), background var(--transition), padding-left var(--transition);
}
.dropdown li:last-child .dropdown-link { border-bottom: none; }
.dropdown-link:hover {
  color: var(--walnut);
  background: var(--w100);
  padding-left: 24px;
}

/* ── ハンバーガー（スマホ用） ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--walnut);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}
/* open 状態 */
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   FOOTER
   ============================================================ */

/* ── フッターキャッチフレーズバナー ── */
.footer-catch-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.footer-catch-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.footer-catch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 120px 0 0;
  gap: 12px;
}
.footer-catch-line1 {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 26px);
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.14em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  line-height: 1;
}
.footer-catch-line2 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  line-height: 1;
}

/* ── フッター全体 ── */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid #d4dfbf;
}

.footer-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ── ① ロゴ行 ── */
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 0 24px;
}
.footer-logo {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.footer-logo-img {
  height: 48px;
  width: auto;
}

/* Instagram アイコン */
.footer-sns-link {
  display: block;
  width: 44px; height: 44px;
  border-radius: 10px;
  overflow: hidden;
  transition: opacity var(--transition);
  line-height: 0;
}
.footer-sns-link:hover { opacity: 0.8; }
.footer-sns-link img {
  width: 44px; height: 44px;
  object-fit: cover;
}
/* SVGフォールバック（画像なし時） */
.footer-sns-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  display: flex; align-items: center; justify-content: center;
}
.footer-sns-icon svg { width: 24px; height: 24px; }

/* ── ② フッターナビ行 ── */
.footer-nav-row {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #c8d9a8;
  border-bottom: 1px solid #c8d9a8;
}

/* ロゴ幅と同じ空きスペース */
.footer-nav-spacer {
  flex: 0 0 var(--footer-logo-w);
}

.footer-nav-list {
  display: flex;
  flex: 1;
  list-style: none;
}
.footer-nav-list li {
  flex: 1;
	align-self: flex-start;
}
/* サブナビ付き li */
.footer-nav-list li.has-footer-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.footer-item-subnav {
  list-style: none;
  width: 100%;
  padding: 10px 0 14px;
  border-top: 1px solid #c8d9a8;
  margin-top: 8px;
}
.footer-item-subnav li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 300;
  color: var(--sub);
  letter-spacing: 0.04em;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(200,217,168,0.4);
  transition: color var(--transition);
  text-decoration: none;
}
.footer-item-subnav li:last-child a { border-bottom: none; }
.footer-item-subnav li a::before {
  content: '?';
  font-size: 10px;
  color: #c8d9a8;
  flex-shrink: 0;
}
.footer-item-subnav li a:hover { color: var(--walnut); }
.footer-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  text-decoration: none;
  transition: background var(--transition);
  height: 100%;
}
.footer-nav-link:hover { background: var(--w200); }
.footer-nav-link-en {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--forest);
  white-space: nowrap;
  line-height: 1;
}
.footer-nav-link-ja {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--walnut);
  white-space: nowrap;
  line-height: 1;
}

/* ── ③ サブナビ（Products 子項目） ── */
.footer-subnav-row {
  display: flex;
  padding: 20px 0 24px;
  border-bottom: 1px solid #c8d9a8;
}
/* Products は 3番目（1/6 × 2 = 2/6 分オフセット） */
.footer-subnav-offset {
  flex: 0 0 calc(var(--footer-logo-w) + (100% - var(--footer-logo-w)) / 3);
}
.footer-subnav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-subnav-list a {
  font-size: 13px;
  font-weight: 300;
  color: var(--sub);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-subnav-list a::before {
  content: '';
  display: inline-block;
  width: 14px; height: 1px;
  background: var(--w300);
  flex-shrink: 0;
}
.footer-subnav-list a:hover { color: var(--walnut); }
.footer-subnav-list a:hover::before { background: var(--chestnut); }

/* ── ④ 会社情報 ＋ アルサンク ── */
.footer-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 36px 0 40px;
}

/* 会社情報 */
.footer-company-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--walnut);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.footer-company-table tr {
  border-bottom: 1px solid var(--w200);
}
.footer-company-table tr:first-child { border-top: 1px solid var(--w200); }
.footer-company-table td {
  padding: 9px 0;
  vertical-align: top;
  line-height: 1.7;
}
.footer-company-table td.lbl {
  width: 64px;
  font-weight: 500;
  color: var(--sub);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.footer-company-table td.val {
  font-weight: 300;
  color: var(--text);
}
.footer-company-table a {
  color: var(--chestnut);
  text-decoration: none;
}
.footer-company-table a:hover { text-decoration: underline; }

/* アルサンクカード */
.footer-alsanq-card {
  background: #2D5A0E;
  border: 1px solid #3A7012;
  border-radius: 4px;
  padding: 20px 22px 22px;
  position: relative;
}
.footer-alsanq-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--walnut);
  color: #F4EDE6;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 0 4px 0 4px;
}
.footer-alsanq-en {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 6px;
  margin-top: 10px;
}
.footer-alsanq-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: #F4EDE6;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.footer-alsanq-desc {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.85;
  margin-bottom: 14px;
}
.footer-alsanq-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #F4EDE6;
  background: var(--chestnut);
  border: none;
  padding: 9px 20px;
  border-radius: 2px;
  text-decoration: none;
  transition: background var(--transition);
  margin-bottom: 14px;
}
.footer-alsanq-btn:hover { background: var(--chestnut-lt); }
.footer-alsanq-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.footer-alsanq-tag {
  font-size: 10.5px;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 3px 9px;
  border-radius: 2px;
}

/* ── ⑤ コピーライトバー ── */
.footer-copyright {
  background: #fff;
  border-top: 1px solid var(--w200);
  padding: 16px 40px;
  text-align: center;
}
.footer-copyright p {
  font-size: 12px;
  font-weight: 300;
  color: var(--sub);
  letter-spacing: 0.08em;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 860px) {
  :root {
    --header-main-h: 60px;
  }
  .logo-tagline { display: none; }
  .header-main-inner { padding: 0 20px; }
  .container { padding: 0 20px; }

  /* ハンバーガー表示 */
  .menu-toggle { display: flex; }

  /* ナビ：縦展開 */
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-main-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--w200);
    box-shadow: 0 6px 20px rgba(83,66,59,0.1);
    padding: 8px 0 16px;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-main-h));
    z-index: 999;
  }
  .site-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    height: auto;
    gap: 0;
  }
  .nav-item { flex-direction: column; }
  .nav-link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--w200);
  }
  .nav-link-en { font-size: 10px; color: var(--forest); min-width: 72px; }
  .nav-link-ja { font-size: 13px; color: var(--walnut); }
  .nav-link.is-active::after { display: none; }
  .nav-link.is-active { background: var(--w100); }

  /* ドロップダウン：スマホはアコーディオン */
  .dropdown {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: none;
    display: none;
    background: var(--w100);
  }
  .has-dropdown.is-open > .dropdown { display: block; }
  .dropdown-link {
    padding: 10px 20px 10px 36px;
    font-size: 12.5px;
  }
  .dropdown-link:hover { padding-left: 36px; }

  .footer-catch-overlay { padding: 0 20px; align-items: center; }
  .footer-logo-row { padding: 24px 0 18px; }
  .footer-logo-img { height: 40px; }
  .footer-nav-spacer { display: none; }
  .footer-nav-row { flex-wrap: wrap; border-top: 1px solid var(--w300); }
  .footer-nav-list { flex-wrap: wrap; }
  .footer-nav-list li { flex: 0 0 33.33%; }
  .footer-nav-link { padding: 10px 4px; font-size: 11px; }
  .footer-subnav-row { padding: 16px 0; }
  .footer-subnav-offset { display: none; }
  .footer-info-row { grid-template-columns: 1fr; gap: 24px; }
  .footer-copyright { padding: 14px 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section { padding: 48px 0; }
  .sec-title { font-size: 22px; }
}

@media (max-width: 540px) {
  .footer-nav-list li { flex: 0 0 50%; }
  .logo-img { height: 42px; }
  .footer-alsanq-tags { display: none; }
}

/* ── ページトップボタン ── */
.pagetop {
  position: fixed;
  right: 24px;
  bottom: 32px;
  width: 120px;
  height: 120px;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
}
.pagetop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: pagetop-jump 1.8s ease 0.5s infinite;
}
.pagetop:hover {
  animation: pagetop-jump 2.2s ease;
}
.pagetop img {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes pagetop-jump {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-12px); }
  50%  { transform: translateY(0); }
  70%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}