/* デザインコンセプト「冷蔵庫のカレンダー」(docs/design-concept.md, Shared/Theme.swift)に合わせる。
   紙に墨で書き、やることは付箋、終わったらハンコ。柿色は使いすぎない。 */
:root {
  --paper: #faf7f2;
  --card: #ffffff;
  --ink: #2b2a28;
  --sub-ink: #8c877f;
  --rule: #e6e0d6;
  --accent: #e8743b;
  /* 紙の上で文字として読める柿色(コントラスト 3.5 以上)。 */
  --accent-text: #b9531f;
  /* 家族の色: 柿・藍・若竹・山吹・桜・藤 */
  --kaki: #e8743b;
  --ai: #3f6fb5;
  --wakatake: #4e9a6b;
  --yamabuki: #d99a1e;
  --sakura: #d96c8a;
  --fuji: #8a6cc4;
  --radius: 14px;
  --rounded: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1b1a;
    --card: #2a2826;
    --ink: #f2eee8;
    --sub-ink: #a39d94;
    --rule: #3a3733;
    --accent-text: #f08a55;
    --kaki: #f08a55;
    --ai: #6e95d6;
    --wakatake: #6db98a;
    --yamabuki: #ebb445;
    --sakura: #e88da6;
    --fuji: #a88edb;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "PingFang SC", "PingFang TC", "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans", sans-serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-text); text-underline-offset: 2px; }

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--ink);
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: url("icon.png") center / cover;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.9rem; }
.site-nav a {
  color: var(--sub-ink);
  text-decoration: none;
  padding: 2px 10px;
  border-radius: 999px;
}
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--card); font-weight: 600; }

.lang-select label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lang-select select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 12px;
}

/* 本文 */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 56px;
}

h1, h2, h3 { font-family: var(--rounded); line-height: 1.35; }
h1 { font-size: 2rem; margin: 0.8em 0 0.3em; }
h2 { font-size: 1.2rem; margin: 2.2em 0 0.6em; display: flex; align-items: center; gap: 10px; }
p, li, dd { color: var(--ink); }
.muted { color: var(--sub-ink); font-size: 0.9rem; font-family: var(--rounded); }

/* 見出しの頭に家族の色の丸。順に色が変わる。 */
h2::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot, var(--kaki));
}
h2:nth-of-type(6n + 2) { --dot: var(--ai); }
h2:nth-of-type(6n + 3) { --dot: var(--wakatake); }
h2:nth-of-type(6n + 4) { --dot: var(--yamabuki); }
h2:nth-of-type(6n + 5) { --dot: var(--sakura); }
h2:nth-of-type(6n + 6) { --dot: var(--fuji); }

/* 規約やポリシーの本文は、紙に書いた1枚として読ませる。 */
section.l10n > p, section.l10n > ul { max-width: 68ch; }

/* 家族の色の点(月表示の点と同じ)。 */
.dots { display: flex; justify-content: center; gap: 8px; margin: 20px 0 8px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--kaki); }
.dots span:nth-child(2) { background: var(--ai); }
.dots span:nth-child(3) { background: var(--wakatake); }
.dots span:nth-child(4) { background: var(--yamabuki); }
.dots span:nth-child(5) { background: var(--sakura); }
.dots span:nth-child(6) { background: var(--fuji); }

/* 特長は「やること」の付箋。左に、その人の色のハンコ(済みのチェック)。 */
.features {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.features li {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 16px 16px 60px;
  box-shadow: 0 1px 2px rgb(43 42 40 / 0.06);
}
.features li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--stamp, var(--kaki));
  color: #fff;
  font: 700 16px/30px var(--rounded);
  text-align: center;
  transform: rotate(-8deg);
}
.features li:nth-child(6n + 2) { --stamp: var(--ai); }
.features li:nth-child(6n + 3) { --stamp: var(--wakatake); }
.features li:nth-child(6n + 4) { --stamp: var(--yamabuki); }
.features li:nth-child(6n + 5) { --stamp: var(--sakura); }
.features li:nth-child(6n + 6) { --stamp: var(--fuji); }
.features strong { display: block; font-family: var(--rounded); margin-bottom: 2px; }
.features li { color: var(--sub-ink); font-size: 0.95rem; }
.features strong { color: var(--ink); font-size: 1rem; }

.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 0; list-style: none; margin-top: 40px; }
.links a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}

/* よくある質問は「予定」の見た目: 左に人の色の縦線。 */
.faq { margin: 0; }
.faq dt {
  font-family: var(--rounded);
  font-weight: 700;
  margin-top: 12px;
  padding: 14px 16px 2px 20px;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  border-left: 4px solid var(--line, var(--kaki));
}
.faq dd {
  margin: 0;
  padding: 2px 16px 14px 20px;
  background: var(--card);
  border-radius: 0 0 var(--radius) var(--radius);
  border-left: 4px solid var(--line, var(--kaki));
}
.faq dt:nth-of-type(6n + 2), .faq dd:nth-of-type(6n + 2) { --line: var(--ai); }
.faq dt:nth-of-type(6n + 3), .faq dd:nth-of-type(6n + 3) { --line: var(--wakatake); }
.faq dt:nth-of-type(6n + 4), .faq dd:nth-of-type(6n + 4) { --line: var(--yamabuki); }
.faq dt:nth-of-type(6n + 5), .faq dd:nth-of-type(6n + 5) { --line: var(--sakura); }
.faq dt:nth-of-type(6n + 6), .faq dd:nth-of-type(6n + 6) { --line: var(--fuji); }

/* お問い合わせのボタン。柿色は追加ボタンと同じく、ここぞという所だけ。 */
.button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--rounded);
  font-weight: 700;
  text-decoration: none;
}
.pending { color: var(--sub-ink); }

/* ===== トップページ(紹介) =====
   紙の上に家族の色のにじみを置き、画面は iPhone の形で見せる。 */
.page-home main { max-width: 1080px; overflow-x: clip; }
.page-home .site-header .inner, .page-home .site-footer { max-width: 1080px; }

.home .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 48px 0 24px;
}
/* 背景のにじみ(家族の色) */
.home .hero::before {
  content: "";
  position: absolute;
  inset: -40px -10vw -80px;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
  background:
    radial-gradient(circle at 78% 30%, color-mix(in srgb, var(--kaki) 22%, transparent), transparent 42%),
    radial-gradient(circle at 92% 78%, color-mix(in srgb, var(--ai) 16%, transparent), transparent 38%),
    radial-gradient(circle at 58% 88%, color-mix(in srgb, var(--yamabuki) 18%, transparent), transparent 34%);
}
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 700 1.15rem/1 var(--rounded);
}
.hero-brand img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 4px 14px rgb(43 42 40 / 0.14); }
.home .hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.35;
  text-wrap: balance;
  margin: 20px 0 16px;
  letter-spacing: 0.01em;
}
.home .lead { font-size: 1.05rem; color: var(--sub-ink); max-width: 32em; margin: 0 0 28px; }

.hero-visual { position: relative; height: 560px; }
.hero-visual .front { position: absolute; right: 12%; top: 0; width: 250px; transform: rotate(4deg); }
.hero-visual .float { position: absolute; left: 0; bottom: 30px; width: 250px; transform: rotate(-5deg); }

/* iPhone の枠 */
.phone {
  margin: 0;
  padding: 9px;
  border-radius: 44px;
  background: #1d1c1b;
  box-shadow: 0 24px 60px rgb(43 42 40 / 0.22), inset 0 0 0 2px #3a3835;
}
.phone img { display: block; width: 100%; border-radius: 36px; }
.widget { margin: 0; }
.widget img {
  display: block;
  width: 100%;
  /* 画像の角は透明。影を角に合わせる */
  border-radius: 8.8% / 8.4%;
  box-shadow: 0 24px 60px rgb(43 42 40 / 0.18);
}

/* App Store の入手ボタン(公開前は「まもなく」) */
.get { min-height: 48px; }
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1rem/1.2 var(--rounded);
  text-decoration: none;
}
.appstore.soon { background: var(--card); color: var(--sub-ink); border: 1px dashed var(--rule); }

/* 画面つきの紹介: 画像と文を左右交互に */
.story { display: grid; gap: 72px; margin: 72px 0 40px; }
.row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 64px;
  padding: 0 4%;
}
.row:nth-child(even) { grid-template-columns: 1fr auto; }
.row:nth-child(even) figure { order: 2; }
.row .phone { width: 280px; }
.row .widget { width: 360px; }
.row-text h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin: 4px 0 12px; display: block; }
.row-text h2::before { display: none; }
.row-text p:last-child { color: var(--sub-ink); font-size: 1.05rem; max-width: 30em; }
.kicker { margin: 0; font: 600 0.95rem/1 var(--rounded); color: var(--row-color, var(--kaki)); letter-spacing: 0.04em; }
.row:nth-child(2) { --row-color: var(--ai); }
.row:nth-child(3) { --row-color: var(--wakatake); }
.row:nth-child(4) { --row-color: var(--sakura); }

/* スクロールで少し浮かび上がる(動きを減らす設定のときは出さない) */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .row { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .js-reveal .row.shown { opacity: 1; transform: none; }
}

.home .features { max-width: none; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.home h2.more { justify-content: center; font-size: 1.5rem; margin-top: 3em; }
.home h2.more::before { display: none; }

.closing {
  margin: 96px 0 24px;
  padding: 56px 24px;
  text-align: center;
  border-radius: 32px;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(43 42 40 / 0.06);
}
.closing img { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 8px 24px rgb(43 42 40 / 0.14); }
.closing-title { font: 700 clamp(1.3rem, 3vw, 1.8rem)/1.4 var(--rounded); margin: 20px 0 24px; }

@media (max-width: 820px) {
  .home .hero { grid-template-columns: 1fr; text-align: center; padding-top: 28px; }
  .home .lead { margin-left: auto; margin-right: auto; }
  .hero-visual { height: 470px; max-width: 420px; width: 100%; margin: 0 auto; }
  .hero-visual .front { width: 205px; right: 8%; }
  .hero-visual .float { width: 210px; bottom: 20px; }
  .story { gap: 72px; }
  .row, .row:nth-child(even) { grid-template-columns: 1fr; gap: 28px; text-align: center; padding: 0; }
  .row:nth-child(even) figure { order: 0; }
  .row .phone { width: 240px; justify-self: center; }
  .row .widget { width: min(340px, 100%); }
  .row-text p:last-child { margin-left: auto; margin-right: auto; }
}

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  color: var(--sub-ink);
  font-size: 0.85rem;
  font-family: var(--rounded);
  border-top: 1px solid var(--rule);
}
