/* ============================================================
   GLOSS LAB v2 — 京都・伏見の磨き工房
   色は「工房の灰白・墨・朱」の3つ。黒は写真の中の塗装に任せる。
   朱は漆の朱。予約ボタンと小さな印にだけ使う。
   ============================================================ */

:root {
  --bg: #efeeea;          /* 工房の壁・床の灰白 */
  --surface: #e4e2dc;     /* 一段沈んだ面 */
  --paper: #f7f6f3;       /* 浮いた面（表・カード） */
  --ink: #1d1e20;         /* 墨（純黒は使わない） */
  --ink-sub: #5d5e5b;
  --line: rgba(29, 30, 32, .14);
  --shu: #b5452b;         /* 漆の朱 */
  --shu-deep: #9a3922;
  --on-shu: #f8f3ec;

  --font-head: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;

  --header-h: 76px;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 2.1; letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--pad);
  background: rgba(239, 238, 234, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .4s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.logo { text-decoration: none; display: grid; line-height: 1.2; }
.logo__name { font-family: var(--font-head); font-weight: 600; font-size: 21px; letter-spacing: .26em; }
.logo__sub { font-size: 10.5px; letter-spacing: .24em; color: var(--ink-sub); margin-top: 3px; }
.gnav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.gnav a { font-size: 13.5px; letter-spacing: .12em; text-decoration: none; position: relative; padding: 4px 0; }
.gnav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.gnav a:not(.btn):hover::after, .gnav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-button { display: none; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 30px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--font-body); font-weight: 500; font-size: 14px; letter-spacing: .14em; text-decoration: none; cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--shu { background: var(--shu); border-color: var(--shu); color: var(--on-shu); }
.btn--shu:hover { background: var(--shu-deep); border-color: var(--shu-deep); color: var(--on-shu); }
.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- 見出しの部品 ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-family: var(--font-head); font-size: 12.5px; letter-spacing: .32em; color: var(--ink-sub); }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--shu); }   /* 朱の小さな印 */
.h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.55; letter-spacing: .08em; margin: 0 0 28px; }
.lead { font-size: 15.5px; line-height: 2.2; max-width: 34em; margin: 0; }
.section { padding: clamp(80px, 11vw, 150px) var(--pad); }
.section--surface { background: var(--surface); }
.inner { max-width: 1240px; margin: 0 auto; }

/* ============================================================
   磨き（polish）：濁った写真の上に澄んだ写真を重ね、
   斜めの境目より左だけ澄んだ写真を見せる。境目を右へ動かすと「磨けていく」。
   境目には柔らかい光の帯をのせる。--p は 0〜100（%）。
   ============================================================ */
.polish { position: relative; overflow: hidden; background: var(--surface); --p: -12; isolation: isolate; }
.polish img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.polish__after {
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--p) * 1% - 7%), transparent calc(var(--p) * 1% + 3%));
          mask-image: linear-gradient(100deg, #000 calc(var(--p) * 1% - 7%), transparent calc(var(--p) * 1% + 3%));
}
.polish__light {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(100deg,
    transparent calc(var(--p) * 1% - 9%),
    rgba(255, 255, 255, .10) calc(var(--p) * 1% - 4%),
    rgba(255, 255, 255, .55) calc(var(--p) * 1% - 1%),
    rgba(255, 255, 255, .10) calc(var(--p) * 1% + 2%),
    transparent calc(var(--p) * 1% + 6%));
  opacity: var(--light, 1);
}
.polish.is-done .polish__light { opacity: 0; transition: opacity .8s; }
.polish__note { position: absolute; right: 14px; bottom: 10px; z-index: 2; font-size: 10.5px; letter-spacing: .1em; color: rgba(255,255,255,.75); text-shadow: 0 1px 6px rgba(0,0,0,.4); }

/* ---------- FV ---------- */
.hero {
  display: grid; grid-template-columns: minmax(500px, 5fr) 7fr;
  min-height: calc(100svh - var(--header-h));
}
.hero__text { display: flex; flex-direction: column; justify-content: flex-end; padding: 40px var(--pad) clamp(48px, 8vh, 96px); }
.hero__title { font-family: var(--font-head); font-weight: 600; font-size: clamp(34px, 3.9vw, 58px); white-space: nowrap; line-height: 1.38; letter-spacing: .06em; margin: 0 0 26px; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.is-ready .hero__title .line span { transform: none; }
.is-ready .hero__title .line:nth-child(2) span { transition-delay: .09s; }
.hero__sub { font-size: 14.5px; line-height: 2.1; margin: 0 0 32px; color: var(--ink-sub); opacity: 0; transition: opacity 1s .5s; }
.is-ready .hero__sub { opacity: 1; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; transition: opacity 1s .7s; }
.is-ready .hero__actions { opacity: 1; }
.hero .polish { min-height: 520px; }

/* ---------- 物語（漆） ---------- */
.story { display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: center; }
.story__photo { grid-column: 1; aspect-ratio: 4 / 5; overflow: hidden; }
.story__text { grid-column: 3; }
.story__sign { margin-top: 28px; font-family: var(--font-head); font-size: 14px; letter-spacing: .14em; color: var(--ink-sub); }

/* ---------- ものさし（スクロールで磨く） ---------- */
.measure { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(28px, 5vw, 80px); align-items: end; }
.measure .polish { aspect-ratio: 16 / 9; }
.measure__hint { font-size: 12px; letter-spacing: .14em; color: var(--ink-sub); margin-top: 14px; }

/* ---------- 工程（要約と詳細） ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px) clamp(20px, 2.4vw, 36px); }
.step__photo { aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 18px; background: var(--surface); }
.step__num { font-family: var(--font-head); font-size: 13px; letter-spacing: .2em; color: var(--shu); }
.step__en { font-family: var(--font-head); font-size: 11.5px; letter-spacing: .26em; color: var(--ink-sub); margin-left: 10px; }
.step h3 { font-family: var(--font-head); font-weight: 600; font-size: 19px; letter-spacing: .08em; margin: 6px 0 8px; line-height: 1.6; }
.step p { margin: 0; font-size: 14px; line-height: 2; color: var(--ink); }

.process-list { list-style: none; margin: 0; padding: 0; }
.process-item { display: grid; grid-template-columns: 4fr 1fr 7fr; padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); align-items: start; }
.process-item .step__photo { grid-column: 1; margin: 0; }
.process-item__body { grid-column: 3; }
.process-item h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: .08em; margin: 10px 0 16px; line-height: 1.5; }
.standard { margin-top: 28px; padding: 22px 26px; background: var(--paper); border-left: 2px solid var(--shu); }
.standard__label { font-family: var(--font-head); font-size: 12px; letter-spacing: .28em; color: var(--shu); margin: 0 0 6px; }
.standard p { margin: 0; font-size: 14px; line-height: 2.05; }
.standard b { font-weight: 500; border-bottom: 1px solid var(--shu); }

/* ---------- ビフォーアフター（ドラッグで見比べる） ---------- */
.compare { position: relative; aspect-ratio: 16 / 10; overflow: hidden; user-select: none; touch-action: pan-y; --x: 50%; background: #222; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__before { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.compare__bar { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; background: rgba(255,255,255,.9); }
.compare__knob {
  position: absolute; top: 50%; left: var(--x); width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: var(--paper); color: var(--ink); display: grid; place-items: center; font-size: 13px; letter-spacing: .05em;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); pointer-events: none;
}
.compare__tag { position: absolute; top: 14px; z-index: 2; font-family: var(--font-head); font-size: 11.5px; letter-spacing: .28em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.compare__tag--before { left: 16px; } .compare__tag--after { right: 16px; }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.case { display: grid; grid-template-columns: 8fr 4fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.case + .case { margin-top: clamp(80px, 10vw, 140px); }
.case h3 { font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: .08em; margin: 0 0 16px; line-height: 1.6; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 20px; font-size: 13.5px; }
.spec dt { font-family: var(--font-head); color: var(--ink-sub); letter-spacing: .14em; }
.spec dd { margin: 0; }

/* ---------- メニュー ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan { padding: 36px clamp(20px, 2.4vw, 36px) 40px; position: relative; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan__en { font-family: var(--font-head); font-size: 12px; letter-spacing: .3em; color: var(--ink-sub); }
.plan h3 { font-family: var(--font-head); font-weight: 600; font-size: 24px; letter-spacing: .1em; margin: 6px 0 14px; }
.plan__price { font-family: var(--font-head); font-size: 30px; letter-spacing: .02em; margin: 0; }
.plan__price small { font-family: var(--font-body); font-size: 12px; color: var(--ink-sub); letter-spacing: .08em; margin-left: 6px; }
.plan p { font-size: 14px; line-height: 2; margin: 14px 0 0; }
.plan ul { margin: 16px 0 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 2.1; }
.plan li::before { content: "—  "; color: var(--ink-sub); }
.plan--pick { background: var(--paper); }
.plan__tag { position: absolute; top: -1px; right: 24px; background: var(--shu); color: var(--on-shu); font-size: 11.5px; letter-spacing: .14em; padding: 4px 12px; line-height: 1.6; }

/* ---------- 料金表 ---------- */
.price-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.price-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; background: var(--paper); }
.price-table th, .price-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table thead th { font-family: var(--font-head); font-weight: 600; letter-spacing: .1em; font-size: 14px; border-bottom: 1px solid var(--ink); }
.price-table thead th small { display: block; font-size: 11px; letter-spacing: .24em; color: var(--ink-sub); font-weight: 400; }
.price-table .is-pick { background: rgba(181, 69, 43, .05); }
.price-note { font-size: 13px; color: var(--ink-sub); margin: 14px 0 0; }

/* ---------- FAQ ---------- */
.faq-group + .faq-group { margin-top: 64px; }
.faq-group h2 { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: .1em; margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-family: var(--font-head); font-weight: 600; font-size: 16.5px; letter-spacing: .06em; line-height: 1.7; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; color: var(--shu); margin-right: 14px; font-size: 14px; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: translateY(-75%) rotate(45deg); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq .answer { padding: 0 0 26px 30px; font-size: 14.5px; line-height: 2.1; max-width: 46em; }
.faq .answer p { margin: 0; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 26px; max-width: 720px; }
.field label, .field legend { display: block; font-family: var(--font-head); font-weight: 600; font-size: 14.5px; letter-spacing: .08em; margin-bottom: 8px; padding: 0; }
.req { font-family: var(--font-body); font-weight: 500; font-size: 11px; color: var(--shu); margin-left: 8px; letter-spacing: .1em; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"], .field select, .field textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 0; transition: border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12.5px; color: var(--ink-sub); margin: 6px 0 0; line-height: 1.8; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; font-family: var(--font-body); font-weight: 400; font-size: 14px; letter-spacing: .04em; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: inline-block; padding: 9px 18px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: all .25s; }
.chips input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chips input:focus-visible + span { outline: 2px solid var(--shu); outline-offset: 2px; }
.form__done { display: none; padding: 28px; background: var(--paper); border-left: 2px solid var(--shu); }
.form.is-sent .form__done { display: block; }
.form.is-sent > :not(.form__done) { display: none; }

/* ---------- 工房案内・CTA ---------- */
.access { display: grid; grid-template-columns: 6fr 1fr 5fr; align-items: center; }
.access__photo { grid-column: 1; aspect-ratio: 3 / 2; overflow: hidden; }
.access__info { grid-column: 3; }
.info { display: grid; grid-template-columns: auto 1fr; margin: 0; border-top: 1px solid var(--line); }
.info dt, .info dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.9; }
.info dt { font-family: var(--font-head); padding-right: 26px; letter-spacing: .12em; color: var(--ink-sub); white-space: nowrap; }
.cta { text-align: center; padding: clamp(90px, 12vw, 160px) var(--pad); background: var(--surface); }
.cta .h2 { margin-bottom: 14px; }
.cta p { margin: 0 0 34px; font-size: 14.5px; color: var(--ink-sub); }

/* ---------- 下層ページの見出し ---------- */
.page-head { padding: clamp(56px, 8vw, 110px) var(--pad) clamp(40px, 5vw, 70px); }
.page-head h1 { font-family: var(--font-head); font-weight: 600; font-size: clamp(30px, 4vw, 52px); line-height: 1.45; letter-spacing: .07em; margin: 0 0 22px; }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: #d9d8d3; padding: 64px var(--pad) 32px; font-size: 13px; line-height: 2; }
.site-footer .logo__name { color: #f1f0ec; }
.site-footer .logo__sub { color: #9b9a95; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; max-width: 1240px; margin: 0 auto; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-note { max-width: 1240px; margin: 44px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11.5px; color: #9b9a95; line-height: 1.9; }

/* ---------- 出現と写真の動き ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.zoom img { transform: scale(1.06); transition: transform 1.6s var(--ease); }
.zoom.is-in img { transform: scale(1); }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- スマホ ---------- */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .gnav { display: none; }
  .header-cta { display: inline-flex; }
  .menu-button { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; }
  .menu-button span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease); }
  .menu-button[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(20deg); }
  .menu-button[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-20deg); }
  .gnav.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; padding: 40px var(--pad);
    background: var(--bg); z-index: 49;
  }
  .gnav.is-open a { font-family: var(--font-head); font-size: 22px; }
  .gnav.is-open .btn { font-family: var(--font-body); font-size: 15px; margin-top: 12px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero .polish { order: -1; min-height: 0; height: 58svh; }
  .hero__text { padding-top: 32px; padding-bottom: 56px; }
  .story, .measure, .access, .case, .process-item { grid-template-columns: 1fr; gap: 32px; }
  .story__photo, .story__text, .access__photo, .access__info, .process-item .step__photo, .process-item__body { grid-column: 1; }
  .process-item .step__photo { max-width: 78%; }
  .steps { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .logo__name { font-size: 18px; } }
@media (min-width: 901px) { .menu-button, .header-cta { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__title .line span { transform: none; } .hero__sub, .hero__actions { opacity: 1; }
}

/* 工程写真は手元が下寄りにあるので、見せる位置を下げる */
.step__photo img { object-position: center 72%; }
.access__info .h2 { font-size: clamp(24px, 2.6vw, 32px); }

/* 枠に合わせて写真を切り抜く（HTMLのwidth/heightで縦に伸びないように） */
.zoom img, .step__photo img, .story__photo img, .access__photo img { width: 100%; height: 100%; object-fit: cover; }
.story__photo img { object-position: 40% 60%; }
