/* VHDB site — tokens from the Stitch design system "Terminal Intelligence & Context Runtime" */
:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --surface: #0f131c;
  --lowest: #0a0e16;
  --low: #181c24;
  --mid: #1c2028;
  --high: #262a33;
  --highest: #31353e;
  --text: #dfe2ee;
  --muted: #bcc9cd;
  --outline: #869397;
  --line: rgba(61, 73, 76, 0.55);
  --primary: #4cd7f6;
  --primary-c: #06b6d4;
  --secondary: #ffb95f;
  --tertiary: #4edea3;
  --error: #ffb4ab;
  --font: 'Geist', 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: 24px;
  --r: 4px;
  --r-lg: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r); }
code, kbd, pre { font-family: var(--mono); }
p code, li code, td code, dd code {
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  background: var(--high);
  border-radius: var(--r);
  color: var(--text);
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--primary); color: var(--lowest); padding: 8px 14px; border-radius: var(--r); font-weight: 600;
}
.skip:focus { top: 12px; text-decoration: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* 한국어는 어절 단위로 줄바꿈하고, 코드·명령어는 필요할 때만 끊는다 */
html[lang='ko'] body { word-break: keep-all; }
html[lang='ko'] .code code, html[lang='ko'] .cmd, html[lang='ko'] code { word-break: normal; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 22, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand small { font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a {
  padding: 6px 10px; border-radius: var(--r); color: var(--muted); font-size: 14px; white-space: nowrap;
}
.nav a:hover { background: var(--high); color: var(--text); text-decoration: none; }
.nav a[aria-current='page'] { background: var(--high); color: var(--primary); }
.bar .sp { flex: 1; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--mid); color: var(--text);
  font: 500 12px/1 var(--mono); letter-spacing: 0.02em; white-space: nowrap;
}
.pill-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pill-btn svg { width: 14px; height: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(130px); }
.hero::before { width: 520px; height: 520px; left: 18%; top: -220px; background: rgba(76, 215, 246, 0.12); }
.hero::after { width: 420px; height: 420px; right: -80px; top: 220px; background: rgba(255, 185, 95, 0.06); }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(76, 215, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 215, 246, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at 30% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 0%, #000 0%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: var(--r);
  font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--high); color: var(--primary);
}
.tag.ok { background: rgba(78, 222, 163, 0.1); color: var(--tertiary); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -0.035em; }
.hero h1 .hl { color: var(--primary); }
.hero .sub { margin: 22px 0 0; max-width: 40em; font-size: 18px; line-height: 1.65; color: var(--muted); }
.hero .sub strong { color: var(--text); font-weight: 500; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r); border: 1px solid transparent;
  font: 500 14px/1 var(--mono); letter-spacing: 0.01em;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary-c); color: var(--lowest); box-shadow: 0 0 16px rgba(6, 182, 212, 0.28); }
.btn-primary:hover { background: var(--primary); }
.btn-ghost { background: rgba(38, 42, 51, 0.7); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- terminal window ---------- */
.window {
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px -4px rgba(6, 182, 212, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  min-width: 0;
}
.win-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--low); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: rgba(255, 180, 171, 0.55); }
.dots i:nth-child(2) { background: rgba(255, 185, 95, 0.55); }
.dots i:nth-child(3) { background: rgba(78, 222, 163, 0.55); }
.win-title { font: 400 12px/1 var(--mono); color: var(--outline); white-space: nowrap; }
.win-bar .sp { flex: 1; }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--lowest); border-radius: var(--r); }
.tabs button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 5px 10px; border-radius: 3px; font: 500 11px/1 var(--mono);
}
.tabs button[aria-selected='true'] { background: var(--primary-c); color: var(--lowest); }
.win-body { padding: 16px; }
.win-note { margin: 0 0 12px; font: 400 12px/1.5 var(--mono); color: var(--outline); }
.code { margin: 0; padding: 0; list-style: none; font: 400 13px/1.7 var(--mono); }
.code li { display: flex; gap: 10px; align-items: baseline; color: var(--tertiary); }
.code li + li { margin-top: 2px; }
.code .ps { color: var(--primary); user-select: none; flex: none; }
.code .cm { color: var(--outline); }
.code code { white-space: pre-wrap; overflow-wrap: anywhere; background: none; padding: 0; color: inherit; font-size: inherit; }
.win-foot { display: flex; justify-content: flex-end; padding: 0 16px 14px; }
.copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: var(--r);
  padding: 5px 10px; font: 500 11px/1 var(--mono); cursor: pointer;
}
.copy:hover { border-color: var(--primary); color: var(--primary); }
.copy svg { width: 13px; height: 13px; }
.panel[hidden] { display: none; }

/* ---------- sections ---------- */
section.s { padding: 88px 0; scroll-margin-top: 64px; }
section.s.alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.sec-head p { margin: 16px 0 0; color: var(--muted); font-size: 17px; }
h2.sub-h, h3.sub-h { font-size: 22px; margin: 56px 0 8px; letter-spacing: -0.015em; }
.lead-sm { margin: 0 0 22px; color: var(--muted); max-width: 46em; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 28px; background: var(--low); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat .num { font: 700 40px/1 var(--font); letter-spacing: -0.03em; }
.stat .num span { font-size: 20px; font-weight: 500; margin-left: 4px; color: var(--outline); }
.stat:nth-child(1) .num { color: var(--primary); }
.stat:nth-child(2) .num { color: var(--tertiary); }
.stat:nth-child(3) .num { color: var(--secondary); }
.stat:nth-child(4) .num { color: var(--text); }
.stat h4 { margin: 10px 0 4px; font: 500 13px/1.4 var(--mono); color: var(--text); }
.stat p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.stats-wrap { padding-bottom: 8px; }

/* cards */
.cards { display: grid; gap: 20px; }
.cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--low); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .q { font-size: 20px; line-height: 1.3; }
.card .cmd { margin-top: auto; padding: 10px 12px; background: var(--lowest); border-radius: var(--r); font: 400 12.5px/1.5 var(--mono); color: var(--tertiary); white-space: pre-wrap; overflow-wrap: anywhere; }
.card .cmd::before { content: '> '; color: var(--primary); }
.card .idx { font: 500 11px/1 var(--mono); letter-spacing: 0.1em; color: var(--primary); }
.card.accent-primary { border-top: 2px solid var(--primary); }
.card.accent-secondary { border-top: 2px solid var(--secondary); }
.card.accent-tertiary { border-top: 2px solid var(--tertiary); }

/* diagram */
.diagram { padding: 20px; overflow-x: auto; }
.diagram svg { width: 100%; min-width: 680px; height: auto; font-family: var(--font); }
.d-box { fill: var(--mid); stroke: var(--highest); stroke-width: 1.5; }
.d-core { fill: rgba(6, 182, 212, 0.05); stroke: var(--primary-c); stroke-width: 1.5; }
.d-inner { fill: var(--lowest); stroke: var(--highest); stroke-width: 1.2; }
.d-line { fill: none; stroke: var(--outline); stroke-width: 1.6; }
.d-arrow { fill: var(--outline); }
.d-t { fill: var(--text); font-size: 19px; font-weight: 600; text-anchor: middle; }
.d-s { fill: var(--muted); font-size: 13.5px; text-anchor: middle; font-family: var(--mono); }
.d-c { fill: var(--primary); font-size: 19px; font-weight: 600; text-anchor: middle; }
.d-l { fill: var(--secondary); font-size: 13.5px; font-family: var(--mono); }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--low); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 13px 18px; vertical-align: top; }
th { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--outline); background: var(--mid); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { border-top: 1px solid rgba(61, 73, 76, 0.35); color: var(--muted); }
tr:first-child td { border-top: 0; }
td:first-child { color: var(--text); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
td.num.hot { color: var(--tertiary); font-weight: 600; }
td.num.old { color: var(--outline); }
.tbl-wrap.res td:first-child { white-space: normal; font-family: var(--font); font-size: 14px; color: var(--muted); }
.tbl-wrap.res td.num { white-space: normal; color: var(--text); font-size: 13px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--low); font: 500 12.5px/1 var(--mono); color: var(--primary); }
.chip + .chip { }
.chip.sep { color: var(--outline); }

/* swb */
.tab-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tab-card { padding: 18px; background: var(--low); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tab-card h2 { font: 600 14px/1 var(--mono); color: var(--primary); margin-bottom: 8px; letter-spacing: 0; }
.tab-card:nth-child(3) h2 { color: var(--secondary); }
.tab-card:nth-child(4) h2 { color: var(--tertiary); }
.tab-card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.feature-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.feature-list li { padding-left: 16px; border-left: 2px solid var(--highest); color: var(--muted); font-size: 15px; }
.feature-list li strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 44px; align-items: start; }
figure { margin: 0; }
figure img { width: 100%; height: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
figcaption { padding: 10px 14px; font: 400 12px/1.4 var(--mono); color: var(--outline); background: var(--low); border-top: 1px solid var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* plugin */
.switch-list { display: grid; gap: 14px; }
.switch { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 18px 20px; background: var(--low); border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--r-lg); }
.switch.primary { border-left-color: var(--primary); }
.switch.secondary { border-left-color: var(--secondary); }
.switch.tertiary { border-left-color: var(--tertiary); }
.switch .k { font: 600 14px/1.6 var(--mono); }
.switch.primary .k { color: var(--primary); }
.switch.secondary .k { color: var(--secondary); }
.switch.tertiary .k { color: var(--tertiary); }
.switch .off { font: 500 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--outline); border: 1px solid var(--line); padding: 3px 6px; border-radius: var(--r); margin-left: 8px; vertical-align: middle; }
.switch p { margin: 0; color: var(--muted); font-size: 14.5px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.fact { padding: 16px 18px; background: var(--low); border: 1px solid var(--line); border-radius: var(--r-lg); }
.fact b { display: block; font: 700 22px/1.2 var(--mono); color: var(--primary); letter-spacing: -0.02em; }
.fact span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.note { margin: 22px 0 0; padding: 14px 18px; border-left: 3px solid var(--secondary); background: rgba(255, 185, 95, 0.06); color: var(--muted); font-size: 14.5px; border-radius: 0 var(--r) var(--r) 0; }

/* rank */
.rank { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 16px; background: var(--low); border: 1px solid var(--line); border-radius: var(--r); font-size: 14.5px; }
.rank b { font: 600 13px/1.6 var(--mono); color: var(--secondary); }
.rank span { color: var(--muted); }

/* install */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { counter-increment: step; display: flex; flex-direction: column; gap: 10px; background: var(--low); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; min-width: 0; }
.step::before { content: counter(step, decimal-leading-zero); font: 600 12px/1 var(--mono); color: var(--primary); letter-spacing: 0.1em; }
.step h2 { font-size: 19px; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step .window { margin-top: auto; }
.step .win-body { padding: 12px 14px; }

/* limits */
.limits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.limits li { display: flex; gap: 14px; padding: 16px 18px; background: var(--low); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--muted); font-size: 15px; }
.limits li::before { content: '!'; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 185, 95, 0.14); color: var(--secondary); font: 700 12px/1 var(--mono); margin-top: 2px; }

/* CTA */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 40px; background: var(--mid); border: 1px solid var(--line); border-radius: 16px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(26px, 3vw, 34px); }
.cta p { margin: 10px 0 0; color: var(--muted); }

/* footer */
.site-footer { margin-top: 24px; padding: 48px 0 36px; background: var(--lowest); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.foot-grid a.brand { display: flex; padding: 0; color: var(--text); }
.foot-grid a { display: block; padding: 3px 0; color: var(--muted); }
.foot-grid a:hover { color: var(--text); }
.foot-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font: 400 12px/1.5 var(--mono); color: var(--outline); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.c4, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .bar { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 4px; }
  .nav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .bar .sp { display: block; }
  section.s { scroll-margin-top: 108px; }
  .steps, .cards.c3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hero { padding: 44px 0 36px; }
  section.s { padding: 60px 0; }
  .stats { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .cards.c4, .cards.c2, .facts, .tab-cards, .limits { grid-template-columns: minmax(0, 1fr); }
  .rank li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .cta { padding: 28px 22px; }
  .brand small { display: none; }
  .hero .win-title { display: none; }
  .hero .sub { font-size: 16.5px; }
  th, td { padding: 11px 12px; }
  td:first-child { white-space: normal; word-break: break-word; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag .dot { animation: none; }
}

/* 홈의 페이지 안내 카드 */
.link-card { color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.link-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); }
.link-card .more { margin-top: auto; font: 500 12px/1 var(--mono); color: var(--primary); }
@media (prefers-reduced-motion: reduce) { .link-card:hover { transform: none; } }

/* 화면 갤러리 (탭으로 전환) */
.gallery-head .sub-h { margin-top: 0; }
.gallery .win-bar { flex-wrap: wrap; row-gap: 8px; }
.gallery .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.gallery .tabs::-webkit-scrollbar { display: none; }
.gallery .tabs button { white-space: nowrap; }
.gallery .panel img { width: 100%; height: auto; display: block; }
.gallery-note { padding: 10px 14px; font: 400 12px/1.4 var(--mono); color: var(--outline); background: var(--low); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  /* 넓은 화면 캡처는 줄이지 않고 옆으로 밀어 본다 */
  .gallery .panel { overflow-x: auto; }
  .gallery .panel img { width: auto; min-width: 920px; max-width: none; }
}
