/*
 * まえぶれ LP — 共通スタイル。
 *
 * 色・書体・角丸の芯は DESIGN.md(「色(芯だけ)」「文字」「角丸」)が定義元。
 * アプリ内の src/theme.ts は別物なので写さない — LP はアプリの外に出るもので、
 * 外に出す分の芯は DESIGN.md 側に置くと決めてある。
 */

:root {
  /* DESIGN.md「色(芯だけ)」の表と1対1 */
  --logo-front: #4a6285;
  --logo-back: #9db6d6;
  --canvas: #e9edf3; /* ロゴの下地。境界線と面の両方に使う */
  --primary: #7e9dc3;
  --primary-deep: #5b7ba6;
  --bg: #f8f9fb;
  --text-primary: #33415c;
  --text-body: #42526b;
  --text-muted: #6b7a93;

  --surface: #ffffff;
  --wordmark: #3d4e6b;

  /* きぶんの3色のうち「はれ」。ヒーロー背後の暖色にだけ使う。
     DESIGN.md の「はれだけが暖色」— 良し悪しに読ませないため彩度は上げない */
  --mood-sunny: #b98a4e;

  /* 見出しは明朝。Noto Serif JP は明朝を持たない環境(Android / Linux)の受け皿 */
  --serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN',
    'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;

  /* DESIGN.md「角丸」。直角を使わない */
  --radius-card: 20px;
  --radius-pill: 30px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-deep);
  text-decoration: none;
}

a:hover {
  color: var(--logo-front);
  text-decoration: underline;
}

/* hover を足す以上、キーボードにも同じ手掛かりを出す */
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.page {
  min-height: 100vh;
  background: var(--bg);
}

/* ── ヘッダー(ロックアップ) ───────────────────────────── */

.site-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* DESIGN.md のロックアップ: 雲 → gap 10 → 明朝 */
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  flex: none;
}

/* SVG の presentation attribute は var() を解釈しないので CSS 側で塗る */
.brand-mark .cloud-front {
  stroke: var(--logo-front);
}

.brand-mark .cloud-back {
  stroke: var(--logo-back);
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.2em;
  color: var(--wordmark);
  font-weight: 600;
}

.header-link {
  font-size: 13px;
  color: var(--text-muted);
}

.header-link:hover {
  color: var(--logo-front);
}

/* ── 本文 ─────────────────────────────────────────── */

.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 88px;
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 10px;
}

.lead {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.9;
}

/* ── よくある質問 ─────────────────────────────────── */

.faq {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--canvas);
  border-radius: var(--radius-card);
  padding: 28px;
}

.faq-item h2 {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.8;
}

.faq-item p {
  font-size: 15px;
  line-height: 2;
  margin: 0;
}

/* ── 問い合わせ ───────────────────────────────────── */

.contact {
  background: var(--canvas);
  border-radius: var(--radius-card);
  padding: 36px 28px;
  margin-top: 32px;
  text-align: center;
}

.contact h2 {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 12px;
}

.contact p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-body);
  margin: 0 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--primary-deep);
  color: var(--surface);
  font-size: 14px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
}

.btn:hover {
  background: var(--logo-front);
  color: var(--surface);
  text-decoration: none;
}

/* ── フッター ─────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--canvas);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13px;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--logo-front);
}

.copyright {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ══ 法務ページ(privacy / terms / tokushoho)══════════ */

.doc-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 28px;
}

/*
 * 未確定の値。公開前に埋める(一覧は README)。
 * 目立たせたいが、DESIGN.md の「新しい色を足さない」に従って
 * きぶんの「はれ」(暖色)と地色だけで作る。
 */
.todo {
  color: var(--mood-sunny);
  font-weight: 600;
  background: var(--canvas);
  padding: 0 5px;
  border-radius: 4px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--canvas);
  border-radius: var(--radius-card);
  padding: clamp(24px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.doc-card h2 {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 14px;
}

.doc-card p {
  font-size: 15px;
  line-height: 2;
  margin: 0;
  text-wrap: pretty;
}

.doc-card section p + p {
  margin-top: 14px;
}

.doc-card strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 印なしの定義リスト(収集する情報など) */
.doc-defs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  font-size: 15px;
  line-height: 2;
}

/* 通常の箇条書き */
.doc-list {
  margin: 0;
  padding-left: 1.4em;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 2;
}

/* 特商法の表 */
.doc-dl {
  margin: 0;
  display: grid;
  gap: 0;
}

.doc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--canvas);
}

.doc-row:last-child {
  border-bottom: 0;
}

.doc-row dt {
  flex: 0 0 200px;
  font-size: 14px;
  color: var(--text-muted);
}

.doc-row dd {
  flex: 1 1 300px;
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
}

/* ══ トップページ(index)═════════════════════════════ */

html {
  scroll-behavior: smooth;
}

.lp {
  overflow-x: hidden;
}

/* ── 追従ヘッダー ─────────────────────────────────── */

.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 249, 251, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233, 237, 243, 0.9);
}

.nav-sticky .site-header {
  padding: 16px 24px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--primary-deep);
  color: var(--surface);
  font-size: 13px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-cta:hover {
  background: var(--logo-front);
  color: var(--surface);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── ヒーロー ─────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 80px) 24px clamp(56px, 8vw, 96px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-copy {
  flex: 1 1 340px;
  min-width: 0;
}

.hero-art {
  flex: 0 1 320px;
  margin: 0 auto;
}

/* 背後をゆっくり流れる色。装飾なので aria-hidden */
.blob {
  position: absolute;
  border-radius: 50%;
}

.blob-1 {
  top: -90px;
  right: -70px;
  width: 360px;
  height: 360px;
  background: var(--logo-back);
  opacity: 0.2;
  filter: blur(70px);
  animation: mb-drift1 16s ease-in-out infinite;
}

.blob-2 {
  bottom: -120px;
  left: -90px;
  width: 380px;
  height: 380px;
  background: var(--mood-sunny);
  opacity: 0.1;
  filter: blur(80px);
  animation: mb-drift2 20s ease-in-out infinite;
}

.hero-h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5.4vw, 46px);
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 14px;
}

/* 1行に収めたいので幅から字送りを引く。nowrap を外すと意味が変わる */
.hero-h1-sub {
  font-family: var(--serif);
  font-size: clamp(14px, calc((100vw - 64px) / 21.5), 22px);
  white-space: nowrap;
  letter-spacing: 0.04em;
  line-height: 1.8;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 28px;
}

.hero-lead {
  font-size: 16px;
  line-height: 2;
  color: var(--text-body);
  margin: 0 0 14px;
  text-wrap: pretty;
}

.hero-note {
  font-size: 14px;
  line-height: 2;
  color: var(--text-muted);
  margin: 0 0 36px;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.btn-lg {
  display: inline-flex;
  align-items: center;
  background: var(--primary-deep);
  color: var(--surface);
  font-size: 15px;
  padding: 15px 32px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 24px rgba(91, 123, 166, 0.25);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-lg:hover {
  background: var(--logo-front);
  color: var(--surface);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(91, 123, 166, 0.32);
}

.cta-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── スクリーンショットの枠 ───────────────────────── */

.phone {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--canvas);
  margin: 0 auto;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* 高さは枠側で確定させてある(= 画像の読み込みでずれない) */
.phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop, 50% 0%);
}

/* 下端を地の色に溶かす */
.phone-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(248, 249, 251, 0), var(--bg));
}

.phone--hero {
  width: min(320px, 84vw);
  height: 500px;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(51, 65, 92, 0.12);
}

.phone--hero .phone-fade {
  height: 80px;
}

.phone--hero:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(51, 65, 92, 0.16);
}

.phone--md {
  width: min(300px, 80vw);
  height: 380px;
  box-shadow: 0 18px 44px rgba(51, 65, 92, 0.1);
}

.phone--md .phone-fade {
  height: 72px;
}

.phone--md:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 56px rgba(51, 65, 92, 0.15);
}

.hero-float {
  animation: mb-float 7s ease-in-out infinite;
}

/* 2枚を斜めに重ねる */
.stack {
  position: relative;
  width: min(360px, 86vw);
  height: 430px;
  margin: 0 auto;
}

.stack .phone {
  position: absolute;
  width: 76%;
  height: 360px;
}

.stack .phone-fade {
  height: 64px;
}

.stack-a {
  left: 0;
  top: 0;
  z-index: 1;
  box-shadow: 0 18px 44px rgba(51, 65, 92, 0.1);
}

.stack-b {
  right: 0;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 18px 44px rgba(51, 65, 92, 0.14);
}

.stack .phone:hover {
  transform: translateY(-6px);
  z-index: 3;
  box-shadow: 0 26px 56px rgba(51, 65, 92, 0.18);
}

/* ── 共感の帯 ─────────────────────────────────────── */

.band {
  background: var(--canvas);
}

.band-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 24px;
  text-align: center;
}

.band-inner h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 28px;
  text-wrap: pretty;
}

/* 見出しは中央、本文は左。中央寄せの長文は読みにくい */
.band-inner p {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-body);
  margin: 0 0 20px;
  text-align: left;
  text-wrap: pretty;
}

.band-inner p:last-child {
  margin-bottom: 0;
}

.band-inner strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── 機能紹介 ─────────────────────────────────────── */

.section-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 30px);
  letter-spacing: 0.08em;
  line-height: 1.8;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  margin: 0 0 clamp(24px, 5vw, 48px);
}

.features {
  max-width: 1020px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 24px 24px;
}

.feature-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
  padding: clamp(24px, 4vw, 48px) 0;
}

/* 交互に左右を入れ替える */
.feature-row--flip {
  flex-direction: row-reverse;
}

.feature-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.feature-art {
  flex: 0 1 300px;
  margin: 0 auto;
}

.feature-art--wide {
  flex: 0 1 360px;
}

.feature-num {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--logo-back);
  margin-bottom: 12px;
}

.feature-copy h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.8vw, 25px);
  letter-spacing: 0.06em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 16px;
}

.feature-copy p {
  font-size: 15px;
  line-height: 2;
  color: var(--text-body);
  margin: 0;
  text-wrap: pretty;
}

/* ── 安心 ─────────────────────────────────────────── */

.assurance {
  max-width: 1020px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.assure-card {
  background: var(--surface);
  border: 1px solid var(--canvas);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.assure-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(51, 65, 92, 0.08);
}

.assure-card h3 {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 10px;
}

.assure-card p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-muted);
  margin: 0;
}

/* ── 料金 ─────────────────────────────────────────── */

.pricing {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 24px;
}

.pricing .section-title {
  margin-bottom: 12px;
}

.pricing-note {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 clamp(24px, 5vw, 48px);
}

.plans {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.plan {
  flex: 1 1 280px;
  background: var(--surface);
  border: 1.5px solid var(--canvas);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(51, 65, 92, 0.08);
  border-color: var(--primary);
}

/*
  Plus のカードにも常時の枠は付けない(無料と同じく hover で枠が出る)。
  Plus であることは箇条書きの点の色(.plan--plus .plan-list li::before)と
  hover 時の影の濃さで示している。
*/
.plan--plus:hover {
  box-shadow: 0 14px 32px rgba(91, 123, 166, 0.14);
}

.plan h3 {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 6px;
}

.plan-price {
  font-size: 22px;
  color: var(--text-body);
  margin: 0;
}

.plan-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.plan-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-body);
}

.plan-list li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--logo-back);
  margin-top: 9px;
}

.plan--plus .plan-list li::before {
  background: var(--primary);
}

.plan-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ── クロージング ─────────────────────────────────── */

.closing {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 112px) 24px;
  text-align: center;
}

.closing h2 {
  font-family: var(--serif);
  font-size: clamp(23px, 3.8vw, 32px);
  line-height: 1.9;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 32px;
  text-wrap: pretty;
}

/* ── 動き ─────────────────────────────────────────── */

@keyframes mb-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes mb-drift1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(26px, -18px);
  }
}

@keyframes mb-drift2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-22px, 14px);
  }
}

/*
 * スクロールで現れる演出。隠すクラスは JS が付けるので、
 * JS が動かない環境では最初から見えたままになる(消えない側に倒す)。
 */
.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 狭い画面 ─────────────────────────────────────── */

/* カードの 28px と本文の 24px が重なると内容の幅が残らないので詰める */
@media (max-width: 560px) {
  .faq-item {
    padding: 22px 20px;
  }

  .contact {
    padding: 30px 20px;
  }

  /* 特商法の dt/dd を縦積みにする(200px の欄が入らない) */
  .doc-row dt {
    flex: 1 1 100%;
  }
}

/* CTA が2行に折れると左寄せがばらけるので中央に寄せる */
@media (max-width: 640px) {
  .cta-row {
    justify-content: center;
  }
}
