/* ========================================
   vpskit landing page
   Dark terminal theme - Zero dependencies
   ======================================== */

/* --- Variables --- */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2129;
  --border: #30363d;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #3fb950;
  --accent-hover: #56d364;
  --accent-glow: rgba(63, 185, 80, 0.15);
  --accent-glow-strong: rgba(63, 185, 80, 0.25);
  --warning: #d29922;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
  --max-width: 1100px;
  --radius: 8px;
  --radius-lg: 12px;
}

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

/* --- Bilingual toggle --- */
html[data-lang="en"] [lang="fr"] { display: none; }
html[data-lang="fr"] [lang="en"] { display: none; }

/* --- Base --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-sans);
  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: var(--accent-hover);
}

img { max-width: 100%; }

/* --- Scroll animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 56px;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

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

.logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo .prompt {
  color: var(--accent);
}

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

@keyframes blink {
  50% { opacity: 0; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.2s, color 0.2s;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-accent {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
}

/* Subtle radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow-strong);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

/* One-liner command */
.oneliner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 60px;
  max-width: 100%;
  overflow-x: auto;
  transition: border-color 0.3s;
}

.oneliner:hover {
  border-color: var(--accent);
}

.oneliner code {
  white-space: nowrap;
  color: var(--accent);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--accent);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-btn.copied {
  color: var(--accent);
}

/* Terminal mockup */
.terminal {
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.03);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(48, 54, 61, 0.5);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.terminal-body .t-ok {
  color: var(--accent);
  font-weight: 600;
}

.terminal-body .t-step {
  color: var(--warning);
}

.terminal-body .t-bold {
  color: var(--text);
  font-weight: 700;
}

.terminal-body .t-cmd {
  color: var(--accent);
}

/* Terminal typing animation */
.terminal-line {
  opacity: 0;
  animation: typeLine 0.3s ease forwards;
}

.terminal-line:nth-child(1)  { animation-delay: 0.2s; }
.terminal-line:nth-child(2)  { animation-delay: 0.4s; }
.terminal-line:nth-child(3)  { animation-delay: 0.5s; }
.terminal-line:nth-child(4)  { animation-delay: 0.6s; }
.terminal-line:nth-child(5)  { animation-delay: 0.9s; }
.terminal-line:nth-child(6)  { animation-delay: 1.2s; }
.terminal-line:nth-child(7)  { animation-delay: 1.5s; }
.terminal-line:nth-child(8)  { animation-delay: 1.8s; }
.terminal-line:nth-child(9)  { animation-delay: 2.1s; }
.terminal-line:nth-child(10) { animation-delay: 2.4s; }
.terminal-line:nth-child(11) { animation-delay: 2.7s; }
.terminal-line:nth-child(12) { animation-delay: 3.0s; }
.terminal-line:nth-child(13) { animation-delay: 3.3s; }
.terminal-line:nth-child(14) { animation-delay: 3.6s; }
.terminal-line:nth-child(15) { animation-delay: 3.8s; }
.terminal-line:nth-child(16) { animation-delay: 4.0s; }

@keyframes typeLine {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   FEATURES
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--accent-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.feature-card .feature-script {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 10px;
  opacity: 0.8;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: background 0.3s, color 0.3s;
}

.step:hover .step-number {
  background: var(--accent);
  color: var(--bg);
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(50% + 34px);
  width: calc(100% - 68px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--border));
  opacity: 0.4;
}

/* ========================================
   DISTRIBUTIONS
   ======================================== */
.distros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.distro-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.distro-badge:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.distro-badge .distro-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ========================================
   QUICK START (tabs)
   ======================================== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 10px 18px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
  padding: 24px 0;
}

.tab-panel.active {
  display: block;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  position: relative;
  overflow-x: auto;
  margin-bottom: 12px;
  transition: border-color 0.3s;
}

.code-block:hover {
  border-color: var(--accent);
}

.code-block .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
}

.code-block code {
  white-space: pre;
}

.tab-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ========================================
   ROADMAP
   ======================================== */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border) 60%, var(--border));
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  transition: box-shadow 0.3s;
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 12px var(--accent-glow-strong);
}

.timeline-item.next .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-item.exploring .timeline-dot {
  border-color: var(--text-secondary);
}

.timeline-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.badge-next {
  background: var(--accent-glow);
  color: var(--accent);
}

.badge-planned {
  background: rgba(210, 153, 34, 0.15);
  color: var(--warning);
}

.badge-exploring {
  background: rgba(139, 148, 158, 0.15);
  color: var(--text-secondary);
}

.timeline-item h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  color: var(--text-secondary);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 80px 0 64px;
  }

  .hero::before {
    width: 100%;
    height: 300px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .header-actions .btn span {
    display: none;
  }

  .oneliner {
    font-size: 0.8rem;
    padding: 10px 14px;
  }

  .terminal-body {
    font-size: 0.75rem;
    padding: 14px;
  }

  .tabs {
    overflow-x: auto;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-subtitle {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 8px;
  }

  .logo {
    font-size: 0.95rem;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-toggle {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .distros {
    gap: 10px;
  }

  .distro-badge {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}
