/* 120 アッシュグリッド店舗内装 — K01 1画面完結（カッコイイ系・白黒グレー）
   PC は左の縦の目次で6つの面を切り替える。スマホ・JSなしは縦に並ぶ。
   色と書体は共通の13変数だけ。地の色が変わる面は .t-* が同じ名前の変数を全部上書きする */
:root {
  --c-bg: #f2f2f0;
  --c-bg-alt: #ffffff;
  --c-text: #374151;
  --c-sub: #4b5563;
  --c-line: #c9c8c4;
  --c-accent: #0d0d0d;
  --c-accent-text: #55534e;
  --c-on-accent: #ffffff;
  --c-2: #8e8d88;
  --c-3: #d4d3cf;
  --font-ja: "Noto Sans JP", sans-serif;
  --font-head: "Noto Serif JP", "Noto Sans JP", serif;
  --font-en: "Michroma", "Noto Sans JP", sans-serif;
  --ease: cubic-bezier(.76, 0, .24, 1);
  --header-h: 64px;
  --footer-h: 44px;
  --rail-w: 88px;
}
.t-light { --c-bg: #f2f2f0; --c-bg-alt: #ffffff; --c-text: #374151; --c-sub: #4b5563; --c-line: #c9c8c4; --c-accent: #0d0d0d; --c-accent-text: #55534e; --c-on-accent: #ffffff; }
.t-grey  { --c-bg: #d9d8d4; --c-bg-alt: #f2f2f0; --c-text: #2d3340; --c-sub: #404854; --c-line: #8e8d88; --c-accent: #0d0d0d; --c-accent-text: #3f3d39; --c-on-accent: #ffffff; }
.t-dark  { --c-bg: #0d0d0d; --c-bg-alt: #1b1b1b; --c-text: #ecebe7; --c-sub: #bdbbb5; --c-line: #4a4a47; --c-accent: #ffffff; --c-accent-text: #d4d3cf; --c-on-accent: #0d0d0d; }

*, *::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; background: var(--c-bg); color: var(--c-text); font-family: var(--font-ja); font-size: 16px; line-height: 1.9; overflow-x: hidden; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; overflow-wrap: anywhere; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ===== ヘッダー・ボタン ===== */
.header { position: sticky; top: 0; z-index: 30; background: var(--c-bg); color: var(--c-text); border-bottom: 1px solid var(--c-line); transition: background-color .5s var(--ease), color .5s var(--ease); }
.header__inner { height: var(--header-h); padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.logo { min-height: 44px; display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; flex: none; align-self: center; }
.logo__en { font-family: var(--font-en); font-size: 18px; letter-spacing: .12em; }
.logo__ja { font-family: var(--font-head); font-weight: 900; font-size: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px; background: var(--c-accent); color: var(--c-on-accent); border: 2px solid var(--c-accent); font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.header__btn { display: none; }
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 24px; height: 3px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -8px; } .spmenu__bar::after { top: 8px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; right: 0; top: 100%; width: min(100%, 380px); background: var(--c-bg); border: 1px solid var(--c-line); padding: 8px 24px 20px; display: flex; flex-direction: column; }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--c-line); }

.rail { display: none; }

/* ===== 面の共通 ===== */
.panel { position: relative; background: var(--c-bg); color: var(--c-text); padding: 64px 20px; }
.label { font-family: var(--font-en); font-size: 15px; letter-spacing: .16em; color: var(--c-accent-text); margin-bottom: 14px; }
.title { font-family: var(--font-head); font-weight: 900; font-size: clamp(32px, 9vw, 46px); line-height: 1.2; letter-spacing: .01em; margin-bottom: 22px; }
.panel p + p { margin-top: 14px; }

/* ===== 面0 コラージュ（スマホ：見出し→カードの2列） ===== */
.hero { display: flex; flex-direction: column; overflow: hidden; padding: 56px 20px 88px; }
.hero__center { order: 1; text-align: left; }
.collage { order: 2; margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.hero__en { font-family: var(--font-en); font-size: 15px; letter-spacing: .1em; color: var(--c-accent-text); margin-bottom: 18px; }
.hero__title { font-family: var(--font-head); font-weight: 900; font-size: clamp(48px, 15vw, 72px); line-height: 1.14; letter-spacing: .01em; }
.hero__title span { display: block; }
.hero__lead { margin: 20px 0 28px; color: var(--c-sub); }
.cg { min-width: 0; transform: rotate(var(--r, 0deg)); }
.cg--1 { grid-column: 1 / 3; --r: -1deg; } .cg--2 { --r: 1.5deg; grid-row: span 2; } .cg--3 { --r: -1.5deg; } .cg--4 { --r: 1deg; }
.cg--5 { --r: -1deg; } .cg--6 { --r: 1deg; } .cg--7, .cg--8 { display: none; }
.card { background: var(--c-bg-alt); border: 1px solid var(--c-line); }
.card--photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(.9) contrast(1.08); }
.cg--2 .card--photo img { aspect-ratio: 2 / 3; }
.card figcaption, .card p { font-family: var(--font-en); font-size: 15px; letter-spacing: .06em; padding: 6px 10px; color: var(--c-text); line-height: 1.5; }
.card--plan { padding: 10px; color: var(--c-text); }
.card--plan svg { display: block; width: 100%; height: auto; }
.card--plan p { padding: 4px 0 0; }
.card--swatch { display: grid; grid-template-columns: repeat(4, 1fr); height: 72px; padding: 8px; gap: 6px; }
.sw { display: block; }
.sw--1 { background: var(--c-2); } .sw--2 { background: var(--c-accent); } .sw--3 { background: var(--c-3); } .sw--4 { background: color-mix(in srgb, var(--c-accent) 62%, var(--c-bg)); }
.card--tag { padding: 8px 14px; font-family: var(--font-head); font-weight: 900; font-size: 34px; line-height: 1.2; background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
.card--tag span { font-family: var(--font-en); font-size: 15px; font-weight: 400; margin-right: 6px; }
.card--dim { padding: 6px 10px; background: transparent; border: 0; color: var(--c-sub); }
.card--dim svg { width: 100%; height: 24px; display: block; }
.card--dim p { padding: 0; text-align: center; }
.crack { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: var(--c-line); clip-path: polygon(0 100%, 0 55%, 6% 70%, 11% 35%, 17% 62%, 24% 20%, 31% 58%, 38% 40%, 44% 75%, 52% 30%, 58% 60%, 66% 25%, 72% 66%, 79% 38%, 86% 72%, 92% 45%, 100% 68%, 100% 100%); }

/* ===== 面1 私たち ===== */
.about { display: grid; gap: 32px; }
.facts { display: grid; gap: 0; border-top: 3px solid var(--c-accent); }
.facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
.facts dt { color: var(--c-sub); font-weight: 700; }
.facts dd { font-weight: 700; white-space: nowrap; }
.facts b { font-family: var(--font-ja); font-weight: 700; font-size: 40px; line-height: 1; margin-right: 4px; }
.about__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1) contrast(1.05); }

/* ===== 面2 施工事例（scroll-snap） ===== */
.works { padding-inline: 0; overflow: hidden; }
.works__head { padding: 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.works__arrows { display: flex; gap: 8px; margin-bottom: 22px; }
.works__arrows[hidden] { display: none; }
.arrow { width: 52px; height: 52px; border: 2px solid var(--c-text); background: transparent; color: var(--c-text); cursor: pointer; position: relative; flex: none; }
.arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-top: 3px solid currentColor; border-right: 3px solid currentColor; transform: translate(-70%, -50%) rotate(45deg); }
.arrow--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.arrow:hover { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
.works__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; padding: 0 20px 20px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.works__track { display: flex; gap: 16px; width: max-content; }
.work { flex: none; width: min(78vw, 360px); scroll-snap-align: start; background: var(--c-bg-alt); border: 1px solid var(--c-line); display: flex; flex-direction: column; }
.work figure { aspect-ratio: 3 / 2; overflow: hidden; }
.work img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) contrast(1.06); }
.work__body { padding: 18px 20px 22px; }
.work__no { font-family: var(--font-en); font-size: 15px; letter-spacing: .1em; color: var(--c-accent-text); }
.work h3 { font-family: var(--font-head); font-weight: 900; font-size: 22px; line-height: 1.4; margin: 6px 0 8px; }
.work__body p { color: var(--c-sub); }
.work__body p.work__meta { margin-top: 10px; font-weight: 700; color: var(--c-text); }

/* ===== 面3 素材（F03：割れた形で切り抜く） ===== */
.material { display: grid; gap: 32px; }
.material__photo { margin: -64px -20px 0; aspect-ratio: 3 / 2; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 94%, 84% 85%, 74% 96%, 64% 87%, 55% 98%, 45% 89%, 34% 95%, 24% 86%, 14% 97%, 6% 90%, 0 96%); }
.material__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 20% 50%; filter: grayscale(1) contrast(1.08); }
.materials { display: grid; gap: 12px; margin-top: 24px; }
.materials li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--c-line); }
.materials .sw { grid-row: 1 / 3; width: 44px; height: 44px; border: 1px solid var(--c-line); }
.materials h3 { font-family: var(--font-en); font-weight: 400; font-size: 15px; letter-spacing: .12em; }
.materials p { color: var(--c-sub); margin: 0; }

/* ===== 面4 進め方 ===== */
.process__head { margin-bottom: 8px; }
.steps { display: grid; gap: 0; }
.step { padding: 22px 0; border-top: 3px solid var(--c-accent); }
.step__no { font-family: var(--font-head); font-weight: 900; font-size: 56px; line-height: 1; margin-bottom: 8px; }
.step h3 { font-family: var(--font-head); font-weight: 900; font-size: 22px; margin-bottom: 6px; }
.step p { color: var(--c-sub); }
.step p.step__no { color: var(--c-text); }
.step figure { margin-top: 14px; }
.step img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1) contrast(1.05); }

/* ===== 面5 相談 ===== */
.contact { padding-bottom: 72px; }
.contact__title { font-family: var(--font-head); font-weight: 900; font-size: clamp(34px, 9.5vw, 52px); line-height: 1.25; margin-bottom: 22px; }
.contact .btn { margin-top: 28px; white-space: normal; text-align: center; }
.contact__tel { margin-top: 20px; }
.contact__tel a { font-family: var(--font-en); font-size: 18px; }
.contact__addr { margin-top: 36px; color: var(--c-sub); }

/* 見出し・数字は黒（白）で締める */
.title, .step__no, .step h3, .work h3, .facts b, .contact__title { color: var(--c-accent); }
.step p.step__no { color: var(--c-accent); }

/* ===== フッター ===== */
.footer { background: var(--c-bg); color: var(--c-text); border-top: 1px solid var(--c-line); padding: 24px 20px; text-align: center; transition: background-color .5s var(--ease), color .5s var(--ease); }
.footer__logo { font-family: var(--font-en); letter-spacing: .12em; }
.footer__count { display: none; }
.footer__fiction { margin-top: 6px; color: var(--c-sub); }

@media (min-width: 768px) {
  .header__inner { padding: 0 32px; }
  .header__btn { display: inline-flex; }
  .spmenu { margin-left: 8px; }
  .panel { padding: 72px 48px; }
  .hero { padding: 72px 48px 96px; }
  .hero__center { max-width: 640px; }
  .collage { grid-template-columns: repeat(4, 1fr); }
  .cg--1 { grid-column: span 2; } .cg--2 { grid-row: span 2; }
  .cg--7, .cg--8 { display: block; }
  .about { grid-template-columns: 1fr 1fr; align-items: start; }
  .about__photo { grid-column: 1 / 3; }
  .works { padding-inline: 0; } .works__head { padding: 0 48px; } .works__viewport { padding-inline: 48px; scroll-padding-inline: 48px; }
  .material { grid-template-columns: 1fr 1fr; align-items: center; }
  .material__photo { margin: 0; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .materials { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .materials li { border-top: 1px solid var(--c-line); }
}

/* ===== PC：1画面完結（JS が .is-tabs を付けたときだけ） ===== */
@media (min-width: 1080px) {
  .header__inner { padding: 0 32px; }
  .rail { display: flex; flex-direction: column; width: var(--rail-w); background: var(--c-bg); color: var(--c-text); border-right: 1px solid var(--c-line); transition: background-color .5s var(--ease), color .5s var(--ease); }
  .rail a { flex: 1; min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border-bottom: 1px solid var(--c-line); transition: background-color .3s, color .3s; }
  .rail a:last-child { border-bottom: 0; }
  .rail b { font-family: var(--font-en); font-weight: 400; font-size: 15px; letter-spacing: .08em; }
  .rail span { white-space: nowrap; writing-mode: vertical-rl; font-family: var(--font-ja); font-weight: 700; font-size: 15px; letter-spacing: .14em; color: var(--c-sub); }
  .rail a:hover { background: var(--c-line); }
  .rail a[aria-current="true"] { background: var(--c-accent); color: var(--c-on-accent); }
  .rail a[aria-current="true"] span { color: var(--c-on-accent); }
  .frame { display: flex; }
  .stage { flex: 1; min-width: 0; }

  .panel { padding: 56px 72px; }
  .title { font-size: clamp(40px, 4.2vw, 64px); }

  /* 面0 */
  .hero { display: block; padding: 0; }
  .hero__center { position: absolute; inset: 0 0 48px 0; max-width: none; padding: 0 33% 0 33%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; z-index: 2; }
  .hero__title { font-size: clamp(60px, 6.2vw, 104px); }
  .hero__title span { display: block; }
  .hero__lead { font-size: 17px; margin: 22px 0 28px; }
  .collage { position: absolute; inset: 0 0 48px 0; display: block; margin: 0; z-index: 1; }
  .cg { position: absolute; }
  .cg--1 { left: 3%; top: 7%; width: 24%; grid-column: auto; --r: -3deg; }
  .cg--2 { left: 4.5%; bottom: 6%; width: 11.5%; grid-row: auto; --r: 2deg; }
  .cg--5 { left: 18%; bottom: 7%; width: 15%; --r: -2deg; }
  .cg--3 { right: 3%; top: 6%; width: 24%; --r: 3deg; }
  .cg--4 { right: 6%; bottom: 7%; width: 19%; --r: -2deg; }
  .cg--6 { right: 27%; bottom: 5%; width: 10%; --r: 2deg; }
  .cg--7 { left: 29%; top: 5%; --r: -5deg; }
  .cg--8 { right: 29%; top: 3%; width: 12%; --r: 2deg; }
  .crack { height: 48px; }

  /* 面1 */
  .about { grid-template-columns: 1.1fr 0.9fr; grid-template-rows: auto 1fr; column-gap: 72px; row-gap: 0; align-items: center; }
  .about__text { grid-row: 1; grid-column: 1; align-self: end; }
  .facts { grid-row: 2; grid-column: 1; align-self: start; margin-top: 28px; grid-template-columns: repeat(3, 1fr); column-gap: 24px; border-top: 0; }
  .facts div { display: block; border-top: 3px solid var(--c-accent); border-bottom: 0; padding: 14px 0 0; }
  .facts dd { margin-top: 4px; }
  .about__photo { grid-column: 2; grid-row: 1 / 3; align-self: stretch; margin: -56px -72px -56px 0; }
  .about__photo img { height: 100%; aspect-ratio: auto; }

  /* 面2 */
  .works { display: flex; flex-direction: column; justify-content: center; padding-inline: 0; }
  .works__head { padding: 0 72px; }
  .works__viewport { padding: 0 72px 8px; scroll-padding-inline: 72px; }
  .works__track { gap: 20px; }
  .work { width: clamp(300px, 29vw, 420px); }
  .work figure { aspect-ratio: 3 / 2; }
  .work:nth-child(3) figure img { object-position: 50% 40%; }

  /* 面3 */
  .material { grid-template-columns: 1fr 1fr; gap: 0 72px; align-items: center; padding-block: 0 !important; }
  .material__photo { margin: 0 0 0 -72px; align-self: stretch; aspect-ratio: auto; clip-path: polygon(0 0, 100% 0, 100% 6%, 94% 14%, 100% 24%, 93% 35%, 99% 46%, 92% 58%, 98% 68%, 91% 80%, 97% 90%, 93% 100%, 0 100%); }
  .material__text { padding: 56px 0; }
  .materials { grid-template-columns: 1fr 1fr; margin-top: 20px; }

  /* 面4 */
  .process { display: flex; flex-direction: column; justify-content: center; }
  .process__head { margin-bottom: 16px; }
  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 28px; align-items: start; }
  .step { padding: 20px 0 0; }
  .step img { aspect-ratio: 4 / 3; }

  /* 面5 */
  .contact { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-bottom: 56px; }
  .contact > p:not(.label):not(.contact__tel):not(.contact__addr) { max-width: 40em; }
  .contact__title { font-size: clamp(48px, 5.6vw, 92px); }
  .contact .btn { margin-top: 32px; }
  .contact__addr { position: absolute; left: 72px; right: 72px; bottom: 28px; margin: 0; }
  .spmenu { display: none; }

  /* 1画面にする */
  .is-tabs body { height: 100svh; overflow: hidden; display: grid; grid-template-rows: var(--header-h) minmax(0, 1fr) var(--footer-h); }
  .is-tabs .header { position: relative; }
  .is-tabs .frame { min-height: 0; }
  .is-tabs .stage { position: relative; display: grid; min-height: 0; overflow: hidden; }
  .is-tabs .panel { grid-area: 1 / 1; min-height: 0; overflow: hidden; }
  .is-tabs .panel:not(.is-on):not(.is-leaving) { display: none; }
  .is-tabs .is-leaving { z-index: 1; }
  .is-tabs .is-on { z-index: 2; }
  .is-tabs .is-enter-fwd { animation: crack-fwd .8s var(--ease) both; }
  .is-tabs .is-enter-back { animation: crack-back .8s var(--ease) both; }
  .is-tabs .footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; text-align: left; }
  .is-tabs .footer__logo { display: none; }
  .is-tabs .footer__count { display: block; font-family: var(--font-en); font-size: 15px; letter-spacing: .08em; }
  .is-tabs .footer__fiction { margin: 0; }
}

/* 画面が低いPC（高さ820px以下）では、余白と文字を少し詰めて1画面に収める */
@media (min-width: 1080px) and (max-height: 820px) {
  .panel { padding-block: 36px; }
  .title { font-size: clamp(32px, 3.4vw, 50px); margin-bottom: 12px; }
  .hero__title { font-size: clamp(52px, 5.4vw, 88px); }
  .hero__lead { margin: 14px 0 18px; }
  .material__text { padding: 24px 0; }
  .materials { margin-top: 8px; }
  .materials li { padding: 8px 0; }
  .materials p { line-height: 1.6; }
  .process__head { margin-bottom: 0; }
  .step { padding-top: 14px; }
  .step__no { font-size: 44px; }
  .step img { aspect-ratio: 16 / 9; }
  .about__photo { margin-block: -36px; }
  .contact__title { font-size: clamp(44px, 5vw, 76px); }
}

/* 次の面が、割れ目をつくりながら横から入ってくる（F03）。頂点の数は4つのキーフレームで同じ */
@keyframes crack-fwd {
  0%   { clip-path: polygon(100% 0, 100% 0, 100% 12.5%, 100% 25%, 100% 37.5%, 100% 50%, 100% 62.5%, 100% 75%, 100% 87.5%, 100% 100%, 100% 100%); }
  50%  { clip-path: polygon(100% 0, 62% 0, 48% 12.5%, 66% 25%, 42% 37.5%, 60% 50%, 46% 62.5%, 68% 75%, 50% 87.5%, 58% 100%, 100% 100%); }
  100% { clip-path: polygon(100% 0, 0 0, 0 12.5%, 0 25%, 0 37.5%, 0 50%, 0 62.5%, 0 75%, 0 87.5%, 0 100%, 100% 100%); }
}
@keyframes crack-back {
  0%   { clip-path: polygon(0 0, 0 0, 0 12.5%, 0 25%, 0 37.5%, 0 50%, 0 62.5%, 0 75%, 0 87.5%, 0 100%, 0 100%); }
  50%  { clip-path: polygon(0 0, 38% 0, 52% 12.5%, 34% 25%, 58% 37.5%, 40% 50%, 54% 62.5%, 32% 75%, 50% 87.5%, 42% 100%, 0 100%); }
  100% { clip-path: polygon(0 0, 100% 0, 100% 12.5%, 100% 25%, 100% 37.5%, 100% 50%, 100% 62.5%, 100% 75%, 100% 87.5%, 100% 100%, 0 100%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-tabs .is-enter-fwd, .is-tabs .is-enter-back { animation: none; }
  .header, .footer, .rail, .rail a { transition: none; }
}
