/* ===== トップページ（DTM DE:ZIGN・ダーク基調） =====
   色の基本は dtm-theme.css の変数（--bg / --surface / --accent など）を使う */

.home {
  --h-max: 1240px;
  --c-plugins: var(--accent);
  --c-guide: #fb923c;
  --c-mix: #f472b6;
  --c-dev: #22d3ee;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 96px;
}

.h-wrap { max-width: var(--h-max); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

.c-plugins { --c: var(--c-plugins); }
.c-guide { --c: var(--c-guide); }
.c-mix { --c: var(--c-mix); }
.c-dev { --c: var(--c-dev); }

.h-kicker { display: block; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 8px; }

.h-textlink { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.h-textlink:hover { color: var(--accent-light); }
.h-textlink span { transition: transform 0.2s; }
.h-textlink:hover span { transform: translateX(3px); }

/* ---------- ヒーロー ---------- */
.h-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 70% at 80% 40%, rgba(255, 122, 26, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 60% at 98% 0%, rgba(244, 114, 182, 0.12), transparent 70%),
    linear-gradient(180deg, #0e1117 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.h-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  pointer-events: none;
}
.h-hero-inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; min-height: 540px; padding-top: 72px; padding-bottom: 72px; }
.h-hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.h-pre { font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--accent); }
.h-hero-title { margin: 0; font-family: var(--ff-heading); font-weight: 700; font-size: clamp(28px, 3.3vw, 44px); line-height: 1.4; word-break: auto-phrase; letter-spacing: -0.01em; color: #fff; }
.h-hero-title span { background: linear-gradient(90deg, #ff7a1a, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-hero-desc { margin: 0; font-size: 16px; line-height: 1.9; color: var(--ink-mid); max-width: 34em; }
.h-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

.h-btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 6px; font-family: var(--ff-heading); font-weight: 700; font-size: 15px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s; }
.h-btn-primary { background: var(--accent); color: #140a02; box-shadow: 0 8px 24px rgba(255, 122, 26, 0.28); }
.h-btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.h-btn-outline { border: 1px solid var(--border-mid); background: transparent; color: var(--ink); }
.h-btn-outline:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ヒーローの絵（HTML/CSS/SVG で描くプラグイン画面） */
.h-visual { flex: 1 1 480px; min-width: 0; position: relative; height: 400px; }
.v-plugin {
  position: absolute; left: 0; top: 10px; width: 80%;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #1a1f29, #12161e);
  border: 1px solid #2b3340;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.v-plugin-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #2b3340; font-size: 12px; }
.v-plugin-bar b { font-family: var(--ff-heading); letter-spacing: 0.08em; color: #e6e8ec; }
.v-plugin-bar em { margin-left: auto; font-style: normal; font-family: var(--ff-mono); color: #7d8796; }
.v-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.v-eq { height: 190px; padding: 10px 12px 0; background: #0c0f14; }
.v-eq svg { width: 100%; height: 100%; display: block; }
.v-grid line { stroke: rgba(148, 163, 184, 0.10); stroke-width: 1; }
.v-spec { fill: rgba(148, 163, 184, 0.16); }
.v-curve { fill: none; stroke: #ff9a4d; stroke-width: 2.5; }
.v-node { fill: #0c0f14; stroke-width: 2.5; }
.v-node.n1 { stroke: #ff7a1a; } .v-node.n2 { stroke: #f472b6; } .v-node.n3 { stroke: #22d3ee; }
.v-knobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 16px; }
.v-knob { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--ff-mono); }
.v-knob i { position: relative; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a4352, #171b23 70%); border: 1px solid #39424f; }
.v-knob i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 16px; margin-left: -1px; background: var(--accent); border-radius: 1px; transform-origin: 50% 0; transform: rotate(var(--r)); }
.v-knob span { font-size: 10px; color: #7d8796; letter-spacing: 0.08em; }
.v-knob b { font-size: 12px; color: #e6e8ec; font-weight: 400; }
.v-meter {
  position: absolute; right: 0; bottom: 0; width: 140px;
  border-radius: 12px; padding: 14px; background: #12161e; border: 1px solid #2b3340;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.v-meter-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--ff-mono); }
.v-meter-head span { font-size: 10px; color: #7d8796; letter-spacing: 0.08em; }
.v-meter-head b { font-size: 20px; color: #fff; font-weight: 400; }
.v-meter-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; height: 120px; }
.v-meter-bars span { position: relative; border-radius: 3px; background: #0c0f14; overflow: hidden; }
.v-meter-bars i { position: absolute; left: 0; right: 0; bottom: 0; height: 72%; background: linear-gradient(0deg, #22c55e 0%, #22c55e 60%, #eab308 80%, #ff7a1a 100%); }
.v-meter-bars span:last-child i { height: 66%; }

/* ---------- カテゴリの目次 ---------- */
.h-index { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.h-index-item {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: var(--ink); overflow: hidden; transition: border-color 0.2s, transform 0.2s;
}
.h-index-item::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); }
.h-index-item:hover { border-color: var(--c); transform: translateY(-2px); }
.h-index-no { font-family: var(--ff-mono); font-size: 12px; color: var(--c); letter-spacing: 0.06em; }
.h-index-name { font-size: 17px; font-weight: 700; color: #fff; }
.h-index-desc { font-size: 12.5px; line-height: 1.7; color: var(--ink-light); }
.h-index-count { margin-top: auto; padding-top: 6px; font-family: var(--ff-mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- セクション共通 ---------- */
.h-section { padding-top: 80px; scroll-margin-top: 70px; }
.h-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.h-head h2, .h-head h3 { margin: 0; font-family: var(--ff-heading); font-size: 28px; font-weight: 700; color: #fff; }
.h-meta { font-family: var(--ff-mono); font-size: 12px; color: var(--c, var(--ink-light)); }
.h-cat-title { display: flex; align-items: center; gap: 12px; }
.h-cat-title::before { content: ""; width: 4px; height: 26px; border-radius: 2px; background: var(--c); transform: skewX(-12deg); }
.h-cat-lead { margin: 6px 0 0 16px; font-size: 13px; line-height: 1.8; color: var(--ink-light); }

/* 新着：大きな1本 */
.h-featured { display: flex; flex-wrap: wrap; margin-bottom: 20px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--ink); transition: transform 0.2s, border-color 0.2s; }
.h-featured:hover { transform: translateY(-3px); border-color: var(--border-mid); }
.h-featured img { flex: 1 1 520px; min-width: 0; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.h-featured-body { flex: 1 1 340px; min-width: 0; padding: 32px 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.h-featured-body strong { font-size: 24px; line-height: 1.55; color: #fff; }
.h-featured-body p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--ink-light); }

/* カード（4列） */
.h-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 20px; }
.h-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--ink); transition: transform 0.2s, border-color 0.2s; }
.h-card:hover { transform: translateY(-3px); border-color: var(--border-mid); }
.h-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.h-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.h-card-body strong { font-size: 15px; line-height: 1.65; color: #fff; }
.h-date { margin-top: auto; font-family: var(--ff-mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- プラグインDB ---------- */
.h-pdb {
  border-radius: 18px; padding: 44px 40px; display: flex; flex-direction: column; gap: 26px; color: var(--ink);
  background-color: #0c0f14;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 122, 26, 0.10), rgba(12, 15, 20, 0) 55%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  border: 1px solid rgba(255, 122, 26, 0.32);
}
.h-pdb-top { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.h-pdb-intro { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.h-pdb-kicker { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--accent); }
.h-pdb-intro h2 { margin: 0; font-family: var(--ff-heading); font-size: 32px; font-weight: 700; color: #fff; }
.h-pdb-intro p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--ink-mid); }
.h-pdb-search { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.h-pdb-search label { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-light); }
.h-pdb-field { display: flex; gap: 8px; }
.h-pdb-field input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-mid); background: var(--bg); color: var(--ink); font-family: var(--ff-body); font-size: 15px; }
.h-pdb-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.h-pdb-field button { height: 48px; padding: 0 18px; border-radius: 10px; border: none; background: var(--accent); color: #140a02; font-weight: 700; font-size: 14px; cursor: pointer; }
.h-pdb-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.h-pdb-tags a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-mid); color: var(--ink-mid); font-size: 13px; text-decoration: none; transition: border-color 0.2s, color 0.2s; }
.h-pdb-tags a:hover { border-color: var(--accent); color: #fff; }
.h-pdb-tags a.is-on { background: var(--accent); border-color: var(--accent); color: #140a02; font-weight: 700; }
.h-pdb-tags a.is-free { border-color: rgba(110, 231, 183, 0.45); color: #6ee7b7; }
.h-pdb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.h-pdb-card { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform 0.2s, border-color 0.2s; }
.h-pdb-card:hover { transform: translateY(-3px); border-color: rgba(255, 122, 26, 0.6); color: #fff; }
.h-pdb-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.h-pdb-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.h-pdb-card strong, .h-pdb-next strong { font-size: 17px; color: #fff; display: block; }
.h-pdb-type { font-family: var(--ff-mono); font-size: 11px; color: var(--accent); }
.h-pdb-maker { font-size: 12px; color: var(--ink-light); display: block; }
.h-pdb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.h-pdb-chips span { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(148, 163, 184, 0.14); color: var(--ink-mid); }
.h-pdb-chips span.is-free { background: rgba(110, 231, 183, 0.14); color: #6ee7b7; }
.h-pdb-next { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 220px; padding: 18px; border-radius: 12px; border: 1px dashed var(--border-mid); }
.h-pdb-next .h-pdb-type { color: var(--ink-faint); }
.h-pdb-next strong { color: var(--ink-mid); }
.h-pdb-all { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.h-pdb-all:hover { background: var(--accent); color: #140a02; }

/* ---------- タブレット・スマートフォン ---------- */
@media (max-width: 1000px) {
  .h-index { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .h-wrap { padding-left: 18px; padding-right: 18px; }
  .h-hero-inner { padding-top: 48px; padding-bottom: 48px; min-height: 0; gap: 32px; }
  .h-visual { height: 330px; }
  .v-plugin { width: 100%; }
  .v-eq { height: 140px; }
  .v-meter { width: 120px; bottom: -10px; }
  .v-meter-bars { height: 80px; }
  .h-index { gap: 10px; margin-top: 32px; }
  .h-index-item { padding: 18px 16px; }
  .h-index-desc { display: none; }
  .h-section { padding-top: 56px; }
  .h-featured-body { padding: 22px 20px 26px; }
  .h-featured-body strong { font-size: 19px; }
  .h-pdb { padding: 28px 20px; }
  .h-pdb-intro h2 { font-size: 26px; }
  .h-head h2, .h-head h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .home * { transition: none !important; }
}
