/* =========================================================
   finlab-se トップページ専用スタイル
   - Claude Design モックアップ (2026-04-21承認版) を移植
   - 適用範囲: <body class="home"> （layouts/index.html）
   - PaperMod の既定スタイルとは独立
   ========================================================= */

/* Google Fonts 読み込みは extend_head.html 側で実施 */

.home {
  /* ===== Design Tokens ===== */
  --bg:           #ffffff;
  --bg-soft:      #f7f8f7;
  --bg-tint:      #f1f5f3;
  --line:         #e7eae8;
  --line-strong:  #d8dcd9;
  --ink:          #0f172a;
  --ink-2:        #334155;
  --ink-3:        #64748b;
  --ink-mute:     #94a3b8;
  --accent:       #10b981;
  --accent-600:   #059669;
  --accent-700:   #047857;
  --accent-tint:  #ecfdf5;
  --accent-ring:  rgba(16,185,129,.18);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow-md: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.08);
  --shadow-lg: 0 2px 4px rgba(15,23,42,.04), 0 24px 40px -24px rgba(15,23,42,.14);
  --font-jp: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-num: "Inter", var(--font-jp);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1120px;

  font-family: var(--font-jp);
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: .01em;
}

.home *  { box-sizing: border-box; }
.home a  { color: inherit; text-decoration: none; }
.home img{ max-width: 100%; display:block; }

.home .wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Top bar ===== */
.home .topbar{
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.home .topbar-inner{
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.home .brand{ display: flex; align-items: center; gap: 10px; font-weight: 600; }
.home .brand-mark{
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink);
  position: relative; overflow: hidden;
  flex-shrink: 0;
}
.home .brand-mark::before, .home .brand-mark::after{
  content:""; position:absolute; inset:0;
}
.home .brand-mark::before{
  background:
    linear-gradient(180deg, transparent 55%, var(--accent) 55%, var(--accent) 62%, transparent 62%),
    linear-gradient(180deg, transparent 68%, var(--accent) 68%, var(--accent) 72%, transparent 72%);
}
.home .brand-mark::after{
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.15), transparent 50%);
}
.home .brand-name{ font-size: 14px; letter-spacing: .02em; white-space: nowrap; }
.home .brand-sub{ font-size: 11px; color: var(--ink-3); font-weight: 400; margin-top: 1px; }
.home .nav{ display:flex; align-items:center; gap: 22px; font-size: 13.5px; color: var(--ink-2); }
.home .nav a{ transition: color .15s; }
.home .nav a:hover{ color: var(--accent-700); }
.home .nav .search-btn{
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); padding: 6px 10px;
  border-radius: 999px; color: var(--ink-3); font-size: 12.5px;
  background: var(--bg-soft);
  white-space: nowrap;
}
@media (max-width: 720px){
  .home .nav .lk{ display:none; }
}

/* ===== Section scaffold ===== */
.home section{ padding: 72px 0; position: relative; }
@media (max-width: 720px){ .home section{ padding: 56px 0; } }
.home .design-note{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: .02em;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.home .design-note::before{ content:"//"; color: var(--accent); font-weight: 600; }
.home .eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-num);
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-700);
}
.home .eyebrow::before{ content:""; width: 22px; height: 1px; background: var(--accent); }
.home .section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom: 28px; flex-wrap: wrap; }
.home .section-title{
  font-size: 28px; font-weight: 700; letter-spacing: .01em; margin: 8px 0 0;
  line-height: 1.35;
}
.home .section-sub{ color: var(--ink-3); font-size: 14px; margin-top: 6px; max-width: 560px; }
.home .section-link{
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid transparent; transition: all .15s;
}
.home .section-link:hover{ color: var(--accent-700); border-bottom-color: var(--accent); }
.home .arrow{ display:inline-block; transition: transform .15s; }
.home .section-link:hover .arrow{ transform: translateX(2px); }

/* ===== HERO ===== */
.home .hero{
  padding-top: 56px; padding-bottom: 88px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(16,185,129,.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 60%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.home .hero-grid{
  display:grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center;
}
@media (max-width: 900px){
  .home .hero-grid{ grid-template-columns: 1fr; gap: 36px; }
  .home .hero{ padding-top: 40px; padding-bottom: 60px; }
}
.home .hero-kicker{
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .18em;
  color: var(--accent-700); margin-bottom: 22px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px; border: 1px solid var(--accent-ring); border-radius: 999px;
  background: var(--accent-tint);
}
.home .hero-kicker .dot{ width:6px; height:6px; border-radius:999px; background:var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.home .hero h1{
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.22; letter-spacing: .005em; font-weight: 700;
  margin: 0 0 20px; color: var(--ink); text-wrap: pretty;
}
.home .hero h1 .green{ color: var(--accent-700); }
.home .hero-lede{
  color: var(--ink-2); font-size: 15.5px; line-height: 1.9; max-width: 540px; margin: 0 0 28px;
}
.home .hero-tags{ display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 32px; }
.home .tag{
  display:inline-flex; align-items:center; gap: 6px;
  font-size: 12.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-2); white-space: nowrap;
}
.home .tag .tdot{ width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.home .hero-cta{ display:flex; gap: 12px; flex-wrap: wrap; }
.home .btn{
  display:inline-flex; align-items:center; gap:8px;
  height: 48px; padding: 0 22px;
  border-radius: 14px;
  font-size: 14.5px; font-weight: 500; font-family: var(--font-jp);
  cursor: pointer; border: 1px solid transparent;
  transition: all .15s ease; white-space: nowrap;
}
.home .btn-primary{
  background: var(--ink); color: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.1);
}
.home .btn-primary:hover{ background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.home .btn-primary .arrow{ color: var(--accent); }
.home .btn-ghost{
  background: #fff; color: var(--ink); border-color: var(--line-strong);
}
.home .btn-ghost:hover{ border-color: var(--ink); }

/* Author card */
.home .author-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 22px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.home .author-top{ display:flex; align-items:center; gap: 14px; }
.home .avatar{
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg-tint);
  position: relative; overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--line);
}
.home .avatar img{ width:100%; height:100%; object-fit: cover; }
.home .author-name{ font-weight: 600; font-size: 16px; letter-spacing: .01em; white-space: nowrap; }
.home .author-handle{ font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.home .author-role{
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--ink-2); line-height: 1.8;
}
.home .stats{
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.home .stat .n{ font-family: var(--font-num); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.home .stat .l{ font-size: 10.5px; color: var(--ink-3); letter-spacing: .05em; margin-top: 2px; }
.home .stat .n .unit{ font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* ===== CATEGORY CARDS ===== */
.home .cat-grid{
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 960px){ .home .cat-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .home .cat-grid{ grid-template-columns: 1fr; } }

.home .cat{
  position: relative;
  padding: 24px 22px 22px;
  border-radius: var(--r-xl);
  background: #fff;
  border: 1px solid var(--line);
  transition: all .2s ease;
  overflow: hidden;
  min-height: 210px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.home .cat::after{
  content:""; position:absolute; left:0; top:0; width: 3px; height: 0;
  background: var(--accent); transition: height .25s ease;
}
.home .cat:hover{ transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.home .cat:hover::after{ height: 100%; }
.home .cat-icon{
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-tint); display:grid; place-items:center;
  color: var(--accent-700);
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.home .cat-name{ font-weight: 600; font-size: 16px; letter-spacing: .01em; margin-bottom: 4px; }
.home .cat-desc{ font-size: 12.5px; color: var(--ink-3); line-height: 1.75; }
.home .cat-meta{
  margin-top: 16px; display:flex; align-items:center; justify-content:space-between;
  font-family: var(--font-num); font-size: 12px; color: var(--ink-3);
}
.home .cat-count{ font-weight: 600; color: var(--ink-2); }
.home .cat-count .unit{ font-weight: 400; color: var(--ink-3); margin-left: 2px; font-size: 11px; }
.home .cat-arrow{ width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display:grid; place-items:center; color: var(--ink-3); transition: all .2s; }
.home .cat:hover .cat-arrow{ background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== TOOLS ===== */
.home .tools-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 900px){ .home .tools-grid{ grid-template-columns: 1fr; } }
.home .tool{
  position: relative; overflow: hidden;
  padding: 26px 24px 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
  border: 1px solid var(--accent-ring);
  display: flex; flex-direction: column;
  transition: all .2s ease;
}
.home .tool:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.home .tool::before{
  content:""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-700));
}
.home .tool.placeholder{
  background: var(--bg-soft); border-style: dashed; border-color: var(--line-strong);
}
.home .tool.placeholder::before{ background: var(--line-strong); }
.home .tool-icon{
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-tint); color: var(--accent-700);
  display: grid; place-items: center;
  border: 1px solid var(--accent-ring);
  margin-bottom: 18px;
}
.home .tool.placeholder .tool-icon{ background: #fff; border-color: var(--line); color: var(--ink-mute); }
.home .tool-tag{
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .15em;
  color: var(--accent-700); text-transform: uppercase; margin-bottom: 6px;
}
.home .tool.placeholder .tool-tag{ color: var(--ink-mute); }
.home .tool-name{ font-size: 17px; font-weight: 700; letter-spacing: .01em; color: var(--ink); }
.home .tool-desc{ font-size: 13px; color: var(--ink-2); line-height: 1.75; margin-top: 10px; flex: 1; }
.home .tool.placeholder .tool-desc{ color: var(--ink-3); }
.home .tool-cta{
  margin-top: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  background: var(--accent); color: #fff;
  border-radius: 10px; font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: background .15s;
  align-self: flex-start;
}
.home .tool-cta:hover{ background: var(--accent-700); }
.home .tool.placeholder .tool-cta{
  background: transparent; color: var(--ink-3);
  border: 1px dashed var(--line-strong);
}

/* ===== POSTS GRID ===== */
.home .posts-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 720px){ .home .posts-grid{ grid-template-columns: 1fr; } }
.home .post{
  display:grid; grid-template-columns: 160px 1fr; gap: 18px;
  padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff;
  transition: all .18s;
}
.home .post:hover{ border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
@media (max-width: 520px){
  .home .post{ grid-template-columns: 110px 1fr; gap: 14px; padding: 12px; }
}
.home .thumb{
  aspect-ratio: 4/3; border-radius: 12px; overflow: hidden;
  background: var(--bg-tint);
  position: relative;
  border: 1px solid var(--line);
}
.home .thumb img{ width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.home .thumb.no-img{ background: repeating-linear-gradient(45deg, #e6efe9 0 10px, #f1f5f3 10px 20px); }
.home .post-body{ display:flex; flex-direction: column; min-width: 0; }
.home .post-meta{ display:flex; align-items:center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.home .badge{
  display:inline-flex; align-items:center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-700);
  border: 1px solid var(--accent-ring);
  letter-spacing: .02em; white-space: nowrap;
}
.home .badge.b-blue  { background:#eff6ff; color:#1d4ed8; border-color: rgba(29,78,216,.15); }
.home .badge.b-amber { background:#fef3c7; color:#92400e; border-color: rgba(146,64,14,.15); }
.home .badge.b-slate { background:#f1f5f9; color:#334155; border-color: rgba(51,65,85,.12); }
.home .badge.b-green { background:#f0fdf4; color:#15803d; border-color: rgba(21,128,61,.15); }
.home .badge.b-teal  { background:#f0fdfa; color:#0f766e; border-color: rgba(15,118,110,.15); }
.home .post-date, .home .post-read{ font-family: var(--font-num); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.home .post-date::before{ content:""; display:inline-block; width:3px; height:3px; border-radius:999px; background: var(--ink-mute); margin-right:10px; vertical-align: middle; }
.home .post-title{
  font-size: 15.5px; font-weight: 600; line-height: 1.55; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  letter-spacing: .005em;
}
.home .post:hover .post-title{ color: var(--accent-700); }
.home .post-excerpt{
  margin-top: 6px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 520px){ .home .post-excerpt{ display: none; } }

/* ===== PROFILE DETAIL ===== */
.home .profile-wrap{
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 40px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
}
@media (max-width: 820px){
  .home .profile-wrap{ grid-template-columns: 1fr; text-align: left; padding: 28px; gap: 20px; }
}
.home .profile-avatar{
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.home .profile-avatar img{ width:100%; height:100%; object-fit: cover; }
.home .profile-name{ font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.home .profile-role{ font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-700); letter-spacing: .08em; margin-top: 4px; }
.home .profile-bio{ font-size: 14px; color: var(--ink-2); line-height: 1.9; margin-top: 14px; max-width: 560px; }
.home .profile-links{ display:flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 820px){ .home .profile-links{ margin-top: 4px; } }
.home .plink{
  display:inline-flex; align-items:center; gap: 8px;
  padding: 10px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; font-size: 13px; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.home .plink:hover{ border-color: var(--accent); color: var(--accent-700); }
.home .plink .chip{ font-family: var(--font-mono); font-size: 10px; color: var(--ink-mute); }

/* ===== FOOTER ===== */
.home .home-footer{
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  margin-top: 40px;
}
.home .foot{
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.home .foot-brand{ display:flex; align-items:center; gap: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.home .foot-copy{ font-family: var(--font-num); font-size: 12px; color: var(--ink-3); }
.home .foot-links{ display:flex; gap: 18px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.home .foot-links a{ display:inline-flex; align-items:center; gap:6px; }
.home .foot-links a:hover{ color: var(--accent-700); }

/* ===== AD SLOTS ===== */
.home .ad-slot{
  margin: 0 auto;
  border: 1px dashed #d8dcd9;
  border-radius: var(--r-md);
  background: repeating-linear-gradient(135deg, #fafafa 0 10px, #f3f4f3 10px 20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}
.home .ad-label{
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.home .ad-size{ font-size: 10px; color: var(--ink-mute); margin-top: 4px; }
.home .ad-hero{ max-width: 728px; height: 90px; }
@media (max-width: 760px){ .home .ad-hero{ max-width: 320px; height: 100px; } }
.home .ad-infeed{
  grid-column: 1 / -1;
  width: 100%; justify-self: stretch;
  min-height: 120px; padding: 22px;
  flex-direction: row; gap: 16px;
}
.home .ad-infeed .ad-meta{ text-align: left; }
.home .ad-footer{ max-width: 728px; min-height: 120px; padding: 24px; }
.home .ad-wrap{ padding: 28px 0 0; }

/* Icons */
.home svg.ic{ width: 16px; height: 16px; stroke-width: 1.8; }

/* ===== PaperMod の既定 header / footer をトップページでは隠す
   テーマファイルは編集せず CSS で抑制。トップページ独自の topbar/footer を使う ===== */
.home > header.header,
.home > footer.footer { display: none !important; }
.home .main { padding: 0; max-width: none; margin: 0; }

/* ===== HOME BANNER (above hero) ===== */
.home-banner {
  position: relative;
  width: 100%;
  max-height: 240px;
  overflow: hidden;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.home-banner img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.home-banner-tagline {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 max(24px, calc((100% - 1100px) / 2));
  pointer-events: none;
}
.home-banner-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(20, 50, 60, 0.7);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}
h1.home-banner-title,
.home-banner-title {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  color: #0e2a36;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  margin: 0;
  padding: 0;
}
.home-banner-title .green {
  color: #16a34a;
  position: relative;
}
.home-banner-title .green::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -3px;
  height: 6px;
  background: rgba(74, 222, 128, 0.35);
  z-index: -1;
  border-radius: 2px;
}
@media (max-width: 720px) {
  .home-banner { max-height: 160px; }
  .home-banner img { max-height: 160px; }
  .home-banner-tagline { padding: 0 16px; }
}
