/* 13 京都 — トップの見た目。ヘッダー・フッター・ボタンは下層（shell.html）と共通 */

/* 墨のにじみの進み具合（JS が 0→130% に動かす。登録しておくと CSS の transition でも動く） */
@property --ink { syntax: '<percentage>'; inherits: false; initial-value: 130%; }

:root {
  --kinari: #f0ebe1;
  --kinari-2: #e7e0d3;
  --sumi: #1e1d1b;
  --sumi-2: #292724;
  --ink-c: #1e1d1b;
  --usuzumi: #5a554d;
  --line: #cbc2b2;
  --on-dark: #ece6da;
  --on-dark-muted: #b1a99b;
  --line-dark: #48443e;
  --susutake: #6e5a3e;
  --mincho: "Zen Old Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --pad: max(5vw, 20px);
  --slow: cubic-bezier(.6, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--kinari); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--kinari);
  color: var(--ink-c);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--mincho);
  font-weight: 400;
  word-break: keep-all;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
p, figure { margin: 0; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---- 縦書きの見出し ---- */
.k-v {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  font-family: var(--mincho);
  line-height: 1.6;
  letter-spacing: .14em;
}
.k-v .ink { display: block; }
.tcy { text-combine-upright: all; -webkit-text-combine: horizontal; letter-spacing: 0; }

/* ---- 動きの初期状態（JS が html に motion を付けたときだけ。ヒーローだけは読み込み直後の pre-motion から） ---- */
.motion .ink,
.pre-motion .k-hero .ink {
  --ink: -30%;
  -webkit-mask-image: linear-gradient(var(--ink-dir, to bottom), #000 calc(var(--ink) - 30%), rgba(0, 0, 0, .4) calc(var(--ink) - 8%), transparent var(--ink));
  mask-image: linear-gradient(var(--ink-dir, to bottom), #000 calc(var(--ink) - 30%), rgba(0, 0, 0, .4) calc(var(--ink) - 8%), transparent var(--ink));
  filter: blur(7px);
}
.motion .ink.ink-done { -webkit-mask-image: none; mask-image: none; filter: none; }
.pre-motion .k-hero__body { opacity: 0; }

/* すだれ: 写真の上に降りている簾。上に巻き上がって写真が見える */
.sudare { display: none; }
.motion .sudare,
.pre-motion .k-hero .sudare {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(to bottom, transparent 0 6px, rgba(110, 90, 62, .13) 6px 7px), var(--kinari);
  transform-origin: 50% 0;
  pointer-events: none;
}
.motion .sudare::after,
.pre-motion .k-hero .sudare::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--susutake); }
.k-dark .sudare { background: repeating-linear-gradient(to bottom, transparent 0 6px, rgba(236, 230, 218, .07) 6px 7px), var(--sumi); }

/* 区画の切り替え: 前の区画の色の簾が、スクロールに合わせて巻き上がる */
.k-blind { display: none; }
.motion .k-blind {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(100%, 100svh);
  z-index: 6;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(110, 90, 62, .12) 7px 8px), var(--kinari);
  transform-origin: 50% 0;
  pointer-events: none;
}
.motion .k-blind::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--susutake); }
.motion .k-blind--dark { background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(236, 230, 218, .06) 7px 8px), var(--sumi); }
.motion .k-blind--dark::after { background: #5b4b35; }

/* ---- ヘッダー ---- */
.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 24px var(--pad);
}
.brand { font-family: var(--mincho); font-size: 17px; letter-spacing: .22em; white-space: nowrap; padding: 10px 0; }
.site-nav { display: flex; gap: clamp(22px, 3vw, 44px); }
.site-nav a { position: relative; display: inline-block; padding: 12px 0; font-size: 13.5px; letter-spacing: .16em; white-space: nowrap; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .7s var(--slow);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: 0 50%; }
.menu-toggle { display: none; }

/* ---- ボタン（下層の .button にもそのまま効く） ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--sumi);
  background: var(--sumi);
  color: var(--kinari);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .6s var(--slow), color .6s var(--slow);
}
.button::after { content: ""; flex: none; width: 26px; height: 1px; background: currentColor; transition: width .7s var(--slow); }
.button:hover { background: transparent; color: var(--sumi); }
.button:hover::after { width: 42px; }
.button--ghost { background: transparent; color: var(--sumi); }
.button--ghost:hover { background: var(--sumi); color: var(--kinari); }
.k-dark .button { border-color: var(--on-dark); background: var(--on-dark); color: var(--sumi); }
.k-dark .button:hover { background: transparent; color: var(--on-dark); }

/* ---- 区画の骨組み: 中身（左）＋縦書きの見出しの背（右） ---- */
.k-sec {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(20px, 6vw, 112px);
  padding: clamp(88px, 10vw, 168px) var(--pad);
}
.k-spine { grid-column: 2; grid-row: 1; align-self: start; font-size: clamp(26px, 3.3vw, 44px); }
.k-spine--xl { font-size: clamp(40px, 6vw, 84px); letter-spacing: .2em; }
.k-spine--lg { font-size: clamp(28px, 4vw, 56px); }
.k-sec__body { grid-column: 1; grid-row: 1; min-width: 0; }
.k-dark { background: var(--sumi); color: var(--on-dark); }
.k-note { font-size: 12.5px; letter-spacing: .1em; line-height: 1.8; color: var(--usuzumi); }
.k-dark .k-note { color: var(--on-dark-muted); }

.k-photo { position: relative; overflow: hidden; background: var(--kinari-2); }
.k-photo img { width: 100%; height: 100%; object-fit: cover; }
.k-dark .k-photo { background: var(--sumi-2); }

/* ---- 1. ヒーロー ---- */
.k-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(32px, 5vw, 88px);
  padding: 8px var(--pad) clamp(64px, 9vw, 140px);
}
.k-hero__photo { grid-column: 1; grid-row: 1; display: flex; align-items: flex-end; gap: 14px; }
.k-hero .k-photo { flex: 1 1 auto; height: clamp(440px, calc(100svh - 150px), 780px); }
.k-hero .k-photo img { object-position: 22% 50%; }
.k-hero__photo figcaption { flex: none; writing-mode: vertical-rl; white-space: nowrap; font-size: 11.5px; letter-spacing: .24em; color: var(--usuzumi); }
.k-hero__text {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(32px, 5vw, 96px);
}
.k-hero__title { align-self: flex-start; font-size: clamp(40px, 4.8vw, 68px); line-height: 1.55; letter-spacing: .16em; padding-top: 4px; }
.k-hero__body { flex: 0 1 23em; display: grid; justify-items: start; gap: 26px; min-width: 0; }
.k-hero__lead { font-size: 15px; line-height: 2.15; }
.k-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- 2. よく使われる 3 つの場面 ---- */
.k-scene-list { display: grid; gap: clamp(56px, 8vw, 128px); }
.k-scene { display: grid; gap: 20px; }
.k-scene__fig .k-photo { aspect-ratio: 16 / 9; }
.k-scene__text h3 { --ink-dir: to right; font-size: clamp(21px, 2vw, 27px); line-height: 1.6; letter-spacing: .12em; }
.k-scene__text p { margin-block-start: 10px; max-inline-size: 30em; }
.k-scenes__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 32px;
  margin-top: clamp(56px, 7vw, 112px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.k-places { font-family: var(--mincho); font-size: clamp(16px, 1.6vw, 20px); letter-spacing: .14em; }

/* ---- 3. 確認の仕組み（墨の区画） ---- */
.k-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.k-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 18px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line-dark);
}
.k-check__name { --ink-dir: to bottom; grid-column: 2; grid-row: 1; writing-mode: vertical-rl; white-space: nowrap; line-height: 1.5; letter-spacing: .12em; }
.k-check__role { font-size: clamp(28px, 2.6vw, 36px); }
.k-check__who { font-size: 14px; letter-spacing: .14em; color: var(--on-dark-muted); }
.k-check p { grid-column: 1; grid-row: 1; max-width: 32em; line-height: 2; }
.k-quality__lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  margin-top: clamp(64px, 9vw, 140px);
}
.k-quality__photo { width: min(72%, 320px); }
.k-quality .k-photo { aspect-ratio: 4 / 5; }
.k-quality .k-photo img { object-view-box: inset(0% 0% 55% 76%); object-position: 50% 0; filter: saturate(.9) brightness(.92); }
.k-quality__text { display: grid; gap: 40px; align-content: end; }
.k-quality__close { font-family: var(--mincho); font-size: clamp(20px, 2.2vw, 30px); line-height: 1.8; letter-spacing: .1em; }
.k-delivery { display: grid; gap: 12px; padding-top: 26px; border-top: 1px solid var(--line-dark); }
.k-delivery h3 { font-size: 17px; letter-spacing: .14em; }
.k-delivery__items { font-family: var(--mincho); font-size: clamp(16px, 1.5vw, 19px); letter-spacing: .08em; line-height: 1.9; }

/* ---- 4. 料金 ---- */
.k-price { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.k-price__name { font-family: var(--mincho); font-size: clamp(19px, 1.9vw, 25px); letter-spacing: .16em; }
.k-price__value { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .35em; margin-top: 0; font-family: var(--mincho); }
.k-price__unit { font-size: clamp(16px, 1.5vw, 20px); letter-spacing: .1em; }
.k-price__num { --ink-dir: to right; font-size: clamp(60px, 7.4vw, 124px); font-weight: 400; line-height: 1.46; letter-spacing: 0; }
.k-price__yen { font-size: clamp(22px, 2.4vw, 32px); }
.k-price__tax { flex-basis: 100%; font-family: var(--sans); font-size: 14px; letter-spacing: .08em; color: var(--usuzumi); }
.k-price__cond { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); letter-spacing: .1em; }
.k-price__sub { display: grid; justify-items: start; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); }
.k-price__sub .button { margin-top: 12px; }

/* ---- 5. 進め方 ---- */
.k-process__row { display: grid; gap: 40px; }
.k-process__photo { width: min(64%, 300px); }
.k-process .k-photo { aspect-ratio: 3 / 4.4; }
.k-process .k-photo img { object-position: 26% 50%; }
.k-steps { margin: 0; padding: 0; list-style: none; counter-reset: k-step; }
.k-steps li {
  counter-increment: k-step;
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  column-gap: 12px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.k-steps li:last-child { border-bottom: 1px solid var(--line); }
.k-steps li::before { content: counter(k-step, cjk-decimal); grid-row: 1 / span 2; font-family: var(--mincho); font-size: 22px; line-height: 1.5; color: var(--usuzumi); }
.k-steps h3 { font-size: 20px; line-height: 1.6; letter-spacing: .12em; }
.k-steps p { margin-block-start: 6px; }
.k-process__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 20px clamp(32px, 5vw, 72px);
  margin-top: clamp(48px, 6vw, 88px);
}
.k-process__foot p { max-width: 36em; }

/* ---- 6. 相談（墨の区画と、格子越しの光） ---- */
.k-contact { padding-block: clamp(120px, 15vw, 240px); }
.k-contact__body { align-self: end; display: grid; justify-items: start; gap: 16px; max-width: 36em; font-size: 16px; }
.k-contact__body .button { margin-top: 22px; }
.k-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(104deg, transparent 0 70px, rgba(240, 224, 196, .055) 70px 92px, transparent 92px 124px);
  -webkit-mask-image: radial-gradient(ellipse 55% 75% at 62% 45%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 75% at 62% 45%, #000 10%, transparent 72%);
}
.motion .k-light { animation: k-drift 26s ease-in-out infinite alternate; }
@keyframes k-drift { from { background-position: 0 0; } to { background-position: 160px 0; } }

/* ---- 7. フッター（相談の墨の区画から続く） ---- */
.site-footer { background: var(--sumi); color: var(--on-dark); padding: clamp(48px, 6vw, 80px) var(--pad) 40px; border-top: 1px solid var(--line-dark); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; }
.footer-brand { font-family: var(--mincho); font-size: clamp(22px, 2.6vw, 32px); letter-spacing: .22em; }
.footer-top p { font-size: 13.5px; letter-spacing: .14em; color: var(--on-dark-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
.site-footer nav a { padding: 10px 0; font-size: 13.5px; letter-spacing: .1em; }
.site-footer nav a:hover, .site-footer nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .4em; }
.footer-note { margin-top: 28px; font-size: 12.5px; letter-spacing: .08em; color: var(--on-dark-muted); }

/* ---- タブレット（768〜1179）: 場面は絵と文を横に並べる ---- */
@media (min-width: 768px) and (max-width: 1179px) {
  .k-scene { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: end; }
}

/* ---- 広い画面（1024 以上）: 3 つの確認を横に並べる・料金を 2 列に ---- */
@media (min-width: 1024px) {
  .k-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 56px); }
  .k-check { padding-bottom: 0; }
  .k-quality__lower { grid-template-columns: minmax(200px, 320px) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: end; }
  .k-quality__photo { width: auto; }
  .k-price { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 104px); align-items: end; }
  .k-price__sub { padding: 0 0 0 clamp(24px, 3vw, 48px); border-top: 0; border-left: 1px solid var(--line); }
}

/* ---- さらに広い画面（1180 以上）: 短い本文も縦に組む（場面の説明・進め方の 4 段） ---- */
@media (min-width: 1180px) {
  .k-scene { display: flex; align-items: flex-start; gap: 40px; }
  .k-scene__fig { flex: 0 1 520px; min-width: 0; }
  .k-scene:nth-child(2) { margin-left: 16%; }
  .k-scene:nth-child(3) { margin-left: 6%; }
  .k-scene__text { flex: none; writing-mode: vertical-rl; inline-size: 19em; }
  .k-scene__text h3 { --ink-dir: to bottom; white-space: nowrap; }
  .k-scene__text p { margin-block-start: 16px; letter-spacing: .08em; line-height: 2; }

  .k-process__row { display: flex; justify-content: space-between; align-items: flex-start; gap: clamp(40px, 5vw, 80px); }
  .k-process__photo { flex: 0 1 300px; min-width: 160px; width: auto; }
  .k-steps { flex: none; writing-mode: vertical-rl; inline-size: 17em; }
  .k-steps li { display: block; padding: 0; padding-block-end: clamp(26px, 2.6vw, 40px); margin-block-end: clamp(26px, 2.6vw, 40px); border: 0; border-block-end: 1px solid var(--line); }
  .k-steps li:last-child { padding-block-end: 0; margin-block-end: 0; border: 0; }
  .k-steps li::before { display: none; }
  .k-steps h3 { --ink-dir: to bottom; font-size: 26px; white-space: nowrap; letter-spacing: .14em; }
  .k-steps h3::before { content: counter(k-step, cjk-decimal) "　"; color: var(--usuzumi); }
  .k-steps p { margin-block-start: 14px; letter-spacing: .08em; line-height: 2; }
}

/* ---- タブレット以下（1023 以下）: ヒーローは写真と縦書きの見出しを並べ、本文はその下 ---- */
@media (max-width: 1023px) {
  .k-hero { grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; row-gap: 28px; }
  .k-hero__text { display: contents; }
  .k-hero__title { grid-column: 2; grid-row: 1; font-size: clamp(30px, 5.6vw, 46px); }
  .k-hero__photo { grid-column: 1; grid-row: 1; flex-direction: column; align-items: stretch; gap: 8px; }
  .k-hero .k-photo { flex: none; height: auto; aspect-ratio: 3 / 4.2; max-height: 62svh; }
  .k-hero__photo figcaption { writing-mode: horizontal-tb; font-size: 11px; }
  .k-hero__body { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- スマホ（767 以下）: メニューは開閉式・見出しの背は 1 列 ---- */
@media (max-width: 767px) {
  .site-header { flex-wrap: wrap; padding: 12px 20px; }
  .nav-ready .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }
  .menu-toggle span { display: block; width: 24px; height: 1px; background: currentColor; transition: transform .5s var(--slow), width .5s var(--slow); }
  .menu-toggle span:last-child { width: 15px; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(20deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { width: 24px; transform: translateY(-4.5px) rotate(-20deg); }
  .site-nav { flex-basis: 100%; flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
  .site-nav a::after { display: none; }
  .nav-ready .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 4px 20px 18px; background: var(--kinari); border-bottom: 1px solid var(--line); }
  .nav-ready .site-nav.is-open { display: flex; }

  .k-sec { column-gap: 14px; padding-block: 88px; }
  .k-spine { font-size: 22px; }
  .k-spine .ink { display: inline-block; }
  .k-spine--xl { font-size: 38px; }
  .k-contact { grid-template-columns: minmax(0, 1fr); row-gap: 40px; padding-block: 104px; }
  .k-contact .k-spine { grid-column: 1; grid-row: 1; justify-self: end; font-size: 28px; }
  .k-contact .k-spine .ink { display: block; }
  .k-contact__body { grid-column: 1; grid-row: 2; }
  .k-check { column-gap: 14px; }
  .k-check__role { font-size: 26px; }
  .k-check__who { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
