/* ═══════════════════════════════════════════════════════════
   Vibe Code Wiki — Style System
   Electric purple / developer aesthetic
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #07070a;
  --bg-card:   #0d0d12;
  --bg-alt:    #0a0a10;
  --surface:   rgba(255,255,255,0.03);
  --border:    rgba(255,255,255,0.06);
  --text:      #e0e0e0;
  --text-dim:  #888;
  --text-muted:#555;
  --accent:    #7c3aed;
  --accent-glow: rgba(124,58,237,0.15);
  --cyan:      #06b6d4;
  --green:     #22c55e;
  --orange:    #f59e0b;
  --radius:    12px;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #a78bfa; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

/* ─── Nav ───────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(7,7,10,0.85);
  -webkit-backdrop-filter: blur(20px); 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: 8px; text-decoration: none; }
.logo-icon { font-size: 22px; }
.logo-text { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; }
.nav-link { color: var(--text-dim); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 1px; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.glow {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4;
  animation: glow-drift 12s ease-in-out infinite alternate;
}
.glow-1 { width: 500px; height: 500px; background: var(--accent); top: -100px; left: -100px; opacity: 0.12; }
.glow-2 { width: 400px; height: 400px; background: var(--cyan); bottom: -80px; right: -80px; opacity: 0.08; animation-delay: -6s; }
@keyframes glow-drift { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,20px) scale(1.1); } }

.code-rain {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0.06;
}
.rain-char {
  position: absolute; font-family: var(--mono); font-size: 14px; color: var(--accent);
  animation: fall linear infinite;
}
@keyframes fall { from { transform: translateY(-20px); opacity: 1; } to { transform: translateY(100vh); opacity: 0; } }

.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 16px; font-size: 12px;
  font-weight: 600; color: var(--text-dim);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 28px;
}
.badge-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-title {
  font-size: clamp(42px,7vw,72px); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.03em; color: #fff; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 17px; color: var(--text-dim); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }

.hero-stats { display: flex; align-items: center; justify-content: center; gap: 32px; margin-bottom: 40px; }
.stat-num { display: block; font-size: 28px; font-weight: 700; color: #fff; font-family: var(--mono); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-cta { display: flex; gap: 16px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; padding: 12px 28px;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.25s ease;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.3);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.4); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); }

/* ─── Sections ──────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-card); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 12px; }
.section-title { font-size: clamp(28px,4vw,40px); font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-subtitle { font-size: 16px; color: var(--text-dim); max-width: 520px; margin: 0 auto; }

/* ─── Concept Cards ─────────────────────────────────────── */
.concepts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px;
}
.concept-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.concept-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.concept-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.05));
  border-color: rgba(124,58,237,0.15);
}
.card-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.15);
  padding: 3px 10px; border-radius: 100px; margin-bottom: 14px;
}
.concept-card h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.concept-card p { font-size: 14px; color: var(--text-dim); line-height: 1.65; margin-bottom: 14px; }
.card-example {
  display: block; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; font-family: var(--mono);
  font-size: 12px; color: var(--cyan); line-height: 1.6; margin-bottom: 14px;
}
.card-link { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; gap: 4px; transition: gap 0.2s; }
.card-link:hover { gap: 8px; }

/* ─── Tool Cards ────────────────────────────────────────── */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.tool-card {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.tool-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.tool-tier {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; font-family: var(--mono);
}
.tier-s { background: rgba(124,58,237,0.15); color: var(--accent); border: 1px solid rgba(124,58,237,0.3); }
.tier-a { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.tier-b { background: rgba(245,158,11,0.1); color: var(--orange); border: 1px solid rgba(245,158,11,0.2); }
.tool-card h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 8px; padding-right: 40px; }
.tool-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 12px; }
.tool-type {
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ─── Techniques ────────────────────────────────────────── */
.techniques-list {
  max-width: 800px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}
.technique {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.technique:hover { border-color: rgba(255,255,255,0.1); transform: translateX(4px); }
.technique-num {
  font-family: var(--mono); font-size: 28px; font-weight: 700;
  color: rgba(124,58,237,0.3); flex-shrink: 0; min-width: 48px;
}
.technique-content { flex: 1; }
.technique-content h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.technique-content p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.technique-difficulty {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 4px 10px; border-radius: 100px;
  flex-shrink: 0; white-space: nowrap;
}
.beginner { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.intermediate { background: rgba(245,158,11,0.1); color: var(--orange); border: 1px solid rgba(245,158,11,0.2); }
.advanced { background: rgba(124,58,237,0.1); color: var(--accent); border: 1px solid rgba(124,58,237,0.2); }

/* ─── About ─────────────────────────────────────────────── */
.about-block { max-width: 700px; margin: 0 auto; text-align: center; }
.about-block h2 { font-size: clamp(28px,4vw,36px); font-weight: 800; color: #fff; margin-bottom: 20px; }
.about-block p { font-size: 15px; color: var(--text-dim); line-height: 1.7; margin-bottom: 16px; }
.about-cta { margin-top: 32px; }

/* ─── Footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.footer-tagline { width: 100%; font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13px; color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; color: var(--text-muted); }
.footer-copy a { color: var(--accent); }

/* ─── Article Pages ─────────────────────────────────────── */
.article-page { padding: 120px 0 80px; }
.container-narrow { max-width: 780px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-dim); margin-bottom: 32px; transition: color 0.2s, gap 0.2s; }
.back-link:hover { color: var(--accent); gap: 8px; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.article-id { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.article-page h1 { font-size: clamp(32px,5vw,48px); font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.1; }
.article-lead { font-size: 17px; color: var(--text-dim); line-height: 1.7; margin-bottom: 32px; }
.article-page hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.article-page h2 { font-size: 24px; font-weight: 700; color: #fff; margin: 40px 0 16px; }
.article-page h3 { font-size: 18px; font-weight: 600; color: #fff; margin: 28px 0 12px; }
.article-page h4 { font-size: 15px; font-weight: 600; color: #fff; margin: 20px 0 8px; }
.article-page p { font-size: 15px; color: var(--text); line-height: 1.75; margin-bottom: 16px; }
.article-page ul, .article-page ol { padding-left: 24px; margin-bottom: 16px; }
.article-page li { font-size: 15px; color: var(--text); line-height: 1.75; margin-bottom: 8px; }
.article-page blockquote { border-left: 3px solid var(--accent); padding: 16px 20px; margin: 24px 0; background: rgba(124,58,237,0.05); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--text-dim); }
.article-page pre { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; overflow-x: auto; margin: 20px 0; }
.article-page pre code { font-family: var(--mono); font-size: 13px; color: var(--cyan); line-height: 1.6; }
.article-page code { font-family: var(--mono); font-size: 13px; color: var(--cyan); background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; }
.article-page pre code { background: none; padding: 0; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 20px 0; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color 0.3s; }
.info-card:hover { border-color: rgba(255,255,255,0.1); }
.info-card h4 { font-size: 14px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.info-card p { font-size: 13px; color: var(--text-dim); margin: 0; line-height: 1.6; }

.cta-box { margin: 48px 0 0; padding: 32px; background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.05)); border: 1px solid rgba(124,58,237,0.15); border-radius: var(--radius); text-align: center; }
.cta-box h3 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.cta-box p { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; }

/* ─── Scroll Reveal ─────────────────────────────────────── */
.revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* ─── Mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: rgba(7,7,10,0.95);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    padding: 16px 24px; gap: 12px; border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: flex; }
  .hero { padding: 100px 20px 60px; min-height: auto; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .stat-divider { width: 40px; height: 1px; }
  .hero-cta { flex-direction: column; }
  .concepts-grid { grid-template-columns: 1fr; }
  .concept-card.featured { grid-column: 1; }
  .tools-grid { grid-template-columns: 1fr; }
  .technique { flex-direction: column; align-items: flex-start; gap: 12px; }
  .technique-num { font-size: 20px; }
  .section { padding: 60px 0; }
}

/* ─── Content Gating System ─────────────────────────────── */
.gated {
  position: relative;
  overflow: hidden;
  max-height: 250px;
  margin-bottom: 2rem;
  transition: max-height 0.4s ease-in-out;
}

.gated.unlocked {
  max-height: 9999px;
  overflow: visible;
}

.gate-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(7,7,10,0) 0%, rgba(7,7,10,0.95) 40%, var(--bg) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  z-index: 10;
}

.gate-modal {
  background: var(--bg-card);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 40px rgba(124,58,237,0.1);
  position: relative;
  transform: translateY(20px);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  to { transform: translateY(0); }
}

.gate-icon {
  font-size: 32px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(124,58,237,0.4));
}

.gate-modal h3 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.2;
}

.gate-modal p {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0 0 24px;
  line-height: 1.6;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.gate-form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.gate-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.gate-btn {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}

.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124,58,237,0.5);
}

.gate-disclaimer {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gate-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 24px !important;
  text-align: left;
}

.gate-features li {
  font-size: 14px !important;
  color: var(--text) !important;
  margin-bottom: 10px !important;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.gate-login-prompt {
  font-size: 13px !important;
  margin: 16px 0 0 !important;
  color: var(--text-muted) !important;
}

.gate-login-prompt a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
