/* Wisp VPN — landing page styles, GitHub Primer–inspired */

:root {
  --bg: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-inset: #eaeef2;
  --border: #d0d7de;
  --text: #1f2328;
  --text-secondary: #59636e;
  --accent: #0969da;
  --accent-emphasis: #0550ae;
  --green: #1a7f37;
  --green-emphasis: #116329;
  --purple: #8250df;
  --shadow: 0 1px 0 rgba(31, 35, 40, 0.04);
  --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
  --radius: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-inset: #010409;
  --border: #30363d;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-emphasis: #79c0ff;
  --green: #3fb950;
  --green-emphasis: #56d364;
  --purple: #bc8cff;
  --shadow: 0 1px 0 rgba(1, 4, 9, 0.4);
  --shadow-md: 0 8px 24px rgba(1, 4, 9, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-inset: #010409;
    --border: #30363d;
    --text: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-emphasis: #79c0ff;
    --green: #3fb950;
    --green-emphasis: #56d364;
    --purple: #bc8cff;
    --shadow: 0 1px 0 rgba(1, 4, 9, 0.4);
    --shadow-md: 0 8px 24px rgba(1, 4, 9, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

code, .mono { font-family: var(--font-mono); }

/* ---------- Navbar ---------- */

.navbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(6px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.brand img { width: 28px; height: 28px; }
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-inset); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--green);
  border-color: rgba(27, 31, 36, 0.15);
  color: #fff;
}
.btn-primary:hover { background: var(--green-emphasis); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg-inset); }

.btn-lg { padding: 13px 24px; font-size: 16px; }

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.badge-dev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero img.logo { width: 88px; height: 88px; margin-bottom: 20px; }

.hero h1 {
  font-size: 48px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-secondary);
}
.hero-meta a { color: var(--text-secondary); text-decoration: underline; }

.badges-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.badges-row img { height: 20px; }

/* ---------- Sections ---------- */

section { padding: 64px 0; border-top: 1px solid var(--border); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: 32px; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-secondary); font-size: 16px; margin: 0; }

/* ---------- Feature grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-inset);
  color: var(--accent);
  margin-bottom: 16px;
}
.card .card-icon svg { width: 20px; height: 20px; }

.card h3 { font-size: 16px; margin: 0 0 8px; }
.card p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ---------- Preview / gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
  line-height: 0;
  cursor: zoom-in;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gallery figure:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery img { width: 100%; display: block; }
.gallery figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(760px, 100%);
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step { text-align: center; }
.step .num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
}
.step h3 { font-size: 15px; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ---------- Download ---------- */

.download-card {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.download-card .win-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  color: var(--accent);
}
.download-card .win-icon svg { width: 100%; height: 100%; }
.download-info { flex: 1; min-width: 240px; }
.download-info h3 { margin: 0 0 6px; font-size: 20px; }
.download-info p { margin: 0 0 16px; color: var(--text-secondary); font-size: 14px; }
.download-reqs {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.download-reqs li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.download-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}
footer .footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
footer .footer-links a { color: var(--text-secondary); }
footer .footer-links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .grid, .gallery, .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero p.lead { font-size: 17px; }
  .download-card { flex-direction: column; text-align: center; }
  .download-actions { align-items: center; }
}
