/* 室礼 SHITSURAI — パターン16
   P5（名刺テーマ）を土台に、室礼とはを P6 の形＋P15 の四季写真に、円相を P15 の一筆の動きに、
   相談をダイアログのフォームにしたもの。 */

/* 動かす値（登録しておくと、対応しないブラウザでも最後の形で止まる） */
@property --stroke { syntax: "<angle>"; inherits: false; initial-value: 380deg; }
@property --wipe { syntax: "<percentage>"; inherits: false; initial-value: 115%; }

:root {
  --paper: #faf9f6;
  --tone: #f2f0ea;
  --ink: #1f1e1c;
  --text: #252421;
  --grey: #67635b;
  --line: rgba(37, 36, 33, .14);
  --gold: #8f7038;
  --gold-text: #7c612f;
  --gold-on-ink: #c6a66b;
  --on-ink: #eeebe4;
  --on-ink-sub: #a29d93;
  --line-on-ink: rgba(238, 235, 228, .16);
  --jp: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --latin: "Cormorant Garamond", "Noto Serif JP", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --brush: cubic-bezier(.6, .05, .3, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-stroke: cubic-bezier(.65, 0, .25, 1);   /* P15 の円相の一筆 */
  --err: #a3341f;
  --header-h: 72px;
  --wrap: 1216px;
  --gutter: 20px;
}
@media (min-width: 640px) { :root { --gutter: 40px; } }
@media (min-width: 1100px) { :root { --gutter: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--jp);
  font-size: 16px;
  line-height: 1.9;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* 日本語の改行：文節で折る。見出しは行の長さをそろえる */
:lang(ja) :is(h1, h2, h3, h4, p, li, dt, dd, a, span) { word-break: auto-phrase; line-break: strict; }
:is(p, li, dd) { text-wrap: pretty; }
.nw { white-space: nowrap; }
/* Cormorant の数字は旧式（1 が I に、3 が下に沈む）なので、そろった数字に切り替える */
.wordmark, .series__name, .tool__tech, .step__num, .contact__mail { font-variant-numeric: lining-nums tabular-nums; }
/* 内容の幅だけに引く 1px の線（.wrap の左右の余白にははみ出さない） */
.rule-top {
  background: linear-gradient(var(--rule, var(--line)), var(--rule, var(--line))) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
:is(h1, h2, h3, h4) { text-wrap: balance; font-feature-settings: "palt"; font-weight: 500; line-height: 1.45; letter-spacing: .04em; }

::selection { background: rgba(143, 112, 56, .24); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap {
  width: min(100%, calc(var(--wrap) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--on-ink); text-decoration: none;
}
.skip:focus { top: 12px; }

/* 文字の大きさ：見出し・小見出し・本文・注記の4段 */
.h2 { font-size: clamp(26px, 2.5vw, 34px); letter-spacing: .06em; }
.label {
  font-size: 18px; font-weight: 600; letter-spacing: .05em;
  color: var(--gold-text); font-feature-settings: "palt";
}
.label--on-ink { color: var(--gold-on-ink); }

/* ボタンとリンク */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 24px;
  border-radius: 999px; background: var(--ink); color: var(--on-ink);
  font-size: 14px; letter-spacing: .14em; text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: #3a3732; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { min-height: 56px; padding: 14px 40px; font-size: 16px; }
.btn--gold { background: var(--gold-on-ink); color: var(--ink); }
.btn--gold:hover { background: #d4b67d; }
.text-link {
  position: relative; display: inline-block; padding-block: 10px;
  text-decoration: none; letter-spacing: .08em;
}
.text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
  background: currentColor; transform-origin: right; transition: transform .35s var(--ease);
}
.text-link:hover::after { transform: scaleX(0); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(250, 249, 246, .94);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header__row { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.logo img { width: 30px; height: auto; }
.logo__ja { font-size: 20px; font-weight: 600; letter-spacing: .14em; line-height: 1; }
.logo__kana { font-size: 11px; letter-spacing: .24em; color: var(--grey); line-height: 1; padding-top: 4px; }
.logo__en { font-family: var(--latin); font-size: 21px; font-weight: 600; letter-spacing: .22em; line-height: 1; margin-right: -.22em; }
.logo__ai { color: var(--gold); animation: ai-gold .7s ease 1.9s both; }
/* 社名の出し方の切り替え（index.html の先頭の説明を参照）。既定は新しい形、html.brand-old で前の形 */
html:not(.brand-old) .brand-old-only, html.brand-old .brand-new-only { display: none; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 28px; font-size: 14px; letter-spacing: .1em; }
.nav__list a { position: relative; display: block; padding-block: 12px; text-decoration: none; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.nav__list a:hover::after { transform: scaleX(1); transform-origin: left; }
.btn--sm { min-height: 44px; padding: 8px 22px; }
/* 言語の切り替え（JP / EN）。PC はヘッダー、狭い画面はメニューの中 */
.lang { display: inline-flex; align-items: center; gap: 2px; font-family: var(--latin); font-size: 14px; letter-spacing: .12em; color: var(--grey); }
.lang button { min-width: 36px; min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer; color: inherit; letter-spacing: inherit; }
.lang button[aria-pressed="true"] { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
.lang button:hover { color: var(--text); }
.menu__lang { padding: 10px 0 0; }
.menu-btn {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  position: relative;
}
.menu-btn__bar {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease);
}
.menu-btn__bar:nth-of-type(2) { top: 18px; }
.menu-btn__bar:nth-of-type(3) { top: 25px; }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-of-type(2) { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-of-type(3) { transform: translateY(-3.5px) rotate(-45deg); }
.menu { background: var(--paper); border-bottom: 1px solid var(--line); }
.menu[hidden] { display: none; }
.menu__list { padding-block: 8px 20px; }
.menu__list a {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 17px; letter-spacing: .1em; text-decoration: none;
}

/* ---------- 一番上（P5 の文と並び。右に P15 の紙の上の円相） ---------- */
.hero {
  position: relative; overflow: clip;
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  padding-block: 48px 64px;
}
/* PC：内容の幅の中で、左に文、右の残りの幅の真ん中に円相。円相は文の高さの真ん中にそろう */
.hero__wrap {
  --copy: min(620px, 52vw);
  position: relative;
  display: grid; grid-template-columns: minmax(0, var(--copy)) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 72px); align-items: center;
}
.hero__copy { grid-area: 1 / 1; min-width: 0; }
.hero__enso { grid-area: 1 / 2; display: flex; justify-content: center; }
.enso {
  position: relative; aspect-ratio: 720 / 704;
  /* P15 と同じくらいの大きさ：1440 で約 200px、1920 以上で 240px、1024 で約 166px */
  width: min(100%, clamp(160px, calc(80px + 8.4vw), 240px));
}
.enso img { position: absolute; }
/* 円相の画像の地（#fbf9f5）は、ページの紙（#faf9f6）とほぼ同じ色なので、そのまま重ねる */
.enso-ring { inset: 0; width: 100%; height: 100%; }
.enso-dot { left: 73.43%; top: 19.57%; width: 19.13%; height: auto; }
/* 円相：先に金の点が置かれ、そのあと一筆で描かれる（1.1 秒・筆のカーブ・柔らかい筆先）。描き終わりに AI の字が金になる。
   画像から測った値（上が 0°、時計回り）：輪の中心は (48.5%, 49.9%)。起筆（濃く丸い入り）は 73°、
   収筆（かすれの先）は 44°。筆は時計回りに 331° 進む。マスクは起筆の少し手前 70° から時計回りに開く。
   350° まで開けば、収筆の先（70° から 334°）まで柔らかい端の外に出る。
   点の動きは backwards だけにする。置き終えたあと、マウスへ寄る動き（script.js）が transform を使えるように */
.js .enso-ring {
  -webkit-mask-image: conic-gradient(from 70deg at 48.5% 49.9%, #000 0deg, #000 var(--stroke), transparent calc(var(--stroke) + 14deg));
  mask-image: conic-gradient(from 70deg at 48.5% 49.9%, #000 0deg, #000 var(--stroke), transparent calc(var(--stroke) + 14deg));
  animation: enso-stroke 1.1s var(--ease-stroke) .8s backwards;
}
.js .enso-dot { animation: dot-place .56s cubic-bezier(.34, 1.32, .64, 1) .2s backwards; }
@keyframes enso-stroke { from { --stroke: -14deg; } to { --stroke: 350deg; } } /* -14deg：描き始める前は柔らかい端も見せない */
@keyframes dot-place { from { opacity: 0; transform: translate(-25%, -40%) scale(.9); } }

.lockup { margin-bottom: 44px; }
.wordmark {
  font-family: var(--latin); font-weight: 500;
  font-size: clamp(22px, 2.1vw, 30px); letter-spacing: .32em; line-height: 1.1;
  margin-right: -.32em;
}
.wordmark__ai { color: var(--gold); animation: ai-gold .7s ease 1.9s both; }
@keyframes ai-gold { from { color: var(--text); } }
.lockup__ja {
  position: relative; display: inline-block;
  margin-top: 14px; padding-bottom: 10px;
  font-size: 16px; letter-spacing: .4em; color: var(--grey); line-height: 1.4;
}
.lockup__ja::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: clamp(120px, 11vw, 168px); height: 2px; background: var(--gold);
}
.lockup__biz { margin-top: 14px; font-size: 14px; letter-spacing: .2em; color: var(--grey); line-height: 1.6; }
/* 新しい形：上が漢字の室礼、下がひらがなのしつらい（前の形の SHITSURAI と室礼の位置に入れ替え） */
.wordmark--ja { font-family: inherit; font-size: clamp(30px, 2.8vw, 40px); font-weight: 500; letter-spacing: .4em; margin-right: -.4em; }

.hero__title {
  font-size: clamp(56px, 5.6vw, 84px); font-weight: 500;
  line-height: 1.32; letter-spacing: .06em;
}
/* 英語：日本語の大きさのままだと4行に割れるので、見出しを詰めて小さくする。字間の広い飾りも英文では詰める */
html[lang="en"] .hero__title { font-size: clamp(44px, 4.2vw, 64px); letter-spacing: .01em; line-height: 1.18; }
html[lang="en"] :is(.lockup__kana, .lockup__biz) { letter-spacing: .08em; }
.hero__lead { margin-top: 28px; font-size: 18px; line-height: 1.95; max-width: 30em; }
/* 英文は日本語の行間（1.85〜1.95）だと間延びし、390px で3つ目の事業が1回のスクロールに収まらないので詰める */
html[lang="en"] :is(.hero__lead, .hero__note, .service-body p) { line-height: 1.6; }
html[lang="en"] .service-eg { gap: 2px 18px; margin-top: 6px; }
html[lang="en"] .service-eg li { line-height: 1.55; }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.hero__note { margin-top: 18px; font-size: 14px; color: var(--grey); letter-spacing: .04em; }
.hero__case {
  display: inline-flex; gap: 16px; align-items: baseline;
  margin-top: 44px; padding: 14px 0 0; border-top: 1px solid var(--line);
  font-size: 14px; text-decoration: none; letter-spacing: .04em;
}
.hero__case-label { color: var(--gold-text); letter-spacing: .3em; flex: none; }
.hero__case:hover span:last-child { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- できること（P15 の形を、このページの色と字に合わせたもの） ---------- */
.services { padding-block: 112px 120px; }
.section-head { margin-bottom: 40px; }
.spaced-title { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: .5em; line-height: 1.5; color: var(--gold-text); }
.section-lead { margin-top: 14px; font-size: 16px; line-height: 1.9; color: var(--grey); }
.service-list { border-top: 1px solid rgba(37, 36, 33, .3); }
/* 1行：金の短い線・名前・説明と例・相談する。行全体が「相談する」のリンクの押せる面になる */
.service {
  position: relative; z-index: 0;
  display: grid; grid-template-columns: 22px minmax(0, .95fr) minmax(0, 1.25fr) auto; gap: 26px; align-items: start;
  padding: 32px 12px 34px;
  border-bottom: 1px solid var(--line);
  transition: transform 160ms var(--ease-out);
}
.service::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tone); opacity: 0; transition: opacity 150ms ease; }
.dash { display: block; width: 22px; height: 1.5px; margin-top: 17px; background: var(--gold); transform-origin: left center; transition: transform 220ms var(--ease-out); }
.service-title { font-size: clamp(19px, 1.65vw, 22px); font-weight: 600; line-height: 1.65; letter-spacing: .06em; }
.service-body p { font-size: 16px; line-height: 1.85; }
.service-eg { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.service-eg li { position: relative; padding-left: 14px; font-size: 14px; line-height: 1.8; color: var(--grey); }
.service-eg li::before { content: ""; position: absolute; left: 0; top: .8em; width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--gold); }
.service-link {
  align-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0 8px 14px;
  font-size: 14px; font-weight: 600; letter-spacing: .12em; white-space: nowrap; color: var(--gold-text); text-decoration: none;
}
.service-link::after { content: ""; position: absolute; inset: 0; }
.service-link:focus-visible { outline: none; }
.service:has(.service-link:focus-visible) { outline: 2px solid var(--gold); outline-offset: -2px; }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; transition: transform 200ms var(--ease-out); }
.service-link .dot { color: var(--gold); }
.service:has(.service-link:active) { transform: scale(.99); }
.service-link:active .dot { transform: scale(.8); transition-duration: 100ms; }
@media (hover: hover) and (pointer: fine) {
  .service:hover::before { opacity: 1; }
  .service:hover .dash { transform: scaleX(1.8); }
  .service:hover .service-link .dot { transform: scale(1.45); }
}

/* ---------- 左右2列の章（ナレッジ） ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; }

/* ---------- 室礼とは（P6 の形：左に写真、右に説明） ---------- */
.origin { padding-block: 128px 136px; }
.origin__grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 40px clamp(38px, 5vw, 86px); align-items: center; }
.origin-media { position: relative; }
.still { position: relative; margin: 0; aspect-ratio: 1350 / 760; overflow: hidden; background: #e7e0d3; transition: transform 160ms var(--ease-out); }
.still-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.still-img.is-front { opacity: 1; z-index: 2; transition: opacity 600ms ease; }
.still-img.is-behind { opacity: 1; z-index: 1; }
.still figcaption {
  position: absolute; z-index: 3; inset: 0 auto 0 0; width: 22%;
  display: grid; place-content: center;
  background: url("assets/shitsurai/ink-band.webp") left center / 100% 100% no-repeat;
  color: var(--on-ink); writing-mode: vertical-rl;
  font-size: clamp(22px, 2.1vw, 36px); font-weight: 500; line-height: 1.3; letter-spacing: .22em;
}
/* 写真の右下に、いまの季節の一字。細く、淡い白で、写真と一緒に替わる */
.season-mark { position: absolute; z-index: 3; right: 3.2%; bottom: 5%; display: grid; pointer-events: none; }
.season-mark > span {
  grid-area: 1 / 1; opacity: 0;
  font-size: clamp(14px, 1.2vw, 18px); font-weight: 400; line-height: 1; letter-spacing: 0;
  /* 右下はどの季節も棚の濃い木の面なので、影なしで読める */
  color: rgba(255, 255, 255, .74);
  transition: opacity 600ms ease;
}
.season-mark > .is-on { opacity: 1; }
/* 写真全体が押せるボタン（写真の上にちょうど重ねる） */
.season-btn { position: absolute; inset: 0; z-index: 4; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.season-btn[hidden] { display: none; }
.season-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.origin-media:has(.season-btn:active) .still { transform: scale(.99); }
/* PC：写真の上下を右の説明の高さにそろえる（案6 と同じくらいの縦横の比になる） */
@media (min-width: 960px) {
  .origin__grid { align-items: stretch; }
  .origin__body { align-self: center; }
  .still { height: 100%; aspect-ratio: auto; min-height: 360px; }
  .still-img { object-position: 66% 50%; } /* 案6 と同じ。縦長に近づいても右の器が切れにくい */
}
.reading { font-size: .62em; letter-spacing: 0; }
.origin__text { margin-top: 20px; font-size: 17px; line-height: 2.05; max-width: 34em; }
.origin__aim { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.origin__aim + .origin__text { margin-top: 10px; }

/* ---------- 事例 ---------- */
.works { background: var(--tone); padding-block: 128px; }
.works__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 64px; align-items: end; }
.works__intro { font-size: 16px; color: var(--grey); max-width: 34em; }
.works__grid {
  margin-top: 56px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px 64px; align-items: start;
}
.case {
  position: relative; color: var(--on-ink);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 40px;
  padding: 56px 104px 64px 56px; min-height: 100%;
  background:
    linear-gradient(var(--ink), var(--ink)) left top / calc(100% - 46px) 100% no-repeat,
    url("assets/shitsurai/band-edge-v.webp") right top / 48px 100% no-repeat;
}
.case__tag {
  display: inline-block; padding: 2px 14px; border: 1px solid var(--gold-on-ink);
  color: var(--gold-on-ink); font-size: 14px; letter-spacing: .3em; line-height: 1.7;
}
.case__title { font-size: clamp(22px, 2.1vw, 28px); line-height: 1.6; letter-spacing: .05em; }
.case__title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.case__title a:hover { background-size: 100% 1px; }
.case__text { margin-top: 20px; font-size: 16px; color: rgba(238, 235, 228, .82); max-width: 28em; }
.series__name {
  font-family: var(--latin); font-size: 22px; font-weight: 600; letter-spacing: .2em;
  font-feature-settings: normal; padding-bottom: 14px; border-bottom: 1px solid var(--text);
}
.tool { padding-block: 20px; border-bottom: 1px solid var(--line); }
.tool__name { font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.tool__name a { text-decoration: none; }
.tool__name a:hover { color: var(--gold-text); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.tool__text { margin-top: 6px; font-size: 15px; line-height: 1.85; }
.tool__tech { margin-top: 6px; font-family: var(--latin); font-size: 16px; font-weight: 600; letter-spacing: .08em; color: var(--grey); }

/* ---------- 進め方 ---------- */
.process { padding-block: 136px 128px; }
.steps {
  position: relative; margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px;
  padding-top: 32px;
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold);
  transform-origin: left; transition: transform 1.2s var(--brush);
}
.js .steps:not(.is-in)::before { transform: scaleX(0); }
.step__num {
  display: block; font-family: var(--latin); font-size: 48px; font-weight: 500; line-height: 1;
  color: var(--gold); font-variant-numeric: lining-nums tabular-nums;
}
.step__name { margin-top: 18px; font-size: 20px; font-weight: 600; }
.step p { margin-top: 10px; font-size: 15.5px; line-height: 1.9; }
.values { margin-top: 104px; }
.values__list { margin-top: 20px; border-top: 1px solid var(--line); }
.value {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 64px;
  padding-block: 26px; border-bottom: 1px solid var(--line);
}
.value dt { font-size: 20px; font-weight: 600; letter-spacing: .04em; line-height: 1.6; font-feature-settings: "palt"; }
.value dd { font-size: 16px; line-height: 1.9; }

/* ---------- プロフィール ---------- */
.profile { padding-block: 0 128px; }
.profile__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; align-items: center; padding-top: 128px; }
.profile__mark { width: clamp(160px, 20vw, 260px); justify-self: center; }
.profile__name { margin-top: 20px; font-size: 20px; font-weight: 600; letter-spacing: .06em; }
.profile__lead { margin-top: 20px; font-size: 18px; line-height: 1.9; }
.profile__text > p:not([class]) { margin-top: 16px; font-size: 16px; max-width: 36em; }
.profile__link { margin-top: 20px; }

/* ---------- ナレッジ ---------- */
.knowledge { padding-block: 0 136px; }
.knowledge__row { padding-top: 72px; }
.knowledge__row .h2 { font-size: clamp(22px, 2vw, 28px); }
.knowledge__status {
  display: inline-block; margin-top: 16px; padding: 2px 14px; border: 1px solid var(--gold);
  color: var(--gold-text); font-size: 14px; letter-spacing: .3em; line-height: 1.7;
}

/* ---------- 相談する ---------- */
.contact__edge {
  height: clamp(28px, 4vw, 60px); margin-bottom: -1px;
  background: url("assets/shitsurai/band-edge-h.webp") center bottom / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--wipe) - 15%), transparent var(--wipe));
  mask-image: linear-gradient(to right, #000 calc(var(--wipe) - 15%), transparent var(--wipe));
  transition: --wipe 1.2s var(--brush);
}
.js .contact__edge:not(.is-in) { --wipe: 0%; }
.contact__body { background: var(--ink); color: var(--on-ink); padding-block: 88px 96px; }
.contact__row { display: flex; flex-direction: column; align-items: flex-start; }
.contact__lead { margin-top: 22px; font-size: 17px; color: rgba(238, 235, 228, .86); }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-sub); }
.footer__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding-block: 28px 36px; --rule: var(--line-on-ink); font-size: 14px; letter-spacing: .08em;
}
.footer__row small { font-size: 14px; }
.footer__row a { display: inline-block; padding-block: 10px; text-decoration: none; }
.footer__row a:hover { color: var(--on-ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 各章の出現（JS が動くときだけ隠す） ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* 背の低いノートPC：一番上を1画面に収める */
@media (min-width: 960px) and (max-height: 820px) {
  .hero { padding-block: 32px 40px; }
  .lockup { margin-bottom: 28px; }
  .hero__title { font-size: clamp(52px, 5vw, 72px); }
  .hero__lead { margin-top: 20px; }
  .hero__actions { margin-top: 28px; }
  .hero__case { margin-top: 28px; }
}

/* ---------- タブレット・スマホ ---------- */
@media (max-width: 959px) {
  :root { --header-h: 60px; }
  .nav { gap: 8px; }
  .nav__list, .lang--header { display: none; }
  .menu-btn { display: block; }

  .hero { display: block; min-height: 0; padding-block: 0 48px; }
  /* タブレット・スマホ：円相は社名の右に並べる */
  .hero__wrap { --enso-m: clamp(128px, 43vw, 140px); display: block; } /* P15 のスマホと同じ 140px（320 では 138px） */
  .hero__enso { position: absolute; top: 16px; right: var(--gutter); }
  .enso { width: var(--enso-m); }
  .lockup {
    height: calc(var(--enso-m) * 704 / 720 + 32px); margin-bottom: 0;
    display: flex; flex-direction: column; justify-content: center;
    max-width: calc(100% - var(--enso-m) - 16px);
  }
  .wordmark { font-size: clamp(16px, 4.6vw, 22px); letter-spacing: .26em; margin-right: 0; }
  .wordmark--ja { font-size: clamp(22px, 6.4vw, 30px); letter-spacing: .32em; }
  .logo__en { font-size: 18px; letter-spacing: .16em; margin-right: -.16em; }
  .lockup__ja { margin-top: 10px; font-size: 14px; }
  .lockup__ja::after { width: 96px; }
  .lockup__biz { margin-top: 10px; font-size: 12px; letter-spacing: .14em; }
  .hero__title { font-size: clamp(38px, 11vw, 64px); }
  html[lang="en"] .hero__title { font-size: clamp(32px, 8.6vw, 52px); }
  .hero__lead { margin-top: 20px; font-size: 16px; line-height: 1.9; }
  .hero__actions { margin-top: 28px; gap: 8px 28px; }
  .hero__case { margin-top: 28px; }

  /* できること：線・名前の2列にして、説明と「相談する」は名前の下に並べる（P15 と同じ） */
  .services { padding-block: 88px 80px; }
  .section-head { margin-bottom: 28px; }
  .service { grid-template-columns: 22px minmax(0, 1fr); gap: 8px 18px; padding: 26px 4px 28px; }
  .service-body, .service-link { grid-column: 2; }
  .service-link { justify-self: start; padding-left: 0; }

  .split, .works__head, .works__grid, .profile__grid, .value, .origin__grid { grid-template-columns: minmax(0, 1fr); }
  .origin { padding-block: 80px 96px; }
  .origin__text { font-size: 16px; }
  .still { aspect-ratio: 1.65; } /* 案6 のスマホと同じ比 */
  .works { padding-block: 88px; }
  .works__grid { margin-top: 36px; }
  .case { padding: 40px 64px 44px 28px; }
  .process { padding-block: 96px 88px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 8px; margin-top: 32px; }
  .step { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 8px; padding-block: 18px; border-bottom: 1px solid var(--line); }
  .step__num { grid-row: span 2; font-size: 36px; }
  .step__name { margin-top: 0; font-size: 18px; }
  .step p { margin-top: 4px; }
  .values { margin-top: 72px; }
  .value { gap: 6px; padding-block: 22px; }
  .value dt { font-size: 18px; }
  .profile { padding-block: 0 88px; }
  .profile__grid { padding-top: 88px; }
  .profile__mark { justify-self: start; width: 140px; }
  .knowledge { padding-block: 0 96px; }
  .knowledge__row { padding-top: 56px; }
  .contact__body { padding-block: 64px 80px; }
}
@media (max-width: 640px) {
  .contact__row .btn { width: 100%; }
  .still figcaption { width: 74px; font-size: 22px; }
}
@media (max-width: 400px) {
  .hero__actions .btn--lg { padding-inline: 32px; }
  /* 英語はボタンと「See what we do」が長く2段に割れるので、1段に収める */
  html[lang="en"] .hero__actions { column-gap: 20px; }
  html[lang="en"] .hero__actions .btn--lg { padding-inline: 24px; }
}
@media (max-width: 374px) {
  .logo__kana { display: none; }
  /* ローマ字の社名がボタンに重ならないよう、すき間とボタンの横の余白を詰める */
  .header__row { gap: 12px; }
  .nav .btn--sm { padding-inline: 16px; }
  .logo { gap: 6px; }
  .logo img { width: 26px; }
  .logo__en { font-size: 14px; letter-spacing: .1em; margin-right: -.1em; }
}

/* ---------- 相談のダイアログ（P15 のフォームを P5 の見た目に） ---------- */
html.is-dialog-open { overflow: hidden; }
/* 幅を取るスクロールバーがある端末だけ、消えた分の幅を残して本文が横にずれないようにする */
html.is-dialog-open.has-bar { scrollbar-gutter: stable; }
.dlg {
  width: min(720px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  background: var(--paper); color: var(--text);
  box-shadow: 0 40px 90px -40px rgba(20, 19, 17, .7);
}
.dlg::backdrop { background: rgba(20, 19, 17, .58); }
.dlg__sheet { position: relative; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 0 44px; }
.dlg__head {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-inline: -44px; padding: 22px 28px 14px 44px;
  background: var(--paper);
}
.dlg__head::after { content: ""; position: absolute; left: 44px; bottom: 0; width: 56px; height: 2px; background: var(--gold); }
.dlg__title { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: .2em; }
.dlg__close {
  position: relative; flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; cursor: pointer; transition: background-color .2s, transform 160ms var(--ease-out);
}
.dlg__close:hover { background: var(--tone); }
.dlg__close:active { transform: scale(.94); }
.dlg__close span::before, .dlg__close span::after { content: ""; position: absolute; left: 13px; right: 13px; top: 50%; height: 1.5px; background: var(--text); }
.dlg__close span::before { transform: rotate(45deg); }
.dlg__close span::after { transform: rotate(-45deg); }
.dlg__lead { margin-top: 18px; font-size: 15px; color: var(--grey); }
/* 開くときは短く浮かび上がり、閉じるときはそれより速く消える */
.dlg[open] { animation: dlg-in 220ms var(--ease-out); }
.dlg[open]::backdrop { animation: dlg-fade-in 220ms var(--ease-out); }
.dlg.is-closing { animation: dlg-out 150ms var(--ease-out) forwards; }
.dlg.is-closing::backdrop { animation: dlg-fade-out 150ms var(--ease-out) forwards; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes dlg-fade-in { from { opacity: 0; } }
@keyframes dlg-fade-out { to { opacity: 0; } }

.form-sheet { padding-top: 6px; }
.form-legend { margin-top: 14px; font-size: 13.5px; color: var(--grey); }
.field { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.field-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0; font-weight: 600; font-size: 16.5px; letter-spacing: .06em; line-height: 1.6; }
.req, .opt { display: inline-block; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; line-height: 1.8; }
.req { background: var(--ink); color: var(--on-ink); }
.opt { border: 1px solid rgba(37, 36, 33, .3); color: var(--grey); font-weight: 500; }
.form-legend .req { margin-right: 2px; }
.field-help { margin-top: 2px; font-size: 13.5px; line-height: 1.7; color: var(--grey); }
/* 欄の補足は「必須」「任意」の右に並べる（入らない幅では次の行へ回る） */
.field-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.field-head .field-help { margin-top: 0; }
.field-label > .field-help { margin-top: 0; margin-left: 2px; font-weight: 400; letter-spacing: 0; }
.input {
  display: block; width: 100%; margin-top: 8px; min-height: 50px; padding: 11px 14px;
  border: 1px solid rgba(37, 36, 33, .34); border-radius: 4px; background: #fff;
  font-family: var(--jp); font-size: 16px; line-height: 1.6; color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-latin { font-variant-numeric: lining-nums; }
.input::placeholder { color: var(--grey); opacity: 1; }
.input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .input:hover { border-color: rgba(37, 36, 33, .6); } }
.textarea { min-height: 140px; resize: vertical; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: calc(50% + 4px); width: 8px; height: 8px; border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); transform: translateY(-75%) rotate(45deg); pointer-events: none; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
/* 選択肢：チェックすると、四角の中に金の点が置かれる */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px;
  border: 1px solid rgba(37, 36, 33, .22); border-radius: 4px; background: #fff;
  font-size: 15px; line-height: 1.6; cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), border-color 150ms ease, background-color 150ms ease;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.box { position: relative; flex: none; width: 20px; height: 20px; border: 1.5px solid rgba(37, 36, 33, .55); border-radius: 3px; background: #fff; }
.box::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--gold); opacity: 0; transform: scale(.6); transition: opacity 140ms var(--ease-out), transform 200ms var(--ease-out); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--tone); }
.choice:has(input:checked) .box { border-color: var(--ink); }
.choice:has(input:checked) .box::after { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { .choice:hover { border-color: rgba(37, 36, 33, .55); } }
/* 入力の不足：色だけに頼らず、文と記号と左の太線で示す */
.field-error { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--err); }
.field-error[hidden] { display: none; }
.field-error::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--err); color: #fff; font: 700 12px/1 var(--latin); }
.input[aria-invalid="true"] { border-color: var(--err); box-shadow: inset 4px 0 0 var(--err); padding-left: 18px; }
.field.is-invalid .choice { border-color: rgba(163, 52, 31, .55); }
.field.is-invalid .field-label::before { content: ""; width: 4px; align-self: stretch; background: var(--err); border-radius: 2px; }
.js .field-error:not([hidden]) { animation: err-in 180ms var(--ease-out); }
@keyframes err-in { from { opacity: 0; transform: translateY(-3px); } }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.btn-submit { min-width: 200px; border: 0; cursor: pointer; }
.form-summary { font-size: 14px; font-weight: 500; color: var(--err); }
/* 空のときも読み上げの対象に残す（display:none だと、出した瞬間の文を読まない読み上げソフトがある） */
.form-summary:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-summary:not(:empty):is([aria-busy] *) { color: var(--grey); }
.btn-submit:disabled { opacity: .6; cursor: progress; transform: none; }
/* 迷惑送信よけの欄：人には見せない（display:none だと入れない仕組みもあるので、画面の外へ置く） */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* 送れなかったとき：入力の下に、同じ内容のメールを作る道を出す */
.form-fallback { display: grid; justify-items: start; gap: 14px; margin-top: 20px; padding: 18px 20px; border-left: 3px solid var(--gold); background: var(--tone); }
.form-fallback[hidden] { display: none; }
.form-fallback:focus { outline: none; }
.form-fallback__msg { font-size: 15px; line-height: 1.8; }
.inquiry-done { display: grid; justify-items: start; gap: 14px; padding: 28px 0 8px; }
.inquiry-done[hidden] { display: none; }
.inquiry-done:focus { outline: none; }
.done-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); }
.done-title { font-size: clamp(20px, 2vw, 24px); font-weight: 500; line-height: 1.75; letter-spacing: .06em; }
.done-id { font-family: var(--latin); font-size: 15px; letter-spacing: .06em; color: var(--grey); font-variant-numeric: lining-nums tabular-nums; }
.done-id:empty { display: none; }
.btn-again { border: 0; background: none; cursor: pointer; font-size: 15px; }
.js .form-sheet.is-swapping .inquiry-done { animation: done-in 320ms var(--ease-out); }
.js .form-sheet.is-swapping .done-dot { animation: done-dot 420ms cubic-bezier(.34, 1.32, .64, 1) 80ms backwards; }
@keyframes done-in { from { opacity: 0; filter: blur(2px); transform: translateY(6px); } }
@keyframes done-dot { from { opacity: 0; transform: translate(-6px, -10px) scale(.9); } }

/* ダイアログの下：メールで直接送る場合 */
.mail-direct { margin: 36px -44px 0; padding: 24px 44px 30px; background: var(--tone); border-top: 1px solid var(--line); }
.mail-label { font-size: 14px; font-weight: 600; letter-spacing: .2em; color: var(--gold-text); }
.mail-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 8px; }
.mail-row { position: relative; display: inline-block; max-width: 100%; padding-bottom: 6px; }
.mail-address {
  display: block; font-family: var(--latin); font-weight: 600; font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: .04em; line-height: 1.3; font-variant-numeric: lining-nums; overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-color: rgba(37, 36, 33, .25); text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.mail-address:hover { text-decoration-color: var(--gold); }
.mail-sweep { position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--gold); clip-path: inset(0 100% 0 0); opacity: 0; }
.mail-row.is-copied .mail-sweep { clip-path: inset(0 0 0 0); opacity: 1; transition: clip-path 420ms var(--ease-out), opacity 120ms ease; }
.mail-row.is-fading .mail-sweep { clip-path: inset(0 0 0 0); opacity: 0; transition: opacity 300ms ease; }
.copy {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 20px 0 16px;
  border: 1px solid rgba(37, 36, 33, .3); border-radius: 999px; background: var(--paper);
  font-size: 14px; letter-spacing: .1em; cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), border-color 150ms ease;
}
.copy:active { transform: scale(.97); }
.copy:hover { border-color: var(--ink); }
.copy[data-state="done"] { border-color: var(--gold); }
.copy-icon, .copy-label { display: grid; place-items: center start; }
.copy-icon { place-items: center; width: 18px; height: 18px; }
.copy-icon > *, .copy-label > * { grid-area: 1 / 1; }
.copy-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.copy-icon .i-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.copy-label > * { white-space: nowrap; }
.copy-icon > *, .copy-label > * { transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out), filter 200ms var(--ease-out); }
.copy .i-dot, .copy .l-done, .copy .l-fallback { opacity: 0; transform: scale(.7); filter: blur(2px); }
.copy .l-done, .copy .l-fallback { transform: scale(.94); }
.copy[data-state="done"] .i-copy, .copy[data-state="done"] .l-idle,
.copy[data-state="fallback"] .i-copy, .copy[data-state="fallback"] .l-idle { opacity: 0; transform: scale(.9); filter: blur(2px); }
.copy[data-state="done"] .i-dot, .copy[data-state="done"] .l-done,
.copy[data-state="fallback"] .i-dot, .copy[data-state="fallback"] .l-fallback { opacity: 1; transform: none; filter: none; }
.copy[data-instant] .copy-icon > *, .copy[data-instant] .copy-label > * { transition: none; }

/* スマホ：画面いっぱいの紙。中だけがスクロールする */
@media (max-width: 640px) {
  .dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dlg__sheet { height: 100%; max-height: 100dvh; padding: 0 20px; }
  .dlg__head { margin-inline: -20px; padding: 14px 12px 12px 20px; }
  .dlg__head::after { left: 20px; }
  .choices, .field-row { grid-template-columns: minmax(0, 1fr); }
  .btn-submit { width: 100%; }
  .mail-direct { margin-inline: -20px; padding: 22px 20px calc(28px + env(safe-area-inset-bottom)); }
  .copy { flex: 1 1 100%; justify-content: center; }
}

/* ---------- 動きを減らす設定：最後の形をそのまま出す ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .dlg::backdrop { animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .contact__edge:not(.is-in) { --wipe: 115%; }
  .service:has(.service-link:active), .service-link:active .dot, .service:hover .dash, .service:hover .service-link .dot { transform: none; }
  .js .steps:not(.is-in)::before { transform: none; }
  .origin-media:has(.season-btn:active) .still, .choice:active, .copy:active, .dlg__close:active,
  .btn:hover { transform: none; }
  .enso-dot { transform: none !important; }
  .copy-icon > *, .copy-label > * { transform: none !important; filter: none !important; }
}
