/* カラートークン
   アプリのPaperとInkに合わせる */
:root {
  color-scheme: light dark;
  --text: #2f2a26;
  --muted: #6f665c;
  --bg: #fbf7ef;
  --card: #f3ecdf;
  --line: #e6dccb;
  --link: #2f2a26;
  --accent: #2f2a26;
  --accent-soft: rgba(47, 42, 38, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f2e9da;
    --muted: #b5aa9b;
    --bg: #24201c;
    --card: #2f2a25;
    --line: #453e36;
    --link: #f2e9da;
    --accent: #f2e9da;
    --accent-soft: rgba(242, 233, 218, 0.08);
  }
}

* {
  box-sizing: border-box;
}

/* htmlに背景を持たせてbody背景のキャンバス伝播を止める
   伝播があるとSafariで最上部に描画の継ぎ目が出ることがある */
html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ヘッダーとヒーローを包む帯にグラデーションを敷く
   body背景だとキャンバス伝播、擬似要素だと重ね順がブラウザ依存になるため実要素に持たせる */
.hero-band {
  background:
    radial-gradient(60rem 32rem at 85% -6rem, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, var(--accent-soft), transparent);
}

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

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

/* ヘッダー・本文・フッターの幅
   左右に1.25remの余白を持つため、その分だけ広げてヒーローの文字と左端を揃える */
:root {
  --page-width: calc(48rem + 2.5rem);
}

/* 共通ヘッダー
   トップへの戻り先を兼ねる */
.site-header {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-header .brand img {
  border-radius: 6px;
}

/* 本文（下層ページ） */
.doc {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
}

.doc h1 {
  font-size: 1.6rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

.doc h2 {
  font-size: 1.15rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}

.doc p,
.doc ul {
  margin: 0.75rem 0;
}

.doc ul {
  padding-left: 1.25rem;
}

/* よくある質問
   質問ごとにカードを分け、開閉はdetailsに任せてJSを使わない */
.faq-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.faq-item {
  background: var(--card);
  border-radius: 16px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

/* Safariは標準の三角をlist-styleでは消せない */
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  color: var(--accent);
}

/* 開くと縦棒が縮んで＋が−になる */
.faq-item summary::after {
  content: "";
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  margin-left: auto;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat;
  transition: background-size 0.25s ease;
}

.faq-item[open] summary::after {
  background-size: 100% 2px, 2px 0;
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* 対応するブラウザだけ高さを伸び縮みさせる
   未対応のブラウザではアニメーションなしで開閉する */
.faq-item {
  interpolate-size: allow-keywords;
}

.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

/* ヒーロー */
.hero {
  padding: 3.5rem 1.25rem 4.5rem;
}

.hero-inner {
  max-width: 48rem;
  margin: 0 auto;
}

.hero .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 30px var(--accent-soft);
}

.hero h1 {
  font-size: 3rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 1.25rem 0 0;
}

.hero .catch {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 1rem 0 0;
}

/* できることの箇条書き
   丸の中のチェックはborderを傾けて描く */
.hero-points {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.hero-points li + li {
  margin-top: 0.35rem;
}

.hero-points li::before {
  content: "";
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--accent-soft);
}

.hero-points li::after {
  content: "";
  position: absolute;
  left: 0.48rem;
  top: 50%;
  width: 0.34rem;
  height: 0.62rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-62%) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary,
  .faq-item summary::after,
  .faq-item::details-content {
    transition: none;
  }
}

/* 狭い画面では中央に寄せる */
@media (max-width: 720px) {
  .hero {
    padding-top: 2.5rem;
  }

  .hero-inner {
    text-align: center;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero .catch {
    font-size: 1.5rem;
  }

  .hero-points {
    display: inline-block;
    text-align: left;
  }
}

/* 共通フッター */
footer {
  max-width: var(--page-width);
  margin: 4rem auto 0;
  padding: 1.25rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

footer p {
  margin: 0;
}
