/* ==========================================================================
   PureBeats.jp — 「小さな会社案内誌」
   和紙と墨、藍と珊瑚。罫線とノンブルで組む、一冊の冊子としてのサイト。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. トークン
   -------------------------------------------------------------------------- */
:root {
  /* 紙と墨 */
  --washi: #f4f1e8;
  --washi-deep: #ebe6d8;
  --paper: #fbf9f3;
  --sumi: #211f1a;
  --sumi-60: #6b675c;
  --keiline: rgba(33, 31, 26, 0.22);
  --keiline-strong: rgba(33, 31, 26, 0.55);

  /* 差し色 — 面積比 紙90:墨8:藍1.5:朱0.5 */
  --ai: #2a4a6b;
  --shu: #b9472f;

  /* 書体 */
  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  --font-roman: "EB Garamond", "Times New Roman", Georgia, serif;

  /* タイプスケール */
  --fs-hero: clamp(2.5rem, 6vw, 4.6rem);
  --fs-h2: clamp(1.7rem, 3.4vw, 2.7rem);
  --fs-h3: clamp(1.15rem, 1.8vw, 1.4rem);
  --fs-body: 1rem;
  --fs-small: 0.8125rem;
  --fs-nombre: 0.6875rem;

  /* 余白・グリッド */
  --side: clamp(20px, 5vw, 64px);
  --section-pad: clamp(88px, 12vw, 168px);
  --max: 1240px;
  --header-h: 72px;

  /* 所作 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-hover: cubic-bezier(0.33, 1, 0.68, 1);
}

/* --------------------------------------------------------------------------
   2. ベース組版
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--washi);
  color: var(--sumi);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 2.05;
  letter-spacing: 0.05em;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

/* 紙の質感 — ごく薄い粒子 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--shu);
  color: var(--washi);
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-feature-settings: "palt" 1;
  color: var(--sumi);
}

p {
  text-align: justify;
}

a {
  color: inherit;
}

.roman {
  font-family: var(--font-roman);
  font-feature-settings: normal;
  letter-spacing: 0.14em;
}

.nb {
  display: inline-block;
}

ruby > rt {
  font-size: 0.38em;
  color: var(--sumi-60);
  letter-spacing: 0.1em;
}

/* ノンブル(欄外のページ表記) */
.nombre {
  position: absolute;
  right: var(--side);
  bottom: 22px;
  font-size: var(--fs-nombre);
  font-style: italic;
  color: var(--sumi-60);
  letter-spacing: 0.18em;
}

/* 落款 */
.rakkan {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--shu);
  color: var(--washi);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
  transform: rotate(-2.5deg);
  user-select: none;
}

/* 記事末の ■ */
.essay p:last-child::after {
  content: "■";
  margin-left: 0.4em;
  font-size: 0.7em;
  color: var(--shu);
}

/* --------------------------------------------------------------------------
   3. オープニング(題字が刷られ、幕が上がる)
   -------------------------------------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--washi);
  clip-path: inset(0 0 0 0);
  visibility: hidden;
}

body.is-opening .loader,
body.is-closing-loader .loader {
  visibility: visible;
}

.loader__title {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  letter-spacing: 0.32em;
  color: var(--sumi);
  opacity: 0;
}

body.is-opening .loader__title {
  animation: print-in 0.9s var(--ease-out) 0.15s forwards;
  -webkit-mask-image: linear-gradient(to bottom, #000 46%, transparent 54%);
  mask-image: linear-gradient(to bottom, #000 46%, transparent 54%);
  -webkit-mask-size: 100% 300%;
  mask-size: 100% 300%;
  -webkit-mask-position: 0 100%;
  mask-position: 0 100%;
}

@keyframes print-in {
  from { opacity: 1; -webkit-mask-position: 0 100%; mask-position: 0 100%; }
  to   { opacity: 1; -webkit-mask-position: 0 0; mask-position: 0 0; }
}

body.is-closing-loader .loader {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease-inout);
}

body.is-closing-loader .loader__title {
  opacity: 1;
  transition: opacity 0.3s var(--ease-out);
}

/* --------------------------------------------------------------------------
   4. 出現の所作(data-reveal)
   -------------------------------------------------------------------------- */
[data-reveal] {
  transition-delay: calc(var(--d, 0) * 90ms);
}

[data-reveal="fade"] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.8s var(--ease-out) calc(var(--d, 0) * 90ms),
    transform 0.8s var(--ease-out) calc(var(--d, 0) * 90ms);
}

[data-reveal="fade"].is-in {
  opacity: 1;
  transform: none;
}

/* 行単位マスク — 明朝見出し用 */
[data-reveal="lines"] .nb {
  clip-path: inset(-0.2em -0.1em -0.25em -0.1em);
}

[data-reveal="lines"] .line-inner {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 1s var(--ease-out-expo);
}

[data-reveal="lines"] .nb:nth-child(2) .line-inner { transition-delay: 0.12s; }
[data-reveal="lines"] .nb:nth-child(3) .line-inner { transition-delay: 0.24s; }

[data-reveal="lines"].is-in .line-inner {
  transform: none;
}

/* 縦書き — 上から下へ、読字方向に開く */
[data-reveal="tate"] > span {
  clip-path: inset(-4% -0.75em 104% -0.75em);
  transition: clip-path 1.1s var(--ease-out-expo);
}

[data-reveal="tate"] > span:nth-child(2) { transition-delay: 0.16s; }
[data-reveal="tate"] > span:nth-child(3) { transition-delay: 0.32s; }

[data-reveal="tate"].is-in > span {
  clip-path: inset(-4% -0.75em -4% -0.75em);
}

/* 写真 — クリップワイプ + 内側の引き
   クリップは .fig__frame に、観測は figure 側に置く
   (clip-path で全隠しした要素は IntersectionObserver に観測されないため) */
[data-reveal="clip"] .fig__frame {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-out-expo) calc(var(--d, 0) * 90ms);
}

[data-reveal="clip"] .fig__frame > img {
  transform: scale(1.08);
  transition: transform 1.4s var(--ease-out-expo) calc(var(--d, 0) * 90ms);
}

[data-reveal="clip"].is-in .fig__frame {
  clip-path: inset(0);
}

[data-reveal="clip"].is-in .fig__frame > img {
  transform: none;
}

/* JS無効・IO非対応時のフェイルセーフ */
.no-js [data-reveal],
.no-js [data-reveal] .line-inner,
.no-js [data-reveal] > span,
.no-js [data-reveal] .fig__frame,
.no-js [data-reveal] .fig__frame > img {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

/* --------------------------------------------------------------------------
   5. ヘッダー・目次メニュー
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  padding-inline: var(--side);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(244, 241, 232, 0.92);
  border-bottom-color: var(--keiline);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.brand__name small {
  display: block;
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--sumi-60);
  letter-spacing: 0.22em;
}

.site-header__label {
  margin-inline: auto;
  font-size: var(--fs-nombre);
  font-style: italic;
  color: var(--sumi-60);
  letter-spacing: 0.2em;
}

.header-cta {
  white-space: nowrap;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  border: 1px solid var(--keiline-strong);
  padding: 8px 22px;
  transition: background 0.35s var(--ease-hover), color 0.35s var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .header-cta:hover {
    background: var(--sumi);
    color: var(--washi);
  }
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--sumi);
  transition: transform 0.45s var(--ease-out-expo);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(20deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-20deg);
}

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--washi-deep);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0s linear 0.5s;
}

.menu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s var(--ease-out);
}

.menu-panel__inner {
  width: min(480px, 84vw);
}

.menu-panel__label {
  font-size: var(--fs-nombre);
  font-style: italic;
  color: var(--sumi-60);
  letter-spacing: 0.24em;
  border-bottom: 1px solid var(--keiline);
  padding-bottom: 10px;
}

.menu-panel ol {
  margin: 18px 0 28px;
}

.menu-panel li + li {
  border-top: 1px solid var(--keiline);
}

.menu-panel li a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  transition: padding-left 0.4s var(--ease-hover), color 0.4s var(--ease-hover);
}

.menu-panel li a span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--sumi-60);
}

@media (hover: hover) and (pointer: fine) {
  .menu-panel li a:hover {
    padding-left: 14px;
    color: var(--ai);
  }
}

.menu-panel__note {
  font-size: var(--fs-small);
  color: var(--sumi-60);
  line-height: 2;
}

body.is-menu-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. 共通: セクション・章扉・図版
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  border-top: 1px solid var(--keiline);
  padding: var(--section-pad) var(--side);
}

.section > * {
  max-width: var(--max);
  margin-inline: auto;
}

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--keiline);
  padding-bottom: 14px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.chapter-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
}

.chapter-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3em;
}

.chapter-label {
  margin-left: auto;
  font-family: var(--font-roman);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--sumi-60);
  letter-spacing: 0.2em;
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.08em;
}

.section-lead {
  max-width: 36em;
  margin-top: 20px;
  color: var(--sumi-60);
}

/* 図版 — 全写真を一冊の図版言語に揃える */
.fig {
  margin: 0;
}

.fig__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--keiline);
}

.fig__frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.06) brightness(1.02);
  transition: transform 1.2s var(--ease-out-expo);
}

.fig__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (hover: hover) and (pointer: fine) {
  .fig__frame:hover img {
    transform: scale(1.04);
  }
}

.fig figcaption {
  margin-top: 10px;
  font-size: var(--fs-nombre);
  color: var(--sumi-60);
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.fig__num {
  font-style: italic;
  color: var(--ai);
  letter-spacing: 0.14em;
  margin-right: 0.5em;
}

/* --------------------------------------------------------------------------
   7. テキストリンク・ボタン
   -------------------------------------------------------------------------- */
.text-link {
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) no-repeat;
  background-size: 100% 1px;
  background-position: 0 calc(100% - 1px);
  transition: background-size 0.45s var(--ease-hover), background-position 0s 0.45s, color 0.35s var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover {
    color: var(--ai);
    background-size: 0% 1px;
    background-position: 100% calc(100% - 1px);
    transition: background-size 0.45s var(--ease-hover), color 0.35s var(--ease-hover);
  }
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--keiline-strong);
  padding: 16px 32px;
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  transition: border-color 0.35s var(--ease-hover);
}

.button__label {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.button__label::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
  color: var(--ai);
}

.button__label,
.button__label::after {
  transition: transform 0.5s var(--ease-out-expo);
}

.button__arrow {
  position: relative;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-hover);
}

.button__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 7px;
  height: 1px;
  background: currentColor;
  transform: rotate(-38deg);
  transform-origin: right bottom;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    border-color: var(--sumi);
  }
  .button:hover .button__label,
  .button:hover .button__label::after {
    transform: translateY(-100%);
  }
  .button:hover .button__arrow {
    width: 38px;
  }
}

/* --------------------------------------------------------------------------
   8. 表紙
   -------------------------------------------------------------------------- */
.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(var(--header-h) + 8px) var(--side) 64px;
  margin-top: calc(var(--header-h) * -1);
}

.cover__meta,
.cover__grid,
.cover__foot {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
}

.cover__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--fs-nombre);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sumi-60);
  border-bottom: 1px solid var(--keiline);
  padding-bottom: 12px;
}

.cover__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
  padding-block: clamp(40px, 6vh, 72px);
}

.cover__left {
  grid-column: 1 / 7;
}

.cover__logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.cover__motto {
  margin: 14px 0 36px;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sumi-60);
  letter-spacing: 0.1em;
}

.cover__fig {
  max-width: 420px;
}

.cover__right {
  grid-column: 8 / 13;
  justify-self: end;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.cover__title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  /* 最長行(7字+字間)が viewport 高に必ず収まるサイズまで縮める */
  font-size: min(var(--fs-hero), calc((100svh - 330px) / 8.6));
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
}

.cover__line {
  display: block;
  white-space: nowrap;
}

.cover__line + .cover__line {
  margin-block-start: 0.52em;
}

.rakkan--cover {
  margin-bottom: 0.4rem;
}

.cover__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  border-top: 1px solid var(--keiline);
  padding-top: 22px;
}

.cover__lead {
  max-width: 34em;
  font-size: var(--fs-small);
  color: var(--sumi-60);
  line-height: 2.1;
}

.cover__foot-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  white-space: nowrap;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.cover__foot-end .nombre {
  position: static;
}

/* スクロールの合図 — 唯一の例外ループ */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: block;
  padding: 12px;
  opacity: 0.8;
  transition: opacity 0.5s var(--ease-out);
}

body.has-scrolled .scroll-cue {
  opacity: 0;
  pointer-events: none;
}

.scroll-cue i {
  display: block;
  position: relative;
  width: 1px;
  height: 48px;
  background: var(--keiline);
  overflow: hidden;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--sumi);
  animation: cue-drop 2.8s var(--ease-inout) 3s infinite;
  opacity: 0;
}

@keyframes cue-drop {
  0% { transform: translateY(-16px); opacity: 0; }
  12% { opacity: 1; }
  60%, 100% { transform: translateY(50px); opacity: 1; }
}

/* --------------------------------------------------------------------------
   9. 目次
   -------------------------------------------------------------------------- */
.toc__head {
  display: flex;
  align-items: baseline;
  border-bottom: 1px solid var(--keiline);
  padding-bottom: 14px;
  margin-bottom: 28px;
}

.toc__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.3em;
}

.toc__list li + li {
  border-top: 1px dotted var(--keiline);
}

.toc__list a {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 4px;
  transition: color 0.35s var(--ease-hover), padding-left 0.4s var(--ease-hover);
}

@media (hover: hover) and (pointer: fine) {
  .toc__list a:hover {
    color: var(--ai);
    padding-left: 14px;
  }
}

.toc__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  min-width: 1.4em;
}

.toc__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.22em;
}

.toc__leader {
  flex: 1;
  border-bottom: 1px dotted var(--keiline);
  transform: translateY(-0.35em);
}

.toc__note {
  font-size: var(--fs-small);
  color: var(--sumi-60);
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   10. 一 ことば
   -------------------------------------------------------------------------- */
.kotoba__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.kotoba__title {
  grid-column: 1 / 5;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  justify-self: start;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1;
  border-right: 1px solid var(--keiline);
  padding-right: clamp(20px, 2.4vw, 36px);
}

.kotoba__line {
  display: block;
  white-space: nowrap;
}

.kotoba__line + .kotoba__line {
  margin-block-start: 0.85em;
}

.kotoba__body {
  grid-column: 6 / 12;
  align-self: center;
}

.kotoba__body p + p {
  margin-top: 2em;
}

/* --------------------------------------------------------------------------
   11. 二 しごと(罫線の表組み)
   -------------------------------------------------------------------------- */
.service-row {
  display: grid;
  grid-template-columns: 64px minmax(220px, 3fr) 7fr;
  gap: 24px;
  align-items: baseline;
  border-top: 1px solid var(--keiline);
  padding: clamp(28px, 4vw, 44px) 8px;
  transition: background 0.5s var(--ease-out);
}

.service-table .service-row:last-child {
  border-bottom: 1px solid var(--keiline);
}

@media (hover: hover) and (pointer: fine) {
  .service-row:hover {
    background: var(--washi-deep);
  }
}

.service-row__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
}

.service-row__head h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.service-row__en {
  display: block;
  margin-top: 6px;
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--ai);
  letter-spacing: 0.16em;
}

.service-row__body p {
  max-width: 38em;
}

.service-row__tags {
  margin-top: 12px;
  font-size: var(--fs-small);
  color: var(--sumi-60);
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   12. 三 実例
   -------------------------------------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
}

.case + .case {
  margin-top: clamp(56px, 8vw, 104px);
}

.case__fig {
  max-width: 420px;
}

.case--left .case__fig {
  grid-column: 1 / 6;
}

.case--left .case__text {
  grid-column: 7 / 13;
}

.case--right .case__fig {
  grid-column: 8 / 13;
  justify-self: end;
}

.case--right .case__text {
  grid-column: 1 / 7;
  order: -1;
}

.case__text h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.9;
}

.case__num {
  display: inline-block;
  margin-right: 0.9em;
  font-weight: 400;
  font-size: 0.85em;
  color: var(--ai);
  letter-spacing: 0.2em;
}

.case__text p {
  margin-top: 14px;
  max-width: 34em;
}

.case__tags {
  font-size: var(--fs-small);
  color: var(--sumi-60);
  letter-spacing: 0.08em;
}

.case-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: clamp(56px, 8vw, 104px);
}

.case-line {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-top: 1px solid var(--keiline);
  padding-top: 24px;
}

.case-line .fig--small {
  flex: 0 0 128px;
}

.case-line h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.9;
}

.case-line .case__tags {
  margin-top: 8px;
}

/* 間 — 空の帯 */
.interlude {
  position: relative;
  margin: 0;
  border-top: 1px solid var(--keiline);
  border-bottom: 1px solid var(--keiline);
  overflow: hidden;
}

.interlude img {
  display: block;
  width: 100%;
  height: clamp(200px, 30vw, 380px);
  object-fit: cover;
  filter: grayscale(0.55) contrast(1.02);
}

.interlude figcaption {
  position: absolute;
  right: var(--side);
  bottom: 14px;
  font-style: italic;
  font-size: var(--fs-nombre);
  letter-spacing: 0.16em;
  color: rgba(33, 31, 26, 0.55);
}

/* --------------------------------------------------------------------------
   13. 四 進めかた(工程表)
   -------------------------------------------------------------------------- */
.process-list {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}

.process-list::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--keiline);
}

.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 28px;
  padding-block: clamp(24px, 3.6vw, 40px);
}

.process-step__num {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: var(--washi);
  border: 1px solid var(--keiline);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.5s var(--ease-out), color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}

.process-step.is-active .process-step__num {
  background: var(--sumi);
  border-color: var(--sumi);
  color: var(--washi);
}

.process-step__body h3 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.process-step__body h3 .roman {
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-small);
  color: var(--ai);
}

.process-step__body p {
  margin-top: 8px;
  max-width: 36em;
  color: var(--sumi-60);
  transition: color 0.5s var(--ease-out);
}

.process-step.is-active .process-step__body p {
  color: var(--sumi);
}

/* --------------------------------------------------------------------------
   14. 五 会社(奥付)
   -------------------------------------------------------------------------- */
.kaisha {
  background: var(--paper);
}

.colophon {
  position: relative;
  max-width: 600px;
  margin-inline: auto;
  border-top: 3px double var(--keiline-strong);
  border-bottom: 3px double var(--keiline-strong);
  padding: clamp(36px, 5vw, 56px) clamp(16px, 3vw, 40px) clamp(44px, 6vw, 64px);
  text-align: center;
}

.colophon__title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.4em;
}

.colophon__label {
  display: block;
  margin: 8px 0 0;
  font-size: var(--fs-nombre);
}

.colophon__list {
  margin-top: 36px;
  text-align: left;
}

.colophon__list > div {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 16px;
  padding: 13px 4px;
  border-top: 1px solid var(--keiline);
}

.colophon__list > div:last-child {
  border-bottom: 1px solid var(--keiline);
}

.colophon__list dt {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.5em;
}

.colophon__list dd {
  margin: 0;
}

.colophon .rakkan {
  position: absolute;
  right: clamp(16px, 3vw, 40px);
  bottom: -1.2rem;
}

/* --------------------------------------------------------------------------
   15. 結び 相談
   -------------------------------------------------------------------------- */
.musubi__inner {
  max-width: 760px;
}

.musubi__lead {
  margin-top: 28px;
  max-width: 36em;
}

.musubi__topics {
  margin: 36px 0 44px;
  border-top: 1px solid var(--keiline);
}

.musubi__topics li {
  border-bottom: 1px dotted var(--keiline);
  padding: 13px 4px;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
}

.musubi__topics li::before {
  content: "—";
  margin-right: 1em;
  color: var(--ai);
}

.musubi__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.musubi__note {
  margin-top: 20px;
  font-size: var(--fs-small);
  color: var(--sumi-60);
}

.musubi__signature {
  display: block;
  width: 240px;
  height: auto;
  margin-top: 56px;
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   16. フッター
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--keiline);
  padding: 28px var(--side) 36px;
  font-size: var(--fs-small);
  color: var(--sumi-60);
}

.site-footer__copy {
  font-style: italic;
  letter-spacing: 0.14em;
}

.site-footer__place {
  letter-spacing: 0.3em;
}

/* --------------------------------------------------------------------------
   17. プライバシーポリシー(奥付と同じ組版)
   -------------------------------------------------------------------------- */
.policy-page {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(64px, 10vw, 120px) var(--side) 96px;
}

.policy-page .policy-logo {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.policy-page h1 {
  margin: 40px 0 24px;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--keiline);
  padding-bottom: 18px;
}

.policy-page section {
  margin-top: 40px;
}

.policy-page h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  padding-left: 14px;
  border-left: 2px solid var(--keiline-strong);
}

.policy-page h2 + p {
  margin-top: 12px;
}

.policy-page a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------------------
   18. スクロール連動の漸進的強化(対応ブラウザのみ)
   -------------------------------------------------------------------------- */
@supports (animation-timeline: view()) {
  .case__fig .fig__frame img,
  .interlude img {
    animation: drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }

  .case__fig .fig__frame img {
    scale: 1.07;
  }

  @keyframes drift {
    from { translate: 0 2.6%; }
    to   { translate: 0 -2.6%; }
  }
}

/* --------------------------------------------------------------------------
   19. レスポンシブ
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cover__left { grid-column: 1 / 7; }
  .cover__right { grid-column: 8 / 13; }

  .kotoba__title { grid-column: 1 / 5; }
  .kotoba__body { grid-column: 5 / 13; }

  .service-row {
    grid-template-columns: 52px 1fr;
  }
  .service-row__body {
    grid-column: 2;
  }

  .case--left .case__fig { grid-column: 1 / 6; }
  .case--left .case__text { grid-column: 6 / 13; }
  .case--right .case__fig { grid-column: 8 / 13; }
  .case--right .case__text { grid-column: 1 / 8; }
}

@media (max-width: 760px) {
  .site-header__label {
    display: none;
  }

  .header-cta {
    margin-left: auto;
  }

  .cover {
    min-height: auto;
  }

  .cover__meta {
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    gap: 12px;
  }

  .cover__meta span:nth-child(2) {
    display: none;
  }

  .cover__grid {
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
    padding-block: 44px;
  }

  .cover__left {
    grid-column: 1;
    grid-row: 1;
  }

  .cover__right {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .cover__title {
    font-size: clamp(2rem, 9.5vw, 2.7rem);
    max-height: none;
  }

  .cover__motto {
    margin-bottom: 28px;
  }

  .cover__fig {
    max-width: min(320px, 100%);
  }

  .cover__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .cover__foot-end {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .scroll-cue {
    display: none;
  }

  .toc__note {
    display: none;
  }

  .kotoba__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .kotoba__title {
    grid-column: 1;
    writing-mode: horizontal-tb;
    border-right: 0;
    border-left: 1px solid var(--keiline);
    padding: 4px 0 4px 20px;
    line-height: 1.8;
  }

  .kotoba__line {
    display: inline;
    white-space: normal;
  }

  .kotoba__line + .kotoba__line {
    margin: 0;
  }

  .kotoba__body {
    grid-column: 1;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .service-row__num {
    font-size: 1.3rem;
  }

  .service-row__body {
    grid-column: 1;
  }

  .case,
  .case-list {
    grid-template-columns: 1fr;
  }

  .case--left .case__fig,
  .case--left .case__text,
  .case--right .case__fig,
  .case--right .case__text {
    grid-column: 1;
  }

  .case--right .case__fig {
    justify-self: start;
  }

  .case--right .case__text {
    order: 1;
  }

  .case__fig {
    max-width: min(420px, 100%);
  }

  .process-list::before {
    left: 23px;
  }

  .process-step {
    grid-template-columns: 48px 1fr;
    gap: 20px;
  }

  .process-step__num {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .colophon__list > div {
    grid-template-columns: 4em 1fr;
  }

  .nombre {
    bottom: 14px;
  }
}

@media (max-width: 380px) {
  .cover__grid {
    grid-template-columns: 1fr;
  }

  .cover__right {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    align-items: flex-end;
  }

  .case-line {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   20. 動きを抑える設定
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  [data-reveal],
  [data-reveal] .line-inner,
  [data-reveal] > span,
  [data-reveal] .fig__frame,
  [data-reveal] .fig__frame > img {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .scroll-cue i::after {
    animation: none !important;
  }
}
