/* RNZ.COFFEE 基盤: 変数・リセット・文字。部品は components.css、ページ固有は pages/*.css */

:root {
  /* 色: Figma 変数「RNZ Web カラー」と同名（SPEC §2） */
  --paper: #fbfaf8;
  --plum: #2e2145;
  --plum-soft: #6b5a8a;
  --night: #120e22;
  --cream-text: #f3eee2;
  --plum-light: #ece5f4;
  --copper: #c87a55;
  --ink-2: #5a5162;
  --error-soft: #fbeeeb;
  --error: #b3402a;
  --lilac: #c3b2de;
  --muted: #b4ad9c;
  --cream-sub: #ded8ca;
  --lilac-soft: #ddd2eb;
  --mist: #f2eef7;
  --rule: #e4dcee;
  --copper-light: #e3a983;
  --brown-line: #dccbb6;
  --brown-light: #eee4d8;
  --ink: #2b2430;
  --plum-line: #d6cbe7;
  /* 変数に紐づいていない色（JSON の値そのまま） */
  --focus-ring: #d9cceb;

  /* 文字 */
  --ff-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ff-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --ff-en: "Playfair Display", "Times New Roman", serif;

  /* レイアウト: 900px 未満＝スマホ、900px 以上＝PC（SPEC §5） */
  --gutter: 24px;
  --wrap-max: 720px; /* スマホ幅で 899 付近まで広がったときの最大幅 */
  --header-h: 60px;
}

@media (min-width: 900px) {
  :root {
    --gutter: clamp(32px, 8.3333vw, 120px); /* 1440 で 120px、900 で 75px */
    --wrap-max: 1200px;
    --header-h: 84px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  margin: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

summary {
  cursor: pointer;
}

/* フォーカスは必ず見える（SPEC §5 アクセシビリティ）。入力欄は components.css 側で専用の見た目 */
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

::selection {
  background: var(--lilac-soft);
  color: var(--plum);
}

/* 文字のユーティリティ */
.ff-serif { font-family: var(--ff-serif); }
.ff-en { font-family: var(--ff-en); }

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--plum);
  font-size: 14px;
}

.skip-link:focus {
  top: 8px;
}

/* 改行制御: SP と PC で出し分ける <br> */
.sp-only { display: inline; }
.pc-only { display: none; }

@media (min-width: 900px) {
  .sp-only { display: none; }
  .pc-only { display: inline; }
}

html[lang="en"] body {
  line-break: auto;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
