/* ==========================================================================
   LIFEART.lab — Base
   モダン・ミニマル基調 / 静かさと軽やかさの平衡
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-jp);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  letter-spacing: var(--ls-wide);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-spacing-trim: trim-start;
  text-wrap: pretty; /* バランスを自動調整（対応ブラウザのみ） */
}

/* 本文要素の統一 */
p, li {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  letter-spacing: var(--ls-wide);
}

/* 段落間の呼吸 */
p + p {
  margin-top: 1.6em;
}

/* コーチング・wordsページのみ、より広めの呼吸 */
body[data-page="coaching"] p,
body[data-page="words"] p {
  line-height: var(--lh-loose);
  letter-spacing: var(--ls-wider);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-base);
}

/* 本文中のリンクに、下からマーカーが引かれる演出
   p内・li内のリンクのみ対象。ナビ・フッター・ボタンは除外。 */
p a, li a, blockquote a, .lead a, .quote a {
  background-image: linear-gradient(transparent 60%, rgba(168, 200, 224, 0.4) 60%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  transition: background-size var(--t-base), color var(--t-base);
}
p a:hover, li a:hover, blockquote a:hover, .lead a:hover, .quote a:hover {
  background-size: 100% 100%;
  color: var(--color-text);
}
/* coaching/words ではマーカーを rose 系に */
body[data-page="coaching"] p a,
body[data-page="words"]    p a,
body[data-page="coaching"] li a,
body[data-page="words"]    li a {
  background-image: linear-gradient(transparent 60%, rgba(245, 168, 184, 0.42) 60%);
}

/* マーカー演出を除外する場所 (ナビ・フッター・ボタン・breadcrumb等) */
.btn,
.btn a,
.nav-link,
.global-nav a,
.megamenu a,
.site-logo,
.site-logo a,
.site-footer a,
.breadcrumb a,
.skip-link,
.figure-card__link,
.card__more,
.card--link,
.sns-list a,
.lineage-item a {
  background-image: none !important;
  background-size: auto !important;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0 0 1.5em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-jp);
  line-height: var(--lh-tight);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

/* 大見出し（h1）は字間広め */
h1 { letter-spacing: var(--ls-wider); }

/* 見出し下と前後の余白を整える */
h1, h2 { margin-bottom: var(--space-4); }
h3 { margin-bottom: var(--space-3); }
h1 + p, h2 + p, h3 + p { margin-top: var(--space-4); }

/* 装飾欧文タイトル: 字間を詰めめに */
.section-title-en {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: var(--ls-normal);
  line-height: 1.1;
}

blockquote {
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

hr {
  border: 0;
  height: 1px;
  background: var(--color-line);
  margin: var(--space-6) 0;
}

::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

*:focus-visible {
  outline: 2px solid var(--color-brand-sky);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* coaching/words ではフォーカスリングを rose に */
body[data-page="coaching"] *:focus-visible,
body[data-page="words"]    *:focus-visible {
  outline-color: var(--color-brand-rose);
}

/* === タイポグラフィユーティリティ === */
.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
  display: inline-block;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 12px;
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: var(--fs-xl);
  margin-block: 0.6em 1em;
  letter-spacing: 0.06em;
}

.section-title-en {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
  color: var(--color-text);
  margin-block: 0 0.4em;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.lead {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  color: var(--color-text-soft);
  line-height: 2;
  max-width: 56ch;
}

.kicker {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  font-size: 0.95rem;
}

/* 強調・引用 */
strong, b {
  font-weight: 700;
  color: var(--color-text);
}
em, i {
  font-style: italic;
  color: var(--color-text);
}

/* 引用ブロック: 左罫線 (rose) + 文字色をやや薄く */
blockquote, .quote {
  margin: var(--space-5) 0;
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  border-left: 2px solid var(--color-brand-rose);
  color: var(--color-text-soft);
  font-style: italic;
  letter-spacing: var(--ls-wider);
}
blockquote p, .quote p { margin: 0 0 0.5em; }
blockquote p:last-child, .quote p:last-child { margin-bottom: 0; }
.quote__source,
blockquote cite {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-mute);
  font-style: normal;
  letter-spacing: var(--ls-wide);
}

/* === 装飾線（セクション末尾） === */
.deco-line {
  width: 56px;
  height: 2px;
  margin: var(--space-5) auto 0;
  background: var(--gradient-line);
  border-radius: var(--radius-full);
  opacity: 0.7;
}

/* === scroll reveal（IntersectionObserverで .reveal--visible 付与） === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms cubic-bezier(.22, .61, .36, 1),
    transform 700ms cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
/* 段階的発火（同じセクション内の複数要素を順次） */
.reveal.reveal--d1 { transition-delay: 100ms; }
.reveal.reveal--d2 { transition-delay: 200ms; }
.reveal.reveal--d3 { transition-delay: 300ms; }
.reveal.reveal--d4 { transition-delay: 400ms; }
.reveal.reveal--d5 { transition-delay: 500ms; }

/* === スキップリンク（A11y） === */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-3);
  padding: 12px 18px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  z-index: 1000;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

/* 視覚的に隠すユーティリティ（スクリーンリーダー向け） */
.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;
}

/* ============================================================
   prefers-reduced-motion: ALL モーション無効化（Phase 5・必須）
   設計書 v2.3 第10章「禅の静けさ」を尊重し、
   モーション削減を選んでいるユーザーには即時表示を保証する。
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
