/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:          #0f172a;
  --bg-2:        #1e293b;
  --bg-3:        #273449;
  --surface:     #1e293b;
  --surface-2:   #273449;
  --line:        #334155;
  --line-soft:   #1e293b;
  --fg:          #f1f5f9;
  --fg-muted:    #94a3b8;
  --accent:      #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.18);
  --green:       #22c55e;
  --amber:       #f59e0b;
  --radius:      10px;
  --radius-lg:   16px;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:   "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.4);
  --transition:  0.2s ease;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-3);
  color: #93c5fd;
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--fg);
}
.logo-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 99px;
  padding: 2px 8px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font-size: 0.9rem;
  color: var(--fg-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--fg); text-decoration: none; }
.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-muted) !important;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}
.btn-secondary {
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn-sm {
  font-size: 0.875rem;
  padding: 9px 18px;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 60% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--fg);
}
.accent { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-version {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

/* ─── Mock browser preview ───────────────────────────────────────────────── */
.mock-browser {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mock-browser-bar {
  background: var(--bg-3);
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.mock-browser-body { padding: 16px; }
.mock-panel { font-size: 0.8rem; }
.mock-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.mock-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.mock-title {
  font-weight: 700;
  color: var(--fg);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.mock-section { margin-bottom: 14px; }
.mock-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.mock-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mock-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.chip-nav     { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; }
.chip-main    { background: rgba(34, 197, 94, 0.15);  color: #86efac; }
.chip-article { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.chip-header  { background: rgba(234, 179, 8, 0.15);  color: #fde68a; }
.chip-footer  { background: rgba(244, 63, 94, 0.15);  color: #fda4af; }
.chip-section { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
.mock-tree { display: flex; flex-direction: column; gap: 4px; }
.mock-tree-node {
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--fg-muted);
  background: var(--bg-3);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}
.mock-tree-node.h1 { color: var(--fg); font-weight: 700; border-left: 2px solid var(--accent); }
.mock-tree-node.h2 { margin-left: 12px; border-left: 2px solid #6366f1; }
.mock-tree-node.h3 { margin-left: 24px; border-left: 2px solid #8b5cf6; }
.mock-summary-line {
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  margin-bottom: 6px;
  width: 100%;
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--line) 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}
.mock-summary-line.short { width: 65%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Features ───────────────────────────────────────────────────────────── */
.features {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--fg-muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1), var(--shadow);
}
.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ─── Install section ────────────────────────────────────────────────────── */
.install {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.install-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab-btn:hover { color: var(--fg); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-glow);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.install-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.install-step {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
}
.install-step:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-body p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 12px;
}
.step-body p:last-child { margin-bottom: 0; }
.step-hint {
  font-size: 0.84rem;
  color: var(--fg-muted);
  background: var(--bg-3);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 12px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.footer-links a:hover { color: var(--fg); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--fg-muted);
  width: 100%;
  text-align: center;
}
.footer-credit {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.footer-credit:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── URL copy chip ───────────────────────────────────────────────────────── */
.url-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  background: var(--bg-3);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  margin: 10px 0 4px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  user-select: none;
}
.url-chip:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.55);
  color: #bfdbfe;
}
.url-chip:active { transform: scale(0.98); }
.url-chip-icon {
  display: flex;
  align-items: center;
  color: var(--fg-muted);
  flex-shrink: 0;
  position: relative;
  width: 14px;
  height: 14px;
}
.url-chip-icon .icon-copy,
.url-chip-icon .icon-check { position: absolute; transition: opacity 0.15s ease; }
.url-chip-icon .icon-check { opacity: 0; color: var(--green); }
.url-chip.copied .icon-copy  { opacity: 0; }
.url-chip.copied .icon-check { opacity: 1; }
.url-chip.copied {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

/* ─── Legal pages (privacy-policy.html, terms.html) ─────────────────────── */
.legal-page {
  padding: 64px 0 96px;
}
.legal-container {
  max-width: 780px;
}
.legal-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.legal-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.legal-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.legal-meta {
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.legal-lead {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 40px;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.legal-section {
  margin-bottom: 40px;
}
.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-section h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.legal-section p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-section ul li {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
}
.legal-section ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-section a:hover { color: #93c5fd; }
.legal-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.legal-table th {
  text-align: left;
  padding: 11px 16px;
  background: var(--bg-3);
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.legal-table td {
  padding: 12px 16px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.55;
  vertical-align: top;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td strong { color: var(--fg); }
.legal-table td a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-nav a:not(.nav-github) { display: none; }
  .hero { padding: 64px 0 56px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { text-align: left; }
}
