/* 全アプリ共通のスタイル。アプリごとの色は各ページの :root で --accent を上書きする。 */

:root {
  --accent: #3d5afe;
  --accent-soft: #eef1ff;
  --accent-ink: #ffffff;
  --bg: #f4f4f8;
  --surface: #ffffff;
  --ink: #16171d;
  --ink-sub: #5b5e6b;
  --hairline: rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius-card: 22px;
  --radius-tile: 16px;
  --content: 1080px;
  --reading: 720px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #6e86ff;
    --accent-soft: #1e2340;
    --accent-ink: #0b0d18;
    --bg: #0e0f13;
    --surface: #1a1b21;
    --ink: #f1f2f6;
    --ink-sub: #a3a6b4;
    --hairline: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --accent: #6e86ff;
  --accent-soft: #1e2340;
  --accent-ink: #0b0d18;
  --bg: #0e0f13;
  --surface: #1a1b21;
  --ink: #f1f2f6;
  --ink-sub: #a3a6b4;
  --hairline: rgba(255, 255, 255, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Hiragino Sans",
    "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 1;
}

:lang(en) body,
body:lang(en) {
  line-height: 1.6;
  font-feature-settings: normal;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

.wrap {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 16px;
}

.reading {
  max-width: var(--reading);
}

/* ヘッダー */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

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

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.header-nav a {
  color: var(--ink-sub);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.header-nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.header-nav a[aria-current="true"] {
  color: var(--ink);
  font-weight: 700;
}

/* ヒーロー */

.hero {
  padding: 56px 0 24px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero .lead {
  font-size: 17px;
  color: var(--ink-sub);
  margin: 0 0 28px;
}

.store-badge {
  display: inline-block;
}

.store-badge img {
  height: 54px;
  width: auto;
}

.hero-note {
  font-size: 13px;
  color: var(--ink-sub);
  margin: 12px 0 0;
}

/* 端末の枠 */

.device {
  margin: 0 auto;
  max-width: 300px;
  border-radius: 44px;
  padding: 10px;
  background: #111;
  box-shadow: var(--shadow), 0 0 0 1px var(--hairline);
}

.device img {
  border-radius: 34px;
  width: 100%;
}

.device.small {
  max-width: 260px;
}

/* 3つの訴求 */

.points {
  padding: 32px 0 16px;
}

.points ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.points li {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
}

.points .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.points h2 {
  font-size: 18px;
  margin: 0 0 6px;
  line-height: 1.4;
}

.points p {
  margin: 0;
  color: var(--ink-sub);
  font-size: 15px;
}

/* 機能の節 */

.section {
  padding: 56px 0;
}

.section-title {
  font-size: clamp(24px, 3.6vw, 32px);
  line-height: 1.35;
  margin: 0 0 12px;
  text-align: center;
  text-wrap: balance;
}

.section-lead {
  text-align: center;
  color: var(--ink-sub);
  margin: 0 auto 40px;
  max-width: 640px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 32px 0;
}

.feature:nth-of-type(even) .feature-media {
  order: -1;
}

.feature h3 {
  font-size: clamp(21px, 2.8vw, 26px);
  line-height: 1.4;
  margin: 0 0 12px;
  text-wrap: balance;
}

.feature p {
  margin: 0 0 12px;
  color: var(--ink-sub);
}

.feature ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink-sub);
}

.feature li + li {
  margin-top: 4px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid currentColor;
  padding: 1px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  vertical-align: middle;
}

/* カードの並び */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card h3 {
  font-size: 17px;
  margin: 0 0 6px;
  line-height: 1.4;
}

.card p {
  margin: 0;
  color: var(--ink-sub);
  font-size: 15px;
}

/* 料金 */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.plan {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 28px;
}

.plan.featured {
  box-shadow: var(--shadow), 0 0 0 2px var(--accent);
}

.plan h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.plan .plan-sub {
  margin: 0 0 16px;
  color: var(--ink-sub);
  font-size: 14px;
}

.plan ul {
  margin: 0;
  padding-left: 1.2em;
}

.plan li + li {
  margin-top: 4px;
}

/* よくある質問 */

.faq {
  max-width: var(--reading);
  margin: 0 auto;
}

.faq details {
  background: var(--surface);
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow);
  padding: 0 20px;
}

.faq details + details {
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 28px 16px 0;
  list-style: none;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 20px;
  color: var(--accent);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > div {
  padding: 0 0 16px;
  color: var(--ink-sub);
}

.faq details p {
  margin: 0 0 8px;
}

/* 呼びかけ */

.cta {
  text-align: center;
  padding: 64px 0 72px;
}

.cta img.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}

.cta h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  margin: 0 0 8px;
  text-wrap: balance;
}

.cta p {
  color: var(--ink-sub);
  margin: 0 0 24px;
}

/* ボタン */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button.secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 文書のページ（プライバシーポリシー・サポート） */

.doc {
  padding: 40px 0 72px;
}

.doc h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.35;
  margin: 0 0 8px;
}

.doc .doc-meta {
  color: var(--ink-sub);
  font-size: 14px;
  margin: 0 0 32px;
}

.doc h2 {
  font-size: 20px;
  margin: 40px 0 12px;
  line-height: 1.4;
}

.doc h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  color: var(--ink);
}

.doc ul {
  padding-left: 1.2em;
}

.doc .panel {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 24px 0;
}

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

.lang-switch {
  display: inline-flex;
  gap: 4px;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  font-size: 14px;
}

.lang-switch a {
  padding: 4px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-sub);
}

.lang-switch a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.bilingual-en {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
}

/* アプリ一覧（トップ） */

/* ul を付けて .doc ul（左の余白）より優先させる */
ul.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  /* 1列になる狭い画面でも、カードの高さをいちばん高いものに揃える */
  grid-auto-rows: 1fr;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.app-list a {
  height: 100%;
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
}

.app-list a:hover {
  box-shadow: var(--shadow), 0 0 0 2px var(--accent);
}

.app-list img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  flex: none;
}

.app-list strong {
  display: block;
  font-size: 17px;
}

.app-list span {
  color: var(--ink-sub);
  font-size: 14px;
  line-height: 1.5;
}

/* フッター */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--ink-sub);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-footer a {
  color: var(--ink-sub);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* 狭い画面 */

@media (max-width: 820px) {
  .hero {
    padding-top: 36px;
  }

  .hero .wrap,
  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .feature:nth-of-type(even) .feature-media {
    order: 0;
  }

  .points ul,
  .cards,
  .plans {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0;
  }

  .header-nav .optional {
    display: none;
  }

  .device {
    max-width: 260px;
  }
}

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

  .faq summary::after {
    transition: none;
  }
}

.store-button {
  min-height: 52px;
  padding: 0 26px;
  font-size: 17px;
}

/* 動き
   「視差効果を減らす」がオンの人には動かさない。登場の動きは backwards にして、
   終わったあとはホバーの変形が効くようにする。スクロールに合わせて出す演出は
   animation-timeline に対応したブラウザだけで効き、ほかでは最初から表示される。 */

.button,
.app-list a,
.app-list img,
.brand img {
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-nav a,
.site-footer a {
  transition: background-color 0.2s ease, color 0.2s ease;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes device-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
}

/* transform は登場の動きで使うので、浮き沈みは translate で別に動かす */
@keyframes float {
  to {
    translate: 0 -6px;
  }
}

@keyframes hop {
  40% {
    transform: translateY(-4px) rotate(-8deg);
  }
  70% {
    transform: translateY(0) rotate(4deg);
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* ページを開いたとき: ヒーローの文字を上から順に、少し遅れて端末の画像 */
  .hero .wrap > div:first-child > *,
  .doc h1,
  .doc .doc-meta,
  .app-list li {
    animation: rise-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  .hero .wrap > div:first-child > :nth-child(2),
  .doc .doc-meta,
  .app-list li:nth-child(1) {
    animation-delay: 0.06s;
  }

  .hero .wrap > div:first-child > :nth-child(3),
  .app-list li:nth-child(2) {
    animation-delay: 0.12s;
  }

  .hero .wrap > div:first-child > :nth-child(4),
  .app-list li:nth-child(3) {
    animation-delay: 0.18s;
  }

  .hero .wrap > div:first-child > :nth-child(n + 5),
  .app-list li:nth-child(n + 4) {
    animation-delay: 0.24s;
  }

  .hero .device {
    animation:
      device-in 0.8s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) backwards,
      float 3.2s 1s ease-in-out infinite alternate;
  }

  /* 触ったとき */
  .button:active {
    transform: scale(0.97);
  }

  .faq details[open] > div {
    animation: fade-down 0.25s ease-out;
  }

  @media (hover: hover) {
    .button:hover {
      transform: scale(1.03);
    }

    .button:active {
      transform: scale(0.97);
    }

    .app-list a:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow), 0 12px 28px rgba(0, 0, 0, 0.08), 0 0 0 2px var(--accent);
    }

    .app-list a:hover img {
      transform: rotate(-6deg) scale(1.06);
    }

    .brand:hover img {
      animation: hop 0.5s ease;
    }
  }

  /* スクロールしたとき: 画面に入ったところで下からふわっと。端末の画像は文章より少し遅れて */
  @supports (animation-timeline: view()) {
    .points li,
    .section-title,
    .section-lead,
    .feature > div,
    .card,
    .plan,
    .cta .wrap > * {
      animation: rise-in cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    .feature > .feature-media {
      animation-name: device-in;
      animation-range: entry 15% entry 90%;
    }
  }
}
