:root {
  --bg: #0a0c10;
  --bg-elevated: #12151c;
  --surface: #1a1c22;
  --border: #2d3340;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #ff914d;
  --accent-dim: rgba(255, 145, 77, 0.15);
  --accent-glow: rgba(255, 145, 77, 0.45);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 145, 77, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 145, 77, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.35;
}

.bg-glow-a {
  top: -180px;
  left: -120px;
  background: var(--accent);
}

.bg-glow-b {
  bottom: -200px;
  right: -100px;
  background: #ff6b35;
  opacity: 0.2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover {
  color: var(--accent);
}

.nav-github {
  font-family: var(--mono);
  font-size: 13px;
}

.lang-switch {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.lang-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--accent-dim);
  color: var(--accent);
}

main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero {
  padding: 56px 0 48px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid rgba(255, 145, 77, 0.35);
  border-radius: 999px;
  background: var(--accent-dim);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-desc {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary.is-active {
  background: #ea580c;
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.demo-shell {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px rgba(255, 145, 77, 0.08), 0 24px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.demo-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(26, 28, 34, 0.9);
}

.mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: var(--surface);
}

.mode-chip:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.mode-chip input {
  accent-color: var(--accent);
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-status {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.demo-window {
  background: #e8eaef;
  color: #1a1d26;
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #d1d5db;
  font-size: 11px;
  color: #4b5563;
}

.demo-chrome .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
}

.demo-url {
  margin-left: 8px;
  font-family: var(--mono);
}

.demo-stage {
  position: relative;
  padding: 20px;
  min-height: 280px;
  cursor: default;
  isolation: isolate;
}

.demo-stage.is-picking {
  cursor: crosshair;
  outline: 2px dashed rgba(255, 145, 77, 0.55);
  outline-offset: -2px;
}

.demo-stage.is-picking * {
  cursor: crosshair;
}

.mock-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  margin-bottom: 16px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mock-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff914d, #ffb347);
}

.mock-body h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.mock-body p {
  margin: 0 0 4px;
  font-size: 13px;
  color: #4b5563;
}

.mock-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
}

.mock-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.mock-footer {
  margin: 12px 0 0;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
}

.features {
  padding: 48px 0;
}

.features h2 {
  margin: 0 0 24px;
  text-align: center;
}

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

.feature-grid article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.feature-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--accent);
}

.feature-grid p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.install {
  padding: 24px 0 48px;
}

.install h2 {
  margin: 0 0 16px;
}

.install-steps {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.install-steps li {
  margin-bottom: 8px;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
  }
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}
