:root {
  --ink: #1d2a2e;
  --sub: #5d696c;
  --line: #dcdad3;
  --tint: #f5f4ef;
  --green: #2f6f62;
  --serif: "Cormorant Garamond", "Zen Kaku Gothic New", serif;
  --body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { background: #fff; color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 2; letter-spacing: .03em; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol { list-style: none; padding: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.5; letter-spacing: .05em; }
h2 { font-size: clamp(24px, 2.5vw, 36px); }
h3 { font-size: clamp(18px, 1.5vw, 21px); }
.eyebrow { font-family: var(--serif); font-size: 17px; letter-spacing: .1em; color: var(--green); margin-bottom: 10px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: clamp(70px, 10vw, 150px) clamp(20px, 5vw, 60px); }
.tint { background: var(--tint); }
.two { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(28px, 6vw, 90px); }
.sticky { position: sticky; top: 110px; align-self: start; }
.sec-head { margin-bottom: clamp(30px, 5vw, 60px); }
.side > p:last-child:not(.eyebrow) { margin-top: 14px; color: var(--sub); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } .sticky { position: static; } }

/* 少しだけ浮き上がって現れる */
.js [data-show] { opacity: 0; transform: translateY(12px); transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js [data-show].in { opacity: 1; transform: none; }

/* 開く時の白い幕 */
#veil { position: fixed; inset: 0; z-index: 100; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: transform .5s cubic-bezier(.7, 0, .2, 1); transform-origin: top; }
html:not(.js) #veil { display: none; }
#veil.up { transform: scaleY(0); }
#veil p { font-family: var(--serif); letter-spacing: .28em; font-size: 15px; transition: opacity .2s; }
#veil.up p, #veil.up span { opacity: 0; }
#veil span { display: flex; gap: 6px; }
#veil i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); animation: dot 1s infinite; }
#veil i:nth-child(2) { animation-delay: .15s; }
#veil i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .15; } }

/* 上の帯 */
#head { position: fixed; left: 0; right: 0; top: 0; z-index: 50; height: 72px; display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); padding: 0 clamp(16px, 3vw, 36px); background: #ffffffe6; backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .3s; }
#head.line { border-color: var(--line); }
.logo { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.logo b { font-weight: 500; font-size: 20px; letter-spacing: .12em; }
.logo small { font-family: var(--serif); font-size: 10px; letter-spacing: .18em; color: var(--sub); }
#head nav { display: flex; gap: clamp(12px, 1.6vw, 24px); font-size: 13px; }
#head nav a { position: relative; }
#head nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .35s; }
#head nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.tel { display: flex; flex-direction: column; font-family: var(--serif); font-size: 21px; line-height: 1.1; white-space: nowrap; }
.tel small { font-family: var(--body); font-size: 10px; color: var(--sub); }
.btn { display: inline-block; padding: 11px 20px; background: var(--green); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .3s; }
.btn:hover { background: var(--ink); }
.btn.wide { display: block; text-align: center; padding: 16px; font-size: 15px; margin-top: 18px; }
@media (max-width: 1120px) { #head nav { display: none; } }
@media (max-width: 680px) { #head { height: 60px; } #head .tel, #head .btn { display: none; } }

/* 最初の画面 */
#hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; padding: 72px 10px 10px; overflow: hidden; }
.hero-photo { position: relative; height: 100%; overflow: hidden; }
.hero-photo img { height: 112%; margin-top: -6%; }
.hero-copy { position: absolute; left: clamp(26px, 5vw, 76px); top: clamp(110px, 20vh, 190px); }
.hero-copy h1 { font-size: clamp(34px, 4.7vw, 74px); font-weight: 400; line-height: 1.34; }
.rise { display: block; overflow: hidden; }
.rise span { display: block; transform: translateY(105%); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.rise + .rise span { transition-delay: .14s; }
.ready .rise span { transform: none; }
.hero-sub { word-break: keep-all; margin-top: 18px; max-width: 17em; font-size: clamp(14px, 1.2vw, 16px); opacity: 0; transition: opacity 1s .7s; }
.ready .hero-sub { opacity: 1; }
.hero-inset { position: absolute; right: clamp(24px, 4vw, 60px); bottom: clamp(30px, 6vh, 56px); width: clamp(120px, 15vw, 220px); aspect-ratio: 3 / 4; overflow: hidden; background: #ddd; box-shadow: 0 16px 40px #0002; }
.hero-inset img { position: absolute; inset: 0; opacity: 0; }
.hero-inset img.on { opacity: 1; animation: pull 5s linear forwards; }
@keyframes pull { from { transform: scale(1.5); } to { transform: scale(1); } }
.hero-down { position: absolute; left: clamp(26px, 5vw, 76px); bottom: 34px; font-family: var(--serif); font-size: 15px; padding-right: 54px; }
.hero-down::after { content: ""; position: absolute; right: 0; top: 50%; width: 42px; height: 1px; background: var(--ink); animation: draw 2.2s infinite; transform-origin: left; }
@keyframes draw { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); transform-origin: left; } 56% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
.hero-line { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; }

/* 数字 */
#numbers { padding-top: clamp(50px, 7vw, 90px); padding-bottom: clamp(50px, 7vw, 90px); }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); }
.nums > div { padding: 4px clamp(10px, 2.4vw, 34px); border-left: 1px solid var(--line); }
.nums > div:first-child { border-left: 0; padding-left: 0; }
.nums dt { font-size: 13px; color: var(--sub); }
.nums dd { margin: 0; font-size: 15px; white-space: nowrap; }
.nums b { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.8vw, 68px); line-height: 1.2; margin-right: 3px; }
@media (max-width: 680px) { .nums { grid-template-columns: 1fr 1fr; row-gap: 22px; } .nums > div:nth-child(3) { border-left: 0; padding-left: 0; } }

/* 約束 */
.lead { font-size: clamp(18px, 1.7vw, 23px); line-height: 2; margin-bottom: clamp(30px, 4vw, 54px); }
.promise li { display: grid; grid-template-columns: 72px 1fr; padding: 26px 0; border-top: 1px solid var(--line); }
.promise li:last-child { border-bottom: 1px solid var(--line); }
.promise b { font-family: var(--serif); font-weight: 400; font-size: 28px; color: var(--green); line-height: 1.3; }
.promise p { color: var(--sub); margin-top: 4px; font-size: 15px; }

/* 工事内容・事例の写真 */
.zoom { overflow: hidden; aspect-ratio: 4 / 3; background: #e6e4dd; }
.zoom img { transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
a:hover .zoom img { transform: scale(1.04); }
.cards { display: grid; gap: clamp(34px, 4vw, 60px); }
.card h3 { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.card h3 i { position: relative; width: 42px; height: 1px; background: var(--ink); transition: width .35s; }
.card h3 i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transform: rotate(45deg); }
.card:hover h3 i { width: 62px; }
.card p { color: var(--sub); font-size: 15px; }

/* 診断：写真が広がる */
#inspect { position: relative; height: 170vh; }
.grow { position: sticky; top: 72px; height: calc(100vh - 72px); overflow: hidden; clip-path: inset(var(--c, 18%) var(--c2, 22%)); }
.inspect-copy { position: sticky; top: 60vh; margin: -36vh 0 0 clamp(20px, 7vw, 100px); width: min(610px, calc(100% - 40px)); padding: clamp(20px, 3vw, 36px); background: #fff; opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 12px)); }
.inspect-copy p:last-child { font-size: 15px; color: var(--sub); margin-top: 8px; }

/* 施工前後 */
.ba { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e6e4dd; margin-bottom: clamp(30px, 5vw, 60px); --x: 50%; }
.ba > img { position: absolute; inset: 0; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; touch-action: pan-y; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: #fff; pointer-events: none; }
.ba-handle::after { content: "◂ ▸"; position: absolute; top: 50%; left: -26px; width: 54px; height: 54px; margin-top: -27px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; font-size: 12px; box-shadow: 0 6px 18px #0003; }
.ba-tag { position: absolute; top: 14px; padding: 3px 12px; background: #000a; color: #fff; font-size: 12px; pointer-events: none; }
.ba-tag.l { left: 14px; }
.ba-tag.r { right: 14px; }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 34px); }
.works p { margin-top: 10px; font-size: 15px; }
.works small { display: block; color: var(--sub); font-size: 12px; }
@media (max-width: 680px) { .works { grid-template-columns: 1fr; } }

/* 費用 */
.size { display: inline-flex; border: 1px solid var(--ink); margin-bottom: 26px; }
.size button { padding: 7px 26px; font-size: 14px; transition: background .25s, color .25s; }
.size button.on { background: var(--ink); color: #fff; }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.prices article { position: relative; background: #fff; padding: clamp(24px, 3vw, 44px) clamp(16px, 2.4vw, 34px); }
.prices .pick { box-shadow: inset 0 3px 0 var(--green); }
.prices span { position: absolute; top: 12px; right: 14px; font-size: 11px; color: var(--green); }
.yen { margin: 8px 0 2px; font-size: 15px; }
.yen b { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 4.6vw, 64px); line-height: 1.2; margin-right: 3px; }
.prices article > p:last-child { font-size: 13px; color: var(--sub); }
.note { margin-top: 14px; font-size: 13px; color: var(--sub); }
@media (max-width: 680px) { .prices { grid-template-columns: 1fr; } }

/* 流れ */
.flow { position: relative; padding-left: 34px; }
.flow::before, .flow::after { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.flow::after { background: var(--green); transform: scaleY(var(--f, 0)); transform-origin: top; width: 2px; }
.flow li { position: relative; padding-bottom: clamp(26px, 3.4vw, 44px); }
.flow li:last-child { padding-bottom: 0; }
.flow li::before { content: ""; position: absolute; left: -34px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); z-index: 1; }
.flow p { color: var(--sub); font-size: 15px; }

/* 質問 */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 15px; height: 1px; background: var(--ink); transition: transform .3s; }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: none; }
.faq details p { padding: 0 0 20px; color: var(--sub); font-size: 15px; }

/* 相談 */
#contact { position: relative; min-height: 86vh; display: flex; align-items: center; justify-content: flex-end; padding: clamp(40px, 6vw, 80px) clamp(20px, 7vw, 100px); overflow: hidden; }
.contact-bg { position: absolute; inset: 0; }
.contact-box { position: relative; width: min(560px, 100%); padding: clamp(26px, 3.4vw, 46px); background: #fff; }
.tel-big { display: block; font-family: var(--serif); font-size: clamp(38px, 4vw, 52px); line-height: 1.3; margin-top: 12px; }
.contact-box small { color: var(--sub); }

/* 会社概要 */
.company > div { display: grid; grid-template-columns: 9em 1fr; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.company > div:last-child { border-bottom: 1px solid var(--line); }
.company dt { color: var(--sub); }
.company dd { margin: 0; }

#foot { display: flex; justify-content: space-between; align-items: center; padding: 26px clamp(20px, 5vw, 60px); background: var(--ink); color: #fff; font-size: 13px; }
#foot b { font-weight: 500; }
#dock { display: none; }
@media (max-width: 680px) {
  #dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; }
  #dock a { padding: 14px; text-align: center; font-weight: 500; background: var(--ink); color: #fff; font-size: 14px; }
  #dock a + a { background: var(--green); }
  #foot { padding-bottom: 76px; }
  .hero-down { display: none; }
  #hero { display: flex; flex-direction: column; padding: 60px 0 0; height: auto; min-height: 0; }
  .hero-copy { position: static; order: 0; padding: 26px 20px 24px; }
  .hero-sub { max-width: none; }
  .hero-photo { order: 1; height: 58vh; flex: none; }
  .hero-inset { bottom: 62px; right: 14px; width: 104px; }
  .hero-line { left: 0; right: 0; bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-inset img.on, .hero-down::after, #veil i { animation: none; }
  .js [data-show], .rise span { transition: none; }
}
