:root {
  --bg-0: #0a0a0f;
  --bg-1: #11111a;
  --bg-2: #161622;
  --bg-3: #1d1d2c;
  --border: #2a2a3d;
  --text-0: #f0f0f5;
  --text-1: #c8c8d4;
  --text-2: #8e8ea3;
  --text-3: #5a5a6e;
  --accent: #7c5cff;
  --accent-2: #00d9b2;
  --accent-3: #ff6ec7;
  --warn: #ffb83d;
  --code-bg: #15151f;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Inter",
    "SF Pro Text", "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo",
    "PingFang SC", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic",
    sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 600px at 10% -10%, rgba(124, 92, 255, 0.15), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(0, 217, 178, 0.10), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(255, 110, 199, 0.08), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* Language switcher --------------------------------------- */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(17, 17, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text-2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.lang-switch a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-0); }
.lang-switch a.active,
.lang-switch a[aria-current="true"] {
  background: var(--accent);
  color: white;
}
.lang-switch a.active:hover { background: var(--accent); color: white; }

/* Hero ----------------------------------------------------- */
.hero {
  padding: 88px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.logo-mark .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

.hero h1 {
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.05;
  color: var(--text-0);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .tagline {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-2);
  max-width: 720px;
  margin: 0 auto 18px;
}

.hero .lead {
  font-size: 15px;
  color: var(--text-2);
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a3eff);
  color: white;
  box-shadow: 0 6px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124, 92, 255, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-1);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Sections ------------------------------------------------- */
section { padding: 64px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h2 {
  color: var(--text-0);
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  line-height: 1.2;
}
h2 .num {
  color: var(--accent);
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.6em;
  margin-right: 12px;
  opacity: 0.7;
}

h3 {
  color: var(--text-0);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

/* Install table -------------------------------------------- */
.install-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.install-table th, .install-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.install-table th {
  background: var(--bg-2);
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
}
.install-table tr:last-child td { border-bottom: none; }
.install-table code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  background: var(--code-bg);
  color: var(--accent-2);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12.5px;
}

.note {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0, 217, 178, 0.05);
  border-left: 3px solid var(--accent-2);
  border-radius: 4px;
  color: var(--text-2);
  font-size: 14px;
}

/* Feature grid --------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.feature-card {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .25s;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: var(--shadow);
}
.feature-card:hover::before { opacity: 1; }

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}
.feature-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}
.feature-card .badge {
  display: inline-block;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--warn);
  background: rgba(255, 184, 61, 0.1);
  border: 1px solid rgba(255, 184, 61, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: 2px;
}
.feature-card p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.7;
}
.feature-card ul {
  list-style: none;
  margin-top: 10px;
}
.feature-card ul li {
  color: var(--text-2);
  font-size: 14px;
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
  line-height: 1.6;
}
.feature-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.feature-card .quote {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--code-bg);
  border-left: 2px solid var(--accent-3);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.6;
}

/* Viewer table --------------------------------------------- */
.viewer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
.viewer-table th, .viewer-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.viewer-table th {
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.viewer-table tr:last-child td { border-bottom: none; }
.viewer-table td:first-child { color: var(--text-0); font-weight: 600; width: 35%; }
.viewer-table td:last-child { color: var(--text-2); }

/* Misc lists ----------------------------------------------- */
.extra-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.extra-list li {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}
.extra-list li strong { color: var(--text-0); display: block; margin-bottom: 4px; font-size: 14.5px; }

/* Footer --------------------------------------------------- */
footer {
  padding: 40px 0 60px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.8;
}
footer a { color: var(--text-2); }
footer .heart { color: var(--accent-3); }

/* Inline code styling */
code:not(pre code), .inline-code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  background: var(--code-bg);
  color: var(--accent-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Terminal mock -------------------------------------------- */
.term-mock {
  margin: 36px auto 0;
  max-width: 720px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  text-align: left;
}
.term-mock .term-head {
  background: var(--bg-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.term-mock .term-head .b { width: 12px; height: 12px; border-radius: 50%; }
.term-mock .term-head .b1 { background: #ff5f57; }
.term-mock .term-head .b2 { background: #febc2e; }
.term-mock .term-head .b3 { background: #28c840; }
.term-mock .term-head .title { color: var(--text-3); margin-left: auto; font-size: 12px; }
.term-mock .term-body { padding: 18px 20px; color: var(--text-1); line-height: 1.7; }
.term-mock .prompt { color: var(--accent-2); }
.term-mock .cmd { color: var(--text-0); }
.term-mock .ghost { color: var(--text-3); font-style: italic; }
.term-mock .out { color: var(--text-2); }
.term-mock .ok { color: var(--accent-2); }
.term-mock .key { color: var(--warn); }

/* Visually-hidden (for a11y labels) ------------------------ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visual Tour mockups -------------------------------------- */
.tour-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 28px;
}
@media (min-width: 900px) {
  .tour-grid { grid-template-columns: 1fr 1fr; }
  .tour-grid > .tour-wide { grid-column: 1 / -1; }
}

.tour-mock {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tour-head {
  background: var(--bg-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-3);
}
.tour-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.tour-head .dot-r { background: #ff5f57; }
.tour-head .dot-y { background: #febc2e; }
.tour-head .dot-g { background: #28c840; }
.tour-head .title { margin-left: 6px; color: var(--text-3); }
.tour-head .crumb {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* — Workspace tab color mock — */
.ws-tabs-bar {
  display: flex;
  align-items: stretch;
  background: var(--bg-2);
  padding: 8px 8px 0;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ws-tab {
  padding: 7px 14px 9px;
  font-size: 12.5px;
  color: var(--text-1);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 2px solid color-mix(in srgb, var(--ws-tab-color, transparent) 60%, transparent);
  background: color-mix(in srgb, var(--ws-tab-color, transparent) 18%, transparent);
  white-space: nowrap;
}
.ws-tab .ws-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ws-tab-color, var(--text-3));
}
.ws-tab.ws-tab-active {
  background: #ffffff;
  color: #18181f;
  border-top-color: var(--ws-tab-color, var(--accent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ws-tab-color, transparent) 55%, transparent);
}
.ws-tab.ws-tab-active .ws-dot { background: var(--ws-tab-color, var(--accent)); }
.ws-tab-plus {
  padding: 7px 12px;
  color: var(--text-3);
  font-size: 14px;
  align-self: center;
}

/* tab content area + floating context menu */
.ws-stage {
  position: relative;
  min-height: 220px;
  background: var(--bg-1);
  padding: 24px 28px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-3);
}
.ws-stage .placeholder {
  opacity: 0.5;
  line-height: 1.9;
}
.ws-stage .placeholder .prompt { color: var(--accent-2); }
.ws-stage .placeholder .cmd { color: var(--text-1); }

.ctx-menu {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-30%);
  background: linear-gradient(180deg, #1f1f2e 0%, var(--bg-3) 100%);
  border: 1px solid #3a3a52;
  border-radius: 10px;
  padding: 10px 12px 12px;
  min-width: 240px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  color: var(--text-1);
}
.ctx-menu .item {
  padding: 5px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctx-menu .item:hover { background: rgba(255, 255, 255, 0.04); }
.ctx-menu .sep { height: 1px; background: var(--border); margin: 6px -4px; }
.ctx-menu .label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin: 2px 4px 6px;
  font-weight: 600;
}
.color-row {
  display: flex;
  gap: 6px;
  padding: 0 4px;
}
.color-row .sw {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s;
}
.color-row .sw:hover { transform: scale(1.12); }
.color-row .sw-active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.color-row .sw-clear {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px dashed var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 12px;
}

/* — Markdown / Mermaid preview mock — */
.md-mock-body {
  background: var(--bg-0);
  padding: 28px 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Inter", "SF Pro Text", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-1);
}
.md-mock-body h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.md-mock-body h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  margin: 22px 0 10px;
}
.md-mock-body p { margin-bottom: 12px; color: var(--text-1); font-size: 14px; }
.md-mock-body ul { margin: 6px 0 14px 22px; padding: 0; list-style: disc; }
.md-mock-body ul li { color: var(--text-2); margin-bottom: 4px; }
.md-mock-body ul li::before { content: none; left: auto; position: static; }
.md-mock-body code:not(pre code) {
  background: var(--code-bg);
  color: var(--accent-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
}
.md-mock-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 12px 0 16px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
}
.md-mock-body pre code .kw { color: #c678dd; }
.md-mock-body pre code .str { color: #98c379; }
.md-mock-body pre code .cmt { color: var(--text-3); font-style: italic; }
.md-mock-body pre code .fn { color: #61afef; }
.md-mock-body pre code .num { color: #d19a66; }

.mermaid-fig {
  display: block;
  margin: 6px auto 6px;
  max-width: 100%;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mermaid-fig text { font-family: -apple-system, "Inter", sans-serif; }

.mock-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

/* Responsive ----------------------------------------------- */
@media (max-width: 640px) {
  .hero { padding: 60px 0 48px; }
  section { padding: 48px 0; }
  .feature-card { padding: 22px; }
  .lang-switch { top: 10px; right: 10px; font-size: 11px; }
  .lang-switch a { min-width: 28px; height: 26px; padding: 0 8px; }
  .md-mock-body { padding: 18px 16px; font-size: 13px; }
  .ws-tab { padding: 6px 10px 8px; font-size: 11.5px; }
  .ctx-menu { min-width: 200px; transform: translateX(-15%); }
}
