/* ============================================================
   SUPERPLAN — OpenClaw-inspired minimal design
   ============================================================ */

/* ── Tokens ── */
:root {
  --bg:          #0c0c0c;
  --bg-subtle:   #111111;
  --bg-raised:   #161616;
  --border:      #222222;
  --border-subtle: #1a1a1a;
  --text:        #ededed;
  --text-muted:  #888888;
  --text-dim:    #555555;
  --accent:      #fa4c0b;
  --accent-dim:  rgba(250, 76, 11, 0.12);
  --green:       #3dd68c;
  --red:         #ff5f57;
  --yellow:      #febc2e;
  --mono:        'JetBrains Mono', 'Fira Mono', monospace;
  --sans:        'Inter', system-ui, sans-serif;
  --radius:      6px;
  --radius-sm:   4px;
  --max-w:       860px;
  --nav-h:       52px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  color: var(--accent);
}

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav.scrolled {
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.logo-icon { color: var(--accent); flex-shrink: 0; }
.logo-text  { letter-spacing: -0.2px; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
}
.nav-toggle span {
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  transition: background 0.15s, border-color 0.15s;
}
.nav-cta:hover {
  background: #1e1e1e;
  border-color: #333;
}

.nav-cta-accent {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 6px 14px;
  transition: transform 0.15s, filter 0.15s;
}
.nav-cta-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ── HERO ── */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 96px;
}
.hero-container { text-align: center; }

.hero-title {
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.08;
  margin-bottom: 24px;
  color: var(--text);
}
.accent { color: var(--accent); }

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Install block ── */
.install-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px 16px;
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: left;
}
.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.tab-btn {
  background: transparent;
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.tab-btn:hover  { color: var(--text-muted); }
.tab-btn.active { color: var(--text); background: var(--bg-raised); }

.install-panel { display: none; }
.install-panel.active { display: block; }

.code-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  overflow: hidden;
}
.code-prompt {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.code-block code {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 3px;
  transition: color 0.15s;
}
.copy-btn:hover { color: var(--text-muted); }
.copy-btn-sm {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 1px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  transition: color 0.15s;
}
.copy-btn-sm:hover { color: var(--text-muted); }

.install-then {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.code-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}
.code-inline code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--accent);
}

/* ── Hero actions ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-ghost {
  font-size: 14px;
  color: var(--text-muted);
  padding: 10px 14px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.btn-outline:hover { border-color: #444; }
.btn-large { padding: 12px 24px; font-size: 15px; }

/* ── Hero stats ── */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}
.stat { text-align: center; }
.stat-num   { display: block; font-size: 18px; font-weight: 600; color: var(--text); }
.stat-label { display: block; font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* ── Section common ── */
section { padding: 80px 0; }
.section-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 40px;
  color: var(--text);
}
.section-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
  margin-top: -28px;
}

/* ── What it does — feature list ── */
.what-section { border-top: 1px solid var(--border-subtle); }
.feature-list { display: flex; flex-direction: column; }
.feature-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}
.feature-row:first-child { border-top: 1px solid var(--border-subtle); }
.feature-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding-top: 1px;
}
.feature-row-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Steps / How it works ── */
.steps-section { border-top: 1px solid var(--border-subtle); }
.steps-flow { display: flex; flex-direction: column; }
.step-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 32px 0;
}
.step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  padding-top: 4px;
}
.step-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.step-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}
.step-code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
}
.code-dim       { color: var(--text-dim); }
.code-highlight { color: var(--accent); }
.step-connector {
  height: 1px;
  background: var(--border-subtle);
  margin-left: 76px;
}

/* ── Testimonials ── */
.testimonials-section { border-top: 1px solid var(--border-subtle); }
.testimonials-grid {
  columns: 2;
  column-gap: 32px;
}
.tq {
  break-inside: avoid;
  margin-bottom: 28px;
}
.tq p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 6px;
}
.tq-handle {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ── Comparison ── */
.comparison-section { border-top: 1px solid var(--border-subtle); }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.comparison-table thead tr {
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.col-superplan { color: var(--accent) !important; }
.comparison-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
}
.comparison-table tbody tr:hover { background: var(--bg-subtle); }
.comparison-table td { padding: 12px 16px; vertical-align: middle; }
.feature-name { font-weight: 500; color: var(--text); font-size: 13px; }
.cell-yes     { color: var(--green); font-size: 13px; }
.cell-no      { color: var(--text-dim); font-size: 13px; }
.cell-partial { color: var(--text-dim); font-size: 13px; }
.check   { margin-right: 5px; }
.cross   { margin-right: 5px; color: #444; }
.partial { margin-right: 5px; }

/* ── Quick Start Terminal ── */
.quickstart-section { border-top: 1px solid var(--border-subtle); }
.terminal-window {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 640px;
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.terminal-dots { display: flex; gap: 6px; }
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-red    { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green  { background: var(--green); }
.terminal-title {
  font-size: 12px;
  color: var(--text-dim);
  flex: 1;
  text-align: center;
}
.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}
.terminal-line { display: flex; gap: 8px; }
.t-cmd {
  min-width: 0;
  white-space: nowrap;
}
.t-prompt { color: var(--accent); }
.t-cmd    { color: var(--text); }
.t-output { color: var(--text-muted); margin-left: 16px; }
.t-success { color: var(--green); }
.t-blank  { margin: 4px 0; }
.t-key    { color: var(--accent); }
.t-colon  { color: var(--text-dim); }
.t-val    { color: var(--green); }
.t-cursor {
  color: var(--text);
  animation: blink 1s step-end infinite;
  margin-left: 16px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── CTA ── */
.cta-section {
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.cta-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}
.cta-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-muted); }
.footer-bottom {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  :root {
    --nav-h: 68px;
  }
  section { padding: 64px 0; }
  .container,
  .nav-inner { padding: 0 18px; }
  .nav { height: var(--nav-h); }
  .nav-inner {
    position: relative;
    gap: 12px;
  }
  .nav-toggle { display: inline-flex; }
  .nav-right {
    position: absolute;
    top: calc(100% + 12px);
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    background: rgba(17, 17, 17, 0.98);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  }
  .nav.menu-open .nav-right { display: flex; }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-links a,
  .nav-cta,
  .nav-cta-accent {
    width: 100%;
    justify-content: center;
  }
  .hero {
    padding-top: calc(var(--nav-h) + 42px);
    padding-bottom: 72px;
  }
  .hero-title {
    font-size: clamp(34px, 13vw, 52px);
    letter-spacing: -1px;
  }
  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 32px;
  }
  .install-block {
    padding: 18px 16px 14px;
  }
  .tab-btn {
    flex: 1 1 100%;
    text-align: center;
  }
  .code-block {
    align-items: flex-start;
    padding: 12px;
  }
  .code-block code {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .install-then {
    gap: 10px 8px;
  }
  .code-inline {
    width: 100%;
    justify-content: space-between;
  }
  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary,
  .btn-outline,
  .btn-ghost {
    justify-content: center;
    width: 100%;
  }
  .hero-stats {
    gap: 14px;
  }
  .stat {
    min-width: calc(50% - 14px);
  }
  .stat-divider { display: none; }
  .feature-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .feature-row-label { color: var(--accent); }
  .step-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 24px 0;
  }
  .step-num { padding-top: 0; }
  .step-connector { margin-left: 0; }
  .testimonials-grid { columns: 1; }
  .comparison-table {
    min-width: 620px;
    font-size: 12px;
  }
  .comparison-table th,
  .comparison-table td { padding: 10px 10px; }
  .terminal-window { max-width: 100%; }
  .terminal-body {
    padding: 16px;
    font-size: 12px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 18px;
  }
  .stat { min-width: 100%; }
  .install-tabs {
    padding-bottom: 10px;
  }
  .section-title,
  .cta-title {
    margin-bottom: 28px;
  }
}
