/* ZQT Lab. 作例とデモの一覧 */
:root {
  --ink: #1d2733;
  --ink-soft: #4a5866;
  --navy: #1e3a5c;
  --navy-deep: #132a45;
  --gold: #b9893f;
  --bg: #faf8f4;
  --tint: #eef2f6;
  --line: #d9dfe6;
  --white: #ffffff;
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.8; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.pc { display: none; }

.head { position: sticky; top: 0; z-index: 10; background: rgba(250, 248, 244, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.logo-text { font-weight: 700; line-height: 1.2; }
.logo-text small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-soft); }
.head-cta { background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 18px; border-radius: 999px; transition: background .2s; }
.head-cta:hover { background: var(--navy-deep); }

/* ===== ファーストビュー ===== */
.hero { position: relative; overflow: hidden; padding: 40px 0 48px; background:
  radial-gradient(600px 300px at 90% 10%, rgba(185, 137, 63, .12), transparent 70%),
  radial-gradient(520px 360px at 0% 45%, rgba(30, 58, 92, .07), transparent 70%); }
.hero-in { display: grid; gap: 28px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 500; color: var(--navy); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; margin-bottom: 16px; }
.hero-title { word-break: auto-phrase; font-family: var(--serif); font-size: 26px; line-height: 1.5; letter-spacing: .02em; margin: 0 0 16px; }
.hl { position: relative; z-index: 0; color: var(--navy); white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 10px; background: #f3e7d2; z-index: -1; transform-origin: left; transform: scaleX(0); animation: hl-in .9s 1s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes hl-in { to { transform: scaleX(1); } }
.hero-lead { word-break: auto-phrase; color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-cta .btn { flex: 1 1 180px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-soft); }
.hero-points li { position: relative; padding-left: 22px; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid #2f7d5b; border-bottom: 2px solid #2f7d5b; transform: rotate(-45deg); }
.hero-visual { max-width: 460px; width: 100%; margin: 0 auto; }
.hv { display: block; width: 100%; height: auto; overflow: visible; }

/* 読み込み時にふわっと出る（JS なしでも動く） */
.rise { opacity: 0; animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards; }
.rise.r1 { animation-delay: .1s; }
.rise.r2 { animation-delay: .22s; }
.rise.r3 { animation-delay: .34s; }
.rise.r4 { animation-delay: .46s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* 絵の動き（浮く・グラフが伸びる・書類が書き込まれる） */
.hv-float { animation: hv-float 6s ease-in-out infinite; }
.hv-fb { animation-duration: 7s; animation-delay: -2s; }
.hv-fc { animation-duration: 6.5s; animation-delay: -4s; }
.hv-fd { animation-duration: 5s; animation-delay: -1s; }
@keyframes hv-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hv-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: hv-bar 5s ease-in-out infinite; }
.hv-bar.b2 { animation-delay: .12s; }
.hv-bar.b3 { animation-delay: .24s; }
.hv-bar.b4 { animation-delay: .36s; }
.hv-bar.b5 { animation-delay: .48s; }
@keyframes hv-bar { 0%, 100% { transform: scaleY(.25); } 30%, 80% { transform: scaleY(1); } }
.hv-line { stroke-dasharray: 160; stroke-dashoffset: 160; animation: hv-line 5s ease-in-out .3s infinite; }
@keyframes hv-line { 0% { stroke-dashoffset: 160; } 35%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 160; } }
.hv-dot { transform-box: fill-box; transform-origin: center; animation: hv-pop 5s ease-in-out .3s infinite; }
.hv-grow { transform-box: fill-box; transform-origin: left center; animation: hv-grow 5s ease-in-out infinite; }
@keyframes hv-grow { 0%, 100% { transform: scaleX(.3); } 35%, 80% { transform: scaleX(1); } }
.hv-row { animation: hv-row 6s ease-in-out infinite; }
.hv-row.w2 { animation-delay: .3s; }
.hv-row.w3 { animation-delay: .6s; }
.hv-row.w4 { animation-delay: .9s; }
.hv-row.w5 { animation-delay: 1.3s; }
@keyframes hv-row { 0%, 8% { opacity: 0; } 18%, 88% { opacity: 1; } 100% { opacity: 0; } }
.hv-stamp { transform-box: fill-box; transform-origin: center; animation: hv-stamp 6s ease-in-out infinite; }
@keyframes hv-stamp { 0%, 40% { opacity: 0; transform: scale(1.6) rotate(-20deg); } 48%, 88% { opacity: 1; transform: scale(1) rotate(-12deg); } 100% { opacity: 0; transform: scale(1) rotate(-12deg); } }
@keyframes hv-pop { 0%, 25% { transform: scale(0); } 35%, 80% { transform: scale(1); } 100% { transform: scale(0); } }
.hv-pick { transform-box: fill-box; transform-origin: center; animation: hv-pick 2.4s ease-in-out infinite; }
@keyframes hv-pick { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .75; } }

/* ===== ボタン（works と同じ形） ===== */
.btn.btn-main { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(30, 58, 92, .25); transition: transform .2s, box-shadow .2s, background .2s, color .2s; }
.btn.btn-main:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 58, 92, .3); background: var(--navy-deep); color: #fff; }
.btn.btn-ghost { background: var(--white); border-color: var(--navy); color: var(--navy); }
.btn.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn.btn-main:active, .btn.btn-ghost:active { transform: scale(.97); }

/* ===== 一覧の見出しと切り替え ===== */
.list-head { padding: 40px 0 8px; scroll-margin-top: 64px; }
#tools { scroll-margin-top: 64px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.filter-btn { appearance: none; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--navy); background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 16px; min-height: 42px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s; }
.filter-btn:hover { border-color: var(--navy); box-shadow: 0 4px 12px rgba(19, 42, 69, .1); }
.filter-btn:active { transform: scale(.96); }
.filter-btn:focus-visible { outline: 3px solid rgba(185, 137, 63, .55); outline-offset: 2px; }
.filter-btn.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-num { min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--tint); color: var(--navy); font-size: 12px; display: inline-grid; place-items: center; }
.filter-btn.is-on .filter-num { background: var(--gold); color: #fff; }
.filter-count { font-size: 13px; color: var(--ink-soft); margin: 0; }
.filter-count b { color: var(--navy); font-size: 16px; margin-right: 2px; }
.list-sec[hidden], .card[hidden] { display: none; }
.card.pop { animation: card-pop .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--n, 0) * 50ms); }
@keyframes card-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.kicker { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .12em; margin-bottom: 4px; }
.title { word-break: auto-phrase; font-family: var(--serif); font-size: 28px; line-height: 1.4; margin: 0 0 14px; }
.lead { color: var(--ink-soft); }
.lead strong { color: var(--ink); background: linear-gradient(transparent 62%, #f3e7d2 62%); }

.list-sec { padding: 8px 0 56px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.card-link { display: flex; flex-direction: column; height: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; }
.card-link:hover, .card-link:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(19, 42, 69, .12); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); border-bottom: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s ease; }
.card-link:hover .thumb img { transform: scale(1.04); }
.badge { position: absolute; left: 10px; top: 10px; background: rgba(19, 42, 69, .88); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px; flex: 1; }
.card-kind { font-size: 12px; font-weight: 700; color: var(--gold); }
.card-name { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.4; }
.card-text { font-size: 14px; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: 12px; background: var(--tint); color: var(--navy); border-radius: 6px; padding: 1px 8px; }
.open { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--navy); font-size: 14px; display: inline-flex; gap: 6px; }
.open span { transition: transform .25s; }
.card-link:hover .open span { transform: translateX(4px); }
/* カードのホバー・タップの動き（上の金の線が伸びる・画像に薄い影・押すと沈む） */
.card-link { position: relative; -webkit-tap-highlight-color: transparent; }
.card-link::before { content: ""; position: absolute; left: 0; top: 0; z-index: 2; height: 4px; width: 100%; background: linear-gradient(90deg, var(--gold), #d8b57a); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.card-link:hover::before, .card-link:focus-visible::before { transform: scaleX(1); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(19, 42, 69, .28)); opacity: 0; transition: opacity .3s; }
.card-link:hover .thumb::after { opacity: 1; }
.card-link:hover { border-color: #c5ced8; }
.card-link:active { transform: translateY(-1px) scale(.985); box-shadow: 0 6px 14px rgba(19, 42, 69, .1); transition-duration: .1s; }
.card-link:focus-visible { outline: 3px solid rgba(185, 137, 63, .55); outline-offset: 3px; }
.card[data-cat="tool"] .badge { background: rgba(47, 125, 91, .92); }
.badge { z-index: 1; }

.to-works { padding: 0 0 64px; }
.lab-note { margin: 0 0 16px; padding: 14px 18px; border-left: 4px solid var(--gold); background: var(--white); border-radius: 10px; color: var(--ink); font-size: 15px; }
.to-works-in { background: var(--navy); color: #dfe7f0; border-radius: 18px; padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; }
.to-works-in p { margin: 0; font-size: 15px; }
.to-works-title { color: #fff; font-weight: 700; font-size: 19px !important; margin-bottom: 6px !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 2px solid #fff; color: #fff; text-decoration: none; font-weight: 700; transition: background .2s, color .2s; text-align: center; }
.btn:hover { background: #fff; color: var(--navy); }

.foot { background: var(--navy-deep); color: #c9d4e0; padding: 24px 0; font-size: 13px; }
.foot-in { display: flex; flex-direction: column; gap: 4px; }
.foot p { margin: 0; }
.foot a { color: #fff; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { --d: 1; }
.reveal.d2 { --d: 2; }

@media (min-width: 700px) {
  .pc { display: inline; }
  .hero { padding: 64px 0 64px; }
  .hero-title { font-size: 34px; }
  .hero-lead { font-size: 16px; }
  .list-head { padding: 56px 0 8px; }
  .title { font-size: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .to-works-in { flex-direction: row; align-items: center; justify-content: space-between; padding: 30px 34px; }
  .to-works-in .btn { flex: none; }
  .foot-in { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 80px 0 72px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; gap: 40px; }
  .hero-title { font-size: 40px; }
  .hero-visual { max-width: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hv-float, .hv-float * { animation: none !important; }
  .hv-line { stroke-dashoffset: 0; }
}
