/* ===== リセット & ベース ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* アプリ（app_theme.dart）と同じインディゴ基調 */
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --primary-soft: #EEF0FF;
  --accent: #7C3AED;
  /* カテゴリ色 */
  --cat-work: #4F46E5;
  --cat-life: #0D9488;
  --cat-hobby: #7C3AED;
  --cat-study: #0EA5E9;

  --text: #1E1B4B;
  --text-muted: #6B7280;
  --bg: #F8F7FF;
  --bg-alt: #EEF0FF;
  --surface: #FFFFFF;
  --border: #E5E7EB;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 4px 24px rgba(79, 70, 229, .08);
  --shadow-lg: 0 24px 60px -16px rgba(30, 27, 75, .28);

  --font: 'Noto Sans JP', sans-serif;
  --font-display: 'Inter', 'Noto Sans JP', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.sp-only { display: none; }

.highlight {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== 背景オーブ ===== */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .28;
  animation: orb-float 20s ease-in-out infinite;
}
.orb--1 { width: 460px; height: 460px; background: radial-gradient(circle, #818CF8, transparent 70%); top: -120px; left: -120px; }
.orb--2 { width: 520px; height: 520px; background: radial-gradient(circle, #a78bfa, transparent 70%); top: 28%; right: -180px; animation-delay: -7s; }
.orb--3 { width: 400px; height: 400px; background: radial-gradient(circle, #5eead4, transparent 70%); bottom: 6%; left: 18%; opacity: .16; animation-delay: -13s; }
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(36px, 28px) scale(1.07); }
  66% { transform: translate(-26px, 44px) scale(.95); }
}

/* ===== ボタン / バッジ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  border-radius: 100px;
  transition: transform .2s, box-shadow .2s;
}
.btn--sm { padding: 9px 20px; font-size: .875rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 22px rgba(79, 70, 229, .32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79, 70, 229, .42); }

.store-badge { display: inline-block; transition: transform .2s, filter .2s; }
.store-badge img { width: 200px; height: auto; }
.store-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 18px rgba(30, 27, 75, .25)); }
.store-badge--sm img { width: 160px; }

/* ===== セクション共通 ===== */
section { padding: 84px 0; position: relative; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-label {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.02em;
}

/* ===== ヘッダー ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(248, 247, 255, .8);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.header.scrolled { background: rgba(248, 247, 255, .94); border-bottom-color: var(--border); }
.header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}
.header__logo { display: flex; align-items: center; gap: 9px; }
.header__icon { border-radius: 9px; box-shadow: 0 3px 8px rgba(79, 70, 229, .25); }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -.01em;
}
.header__nav { display: flex; gap: 24px; margin-left: auto; }
.header__nav a { font-size: .9rem; font-weight: 500; color: var(--text-muted); transition: color .2s; }
.header__nav a:hover { color: var(--primary); }
.header .btn--primary { flex-shrink: 0; }

/* ===== ヒーロー ===== */
.hero {
  padding: 124px 0 72px;
  background:
    radial-gradient(at 18% 18%, rgba(79, 70, 229, .14), transparent 52%),
    radial-gradient(at 82% 28%, rgba(124, 58, 237, .14), transparent 52%),
    linear-gradient(160deg, #EEF0FF 0%, #F8F7FF 52%, #EFEAFE 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 52px;
  align-items: center;
}
.hero__content { position: relative; z-index: 2; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .85);
  color: var(--primary);
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 100px;
  margin-bottom: 22px;
  border: 1px solid rgba(79, 70, 229, .18);
}
.hero__badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34D399; position: relative;
}
.hero__badge .dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #34D399; animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }

.hero__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.hero__icon { border-radius: 22px; box-shadow: var(--shadow-lg); }
.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--text);
}
.hero__catch {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}
.hero__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}
.meta-item { font-size: .82rem; color: var(--text-muted); font-weight: 500; }

/* スマホモック */
.hero__visual { display: flex; justify-content: center; position: relative; z-index: 2; }
.phone-mockup {
  width: 286px;
  background: linear-gradient(160deg, #312E81, #1E1B4B);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 2px #312E81;
  transform: rotate(-3deg);
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.phone-mockup:hover { transform: rotate(-1.5deg) translateY(-8px); }
.phone-mockup img { width: 100%; border-radius: 32px; }

/* 足跡装飾 */
.footprints {
  position: absolute;
  top: 12%;
  right: -10px;
  display: flex;
  gap: 6px;
  font-size: 1.4rem;
  opacity: .18;
  transform: rotate(20deg);
  pointer-events: none;
}
.footprints i { animation: step 2.4s ease-in-out infinite; animation-delay: var(--d); }
@keyframes step { 0%, 100% { opacity: .15; } 50% { opacity: .45; } }

/* ===== 機能 ===== */
.features { background: var(--bg); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card__icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: var(--primary-soft);
  border-radius: 16px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.feature-card p { font-size: .94rem; color: var(--text-muted); }
.feature-card strong { color: var(--text); font-weight: 700; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cat {
  font-size: .76rem; font-weight: 700;
  padding: 5px 13px; border-radius: 100px;
  color: #fff;
}
.cat--work { background: var(--cat-work); }
.cat--life { background: var(--cat-life); }
.cat--hobby { background: var(--cat-hobby); }
.cat--study { background: var(--cat-study); }

.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px dashed var(--border);
}
.trust-row li {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== スクリーンショット ===== */
.screens { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); overflow: hidden; }
.screens__track {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 8px;
}
.shot { text-align: center; }
.shot__frame {
  width: 240px;
  background: linear-gradient(160deg, #312E81, #1E1B4B);
  border-radius: 38px;
  padding: 9px;
  box-shadow: var(--shadow-lg), 0 0 0 2px #312E81;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.shot:hover .shot__frame { transform: translateY(-10px) rotate(-1deg); }
.shot__frame img { width: 100%; border-radius: 30px; }
.shot figcaption {
  margin-top: 20px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.shot figcaption span {
  display: block;
  margin-top: 5px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===== ダウンロード ===== */
.download {
  background:
    radial-gradient(at 22% 22%, rgba(79, 70, 229, .16), transparent 50%),
    radial-gradient(at 78% 78%, rgba(124, 58, 237, .18), transparent 50%),
    linear-gradient(160deg, #EEF0FF 0%, #E3DDFB 100%);
  text-align: center;
}
.download__card {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .6) inset;
  max-width: 640px;
  margin: 0 auto;
}
.download__icon { margin: 0 auto 18px; border-radius: 20px; box-shadow: var(--shadow); }
.download__card h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 14px;
}
.download__card p { color: var(--text-muted); margin-bottom: 28px; }
.download .store-badge { margin: 0 auto; }

/* ===== フッター ===== */
.footer {
  background: #1E1B4B;
  color: #c7c5e6;
  padding: 52px 0 30px;
  text-align: center;
}
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.footer__brand { display: flex; align-items: center; gap: 9px; }
.footer__brand img { border-radius: 8px; }
.footer__brand .logo-text { color: #fff; }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer__links a { font-size: .9rem; color: #c7c5e6; transition: color .2s; }
.footer__links a:hover { color: #fff; }
.footer__copy { font-size: .78rem; color: #7d79b0; margin-top: 6px; }

/* ===== スクロールアニメーション ===== */
.fade-in { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero__content { display: flex; flex-direction: column; align-items: center; }
  .hero__brand { justify-content: center; }
  .hero__meta { justify-content: center; }
  .hero__visual { order: -1; }
  .header__nav { display: none; }
}

@media (max-width: 600px) {
  section { padding: 64px 0; }
  .sp-only { display: inline; }
  .hero { padding: 100px 0 52px; }
  .phone-mockup { width: 248px; }
  .feature-grid { grid-template-columns: 1fr; }
  .download__card { padding: 44px 24px; }
  .shot__frame { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
