/* 日本語 LP 専用のスタイル。他言語は /assets/landing/localized.css を使う。 */
/* 見出しは App Store の画像と同じ Noto Sans JP Black。見出しの文字だけのサブセットで、scripts/landing-heading-font.py で作る */
@font-face { font-family: "mogutto Heading"; src: url("/assets/landing/ja/heading.woff2?v=1") format("woff2"); font-weight: 900; font-display: swap; }
:root {
  color-scheme: light;
  /* App Store の画像 (クリーム色の B 案) と同じ配色 */
  --sand: #f0e9de;
  --sand-light: #f5f0e9;
  --sand-deep: #e3d6c7;
  /* 見出しの強調と小さなラベルの文字色。--tint と白の上で 4.5:1 以上 */
  --accent-text: #a45431;
  --ink: #252823;
  --muted: #62665c;
  --paper: #fafaf7;
  --surface: #ffffff;
  --cream: #f0e9de;
  --tint: #f5f0e9;
  --line: #e4ded4;
  /* スクロール後の固定ヘッダの背景 (ヒーローの基調色) */
  --header-bg: rgb(240 233 222 / 0.92);
  --radius-lg: 32px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --font-heading: "mogutto Heading", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height, 0px) + 24px); -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.8; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.02em; text-wrap: balance; word-break: auto-phrase; }
/* 比較用の /ja/guide も この CSS を読むが、サブセットに guide の見出しの文字はないため標準の LP に限る */
[data-lp-variant="standard"] :is(.hero h1, .section-title, .feature h3, .closing h2) { font-family: var(--font-heading); }
p { word-break: auto-phrase; }
a { color: inherit; text-underline-offset: 4px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.skip-link { position: absolute; top: -100px; left: 16px; z-index: 60; padding: 12px 20px; border-radius: 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 12px; }

/* 端末: Figma の iPhone フレームの穴に画面を合わせる */
.device { position: relative; width: 100%; aspect-ratio: 1760 / 3625; filter: drop-shadow(0 28px 48px rgb(60 45 30 / 0.22)); }
.device-screen { position: absolute; left: 4.318%; top: 1.793%; width: 91.364%; height: 96.441%; object-fit: cover; border-radius: 15.5% / 7.1%; background: var(--paper); }
.device-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ヘッダとヒーロー (App Store の画像と同じクリーム地) */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--sand); color: var(--ink); }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
/* 左下の円の頂点は説明文とボタンの間 (下端から 156px)、ボタンの中央の真上に置き、境界が見出しと説明文を横切らないようにする */
.hero::before { width: 1400px; height: 1400px; left: calc(max(24px, 50% - 560px) - 610px); bottom: -1244px; background: var(--sand-deep); }
/* 右上の円も本文の右端を基準に置く。画面の右端を基準にすると、幅の広い画面で境界がナビの文字を横切る */
.hero::after { width: 1100px; height: 1100px; right: calc(max(24px, 50% - 560px) - 570px); top: -820px; background: var(--sand-light); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
/* アプリのログイン画面と同じ SF Pro の太字 (MoguttoTypography.display、字間 -0.64pt / 34pt) */
.brand span { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif; font-size: 1.625rem; font-weight: 700; letter-spacing: -0.019em; line-height: 1; }
.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
/* 固定ヘッダ (header.js が is-sticky を付ける)。中身は .wrap の幅のまま中央に置き、背景だけ画面の端まで広げる */
.brand { margin-right: auto; }
.brand span, .site-header nav a { white-space: nowrap; }
/* ヘッダの導線は App Store と Google Play のバッジを同じ高さで並べる。hidden は header.js が切り替える */
.header-cta { display: flex; align-items: center; gap: 8px; }
.header-cta[hidden] { display: none; }
.header-cta a { display: block; line-height: 0; }
.header-cta img { width: auto; height: 40px; }
.site-header.is-sticky { position: fixed; z-index: 50; top: 0; left: 0; right: 0; margin-inline: auto; }
.site-header.is-sticky > * { flex-shrink: 0; }
.site-header.is-sticky::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); }
.site-header.is-scrolled::before { background: var(--header-bg); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
/* 1 行に収まらないときは、header.js がロゴの文字、ナビ、ロゴの順に隠す */
.site-header.is-compact .brand span { display: none; }
.site-header.is-sticky.is-nav-collapsed nav { display: none; }
.site-header.is-brand-hidden .brand { display: none; }
.site-header.is-brand-hidden .header-cta { margin-left: auto; }
/* ヒーローは isolation で重なりの単位になるため、ヒーローごと本文 (端末の画像など) より手前に置き、固定ヘッダが隠れないようにする */
.has-sticky-header { z-index: 10; padding-top: var(--header-height, 88px); }

.hero-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 48px; padding-block: 40px 0; }
.hero-copy { padding-bottom: 72px; }
.eyebrow { display: inline-block; margin-bottom: 24px; padding: 6px 18px; border-radius: 999px; background: var(--surface); color: var(--accent-text); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.04em; }
.hero h1 { font-size: clamp(3rem, 7vw, 5.75rem); font-weight: 900; line-height: 1.15; letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.hero h1 .em { color: var(--accent-text); }
.lead { max-width: 520px; margin-top: 28px; font-size: 1.1875rem; font-weight: 700; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.store-badges { display: flex; flex: 0 0 100%; flex-wrap: wrap; align-items: center; justify-content: inherit; gap: inherit; }
/* App Store と Google Play の公式バッジは高さをそろえ、拡大縮小だけにする */
.hero-actions .badge { display: block; line-height: 0; }
.hero-actions .badge img { width: auto; height: var(--badge-height, 56px); }
.web-app-badge { display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; min-height: 44px; padding-inline: 14px 16px; border: 1px solid #a6a6a6; border-radius: 8px; background: #000; color: #fff; font-size: 0.875rem; font-weight: 400; line-height: 1; text-decoration: none; white-space: nowrap; }
.web-app-badge:hover { background: #262626; }
.web-app-badge svg { flex: none; width: 1.4em; height: 1.4em; }
/* 端末の下側はヒーローの下端で切り、画面の上半分を見せる */
.hero-visual { align-self: end; justify-self: center; width: min(340px, 100%); margin-bottom: -150px; }

/* 3 つの流れ */
.flow { padding-top: 64px; }
.flow ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.flow li { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.flow .num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tint); color: var(--accent-text); font-weight: 900; }
.flow strong { display: block; font-size: 1.0625rem; }
.flow span.note { display: block; color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }

/* できること */
.features { padding-block: 112px 40px; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; }
.section-lead { margin-top: 16px; color: var(--muted); font-size: 1rem; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 72px; margin-top: 88px; }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature-label { display: inline-block; margin-bottom: 18px; padding: 4px 14px; border-radius: 999px; background: var(--tint); color: var(--accent-text); font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.04em; }
.feature h3 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 900; }
.feature-copy > p { max-width: 460px; margin-top: 20px; color: var(--muted); font-size: 1rem; }
/* 本文の指定 (.feature-copy > p) がラベルにも当たるため、ラベルの位置・色・大きさを戻す */
.feature-copy > .feature-label { margin-top: 0; color: var(--accent-text); font-size: 0.8125rem; }
.feature-copy .detail { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.875rem; }
.feature-visual { display: grid; place-items: center; padding: 56px 24px; border-radius: var(--radius-lg); background: var(--cream); }
.feature:nth-of-type(even) .feature-visual { background: var(--tint); }
.feature-visual .device { width: min(280px, 72%); }

/* よくある質問 */
.faq { margin-top: 112px; padding-block: 96px; background: var(--cream); }
.faq-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 56px; }
.questions { display: grid; gap: 12px; }
details { border-radius: 18px; background: var(--surface); }
summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 16px 56px 16px 24px; cursor: pointer; font-size: 1rem; font-weight: 800; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 24px; width: 10px; height: 10px; border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: translateY(-3px) rotate(45deg); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
details p { padding: 0 24px 20px; color: var(--ink); font-size: 0.9375rem; }
details p + p { margin-top: -8px; }
details a { font-weight: 700; }

/* 最後の導線 */
.closing { --closing-top-padding: 96px; position: relative; isolation: isolate; overflow: hidden; padding-block: var(--closing-top-padding) 0; background: var(--sand-light); color: var(--ink); text-align: center; }
/* 上下に同じ余白があったときの高さを基準にして、半円の位置を保つ */
.closing::before { content: ""; position: absolute; z-index: -1; width: 1200px; height: 1200px; left: 50%; top: calc((100% + var(--closing-top-padding)) * 0.55); border-radius: 50%; background: var(--sand-deep); transform: translateX(-50%); }
.closing img.icon { width: 88px; height: 88px; margin: 0 auto 24px; }
.closing h2 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 900; }
.closing h2 .em { color: var(--accent-text); }
.closing-actions { justify-content: center; margin-top: 32px; }

.page-content { overflow: clip; background: var(--sand-light); }
.page-content > main { background: var(--paper); }
.page-content .closing { overflow: visible; }
.page-content > .site-footer { position: relative; color: var(--ink); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 28px; color: var(--muted); font-size: 0.8125rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.store-trademark { flex-basis: 100%; margin: 0; font-size: 0.75rem; }

@media (max-width: 900px) {
  /* 1 列では文字が端末より上にあるため、円を端末の左に見える高さへ戻す */
  .hero::before { left: -520px; bottom: -1080px; }
  /* 右上の円は中央寄せの見出しにかかるため、下端をヘッダとラベルの間 (上端から 100px) まで上げ、ロゴの下を通る浅い弧にする */
  .hero::after { width: 800vw; height: 800vw; right: calc(50% - 400vw); top: calc(100px - 800vw); }
  .hero-body { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; text-align: center; }
  .hero-copy { padding-bottom: 0; }
  .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { width: min(280px, 70%); margin-bottom: -120px; }
  .flow { padding-top: 48px; }
  .flow ol { grid-template-columns: 1fr; }
  .feature, .faq-layout { grid-template-columns: 1fr; gap: 32px; }
  .feature { margin-top: 72px; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
}

@media (max-width: 560px) {
  .hero-actions { --badge-height: 48px; gap: 10px; }
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 72px; }
  .hero::after { top: calc(86px - 800vw); }
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 1.375rem; }
  /* スクリプトなしでは収まるか測れないため隠し、固定ヘッダでは header.js が測って出し分ける */
  .site-header nav { display: none; }
  .site-header.is-sticky nav { display: flex; gap: 16px; }
  .lead { font-size: 1.125rem; }
  .features { padding-top: 80px; }
  .feature-visual { padding: 40px 16px; border-radius: 24px; }
  .faq { margin-top: 80px; padding-block: 64px; }
  summary { font-size: 0.9375rem; padding-left: 20px; }
  details p { padding-inline: 20px; font-size: 0.875rem; }
  .closing { --closing-top-padding: 72px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

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