/* ————————————————————————————————————————————————
   SoftVPN — cyber / terminal
   display+body: Space Grotesk · accents: JetBrains Mono
   ———————————————————————————————————————————————— */

:root {
  --bg0: #05080a;
  --bg1: #0a0f11;
  --ink: #e8f4ee;
  --muted: #7f948b;
  --neon: #3bf59b;
  --neon-soft: #8dffca;
  --neon-dim: rgba(59, 245, 155, 0.14);
  --amber: #ffd166;
  --danger: #ff6259;
  --panel: rgba(11, 17, 19, 0.82);
  --line: #1b2724;
  --line-neon: rgba(59, 245, 155, 0.35);
  --radius: 14px;
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scrollbar-color: rgba(59, 245, 155, 0.3) transparent; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

::selection { background: rgba(59, 245, 155, 0.28); color: #eafff5; }

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ——— backdrop: dark + grid + neon glow ——— */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 50% -14%, rgba(59, 245, 155, 0.13), transparent 60%),
    radial-gradient(700px 500px at 92% 110%, rgba(59, 245, 155, 0.05), transparent 55%),
    linear-gradient(180deg, #070c0e 0%, #05080a 100%);
}
.bg::before {
  /* engineering grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 245, 155, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 245, 155, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(85% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(85% 60% at 50% 0%, #000 30%, transparent 100%);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  pointer-events: none;
}

.wrap {
  width: min(920px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

/* ——— icons ——— */
.ic {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  flex: none;
}

/* ——— hero ——— */
.hero { margin-bottom: 2rem; animation: rise 0.6s ease both; }
.eyebrow {
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
  border: 1px solid var(--line-neon);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  background: rgba(59, 245, 155, 0.05);
}
.cursor {
  width: 0.55em;
  height: 1.1em;
  background: var(--neon);
  animation: blink 1.1s steps(1) infinite;
}
.brand {
  margin: 0 0 0.4rem;
  font-size: clamp(2.9rem, 10vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 40px rgba(59, 245, 155, 0.35);
}
.brand::after {
  content: "_";
  color: var(--neon);
  margin-left: 0.06em;
}
.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  font-weight: 500;
  color: var(--neon-soft);
  letter-spacing: -0.01em;
}
.lead { margin: 0; color: var(--muted); max-width: 36rem; }

/* ——— panels ——— */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.65rem;
  margin-bottom: 1.1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: rise 0.7s ease both;
}
/* corner brackets */
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-neon);
  pointer-events: none;
}
.panel::before {
  top: -1px; left: -1px;
  border-right: 0; border-bottom: 0;
  border-top-left-radius: var(--radius);
}
.panel::after {
  bottom: -1px; right: -1px;
  border-left: 0; border-top: 0;
  border-bottom-right-radius: var(--radius);
}
.panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.panel h3 { margin: 1.1rem 0 0.4rem; font-size: 1rem; font-weight: 600; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0.5rem 0 0; }

.kicker {
  margin: 0 0 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
}

/* status dots */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot.green { background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: pulse-dot 2s ease infinite; }
.dot.amber { background: var(--amber); box-shadow: 0 0 10px rgba(255, 209, 102, 0.7); animation: pulse-dot 1.4s ease infinite; }
.dot.red { background: var(--danger); box-shadow: 0 0 10px rgba(255, 98, 89, 0.7); }

.status.pending { border-color: rgba(255, 209, 102, 0.3); }
.status.pending .kicker { color: var(--amber); }
.status.rejected { border-color: rgba(255, 98, 89, 0.35); }
.status.rejected .kicker { color: var(--danger); }
.panel.ready { border-color: rgba(59, 245, 155, 0.3); }

.pulse {
  margin-top: 1.1rem;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  background-size: 200% 100%;
  animation: sweep 1.6s linear infinite;
}

/* ——— form ——— */
.form { display: grid; gap: 0.9rem; margin-top: 0.85rem; }
.fields { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
.fields-contact { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .fields { grid-template-columns: 2fr 1fr; }
  .fields-contact { grid-template-columns: 1fr 1fr; }
}
label .req { color: #ff8f8f; text-transform: none; letter-spacing: 0; }
label .opt { color: rgba(127, 148, 139, 0.7); text-transform: none; letter-spacing: 0; font-size: 0.85em; }
label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 10, 0.7);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input::placeholder { color: rgba(127, 148, 139, 0.5); text-transform: none; }
select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233bf59b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}
input:hover, select:hover { border-color: rgba(59, 245, 155, 0.3); }
input:focus, select:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(59, 245, 155, 0.15), 0 0 18px -6px rgba(59, 245, 155, 0.5);
}

/* ——— buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1.4rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn.primary {
  color: #04170d;
  background: var(--neon);
  box-shadow: 0 0 24px -6px rgba(59, 245, 155, 0.55);
}
.btn.primary:hover {
  transform: translateY(-1px);
  background: var(--neon-soft);
  box-shadow: 0 0 34px -6px rgba(59, 245, 155, 0.8);
}
.btn.primary:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { margin-top: 0.9rem; }

/* ——— devices ——— */
.devices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.05rem;
}
.device {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.05rem;
  background: rgba(5, 8, 10, 0.5);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.device:hover {
  border-color: var(--line-neon);
  box-shadow: 0 0 24px -12px rgba(59, 245, 155, 0.4);
}
.device.off { opacity: 0.5; }
.device-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
  margin-bottom: 0.8rem;
}
.device-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.device-head code {
  color: var(--neon);
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--neon-dim);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}
.badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.16rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 98, 89, 0.14);
  border: 1px solid rgba(255, 98, 89, 0.4);
  color: #ffb4ad;
}
.qr-frame {
  margin: 0 auto;
  padding: 0.5rem;
  width: fit-content;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line-neon), 0 0 28px -8px rgba(59, 245, 155, 0.45);
}
.qr {
  width: 100%;
  max-width: 204px;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

/* ——— tabs ——— */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.9rem 0 1.1rem;
}
.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.tab:hover { color: var(--ink); border-color: var(--line-neon); }
.tab.on {
  color: var(--neon);
  background: var(--neon-dim);
  border-color: var(--line-neon);
  box-shadow: 0 0 16px -8px rgba(59, 245, 155, 0.6);
  font-weight: 700;
}
.tab-pane { display: none; }
.tab-pane.on { display: block; animation: fade 0.22s ease; }
.tab-pane ol, .tab-pane ul { margin: 0.4rem 0 0; padding-left: 1.25rem; }
.tab-pane li { margin: 0.35rem 0; }
.tab-pane li::marker { color: var(--neon); font-weight: 700; }
.tab-pane a {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-color: rgba(59, 245, 155, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.tab-pane a:hover { text-decoration-color: var(--neon); }

/* numbered steps */
.steps {
  list-style: none;
  counter-reset: step;
  padding-left: 0 !important;
  margin-top: 0.55rem !important;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin: 0.7rem 0;
  min-height: 1.8rem;
}
.steps li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon);
  border: 1px solid var(--line-neon);
  border-radius: 6px;
  padding: 0.12rem 0.3rem;
  background: var(--neon-dim);
}

/* ——— footer ——— */
.foot {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot p { margin: 0.25rem 0; }

/* ——— animation ——— */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sweep {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes pulse-dot {
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pulse { animation: none; background: rgba(255, 209, 102, 0.4); }
  .cursor { animation: none; }
}

/* ——— mobile ——— */
@media (max-width: 560px) {
  .wrap { padding-top: 2rem; width: min(920px, calc(100% - 1.6rem)); }
  .panel { padding: 1.15rem 1.05rem 1.25rem; }
  .btn { width: 100%; }
  .tabs { gap: 0.35rem; }
  .tab { padding: 0.45rem 0.8rem; }
}
