/* ==========================================================================
   base.css — トークン、リセット、タイポグラフィ、レイアウト土台
   ========================================================================== */

:root {
  /* パステルカラーパレット（背景・面の色） */
  --bg: #FFF9F2;
  --card: #FFFFFF;

  /* テキスト（黒は使わず、濃い紫がかった茶で代替する） */
  --ink: #4B3F52;
  /* 補足テキスト。明るい面すべてで WCAG AA（4.5:1）を満たすよう #8A7C93 から濃くした */
  --ink-soft: #6E6178;

  /* アクセント */
  --pink: #FF9EBB;
  --mint: #A6E3C9;
  --sky: #A9D8F5;
  --lemon: #FFE38A;
  --lavender: #CDB8F0;
  --peach: #FFC9A8;

  /* セクションの淡い背景 */
  --bg-pink: #FFF0F4;
  --bg-mint: #EFFBF5;
  --bg-sky: #EFF7FD;
  --bg-lavender: #F7F2FE;

  /* 線・影 */
  --line: #EADFE4;
  --shadow: 0 6px 0 rgba(75, 63, 82, 0.08);
  --shadow-lift: 0 10px 0 rgba(75, 63, 82, 0.10);

  /* タイポグラフィ */
  --font-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN",
    "Yu Gothic UI", Meiryo, sans-serif;
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN",
    "Yu Gothic UI", Meiryo, sans-serif;

  /* レイアウト */
  --container: 1120px;
  --radius-card: 24px;
  --radius-pill: 999px;
  --nav-drawer-breakpoint: 1080px;
  --stack-breakpoint: 720px;
}

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

/* `hidden` 属性で確実に非表示にする（コンポーネント側の display 指定に負けないように） */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
  color: var(--ink);
  /* 行を均等に折り返し、末尾に 1 文字だけ残るのを防ぐ */
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.35em;
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--pink);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: #C4648A;
  text-decoration-color: var(--pink);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

strong {
  font-weight: 700;
}

/* 固有名詞・複合語の途中で改行させない（見出しの語の切り替え目を守る） */
.nowrap {
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 2.5rem 0;
}

/* --- レイアウト ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  padding-block: clamp(56px, 8vw, 96px);
}

.section--pink {
  background-color: var(--bg-pink);
}

.section--mint {
  background-color: var(--bg-mint);
}

.section--sky {
  background-color: var(--bg-sky);
}

.section--lavender {
  background-color: var(--bg-lavender);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 卡片内テキストの折り返し（長い日本語ラベルがはみ出さないように） */
.card,
.client-card,
.biz,
.person-card,
.step,
.data-table td,
.data-table th {
  overflow-wrap: anywhere;
}

/* スクロール表示（JS 無効時は下の既定のまま見える） */
.reveal {
  opacity: 1;
}
