/* =============================================================================
   Shared stylesheet for the LP, terms, and privacy pages.

   Deliberately small and dependency-free: these pages are three static
   documents, and a build step or framework would cost more than it saves. Extend
   with app-specific sections at the bottom rather than restyling the base.

   Light and dark are both handled via prefers-color-scheme, so the pages match
   the reader's OS setting without a toggle to maintain.
   ============================================================================= */

:root {
  --bg: #ffffff;
  --bg-subtle: #f5f6f8;
  --surface: #ffffff;
  --text: #14161a;
  --text-muted: #5b6270;
  --border: #e2e5ea;
  --primary: #1c66e5;
  --primary-contrast: #ffffff;
  --max-width: 68rem;
  --prose-width: 46rem;
  --radius: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
    "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --bg-subtle: #16191e;
    --surface: #16191e;
    --text: #f2f4f7;
    --text-muted: #a2aab8;
    --border: #272c34;
    --primary: #6ba2ff;
    --primary-contrast: #0a1526;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Keyboard focus must stay visible; never remove this without a replacement. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* --- Layout ---------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.94rem;
}

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

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

main {
  display: block;
}

section {
  padding: 3.5rem 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

/* --- Typography ------------------------------------------------------------ */

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

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

h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.75rem;
}

/* Long-form legal copy: narrower measure, numbered articles. */
.prose {
  max-width: var(--prose-width);
}

.prose h2 {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Components ------------------------------------------------------------ */

.hero {
  padding: 4.5rem 0 3rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 600;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  margin-top: 0;
}

/* Screenshot strip. Scrolls horizontally on narrow viewports rather than
   shrinking the images past legibility. */
.shots {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.shot {
  width: min(70vw, 18rem);
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.shot figcaption {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Marks unfinished template content. Remove every .todo before launch;
   `make check-lp` fails while any remain. */
.todo {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   LP (index.html) 専用の追加スタイル。

   ベースを書き換えず、末尾に足す方針を守っている。値は DESIGN_SYSTEM.md の
   トークン（余白 4 の倍数、角丸 8/12/16/20/28）に合わせてあり、装飾のための
   グラデーションや影は置かない。グループ化は区切り線ではなく包含で行う。
   ============================================================================= */

:root {
  /* 余白: DESIGN_SYSTEM.md の xs/sm/md/lg/xl/xxl/section を rem で写したもの。 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-xxl: 2rem;
  --space-section: 3rem;

  /* 角丸スケール。ベースの --radius もこの lg に合わせる。 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-xxl: 28px;
  --radius: var(--radius-lg);

  /* ブランド色の淡い面。2つ目のパレットを手で維持しないよう color-mix で作る。 */
  --primary-soft: color-mix(in srgb, var(--primary) 10%, transparent);
  --primary-strong: color-mix(in srgb, var(--primary) 24%, transparent);
}

/* ダークでは --surface と --bg-subtle が同値だったため、薄い面に置いたカードが
   背景と同じ色になっていた。カードを1段明るくして、境界線だけに頼らせない。 */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1b1f26;
  }
}

/* --- セクションの土台 ------------------------------------------------------- */

/* 固定ヘッダーの下に見出しが潜らないようにする。 */
main section {
  scroll-margin-top: 5rem;
}

.section-alt {
  background: var(--bg-subtle);
}

.section-head {
  max-width: var(--prose-width);
  margin-bottom: var(--space-xxl);
}

.section-head h2 {
  margin-top: 0;
}

.section-head p:last-child {
  margin-bottom: 0;
}

/* 読みやすい行長に収める本文ブロック。 */
.measure {
  max-width: var(--prose-width);
}

.note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.fine-print {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--space-md);
}

/* --- ヘッダー --------------------------------------------------------------- */

.site-header .shell {
  gap: var(--space-lg);
}

.nav {
  display: none;
  flex: 1;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ナビの4項目とCTAが1行に収まる幅から出す。それより狭い画面では、
   同じ導線をフッターと本文中のCTAが持つ。 */
@media (min-width: 52rem) {
  .nav {
    display: flex;
  }
}

.button.compact {
  min-height: 40px;
  padding: 0 var(--space-lg);
  font-size: 0.94rem;
}

/* --- ヒーロー --------------------------------------------------------------- */

.hero {
  padding: var(--space-section) 0 var(--space-xxl);
}

.hero-layout {
  display: grid;
  gap: var(--space-xxl);
  align-items: center;
}

/* 見出しの2行を折り返さずに置ける幅から2カラムにする。 */
@media (min-width: 62rem) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-section);
  }
}

/* 原稿の改行位置（LP_CONTENT.md）をそのまま行として持つ。カラム幅に対して
   1行が収まるサイズに抑え、行の途中で折り返さないようにする。 */
.hero h1 {
  font-size: clamp(1.7rem, 3.9vw, 2.6rem);
}

.hero h1 .line {
  display: block;
}

.hero h1 .line.accent {
  color: var(--primary);
}

.hero .lead {
  max-width: 34rem;
}

/* 固有名詞や日本語の文をアイブロウに置くとき、大文字化と広い字送りは邪魔になる。 */
.eyebrow.plain {
  letter-spacing: 0.02em;
  text-transform: none;
}

/* --- 発話例（ヒーローの図） -------------------------------------------------- */

.demo {
  margin: 0;
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xxl);
}

.demo-quote {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
}

.demo-quote .ic {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: var(--primary);
}

.demo-arrow {
  display: flex;
  justify-content: center;
  margin: var(--space-md) 0;
  color: var(--text-muted);
}

.demo-memo {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-subtle);
  border-radius: var(--radius-xl);
}

/* アプリのリスト行にある未完了マーク。装飾なので読み上げ対象にしない。 */
.demo-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  border: 2px solid var(--border);
  border-radius: 50%;
}

.demo-title {
  margin: 0 0 var(--space-sm);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.2rem var(--space-md);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.chip .ic {
  width: 16px;
  height: 16px;
}

/* --- ストア導線 ------------------------------------------------------------- */

.cta-block {
  margin-top: var(--space-xl);
}

.cta-block .button-row {
  margin-top: 0;
}

/* ストア公開前の代替表示。無効なリンクを置かないための枠。 */
.store-pending {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-md) var(--space-xl);
  border: 1px dashed var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

/* --- アイコン --------------------------------------------------------------- */

.ic {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

/* DESIGN_SYSTEM.md の iconBadge（40）に合わせた枠。 */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
}

/* --- 価値提案 --------------------------------------------------------------- */

/* 4枚なので 2x2 に固定する。auto-fit だと 3 + 1 に割れて最後の1枚が浮く。 */
@media (min-width: 44rem) {
  #features .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* --- 使い方 ----------------------------------------------------------------- */

.steps {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 52rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps > li {
  counter-increment: step;
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps > li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-lg);
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 0.9rem;
  font-weight: 700;
}

.steps h3 {
  margin-top: 0;
}

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

.steps blockquote {
  margin: var(--space-lg) 0 0;
  padding-left: var(--space-lg);
  border-left: 3px solid var(--primary-strong);
  color: var(--text-muted);
}

.steps blockquote p {
  margin: 0;
}

/* --- 利用シーン ------------------------------------------------------------- */

/* 価値提案のカードと連続させないため、ここは枠を持たせず余白で分ける。 */
.scenes {
  display: grid;
  gap: var(--space-xl) var(--space-section);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .scenes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .scenes {
    grid-template-columns: repeat(4, 1fr);
  }
}

.scenes h3 {
  margin: 0 0 var(--space-sm);
  padding-top: var(--space-md);
  border-top: 2px solid var(--primary-strong);
  font-size: 1rem;
}

.scenes p {
  margin: 0;
  color: var(--text-muted);
}

/* --- スクリーンショット ------------------------------------------------------ */

/* 4枚が並びきる幅ではグリッドにする。それより狭ければベースの横スクロール。 */
@media (min-width: 64rem) {
  .shots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
  }

  .shot {
    width: auto;
  }
}

.shot figcaption {
  text-align: left;
}

.shot figcaption strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

/* --- チェックリスト --------------------------------------------------------- */

.check-list {
  display: grid;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.check-list .ic {
  margin-top: 0.25rem;
  color: var(--primary);
}

/* --- 料金 ------------------------------------------------------------------- */

.plans {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (min-width: 44rem) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

.plan {
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.plan.is-pro {
  border-color: var(--primary);
}

.plan-name {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  font-size: 1.25rem;
  font-weight: 700;
}

.plan-tag {
  padding: 0.1rem var(--space-md);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.plan .check-list {
  margin-bottom: 0;
}

/* --- 対応環境 --------------------------------------------------------------- */

.spec-list {
  margin: 0 0 var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.spec-list div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  padding: var(--space-md) 0;
}

.spec-list dt {
  min-width: 8rem;
  font-weight: 600;
}

.spec-list dd {
  margin: 0;
  color: var(--text-muted);
}

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

.faq-list {
  display: grid;
  gap: var(--space-md);
  max-width: var(--prose-width);
}

.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 48px;
  padding: var(--space-md) var(--space-xl);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* 開閉状態を運ぶ記号。装飾ではないので、アニメーション削減時も向きは残る。 */
.faq summary::after {
  content: '';
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 0.2rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 200ms ease-in-out;
}

.faq[open] summary::after {
  transform: translateY(10%) rotate(-135deg);
}

.faq-answer {
  margin: 0;
  padding: 0 var(--space-xl) var(--space-xl);
  color: var(--text-muted);
}

/* --- 最終CTA --------------------------------------------------------------- */

.final-cta {
  text-align: center;
}

.final-cta .section-head,
.final-cta .measure {
  margin-left: auto;
  margin-right: auto;
}

.final-cta .button-row,
.final-cta .cta-block {
  justify-content: center;
}

.final-cta .cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.site-footer .footer-brand {
  margin: 0 0 var(--space-md);
  color: var(--text);
  font-weight: 700;
}

.site-footer .footer-org {
  margin: 0 0 var(--space-sm);
  line-height: 1.7;
}
