/* APX VPN Design System — base (ui-design-brain) */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --bg: #070708;
  --bg2: #0e0e11;
  --bg-elevated: #121216;
  --card: rgba(18, 18, 22, 0.72);
  --card2: #101014;
  --b1: rgba(255, 255, 255, 0.06);
  --b2: rgba(255, 255, 255, 0.12);
  --acc: #14b8a6;
  --accD: #0d9488;
  --accL: #5eead4;
  --accG: rgba(20, 184, 166, 0.22);
  --pur: #6366f1;
  --purG: rgba(99, 102, 241, 0.12);
  --wl: #c084fc;
  --wlG: rgba(192, 132, 252, 0.12);
  --tx: #fafafa;
  --tx2: #a1a1aa;
  --tx3: #71717a;
  --ok: #34d399;
  --okG: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --err: #f87171;
  --errG: rgba(248, 113, 113, 0.12);
  --r: 10px;
  --rL: 16px;
  --rXL: 22px;
  --sb: 260px;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --glass: blur(20px) saturate(160%);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body), system-ui, sans-serif;
  background: var(--bg);
  color: var(--tx);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--b2); border-radius: 3px; }

h1, h2, h3, h4,
.hero-title, .section-title, .pg-title, .sb-title,
.sub-name, .plan-price span, .price-num span,
.modal-logo span, .sb-logo span, .tb-logo, .logo {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.grad-text, .grad {
  background: linear-gradient(135deg, var(--accL), #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ambient layers */
.mesh-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(20, 184, 166, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(99, 102, 241, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(20, 184, 166, 0.06), transparent 45%);
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
}

#canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35; }

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: apx-pulse 2s ease infinite;
  flex-shrink: 0;
}

@keyframes apx-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes apx-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.bento-item { grid-column: span 4; }
.bento-large { grid-column: span 8; }

@media (max-width: 880px) {
  .bento-item, .bento-large { grid-column: span 12; }
}

/* Shared buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--acc);
  color: #042f2e;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 24px var(--accG);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-primary:hover {
  background: var(--accL);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 12px 32px var(--accG);
}

.btn-outline {
  background: transparent;
  color: var(--accL);
  border: 1.5px solid var(--b2);
}

.btn-outline:hover {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.4);
}

.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--tx2);
  border: 1.5px solid var(--b1);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--tx);
  border-color: var(--b2);
}

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8125rem; border-radius: 8px; }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; border-radius: 14px; }
.w-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* Forms */
.fg { display: flex; flex-direction: column; gap: 0.4rem; }
.fg label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fg input, .fg select, .fg textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 0.75rem 1rem;
  color: var(--tx);
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 0 3px var(--accG);
}
.fg input::placeholder, .fg textarea::placeholder { color: var(--tx3); }

/* Modals */
.modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-ov.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--b2);
  border-radius: var(--rXL);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s var(--ease);
}
.modal-ov.open .modal { transform: none; }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--b1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--tx2);
  transition: 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--tx); }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  z-index: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--b2);
  border-radius: var(--r);
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
}
.toast.show { opacity: 1; pointer-events: auto; }
.toast.tok { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.08); color: var(--ok); }
.toast.terr { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); color: var(--err); }

/* Product tabs & whitelist (landing + dashboard) */
.product-tabs {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 0.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--b1);
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.product-tab {
  padding: 0.625rem 1.125rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--tx2);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s var(--ease);
}

.product-tab.active {
  background: var(--acc);
  color: #042f2e;
  box-shadow: 0 4px 16px var(--accG);
}

.product-tab.wl.active {
  background: linear-gradient(135deg, #7c3aed, var(--pur));
  color: #fff;
}

.product-panel { display: none; animation: fadeUp 0.35s ease; }
.product-panel.active { display: block; }

.whitelist-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: var(--rXL);
  background: linear-gradient(160deg, rgba(124,58,237,0.08), rgba(18,18,22,0.9));
  border: 1px solid rgba(192,132,252,0.25);
  text-align: center;
}

.whitelist-card.wide { max-width: none; text-align: left; }

.whitelist-card .badge-wl {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--wlG);
  border: 1px solid rgba(192,132,252,0.25);
  color: var(--wl);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.gb-slider-wrap { margin: 1.5rem 0; text-align: left; }

.gb-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  outline: none;
}

.gb-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 4px var(--accG);
  cursor: pointer;
}

.gb-slider-val {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.75rem;
}

.gb-slider-val strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--tx);
}

.dual-keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .dual-keys { grid-template-columns: 1fr; }
}

.key-panel {
  padding: 1.25rem;
  border-radius: var(--rL);
  border: 1px solid var(--b1);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s var(--ease);
}

.key-panel.standard { border-color: rgba(20, 184, 166, 0.15); }
.key-panel.whitelist { border-color: rgba(124, 58, 237, 0.2); }

.key-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.key-panel-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.key-tag {
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.key-tag.ok { background: var(--okG); color: var(--ok); }
.key-tag.off { background: rgba(255,255,255,0.05); color: var(--tx3); }
.key-tag.wl { background: var(--wlG); color: var(--wl); }

.plan-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-section-title span.icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.plan-section-title.standard span.icon { background: rgba(20,184,166,0.12); }
.plan-section-title.whitelist span.icon { background: var(--wlG); }

.unlimited-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--okG);
  border: 1px solid rgba(52,211,153,0.2);
  color: var(--ok);
  font-size: 0.6875rem;
  font-weight: 700;
}

/* Utilities */
.logo-img-sm { height: 36px; width: 36px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.logo-img-xs { height: 30px; width: 30px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.logo-img-md { height: 38px; width: 38px; object-fit: contain; border-radius: 9px; flex-shrink: 0; }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-err { color: var(--err); }
.text-pur { color: var(--pur); }
.text-acc { color: var(--accL); }
.u-muted { opacity: 0.65; }
.u-faded { opacity: 0.45; }
.u-mt-lg { margin-top: 2.5rem; }
.u-mb-md { margin-bottom: 1.25rem; }
.u-hidden { display: none !important; }
.container-wide { max-width: 100%; padding: 1.25rem 1.5rem; }
.dot-ok { background: var(--ok); }
.dot-muted { background: var(--tx3); }
