/* 全セクション共通の土台。セクション固有の見た目は css/sections/*.css に書く */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.9;
  letter-spacing: 0.04em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-serif); font-weight: 500; line-height: 1.5; letter-spacing: 0.04em; }
p { margin: 0; }

/* 日本語の改行：言葉の途中で折り返さない・最後の行に1〜2文字だけ残さない */
body { line-break: strict; overflow-wrap: anywhere; }
h1, h2, h3, h4, .eyebrow, .btn, dt, th, summary { word-break: auto-phrase; text-wrap: balance; overflow-wrap: normal; }
p, li, dd, td { word-break: auto-phrase; text-wrap: pretty; }
/* 意味のかたまりを1行に保つ：<span class="nb">業務を、</span><span class="nb">ひとつの仕組みに。</span> */
.nb { display: inline-block; }
/* 画面幅で改行を出し分ける */
@media (max-width: 860px) { .br-pc { display: none; } }
@media (min-width: 861px) { .br-sp { display: none; } }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--on-dark); padding: 8px 16px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* 粒子の舞台：画面に固定し、セクションの背景より上・文字より下に置く */
#particle-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: var(--z-stage);
  pointer-events: none;
}

/* セクションの共通枠 */
.section { position: relative; padding: var(--section-pad) 0; }
.section > .inner, .section .inner {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section--dark { background: var(--ink); color: var(--on-dark); }
.section--paper { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }

/* 見出しまわりの共通部品 */
.eyebrow {
  display: inline-block;
  font-family: var(--font-latin);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.section--dark .eyebrow { color: var(--gold-light); }
.section-title { font-size: var(--fs-h2); margin-top: 12px; }
.section-lead { margin-top: 20px; max-width: 40em; color: var(--muted); }
.section--dark .section-lead { color: var(--on-dark-muted); }
.numeral {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: var(--fs-numeral);
  line-height: 1;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.rule { border: 0; border-top: var(--rule); margin: 0; }
.section--dark .rule { border-top-color: var(--line-dark); }

/* 左に見出し・右に中身の非対称レイアウト（カード型を使わないための基本形） */
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 32px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-sans); font-weight: 500; font-size: 0.9375rem; letter-spacing: 0.12em;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.btn:hover { background: transparent; color: var(--gold); }
.btn--ghost { background: transparent; color: var(--gold-deep); }
.btn--ghost:hover { background: var(--gold); color: var(--ink); }
.btn .arrow { width: 18px; height: 1px; background: currentColor; position: relative; }
.btn .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

/* スクロールで現れる（js/main.js が .is-in を付ける）。隠すのは JS が動くとき（<html class="js">）だけ。JS が止まっても本文とフォームは見える */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 印刷：まだ画面に入っていない部分も全部見せ、粒子は出さない */
@media print {
  #particle-stage, .site-header { display: none !important; }
  .js .reveal, .reveal { opacity: 1 !important; transform: none !important; }
  .m-split *, .m-curtain, .m-curtain * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
