
/* Layout: 写真が主役の1ページ。開くと事例写真→言葉→事例の一覧（種類で絞り込み）→依頼の流れ→経歴→連絡先。事例は全画面で写真を縦に送る */
:root {
  --paper: #f8f8f6;      /* 紙。漆喰の白 */
  --ink: #1d1d1b;        /* 墨 */
  --ash: #74746e;        /* 灰。補足の文字 */
  --line: #deded8;       /* 罫 */
  --yakisugi: #2b2a28;   /* 焼杉。詳細画面の地 */
  --sugi: #9c7a55;       /* 杉。唯一の差し色 */
  --f-latin: "Jost", "Helvetica Neue", Arial, sans-serif;
  --f-mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-weight: 300; font-size: 15.5px; line-height: 2; letter-spacing: .04em;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ヘッダー */
header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; gap: 16px; }
.logo { font-family: var(--f-latin); font-weight: 500; font-size: 17.5px; letter-spacing: .26em; text-decoration: none; }
nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
nav a.opt { display: none; }
nav a { font-family: var(--f-latin); font-size: 13px; letter-spacing: .22em; text-decoration: none; color: var(--ash); }
nav a:hover, nav a:focus-visible { color: var(--ink); }
:focus-visible { outline: 1px solid var(--sugi); outline-offset: 4px; }

/* 冒頭のロゴ：平面図の通り芯の交点に、kaiensya の8文字を据える */
.intro { min-height: calc(100svh - 64px); display: grid; place-items: center; align-content: center; gap: 28px; padding-block: 24px 64px; position: relative; }
.mark { width: min(78vw, 440px); height: auto; overflow: visible; }
.mark .axis { stroke: var(--line); stroke-width: .8; stroke-dasharray: 6 3 1 3; fill: none; }
.mark .bub { fill: var(--paper); stroke: var(--ash); stroke-width: .7; }
.mark .bubt { font-family: var(--f-latin); font-size: 7.5px; fill: var(--ash); letter-spacing: .02em; }
.mark .ch { font-family: var(--f-latin); font-weight: 500; font-size: 46px; fill: var(--ink); }
.mark .sub { font-family: var(--f-latin); font-size: 9.5px; letter-spacing: .26em; fill: var(--ink); }
.mark .dot { fill: var(--sugi); }
.intro-ja { font-family: var(--f-mincho); font-size: 14.5px; letter-spacing: .3em; color: var(--ash); margin: 0; text-align: center; }
.cue { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 8px; font-family: var(--f-latin); font-size: 11px; letter-spacing: .3em; color: var(--ash); text-decoration: none; }
.cue i { display: block; width: 1px; height: 36px; background: var(--ink); transform-origin: top; animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.mark .axis { animation: fade 1.2s ease both; }
.mark .ch { animation: drop .7s cubic-bezier(.2,.7,.2,1) both; }
.mark .sub, .mark .bub, .mark .bubt, .intro-ja { animation: fade 1s ease both; animation-delay: 1.9s; }
.mark .dot { animation: fade .6s ease both; animation-delay: 2.3s; }
@media (prefers-reduced-motion: reduce) { .mark *, .intro-ja, .cue i { animation: none !important; } }

.mark .mv { transform-box: view-box; }
.mark .word { font-family: var(--f-latin); font-weight: 500; font-size: 38px; letter-spacing: .16em; fill: var(--ink); opacity: 0; }
.mark.done .axis { opacity: .55; transition: opacity 1.2s; }
header.solo .logo { opacity: 0; pointer-events: none; }
header .logo { transition: opacity .4s; }

/* 冒頭の写真 */
.hero { position: relative; aspect-ratio: 4 / 5; width: 100%; overflow: hidden; background: var(--line); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero img.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero img { transition: none; } }
.hero-cap { display: flex; justify-content: space-between; align-items: baseline; padding-block: 14px 0; gap: 12px; }
.hero-cap > div:first-child { display: grid; gap: 2px; min-width: 0; }
.hero-cap .name { font-family: var(--f-latin); font-size: 13px; letter-spacing: .22em; }
.hero-cap .ja { font-family: var(--f-mincho); font-size: 14.5px; color: var(--ash); white-space: nowrap; }
.hero-cap .dots { padding-top: 8px; }
.dots { display: flex; gap: 10px; }
.dots button { width: 22px; height: 2px; padding: 0; border: 0; background: var(--line); cursor: pointer; }
.dots button.on { background: var(--ink); }

/* 見出し */
.seo-h1 { font-family: var(--f-body); font-weight: 300; font-size: 12px; letter-spacing: .12em; color: var(--ash); margin: 0 0 28px; line-height: 1.8; }
.label { font-family: var(--f-latin); font-size: 13px; font-weight: 500; letter-spacing: .32em; margin: 0 0 6px; }
.label-ja { font-family: var(--f-mincho); font-size: 14.5px; color: var(--ash); margin: 0; }
section { padding-block: 96px 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 44px; }

/* 言葉 */
.message { display: grid; gap: 28px; }
.message h2 { font-family: var(--f-mincho); font-weight: 400; font-size: clamp(26.5px, 3.4vw, 36px); line-height: 1.7; margin: 0; letter-spacing: .12em; text-wrap: balance; }
.message p { max-width: 34em; margin: 0; color: #3a3a37; }

/* 事例 */
.filters { display: flex; gap: 22px; flex-wrap: wrap; }
.filters button { font-family: var(--f-latin); font-size: 13px; letter-spacing: .2em; background: none; border: 0; padding: 4px 0; color: var(--ash); cursor: pointer; border-bottom: 1px solid transparent; }
.filters button.on { color: var(--ink); border-bottom-color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.work { text-decoration: none; display: grid; gap: 14px; min-width: 0; }
.work .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.work { position: relative; border: 2px solid #d4d4cd; padding: 12px 12px 18px; transition: border-color .4s; }
.work:hover { border-color: #b9b9b2; }
/* ワンポイント：図面のトンボのように、左上を薄いピンク・右下を薄い黄色の鉤（かぎ）で押さえる */
.work::before, .work::after { content: ""; position: absolute; width: 26px; height: 26px; pointer-events: none; }
.work::before { top: -2px; left: -2px; border-top: 2px solid #f0bfc6; border-left: 2px solid #f0bfc6; }
.work::after { right: -2px; bottom: -2px; border-right: 2px solid #f1d77e; border-bottom: 2px solid #f1d77e; }
.work .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease, filter .6s; }
.work:hover .ph img { transform: scale(1.03); }
.work .en { font-family: var(--f-latin); font-size: 13px; letter-spacing: .2em; }
.work .ja { font-family: var(--f-mincho); font-size: 16.5px; letter-spacing: .1em; }
.work .meta { font-size: 13px; color: var(--ash); letter-spacing: .08em; }
.work .txt { display: grid; gap: 2px; }

/* 依頼の流れ */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.flow li { padding: 24px 0 26px; border-bottom: 1px solid var(--line); min-width: 0; }
.flow .n { font-family: var(--f-latin); font-size: 13px; letter-spacing: .2em; color: var(--sugi); }
.flow h3 { font-family: var(--f-mincho); font-weight: 400; font-size: 18.5px; margin: 6px 0 8px; letter-spacing: .1em; }
.flow p { margin: 0; font-size: 14.5px; color: #4a4a46; line-height: 1.9; }

/* 経歴 */
.about { display: grid; gap: 36px; align-items: start; }
.about .ph { aspect-ratio: 820 / 620; overflow: hidden; background: var(--line); }
.about .ph img { width: 100%; height: 100%; object-fit: cover; }
.person { font-family: var(--f-mincho); font-size: 24px; letter-spacing: .2em; margin: 0; }
.person-en { font-family: var(--f-latin); font-size: 13px; letter-spacing: .24em; color: var(--ash); margin: 0 0 28px; }
.history { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px 16px; margin: 0 0 28px; font-variant-numeric: tabular-nums; }
.history dt { font-family: var(--f-latin); font-size: 14.5px; color: var(--ash); letter-spacing: .1em; }
.history dd { margin: 0; }
.links { display: flex; gap: 14px; margin-top: 28px; }
.links a { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none; transition: border-color .3s, background .3s; }
.links a:hover, .links a:focus-visible { border-color: var(--ink); }
.links a.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); border-color: transparent; color: #fff; }
.contact dd a { text-decoration: none; border-bottom: 1px solid var(--line); }
.qual { font-size: 14.5px; color: var(--ash); line-height: 2; margin: 0; }

/* 連絡先 */
.contact { display: grid; gap: 28px; border-top: 1px solid var(--line); padding-top: 40px; }
.contact dl { display: grid; grid-template-columns: 6em 1fr; gap: 12px 16px; margin: 0; }
.contact dt { font-family: var(--f-latin); font-size: 13px; letter-spacing: .2em; color: var(--ash); padding-top: 3px; }
.contact dd { margin: 0; user-select: all; }
.contact dd a { text-decoration: none; border-bottom: 1px solid var(--line); }
footer { padding-block: 120px 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-latin); font-size: 12px; letter-spacing: .2em; color: var(--ash); }

/* 事例の詳細（全画面） */
.detail { display: none; position: fixed; inset: 0; z-index: 40; background: var(--yakisugi); color: #ecebe6; overflow-y: auto; overscroll-behavior: contain; }
.detail .bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: 16px;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--yakisugi) 90%, transparent); backdrop-filter: blur(6px); }
.detail .bar span { font-family: var(--f-latin); font-size: 13px; letter-spacing: .24em; }
.close { font-family: var(--f-latin); font-size: 13px; letter-spacing: .24em; background: none; border: 1px solid #5a5853; color: inherit; padding: 8px 16px; cursor: pointer; }
.d-body { max-width: 1100px; margin: 0 auto; padding: 8px max(24px, env(safe-area-inset-right, 0px)) 120px max(24px, env(safe-area-inset-left, 0px)); }
.d-title { display: grid; gap: 28px; padding-block: 24px 40px; }
.d-title h2, .d-title h1 { font-family: var(--f-mincho); font-weight: 400; font-size: clamp(28.5px, 3.6vw, 40px); letter-spacing: .14em; margin: 0; line-height: 1.5; }
.d-title .en { font-family: var(--f-latin); font-size: 13px; letter-spacing: .26em; color: #a9a7a0; margin: 0 0 10px; }
.d-title p { margin: 0; color: #d5d3cc; max-width: 30em; }
.d-data { display: grid; grid-template-columns: 6em 1fr; gap: 8px 16px; margin: 28px 0 0; font-size: 14.5px; }
.d-data dt { font-family: var(--f-latin); letter-spacing: .2em; color: #a9a7a0; }
.d-data dd { margin: 0; }
.d-photos { display: grid; grid-template-columns: 1fr; gap: 10px; }
.d-photos img { width: 100%; height: auto; background: #3a3936; }
.d-photos img.wide { grid-column: 1 / -1; }
.d-photos .ba { grid-column: 1 / -1; margin: 8px 0 4px; font-family: var(--f-latin); font-size: 14.5px; letter-spacing: .32em; display: flex; align-items: baseline; gap: 14px; }
.d-photos .ba span { font-family: var(--f-mincho); font-size: 14.5px; letter-spacing: .2em; color: #a9a7a0; }
.d-photos .ba.after { margin-top: 56px; padding-top: 28px; border-top: 1px solid #4a4844; }
.d-next { margin-top: 72px; display: flex; justify-content: flex-end; }
.d-next a { font-family: var(--f-latin); font-size: 13px; letter-spacing: .24em; text-decoration: none; border-bottom: 1px solid #5a5853; padding-bottom: 4px; }

/* ここまでがスマホ。画面が広いときだけ足していく */
/* スマホだけ文字を1割大きく（2026-10-26）。広い画面では元の大きさに戻す */
@media (min-width: 640px) {
  .logo { font-size: 16px; }
  nav a { font-size: 12px; }
  .intro-ja { font-size: 13px; }
  .cue { font-size: 10px; }
  .hero-cap .name { font-size: 12px; }
  .hero-cap .ja { font-size: 13px; }
  .seo-h1 { font-size: 11px; }
  .label { font-size: 12px; }
  .label-ja { font-size: 13px; }
  .message h2 { font-size: clamp(24px, 3.4vw, 36px); }
  .filters button { font-size: 12px; }
  .work .en { font-size: 12px; }
  .work .ja { font-size: 15px; }
  .work .meta { font-size: 12px; }
  .flow .n { font-size: 12px; }
  .flow h3 { font-size: 17px; }
  .flow p { font-size: 13px; }
  .person { font-size: 22px; }
  .person-en { font-size: 12px; }
  .history dt { font-size: 13px; }
  .qual { font-size: 13px; }
  .contact dt { font-size: 12px; }
  footer .wrap { font-size: 11px; }
  .detail .bar span { font-size: 12px; }
  .close { font-size: 12px; }
  .d-title h2, .d-title h1 { font-size: clamp(26px, 3.6vw, 40px); }
  .d-title .en { font-size: 12px; }
  .d-data { font-size: 13px; }
  .d-photos .ba { font-size: 13px; }
  .d-photos .ba span { font-size: 13px; }
  .d-next a { font-size: 12px; }
}
@media (min-width: 640px) {
  body { font-size: 16.5px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 56px 24px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li { padding-right: 28px; }
  .d-photos { grid-template-columns: 1fr 1fr; gap: 16px; }
  nav { gap: 28px; }
  nav a.opt { display: inline; }
}
@media (min-width: 1000px) {
  section { padding-block: 128px 0; }
  .hero { aspect-ratio: 16 / 9; max-height: 80vh; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 64px 32px; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .message { grid-template-columns: 1fr 2fr; gap: 48px; }
  .about { grid-template-columns: 1fr 1fr; gap: 64px; }
  .contact { grid-template-columns: 1fr 1fr; gap: 48px; }
  .d-title { grid-template-columns: 1.2fr 1fr; gap: 48px; padding-block: 40px 56px; }
}

/* 事例ページ（焼杉の地） */
body.workpage { background: var(--yakisugi); color: #ecebe6; }
body.workpage::before { background: var(--yakisugi); }
body.workpage header { background: color-mix(in srgb, var(--yakisugi) 90%, transparent); }
body.workpage .logo, body.workpage nav a { color: #ecebe6; }
body.workpage nav a { color: #a9a7a0; }
.workpage .d-title h1 { font-family: var(--f-mincho); font-weight: 400; font-size: clamp(28.5px, 3.6vw, 40px); letter-spacing: .14em; margin: 0; line-height: 1.5; }
.crumbs { display: block; text-align: left; font-family: var(--f-latin); font-size: 12px; letter-spacing: .18em; color: #a9a7a0; padding-top: 8px; }
.crumbs a { text-decoration: none; }
.d-next { justify-content: space-between !important; gap: 16px; flex-wrap: wrap; }
.d-photos picture { display: contents; }
.d-photos .ba { font-weight: 400; }
.d-contact { margin-top: 96px; border-top: 1px solid #4a4844; padding-top: 32px; color: #d5d3cc; }
.d-contact .label { color: #ecebe6; }
.d-contact .links a { color: #ecebe6; border-color: #5a5853; }
.d-contact .links a.ig { color: #fff; border-color: transparent; }
.d-contact a { text-decoration: none; }
.d-contact .tel { font-family: var(--f-latin); letter-spacing: .12em; font-size: 14.5px; user-select: all; }
.work .ph picture, .hero picture { display: contents; }
.hero a.hslide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero a.hslide.on { opacity: 1; z-index: 1; }
.hero a.hslide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) { .hero a.hslide { transition: none; } }
h2.label { font-weight: 500; }
.message h2.label { font-family: var(--f-latin); font-size: 13px; font-weight: 500; letter-spacing: .32em; line-height: 2; margin: 0 0 6px; }
.work[hidden] { display: none; }
/* 事例の動き */
.work .ph img { opacity: 0; transition: opacity .9s linear .15s, transform 1.2s ease; }
.work .ph img.ld { opacity: 1; }
.rv .work { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1), border-color .4s; }
.rv .work.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .work .ph img { opacity: 1; transition: none; } }
/* スマホだけ文字を1割大きく（2026-10-26） */
@media (min-width: 640px) {
  .workpage .d-title h1 { font-size: clamp(26px, 3.6vw, 40px); }
  .crumbs { font-size: 11px; }
  .d-contact .tel { font-size: 13px; }
  .message h2.label { font-size: 12px; }
}
