/* =============================================================
   VACT Protocol — Production Stylesheet
   Author: fy2ne <hello@fy2ne.me> (https://fy2ne.me)
   Design System: Obsidian Developer Engine (Anti-AI Slop)
   ============================================================= */

:root {
  --bg-black: #000000;
  --bg-surface: #08080a;
  --bg-subtle: #111114;
  --bg-card: #0c0c0f;
  --bg-hover: #16161a;

  --border-subtle: #141417;
  --border-medium: #222227;
  --border-focus: #383840;

  --text-primary: #ededed;
  --text-heading: #ffffff;
  --text-secondary: #71717a;
  --text-muted: #52525b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Geist", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Geist Mono", Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

code, kbd, pre {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------------------------------------------------------------
   Announcement Top Bar
   ------------------------------------------------------------- */
.top-announcement {
  background: #000000;
  border-bottom: 1px solid #141416;
  padding: 0.38rem 1rem;
  font-size: 0.77rem;
  text-align: center;
  color: #71717a;
  letter-spacing: 0.01em;
}

.top-announcement a {
  color: #ededed;
  font-weight: 500;
  margin-left: 0.35rem;
  transition: color 0.15s ease;
}

.top-announcement a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* -------------------------------------------------------------
   Header & Sticky Nav
   ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #18181b;
  height: 52px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
}

.brand-sigma-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-sigma-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-ver {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: #71717a;
  background: #111113;
  border: 1px solid #27272a;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.header-nav .nav-link {
  font-size: 0.82rem;
  font-weight: 450;
  color: #71717a;
  transition: color 0.15s ease;
}

.header-nav .nav-link:hover {
  color: #ffffff;
}

.header-nav .nav-highlight {
  color: #ededed;
}

.nav-gh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #111113;
  border: 1px solid #27272a;
  color: #d4d4d8;
  padding: 0.32rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-gh-link:hover {
  background: #1c1c20;
  border-color: #3f3f46;
  color: #ffffff;
}

@media (max-width: 820px) {
  .header-nav {
    display: none;
  }
}

/* -------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------- */
.hero-section {
  padding: 5.5rem 0 3.5rem;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #71717a;
  background: #0d0d10;
  border: 1px solid #1c1c21;
  padding: 0.28rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #ffffff;
  max-width: 900px;
  margin: 0 auto 1.35rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: #71717a;
  max-width: 760px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.quick-clone-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0d0d10;
  border: 1px solid #222227;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #ededed;
}

.clone-prompt {
  color: #52525b;
  user-select: none;
}

.btn-copy-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #18181c;
  border: 1px solid #2e2e36;
  color: #a1a1aa;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.btn-copy-inline:hover {
  background: #25252d;
  color: #ffffff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #ededed;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid #27272a;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: #121215;
  border-color: #3f3f46;
  color: #ffffff;
}

/* -------------------------------------------------------------
   Stats Strip
   ------------------------------------------------------------- */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 12px;
  padding: 1.25rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 0.2rem;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: #1c1c21;
}

@media (max-width: 768px) {
  .stats-strip {
    flex-direction: column;
    gap: 1.25rem;
  }
  .stat-divider {
    display: none;
  }
}

/* -------------------------------------------------------------
   Section Common
   ------------------------------------------------------------- */
.section {
  padding: 5rem 0;
  border-top: 1px solid #141417;
}

.section-head {
  text-align: left;
  max-width: 760px;
  margin-bottom: 2.75rem;
}

.section-kicker {
  display: block;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717a;
  margin-bottom: 0.45rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.2;
}

.section-desc {
  font-size: 0.95rem;
  color: #71717a;
  margin-top: 0.6rem;
  line-height: 1.6;
}

/* -------------------------------------------------------------
   Comparison Table
   ------------------------------------------------------------- */
.comparison-table-wrapper {
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 12px;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.comparison-table th {
  background: #0e0e12;
  padding: 0.85rem 1.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
  font-family: var(--font-mono);
  border-bottom: 1px solid #1c1c21;
}

.comparison-table th:last-child {
  color: #ededed;
}

.comparison-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #16161b;
  color: #a1a1aa;
  line-height: 1.5;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td strong {
  color: #ededed;
  font-weight: 500;
}

.comparison-table td:nth-child(2) {
  color: #71717a;
}

.comparison-table td:last-child {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.015);
}

/* -------------------------------------------------------------
   Pipeline Grid
   ------------------------------------------------------------- */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 960px) {
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
}

.pipeline-card {
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.pipeline-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #52525b;
  margin-bottom: 0.65rem;
}

.pipeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.pipeline-text {
  font-size: 0.85rem;
  color: #71717a;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.pipeline-metric {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ededed;
  background: #111115;
  border: 1px solid #202026;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  align-self: flex-start;
}

/* -------------------------------------------------------------
   Interactive Vector Scene Graph Inspector
   ------------------------------------------------------------- */
.ast-inspector-card {
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
}

@media (max-width: 900px) {
  .ast-inspector-card {
    grid-template-columns: 1fr;
  }
}

.ast-viewport-side {
  border-right: 1px solid #1c1c21;
  display: flex;
  flex-direction: column;
}

.ast-viewport-header, .ast-json-header {
  padding: 0.65rem 1rem;
  background: #0e0e12;
  border-bottom: 1px solid #1c1c21;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #71717a;
}

.ast-fps-badge {
  color: #4ade80;
}

.ast-viewport-canvas-box {
  padding: 1.25rem;
  position: relative;
  background: #040406;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vact-node {
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.vact-node:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.node-tag {
  position: absolute;
  top: -9px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #71717a;
  background: #040406;
  padding: 0 4px;
  pointer-events: none;
}

.node-window {
  border-color: #27272a;
  padding: 0.75rem;
  height: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.node-menu {
  display: flex;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-color: #1e1e24;
}

.node-item {
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
  color: #a1a1aa;
}

.node-editor {
  flex: 1;
  border-color: #27272a;
  padding: 0.75rem;
}

.active-node {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.03);
}

.active-node .node-tag {
  color: #4ade80;
}

.node-text-preview {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #ededed;
}

.node-taskbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-color: #27272a;
  height: 44px;
  margin-top: 1rem;
}

.node-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
}

.node-search {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  color: #71717a;
  border-color: #1c1c21;
  width: 140px;
}

.node-app {
  padding: 0.15rem 0.35rem;
  font-size: 0.8rem;
}

.ast-json-side {
  display: flex;
  flex-direction: column;
  background: #070709;
}

.ast-json-body {
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #ededed;
  line-height: 1.5;
  overflow: auto;
  max-height: 420px;
}

/* -------------------------------------------------------------
   Interactive Dither Veil
   ------------------------------------------------------------- */
.dither-interactive-box {
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}

.dither-canvas-frame {
  position: relative;
  background: #030305;
  border: 1px solid #1c1c21;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
}

#ditherVeilCanvas {
  display: block;
  cursor: crosshair;
}

.dither-hint-label {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #52525b;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.dither-settings-bar {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.dither-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dither-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #71717a;
}

.dither-btns {
  display: flex;
  gap: 0.25rem;
}

.dither-btn {
  background: #111114;
  border: 1px solid #202026;
  color: #71717a;
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  font-size: 0.74rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.12s ease;
}

.dither-btn:hover {
  color: #ededed;
  border-color: #383840;
}

.dither-btn.active {
  background: #ededed;
  border-color: #ffffff;
  color: #000000;
  font-weight: 600;
}

/* -------------------------------------------------------------
   Native SDKs
   ------------------------------------------------------------- */
.sdk-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sdk-tab {
  background: #0d0d10;
  border: 1px solid #1c1c21;
  color: #71717a;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.sdk-tab:hover {
  color: #ededed;
  border-color: #27272a;
}

.sdk-tab.active {
  background: #18181c;
  border-color: #383840;
  color: #ffffff;
}

.code-box {
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 10px;
  overflow: hidden;
}

.code-box-header {
  padding: 0.65rem 1rem;
  background: #0e0e12;
  border-bottom: 1px solid #1c1c21;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-file-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #71717a;
}

.btn-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #141418;
  border: 1px solid #27272f;
  color: #a1a1aa;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.btn-copy-code:hover {
  background: #202028;
  color: #ffffff;
}

.code-box-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #ededed;
  line-height: 1.55;
  overflow-x: auto;
}

/* -------------------------------------------------------------
   Quickstart Steps
   ------------------------------------------------------------- */
.quickstart-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .quickstart-steps {
    grid-template-columns: 1fr;
  }
}

.qs-step {
  background: #09090c;
  border: 1px solid #1c1c21;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.qs-step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #52525b;
  margin-bottom: 0.65rem;
}

.qs-step-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.45rem;
}

.qs-step-content p {
  font-size: 0.84rem;
  color: #71717a;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.cmd-block {
  background: #040406;
  border: 1px solid #16161b;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ededed;
  line-height: 1.5;
  word-break: break-all;
}

/* -------------------------------------------------------------
   Manifesto Spotlight
   ------------------------------------------------------------- */
.manifesto-box {
  background: #08080b;
  border: 1px solid #1c1c21;
  border-radius: 12px;
  padding: 2.5rem;
  text-align: left;
}

.manifesto-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #71717a;
  background: #111114;
  border: 1px solid #202026;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.manifesto-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.manifesto-desc {
  font-size: 0.92rem;
  color: #71717a;
  max-width: 720px;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.manifesto-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ededed;
  color: #000000;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}

.manifesto-btn:hover {
  opacity: 0.9;
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
.footer {
  border-top: 1px solid #141417;
  padding: 3rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

.footer-tagline {
  font-size: 0.78rem;
  color: #52525b;
}

.footer-copy {
  font-size: 0.8rem;
  color: #52525b;
  margin-top: 0.35rem;
}

.footer-copy a {
  color: #71717a;
  text-decoration: underline;
}

.footer-copy a:hover {
  color: #ffffff;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: #71717a;
  transition: color 0.12s ease;
}

.footer-links a:hover {
  color: #ffffff;
}
