/* =========================================================
   結木工務店 完成見学会LP（制作サンプル）
   色：生成り・墨・木・柿渋の4色だけで組む
   ========================================================= */
:root {
  --bg: #F7F3EC;
  --paper: #FFFDF8;
  --ink: #2A2521;
  --ink2: #4A423B;
  --sub: #7A7067;
  --wood: #A06A3B;
  --wood-l: #C9905A;
  --accent: #B5532B;
  --accent-d: #97431F;
  --line: #E2D8CA;
  --dark: #2F2823;
  --mincho: "Shippori Mincho B1", "Yu Mincho", "YuMincho", serif;
  --gothic: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--bg);
  word-break: auto-phrase; /* 日本語の改行を文節で */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--wood-l); outline-offset: 3px; }
.sp { display: none; }

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 40px); }
.section { padding: 112px 0; }
.section__lead { text-align: center; color: var(--sub); margin: -24px auto 48px; max-width: 640px; }

/* ---------- サンプル表示の帯 ---------- */
.sample-bar {
  background: var(--ink);
  color: #E9E1D5;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  padding: 6px 16px;
  letter-spacing: .02em;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .08em;
  transition: background-color .2s, transform .2s, box-shadow .2s;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(181, 83, 43, .28); }
.btn--accent:hover { background: var(--accent-d); transform: translateY(-2px); }
.btn--lg { padding: 18px 44px; font-size: 18px; }
.btn--block { width: 100%; }
.btn__sub { font-size: 12px; font-weight: 500; opacity: .9; letter-spacing: .04em; }

/* ---------- ヘッダー ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 243, 236, .92);
  backdrop-filter: blur(8px);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 2px 16px rgba(42, 37, 33, .08); }
.header__inner {
  height: 100%;
  width: min(1320px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 36px; height: 36px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__name { font-family: var(--mincho); font-weight: 800; font-size: 22px; letter-spacing: .12em; }
.logo__en { font-size: 9px; letter-spacing: .32em; color: var(--sub); }

.gnav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.gnav ul { display: flex; gap: 24px; font-size: 14px; }
.gnav ul a { text-decoration: none; padding: 6px 0; background: linear-gradient(var(--wood), var(--wood)) left bottom / 0 1px no-repeat; transition: background-size .25s; }
.gnav ul a:hover { background-size: 100% 1px; }
.gnav__cta { padding: 10px 22px; font-size: 14px; }
.header__tel { display: none; }
@media (min-width: 1320px) {
  .header__tel { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; font-family: var(--mincho); font-weight: 700; font-size: 20px; letter-spacing: .06em; }
  .header__tel span { font-family: var(--gothic); font-size: 10px; font-weight: 500; color: var(--sub); letter-spacing: .1em; }
}
.menu-btn { display: none; }

/* ---------- ファーストビュー ---------- */
.fv {
  display: grid;
  grid-template-columns: 38fr 62fr;
  min-height: min(calc(100svh - var(--header-h) - 30px), 860px);
}
.fv__photo { order: 2; position: relative; overflow: hidden; }
.fv__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.fv__body {
  order: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 56px clamp(24px, 3vw, 56px) 56px clamp(24px, 4vw, 72px);
}
.fv__catch {
  grid-column: 2;
  grid-row: 1;
  writing-mode: vertical-rl;
  font-family: var(--mincho);
  font-weight: 800;
  font-size: clamp(34px, 3.3vw, 54px);
  line-height: 1.5;
  letter-spacing: .14em;
  font-feature-settings: "palt" 0;
  justify-self: end;
}
.fv__catch span { display: block; }
.fv__catch span + span { margin-top: 2.2em; }
.fv__lead { grid-column: 1; grid-row: 1; align-self: end; }
.fv__label { font-size: 13px; color: var(--wood); font-weight: 700; letter-spacing: .14em; }
.fv__title { font-family: var(--mincho); font-weight: 800; font-size: clamp(30px, 2.6vw, 40px); line-height: 1.3; margin-top: 4px; }
.fv__title small { display: inline-block; margin-left: 10px; font-size: 13px; font-family: var(--gothic); font-weight: 700; color: #fff; background: var(--wood); padding: 2px 10px; border-radius: 4px; vertical-align: middle; letter-spacing: .1em; }
.fv__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 28px; }
.fv__tags li { border: 1px solid var(--ink2); border-radius: 4px; padding: 2px 8px; font-size: 13px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.fv__note { margin-top: 14px; font-size: 13px; color: var(--sub); }
.fv__note::before { content: "✓ "; color: var(--wood); font-weight: 700; }

/* ---------- 見出し ---------- */
.heading {
  text-align: center;
  font-family: var(--mincho);
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.5;
  letter-spacing: .1em;
  margin-bottom: 56px;
  font-feature-settings: "palt";
}
.heading__en {
  display: block;
  font-family: var(--gothic);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .36em;
  color: var(--wood);
  margin-bottom: 8px;
}
.heading--light { color: var(--paper); }
.heading--light .heading__en { color: var(--wood-l); }

/* ---------- 悩み ---------- */
.worries { background: var(--paper); }
.worries__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.worries__list li {
  position: relative;
  background: var(--bg);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  font-weight: 500;
  line-height: 1.8;
}
.worries__list li::after { /* 吹き出しの尾 */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  translate: -50% 0;
  border: 12px solid transparent;
  border-bottom: 0;
  border-top-color: var(--bg);
}
.worries__answer {
  margin-top: 64px;
  text-align: center;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: .08em;
}
.worries__answer em { font-style: normal; background: linear-gradient(transparent 62%, rgba(201, 144, 90, .38) 62%); }

/* ---------- 5つのこと ---------- */
.points { background: var(--dark); color: #EDE5DA; }
.points .section__lead { color: #BFB3A5; }
.points__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.points__list li {
  flex: 0 1 calc((100% - 48px) / 3);
  border-top: 1px solid rgba(237, 229, 218, .25);
  padding: 28px 4px 8px;
}
.points__num { font-family: var(--mincho); font-weight: 700; font-size: 40px; line-height: 1; color: var(--wood-l); }
.points__list h3 { font-family: var(--mincho); font-size: 21px; font-weight: 700; margin: 14px 0 10px; color: var(--paper); letter-spacing: .08em; }
.points__list p { font-size: 15px; color: #CFC5B8; }

/* ---------- 特徴 ---------- */
.feature { display: grid; grid-template-columns: 56fr 44fr; align-items: center; gap: 64px; }
.feature + .feature { margin-top: 96px; }
.feature--rev .feature__photo { order: 2; }
.feature__photo { border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; }
.feature__photo img { width: 100%; height: 100%; object-fit: cover; }
.feature__num { font-family: var(--mincho); font-size: 64px; font-weight: 700; line-height: 1; color: var(--line); }
.feature h3 { font-family: var(--mincho); font-weight: 800; font-size: clamp(22px, 2vw, 28px); line-height: 1.6; letter-spacing: .08em; margin: 8px 0 20px; font-feature-settings: "palt"; }
.feature p { color: var(--ink2); }

/* ---------- 施工事例 ---------- */
.works { background: var(--paper); }
.works__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.works__list img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 4px; transition: transform .5s; }
.works__list figure { overflow: hidden; }
.works__list figure:hover img { transform: scale(1.03); }
.works__list figcaption { margin-top: 14px; font-family: var(--mincho); font-weight: 700; font-size: 17px; line-height: 1.6; }
.works__list figcaption span { display: inline-block; font-family: var(--gothic); font-size: 12px; font-weight: 500; color: var(--wood); border: 1px solid var(--wood); border-radius: 3px; padding: 0 8px; margin-right: 10px; vertical-align: 2px; }

/* ---------- 流れ ---------- */
.flow__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.flow__list li { position: relative; background: var(--paper); border-radius: 8px; padding: 28px 24px; }
.flow__list li:not(:last-child)::after { /* 次の段への矢印 */
  content: "";
  position: absolute;
  top: 50%;
  right: -22px;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--wood-l);
  border-right: 2px solid var(--wood-l);
  transform: translateY(-50%) rotate(45deg);
}
.flow__step { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--wood); }
.flow__list h3 { font-family: var(--mincho); font-size: 20px; font-weight: 700; margin: 6px 0 10px; }
.flow__list p { font-size: 14px; color: var(--ink2); line-height: 1.8; }
.promise {
  margin: 56px auto 0;
  max-width: 760px;
  text-align: center;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: clamp(19px, 1.9vw, 24px);
  border: 2px solid var(--accent);
  color: var(--accent-d);
  border-radius: 8px;
  padding: 22px 24px;
  background: var(--paper);
}
.event { margin: 56px auto 0; max-width: 760px; border-top: 1px solid var(--line); }
.event div, .company__list div { display: grid; grid-template-columns: 9em 1fr; border-bottom: 1px solid var(--line); padding: 16px 4px; }
.event dt, .company__list dt { font-weight: 700; color: var(--wood); }

/* ---------- よくある質問 ---------- */
.faq { background: var(--paper); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 22px 48px 22px 44px;
  font-weight: 700;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::before { content: "Q"; position: absolute; left: 4px; top: 18px; font-family: var(--mincho); font-size: 24px; color: var(--wood); }
.faq__list summary::after { /* ＋と−の切り替え */
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  translate: 0 -50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform .25s;
}
.faq__list details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat; }
.faq__list details p { position: relative; padding: 0 48px 24px 44px; color: var(--ink2); }
.faq__list details p::before { content: "A"; position: absolute; left: 4px; top: -6px; font-family: var(--mincho); font-size: 24px; color: var(--accent); }

/* ---------- 予約フォーム ---------- */
.reserve { background: var(--dark); }
.reserve .section__lead { color: #CFC5B8; }
.req { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 3px; padding: 0 6px; line-height: 1.7; vertical-align: 1px; letter-spacing: .06em; }
.form, .thanks { background: var(--paper); border-radius: 12px; padding: 48px clamp(20px, 5vw, 56px); }
.form__row { margin-bottom: 24px; border: 0; padding: 0; min-width: 0; }
.form__row > label, .form__row legend { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.form__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form input[type="date"], .form select, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* iPhone で入力時に拡大されない大きさ */
  padding: 12px 14px;
  border: 1px solid #CDBFAD;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--wood); box-shadow: 0 0 0 3px rgba(201, 144, 90, .3); }
.form .is-error input, .form .is-error select { border-color: #C23B2A; background: #FFF6F4; }
.form__err { display: none; color: #C23B2A; font-size: 13px; margin-top: 6px; }
.is-error .form__err { display: block; }
.form__checks { display: flex; flex-wrap: wrap; gap: 10px; }
.form__checks label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #CDBFAD; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-size: 15px; background: #fff; }
.form__checks label:has(input:checked) { border-color: var(--wood); background: #F6ECE1; }
.form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.form__agree label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.form__agree a { color: var(--accent-d); }
.form__tel { margin-top: 18px; text-align: center; font-size: 14px; color: var(--sub); }
.thanks { text-align: center; }
.thanks:focus { outline: none; }
.thanks__title { font-family: var(--mincho); font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.thanks__note { margin-top: 16px; font-size: 13px; color: var(--accent-d); }
.privacy { margin-top: 32px; color: #BFB3A5; font-size: 13px; line-height: 1.8; }
.privacy__title { font-weight: 700; color: #E9E1D5; margin-bottom: 4px; }

/* ---------- 会社概要・フッター ---------- */
.company__list { max-width: 760px; margin-inline: auto; border-top: 1px solid var(--line); }
.footer { background: var(--ink); color: #CFC5B8; padding: 56px 0 120px; text-align: center; }
.logo--footer { color: var(--paper); }
.logo--footer .logo__en { color: #9C9087; }
.footer__note { margin-top: 20px; font-size: 12px; line-height: 1.8; }
.footer__copy { margin-top: 12px; font-size: 11px; color: #8F857C; }

/* ---------- スマホの固定ボタン ---------- */
.fixed-cta { display: none; }

/* ---------- 表示のアニメーション（JS が動く時だけ隠す） ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   タブレット
   ========================================================= */
@media (max-width: 1100px) {
  .gnav ul { display: none; }
  /* ファーストビューは左右を半々にして、文字の側を広くする */
  .fv { grid-template-columns: 1fr 1fr; }
  .fv__body { padding-inline: 28px; gap: 16px; }
  .fv .btn--lg { padding: 16px 28px; white-space: nowrap; }
  .worries__list { grid-template-columns: repeat(2, 1fr); }
  .points__list li { flex-basis: calc((100% - 24px) / 2); }
  .flow__list { grid-template-columns: repeat(2, 1fr); }
  .flow__list li:nth-child(2)::after { display: none; }
}

/* =========================================================
   スマホ
   ========================================================= */
@media (max-width: 767px) {
  :root { --header-h: 60px; }
  body { font-size: 15px; }
  .sp { display: inline; }
  .section { padding: 72px 0; }
  .container { width: calc(100% - 40px); }
  .heading { margin-bottom: 36px; font-size: 24px; letter-spacing: .06em; }
  .section__lead { margin: -12px auto 32px; text-align: left; }
  .sample-bar { font-size: 11px; text-align: left; }

  .header__inner { width: calc(100% - 32px); gap: 12px; }
  .logo__mark { width: 30px; height: 30px; }
  .logo__name { font-size: 18px; }
  .header__tel { display: none; }
  .gnav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    padding: 8px 24px 28px;
    box-shadow: 0 12px 24px rgba(42, 37, 33, .12);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .gnav.is-open { opacity: 1; transform: none; visibility: visible; }
  .gnav ul { display: block; font-size: 16px; }
  .gnav ul li { border-bottom: 1px solid var(--line); }
  .gnav ul a { display: block; padding: 16px 4px; background: none; }
  .gnav__cta { margin-top: 20px; padding: 14px; font-size: 16px; }
  .menu-btn {
    display: block;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    position: relative;
    cursor: pointer;
  }
  .menu-btn span { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
  .menu-btn span:nth-child(1) { top: 15px; }
  .menu-btn span:nth-child(2) { top: 21px; }
  .menu-btn span:nth-child(3) { top: 27px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .fv { grid-template-columns: 1fr; min-height: 0; }
  .fv__photo { order: 1; aspect-ratio: 4 / 3.4; }
  .fv__photo img { object-position: 30% 50%; }
  .fv__body { order: 2; grid-template-columns: 1fr; padding: 0 20px 48px; }
  .fv__catch {
    grid-column: 1;
    grid-row: 1;
    justify-self: stretch;
    writing-mode: horizontal-tb;
    font-size: clamp(28px, 8.4vw, 36px);
    line-height: 1.45;
    letter-spacing: .06em;
    font-feature-settings: "palt";
    margin-top: -1.6em;           /* 写真に少しかぶせる */
    position: relative;
    background: var(--bg);
    padding: 18px 20px 0;
    margin-inline: -20px;
    width: fit-content;
    border-radius: 0 6px 0 0;
  }
  .fv__catch span + span { margin-top: 0; }
  .fv__lead { grid-row: 2; }
  .fv__tags { margin: 12px 0 22px; }
  .fv .btn--lg { width: 100%; }

  /* 悩みはスマホでは1列にして、行の途中で折れないようにする */
  .worries__list { grid-template-columns: 1fr; gap: 12px; }
  .worries__list li { padding: 16px 18px 16px 48px; text-align: left; font-size: 15px; }
  .worries__list li br { display: none; }
  .worries__list li::before { content: ""; position: absolute; left: 18px; top: 50%; width: 16px; height: 16px; translate: 0 -50%; border-radius: 50%; border: 2px solid var(--wood-l); }
  .worries__list li::after { left: 36px; }
  .worries__answer { margin-top: 44px; font-size: 18px; letter-spacing: .04em; line-height: 1.8; }

  .points__list { gap: 0; }
  .points__list li { flex-basis: 100%; padding: 24px 0 20px; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; }
  .points__num { font-size: 32px; grid-row: span 2; }
  .points__list h3 { margin: 0 0 6px; font-size: 19px; }

  .feature, .feature--rev { grid-template-columns: 1fr; gap: 24px; }
  .feature--rev .feature__photo { order: 0; }
  .feature + .feature { margin-top: 64px; }
  .feature__num { font-size: 48px; }

  .works__list { grid-template-columns: 1fr; gap: 32px; }

  .flow__list { grid-template-columns: 1fr; gap: 28px; }
  .flow__list li:not(:last-child)::after { display: block; top: auto; bottom: -20px; right: 50%; transform: translateX(50%) rotate(135deg); }
  .flow__list li:nth-child(2)::after { display: block; }
  .event div, .company__list div { grid-template-columns: 1fr; gap: 2px; padding: 14px 2px; }

  .faq__list summary { padding: 18px 40px 18px 36px; }
  .faq__list details p { padding: 0 8px 20px 36px; }

  .form { padding: 32px 20px; }
  .form__cols { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .form__cols .form__row:first-child { grid-column: 1 / -1; }

  .fixed-cta {
    display: grid;
    grid-template-columns: 1fr 2fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    background: rgba(255, 253, 248, .96);
    box-shadow: 0 -4px 16px rgba(42, 37, 33, .1);
    transform: translateY(110%);
    transition: transform .3s;
  }
  .fixed-cta.is-show { transform: none; }
  .fixed-cta a { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 15px; }
  .fixed-cta__tel { border: 1.5px solid var(--ink); }
  .fixed-cta__reserve { background: var(--accent); color: #fff; }
}
