/* =========================================================
   base.css: リセット / デザイントークン / 基本タイポグラフィ
   配色はモバイルアプリ(apps/mobile/lib/main.dart RaichiColors)から継承。
   hex を先に宣言し、対応ブラウザでは続く oklch() が上書き（プログレッシブ・エンハンスメント）。
   純粋な黒・白は使わず、温かみのあるインク色・生成色を用いる。
   ========================================================= */

:root {
  /* --- ブランド / アクセント --- */
  --rose: #b04f61;            --rose: oklch(0.56 0.115 14);
  --rose-strong: #9a4150;     --rose-strong: oklch(0.50 0.12 12);   /* テキストリンク用に少し濃く */
  --rose-soft: #fff0f2;       --rose-soft: oklch(0.965 0.012 10);
  --rose-border: #ffd5cf;     --rose-border: oklch(0.89 0.05 25);

  --mint: #167d4c;            --mint: oklch(0.53 0.12 158);
  --mint-soft: #e4f7ec;       --mint-soft: oklch(0.96 0.03 158);

  --sky: #0b7896;             --sky: oklch(0.55 0.09 220);
  --sky-soft: #e1f5fa;        --sky-soft: oklch(0.96 0.022 215);

  --lemon: #e49b2c;           --lemon: oklch(0.74 0.13 73);
  --lemon-soft: #fff0d6;      --lemon-soft: oklch(0.96 0.035 80);
  --lemon-ink: #8a4f00;       --lemon-ink: oklch(0.45 0.10 65);

  --lavender: #765b9d;        --lavender: oklch(0.50 0.10 295);
  --lavender-soft: #f0ebf7;   --lavender-soft: oklch(0.95 0.02 300);

  /* --- 下地 / サーフェス --- */
  --bg: #fffbf5;              --bg: oklch(0.992 0.006 90);
  --surface: #fffefa;         --surface: oklch(0.997 0.003 95);
  --surface-warm: #fef2e2;    --surface-warm: oklch(0.96 0.02 75);
  --warm-border: #e3cdb0;     --warm-border: oklch(0.85 0.035 75);
  --warm-border-strong: #d0b489; --warm-border-strong: oklch(0.78 0.05 78);

  /* --- 文字色 --- */
  --ink: #3a4851;             --ink: oklch(0.37 0.018 233);
  --ink-soft: #667078;        --ink-soft: oklch(0.53 0.013 233);

  /* --- 状態色 --- */
  --safe: #167d4c;            --safe: oklch(0.53 0.12 158);
  --alert: #a94939;           --alert: oklch(0.53 0.12 32);
  --alert-soft: #ffe0e4;      --alert-soft: oklch(0.92 0.03 12);

  /* --- タイポグラフィ --- */
  --font-sans: "M PLUS Rounded 1c", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
               "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;

  /* --- 角丸（最大 8px の方針） --- */
  --radius-sm: 6px;
  --radius: 8px;

  /* --- 影（控えめ・温かいトーン） --- */
  --shadow-sm: 0 1px 2px rgba(58, 72, 81, 0.06);
  --shadow: 0 6px 20px rgba(58, 72, 81, 0.08);
  --shadow-lg: 0 14px 40px rgba(58, 72, 81, 0.12);

  /* --- レイアウト --- */
  --container: 72rem;
  --container-narrow: 52rem;
  --gutter: 1.25rem;
}

/* ---------- リセット ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* 固定ヘッダー分のアンカーオフセット */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0;
}

p { margin: 0; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rose-strong);
  text-underline-offset: 0.18em;
}
a:hover { text-decoration: underline; }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

strong { font-weight: 700; }

/* ---------- アクセシビリティ ---------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--rose);
  color: var(--surface);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0.75rem; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---------- レイアウトユーティリティ ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--rose-strong);
}

.section-title {
  font-size: 1.6rem;
  color: var(--ink);
}

.section-lead {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

@media (min-width: 48rem) {
  .section-title { font-size: 2rem; }
}

/* ---------- モーション軽減 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
