/*
 * ナレッジハブ・ニュースの記事一覧（2026-09-24）
 *
 * 畔栁さんが見本 /design/knowledge-list/・/design/knowledge-list-2/ から選んだ形：
 *   ナレッジハブ（.isK）  … 左にカテゴリーの目次（案4）＋ 新着を大きく＋3列（案1）。動きは m4「線から現れる」
 *   ニュース（.isNews）   … 新着を大きく＋3列（案1）。動きは m3「画像が落ち着く」
 * 組み立ては inc/list-archive.php、動き（現れ方・もっと読む）は assets/js/list-archive.js。
 *
 *   ・楕円の札は使わない。カテゴリーは文字だけ（金の文字）。枠の一辺だけに色も使わない
 *   ・日付は Noto Sans JP（Futura の細い数字は小さいと読みにくいので、英字の見出しだけに使う）
 *   ・動く量は小さく（前回の「幕が上がる」「26px 浮く」は大きすぎた）
 *   ・JS が動かないとき（is-ready が付かないとき）は、はじめから全部見せる
 */

.areaList {
    padding: 40px 0 110px;
}

.ls {
    --ink: #242428;
    --gold: #C9A551;
    --gold-dark: #A8812F;
    --line: #E3E3E6;
    --muted: #6A6A72;
    --en: "FuturaLTProLight", "Futura", sans-serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --ease2: cubic-bezier(.65, 0, .35, 1);
    container: ls / inline-size;
    max-width: 1180px;
    margin: 0 auto;
    font-family: "Noto Sans JP", sans-serif;
    color: var(--ink);
    line-height: 1.7;
}
.ls *, .ls *::before, .ls *::after { box-sizing: border-box; }
/* 初期化は :where() で強さを0にする（下の .lsGrid などの余白が負けないように） */
.ls :where(p, ul, figure, h2) { margin: 0; padding: 0; }
.ls :where(ul) { list-style: none; }
.ls :where(a) { color: inherit; text-decoration: none; }
.ls :where(img) { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- 見出し ---- */
.lsHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.lsLabel { display: flex; align-items: center; gap: 14px; font-family: var(--en); font-size: 13px; letter-spacing: .26em; color: var(--gold-dark); }
.lsLabel::before { content: ""; width: 36px; height: 1px; background: var(--gold); transform-origin: left; }
.lsHead h2 { margin-top: 10px; font-size: 30px; font-weight: 400; letter-spacing: .1em; line-height: 1.4; color: var(--ink); }
.lsCount { font-size: 13px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.lsCount b { margin-right: 4px; font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: .02em; font-feature-settings: "tnum"; }

/* ---- カテゴリー（横並びの文字。ニュースと、ナレッジハブの狭い画面） ---- */
.lsCats { position: relative; margin-top: 30px; border-bottom: 1px solid var(--line); }
.lsCats ul { display: flex; flex-wrap: wrap; column-gap: 30px; }
.lsCats a { position: relative; display: block; padding: 14px 0 13px; font-size: 14px; letter-spacing: .06em; color: var(--muted); transition: color .4s; }
.lsCats a:hover, .lsCats a.on { color: var(--ink); }
.lsCats a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); }

/* ---- 左のカテゴリーの目次（ナレッジハブの広い画面）。下へ送っても付いてくる ---- */
.lsSide { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 56px; margin-top: 48px; align-items: start; }
.lsNav { position: sticky; top: 120px; }
.lsNav p { font-family: var(--en); font-size: 12px; letter-spacing: .26em; color: var(--gold-dark); }
.lsNav ul { margin-top: 14px; border-top: 1px solid var(--ink); transform-origin: left; }
.lsNav a { display: flex; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: .06em; color: var(--muted); transition: color .4s; }
.lsNav a i { width: 0; height: 1px; margin-right: 0; background: var(--gold); transition: width .45s var(--ease), margin .45s var(--ease); }
.lsNav a small { margin-left: auto; font-size: 12px; color: #9A9AA2; font-feature-settings: "tnum"; }
.lsNav a:hover, .lsNav a.on { color: var(--ink); }
.lsNav a:hover i, .lsNav a.on i { width: 14px; margin-right: 12px; }
.lsNav a.on { font-weight: 500; }
.isK .lsSide .lsCats { display: none; }

/* ---- 記事の部品 ---- */
.lsImg { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #F4F4F6; border-radius: 6px; }
.lsImg--none img { object-fit: contain; padding: 18% 30%; opacity: .5; }
.lsMeta { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 1.4; }
.lsMeta .c { font-weight: 500; letter-spacing: .1em; color: var(--gold-dark); }
.lsMeta .d { color: var(--muted); letter-spacing: .04em; font-feature-settings: "tnum"; }
.lsMeta .c + .d::before { content: ""; display: inline-block; width: 1px; height: 10px; margin-right: 12px; background: #CFCFD4; vertical-align: -1px; }
.lsTitle { font-size: 15.5px; font-weight: 500; line-height: 1.75; letter-spacing: .02em; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lsTitle span { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size .5s var(--ease); }
.lsArw { position: relative; display: inline-block; width: 28px; height: 9px; flex: none; }
.lsArw::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: currentColor; }
.lsArw::after { content: ""; position: absolute; right: 0; top: 1px; width: 6px; height: 6px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

/* 新着を大きく */
.lsPick { display: grid; grid-template-columns: 1.3fr 1fr; column-gap: 56px; align-items: center; margin-top: 48px; }
.lsPick .lsImg { border-radius: 8px; }
.lsPick .lsNew { font-family: var(--en); font-size: 12px; letter-spacing: .3em; color: var(--gold-dark); }
.lsPick .lsMeta { margin-top: 18px; }
.lsPick .lsPickTitle { display: block; margin-top: 14px; }
.lsPick .lsTitle { font-size: 24px; line-height: 1.65; -webkit-line-clamp: 3; }
.lsPick .lsGo { display: inline-flex; align-items: center; gap: 14px; margin-top: 28px; font-size: 13px; letter-spacing: .12em; }
.lsPick .lsGo .lsArw { transition: transform .5s var(--ease); }
.lsPick .lsGo:hover .lsArw { transform: translateX(6px); }

/* 3列 */
.lsGrid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 36px; margin-top: 64px; padding-top: 56px; }
.lsGrid::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: left; }
.lsGrid .lsMeta { margin-top: 18px; }
.lsGrid .lsTitle { margin-top: 10px; }
/* 2ページ目から開いたとき（新着が無い）は、上の線と余白を詰める */
.lsBody > .lsGrid:first-child { margin-top: 36px; }

/* ナレッジハブは右の欄が狭いので、新着と3列を少し詰める */
.isK .lsSide .lsPick { margin-top: 0; column-gap: 40px; }
.isK .lsSide .lsPick .lsTitle { font-size: 21px; }
.isK .lsSide .lsGrid { gap: 44px 28px; margin-top: 52px; padding-top: 48px; }
.isK .lsSide .lsGrid .lsTitle { font-size: 15px; }
.isK .lsSide .lsBody > .lsGrid:first-child { margin-top: 0; }

/* ニュースの画像は告知用に作った画像で、文字やロゴが入っている。形もまちまちなので、切らずに全体を収める。
   枠は横2：縦1（いちばん多い形）。形の違う画像は白い地にそのまま置く（枠線は付けない。付けると不自然に見える） */
.isNews .lsImg { aspect-ratio: 2 / 1; background: none; border-radius: 0; }
.isNews .lsImg img { object-fit: contain; object-position: left center; } /* 左端を下の文字の端にそろえる */

/* 見つからないとき */
.ls .item-notfound { margin-top: 48px; font-size: 15px; color: var(--muted); }

/* ---- もっと読む（細い枠。合わせると墨色の面に変わる） ---- */
.lsMoreWrap { margin-top: 64px; text-align: center; }
.lsMore { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-width: 300px; height: 60px; padding: 0 30px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font-family: inherit; font-size: 14px; letter-spacing: .14em; cursor: pointer; transition: background .45s, color .45s, opacity .3s; }
.lsMore:hover { background: var(--ink); color: #fff; }
.lsMore small { font-size: 11.5px; letter-spacing: .06em; color: var(--muted); font-feature-settings: "tnum"; transition: color .45s; }
.lsMore:hover small { color: #BDBDC6; }
.lsMore .plus { position: relative; width: 11px; height: 11px; }
.lsMore .plus::before, .lsMore .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: currentColor; }
.lsMore .plus::after { transform: rotate(90deg); }
.lsMore.is-loading { opacity: .5; pointer-events: none; }

/* =====================================================================
   動き
   ===================================================================== */
.ls [data-a] { transition-property: opacity, transform; transition-timing-function: var(--ease); }
.ls .lsImg img { transition: transform .9s var(--ease), opacity .5s; }

/* ナレッジハブ：m4「線から現れる」
   見出しの金の線・左の目次の線・3列の上の線が左から引かれ、記事はその後に濃さだけで現れる
   （最初に見えている記事だけ、線を待ってから。--d は list-archive.js が入れる）。
   合わせるとタイトルの下に金の細い線 */
.isK .lsLabel::before, .isK .lsGrid::before { transition: transform 1s var(--ease2); }
.isK .lsNav ul { transition: transform 1s var(--ease2) .1s; }
.isK.is-ready .lsLabel::before, .isK.is-ready .lsGrid::before, .isK.is-ready .lsNav ul { transform: scaleX(0); }
.isK.is-in .lsLabel::before, .isK.is-in .lsGrid::before, .isK.is-in .lsNav ul { transform: none; }
.isK.is-ready [data-a] { opacity: 0; transition-duration: .8s; transition-delay: calc(var(--i, 0) * 35ms + var(--d, 0s)); }
.isK.is-ready [data-a].is-on { opacity: 1; }
.isK .lsTitle span { background-image: linear-gradient(var(--gold), var(--gold)); }
.isK a:hover .lsTitle span { background-size: 100% 1px; }

/* ニュース：m3「画像が落ち着く」
   画像だけ、枠の中で 3% 大きい所から元の大きさへ静かに戻る（枠は動かない）。文字は濃さだけで現れる */
.isNews.is-ready [data-a] { opacity: 0; transition-duration: .8s; transition-delay: calc(var(--i, 0) * 40ms); }
.isNews.is-ready [data-a].is-on { opacity: 1; }
.isNews.is-ready [data-a] .lsImg img { transform: scale(1.03); transition: transform 1.6s var(--ease), opacity .5s; transition-delay: calc(var(--i, 0) * 40ms); }
.isNews.is-ready [data-a].is-on .lsImg img { transform: none; }
.isNews.is-ready [data-a].is-on a:hover .lsImg img, .isNews:not(.is-ready) a:hover .lsImg img { transform: scale(1.02); transition-delay: 0s; }
.isNews a:hover .lsTitle span { background-size: 100% 1px; }

/* 記事は1件ずつ、画面に入ったときに現れる（list-archive.js が is-on を付ける）。もっと読むで足した記事も同じ */

/* 動きを減らす設定の方には、最初から全部見せる */
@media (prefers-reduced-motion: reduce) {
    .ls [data-a], .ls .lsImg img, .ls .lsLabel::before, .ls .lsGrid::before, .ls .lsNav ul { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =====================================================================
   中くらいの画面（タブレットなど）：左の目次をやめて上に横並び、3列を2列に
   ===================================================================== */
@container ls (max-width: 980px) {
    .lsSide { display: block; margin-top: 0; }
    .lsNav { display: none; }
    .isK .lsSide .lsCats { display: block; }
    .isK .lsSide .lsPick { margin-top: 40px; }
    .lsGrid, .isK .lsSide .lsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   スマートフォン
   ===================================================================== */
@container ls (max-width: 600px) {
    .lsHead { display: block; }
    .lsHead h2 { font-size: 24px; }
    .lsCount { margin-top: 8px; }
    .lsCount b { font-size: 18px; }
    .lsCats { margin: 22px -20px 0; padding: 0 20px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent); }
    .lsCats::-webkit-scrollbar { display: none; }
    .lsCats ul { flex-wrap: nowrap; column-gap: 22px; width: max-content; padding-right: 20px; }
    .lsCats a { font-size: 13px; padding: 12px 0 11px; white-space: nowrap; }
    .lsPick, .isK .lsSide .lsPick { display: block; margin-top: 28px; }
    .lsPick .lsNew { margin-top: 20px; }
    .lsPick .lsMeta { margin-top: 12px; }
    .lsPick .lsPickTitle { margin-top: 10px; }
    .lsPick .lsTitle, .isK .lsSide .lsPick .lsTitle { font-size: 18px; }
    .lsPick .lsGo { margin-top: 16px; }
    .lsGrid, .isK .lsSide .lsGrid { grid-template-columns: 1fr; gap: 22px; margin-top: 36px; padding-top: 30px; }
    /* 左に画像、右に文字 */
    .lsGrid a { display: grid; grid-template-columns: 118px minmax(0, 1fr); column-gap: 16px; align-items: start; }
    .lsGrid .lsImg { aspect-ratio: 4 / 3; border-radius: 4px; }
    .isNews .lsGrid a { grid-template-columns: 132px minmax(0, 1fr); }
    .isNews .lsGrid .lsImg { aspect-ratio: 2 / 1; }
    .lsGrid .lsMeta { margin-top: 2px; gap: 10px; font-size: 11px; }
    .lsGrid .lsMeta .c + .d::before { margin-right: 10px; }
    .lsGrid .lsTitle, .isK .lsSide .lsGrid .lsTitle { margin-top: 6px; font-size: 14px; line-height: 1.65; -webkit-line-clamp: 3; }
    .lsMoreWrap { margin-top: 44px; }
    .lsMore { min-width: 0; width: 100%; }
}
@media (max-width: 768px) {
    .areaList { padding: 24px 0 72px; }
}
