:root {
  color-scheme: dark;
  --bg: #050815;
  --panel: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --success: #34d399;
  --glass: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.05);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

@font-face {
  font-family: "SpaceGrotesk";
  src: url('/assets/fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url('/assets/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}
a { color: inherit; text-decoration: none; }

.page { overflow-x: hidden; }
.bg-overlay { position: fixed; inset: 0; z-index: -3; background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.12), transparent 30%), radial-gradient(circle at 80% 10%, rgba(147,51,234,0.15), transparent 30%), linear-gradient(135deg, #0b1020, #050815); }
.canvas-bg { position: fixed; inset: 0; z-index: -2; opacity: 0.6; }

.container { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 28px; }
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: rgba(0,0,0,0.55); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #0ea5e9); display: grid; place-items: center; font-weight: 700; box-shadow: var(--shadow); }
.brand-title { font-family: "SpaceGrotesk", "Inter", system-ui; font-size: 18px; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; color: var(--muted); margin: 0 0 4px; }
.nav-links { display: none; gap: 18px; font-size: 14px; color: var(--muted); }
.nav-links a { padding: 6px 0; transition: color 0.2s ease; }
.nav-links a:hover { color: #fff; }
.status-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lang-switch select { background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.05); font-size: 12px; color: var(--muted); }
.chip.online { background: rgba(52, 211, 153, 0.15); color: #bbf7d0; border-color: rgba(52,211,153,0.35); }
.chip.subtle { background: rgba(255,255,255,0.07); color: var(--text); }

.section { padding: 80px 0; position: relative; }
.hero { padding-top: 96px; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; align-items: center; }
.headline { font-family: "SpaceGrotesk", "Inter", system-ui; font-size: clamp(36px, 5vw, 60px); line-height: 1.1; margin: 0 0 12px; }
.gradient-text { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; max-width: 720px; margin: 0 0 18px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 600; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; color: #fff; background: transparent; }
.btn.primary { background: linear-gradient(135deg, #0ea5e9, #6366f1); box-shadow: var(--shadow); }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { border-color: var(--border); color: var(--text); background: rgba(255,255,255,0.04); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.tiny { padding: 8px 10px; font-size: 12px; }

.pill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.card { position: relative; border-radius: 18px; background: var(--card); border: 1px solid var(--border); padding: 16px; box-shadow: var(--shadow); height: 100%; }
.card.pill { padding: 14px; }
.pill-value, .card-value { font-size: 18px; font-weight: 700; margin: 0; }

.glass { background: var(--glass); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.glow { position: relative; }
.glow::after { content: ""; position: absolute; inset: -1px; border-radius: 20px; background: linear-gradient(135deg, rgba(125,211,252,0.4), rgba(167,139,250,0.3)); opacity: 0.35; filter: blur(12px); z-index: -1; }
.panel { padding: 18px; }
.panel-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.icon-circle { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, rgba(56,189,248,0.35), rgba(167,139,250,0.35)); display: grid; place-items: center; font-size: 22px; }
.panel-title { font-size: 18px; margin: 0; font-weight: 700; }
.panel-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.stat { padding: 12px; background: rgba(255,255,255,0.04); border-radius: 12px; border: 1px solid var(--border); }
.stat-value { margin: 0; font-size: 18px; font-weight: 700; }

.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-header + * { margin-top: 12px; }
.section-title { font-size: 28px; margin: 0 0 8px; font-family: "SpaceGrotesk", "Inter", system-ui; }
.section-title.small { font-size: 20px; }
.body { color: var(--muted); margin: 0 0 12px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: stretch; }
.card-grid.small { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: stretch; }
.copyable { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.copy-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }

.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.live-grid .card { min-height: 120px; display: flex; flex-direction: column; justify-content: center; }
.card-value { word-break: break-word; }
.copyable { align-items: flex-start; }
.copyable .card-value { padding-right: 8px; }
.copy-btn { white-space: nowrap; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; align-items: start; }
.bullets { padding-left: 18px; color: var(--muted); margin: 0 0 16px; }
.bullets li { margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-card { text-align: center; }
.stat-card { display: flex; flex-direction: column; justify-content: center; }
.stat-number { font-size: 32px; margin: 8px 0 0; font-family: "SpaceGrotesk", "Inter", system-ui; }

.diagram { width: 100%; }
.diagram-canvas { background: radial-gradient(circle at 20% 20%, rgba(56,189,248,0.08), transparent 35%), radial-gradient(circle at 80% 30%, rgba(167,139,250,0.1), transparent 35%), rgba(0,0,0,0.35); border-radius: 16px; padding: 12px; border: 1px solid var(--border); }
.diagram-canvas svg { width: 100%; height: 220px; }
.diagram-nodes text { fill: var(--text); font-size: 12px; }
.node { opacity: 0.8; }
.node.user { fill: #0ea5e9; }
.node.tor { fill: #6366f1; }
.node.exit { fill: #a855f7; }
.node.internet { fill: #0f172a; stroke: #38bdf8; stroke-width: 1.5; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.step { padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); }

.traffic-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: stretch; }
.map-card { padding: 12px; min-height: 360px; }
.map { position: relative; width: 100%; height: 100%; border-radius: 16px; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04), transparent 60%); overflow: hidden; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.traffic-stats { display: grid; grid-template-columns: 1fr; gap: 12px; }
.stat-tile { display: flex; align-items: center; justify-content: space-between; }
.stat-tile { min-height: 92px; }
.badge { min-width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #38bdf8, #6366f1); display: grid; place-items: center; font-weight: 700; }

.highlight { border: 1px solid rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.warning-card { border: 1px solid rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.danger-card { border: 1px solid rgba(248,113,113,0.45); background: rgba(248,113,113,0.12); }
.secure-card { border: 1px solid rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); display: flex; align-items: center; gap: 10px; }
.secure-card .dot { width: 10px; height: 10px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }

.abuse-card { margin-top: 16px; }
.legal-card { margin-bottom: 12px; background: rgba(255,255,255,0.05); }

.policy-table { padding: 0; overflow: hidden; }
.table-header, .table-row { display: grid; grid-template-columns: 1fr 3fr; padding: 12px 16px; }
.table-header { background: rgba(255,255,255,0.06); font-weight: 700; }
.table-row:nth-child(odd) { background: rgba(255,255,255,0.03); }
.port { font-family: "SpaceGrotesk", "Inter", system-ui; font-weight: 700; }
.reject { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.4); color: #fecdd3; text-align: center; font-weight: 700; }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.resource { display: block; height: 100%; transition: border-color 0.2s ease, transform 0.2s ease; }
.resource:hover { border-color: var(--accent); transform: translateY(-2px); }
.resource-head { display: flex; align-items: center; justify-content: space-between; }
.arrow { color: var(--accent); }

.faq-list { display: grid; gap: 10px; }
.accordion summary { cursor: pointer; font-weight: 700; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion p { margin: 8px 0 0; color: var(--muted); }

.footer { border-top: 1px solid var(--border); background: rgba(0,0,0,0.5); backdrop-filter: blur(14px); padding: 28px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.footer-links a { display: block; color: var(--muted); margin-bottom: 6px; }
.fine { color: #64748b; font-size: 12px; margin: 8px 0 0; }

.map-line { stroke-dasharray: 4 6; animation: pulseLine 2s linear infinite; }
@keyframes pulseLine { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
.reveal { opacity: 0; transform: translateY(24px); transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.highlight-grid { padding-top: 0; }
.policy-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card.glow.green { border: 1px solid rgba(52,211,153,0.3); }
.card.glow.red { border: 1px solid rgba(248,113,113,0.35); }
.card.glow.neutral { border: 1px solid rgba(125,211,252,0.28); }
.badge-icon { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, rgba(56,189,248,0.25), rgba(167,139,250,0.25)); display: grid; place-items: center; font-size: 20px; margin-bottom: 8px; }
.badge-icon.pulse { animation: badgePulse 2.2s ease-in-out infinite; }
@keyframes badgePulse { 0% { box-shadow: 0 0 0 0 rgba(56,189,248,0.35); } 70% { box-shadow: 0 0 0 12px rgba(56,189,248,0); } 100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); } }
.bullets.tight { padding-left: 14px; }

.how-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: center; }
.route-card { position: relative; padding: 12px; overflow: hidden; min-height: 220px; }
.route-svg { width: 100%; height: 200px; }
.route-line { filter: drop-shadow(0 0 8px rgba(99,102,241,0.4)); }
.route-node text { fill: var(--text); font-size: 12px; }
.route-node circle { stroke: rgba(255,255,255,0.4); stroke-width: 1.2; }
.node.guard { fill: #38bdf8; }
.node.middle { fill: #6366f1; }
.node.exit { fill: #a855f7; }
.node.internet { fill: #0f172a; }
.packets { position: absolute; inset: 0; pointer-events: none; }
.packets::before, .packets::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #38bdf8, #a855f7); animation: packet 6s linear infinite; }
.packets::after { animation-delay: 1.8s; }
@keyframes packet { 0% { transform: translate(60px,88px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(780px,88px); opacity: 0; } }

.warning-card, .danger-card, .secure-card { transition: transform 0.2s ease; }
.warning-card:hover, .danger-card:hover, .secure-card:hover, .resource:hover, .stat-card:hover, .card:hover { transform: translateY(-2px); }

.security-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.flag-card .icons { display: flex; gap: 10px; font-size: 18px; margin-bottom: 8px; }

.telemetry .card { background: rgba(255,255,255,0.04); }

.lang-switch { margin-left: 6px; }

.policy-table { backdrop-filter: blur(12px); }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .traffic-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
}
