/* ─── nestor.sh — Main Stylesheet ──────────────────────────────── */

/* ─── Reset & Custom Properties ────────────────────────────────── */

:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --fg: #ffffff;
  --fg-dim: #a1a1aa;
  --fg-muted: #71717a;
  --accent: #00ff88;
  --accent-dim: #00cc6a;
  --accent-glow: rgba(0, 255, 136, 0.1);
  --accent-glow-strong: rgba(0, 255, 136, 0.2);
  --surface: #161616;
  --surface-hover: #1c1c1c;
  --border: #222222;
  --border-light: #333333;
  --green: #00ff88;
  --green-dim: #00cc6a;
  --red: #ff4444;
  --yellow: #ffcc00;
  --cyan: #00ccff;
  --purple: #a855f7;
  --font-mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dim); }
code, pre { font-family: var(--font-mono); }

/* ─── Layout ───────────────────────────────────────────────────── */

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

section { padding: 100px 0; }

.section-subtitle {
  text-align: center;
  color: var(--fg-dim);
  font-size: 17px;
  margin-top: -8px;
  margin-bottom: 56px;
}

/* ─── Navigation ───────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.05em;
}

.nav-brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--fg-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  padding: 7px 16px !important;
  background: var(--accent);
  color: var(--bg) !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: var(--accent-dim) !important;
  color: var(--bg) !important;
  transform: translateY(-1px);
}

.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(--fg-dim);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── Hero ─────────────────────────────────────────────────────── */

.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 32px;
  background: rgba(0, 255, 136, 0.05);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-logo {
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-logo pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.15;
  color: var(--accent);
  display: inline-block;
  text-align: left;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.4s forwards;
}

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

.hero .tagline {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--fg-dim);
  max-width: 680px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.55s forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.7s forwards;
}

/* ─── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-dim); color: var(--bg); transform: translateY(-2px); box-shadow: 0 4px 20px var(--accent-glow-strong); }

.btn-outline { background: transparent; color: var(--fg); border: 1px solid var(--border-light); }
.btn-outline:hover { background: var(--surface); color: var(--fg); border-color: var(--fg-muted); transform: translateY(-2px); }

/* ─── Install Command ──────────────────────────────────────────── */

.install-cmd {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 15px;
}

.install-cmd .prompt { color: var(--accent); user-select: none; }
.install-cmd code { color: var(--fg); }

.install-cmd .copy-btn,
.copy-btn {
  background: var(--border);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--fg-dim);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.copy-btn:hover { background: var(--border-light); color: var(--fg); }
.copy-btn.copied { background: var(--green-dim); color: var(--bg); }

/* ─── Problem / Solution ───────────────────────────────────────── */

.problem-solution { background: var(--bg-alt); padding: 80px 0; }

.ps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.ps-card {
  flex: 1;
  min-width: 280px;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.ps-icon { font-size: 32px; margin-bottom: 12px; }

.ps-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ps-card p {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.7;
}

.ps-problem { border-color: rgba(255, 68, 68, 0.3); }
.ps-solution { border-color: rgba(0, 255, 136, 0.3); }

.ps-arrow {
  font-size: 32px;
  color: var(--fg-muted);
}

/* ─── Features Grid ────────────────────────────────────────────── */

.features h2,
.how-it-works h2,
.architecture h2,
.comparison h2,
.getting-started h2 {
  text-align: center;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-icon-wrap { margin-bottom: 14px; }
.feature-icon { font-size: 28px; }

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

.feature-card p {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.7;
  margin-bottom: 14px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 100px;
  padding: 3px 10px;
}

/* ─── How It Works ─────────────────────────────────────────────── */

.how-it-works { background: var(--bg-alt); }

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 20px;
}

.step-connector {
  width: 60px;
  min-width: 60px;
  height: 2px;
  background: var(--border-light);
  margin-top: 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.step-code {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 16px;
}

.step-code code {
  font-size: 13px;
  color: var(--fg);
}

.c-prompt { color: var(--accent); }

/* ─── Architecture ─────────────────────────────────────────────── */

.architecture h2 { margin-bottom: 16px; }

.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow-x: auto;
  max-width: 740px;
  margin: 0 auto;
}

.arch-diagram pre {
  font-size: 12px;
  line-height: 1.35;
  color: var(--fg-dim);
  white-space: pre;
}

.arch-cli { color: var(--accent); }
.arch-server { color: var(--cyan); }
.arch-packages { color: var(--purple); }
.arch-core { color: var(--yellow); }
.arch-docker { color: var(--fg-muted); }

/* ─── Comparison Table ─────────────────────────────────────────── */

.comparison { background: var(--bg-alt); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: var(--surface);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
}

.compare-table th.highlight {
  color: var(--accent);
  background: rgba(0, 255, 136, 0.05);
}

.compare-table td.highlight {
  background: rgba(0, 255, 136, 0.03);
}

.compare-table tbody tr:hover {
  background: var(--surface-hover);
}

.compare-table tbody tr:last-child td { border-bottom: none; }

.yes { color: var(--green); font-weight: 600; }
.no { color: var(--fg-muted); }
.partial { color: var(--yellow); }
.check { color: var(--accent); font-weight: 600; }

/* ─── Getting Started Code Block ───────────────────────────────── */

.getting-started { padding-bottom: 120px; }

.code-block {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-title {
  font-size: 12px;
  color: var(--fg-muted);
  margin-left: 8px;
  font-weight: 500;
}

.code-body {
  padding: 24px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
  overflow-x: auto;
}

.c-comment { color: var(--fg-muted); }
.c-output { color: var(--fg-dim); }

/* ─── Footer ───────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.05em;
}

.footer-logo span { color: var(--accent); }

.footer-brand p {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 8px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: var(--fg-muted);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--fg-muted);
  font-size: 13px;
}

/* ─── Animations ───────────────────────────────────────────────── */

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav .container.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  section { padding: 60px 0; }
  .hero { padding: 120px 0 60px; }
  .hero-logo pre { font-size: 8px; }
  .ps-arrow { display: none; }
  .ps-grid { flex-direction: column; }
  .ps-card { max-width: 100%; }

  .steps { flex-direction: column; align-items: center; gap: 24px; }
  .step-connector { width: 2px; height: 32px; min-width: 2px; margin-top: 0; }

  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .hero-logo pre { font-size: 6px; }
  .hero-actions { flex-direction: column; }
  .install-cmd { width: 100%; justify-content: center; }
  .btn { width: 100%; justify-content: center; }
}
