/* QuietTunnel — site stylesheet */

:root {
  --bg: #08090d;
  --bg-soft: #0d0f15;
  --panel: rgba(255, 255, 255, .035);
  --panel-solid: #11141b;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #eef1f7;
  --text-2: #a7adbd;
  --text-3: #6d7385;
  --brand: #5b6cff;
  --brand-2: #8b5cf6;
  --accent: #22d3a8;
  --warn: #f0b429;
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(91, 108, 255, .20), transparent 60%),
    radial-gradient(700px 420px at 10% 4%, rgba(34, 211, 168, .10), transparent 62%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(8, 9, 13, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}

.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 9, 13, .9);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 16.5px;
  letter-spacing: -.2px;
  white-space: nowrap;
}

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(91, 108, 255, .35);
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 8px;
  flex: 1;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--text-2);
  transition: color .18s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 550;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 22px rgba(91, 108, 255, .3);
  transition: transform .18s ease, box-shadow .18s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(91, 108, 255, .42);
}

/* ---------------- hero ---------------- */

.hero {
  padding: 76px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 56px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: 12.5px;
  color: var(--text-2);
  letter-spacing: .2px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 168, .16);
  flex: none;
}

h1 {
  margin: 22px 0 0;
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: -1.6px;
  font-weight: 700;
}

h1 .grad {
  background: linear-gradient(100deg, #a5b4ff 0%, #5b6cff 38%, #22d3a8 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 20px 0 0;
  font-size: 17px;
  color: var(--text-2);
  max-width: 33em;
}

.lede b { color: var(--text); font-weight: 550; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 560;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(91, 108, 255, .34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(91, 108, 255, .46);
}

.btn-ghost {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .22);
}

.btn small {
  font-size: 12px;
  color: rgba(255, 255, 255, .62);
  font-weight: 450;
}

.btn-ghost small { color: var(--text-3); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--text-3);
}

.meta span { display: inline-flex; align-items: center; gap: 7px; }

.meta svg { opacity: .8; }

/* ---------------- app mockup ---------------- */

.mock {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(175deg, #14161e, #0c0e13 60%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.mock:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }

.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}

.mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c3040;
  flex: none;
}

.mock-bar span {
  margin-left: 6px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .3px;
}

.mock-body {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 306px;
}

.mock-left {
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(91, 108, 255, .30), transparent 66%),
    conic-gradient(from 200deg, var(--brand), var(--brand-2), var(--accent), var(--brand));
  box-shadow: 0 0 34px rgba(91, 108, 255, .38);
  position: relative;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #0e1017;
}

.ring .pw {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 2.4px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  transform: rotate(45deg);
}

.ring .pw::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 2.4px;
  height: 15px;
  background: #fff;
  transform: translateX(-50%);
}

.mock-state {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.mock-sub {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: -8px;
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: auto;
}

.mock-stats div {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
}

.mock-stats em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.mock-stats i {
  display: block;
  font-style: normal;
  font-size: 9px;
  color: var(--text-3);
}

.mock-right { padding: 14px 12px; }

.mock-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin-bottom: 7px;
  background: rgba(255, 255, 255, .022);
}

.mock-node.on {
  border-color: rgba(91, 108, 255, .55);
  background: linear-gradient(100deg, rgba(91, 108, 255, .16), rgba(139, 92, 246, .07));
}

.badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .2px;
  flex: none;
}

.badge.vl { background: linear-gradient(140deg, #6b7cff, #8b5cf6); }
.badge.tr { background: linear-gradient(140deg, #f0854f, #e2563f); }
.badge.hy { background: linear-gradient(140deg, #22d3a8, #0ea5a0); }
.badge.vm { background: linear-gradient(140deg, #4f63ff, #3b4bd8); }

.mock-node .n { flex: 1; min-width: 0; }
.mock-node .n b { display: block; font-size: 11.5px; font-weight: 550; color: var(--text); }
.mock-node .n i { display: block; font-style: normal; font-size: 9.5px; color: var(--text-3); }
.mock-node .t { font-size: 10px; color: var(--accent); font-variant-numeric: tabular-nums; }

.mock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  font-size: 9.5px;
  color: var(--text-3);
}

/* ---------------- sections ---------------- */

section { position: relative; }

.sec { padding: 84px 0; }

.sec-head { max-width: 660px; margin-bottom: 40px; }

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}

h2 {
  margin: 14px 0 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -.9px;
  font-weight: 680;
}

.sec-head p {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 15.5px;
}

/* stats strip */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
}

.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.strip-inner > div {
  padding: 26px 10px;
  text-align: center;
}

.strip-inner > div + div { border-left: 1px solid var(--line); }

.strip b {
  display: block;
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -.6px;
  background: linear-gradient(120deg, #fff, #9aa6c4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.strip span { font-size: 12.5px; color: var(--text-3); }

/* features */
.feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  transition: border-color .22s ease, transform .22s ease, background .22s ease;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px 140px at 50% 0%, rgba(91, 108, 255, .14), transparent 70%);
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .18);
}

.card:hover::after { opacity: 1; }

.ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(91, 108, 255, .13);
  border: 1px solid rgba(91, 108, 255, .28);
  margin-bottom: 16px;
  color: #b9c2ff;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.2px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

/* downloads */
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dl {
  position: relative;
  padding: 30px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(91, 108, 255, .13), transparent 62%),
    linear-gradient(170deg, #12151d, #0c0e14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dl.android {
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(34, 211, 168, .12), transparent 62%),
    linear-gradient(170deg, #11161a, #0c0e14);
}

.dl-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.dl-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-strong);
  flex: none;
}

.dl h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -.3px;
}

.dl .sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.dl .ver {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 168, .3);
  background: rgba(34, 211, 168, .08);
  border-radius: 7px;
  padding: 3px 8px;
  white-space: nowrap;
}

.spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec div { font-size: 12px; color: var(--text-3); }
.spec b {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.dl .btn { width: 100%; justify-content: center; }

.dl-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.dl-note code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  background: rgba(255, 255, 255, .05);
  padding: 1px 5px;
  border-radius: 5px;
  word-break: break-all;
}

.dl-note code.sha {
  display: block;
  margin-top: 8px;
  padding: 9px 11px;
  font-size: 10.5px;
  line-height: 1.55;
  letter-spacing: .1px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-3);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

.dl-note .alt {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
}

.dl-note .alt a {
  color: #a3b1ff;
  border-bottom: 1px solid rgba(163, 177, 255, .35);
  padding-bottom: 1px;
}

.dl-note .alt a:hover { border-bottom-color: #a3b1ff; }

.dl-note code.sha:hover {
  border-color: var(--line-strong);
  color: var(--text-2);
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: s;
}

.step {
  position: relative;
  padding-top: 30px;
  border-top: 1px solid var(--line-strong);
}

.step::before {
  counter-increment: s;
  content: "0" counter(s);
  position: absolute;
  top: -11px;
  left: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--brand);
  background: var(--bg);
  padding-right: 10px;
}

.step h3 {
  margin: 12px 0 8px;
  font-size: 15.5px;
  font-weight: 600;
}

.step p { margin: 0; font-size: 14px; color: var(--text-2); }

.step code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #cdd4ff;
  background: rgba(91, 108, 255, .12);
  border: 1px solid rgba(91, 108, 255, .22);
  padding: 1px 6px;
  border-radius: 5px;
}

/* protocol table */
.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, .018);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(255, 255, 255, .025);
}

tr:last-child td { border-bottom: none; }

td.mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  background: rgba(255, 255, 255, .04);
}

/* faq */
details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

details summary {
  cursor: pointer;
  padding: 16px 30px 16px 0;
  font-size: 15px;
  font-weight: 550;
  list-style: none;
  position: relative;
  color: var(--text);
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .22s ease;
}

details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

details p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-2);
  max-width: 62em;
}

details p code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, .06);
  padding: 1px 5px;
  border-radius: 4px;
}

/* footer */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  background: rgba(0, 0, 0, .3);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}

.foot p {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  max-width: 52em;
  line-height: 1.75;
}

.foot-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
}

.foot-links a:hover { color: var(--text); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 11px;
  background: #1b1f2a;
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  z-index: 90;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- responsive ---------------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .mock { transform: none; max-width: 560px; }
  .mock:hover { transform: none; }
  h1 { font-size: 44px; }
  .feats { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .sec { padding: 64px 0; }
  h2 { font-size: 28px; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .strip-inner > div:nth-child(3) { border-left: none; }
  .strip-inner > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 44px 0 24px; }
  h1 { font-size: 33px; letter-spacing: -1px; }
  .lede { font-size: 15.5px; }
  .actions { gap: 10px; }
  .btn { width: 100%; justify-content: center; height: 48px; }
  .meta { gap: 14px; font-size: 12px; }
  .feats { grid-template-columns: 1fr; }
  .mock-body { grid-template-columns: 1fr; min-height: 0; }
  .mock-left { border-right: none; border-bottom: 1px solid var(--line); }
  .mock-right { padding: 12px 10px 14px; }
  .dl { padding: 22px 20px; }
  .dl.android { order: -1; }
  .dl h3 { font-size: 16.5px; }
  .spec { grid-template-columns: 1fr 1fr; }
  .spec div:last-child { grid-column: span 2; }
  th, td { padding: 12px 14px; font-size: 13px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .sec { padding: 52px 0; }
  .foot { flex-direction: column; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in { opacity: 1; transform: none; }
