/* 槌音建設 ─ デモサイト */
:root {
  --con: #D7D6D1;     /* 打ち放しの灰：地 */
  --con-2: #CACAC4;   /* 一段沈んだ地 */
  --paper: #E6E5E1;   /* 図面の紙 */
  --ink: #1B1D1F;     /* 墨 */
  --ink-2: #56595C;   /* 鉛筆 */
  --dark: #1F2225;    /* 夜の現場 */
  --sugi: #B68552;    /* 房州杉 */
  --shu: #C23A2B;     /* 朱墨：寸法線だけに使う */
  --line: rgba(27, 29, 31, .18);

  --display: "Dela Gothic One", "Hiragino Sans", sans-serif;
  --sans: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;

  --fs-0: .8125rem;
  --fs-1: 1rem;
  --fs-2: 1.25rem;
  --fs-3: 1.5625rem;
  --fs-4: clamp(2.2rem, 1.2rem + 4vw, 5.2rem);
  --fs-hero: clamp(2.3rem, 1rem + 3.9vw, 5rem);

  --gut: clamp(16px, 4vw, 60px);
  --gap: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.22, .61, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--con); color: var(--ink); font-family: var(--sans); font-size: var(--fs-1); line-height: 1.85; letter-spacing: .02em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--sugi); color: #fff; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ───── バー ───── */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 14px var(--gut); transition: background-color .4s, box-shadow .4s, padding .4s; }
.bar.is-solid { background: rgba(215, 214, 209, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); padding-block: 10px; }
.bar__mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.25rem; letter-spacing: .08em; }
.bar__mark svg { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.bar__mark svg .r { stroke: var(--shu); }
.bar__nav { display: flex; gap: 24px; margin-left: 10px; font-size: var(--fs-0); font-weight: 500; }
.bar__nav a { text-decoration: none; padding: 6px 0; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.bar__nav a:hover { background-size: 100% 2px; }
.bar__tel { margin-left: auto; display: grid; text-align: right; line-height: 1.25; font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.bar__tel small { font-weight: 400; font-size: .6875rem; color: var(--ink-2); letter-spacing: .02em; }
.bar__cta { text-decoration: none; font-weight: 700; font-size: var(--fs-0); letter-spacing: .1em; padding: 11px 20px; background: var(--ink); color: var(--con); transition: background-color .3s; }
.bar__cta:hover { background: var(--sugi); }

/* ───── 家ができるまで ───── */
.build { position: relative; background: var(--paper); }
.build__pin { position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background-image:
    linear-gradient(rgba(27,29,31,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,29,31,.06) 1px, transparent 1px),
    linear-gradient(rgba(27,29,31,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,29,31,.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.build__cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.build__title { position: absolute; left: var(--gut); top: clamp(96px, 14vh, 140px); z-index: 2; }
.build__title h1 { font-family: var(--display); font-weight: 400; font-size: var(--fs-hero); line-height: 1.12; letter-spacing: .02em; }
.t-l { display: block; }
.t-l .ch { display: inline-block; }
.build__title p { margin-top: 22px; font-size: .9375rem; color: var(--ink-2); max-width: 30em; }

.steps { position: absolute; left: var(--gut); bottom: clamp(30px, 6vh, 64px); width: min(380px, 40vw); z-index: 2; }
.steps li { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.steps li.is-on { opacity: 1; transform: none; pointer-events: auto; }
.steps__no { display: block; font-size: .75rem; font-weight: 500; color: var(--ink-2); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.steps h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.2; letter-spacing: .04em; margin: 6px 0 4px; }
.steps__d { display: inline-block; font-weight: 700; font-size: .875rem; padding: 1px 10px; border: 1.5px solid var(--ink); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.steps li > p:last-child { font-size: .9375rem; color: var(--ink-2); }

.ruler { position: absolute; right: var(--gut); top: 50%; transform: translateY(-50%); height: 56vh; width: 2px; background: var(--line); z-index: 2; }
.ruler::before { content: ""; position: absolute; inset: 0 -6px; background: repeating-linear-gradient(180deg, var(--ink-2) 0 1px, transparent 1px 20%); opacity: .5; width: 14px; left: -6px; }
.ruler__fill { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--ink); }
.ruler__day { position: absolute; right: 14px; top: 0; transform: translateY(-50%); white-space: nowrap; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.build__hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: .75rem; color: var(--ink-2); letter-spacing: .1em; z-index: 2; }

/* ───── 見出しの共通 ───── */
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { grid-column: 1 / 7; font-family: var(--display); font-weight: 400; font-size: var(--fs-4); line-height: 1.1; letter-spacing: .04em; }
.sec-head p { grid-column: 8 / 13; font-size: .9375rem; color: var(--ink-2); max-width: 32em; }
.sec-head--dark p { color: rgba(215,214,209,.7); }

/* ───── 仕事 ───── */
.work { padding: clamp(100px, 12vw, 180px) var(--gut); }
.work__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); }
.work__list li { border-top: 6px solid var(--ink); padding-top: 22px; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.work__list h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 1rem + 1.4vw, 2.2rem); line-height: 1.2; letter-spacing: .04em; }
.work__list p { font-size: .9375rem; color: var(--ink-2); }
.work__fig { padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; color: var(--ink) !important; font-size: .875rem !important; }

/* ───── 施工事例 ───── */
.cases { background: var(--dark); color: var(--con); padding: clamp(100px, 12vw, 180px) var(--gut); }
.cases__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(56px, 7vw, 110px); align-items: start; }
.case--a { grid-column: 1 / 8; }
.case--b { grid-column: 9 / 13; margin-top: clamp(40px, 10vw, 160px); }
.case--c { grid-column: 2 / 6; }
.case--d { grid-column: 7 / 13; margin-top: clamp(30px, 6vw, 100px); }
.case__ph { position: relative; margin: 30px 30px 18px 0; }
.case__ph img { width: 100%; object-fit: cover; filter: saturate(.85); }
.case--a .case__ph img { aspect-ratio: 3 / 2; }
.case--b .case__ph img { aspect-ratio: 4 / 5; }
.case--c .case__ph img { aspect-ratio: 4 / 3; }
.case--d .case__ph img { aspect-ratio: 16 / 10; }
/* 寸法線 */
.case__ph::before, .case__ph::after { position: absolute; color: var(--shu); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .4s var(--ease), transform .5s var(--ease); pointer-events: none; }
.case__ph::before {
  content: attr(data-w); left: 0; right: 0; top: -26px; height: 14px; text-align: center; line-height: 1;
  border-left: 1px solid var(--shu); border-right: 1px solid var(--shu);
  background: linear-gradient(var(--shu), var(--shu)) 0 100% / 100% 1px no-repeat;
  transform: translateY(6px);
}
.case__ph::after {
  content: attr(data-h); top: 0; bottom: 0; right: -30px; width: 14px; writing-mode: vertical-rl; text-align: center; line-height: 1;
  border-top: 1px solid var(--shu); border-bottom: 1px solid var(--shu);
  background: linear-gradient(var(--shu), var(--shu)) 0 0 / 1px 100% no-repeat;
  transform: translateX(-6px);
}
.case:hover .case__ph::before, .case:hover .case__ph::after, .case:focus-within .case__ph::before, .case:focus-within .case__ph::after { opacity: 1; transform: none; }
.case h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); letter-spacing: .04em; margin-bottom: 10px; }
.case dl { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; column-gap: 28px; font-size: .8125rem; }
.case dt { color: rgba(215,214,209,.55); font-size: .6875rem; }
.case dd { font-variant-numeric: tabular-nums; }

/* ───── 職人 ───── */
.craft { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; min-height: 92vh; color: #F1F0EC; }
.craft__ph { position: absolute; inset: 0; overflow: hidden; }
.craft__ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) brightness(.62); }
.craft__ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,22,24,.72), rgba(20,22,24,.2) 70%), linear-gradient(0deg, rgba(20,22,24,.5), transparent 50%); }
.craft__txt { position: relative; grid-column: 2 / 8; padding: clamp(80px, 10vw, 140px) 0; display: grid; gap: 18px; }
.craft h2 { font-family: var(--display); font-weight: 400; font-size: var(--fs-4); line-height: 1.2; letter-spacing: .04em; }
.craft p { max-width: 30em; font-size: 1rem; text-shadow: 0 1px 12px rgba(0,0,0,.35); }

/* ───── 家づくりの流れ ───── */
.flow { padding: clamp(100px, 12vw, 180px) var(--gut); }
.flow__list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 2px; counter-reset: f; }
.flow__list li { background: var(--paper); padding: 22px 18px 20px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; position: relative; }
.flow__list li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 30px; width: 16px; height: 16px; background: var(--paper); clip-path: polygon(0 0, 100% 50%, 0 100%); z-index: 1; }
.flow__n { font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--sugi); }
.flow__list h3 { font-weight: 700; font-size: 1.0625rem; letter-spacing: .06em; }
.flow__list p { font-size: .8125rem; color: var(--ink-2); line-height: 1.8; }
.flow__t { font-size: .75rem; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.flow__list li:nth-child(5) { background: var(--ink); color: var(--con); }
.flow__list li:nth-child(5)::after { background: var(--ink); }
.flow__list li:nth-child(5) p { color: rgba(215,214,209,.72); }
.flow__list li:nth-child(5) .flow__t { border-color: rgba(215,214,209,.25); }

/* ───── 見学会・相談 ───── */
.contact { background: var(--con-2); padding: clamp(100px, 12vw, 180px) var(--gut); }
.contact__grid { max-width: 980px; }
.cf { display: grid; gap: 28px; }
.cf__kind legend, .cf__label { font-size: .8125rem; font-weight: 700; margin-bottom: 10px; letter-spacing: .06em; }
.seg { display: flex; flex-wrap: wrap; border: 1.5px solid var(--ink); width: fit-content; max-width: 100%; }
.seg__b { border: 0; background: transparent; padding: 12px 20px; cursor: pointer; font-weight: 500; font-size: .9375rem; transition: background-color .25s, color .25s; }
.seg__b + .seg__b { border-left: 1.5px solid var(--ink); }
.seg__b:hover { background: rgba(27,29,31,.07); }
.seg__b.is-on { background: var(--ink); color: var(--con); }
.ev__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.evc { background: var(--paper); padding: 18px; display: grid; gap: 10px; align-content: start; border-top: 4px solid var(--ink); }
.evc__d { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.evc__d small { font-family: var(--sans); font-size: .8125rem; font-weight: 700; margin-left: 4px; }
.evc__t { font-weight: 700; font-size: .9375rem; }
.evc__p { font-size: .75rem; color: var(--ink-2); }
.times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tm { border: 1.5px solid var(--ink); background: transparent; padding: 4px 12px; font-size: .8125rem; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s; }
.tm:hover:not(:disabled) { background: rgba(27,29,31,.08); }
.tm:disabled { opacity: .3; text-decoration: line-through; cursor: not-allowed; }
.tm.is-on { background: var(--ink); color: var(--con); }
.cf__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.field { display: grid; gap: 4px; font-size: .8125rem; font-weight: 500; }
.field--w { grid-column: 1 / -1; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--ink); background: var(--paper); padding: 11px 12px; font-size: 1rem; font-weight: 400; border-radius: 0; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--ink); }
.field [aria-invalid="true"] { border-color: var(--shu); box-shadow: 4px 4px 0 var(--shu); }
.cf__err { color: var(--shu); font-weight: 700; font-size: .875rem; }
.cf__foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta { border: 0; background: var(--ink); color: var(--con); padding: 18px 34px; font-weight: 700; font-size: 1rem; letter-spacing: .1em; cursor: pointer; box-shadow: 6px 6px 0 var(--sugi); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.cta:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--sugi); }
.cta:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--sugi); }
.cta--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.cta--ghost:hover { box-shadow: none; background: var(--ink); color: var(--con); transform: none; }
.cf__fine { font-size: .75rem; color: var(--ink-2); max-width: 30em; }
.cf__done { background: var(--paper); padding: clamp(28px, 4vw, 48px); display: grid; gap: 16px; justify-items: start; max-width: 640px; border-top: 6px solid var(--ink); }
.cf__done svg { width: 120px; height: 60px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
.cf__done svg .r { stroke: var(--shu); }
.cf__done:not([hidden]) svg { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cf__done h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: .04em; }

/* ───── 会社概要 ───── */
.company { padding: clamp(100px, 12vw, 180px) var(--gut); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.company h2 { grid-column: 1 / 5; font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); letter-spacing: .04em; }
.co { grid-column: 5 / 13; border-top: 2px solid var(--ink); }
.co div { display: grid; grid-template-columns: 8em 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.co dt { font-weight: 700; font-size: .8125rem; padding-top: 2px; }

/* ───── フッター ───── */
.foot { background: var(--ink); color: var(--con); padding: clamp(64px, 8vw, 110px) var(--gut) 34px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; align-items: end; }
.foot__mark { grid-column: 1 / 7; font-family: var(--display); font-size: clamp(3rem, 1.6rem + 6vw, 7.6rem); line-height: 1; letter-spacing: .02em; }
.foot__demo { grid-column: 8 / 13; font-size: var(--fs-0); color: rgba(215,214,209,.78); line-height: 1.95; }
.foot__credit { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(215,214,209,.16); font-size: .6875rem; color: rgba(215,214,209,.5); }

/* ───── 画面幅ごと ───── */
@media (max-width: 1100px) {
  .bar__tel { display: none; }
  .bar__cta { margin-left: auto; }
  .flow__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2px; }
  .flow__list li:nth-child(3)::after { display: none; }
  .ev__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .bar__nav { display: none; }
  .work__list { grid-template-columns: 1fr 1fr; row-gap: 48px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 62px; }
  .bar { padding-block: 10px; gap: 12px; }
  .bar__mark span { font-size: 1.0625rem; }
  .bar__cta { padding: 9px 14px; }
  .build__title { top: 76px; right: var(--gut); }
  .build__title p { display: none; }
  .steps { width: auto; right: var(--gut); bottom: 24px; }
  .steps li > p:last-child { font-size: .875rem; }
  .ruler { display: none; }
  .build__hint { display: none; }

  .sec-head { grid-template-columns: 1fr; row-gap: 14px; }
  .sec-head h2, .sec-head p { grid-column: 1; }
  .work__list { grid-template-columns: 1fr; row-gap: 40px; }
  .cases__grid { grid-template-columns: 1fr; }
  .case--a, .case--b, .case--c, .case--d { grid-column: 1; margin-top: 0; }
  .case--b, .case--d { width: 82%; justify-self: end; }
  .case dl { grid-template-columns: repeat(2, auto); row-gap: 6px; }
  .case__ph::before, .case__ph::after { opacity: 1; transform: none; }
  .craft { min-height: 0; }
  .craft__txt { grid-column: 1 / -1; padding: 120px var(--gut) 56px; }
  .flow__list { grid-template-columns: 1fr; }
  .flow__list li::after { display: none !important; }
  .ev__list { grid-template-columns: 1fr; }
  .seg { width: 100%; }
  .seg__b { flex: 1 1 50%; padding: 12px 10px; }
  .seg__b + .seg__b { border-left: 0; }
  .seg__b:nth-child(even) { border-left: 1.5px solid var(--ink); }
  .seg__b:nth-child(n+3) { border-top: 1.5px solid var(--ink); }
  .cf__fields { grid-template-columns: 1fr; }
  .company { grid-template-columns: 1fr; row-gap: 24px; }
  .company h2, .co { grid-column: 1; }
  .co div { grid-template-columns: 5.5em 1fr; }
  .foot { grid-template-columns: 1fr; }
  .foot__mark, .foot__demo, .foot__credit { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .cf__done svg { stroke-dashoffset: 0; }
}
