/* ==========================================================
   16性格タイプ 毎日自己分析 — LP
   ダーク基調 + 琥珀・記録4色アクセント（アプリUI準拠）
   ========================================================== */

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

:root {
  /* アプリUI由来のカラーパレット */
  --bg:        #0B0F1C;
  --bg-soft:   #11162A;
  --surface:   #161C33;
  --surface-2: #1D2440;
  --line:      rgba(237, 234, 228, 0.08);

  --text:      #EDEAE4;
  --text-sub:  rgba(237, 234, 228, 0.62);
  --text-dim:  rgba(237, 234, 228, 0.38);

  --amber:     #B87A4A;   /* 記録① 茶 */
  --amber-hi:  #D99E6F;
  --green:     #6B9E6B;   /* 記録② 緑 */
  --blue:      #4A7EB8;   /* 記録③ 青 */
  --purple:    #9E6B9E;   /* 記録④ 紫 */
  --gold:      #B8A04A;   /* ストリーク金 */
  --rose:      #B08080;   /* ナビアクセント */

  --font-head: "Zen Kaku Gothic New", "Outfit", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Outfit", sans-serif;
  --font-latin: "Outfit", "Noto Sans JP", sans-serif;

  --radius: 20px;
  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

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

/* 英語表示時：行間・letter-spacing を最適化 */
html[lang="en"] body { line-height: 1.7; }
html[lang="en"] .hero-title,
html[lang="en"] .section-title,
html[lang="en"] .cta-title { letter-spacing: 0; }

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

/* 日本語見出しの改行単位制御（文節がまとまって折り返す） */
.nb { white-space: nowrap; display: inline-block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 15, 28, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand img {
  width: 34px; height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 言語切替ピル */
.lang-toggle {
  display: flex;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
}
.lang-btn {
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: 99px;
  padding: 5px 14px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}
.lang-btn:hover { color: var(--text-sub); }
.lang-btn.active {
  color: var(--bg);
  background: var(--amber-hi);
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(184, 122, 74, 0.14), transparent 60%),
    linear-gradient(180deg, #0D1222 0%, var(--bg) 100%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.orb-amber { width: 420px; height: 420px; background: rgba(184, 122, 74, 0.5); top: -120px; right: -80px; }
.orb-blue  { width: 360px; height: 360px; background: rgba(74, 126, 184, 0.32); bottom: -100px; left: -120px; }
.orb-purple{ width: 280px; height: 280px; background: rgba(158, 107, 158, 0.3); top: 35%; left: 45%; }

.hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--amber-hi);
  border: 1px solid rgba(217, 158, 111, 0.35);
  border-radius: 99px;
  padding: 5px 16px;
  margin-bottom: 26px;
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 2.7rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.06rem);
  color: var(--text-sub);
  max-width: 34em;
  margin-bottom: 36px;
}

/* ストアバッジ */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.store-badges-center { justify-content: center; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #F5F2EC;
  color: #14181F;
  border-radius: 13px;
  padding: 10px 22px 10px 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 158, 111, 0.22);
}
.store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-family: var(--font-latin);
}
.store-badge small { font-size: 0.62rem; font-weight: 500; opacity: 0.7; }
.store-badge strong { font-size: 1.04rem; font-weight: 600; letter-spacing: 0.01em; }

.store-badge.is-disabled {
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--line);
  cursor: default;
}
.store-badge.is-disabled:hover { transform: none; box-shadow: none; }

.hero-note {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* スマホモックアップ */
.hero-mock { display: flex; justify-content: center; }

.phone-frame {
  position: relative;
  width: min(290px, 100%);
  max-width: 100%;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(160deg, #2A3152, #151A2E);
  border: 1px solid rgba(237, 234, 228, 0.12);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(184, 122, 74, 0.12);
}
.phone-frame img {
  width: 100%;
  border-radius: 33px;
}
.phone-sm { width: min(260px, 100%); }
.phone-xs { width: min(220px, 100%); margin: 26px auto 0; }

/* ---------- セクション共通 ---------- */
.section { padding: 96px 0; }
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.section-label {
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  text-align: center;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 56px;
}

/* ---------- 課題提起 → 解決 ---------- */
.problem { background: var(--bg-soft); }

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 72px;
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.problem-icon { font-size: 1.7rem; display: block; margin-bottom: 16px; }
.problem-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.06rem;
  margin-bottom: 10px;
}
.problem-card p { font-size: 0.92rem; color: var(--text-sub); }

.solution {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(184, 122, 74, 0.12), transparent 70%),
    var(--surface);
  border: 1px solid rgba(217, 158, 111, 0.22);
}
.solution-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  color: var(--amber-hi);
  margin-bottom: 20px;
}
.solution-body {
  font-size: 0.97rem;
  color: var(--text-sub);
  text-align: left;
}

/* ---------- 主要機能 ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding: 44px 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--line); }

.feature-media { display: flex; justify-content: center; }

.feature-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 99px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.tag-amber  { color: var(--amber-hi); background: rgba(184, 122, 74, 0.16); }
.tag-blue   { color: #8FB4E0; background: rgba(74, 126, 184, 0.18); }
.tag-purple { color: #C99BC9; background: rgba(158, 107, 158, 0.18); }
.tag-gold   { color: #D9C46F; background: rgba(184, 160, 74, 0.16); }

.feature-copy h3 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.5;
  margin-bottom: 16px;
}
.feature-copy p {
  font-size: 0.95rem;
  color: var(--text-sub);
  max-width: 30em;
}

.feature-extra {
  margin-top: 56px;
  text-align: center;
}
.feature-extra h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.chips li {
  font-size: 0.86rem;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 20px;
}

/* ---------- 使い方 ---------- */
.how { background: var(--bg-soft); }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 26px 30px;
  min-width: 0; /* グリッド子要素のはみ出し防止 */
  display: flex;
  flex-direction: column;
}
.step .phone-xs { margin-top: auto; }
.step p { margin-bottom: 22px; }
.step-num {
  position: absolute;
  top: -16px;
  left: 26px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--font-latin);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bg);
  background: var(--amber-hi);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(184, 122, 74, 0.35);
}
.step h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.step p { font-size: 0.92rem; color: var(--text-sub); }

/* ---------- FAQ ---------- */

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

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  cursor: pointer;
  line-height: 1.6;
}
.faq-arrow {
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 2px solid var(--amber-hi);
  border-bottom: 2px solid var(--amber-hi);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}
.faq-q[aria-expanded="true"] .faq-arrow { transform: rotate(225deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a p {
  font-size: 0.91rem;
  color: var(--text-sub);
  padding: 0 24px 22px;
}

/* ---------- 最終CTA ---------- */
.cta {
  position: relative;
  text-align: center;
  padding: 130px 0;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(184, 122, 74, 0.16), transparent 65%),
    radial-gradient(ellipse 40% 50% at 20% 20%, rgba(74, 126, 184, 0.08), transparent 70%);
}
.cta .container { position: relative; }
.cta-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 4.4vw, 2.3rem);
  line-height: 1.6;
  margin-bottom: 18px;
}
.cta-sub {
  color: var(--text-sub);
  margin-bottom: 40px;
}

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 48px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 28px;
}
.footer-links a {
  font-size: 0.88rem;
  color: var(--text-sub);
  transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--amber-hi); }

.footer-disclaimer {
  font-size: 0.74rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 20px;
  text-align: left;
}
.footer-copy {
  font-family: var(--font-latin);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ---------- スクロールフェードイン ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- フォーカス可視化 ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================
   レスポンシブ（モバイルファースト → 768px / 1024px）
   ========================================================== */
@media (min-width: 768px) {
  .hero { padding: calc(var(--header-h) + 90px) 0 110px; }
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
  }
  .hero-mock { justify-content: flex-end; }

  .problem-grid { grid-template-columns: repeat(3, 1fr); }

  .feature-row {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    padding: 64px 0;
  }
  /* 偶数行は画像を右側に（ジグザグ配置） */
  .feature-row:nth-of-type(even) .feature-media { order: 2; }
  .feature-row:nth-of-type(even) .feature-copy  { order: 1; }

  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .voice-grid { grid-template-columns: repeat(3, 1fr); }

  .brand-name { font-size: 1rem; }
}

@media (min-width: 1024px) {
  .section { padding: 120px 0; }
  .phone-frame { width: 310px; }
  .phone-sm { width: 280px; }
}

/* 狭小スクリーン（〜374px）の保険 */
@media (max-width: 374px) {
  .brand-name { font-size: 0.78rem; }
  .store-badge { padding: 9px 16px 9px 14px; }
}
