/* ============================================
   NodePad — Design Tokens
   ============================================ */
:root {
  --bg: #060b14;
  --bg-elevated: #0c1220;
  --surface: rgba(15, 22, 40, 0.85);
  --surface-2: rgba(21, 29, 52, 0.85);
  --border: #1e2a48;
  --border-soft: #161f36;

  --text: #e8edf8;
  --text-muted: #8690b0;
  --text-faint: #545e7e;

  --accent: #4f8dfd;
  --accent-soft: rgba(79, 141, 253, 0.12);
  --accent-2: #2dd4a7;
  --accent-2-soft: rgba(45, 212, 167, 0.12);
  --pcb-green: #1a6b3c;
  --pcb-green-soft: rgba(26, 107, 60, 0.15);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(0,0,0,0.6);
  --maxw: 1160px;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #04101f; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04101f; box-shadow: 0 8px 24px -8px rgba(79,141,253,0.55); }
.btn-primary:hover { background: #6b9fff; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { border: 1px solid var(--border); color: var(--text); width: 100%; margin-top: auto; }
.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn-block { width: 100%; }

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.3s ease;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.brand-mark { color: var(--accent-2); font-size: 1.2rem; }
.brand-underscore { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 0.92rem; color: var(--text-muted); transition: color 0.15s ease; }
.main-nav a:hover { color: var(--text); }

.nav-cta {
  color: var(--bg) !important;
  background: var(--accent-2);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-display);
}
.nav-cta:hover { background: #45e0b8; }

.header-right { display: flex; align-items: center; gap: 16px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ffbd2e;
  box-shadow: 0 0 0 0 rgba(255,189,46,0.6);
  animation: pulse-dot 2.2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255,189,46,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255,189,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,189,46,0); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 140px 0 96px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: visible;
  background: transparent;
}
.hero-3d-canvas {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
}
.hero-3d-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(6,11,20,0.7) 0%, rgba(6,11,20,0.3) 50%, rgba(6,11,20,0.1) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow, .section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-bottom: 14px;
  display: block;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 28px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--text); }
.stat-label { font-size: 0.78rem; color: var(--text-faint); }

/* Terminal */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.terminal-title { margin-left: 8px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }
.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
  padding: 20px 20px 26px;
  min-height: 260px;
  color: #c6cde3;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .line-prompt { color: var(--accent-2); }
.terminal-body .line-ok { color: var(--accent-2); }
.terminal-body .line-muted { color: var(--text-faint); }
.terminal-body .line-accent { color: var(--accent); }
.terminal-cursor {
  display: inline-block; width: 7px; height: 1em; background: var(--accent);
  vertical-align: text-bottom; margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================
   Scroll Cue
   ============================================ */
.scroll-cue {
  padding: 24px 0 48px;
  text-align: center;
  background: transparent;
  position: relative;
  z-index: 2;
}
.scroll-cue-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  animation: float-down 2s ease-in-out infinite;
}
@keyframes float-down {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ============================================
   Section shells
   ============================================ */
.section {
  padding: 96px 0;
  background: rgba(6, 11, 20, 0.75);
  position: relative;
  z-index: 2;
}
.section--alt {
  background: rgba(12, 18, 32, 0.78);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section-title { font-size: clamp(1.8rem, 3vw, 2.3rem); letter-spacing: -0.01em; margin-bottom: 14px; max-width: 20ch; }
.section-sub { color: var(--text-muted); max-width: 56ch; font-size: 1.02rem; margin-bottom: 48px; }

/* ============================================
   Features
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover { border-color: var(--accent-soft); transform: translateY(-2px); }
.feature-icon { font-size: 1.6rem; display: block; margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 0.92rem; }

/* ============================================
   Comparison Table
   ============================================ */
.comparison-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.comparison-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-2);
}
.comparison-table td { color: var(--text-muted); }
.comparison-table td strong { color: var(--text); }
.col-highlight {
  background: rgba(79, 141, 253, 0.04);
  color: var(--accent) !important;
}
.col-highlight strong { color: var(--accent-2) !important; }

/* ============================================
   Variants
   ============================================ */
.variants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.variant-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.variant-card:hover { border-color: var(--accent-soft); transform: translateY(-3px); }
.variant-card--popular { border-color: var(--accent); background: linear-gradient(180deg, rgba(79,141,253,0.07), var(--surface) 40%); }
.variant-badge {
  position: absolute; top: -12px; left: 28px;
  background: var(--accent); color: #04101f;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.variant-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.variant-header h3 { font-size: 1.3rem; }
.variant-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  border: 1px solid var(--accent-2-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
.variant-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.variant-specs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.variant-specs li {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted);
  padding-left: 16px; position: relative;
}
.variant-specs li::before { content: '›'; position: absolute; left: 0; color: var(--accent-2); }
.variant-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 20px; }
.variant-pricing { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }
.variant-price-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.variant-price-row:last-child { border-bottom: none; }
.variant-price-label { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }
.variant-price-row .price-amount { font-size: 1.1rem; }
.variant-price-row--highlight { background: rgba(79, 141, 253, 0.06); padding: 8px 10px; border-radius: 6px; border-bottom: none; }
.variant-price-row--highlight .variant-price-label { color: var(--accent); font-weight: 600; }
.variant-price-row--highlight .price-amount { color: var(--accent-2); font-size: 1.2rem; }
.price-amount { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.price-period { color: var(--text-faint); font-size: 0.85rem; }

/* ============================================
   Pricing Cards
   ============================================ */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
}
.pricing-card--highlight {
  border-color: var(--accent-2);
  background: linear-gradient(180deg, rgba(45,212,167,0.05), var(--surface) 40%);
}
.pricing-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.pricing-subtitle { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 24px; }
.pricing-breakdown { display: flex; flex-direction: column; gap: 0; }
.pricing-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.pricing-row--total { border-bottom: none; padding-top: 12px; }
.pricing-row--total span { color: var(--text); font-weight: 600; }
.pricing-row--final { font-size: 1rem; }
.pricing-row--final span:last-child { color: var(--accent-2); font-size: 1.1rem; }
.pricing-sell {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.pricing-sell strong { color: var(--accent-2); }

/* ============================================
   Roadmap
   ============================================ */
.roadmap-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.roadmap-grid::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--border);
}
.roadmap-item {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  align-items: flex-start;
}
.roadmap-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  flex: none;
  position: relative;
  z-index: 1;
}
.roadmap-item--done .roadmap-dot {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.roadmap-item--done .roadmap-dot::after {
  content: '✓';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #04101f;
  font-size: 0.7rem;
  font-weight: 700;
}
.roadmap-item--next .roadmap-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.roadmap-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.roadmap-item p { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================
   FAQ Accordion
   ============================================ */
.accordion-item { border-bottom: 1px solid var(--border-soft); }
.accordion-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}
.accordion-icon {
  font-family: var(--font-mono);
  color: var(--accent);
  transition: transform 0.2s ease;
  flex: none;
  margin-left: 16px;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.accordion-panel p {
  color: var(--text-muted);
  padding: 0 4px 22px;
  font-size: 0.94rem;
  max-width: 65ch;
}

/* ============================================
   CTA / Contact
   ============================================ */
.section--cta { padding-bottom: 110px; }
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
}
.cta-box--centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-box--centered .section-title { max-width: none; }
.cta-box--centered .section-sub { max-width: 50ch; margin-bottom: 32px; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.copy-status { font-family: var(--font-mono); font-size: 0.88rem; color: var(--accent-2); min-height: 1.2em; margin-top: 12px; }

/* ============================================
   Footer
   ============================================ */
.site-footer { border-top: 1px solid var(--border-soft); padding: 64px 0 0; background: rgba(12, 18, 32, 0.82); position: relative; z-index: 2; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin: 16px 0 0; max-width: 32ch; }
.footer-col h4 { font-size: 0.85rem; color: var(--text-faint); font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.92rem; margin-bottom: 12px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--accent-2); }
.footer-author { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 12px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* Back to top */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #04101f;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(79,141,253,0.6);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Toast notification */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text);
  font-family: var(--font-mono); font-size: 0.88rem;
  padding: 14px 24px;
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
  white-space: nowrap;
}
.toast.is-visible {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}

/* Inline email select */
.email-select {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-2);
  background: var(--bg-elevated);
  padding: 16px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
  word-break: break-all;
  margin-bottom: 8px;
}
.copy-hint { color: var(--text-faint); font-size: 0.8rem; }

/* ============================================
   Scroll reveal animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero { padding-top: 120px; min-height: auto; }
  .hero-overlay { background: linear-gradient(180deg, rgba(6,11,20,0.95) 0%, rgba(6,11,20,0.7) 100%); }
  .variants-grid { grid-template-columns: 1fr; }
  .pricing-cards { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-box { padding: 40px 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .header-right .status-pill { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .comparison-table { font-size: 0.82rem; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
}
