/* ORX Tunnel — dark design system (shared by the public landing page and the panel) */
:root {
  --bg: #0b0b12;
  --bg-soft: #0e0e18;
  --card: #12121c;
  --card-2: #171724;
  --card-glass: rgba(23, 23, 36, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f2f7;
  --muted: #9a9aad;
  --muted-2: #6f6f84;
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --accent-soft: rgba(124, 58, 237, 0.16);
  --accent-grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #6366f1 100%);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.14);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.14);
  --yellow: #eab308;
  --yellow-soft: rgba(234, 179, 8, 0.14);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.25em; }

/* ---------- layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { padding: 56px 0; }
.section-title { font-size: 1.7rem; font-weight: 800; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin-bottom: 28px; max-width: 640px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.center { text-align: center; }

/* ---------- topbar / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: var(--accent-grad); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; color: #fff; box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
}
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 600;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.nav a.active { color: #fff; background: var(--accent-soft); }
/* Hamburger: hidden on desktop, shown on narrow screens (see media query). */
.nav-toggle {
  display: none; margin-inline-start: auto;
  align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.lang-toggle { display: flex; gap: 4px; margin-inline-start: 8px; }
.lang-toggle a {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem; font-weight: 700;
}
.lang-toggle a:hover { text-decoration: none; color: var(--text); }
.lang-toggle a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 64px;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(500px 260px at 5% 110%, rgba(99, 102, 241, 0.28), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 12px;
  background: linear-gradient(90deg, #fff 30%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--card-2); color: var(--text); font: inherit; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; background: #1d1d2e; border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 22px rgba(124, 58, 237, 0.45); }
.btn-primary:hover { background: var(--accent-grad); filter: brightness(1.12); }
.btn-danger { background: var(--red); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; border-radius: 9px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- cards ---------- */
.card {
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.feature-card { transition: transform 0.15s ease, border-color 0.15s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(124, 58, 237, 0.5); }
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.install-icon { font-size: 1.5rem; margin-bottom: 10px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.badge-red { background: var(--red-soft); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.badge-yellow { background: var(--yellow-soft); color: #facc15; border-color: rgba(234, 179, 8, 0.3); }
.badge-gray { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.badge-blue { background: var(--blue-soft); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }

/* ---------- code / terminal ---------- */
.code-block {
  position: relative;
  background: #08080f; border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 16px 56px 16px 18px; font-family: var(--mono); font-size: 0.92rem;
  overflow-x: auto; white-space: nowrap; color: #d6d6e6; direction: ltr; text-align: left;
}
.code-block code { color: #e9d5ff; }
.copy-btn {
  position: absolute; top: 10px; inset-inline-end: 10px;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--card-2); color: var(--text); font: inherit; font-size: 0.8rem; font-weight: 700;
  cursor: pointer;
}
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.terminal {
  background: #08080f; border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); direction: ltr; text-align: left;
}
.terminal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #0e0e18; }
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot.r { background: #ef4444; } .terminal-dot.y { background: #eab308; } .terminal-dot.g { background: #22c55e; }
.terminal-title { margin-inline-start: 8px; color: var(--muted); font-size: 0.82rem; font-family: var(--mono); }
.terminal-body { padding: 18px; font-family: var(--mono); font-size: 0.88rem; line-height: 1.75; min-height: 260px; white-space: pre-wrap; word-break: break-word; color: #c9c9dd; }
.terminal-body .t-cmd { color: #a78bfa; }
.terminal-body .t-ok { color: #4ade80; }
.terminal-body .t-info { color: #60a5fa; }
.terminal-caret { display: inline-block; width: 9px; height: 1.05em; background: var(--accent-2); vertical-align: text-bottom; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px;
  background: var(--accent-grad); color: #fff; font-weight: 900; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
}

/* ---------- stats ---------- */
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 900; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.stat-card { padding: 20px; }

/* ---------- tables / forms ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: start; }
.table th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: #0e0e18; color: var(--text); font: inherit; font-size: 0.95rem;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25); }
.textarea { min-height: 110px; resize: vertical; }
.label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; color: var(--muted); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }

/* ---------- alerts / tabs / misc ---------- */
.alert { padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--card-2); margin-bottom: 16px; }
.alert-error { background: var(--red-soft); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.alert-ok { background: var(--green-soft); border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 700; font-size: 0.93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent-2); border-bottom-color: var(--accent); }
.sidebar { width: 230px; flex: 0 0 auto; }
.login-box { max-width: 420px; margin: 80px auto; }
.chart-bar { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.chart-bar > span { display: block; height: 100%; background: var(--accent-grad); border-radius: 999px; }

/* ---------- landing extras ---------- */
.provider-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.provider-badge {
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); font-weight: 800; font-size: 0.95rem;
}
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px solid var(--border); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 8px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: #4ade80;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 900;
}
.trouble-item { margin-bottom: 14px; }
.trouble-item:last-child { margin-bottom: 0; }
.trouble-q { font-weight: 800; margin-bottom: 2px; }
.trouble-a { color: var(--muted); }
.trouble-a code { font-family: var(--mono); font-size: 0.88em; background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 6px; color: #e9d5ff; }
.changelog-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.changelog-item:last-child { border-bottom: 0; }
.changelog-item ul { margin: 6px 0 0; color: var(--muted); }
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted-2); font-size: 0.9rem; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.req-list { list-style: none; padding: 0; margin: 0; }
.req-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.req-list li:last-child { border-bottom: 0; }
.req-list .k { color: var(--muted); }
.req-list .v { font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  /* Nav becomes a hamburger dropdown on narrow screens — it must stay
     reachable on phones (mobile view and desktop-site mode alike). */
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 8px 16px 12px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1rem; }
  .section { padding: 40px 0; }
  .hero { padding: 56px 0 44px; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .topbar-inner { gap: 8px; }
  .code-block { font-size: 0.8rem; }
  .terminal-body { font-size: 0.8rem; min-height: 220px; }
}
