/* ====================================================
   NICE_SCAN — Landing Page Styles
   Graphite / Slate palette, terminal aesthetic
   ==================================================== */

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #161822;
  --bg-card: #1a1d2e;
  --bg-card-hover: #1f2340;
  --bg-terminal: #0a0c12;
  --border: #232740;
  --border-light: #2e3355;
  --text-primary: #e2e4f0;
  --text-secondary: #9498b8;
  --text-dim: #5c6080;
  --accent-cyan: #58d6e6;
  --accent-purple: #b484e6;
  --accent-green: #5ce6a0;
  --accent-orange: #e6a058;
  --accent-red: #e6586a;
  --accent-yellow: #e6d058;
  --gradient-hero: radial-gradient(ellipse at 50% 0%, rgba(88,214,230,0.06) 0%, transparent 60%),
                     radial-gradient(ellipse at 80% 20%, rgba(180,132,230,0.04) 0%, transparent 50%);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #7ae2f0; }

img { max-width: 100%; }
code { font-family: var(--font-mono); font-size: 0.875em; }
pre { font-family: var(--font-mono); }

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,17,23,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.logo-bracket { color: var(--accent-cyan); }
.logo-name { color: var(--text-primary); letter-spacing: -0.5px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-gh {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.nav-gh:hover { border-color: var(--accent-cyan); }

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

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88,214,230,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,214,230,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 70%);
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(88,214,230,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 28px;
  background: rgba(26,29,46,0.5);
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.hl-cyan { color: var(--accent-cyan); }
.hl-purple { color: var(--accent-purple); }
.hl-green { color: var(--accent-green); }

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text-primary); }

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: #7ae2f0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(88,214,230,0.2);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent-purple);
  background: rgba(180,132,230,0.08);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); }

/* ─── Terminal ─── */
.hero-terminal {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-terminal);
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  text-align: left;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot.red { background: #e6586a; }
.term-dot.yellow { background: #e6d058; }
.term-dot.green { background: #5ce6a0; }
.term-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.term-body {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  min-height: 260px;
}

.term-line { opacity: 0; animation: fadeIn 0.4s ease forwards; }
.term-line:nth-child(1) { animation-delay: 0.5s; }
.term-line:nth-child(2) { animation-delay: 1.5s; }
.term-line:nth-child(3) { animation-delay: 2.5s; }
.term-line:nth-child(4) { animation-delay: 3.5s; }
.term-line:nth-child(5) { animation-delay: 5s; }
.term-line:nth-child(6) { animation-delay: 6s; }
.term-line:nth-child(7) { animation-delay: 7.5s; }

.term-spawn { padding-left: 20px; }

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-cyan);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

.t-cyan { color: var(--accent-cyan); }
.t-green { color: var(--accent-green); }
.t-purple { color: var(--accent-purple); }
.t-red { color: var(--accent-red); }
.t-yellow { color: var(--accent-yellow); }
.t-orange { color: var(--accent-orange); }
.t-gray { color: var(--text-dim); }
.t-dim { color: var(--text-dim); font-size: 0.78rem; }
.t-bold { font-weight: 700; color: var(--accent-cyan); }

/* ─── Sections ─── */
.section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-alt { background: var(--bg-secondary); }
.section-alt { max-width: none; padding-left: 0; padding-right: 0; }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.section-alt .section-header { padding-left: 0; padding-right: 0; }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}
.section-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ─── Features Grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 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 {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.fc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.fc-brain { background: rgba(88,214,230,0.1); color: var(--accent-cyan); }
.fc-chain { background: rgba(180,132,230,0.1); color: var(--accent-purple); }
.fc-data { background: rgba(92,230,160,0.1); color: var(--accent-green); }
.fc-report { background: rgba(230,160,88,0.1); color: var(--accent-orange); }
.fc-shield { background: rgba(230,88,106,0.1); color: var(--accent-red); }
.fc-cmd { background: rgba(230,208,88,0.1); color: var(--accent-yellow); }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.feature-card code {
  color: var(--accent-cyan);
  font-size: 0.85em;
  background: rgba(88,214,230,0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ─── Stats ─── */
.section-stats {
  padding: 80px 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── Install ─── */
.install-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}
.install-card:hover { border-color: var(--border-light); }
.install-card.active {
  border-color: var(--accent-cyan);
  background: rgba(88,214,230,0.04);
}
.ic-icon { font-size: 2rem; margin-bottom: 12px; }
.install-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.ic-desc { font-size: 0.8rem; color: var(--text-dim); }

.install-code {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.code-tab {
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.code-tab:hover { color: var(--text-secondary); }
.code-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.code-block {
  padding: 0;
}
.code-block.hidden { display: none; }

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}
.c-comment { color: var(--text-dim); font-style: italic; }

.copy-btn {
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(88,214,230,0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(88,214,230,0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover {
  background: rgba(88,214,230,0.2);
}

/* ─── Usage ─── */
.usage-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.usage-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.us-num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 48px;
  padding-top: 2px;
}

.us-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.us-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.us-code {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
}
.us-code pre {
  flex: 1;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  overflow-x: auto;
}
.us-code pre code { color: inherit; }

/* ─── Report Preview ─── */
.section-report-preview {
  padding-bottom: 120px;
}

.report-preview {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,0.3);
}

.rp-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.rp-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 8px;
}
.rp-icon { color: var(--accent-cyan); }
.rp-badge {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(230,88,106,0.1);
  color: var(--accent-red);
  border: 1px solid rgba(230,88,106,0.2);
}

.rp-meta {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.rp-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.rp-col {
  padding: 20px 24px;
}
.rp-col:first-child { border-right: 1px solid var(--border); }

.rp-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.rp-finding {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.rp-finding:last-child { border-bottom: none; }

.rp-sev {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 20px;
}
.rp-finding.critical .rp-sev { color: var(--accent-red); }
.rp-finding.high .rp-sev { color: var(--accent-orange); }
.rp-finding.medium .rp-sev { color: var(--accent-yellow); }

.rp-fname { font-size: 0.85rem; font-weight: 500; }
.rp-fdesc { font-size: 0.78rem; color: var(--text-dim); }

.rp-datum {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.rp-datum:last-child { border-bottom: none; }
.rp-dlabel { color: var(--text-secondary); }
.rp-dval { font-family: var(--font-mono); color: var(--accent-green); }

/* ─── Trust ─── */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.tc-icon { font-size: 2rem; margin-bottom: 16px; }
.trust-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.trust-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
.trust-card pre {
  background: var(--bg-terminal);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  overflow-x: auto;
  border: 1px solid var(--border);
}

.trust-cta {
  text-align: center;
  padding: 40px 0;
}
.trust-cta p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 60px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col a, .footer-col span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--accent-green);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Animations ─── */
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes blink {
  50% { opacity: 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: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }
  .nav-toggle { display: flex; }

  .hero-title { font-size: 2.4rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }

  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .install-grid { grid-template-columns: repeat(2, 1fr); }

  .rp-body { grid-template-columns: 1fr; }
  .rp-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .usage-step { flex-direction: column; gap: 12px; }
  .us-num { min-width: auto; }
}

@media (max-width: 480px) {
  .install-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 2.2rem; }
}
