/* ==========================================================================
   Cosoado Lab — マッチングアプリ一覧 LP
   トップページ (style.css) とは別系統の「索引 (index)」デザイン。
   トップが cream + yellow の明るい面なのに対し、こちらは warm black を地にして
   9 ジャンルのブランドカラーだけを発色させる。カード網羅ではなく
   「01〜09 の目録」として読ませることで、選ぶための画面であることを示す。
   ========================================================================== */

:root {
  --ink:        #12100F;   /* 地。純黒ではなく暖色寄りにしてトップの cream と血縁を持たせる */
  --ink-2:      #1B1817;   /* 一段上げた面 */
  --ink-3:      #262220;   /* 罫線・境界 */
  --cream:      #F5F1E4;   /* 主文字色（トップページと同一） */
  --cream-dim:  rgba(245,241,228,0.62);
  /* 0.40 では #12100F 上で 3.52:1 と AA(4.5:1) 未達だったため 0.51 に。
     補助テキストであっても本文サイズ扱いのため 4.5:1 を満たす必要がある */
  --cream-faint:rgba(245,241,228,0.51);
  --yellow:     #FFD702;   /* Cosoado Lab のアクセント */
  --radius:     14px;
  --wrap:       1180px;
}

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

html {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { line-height: 1.85; font-size: 16px; overflow-x: hidden; }

/* ── 日本語の折り返し制御 ─────────────────────────────────────
   word-break: auto-phrase は Chrome 専用で iPhone の Safari では無視される。
   閲覧の主体がスマホである以上そこには頼れないので、サイト共通の方針
   （style.css / scripts/README-wbr.md）に合わせ、keep-all で自動の折り返しを
   止めたうえで、折ってよい位置だけを HTML 側の <wbr> で明示する。
   <wbr> の挿入は python3 scripts/apply_all.py が行う。
   overflow-wrap は 1 行に入らない語が出たときにレイアウトを壊さない逃げ道。 */
body {
  word-break: keep-all;
  /* break-word だと箱の最小幅が「最長の語」まで膨らみ、狭い画面でグリッドが
     はみ出す（実測: 320px で横スクロールが出た）。anywhere を維持する */
  overflow-wrap: anywhere;
  /* 句読点・閉じ括弧・小書き仮名・長音符を行頭に置かない（禁則処理）。
     行に収まる限りはこちらが効き、収まらないときだけ anywhere が割る */
  line-break: strict;
}
/* ハイフンやスラッシュを含む語はラテン文字扱いになり keep-all が効かないため、
   記号の位置で割れる。割りたくない塊はこのクラスで括る */
.nw { white-space: nowrap; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--yellow); color: var(--ink); }

h1, h2, h3, .num, .brand b {
  font-family: 'Outfit', 'Noto Sans JP', system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

/* ── 見出しの目印。セクション名を小さく置いて索引らしさを出す ───────────── */
.kicker {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--yellow);
  flex: none;
}

/* ══ ナビ ══════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18,16,15,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.stuck { border-bottom-color: var(--ink-3); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; min-height: 44px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-size: 16px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--cream-dim); }
.nav-links a {
  position: relative;
  /* 見た目は 34px のままでも、指で押せる範囲は 44px 必要。
     padding で当たり判定だけ広げ、同量の負マージンで配置を戻す */
  padding: 15px 6px; margin: -15px -6px;
  transition: color .2s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 6px; right: 100%; bottom: 13px; height: 1px;
  background: var(--yellow); transition: right .28s cubic-bezier(.16,1,.3,1);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { right: 6px; }
.nav-cta {
  flex: none;
  background: var(--yellow); color: var(--ink);
  font-weight: 700; font-size: 14px;
  padding: 12px 18px; border-radius: 999px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-cta:hover { background: var(--cream); color: var(--ink); transform: translateY(-1px); }
@media (max-width: 900px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }

/* ══ パンくず ═════════════════════════════════════════════════════════ */
.crumbs { font-size: 12.5px; color: var(--cream-faint); padding: 22px 0 0; line-height: 20px; }
.crumbs a {
  display: inline-block;
  padding: 12px 4px; margin: -12px -4px;
  transition: color .2s ease;
}
.crumbs a:hover { color: var(--yellow); }
.crumbs span { margin: 0 8px; }
.crumbs [aria-current] { color: var(--cream-dim); margin: 0; }

/* ══ ヒーロー ═════════════════════════════════════════════════════════ */
.hero { padding: 56px 0 92px; position: relative; overflow: hidden; }
/* 背景の色帯 — 9 ジャンルの色をそのまま極薄で敷き、扉が 9 枚あることを予告する */
.hero-bands {
  position: absolute; inset: 0; display: flex; pointer-events: none;
  opacity: .30; mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent);
}
.hero-bands i { flex: 1; filter: blur(46px); }
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 20px 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 4.6vw, 62px);
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
/* 日本語を文節単位で折り返す。span ごと inline-block にすることで
   「探しているのは恋人じ / ゃなく、」のような途中改行を防ぐ */
.hero h1 > span { display: inline-block; }
.hero h1 .accent { color: var(--yellow); }
.hero .lead {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--cream-dim);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero .lead b { color: var(--cream); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 999px;
  transition: background .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
}
.btn svg { flex: none; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--cream); color: var(--ink); transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(245,241,228,0.22); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); background: var(--cream); color: var(--ink); }

.hero-note { font-size: 13px; color: var(--cream-faint); margin-top: 18px; }

/* 数字の帯 — 「9 ジャンル」を視覚化する */
/* ── ヒーロー右の 9 タイル（目次）────────────────────────────────────── */
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-tile {
  display: flex; flex-direction: column; gap: 9px;
  padding: 15px 14px 14px;
  border: 1px solid var(--ink-3); border-radius: 14px;
  background: rgba(245,241,228,0.028);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.hero-tile .m { color: var(--c-t); transition: color .25s ease; }
.hero-tile b {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif; font-weight: 900;
  font-size: 13.5px; line-height: 1.2; letter-spacing: -0.01em;
  margin-top: auto;
}
.hero-tile small { font-size: 11px; color: var(--cream-faint); line-height: 1.4; }
.hero-tile:hover { border-color: var(--c-t); background: rgba(245,241,228,0.06); transform: translateY(-2px); }

.hero-stats {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 34px;
  margin-top: 34px; padding-top: 28px;
  border-top: 1px solid var(--ink-3);
}
.hero-stats div span {
  display: block;
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: 34px; line-height: 1; letter-spacing: -0.03em;
}
.hero-stats div p { font-size: 12.5px; color: var(--cream-faint); margin-top: 7px; }

@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 620px; }
}
@media (max-width: 520px) {
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 22px 30px; }
}

/* ══ 汎用セクション ════════════════════════════════════════════════════ */
section { padding: 84px 0; }
section h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  max-width: 22ch;
}
section .sub { color: var(--cream-dim); max-width: 58ch; font-size: 15px; }
.rule { border: 0; border-top: 1px solid var(--ink-3); }

/* ══ なぜ 9 本に分けたか ══════════════════════════════════════════════ */
.why { background: var(--ink-2); }
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--ink-3); border: 1px solid var(--ink-3);
  border-radius: var(--radius); overflow: hidden; margin-top: 44px;
}
.why-grid > div { background: var(--ink-2); padding: 30px 26px; }
.why-grid h3 { font-size: 17px; margin: 16px 0 9px; }
.why-grid p { font-size: 14px; color: var(--cream-dim); }
.why-grid svg { color: var(--yellow); }
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr; } }

/* ══ アプリ目録 (01〜09) ═══════════════════════════════════════════════ */
.apps { padding-bottom: 40px; }
.app-list { margin-top: 48px; border-top: 1px solid var(--ink-3); list-style: none; }

.app {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: 28px; align-items: center;
  padding: 30px 22px 30px 18px;
  border-bottom: 1px solid var(--ink-3);
  transition: background .3s ease;
}
/* ブランドカラーは左の細い罫として常時見せ、ホバーで面に広げる。
   罫と文字には暗背景で 4.5:1 を満たす --c-t（明度を上げたブランド色）を使い、
   ベタ塗りの面だけ本来の --c を使う。TsuriMate #1d4f86 や
   ピアコネクト #2d4a6e のような暗いブランド色が黒地に沈むのを防ぐ。 */
.app::before {
  content: ""; position: absolute; left: 0; top: -1px; bottom: -1px;
  width: 3px; background: var(--c-t);
  transition: width .3s cubic-bezier(.16,1,.3,1);
}
.app:hover::before { width: 6px; }
.app:hover { background: rgba(245,241,228,0.035); }
@supports (background: color-mix(in srgb, red 9%, transparent)) {
  .app:hover { background: color-mix(in srgb, var(--c-t) 9%, transparent); }
}

.app .num {
  font-size: 26px; color: var(--cream-faint);
  letter-spacing: -0.02em; transition: color .3s ease;
}
.app:hover .num { color: var(--c-t); }

.app-id { display: flex; align-items: center; gap: 14px; }
.app-mark {
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  color: var(--c-t);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
@supports (background: color-mix(in srgb, red 9%, transparent)) {
  .app-mark {
    background: color-mix(in srgb, var(--c-t) 18%, var(--ink-2));
    border-color: color-mix(in srgb, var(--c-t) 40%, transparent);
  }
}
/* ホバーで反転。地は --c-t（暗背景で 4.5:1 以上＝十分明るい）なので
   その上に置く --ink の文字・線は必ず 4.5:1 以上になる */
.app:hover .app-mark { background: var(--c-t); border-color: var(--c-t); color: var(--ink); }
.app h3 { font-size: 21px; letter-spacing: -0.02em; }
.app .reading { display: block; font-size: 11.5px; font-weight: 400; color: var(--cream-faint); letter-spacing: .04em; margin-top: 3px; }

.app .tagline { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.app .desc { font-size: 13.5px; color: var(--cream-dim); line-height: 1.75; }
.app .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.app .tags span {
  font-size: 11.5px; line-height: 1.6;
  padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--ink-3); color: var(--cream-faint);
}

.app-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 168px; }
.app-actions a {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; font-weight: 700;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--ink-3);
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.app-actions .go { background: var(--c); border-color: var(--c-t); color: #fff; }
/* 明度の高いブランドカラー (黄緑〜水色系) では白文字が読めないため個別に反転する */
.app-actions .go.on-light { color: var(--ink); }
.app-actions .go:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.app-actions .peek { color: var(--cream-dim); }
.app-actions .peek:hover { border-color: var(--cream); background: var(--cream); color: var(--ink); }

.badge-beta {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  /* overflow-wrap: anywhere が効いて 320px 幅で "BE / TA" に割れるため、
     3〜4 文字のラベルは折り返しを禁止する */
  white-space: nowrap;
  font-size: 10.5px; letter-spacing: .1em;
  padding: 2px 7px; border-radius: 4px;
  /* バッジは地が一段明るい (実効 rgb(41,38,36)) ため、
     --cream-faint より更に上げないと 4.5:1 に届かない */
  background: rgba(245,241,228,0.10); color: rgba(245,241,228,0.60);
  vertical-align: 3px; margin-left: 8px;
}
.badge-en { background: rgba(255,215,2,0.14); color: var(--yellow); }

@media (max-width: 1040px) {
  .app { grid-template-columns: 46px minmax(0,1fr); grid-template-areas: "num id" ". body" ". act"; row-gap: 16px; }
  .app .num { grid-area: num; align-self: start; }
  .app-id { grid-area: id; }
  .app-body { grid-area: body; }
  .app-actions { grid-area: act; flex-direction: row; flex-wrap: wrap; }
  .app-actions a { flex: 1 1 150px; }
}
@media (max-width: 560px) {
  .app { grid-template-columns: 34px minmax(0,1fr); padding: 26px 4px 26px 16px; gap: 14px; }
  .app .num { font-size: 19px; }
}

/* ══ 共通の仕組み ═════════════════════════════════════════════════════ */
.how { background: var(--ink-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 46px; }
.step {
  border: 1px solid var(--ink-3); border-radius: var(--radius);
  padding: 28px 26px; background: var(--ink);
}
.step .n {
  font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 13px;
  color: var(--ink); background: var(--yellow);
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; margin-bottom: 16px;
}
.step h3 { font-size: 17px; margin-bottom: 9px; }
.step p { font-size: 14px; color: var(--cream-dim); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.feature-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--ink-3);
  border: 1px solid var(--ink-3); border-radius: var(--radius); overflow: hidden; margin-top: 30px; }
.feature-row > div { background: var(--ink); padding: 26px; display: flex; gap: 16px; }
.feature-row svg { color: var(--yellow); flex: none; margin-top: 3px; }
.feature-row h3 { font-size: 15.5px; margin-bottom: 6px; }
.feature-row p { font-size: 13.5px; color: var(--cream-dim); }
@media (max-width: 760px) { .feature-row { grid-template-columns: 1fr; } }

/* ══ 選び方 ═══════════════════════════════════════════════════════════ */
.picker-table { margin-top: 42px; border: 1px solid var(--ink-3); border-radius: var(--radius); overflow: hidden; }
.picker-table a {
  display: grid; grid-template-columns: minmax(0,1fr) 190px;
  gap: 20px; align-items: center;
  padding: 17px 24px;
  border-bottom: 1px solid var(--ink-3);
  transition: background .22s ease;
}
.picker-table a:last-child { border-bottom: 0; }
.picker-table a:hover { background: var(--ink-2); }
.picker-table .q { font-size: 15px; }
.picker-table .q::before { content: "「"; color: var(--cream-faint); }
.picker-table .q::after { content: "」"; color: var(--cream-faint); }
.picker-table .a {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--c-t); justify-self: end;
}
.picker-table .a i { width: 8px; height: 8px; border-radius: 999px; background: var(--c-t); flex: none; }
.picker-table a:hover .a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 620px) {
  .picker-table a { grid-template-columns: 1fr; gap: 8px; }
  .picker-table .a { justify-self: start; }
}

/* ══ FAQ ══════════════════════════════════════════════════════════════ */
.faq { background: var(--ink-2); }
.faq-list { margin-top: 40px; border-top: 1px solid var(--ink-3); }
.faq details { border-bottom: 1px solid var(--ink-3); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 21px 44px 21px 0; position: relative;
  font-weight: 700; font-size: 16px;
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--yellow); }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 2px solid var(--cream-faint); border-bottom: 2px solid var(--cream-faint);
  transform: rotate(45deg); transition: transform .25s ease, border-color .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover::after { border-color: var(--yellow); }
.faq details p { padding: 0 0 24px; font-size: 14.5px; color: var(--cream-dim); max-width: 74ch; }
.faq details p a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }

/* ══ 最終 CTA ═════════════════════════════════════════════════════════ */
.final { padding: 96px 0; }
.final-box {
  border: 1px solid var(--ink-3); border-radius: 26px;
  padding: 58px 48px; text-align: center;
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(255,215,2,0.10), transparent 62%),
    var(--ink-2);
}
.final-box h2 { margin: 0 auto 16px; font-size: clamp(26px, 3.6vw, 42px); }
.final-box p { color: var(--cream-dim); max-width: 52ch; margin: 0 auto 30px; font-size: 15px; }
.final-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 26px; }
.final-dots i { width: 9px; height: 9px; border-radius: 999px; display: block; }
@media (max-width: 620px) { .final-box { padding: 44px 22px; } }

/* ══ フッター ═════════════════════════════════════════════════════════ */
footer { border-top: 1px solid var(--ink-3); padding: 34px 0 46px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 4px 26px; align-items: center; font-size: 13.5px; }
footer a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px;
  color: var(--cream-dim); transition: color .2s ease;
}
footer a:hover { color: var(--yellow); }
footer .cr { margin-left: auto; color: var(--cream-faint); font-size: 12.5px; }
@media (max-width: 620px) { footer .cr { margin-left: 0; width: 100%; } }
