/* ============================================================
   KEYBUILD AI — BUILD LIBRARY (productized systems)
   Loaded alongside service.css on /library pages.
   ============================================================ */

/* ---- library hero ---- */
.lib-hero { padding: 150px 0 8px; position: relative; overflow: hidden; }
.lib-hero-spot { position: absolute; top: 0; left: 50%; width: 1000px; max-width: 100%; height: 480px; transform: translateX(-50%); pointer-events: none; z-index: -1; background: radial-gradient(ellipse at center, rgba(22,227,124,0.12) 0%, transparent 62%); }
.lib-hero h1 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; max-width: 18ch; }
.lib-hero h1 .serif-i { background: linear-gradient(100deg, #2BFF9A, var(--green) 50%, var(--green-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lib-hero p { font-size: clamp(16px,1.5vw,19px); color: var(--text-2); max-width: 600px; margin-top: 20px; line-height: 1.6; }

/* ---- filters ---- */
.filters { display: flex; flex-direction: column; gap: 16px; margin-top: 44px; }
.frow2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.frow2 > .flabel { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); min-width: 86px; }
.fchip { font-size: 13.5px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border-2); background: rgba(255,255,255,0.02); padding: 8px 15px; border-radius: 100px; cursor: pointer; transition: all 0.2s var(--ease); user-select: none; }
.fchip:hover { color: var(--text); border-color: var(--green-line); }
.fchip.on { color: #07090C; background: var(--green); border-color: var(--green); }
.fchip.soon { opacity: 0.5; cursor: not-allowed; }
.fchip.soon::after { content: ' · soon'; color: var(--text-3); font-weight: 500; }
.fcount { font-size: 13px; color: var(--text-3); margin-left: auto; }

/* ---- card grid ---- */
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 920px) { .lib-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .lib-grid { grid-template-columns: 1fr; } }
.lib-card { display: flex; flex-direction: column; background: rgba(15,21,26,0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border-2); border-radius: 20px; overflow: hidden; transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s; }
.lib-card:hover { border-color: var(--green-line); transform: translateY(-5px); box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
.lib-card.hidden { display: none; }
.lib-art { aspect-ratio: 16/10; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(120% 120% at 30% 0%, var(--surface-2), #060A0D); display: grid; place-items: center; }
.lib-art svg { width: 100%; height: 100%; display: block; }
.lib-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-art .badge { position: absolute; top: 14px; left: 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green); background: rgba(7,9,12,0.72); border: 1px solid var(--green-line); backdrop-filter: blur(8px); padding: 5px 11px; border-radius: 100px; }
.lib-body { padding: 22px 24px 22px; display: flex; flex-direction: column; flex: 1; }
.lib-body h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.lib-body p { font-size: 14px; color: var(--text-2); margin-top: 9px; line-height: 1.55; flex: 1; }
.lib-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.lib-type { font-size: 12px; font-weight: 600; color: var(--text-3); }
.lib-go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green); }
.lib-go svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.lib-card:hover .lib-go svg { transform: translate(3px,-3px); }
.lib-empty { display: none; text-align: center; color: var(--text-3); padding: 60px 0; font-size: 15px; }

/* ============================================================
   BUILD SUBPAGE
   ============================================================ */
.build-hero { padding: 150px 0 0; position: relative; }
.build-hero-spot { position: absolute; top: 0; left: 50%; width: 1000px; max-width: 100%; height: 520px; transform: translateX(-50%); pointer-events: none; z-index: -1; background: radial-gradient(ellipse at center, rgba(22,227,124,0.12) 0%, transparent 62%); }
.build-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 0; }
.btag { font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); padding: 5px 12px; border-radius: 100px; }
.btag.muted { color: var(--text-3); background: rgba(255,255,255,0.02); border-color: var(--border); }
.build-h1 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin-top: 18px; max-width: 18ch; }
.build-h1 .serif-i { background: linear-gradient(100deg, #2BFF9A, var(--green) 50%, var(--green-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.build-lead { font-size: clamp(16px,1.6vw,20px); color: var(--text-2); max-width: 600px; margin-top: 22px; line-height: 1.6; }
.build-ctas { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 34px; }

/* build hero with illustration */
.bh-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.bh-frame { border-radius: 20px; border: 1px solid var(--border-2); overflow: hidden; box-shadow: 0 34px 80px rgba(0,0,0,0.55); background: var(--surface); position: relative; }
.bh-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bh-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(22,227,124,0.06); }
@media (max-width: 920px) { .bh-grid { grid-template-columns: 1fr; gap: 36px; } .bh-frame { order: -1; } }

/* before / after story */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin-top: 30px; }
.ba-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px 28px; }
.ba-card.after { border-color: var(--green-line); background: linear-gradient(180deg, var(--green-soft), rgba(22,227,124,0.02)); }
.ba-card h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.ba-card.after h4 { color: var(--green); }
.ba-card ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.ba-card li { font-size: 14.5px; line-height: 1.5; color: var(--text-2); display: flex; gap: 10px; }
.ba-card.after li { color: var(--text); }
.ba-card li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.ba-card.before li svg { color: #ff7a7a; }
.ba-card.after li svg { color: var(--green); }
.ba-mid { display: grid; place-items: center; color: var(--green); }
.ba-mid svg { width: 26px; height: 26px; }
@media (max-width: 820px) { .ba { grid-template-columns: 1fr; } .ba-mid { transform: rotate(90deg); padding: 4px 0; } }

/* how we build it — step process */
.bsteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.bstep { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 22px; position: relative; }
.bstep .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); border: 1px solid var(--green-line); color: var(--green); font-weight: 800; font-size: 15px; margin-bottom: 16px; }
.bstep .wk { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.bstep h4 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.bstep p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-top: 8px; }
@media (max-width: 820px) { .bsteps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .bsteps { grid-template-columns: 1fr; } }

/* relatable scenario */
.scenario { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; margin-top: 30px; padding: 30px 32px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--border); }
.scenario .si { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); border: 1px solid var(--green-line); color: var(--green); flex-shrink: 0; }
.scenario .si svg { width: 24px; height: 24px; }
.scenario p { font-size: 16.5px; color: var(--text); line-height: 1.7; }
.scenario p b { color: var(--green); font-weight: 600; }
.scenario p + p { margin-top: 14px; color: var(--text-2); font-size: 15px; }
@media (max-width: 620px) { .scenario { grid-template-columns: 1fr; } }

/* system flow diagram */
.flow-wrap { margin-top: 18px; }
.sysflow { display: grid; grid-template-columns: 1fr 44px 1.15fr 44px 1fr; align-items: center; gap: 6px; }
.flow-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; text-align: center; }
.flow-node { display: block; text-align: center; font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; margin-bottom: 9px; }
.flow-node:last-child { margin-bottom: 0; }
.flow-core { text-align: center; background: linear-gradient(180deg, var(--green-soft), rgba(22,227,124,0.03)); border: 1px solid var(--green-line); border-radius: 16px; padding: 26px 18px; box-shadow: 0 0 50px rgba(22,227,124,0.12) inset; }
.flow-core .ci { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: rgba(22,227,124,0.16); border: 1px solid var(--green-line); color: var(--green); }
.flow-core .ci svg { width: 24px; height: 24px; }
.flow-core b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.flow-core span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }
.flow-arrow { display: grid; place-items: center; color: var(--green); }
.flow-arrow svg { width: 22px; height: 22px; }
@media (max-width: 820px) {
  .sysflow { grid-template-columns: 1fr; gap: 4px; }
  .flow-arrow { transform: rotate(90deg); padding: 6px 0; }
  .flow-col h4 { text-align: left; }
}

/* centralizes grid */
.cgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.cgrid li { list-style: none; display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; line-height: 1.45; }
.cgrid svg { width: 17px; height: 17px; color: var(--green); flex-shrink: 0; margin-top: 1px; }
@media (max-width: 620px) { .cgrid { grid-template-columns: 1fr; } }

/* tool chips */
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tool { font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: 100px; padding: 9px 16px; }
.tool b { color: var(--green); font-weight: 700; }

/* price strip */
.price-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 28px 30px; border-radius: 18px; background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--green-line); }
.price-strip .pl b { font-size: 13px; color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; }
.price-strip .pl .amt { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; }
.price-strip .pl .amt small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.price-strip .pl p { font-size: 13.5px; color: var(--text-2); margin-top: 6px; max-width: 380px; }
