/* ============================================================
   JS FRAMEWORK GENERATOR — Stylesheet
   Zero npm dependencies. This is the joke AND the point.
   ============================================================ */

:root {
  --bg:           #080c14;
  --bg-2:         #0d1422;
  --card:         #0f1829;
  --card-2:       #152035;
  --border:       #1e2d42;
  --border-2:     #2d4060;
  --text:         #e2e8f0;
  --muted:        #64748b;
  --faint:        #374151;
  --cyan:         #22d3ee;
  --cyan-dim:     rgba(34,211,238,0.12);
  --green:        #4ade80;
  --green-dim:    rgba(74,222,128,0.1);
  --red:          #f87171;
  --red-dim:      rgba(248,113,113,0.1);
  --yellow:       #fbbf24;
  --yellow-dim:   rgba(251,191,36,0.1);
  --purple:       #c084fc;
  --purple-dim:   rgba(192,132,252,0.1);
  --orange:       #fb923c;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:         'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
  --max-w:        900px;
  --radius:       10px;
  --radius-sm:    6px;
  --transition:   0.2s ease;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-logo span { color: var(--muted); }

.nav-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

/* ============================================================
   CODE SNIPPET
   ============================================================ */
.code-snippet {
  background: #020609;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.code-snippet .kw   { color: #c084fc; }
.code-snippet .str  { color: #4ade80; }
.code-snippet .cls  { color: #22d3ee; }
.code-snippet .attr { color: #fbbf24; }
.code-snippet .cmt  { color: var(--faint); font-style: italic; }

/* ============================================================
   FRAMEWORK GENERATOR — HERO
   ============================================================ */
.fw-hero {
  padding: 80px 24px 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.fw-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(251,191,36,0.2);
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.fw-new-badge .blink-dot {
  width: 6px; height: 6px;
  background: var(--yellow);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.fw-name {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 16px;
}

.fw-tagline {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 8px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.fw-version-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.fw-chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border-2);
  color: var(--muted);
}

.fw-chip.green  { border-color: rgba(74,222,128,0.3);  color: var(--green);  background: var(--green-dim);  }
.fw-chip.cyan   { border-color: rgba(34,211,238,0.3);  color: var(--cyan);   background: var(--cyan-dim);   }
.fw-chip.yellow { border-color: rgba(251,191,36,0.3);  color: var(--yellow); background: var(--yellow-dim); }

/* npm install block */
.npm-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #020609;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  margin: 8px 0 32px;
  cursor: pointer;
  transition: border-color var(--transition);
  position: relative;
}

.npm-block:hover { border-color: var(--border-2); }

.npm-block .npm-prompt { color: var(--green); }
.npm-block .npm-cmd    { color: var(--muted); }
.npm-block .npm-pkg    { color: var(--cyan); }

.npm-copy-hint {
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
  margin-bottom: 32px;
}

/* CTA buttons */
.fw-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-fw-primary {
  background: var(--cyan);
  color: #080c14;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.btn-fw-primary:hover { background: #67e8f9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(34,211,238,0.3); }

.btn-fw-outline {
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-2);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.btn-fw-outline:hover { border-color: var(--muted); background: var(--card-2); }

/* ─── Section wrapper ─────────────────────────────────── */
.fw-section {
  padding: 64px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.fw-section-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cyan);
  margin-bottom: 12px;
}

.fw-section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.fw-section-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

/* ─── Stats row ───────────────────────────────────────── */
.fw-stats-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
}

.fw-stat {
  flex: 1;
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.fw-stat:last-child { border-right: none; }

.fw-stat-val {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.fw-stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fw-stat-note {
  font-size: 10px;
  color: var(--faint);
  margin-top: 3px;
  font-family: var(--mono);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .fw-stats-row { flex-wrap: wrap; }
  .fw-stat { flex-basis: 50%; border-bottom: 1px solid var(--border); }
  .fw-stat:nth-child(2), .fw-stat:nth-child(4) { border-right: none; }
}

/* ─── Why / manifesto card ────────────────────────────── */
.why-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
}

.why-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.why-card p:last-child { margin-bottom: 0; }

/* ─── Warning / callout ───────────────────────────────── */
.fw-callout {
  background: var(--yellow-dim);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: #d4a017;
  line-height: 1.65;
  margin-top: 24px;
  font-family: var(--mono);
}

/* ─── Benchmark bars ──────────────────────────────────── */
.benchmark-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 600px) { .benchmark-grid { grid-template-columns: 1fr; } }

.bench-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.bench-metric { font-size: 13px; font-weight: 600; margin-bottom: 12px; }

.bench-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.bench-row:last-child { margin-bottom: 0; }

.bench-fw-name { width: 80px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-track   { flex: 1; height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bench-fill    { height: 100%; border-radius: 99px; }
.bench-fill.winner { background: var(--green); }
.bench-fill.loser  { background: var(--faint); }
.bench-val     { width: 52px; text-align: right; }
.bench-val.winner { color: var(--green); }

.bench-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-top: 16px;
  line-height: 1.7;
}

/* ─── Features grid ───────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 700px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: border-color var(--transition);
}

.feature-card:hover { border-color: var(--border-2); }

.feature-icon { font-size: 24px; margin-bottom: 8px; }
.feature-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.feature-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ─── Open source / community ─────────────────────────── */
.oss-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

@media (max-width: 600px) { .oss-grid { grid-template-columns: repeat(2, 1fr); } }

.oss-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
}

.oss-val {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.oss-val.cyan   { color: var(--cyan); }
.oss-val.yellow { color: var(--yellow); }
.oss-val.green  { color: var(--green); }
.oss-val.red    { color: var(--red); }

.oss-label { font-size: 12px; color: var(--muted); }
.oss-note  { font-size: 10px; color: var(--faint); margin-top: 2px; font-family: var(--mono); }

/* ─── Used by logos (fake) ────────────────────────────── */
.logos-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
}

.fake-logo {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--faint);
  letter-spacing: -0.3px;
}

/* ─── Fade animation for regeneration ────────────────── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

footer a { color: var(--muted); text-decoration: none; font-size: 13px; }
footer a:hover { color: var(--text); }

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  line-height: 1.8;
}

/* ============================================================
   UTIL
   ============================================================ */
.mono   { font-family: var(--mono); }
.muted  { color: var(--muted); }
.cyan   { color: var(--cyan); }
.green  { color: var(--green); }
.red    { color: var(--red); }
.yellow { color: var(--yellow); }
.purple { color: var(--purple); }

@media (max-width: 480px) {
  .nav-badge { display: none; }
}
