/* こもれび工務店 のデザイン（設計メモ.md）。舞台＝かんなを掛けたばかりの杉の板。色は杉の葉の緑とヒノキの木の色 */
:root {
  --hpf-banner-h: 0px;
  --hpf-header-h: 68px;
  --hpf-font-head: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --hpf-font-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --hpf-head-weight: 700;
  --hpf-radius: 8px;
  --wood: #c99a5b;       /* ヒノキの木の色：線・塗りだけ（文字は乗せない） */
  --wood-pale: #f5f1ea;  /* ごく薄い木の色の地 */
  --wood-deep: #8a5a2b;  /* 板の木目の線 */
  --line: #d9cfbf;
}

body { font-size: 17px; line-height: 1.85; }
::selection { background: var(--hpf-main); color: var(--hpf-on-main); }
:focus-visible { outline: 3px solid var(--hpf-main); outline-offset: 2px; }
a { color: var(--hpf-main); text-underline-offset: .2em; }
.num, .tel-num, table td { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }

/* ---------- 画面の上の帯（文字の大きさ・営業時間） ---------- */
.topbar { background: var(--wood-pale); border-bottom: 1px solid var(--line); font-size: 14.5px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar-hours { margin: 0; }
.topbar .hpf-fs button { min-height: 40px; font-size: 14.5px; }

/* ---------- ヘッダー ---------- */
.hpf-header { border-bottom: 1px solid var(--line); top: 0; }
.hpf-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.hpf-nav a { font-size: 15px; padding: 10px 10px; }
.head-tel { display: inline-flex; align-items: center; gap: 6px; color: var(--hpf-main); font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 17px; }
.head-cta { flex: none; }
@media (max-width: 1400px) { .head-tel span { display: none; } }
.hpf-nav a { white-space: nowrap; }
@media (max-width: 900px) {
  .hpf-header .head-tel, .hpf-header .head-cta { display: none; }
  .hpf-logo { font-size: 19px; }
}

/* ---------- ボタン ---------- */
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 10px 24px; border-radius: var(--hpf-radius); font-weight: 700; font-size: 17px; text-decoration: none; text-align: center; line-height: 1.4; border: 2px solid var(--hpf-main); cursor: pointer; font-family: inherit; }
.btn small { font-weight: 400; font-size: 14px; }
.btn-main { background: var(--hpf-main); color: var(--hpf-on-main); }
.btn-main:hover { background: #244a30; }
.btn-sub { background: #fff; color: var(--hpf-main); }
.btn-sub:hover { background: var(--wood-pale); }
.btn-line { background: #fff; color: #1f2420; border-color: #06a046; }
.btn-line .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #06c755; margin-right: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .btn-row .btn { width: 100%; } }

/* ---------- 区画の共通 ---------- */
section { scroll-margin-top: calc(var(--hpf-header-h) + 12px); }
.sec { padding: 80px 0; }
.sec-pale { background: var(--wood-pale); }
.sec-title { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 18px; color: #1f2420; }
.sec-lead { max-width: 40em; margin: 0 0 28px; }
.more { margin-top: 28px; }
@media (max-width: 600px) { .sec { padding: 56px 0; } }

/* ---------- 最初の画面 ---------- */
.hero { padding: 56px 0 64px; background: linear-gradient(180deg, #fff 0%, #fff 60%, var(--wood-pale) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero-place { display: inline-block; margin: 0 0 14px; padding: 4px 14px; background: var(--hpf-main); color: var(--hpf-on-main); font-weight: 700; border-radius: 999px; font-size: 15px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.35; margin: 0 0 18px; letter-spacing: .02em; }
.hero-lead { font-size: 18px; max-width: 30em; margin: 0 0 26px; }
.hero-note { margin: 16px 0 0; font-size: 15.5px; }
.stage { margin: 0; cursor: pointer; }
.stage svg { display: block; width: 100%; height: auto; }
.stage figcaption { text-align: center; font-size: 14.5px; margin-top: 6px; color: #1f2420; }
.stage figcaption strong { color: var(--hpf-main); }
@media (max-width: 900px) {
  .hero { padding: 32px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .stage { max-width: 520px; margin: 0 auto; }
}

/* 看板の動き「ひと削り」：SVG の CSS 変数 --p（かんなの進み 0→1）と --s（かんなくず 0→1）だけを動かす */
.kanna-svg { --p: 1; --s: 1; }
.kanna-svg .planed { transform-box: fill-box; transform-origin: left center; transform: scaleX(var(--p)); }
.kanna-svg .plane { transform: translateX(calc(var(--p) * 340px)); }
.kanna-svg .curl { transform-box: fill-box; transform-origin: left bottom; transform: scale(var(--s)); opacity: var(--s); }
.c-wood { fill: #ddb67f; } .c-wood-pale { fill: #f2dcb3; } .c-board-edge { fill: #b98848; }
.s-grain { stroke: var(--wood-deep); fill: none; stroke-linecap: round; }
.c-dai { fill: #9a6a35; } .c-blade { fill: #3b3f44; } .c-main { fill: var(--hpf-main); } .c-white { fill: #fff; }
.c-curl { fill: none; stroke: #e2b878; stroke-linecap: round; }
.c-ground { fill: var(--wood-pale); }

/* ---------- 当社について（トップ） ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-big { font-family: var(--hpf-font-head); font-size: clamp(24px, 3vw, 32px); line-height: 1.6; margin: 0; }
.about-big .wood-line { background: linear-gradient(transparent 70%, #ecd3a6 70%); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- お仕事（リフォーム6：新築4） ---------- */
.ratio { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 0 0 8px; max-width: 640px; }
.ratio i { display: block; }
.ratio .r-reform { flex: 6; background: var(--hpf-main); }
.ratio .r-new { flex: 4; background: var(--wood); }
.ratio-legend { display: flex; gap: 20px; flex-wrap: wrap; margin: 0 0 32px; font-weight: 700; }
.ratio-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ratio-legend .sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.svc-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.svc { background: #fff; border: 1px solid var(--line); border-radius: var(--hpf-radius); padding: 28px; }
.svc h3 { font-size: 26px; margin: 0 0 10px; }
.svc-reform { border-top: 6px solid var(--hpf-main); }
.svc-new { border-top: 6px solid var(--wood); }
.svc dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; }
.svc dt { font-weight: 700; }
.svc dd { margin: 0; }
@media (max-width: 760px) { .svc-grid { grid-template-columns: 1fr; } .svc dl { grid-template-columns: 1fr; gap: 0; } .svc dd { margin-bottom: 8px; } }

/* ---------- 写真待ちの枠 ---------- */
.wait-box { border: 2px dashed var(--line); border-radius: var(--hpf-radius); padding: 24px; background: #fff; }
.wait-box p { margin: 0; }
.photo-wait { margin: 0; min-height: 160px; display: grid; place-items: center; text-align: center; padding: 24px; border: 2px dashed var(--line); border-radius: var(--hpf-radius); background: #fff; }
.photo-wait figcaption { font-weight: 700; }

/* ---------- 施工事例の一覧（写真が届いたら li を足す） ---------- */
.filter-how { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.filter-how li { padding: 6px 14px; border: 1px solid var(--hpf-main); border-radius: 999px; color: var(--hpf-main); font-weight: 700; background: #fff; }
.works-tool:has(.works-list:empty) [data-hpf-filter] { display: none; }
.works-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.works-list:empty { display: none; }
[data-hpf-filter] { display: grid; gap: 10px; margin-bottom: 24px; }

/* ---------- よくあるご質問 ---------- */
.faq-list { max-width: 820px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: var(--hpf-radius); margin-bottom: 12px; }
.faq-list summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 700; position: relative; font-size: 18px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 11px; height: 11px; border-right: 3px solid var(--hpf-main); border-bottom: 3px solid var(--hpf-main); transform: translateY(-70%) rotate(45deg); transition: transform .25s ease; }
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list .ans { padding: 0 22px 18px; margin: 0; }
.q-mark { color: var(--hpf-main); margin-right: 8px; font-family: var(--hpf-font-head); }

/* ---------- 採用（トップ） ---------- */
.recruit-band { background: var(--hpf-main); color: #fff; }
.recruit-band .sec-title { color: #fff; }
.recruit-band .rb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.recruit-band dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; padding: 22px 24px; background: rgba(255,255,255,.1); border-radius: var(--hpf-radius); }
.recruit-band dt { font-weight: 700; }
.recruit-band dd { margin: 0; }
.recruit-band .btn-sub { border-color: #fff; }
@media (max-width: 760px) { .recruit-band .rb-grid { grid-template-columns: 1fr; } .recruit-band dl { grid-template-columns: 1fr; gap: 0; } .recruit-band dd { margin-bottom: 8px; } }

/* ---------- お問い合わせ（トップ・お問い合わせのページ） ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.c-card { background: #fff; border: 1px solid var(--line); border-radius: var(--hpf-radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.c-card h3 { margin: 0; font-size: 21px; }
.c-card p { margin: 0; }
.c-card .btn { margin-top: auto; }
.tel-big { font-size: 28px; font-weight: 700; text-decoration: none; color: var(--hpf-main); white-space: nowrap; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- 表 ---------- */
.info-table { width: 100%; border-collapse: collapse; background: #fff; }
.info-table th, .info-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 9em; font-weight: 700; background: var(--wood-pale); }
@media (max-width: 600px) { .info-table th, .info-table td { display: block; width: auto; } .info-table th { border-bottom: 0; padding-bottom: 4px; } .info-table td { padding-top: 6px; } }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--hpf-radius); }

/* ---------- 下層ページ ---------- */
.page-head { padding: 44px 0 36px; background: var(--wood-pale); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(28px, 4vw, 42px); margin: 0; }
.page-head .lead { margin: 12px 0 0; max-width: 40em; }
.crumb { margin: 0 0 8px; font-size: 14.5px; }
.sub-sec { padding: 56px 0; }
.sub-sec + .sub-sec { padding-top: 0; }
.sub-sec h2 { font-size: clamp(23px, 3vw, 30px); margin: 0 0 16px; }
.sub-sec h3 { font-size: 20px; margin: 24px 0 8px; }
.list-dot { padding-left: 1.3em; }
.list-dot li { margin-bottom: 6px; }

/* ---------- フォーム ---------- */
.form { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--hpf-radius); padding: 28px; max-width: 760px; }
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; }
.req, .opt { display: inline-block; flex: none; white-space: nowrap; margin-left: 8px; padding: 0 8px; font-size: 13px; border-radius: 4px; vertical-align: 2px; }
.req { background: var(--hpf-main); color: #fff; }
.opt { border: 1px solid #1f2420; color: #1f2420; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field select, .field textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #6b6256; border-radius: 6px; background: #fff; color: #1f2420; min-height: 50px; }
.field textarea { min-height: 150px; }
.field input[type=file] { font: inherit; max-width: 100%; }
.field .hint { margin: 6px 0 0; font-size: 15px; }
.form .btn { width: 100%; }
.form-note { font-size: 15px; margin: 14px 0 0; }

/* ---------- スマホの下の固定ボタン（電話・お見積もり） ---------- */
.sp-bar { display: none; }
@media (max-width: 900px) {
  .sp-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  .sp-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 58px; font-weight: 700; text-decoration: none; font-size: 16px; }
  .sp-bar .sp-tel { color: var(--hpf-main); }
  .sp-bar .sp-est { background: var(--hpf-main); color: #fff; }
  body { padding-bottom: 58px; }
  .nav-fs { padding: 16px 4px; border-bottom: 1px solid rgba(0,0,0,.08); }
}
.hpf-nav a.nav-extra { display: none; }
@media (max-width: 900px) { .hpf-nav a.nav-extra { display: block; } }

/* ---------- フッター ---------- */
.site-footer { background: #23302a; color: #fff; padding: 52px 0 24px; }
.site-footer a { color: #fff; }
.f-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.f-name { display: flex; align-items: center; gap: 10px; font-family: var(--hpf-font-head); font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.site-footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.site-footer nav a { text-decoration: none; padding: 6px 0; }
.site-footer .btn-line { margin-top: 14px; }
.copy { text-align: center; margin: 36px 0 0; font-size: 14px; }
@media (max-width: 760px) { .f-grid { grid-template-columns: 1fr; } }

/* 動きなし・動きを減らす設定 */
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } }
body.hpf-motion-off .faq-list summary::after { transition: none; }

/* よくあるご質問のページ（答えを最初から見せる） */
.faq-dl { margin: 0; }
.faq-dl dt { font-weight: 700; font-size: 19px; padding: 18px 0 6px; border-top: 1px solid var(--line); }
.faq-dl dd { margin: 0 0 14px; padding-left: 1.6em; }

/* フッター：LINE のボタンは白い地に黒い文字（フッターのリンクの白を上書き）。小さいスマホはメニューを1列に */
.site-footer .btn-line { color: #1f2420; }
@media (max-width: 600px) { .site-footer nav { grid-template-columns: 1fr; } }
.head-cta.hpf-cta { padding: 10px 20px; min-height: 48px; }

/* 文の中の電話番号を途中で折り返さない */
a[href^="tel:"] { white-space: nowrap; }
