/* ai-codespec landing page · 本地零外部依赖 */

:root {
  --bg: #f7f8fb;
  --bg-soft: #eef0f7;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #22d3ee;
  --success: #16a34a;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --code-comment: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --container-max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  filter: drop-shadow(0 2px 6px rgba(99, 102, 241, 0.25));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
}

.nav-cta:hover {
  background: var(--primary);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 100px, rgba(34, 211, 238, 0.18), transparent 60%),
    var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at top, rgba(0, 0, 0, 0.6), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, rgba(0, 0, 0, 0.6), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  display: inline-flex;
  margin-bottom: 20px;
  filter: drop-shadow(0 12px 30px rgba(99, 102, 241, 0.35));
}

.hero-eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
  text-transform: uppercase;
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.grad-text {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 720px;
  margin: 0 0 32px;
  font-size: 18px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.55);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(79, 70, 229, 0.6);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  border-color: var(--border-strong);
}

/* Install card */
.install {
  padding: 24px 0 80px;
  position: relative;
}

.install-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  max-width: 880px;
  margin: 0 auto;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  animation: fadeIn 0.2s ease;
}

.tab-panel[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-desc {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.tab-hint {
  margin: 14px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}

/* Code block */
.code-block {
  position: relative;
  background: var(--code-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  padding: 18px 110px 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--code-text);
  white-space: pre;
}

.code-block code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.prompt-block {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.prompt-block pre {
  padding: 0;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 14px;
}

.prompt-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.prompt-label {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.copy-btn.is-copied {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.copy-btn-large {
  position: static;
  display: inline-flex;
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.45);
}

.copy-btn-large:hover {
  background: var(--primary-hover);
  border-color: transparent;
  transform: translateY(-1px);
}

.copy-btn-large.is-copied {
  background: var(--success);
  color: #fff;
  border-color: transparent;
}

/* Install footer */
.install-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 13.5px;
}

.install-footer .check-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
  border-radius: 999px;
  margin-right: 4px;
}

.install-footer .dot {
  color: var(--text-faint);
  margin: 0 2px;
}

/* Prereq note */
.prereq {
  max-width: 880px;
  margin: 24px auto 0;
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  color: #78350f;
  font-size: 14px;
}

.prereq-icon {
  flex-shrink: 0;
  color: #d97706;
  margin-top: 2px;
}

.prereq-body strong {
  display: block;
  margin-bottom: 2px;
  color: #78350f;
}

.prereq-body a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
}

.prereq-body a:hover {
  color: #92400e;
}

/* Sections common */
.section-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-sub {
  margin: 0 auto 48px;
  max-width: 640px;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
}

/* Features */
.features {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.feature-card code {
  font-size: 0.85em;
}

/* Hero status text */
.hero-sub-status {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  font-size: 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.hero-sub-status strong {
  color: #78350f;
}

/* Inline muted note (used in tab desc) */
.muted {
  display: inline-block;
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 13px;
}

/* Support matrix */
.support {
  padding: 80px 0;
  background: var(--bg);
}

.support-table {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.support-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 2.6fr;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}

.support-row:last-child {
  border-bottom: none;
}

.support-row.support-head {
  background: var(--bg-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 20px;
}

.support-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.support-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.support-dot.dot-on { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15); }
.support-dot.dot-soon { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15); }
.support-dot.dot-plan { background: #94a3b8; box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-on   { background: rgba(22, 163, 74, 0.12);  color: #166534; border: 1px solid rgba(22, 163, 74, 0.3); }
.badge-soon { background: rgba(245, 158, 11, 0.14); color: #92400e; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-plan { background: var(--bg-soft);           color: var(--text-muted); border: 1px solid var(--border-strong); }

@media (max-width: 720px) {
  .support-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }
  .support-row.support-head { display: none; }
}

/* Contribute */
.contribute {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contribute-card {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  padding: 32px 36px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contribute-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 22px -8px rgba(79, 70, 229, 0.55);
}

.contribute-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.contribute-body > p {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 15px;
}

.contribute-ways {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 14px;
}

.contribute-ways li {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.7;
}

.contribute-ways li strong {
  color: var(--text);
}

.contribute-ways li span {
  color: var(--text-muted);
}

.contribute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 720px) {
  .contribute-card {
    grid-template-columns: 1fr;
    padding: 24px 22px;
    gap: 20px;
  }
}

/* Assets */
.assets {
  padding: 80px 0;
}

.assets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 880px;
  margin: 0 auto;
}

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

.assets-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.col-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.asset-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.asset-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.asset-list li:last-child {
  border-bottom: none;
}

.asset-list code {
  font-size: 13px;
  color: var(--primary);
  background: var(--primary-soft);
  align-self: flex-start;
}

.asset-list span {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* FAQ */
.faq {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.faq .container {
  max-width: 760px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--text-faint);
  font-weight: 400;
  transition: transform 0.15s ease;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--primary);
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13.5px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-sep {
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .site-nav {
    gap: 16px;
  }
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  .hero {
    padding: 64px 0 40px;
  }
  .install-card {
    padding: 20px;
  }
  .code-block pre {
    padding-right: 90px;
    font-size: 12.5px;
  }
}
