/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Variables ===== */
:root {
  --bg: #0a0a0b;
  --surface: #121215;
  --surface-hover: #1a1a1f;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #f59e0b;
  --accent-glow: #fbbf24;
  --accent-dim: #d97706;
  --cool: #6366f1;
  --cool-glow: #818cf8;
  --red: #ef4444;
  --yellow: #eab308;
  --green: #22c55e;
  --font-display: 'Anton', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Canvas Particles ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--text);
}
.nav-logo-icon {
  flex-shrink: 0;
  border-radius: 0.4rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--accent-glow); transform: scale(1.03); }

/* ===== Language Toggle ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  transition: border-color 0.2s;
}
.lang-toggle:hover { border-color: var(--border-hover); }
.lang-option {
  color: var(--text-dim);
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
  transition: all 0.2s;
}
.lang-option.active {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
}
.lang-divider {
  color: var(--border);
  font-weight: 400;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 600px 300px at 50% 30%, rgba(245, 158, 11, 0.08), transparent),
    radial-gradient(ellipse 400px 200px at 80% 60%, rgba(99, 102, 241, 0.06), transparent),
    radial-gradient(ellipse 500px 250px at 20% 80%, rgba(245, 158, 11, 0.04), transparent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

/* Animated word spans */
.hword {
  display: inline-block;
  animation: wordReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hword-a {
  background: linear-gradient(135deg, var(--accent) 20%, var(--accent-glow) 50%, var(--accent) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: wordReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both, shimmer 2.5s ease-in-out infinite;
}

@keyframes wordReveal {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.85);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.accent-inline { background: linear-gradient(135deg, var(--accent), var(--accent-glow)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
}
.btn-primary:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* ===== Terminal Preview ===== */
.hero-terminal {
  position: relative;
  z-index: 2;
  margin-top: 3rem;
  width: 100%;
  max-width: 620px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.08), 0 20px 60px rgba(0, 0, 0, 0.4);
  background: rgba(18, 18, 21, 0.9);
  backdrop-filter: blur(12px);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }
.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.terminal-body {
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.8;
  min-height: 180px;
}
.terminal-line { animation: fadeIn 0.3s ease-out both; }
.terminal-line.dim { color: var(--text-dim); }
.prompt { color: var(--green); margin-right: 0.4rem; }
.prompt.accent { color: var(--accent); }
.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}
.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(18, 18, 21, 0.4);
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}
.section-header p a { color: var(--accent); text-decoration: underline; }

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.feature-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.06);
}
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== Screenshots ===== */
.screenshots-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.screenshot-item { text-align: center; }
.screenshot-frame {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.screenshot-frame:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 60px rgba(245, 158, 11, 0.1);
}
.screenshot-titlebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
}
.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.screenshot-label {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Demo Video ===== */
.demo-video {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 0.8rem;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}
.demo-video video {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== MCP ===== */
.mcp-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.mcp-clients {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mcp-client-tab {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.mcp-client-tab:hover { color: var(--text); background: var(--surface); }
.mcp-client-tab.active {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.mcp-code {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.mcp-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}
.mcp-code-lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.mcp-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.4rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.mcp-copy-btn:hover { color: var(--text); border-color: var(--border-hover); }
.mcp-code-body {
  padding: 1.25rem;
  overflow-x: auto;
}
.mcp-code-body code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre;
}

/* ===== Download ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 650px;
  margin: 0 auto;
}
.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.download-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.1);
  transform: translateY(-3px);
}
.download-card.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}
.download-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.download-card.disabled:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}
.download-icon {
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.download-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
.download-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 0.3rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.coming-soon {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
  padding: 0.25rem 0.75rem;
  border-radius: 0.3rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.25);
  margin-top: 0.25rem;
}
.download-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  margin-top: 0.25rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s;
}
.download-card:not(.disabled):hover .download-arrow {
  opacity: 1;
  transform: translateY(0);
}
.download-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.download-note a { color: var(--accent); text-decoration: underline; }

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  background: rgba(10, 10, 11, 0.8);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}
.footer-logo-icon {
  flex-shrink: 0;
  border-radius: 0.35rem;
}
.footer-version {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1rem;
  }
  .nav-toggle { display: flex; }
  .lang-toggle { align-self: flex-start; }

  .hero-terminal { max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }

  .mcp-grid { grid-template-columns: 1fr; }
  .mcp-clients {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .mcp-client-tab { width: auto; font-size: 0.8rem; padding: 0.5rem 0.75rem; }

  .features-grid { grid-template-columns: 1fr; }
  .demo-video { max-width: 100%; }
  .screenshots-track { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
}
