/* =========================================================
   共通スタイル（2026年リニューアル）
   リニューアル済みのページ（トップ・下層ページ）で読み込む
   10-ff.ph と同じ構成・幅の取り方で、色だけ石床・木目に合わせている（色の組み合わせ A：チャコール × オーク）
   ※ 旧テーマ（weluka）のページでは読み込まない
   ========================================================= */

/* ---- 色・サイズの基本設定 ---- */
:root {
  --dark: #2f2620;        /* ヘッダー・お問い合わせ枠：茶色寄りのチャコール */
  --footer: #211a15;      /* フッター：ヘッダーより一段濃い色 */
  --accent: #80521f;      /* 木の茶色（ボタン・番号・ラベル） */
  --accent-soft: #d6b88f; /* 薄い木の色（暗い背景の上のラベル） */
  --ink: #2a221c;         /* 見出し・本文の基本色 */
  --muted: #5a4f45;       /* 説明文 */
  --line: #e6ddd0;
  --bg: #faf8f4;          /* ページの背景（ほぼ白） */
  --bg-soft: #f1eadf;     /* 薄い背景（ごく薄い木の色） */
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --container: 1600px; /* コンテンツ幅の上限（文章は各ブロックの max-width で読みやすい幅に保つ） */
  --gutter: clamp(20px, 4.5vw, 80px);
  --header-h: 80px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---- リセット・基本 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.is-menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* ページ内リンクで移動したとき、固定ヘッダーに見出しが隠れないようにする */
[id] { scroll-margin-top: 72px; }
/* 画面には表示せず、読み上げソフトにだけ伝える文字 */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: #fff;
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease), height .5s var(--ease);
}
/* スクロール後はチャコールの背景（ロゴが白文字のため暗い背景を使用） */
.site-header.is-scrolled {
  --header-h: 68px;
  background: rgba(47, 38, 32, .95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
/* 下層ページでは、ヘッダーを最初から色付きの帯にする（明るい背景だと白いロゴが見えないため） */
.site-header.is-solid { background: var(--dark); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: none;
}
.site-header__logo { position: relative; z-index: 2; }
.site-header__logo img { width: clamp(180px, 20vw, 240px); }

/* PC用メニュー */
.gnav__list { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.gnav__item { position: relative; }
.gnav__link {
  display: block;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
}
.gnav__link::after {
  content: '';
  display: block;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
/* カーソルを乗せたとき・今いるカテゴリは下線を表示 */
.gnav__item:hover > .gnav__link::after,
.gnav__link:focus-visible::after,
.gnav__link[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.gnav__cta {
  padding: 12px 26px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.gnav__cta::after { display: none; }
.gnav__cta:hover { background: var(--accent); border-color: var(--accent); }

/* ドロップダウン（サブメニュー） */
.gnav__sub {
  position: absolute;
  top: 100%;
  left: -24px;
  min-width: 260px;
  padding: 14px 0;
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(33, 26, 21, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.gnav__item:hover .gnav__sub,
.gnav__item:focus-within .gnav__sub { opacity: 1; visibility: visible; transform: none; }
.gnav__sub a {
  display: block;
  padding: 9px 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  transition: color .3s, background-color .3s;
}
.gnav__sub a:hover { color: var(--accent); background: var(--bg-soft); }

/* スマホ用メニューボタン */
.menu-btn {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform .4s var(--ease), opacity .3s;
}
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 22px; }
.menu-btn span:nth-child(3) { top: 28px; }
.is-menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.is-menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.is-menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1023px) {
  .menu-btn { display: block; }
  .gnav {
    position: fixed;
    inset: 0;
    padding: calc(var(--header-h) + 16px) var(--gutter) 48px;
    overflow-y: auto;
    background: var(--dark); /* スマホメニュー背景：ヘッダーと同じ色 */
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s var(--ease), visibility .45s;
  }
  .is-menu-open .gnav { opacity: 1; visibility: visible; }
  .gnav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .gnav__item { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .gnav__link { padding: 18px 0; font-size: 15px; }
  .gnav__link::after { display: none; }
  .gnav__sub {
    position: static;
    min-width: 0;
    padding: 0 0 14px;
    background: none;
    color: rgba(255, 255, 255, .7);
    box-shadow: none;
    opacity: 1;
    /* 親メニューの表示・非表示に従う（visible にすると、閉じたメニューのリンクが透明なままページ上に残り、マウス操作を横取りする） */
    visibility: inherit;
    transform: none;
  }
  .gnav__sub a { padding: 6px 0 6px 16px; font-size: 13px; }
  .gnav__sub a:hover { background: none; color: #fff; }
  .gnav__item--cta { border: 0; margin-top: 32px; }
  .gnav__cta { text-align: center; padding: 16px; }
}

/* =========================================================
   セクション共通
   ========================================================= */
.section { padding: clamp(96px, 14vw, 180px) 0; }
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--accent);
}
.section-label__num { color: var(--muted); font-weight: 500; }
.section-label::after { content: ''; width: 48px; height: 1px; background: currentColor; }
.section-title {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.005em;
  color: var(--ink);
}
.text { font-size: 15px; line-height: 2; color: var(--muted); }

/* 「MORE」などの矢印付きリンク */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--ink);
}
.link-arrow__circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  transition: border-color .4s var(--ease), background-color .4s var(--ease), color .4s var(--ease);
}
.link-arrow__circle svg { width: 14px; height: 14px; transition: transform .5s var(--ease); }
.link-arrow:hover .link-arrow__circle { background: var(--accent); border-color: var(--accent); color: #fff; }
.link-arrow:hover .link-arrow__circle svg { transform: translateX(3px); }
.link-arrow--light { color: #fff; }
.link-arrow--light .link-arrow__circle { border-color: rgba(255, 255, 255, .4); }

/* =========================================================
   スクロール出現アニメーション（JSが動く環境のみ）
   .reveal-up    … 画像：下から上へふわっと
   .reveal-left  … テキスト：左から右へスライド
   .reveal-wipe  … 見出し：左から右へマスクが外れるように出現（1行ずつ <span class="line"> で囲む）
   .reveal-float … 大きな画像：ぼかしから、ふわっと浮き上がるように出現
   ========================================================= */
.js .reveal-up { opacity: 0; transform: translateY(60px); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); }
.js .reveal-left { opacity: 0; transform: translateX(-50px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }
.js .is-inview.reveal-up, .js .is-inview.reveal-left { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s !important; }
.delay-2 { transition-delay: .24s !important; }
.delay-3 { transition-delay: .36s !important; }

@keyframes intro-wipe {
  0% { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  100% { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
.reveal-wipe .line { display: block; width: fit-content; }
.js .reveal-wipe .line {
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 250% 100%;
  mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
}
.js .reveal-wipe.is-inview .line { animation: intro-wipe 1.15s cubic-bezier(.65, 0, .35, 1) .1s both; }
.js .reveal-wipe.is-inview .line:nth-child(2) { animation-delay: .32s; }

/* ページを開いた直後でも確実に再生されるよう、transition ではなく keyframes で動かす */
@keyframes float-in {
  0% { opacity: 0; transform: translateY(70px); filter: blur(12px); }
  100% { opacity: 1; transform: none; filter: none; }
}
.js .reveal-float { opacity: 0; }
.js .reveal-float.is-inview { animation: float-in 1.8s var(--ease) .2s both; }
.js .reveal-float.is-inview.delay-1 { animation-delay: .35s; }
.js .reveal-float.is-inview.delay-2 { animation-delay: .5s; }

/* =========================================================
   ページタイトル（下層ページ用）
   薄い木の色の帯＋砂目の質感、右下に薄い大きな飾り文字（ページ名）、
   パンくず・大見出し・説明文・同じカテゴリのページを切り替えるタブ
   ========================================================= */
.sub-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(32px, 4.4vw, 64px)) 0 0;
  background: var(--bg-soft);
  color: var(--ink);
}
/* 最背面：サンド（砂目）テクスチャ。細かい砂粒がうっすら見えるざらっとした質感。
   画像ファイルは使わず、SVGのノイズを小さなタイルにして敷き詰める（継ぎ目が出ないよう stitchTiles を指定）
   ※ 濃さは opacity、粒の細かさは baseFrequency（大きいほど細かい）で調整 */
.sub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.29 0 0 0 0 0.25 0 0 0 0 0.21 1.8 0 0 0 -0.78'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: .4;
  pointer-events: none;
}
/* 中間層：右下の大きな飾り文字（ページ名）。下に向かって薄くなる */
.sub-hero__bg-text {
  position: absolute;
  right: var(--gutter);
  bottom: -.16em;
  z-index: 0;
  font-size: clamp(40px, 12vw, 200px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: rgba(47, 38, 32, .05);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 105%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 105%);
  pointer-events: none;
  user-select: none;
}
/* 飾り文字が長いとき（style="--bg-chars: 文字数" を指定）は、画面からはみ出さないよう自動で縮める */
.sub-hero__bg-text[style*="--bg-chars"] { font-size: min(clamp(40px, 12vw, 200px), calc((100vw - var(--gutter) * 2) / var(--bg-chars) * 1.35)); }
/* 最前面：見出し（飾り文字の下に隠れないようにする） */
.sub-hero__inner { position: relative; z-index: 1; }

/* パンくずリスト：家のアイコン＋「›」。クリックできる部分（下線あり）と今いるページを見分けられるようにする */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(24px, 3vw, 36px); font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: '›'; margin-right: 10px; font-size: 16px; line-height: 1; color: #a39684; }
.breadcrumb a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(47, 38, 32, .25); text-underline-offset: 4px; transition: color .3s, text-decoration-color .3s; }
.breadcrumb a:hover { color: var(--accent); text-decoration-color: currentColor; }
.breadcrumb__home { display: grid; place-items: center; text-decoration: none !important; }
.breadcrumb__home svg { width: 16px; height: 16px; }

.sub-hero__title { font-size: clamp(40px, 5.4vw, 80px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.sub-hero__lead { max-width: 640px; margin-top: 18px; font-size: 15px; line-height: 1.9; color: var(--muted); }
/* ページ切り替えのタブ（.local-nav）が無いページ（ソーラーパネル・404など）は、帯の下端に余白を付ける */
.sub-hero__inner > :last-child:not(.local-nav) { margin-bottom: clamp(48px, 6vw, 80px); }

/* 同じカテゴリのページを切り替えるタブ（今いるページに木の茶色の下線） */
.local-nav { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid #e0d5c5; }
.local-nav ul { display: flex; gap: clamp(24px, 3.4vw, 56px); overflow-x: auto; scrollbar-width: none; }
.local-nav ul::-webkit-scrollbar { display: none; }
.local-nav a {
  display: block;
  padding: 20px 0 18px;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  white-space: nowrap;
  color: var(--muted);
  transition: color .3s, border-color .3s;
}
.local-nav a:hover { color: var(--ink); }
.local-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
/* スマホ：右下の飾り文字がタブに重ならないよう、タブの上の線のすぐ上に置く */
@media (max-width: 599px) {
  .sub-hero__bg-text { bottom: calc(66px - .14em); }
  /* タブが無いページは、帯の下端に置く（説明文に重ならないように） */
  .sub-hero:not(:has(.local-nav)) .sub-hero__bg-text { bottom: -.16em; }
}

/* 下層ページの本文ブロック */
.co-section { padding: clamp(72px, 9vw, 128px) 0; }
.co-section--soft { background: var(--bg-soft); }
.co-head { margin-bottom: clamp(40px, 5vw, 64px); }

/* 企業理念の3項目（ABOUT 10FF・ORGANIZATION で使用） */
.principles { margin-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); }
.principles li { display: flex; align-items: baseline; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--ink); }
.principles__num { flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--accent); }

/* =========================================================
   Contact（お問い合わせの枠：トップ・下層ページ共通）
   ========================================================= */
.contact__box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: clamp(48px, 7vw, 96px) clamp(28px, 6vw, 96px);
  background: var(--dark); /* ヘッダーと同じ色 */
  border-radius: 6px;
  color: #fff;
}
.contact .section-label { color: var(--accent-soft); }
.contact .section-label__num { color: rgba(255, 255, 255, .55); }
.contact .section-title { color: #fff; }
.contact__text { margin-top: 24px; font-size: 15px; line-height: 2; color: rgba(255, 255, 255, .8); }
.contact__actions { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform .5s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #fff; color: var(--dark); }
.btn--outline { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn--outline:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.contact__tel { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; font-size: 22px; font-weight: 600; letter-spacing: .08em; }
.contact__tel small { font-size: 11px; font-weight: 600; letter-spacing: .2em; color: rgba(255, 255, 255, .65); }

@media (min-width: 900px) {
  .contact__box { grid-template-columns: 6fr 5fr; gap: 80px; align-items: center; }
}

/* =========================================================
   フッター
   文字色は見本（A）に合わせる：見出し＝薄い木の色、項目・会社情報＝薄いベージュ
   ========================================================= */
.site-footer { padding: clamp(72px, 9vw, 112px) 0 32px; background: var(--footer); color: #c2b5a5; font-size: 13px; }
.site-footer__top { display: grid; grid-template-columns: 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer__logo img { width: 220px; }
.site-footer__info { margin-top: 24px; line-height: 1.9; }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
.site-footer__nav h3 { margin-bottom: 14px; font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--accent-soft); }
.site-footer__nav h3 a:hover { color: #fff; }
.site-footer__nav li a { display: inline-block; padding: 4px 0; letter-spacing: .04em; transition: color .3s; }
.site-footer__nav li a:hover { color: #fff; }
.site-footer__copy { padding-top: 28px; font-size: 11px; letter-spacing: .1em; text-align: center; }

@media (min-width: 900px) {
  .site-footer__top { grid-template-columns: 4fr 8fr; gap: 80px; }
  .site-footer__nav { grid-template-columns: repeat(4, 1fr); }
  .site-footer__copy { text-align: left; }
}

/* 動きを減らす設定の利用者には、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal-up, .js .reveal-left { opacity: 1; transform: none; }
  .js .reveal-float { opacity: 1; transform: none; filter: none; }
  .js .reveal-wipe .line { -webkit-mask-image: none; mask-image: none; }
}
