/* 全体の色・文字・初期化を担当する基礎CSS。
 * ほかのCSSより先に読み込み、3色と共通寸法の正本とする。 */

:root {
  --paper: #fdfdfb;
  --ink: #1c1c1a;
  --vermilion: #d43d2a;
  --surface: var(--paper);
  --text: var(--ink);
  --line: rgba(28, 28, 26, .2);
  --soft-line: rgba(28, 28, 26, .1);
  --muted-text: rgba(28, 28, 26, .68);
  --display-band: rgba(28, 28, 26, .026);
  --ease-gallery: cubic-bezier(.22, 1, .36, 1);
  --duration-ui: .4s;
  --space-section: clamp(8rem, 16vw, 13.75rem);
  --type-hero: clamp(2.5rem, 6vw, 4rem);
  --type-section: clamp(2rem, 4vw, 2.625rem);
  --type-card: 1.25rem;
  --type-body: 1rem;
  --type-small: .75rem;
}

body.theme-dark {
  --surface: var(--ink);
  --text: var(--paper);
  --line: rgba(253, 253, 251, .26);
  --soft-line: rgba(253, 253, 251, .12);
  --muted-text: rgba(253, 253, 251, .7);
  --display-band: rgba(253, 253, 251, .035);
}

/* 墨面では小さい朱文字を白へ反転し、通常文字のコントラストを保つ。 */
body.theme-dark .hero-label,
body.theme-dark .process-number {
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scrollbar-gutter: stable;
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

html.intro-active,
html.intro-active body {
  overflow: hidden;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  background: var(--surface);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  font-size: 16px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

/* 画像の内在比を維持し、親要素からのはみ出しを防ぐ。 */
img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

svg,
canvas {
  display: block;
}

button,
a,
input {
  color: inherit;
}

button,
input {
  font: inherit;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}

p,
h1,
h2,
h3,
figure,
ol,
dl,
dd {
  margin: 0;
}

ol {
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* 必須vendorが付加する共通営業UIは、作品サイト内では表示しない。 */
.template-request-button,
[data-template-request-button] {
  display: none !important;
}

::selection {
  color: var(--paper);
  background: var(--vermilion);
}

:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 4px;
  transition: outline-color var(--duration-ui) var(--ease-gallery);
}

.visually-hidden {
  position: absolute;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 1000;
  padding: .55rem .9rem;
  color: var(--paper);
  background: var(--ink);
  font-family: Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: var(--type-small);
  transform: translateY(-160%);
  transition: transform .3s var(--ease-gallery);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ページ全体の整列軸を管理する唯一の外枠上限。削除禁止。 */
.inner {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.eyebrow,
.room-number {
  font-family: Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: var(--type-small);
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.5;
}

.room-number {
  color: var(--muted-text);
}

.section-title {
  margin-top: 1.25rem;
  font-size: var(--type-card);
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.7;
}

.room-band {
  color: var(--text);
  background: var(--surface);
}

.room-band-display {
  background: var(--display-band);
}

.js:not(.intro-done) [data-intro-follow],
.js:not(.intro-done) .hero-title,
.js:not(.intro-done) .hero-logo-dot,
.js:not(.intro-done) .hero-gesture-path {
  opacity: 0;
}

/* 外部JSが止まった場合は線を残し、準備中だけ一瞬の完成形表示を防ぐ。 */
.js:not(.room-strokes-ready) .room-stroke-path {
  opacity: 0;
}
