:root {
  --bg: #191127;
  --bg-card: #23133a;
  --bg-card-hover: #1f1232;
  --accent: #883CF0;
  --accent-dim: #7c3aed;
  --accent-glow: #7c5cfc1f;
  --accent-2: #6366f1;
  --accent-3: #f472b6;
  --text: #e2e8f0;
  --text-dim: #d6d6d6;
  --text-bright: #ffffff;
  --border: #3a1c63;
  --terminal-bg: #0f0818;
  --success: #22d3a7;
  --warning: #fbbf24;
  --error: #ef4444;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(131, 34, 211, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158, 34, 211, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: float 12s ease-in-out infinite;
}
.hero-orb.one { width: 500px; height: 500px; background: var(--accent); top: -10%; left: -5%; }
.hero-orb.two { width: 400px; height: 400px; background: var(--accent-2); bottom: -15%; right: -10%; animation-delay: -4s; }
.hero-orb.three { width: 300px; height: 300px; background: var(--accent-3); top: 30%; right: 20%; animation-delay: -8s; opacity: 0.15; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--accent-glow);
  border: 1px solid #3a1c63;
  border-radius: 50px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  animation: fadeUp 0.8s ease-out;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(143, 34, 211, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(149, 34, 211, 0); }
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease-out 0.1s both;
}

.hero h1 .green { color: var(--accent); }
.hero h1 .outline {
  -webkit-text-stroke: 2px var(--text-dim);
  color: transparent;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 560px;
  margin: 1.5rem auto 2.5rem;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 1;
  animation: fadeUp 0.8s ease-out 0.3s both;
}

.btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 30px rgba(134, 34, 211, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(117, 34, 211, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(16px);
  background: #180f26;
  border-bottom: 1px solid #3a1c63;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.nav.visible { transform: translateY(0); }

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-bright);
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* ── SECTIONS ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

.section h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-bright);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section .subtitle {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ── OS SELECTOR ── */
.os-selector {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.os-btn {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.os-btn.active {
  color: var(--accent);
  background: var(--accent-glow);
}
.os-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.os-btn:hover:not(.active) { color: var(--text); }

.os-icon { font-size: 1.2rem; }

/* ── TERMINAL ── */
.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.terminal:hover {
  border-color: #3a1c63;
  box-shadow: 0 0 40px rgba(34, 211, 167, 0.05);
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #3a1c6350;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #fbbf24; }
.terminal-dots span:nth-child(3) { background: #22c55e; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal-body .line {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 4px;
  opacity: 0;
  animation: termFadeIn 0.3s ease forwards;
}

.terminal-body .prompt {
  color: var(--accent);
  user-select: none;
  flex-shrink: 0;
}

.terminal-body .cmd { color: var(--text-bright); }
.terminal-body .comment { color: #4a5568; }
.terminal-body .output { color: var(--text-dim); padding-left: 1.5rem; }
.terminal-body .success { color: var(--success); }
.terminal-body .warn { color: var(--warning); }

@keyframes termFadeIn {
  to { opacity: 1; }
}

.copy-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(143, 34, 211, 0.1);
  border: 1px solid #3a1c63;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.copy-btn:hover {
  background: rgba(158, 34, 211, 0.2);
}

.terminal-wrapper {
  position: relative;
}

/* ── STEPPER ── */
.stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.step {
  display: flex;
  gap: 2rem;
  position: relative;
  padding-bottom: 3rem;
  cursor: pointer;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  z-index: 2;
}

.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
  transition: all 0.4s ease;
}

.step.active .step-num {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(111, 34, 211, 0.3);
}

.step.completed .step-num {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.step-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 8px;
  transition: background 0.4s ease;
}
.step.completed .step-line,
.step.active .step-line { background: var(--accent); }

.step-content {
  flex: 1;
  padding-top: 8px;
}

.step-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}
.step:not(.active) .step-content h3 { color: var(--text-dim); }

.step-content p {
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 520px;
}

.step-detail {
  margin-top: 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  opacity: 0;
}
.step.active .step-detail {
  max-height: 800px;
  opacity: 1;
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transition: transform 0.35s ease;
  transform-origin: left;
}

.card:hover {
  border-color: #5e309d;
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}
.card:hover::before { transform: scaleX(1); }

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── INTERACTIVE CHECKER ── */
.checker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-top: 3rem;
}

.checker h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.checker p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.check-items { display: flex; flex-direction: column; gap: 0.75rem; }

.check-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 14px 18px;
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.check-item:hover { border-color: var(--accent-dim); }

.check-box {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  font-size: 0.75rem;
}
.check-item.checked .check-box {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.check-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
}

.check-item.checked .check-label {
  text-decoration: line-through;
  color: var(--text-dim);
}

.progress-bar {
  margin-top: 1.5rem;
  height: 6px;
  background: var(--terminal-bg);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.progress-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  text-align: right;
}

/* ── PACKAGE MANAGERS ── */
.pm-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  overflow: hidden;
}

.pm-tab {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
}
.pm-tab.active {
  color: var(--accent);
  background: rgba(111, 34, 211, 0.05);
  border-bottom-color: var(--accent);
}

.pm-content {
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--terminal-bg);
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 2;
}

/* ── FAQ ACCORDION ── */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item.open { border-color: #5e309d; }

.faq-q {
  width: 100%;
  padding: 18px 20px;
  background: var(--bg-card);
  border: none;
  color: var(--text-bright);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}
.faq-q:hover { background: var(--bg-card-hover); }

.faq-arrow {
  transition: transform 0.3s;
  color: var(--accent);
  font-size: 1.2rem;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 20px 18px;
}

.faq-a p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer p span { color: var(--accent); }

/* ── DIVIDER ── */
.section-divider {
  max-width: 1100px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .step { gap: 1rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 1.25rem; }
  .os-selector { flex-direction: column; }
  .pm-tabs { flex-direction: column; }
}

/* ── ANIMATE ON SCROLL ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}