/* Assistant marketing site. Same palette as the app (modules/gui/src/index.css):
   near-black background, indigo accent, purple/cyan gradient. */

:root {
  --bg: #07090e;
  --bg-elevated: rgba(15, 19, 29, 0.75);
  --bg-card: rgba(18, 22, 33, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.35);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #6366f1;
  --accent-rgb: 99, 102, 241;
  --accent-light: #a5b4fc;
  --purple: #a78bfa;
  --cyan: #22d3ee;
  --green: #34d399;
  --font-sans: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --container: 1120px;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  color: var(--accent-light);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
}

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

/* Background */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(500px 360px at 85% 20%, rgba(139, 92, 246, 0.12), transparent 70%),
    radial-gradient(700px 400px at 50% 100%, rgba(6, 182, 212, 0.08), transparent 70%);
}

.dot-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(#1e293b 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.22;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(var(--accent-rgb), 0.6);
}

.btn-primary:hover {
  background: #4f46e5;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}

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

.btn-block {
  width: 100%;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 9, 14, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

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

/* Hero */
.hero-section {
  padding: 88px 0 56px;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-light);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.hero-title {
  margin-top: 28px;
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(90deg, #818cf8, #a78bfa 55%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin-top: 22px;
  max-width: 680px;
  font-size: 18px;
  color: var(--text-muted);
}

.download-card {
  margin-top: 40px;
  width: 100%;
  max-width: 560px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

.btn-download {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: rgba(165, 180, 252, 0.4);
  color: #fff;
  justify-content: flex-start;
  text-align: left;
  box-shadow: 0 14px 34px -12px rgba(var(--accent-rgb), 0.7);
}

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

.download-icon {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.download-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.btn-caption {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  font-family: var(--font-mono);
}

.btn-title {
  font-size: 17px;
  font-weight: 700;
}

.download-arrow {
  flex-shrink: 0;
  opacity: 0.85;
}

.platform-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.switcher-label {
  font-size: 12px;
  color: var(--text-dim);
}

.chip-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.chip-btn.active {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.5);
  color: var(--accent-light);
}

.terminal-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.terminal-hint code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.btn-copy {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy.copied {
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--green);
}

.hero-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
}

.hero-stats {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 720px;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.hero-stats strong {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-light);
}

.hero-stats span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sections */
section {
  padding: 80px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.section-lead {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 16px;
}

/* Screenshot */
.shot-stage {
  margin: 0;
}

.shot-frame {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #0c0f18;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.shot-frame.is-revealed {
  opacity: 1;
  transform: none;
}

.shot-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.tl-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.shot-img {
  width: 100%;
  height: auto;
}

.shot-caption {
  margin-top: 24px;
}

.shot-legend {
  list-style: none;
  counter-reset: legend;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shot-legend li {
  counter-increment: legend;
  position: relative;
  padding: 14px 14px 14px 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-muted);
}

.shot-legend li::before {
  content: counter(legend);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.shot-legend strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, transform 0.2s;
}

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

.feature-icon {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-light);
  margin-bottom: 18px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* How it works */
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.how-step {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent 60%), var(--bg-card);
}

.how-index {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 16px;
}

.how-step h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.how-step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Downloads */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
  align-items: center;
}

.platform-card.is-detected {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.3), 0 20px 50px -30px rgba(var(--accent-rgb), 0.6);
}

.platform-badge {
  display: none;
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.platform-card.is-detected .platform-badge {
  display: block;
}

.platform-icon {
  color: var(--text);
  margin-bottom: 4px;
}

.platform-name {
  font-size: 20px;
}

.platform-req {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.releases-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.releases-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.releases-callout p {
  font-size: 14px;
  color: var(--text-muted);
}

/* FAQ */
.faq-container {
  max-width: 800px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0 20px;
}

.faq-item[open] {
  border-color: var(--border-hover);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-size: 18px;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: rgba(0, 0, 0, 0.25);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  font-weight: 800;
  font-size: 18px;
}

.footer-brand p {
  grid-column: 1 / -1;
  margin-top: 10px;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-dim);
}

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

.footer-links h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
}

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

/* Legal pages */
.legal-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.legal-hero {
  padding: 32px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-bottom: 32px;
}

.legal-hero h1 {
  font-size: 36px;
  margin: 12px 0;
}

.legal-hero p {
  color: var(--text-muted);
  font-size: 14px;
}

.legal-meta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.legal-section {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.legal-section h2 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
}

.legal-section p + p,
.legal-section ul {
  margin-top: 10px;
}

.legal-section ul {
  padding-left: 20px;
}

.legal-section li + li {
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 960px) {
  .features-grid,
  .how-steps,
  .platform-grid,
  .shot-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: 56px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features-grid,
  .how-steps,
  .platform-grid,
  .shot-legend {
    grid-template-columns: 1fr;
  }

  .github-btn span {
    display: none;
  }

  .releases-callout {
    flex-direction: column;
    align-items: flex-start;
  }

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

  section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shot-frame {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
