/* Rairee サービスサイト 共通スタイル
 * ★依存0・ビルド不要。★外部フォント・外部スクリプトを読み込まない。
 * ★色は :root のトークンで定義し、★ダークモードで再定義する。
 */

:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --text: #1c1c1a;
  --text-muted: #55534e;
  --border: #d8d6d1;
  --link: #1f5c4d;
  --link-hover: #164237;
  --cta-bg: #1f5c4d;
  --cta-text: #ffffff;
  --focus: #9a4a1f;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --surface: #1e2125;
    --text: #eceae5;
    --text-muted: #b4b0a8;
    --border: #3a3e44;
    --link: #7fd1ba;
    --link-hover: #a6e2d1;
    --cta-bg: #7fd1ba;
    --cta-text: #10211c;
    --focus: #f0b37e;
  }
}

:root[data-theme="dark"] {
  --bg: #15171a;
  --surface: #1e2125;
  --text: #eceae5;
  --text-muted: #b4b0a8;
  --border: #3a3e44;
  --link: #7fd1ba;
  --link-hover: #a6e2d1;
  --cta-bg: #7fd1ba;
  --cta-text: #10211c;
  --focus: #f0b37e;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
}

/* ---- キーボード操作 -------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--link);
  padding: 0.75rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible,
.skip:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.site-header,
main,
.site-footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-header nav a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

.site-header nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

main {
  padding-bottom: 3rem;
}

/* ---- 見出しと本文 ---------------------------------------------------- */

h1 {
  font-size: 1.75rem;
  line-height: 1.5;
  margin: 1.5rem 0 1rem;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.3125rem;
  line-height: 1.6;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

p.label {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

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

li {
  margin-bottom: 0.4rem;
}

li > ul,
li > ol {
  margin-top: 0.4rem;
}

/* ---- 問い合わせ導線 -------------------------------------------------- */

a.cta {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  margin: 0.25rem 0 0.5rem;
  background: var(--cta-bg);
  color: var(--cta-text);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.75;
}

a.cta:hover {
  color: var(--cta-text);
  opacity: 0.88;
}

/* ★単独行のリンク（★文中リンクではないもの）のタップ領域。
 * ★`a.cta` は★自前の寸法を持つので★除外する（★詳細度で打ち消さない）。 */
p.linkline a:not(.cta) {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

/* ---- フッター -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.site-footer a {
  min-height: 44px;
  display: inline-block;
  line-height: 44px;
}

/* ---- 画面幅の小さい端末 ---------------------------------------------- */

@media (max-width: 30rem) {
  body {
    line-height: 1.85;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.1875rem;
  }

  a.cta {
    display: block;
    text-align: center;
  }
}
