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

:root {
  --bg: #0a0a1a;
  --bg-card: #111128;
  --bg-card-hover: #161640;
  --surface: #1a1a3a;
  --border: #2a2a5a;
  --text: #e0e0f0;
  --text-muted: #8888aa;
  --accent: #748ffc;
  --accent-bright: #91a7ff;
  --gradient: linear-gradient(135deg, #748ffc 0%, #cc5de8 50%, #ff6b6b 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(116,143,252,0.15), rgba(204,93,232,0.08));
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.nav-logo-img { width: 28px; height: 28px; border-radius: 6px; }
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(116,143,252,0.4);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(116,143,252,0.4);
}
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border-color: var(--text-muted);
}
.btn-large { padding: 16px 36px; font-size: 16px; border-radius: 12px; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px 24px 60px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(116,143,252,0.15) 0%, rgba(204,93,232,0.05) 50%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  text-align: center;
  max-width: 720px;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(116,143,252,0.1);
  border: 1px solid rgba(116,143,252,0.2);
  color: var(--accent-bright);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Terminal Mockup ── */
.hero-terminal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin-top: 60px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.terminal-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #12122a;
  padding: 0 16px;
  height: 40px;
  border-bottom: 1px solid var(--border);
}
.terminal-tabs { display: flex; align-items: center; gap: 2px; }
.terminal-tab {
  font-size: 11px;
  font-family: var(--sans);
  padding: 6px 14px;
  border-radius: 6px 6px 0 0;
  color: var(--text-muted);
}
.terminal-tab.active { color: var(--text); background: #1a1a2e; }
.terminal-tab-new { font-size: 14px; color: var(--text-muted); padding: 4px 8px; }
.terminal-controls { display: flex; gap: 6px; }
.ctrl-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2a4a; }

.terminal-body {
  background: #1a1a2e;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}
.terminal-split { display: flex; min-height: 280px; }
.terminal-pane { flex: 1; display: flex; flex-direction: column; }
.terminal-divider { width: 1px; background: var(--border); }

.terminal-header-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.terminal-header-bar.ssh { color: #51cf66; }
.th-icon { font-size: 8px; }

.terminal-content { padding: 12px 16px; flex: 1; }
.line { white-space: pre; margin-bottom: 2px; }
.prompt { color: #748ffc; }
.prompt-ssh { color: #51cf66; }
.output { color: var(--text-muted); }
.cmd { color: #ffd43b; }
.cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.bar {
  display: inline-block;
  width: 120px;
  height: 8px;
  background: #2a2a4a;
  border-radius: 4px;
  vertical-align: middle;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 1s ease;
}
.bar-fill.mem { background: #ff6b6b; }

.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* ── Stats ── */
.stats {
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Section header ── */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-header p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Features ── */
.features { padding: 100px 24px; }
.features-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(116,143,252,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.feature-large { grid-column: span 3; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gradient-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; color: var(--accent); }
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Vault demo */
.vault-demo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vault-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  transition: border-color 0.3s, background 0.3s;
}
.vault-item:hover {
  border-color: var(--accent);
  background: rgba(116,143,252,0.05);
}
.vault-icon { font-size: 16px; }
.vault-label { font-weight: 600; font-family: var(--mono); }
.vault-host { color: var(--text-muted); margin-left: auto; font-family: var(--mono); font-size: 12px; }

/* ── Comparison ── */
.comparison {
  padding: 100px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.comparison-table {
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
th.highlight, td.highlight {
  color: var(--accent-bright);
  font-weight: 600;
}
.check { color: #51cf66; }
.cross { color: #ff6b6b; opacity: 0.6; }

/* ── Tech ── */
.tech { padding: 100px 24px; }
.tech-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.tech-item {
  padding: 32px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.tech-item:hover {
  border-color: rgba(116,143,252,0.3);
  transform: translateY(-4px);
}
.tech-logo { font-size: 32px; margin-bottom: 12px; }
.tech-item h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tech-item p { font-size: 12px; color: var(--text-muted); }

/* ── Download ── */
.download {
  position: relative;
  padding: 120px 24px;
  text-align: center;
  overflow: hidden;
}
.download-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(116,143,252,0.12), rgba(204,93,232,0.06), transparent 70%);
  pointer-events: none;
}
.download-content { position: relative; z-index: 1; }
.download h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.download p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.download-actions { margin-bottom: 16px; }
.download-note { font-size: 12px; color: var(--text-muted); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}
.footer-logo-img { width: 24px; height: 24px; border-radius: 5px; }
.footer-sub { font-size: 13px; color: var(--text-muted); }
.footer-col h5 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.footer-bottom a { color: var(--accent); }

/* ── Scroll animations ── */
.feature-card, .stat, .tech-item, .comparison-table {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.feature-card.visible, .stat.visible, .tech-item.visible, .comparison-table.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-large { grid-column: span 2; grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .terminal-split { flex-direction: column; }
  .terminal-divider { width: auto; height: 1px; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-large { grid-column: span 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .nav-links { display: none; }
  .hero h1 { font-size: 2rem; }
  .hero-terminal { margin-top: 40px; }
}
