/* ===========================================================
   base.css — 素の要素のタイポグラフィ
   =========================================================== */

body {
  font-family: var(--ff-jp);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: var(--c-accent);
  color: #fff;
}

/* --- 見出し ------------------------------------------------ */

.t-display,
.t-h1,
.t-h2,
.t-h3,
.t-h4 {
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-heading);
  text-wrap: balance;
  /* 日本語の禁則処理。長音符や小書き文字が行頭に来るのを防ぐ */
  line-break: strict;
  /* 文節単位で折り返す（Chrome 119+。非対応ブラウザでは無視される） */
  word-break: auto-phrase;
}

.t-display {
  font-family: var(--ff-en);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
}

.t-h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
}

.t-h2 {
  font-size: var(--fs-h2);
}

.t-h3 {
  font-size: var(--fs-h3);
}

.t-h4 {
  font-size: var(--fs-h4);
}

/* 英字の小見出しラベル: SERVICES / NEWS など */
.t-label {
  font-family: var(--ff-en);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
}

.t-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background-color: currentColor;
  flex: none;
}

.t-lead {
  font-size: var(--fs-lead);
  line-height: 1.8;
  color: var(--c-ink-mute);
  text-wrap: pretty;
}

.t-mute {
  color: var(--c-ink-mute);
}

.t-en {
  font-family: var(--ff-en);
}

/* 日付など */
.t-meta {
  font-family: var(--ff-en);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  color: var(--c-ink-faint);
}

/* --- リンク ------------------------------------------------ */

.t-link {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease);
}

.t-link:hover {
  color: var(--c-accent-hover);
}

/* --- 本文（記事など、生タグに効かせたい範囲） -------------- */

.t-prose {
  max-width: var(--w-prose);
}

.t-prose > * + * {
  margin-top: var(--sp-lg);
}

.t-prose h2 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--c-line);
}

.t-prose h3 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  margin-top: var(--sp-xl);
}

.t-prose a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.t-prose ul,
.t-prose ol {
  padding-left: 1.5em;
}

.t-prose ul {
  list-style: disc;
}

.t-prose ol {
  list-style: decimal;
}

.t-prose li + li {
  margin-top: var(--sp-xs);
}

.t-prose img {
  border-radius: var(--r-md);
}

/* --- アクセシビリティ ユーティリティ ---------------------- */

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

.u-skip-link {
  position: absolute;
  top: var(--sp-xs);
  left: var(--sp-xs);
  z-index: calc(var(--z-header) + 10);
  padding: var(--sp-sm) var(--sp-md);
  background-color: var(--c-ink);
  color: var(--c-ink-inverse);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}

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

/* --- 汎用 -------------------------------------------------- */

.u-nowrap {
  white-space: nowrap;
}

/* 日本語の改行位置を単語単位で制御したいときに使う */
.u-wbr {
  display: inline-block;
}
