/* ============================================================
   2peer site — light theme
   ============================================================ */
:root {
  --accent:      #0f9e7a;
  --accent-soft: color-mix(in oklch, #0f9e7a 12%, transparent);
  --accent-on:   #ffffff;

  --bg:      oklch(0.985 0.003 245);
  --panel:   oklch(0.970 0.004 245);
  --panel-2: oklch(0.950 0.005 245);
  --panel-3: oklch(0.925 0.006 245);
  --video:   oklch(0.115 0.006 245);

  --border:    color-mix(in oklch, black 9%,  transparent);
  --border-hi: color-mix(in oklch, black 18%, transparent);

  --text:      oklch(0.155 0.007 245);
  --text-soft: oklch(0.280 0.008 245);
  --muted:     oklch(0.440 0.009 245);
  --faint:     oklch(0.580 0.008 245);

  --r-lg: 16px;
  --r-md: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel-2);
  padding: 0.1em 0.4em;
  border-radius: 5px;
}

.accent-text { color: var(--accent); }

/* ───────────────────────── NAV ───────────────────────── */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 28px;
  max-width: var(--maxw);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav__logo { width: 26px; height: 26px; border-radius: 7px; }
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--muted);
}
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }

/* ───────────────────────── BUTTONS ───────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 980px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.25s,
    border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 600;
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px color-mix(in oklch, var(--accent) 45%, transparent);
}
.btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--border-hi);
  color: var(--text);
  transform: translateY(-1px);
}
.btn--block { width: 100%; padding: 14px; }
.btn__icon {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ───────────────────────── HERO ──────────────────────── */
.hero {
  position: relative;
  padding: 84px 28px 64px;
  text-align: center;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(
    ellipse at center,
    color-mix(in oklch, #0f9e7a 14%, transparent),
    transparent 62%
  );
  filter: blur(16px);
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 980px;
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%        { box-shadow: 0 0 0 0   color-mix(in oklch, #0f9e7a 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px color-mix(in oklch, #0f9e7a 0%,  transparent); }
}

.hero__title {
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin: 18px 0 0;
  color: var(--text);
}
.hero__sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--muted);
  max-width: 560px;
  margin: 18px auto 0;
  line-height: 1.55;
}
.hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero__meta { margin-top: 16px; font-size: 13.5px; color: var(--faint); }

/* Connection diagram */
.wire {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 64px);
  margin: 48px auto 0;
  max-width: 720px;
}
.wire__node { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wire__screen {
  width: clamp(140px, 22vw, 220px);
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.wire__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--panel-3); }
.wire__screen--live {
  background: var(--video);
  border-color: color-mix(in oklch, black 20%, transparent);
}
.wire__play {
  width: 0; height: 0;
  border-left: 18px solid var(--accent);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
  filter: drop-shadow(0 0 10px color-mix(in oklch, var(--accent) 55%, transparent));
}
.wire__id {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.wire__link {
  position: relative;
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wire__pulse {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px color-mix(in oklch, var(--accent) 55%, transparent);
  animation: travel 2.6s var(--ease) infinite;
}
@keyframes travel { 0% { left: 0; } 50% { left: calc(100% - 9px); } 100% { left: 0; } }
.wire__star {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  color: var(--accent);
}
.wire__link small {
  position: absolute;
  bottom: -24px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

/* ───────────────────────── SECTIONS ──────────────────── */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 28px;
}
.section--alt {
  max-width: none;
  background: var(--panel);
}
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section--download { padding-bottom: 88px; }

.section__head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section__head h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 650;
  color: var(--text);
}
.section__head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

/* ───────────────────────── FEATURES ──────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.feature {
  background: var(--bg);
  padding: 28px 30px;
  transition: background 0.3s var(--ease);
}
.feature:hover { background: var(--panel); }
.feature__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.feature h3 { margin: 14px 0 8px; font-size: 19px; letter-spacing: -0.02em; font-weight: 600; color: var(--text); }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ───────────────────────── STATS ─────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  text-align: center;
}
.stat { padding: 20px 12px; }
.stat__num {
  display: block;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat__label {
  display: block;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.stat__ref { color: var(--accent); font-size: 0.7em; margin-left: 1px; }
.stats__note {
  max-width: 460px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--faint);
}
.stats__star { color: var(--accent); font-weight: 600; }

/* ───────────────────────── TECH GRID ─────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.12);
}
.card--wide { grid-column: 1 / -1; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card__head h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.card__tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 980px;
}
.card__lead { color: var(--text-soft); font-size: 15px; margin-bottom: 16px; }

.ticks { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.45;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 13px; height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks li code { background: var(--panel-2); color: var(--accent); }
.ticks__warn { color: oklch(0.50 0.18 23); }
.ticks li.ticks__warn::before {
  content: "✕";
  width: auto; height: auto;
  border: none;
  transform: none;
  top: -1px;
  font-weight: 700; font-size: 13px;
  color: oklch(0.50 0.18 23);
}

/* Quality table */
.qtable { width: 100%; border-collapse: collapse; }
.qtable th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
}
.qtable td {
  padding: 15px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  position: relative;
}
.qtable tr:last-child td { border-bottom: none; }
.qtable td:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 500;
}
.bar {
  display: block;
  height: 3px;
  width: var(--w);
  background: linear-gradient(90deg, color-mix(in oklch, #0f9e7a 40%, transparent), var(--accent));
  border-radius: 4px;
  margin-bottom: 7px;
}

/* ───────────────────────── DOWNLOAD ──────────────────── */
.dl-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.dl-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -26px rgba(0, 0, 0, 0.18);
  border-color: var(--border-hi);
}
.dl-card.is-detected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 25%, transparent);
}
.dl-card__os { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.dl-card__logo { width: 26px; height: 26px; fill: var(--text); }
.dl-card__os h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.dl-card__note { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.dl-card__alt {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--faint);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.dl-card__alt:hover { color: var(--text); border-bottom-color: var(--accent); }
.dl-card.is-unavailable .btn--primary {
  background: var(--panel-3);
  color: var(--faint);
  pointer-events: none;
}

.dl-foot { text-align: center; margin-top: 38px; color: var(--muted); font-size: 14.5px; }
.inline-link { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.inline-link:hover { border-bottom-color: var(--accent); }

/* ───────────────────────── FOOTER ────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text); }
.footer__links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__note { margin-left: auto; font-size: 13px; color: var(--faint); }

/* ───────────────────────── REVEAL ────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ───────────────────────── RESPONSIVE ────────────────── */
@media (max-width: 820px) {
  .nav { gap: 12px; padding: 0 18px; }
  .nav .btn--sm { display: none; }
  .nav__links { gap: 16px; font-size: 13.5px; }
  .features, .tech-grid, .dl-cards { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .wire { flex-direction: column; gap: 40px; }
  .wire__link {
    flex: none; width: 1px; height: 64px; max-width: none;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
  }
  @keyframes travel { 0% { top: 0; } 50% { top: calc(100% - 9px); } 100% { top: 0; } }
  .wire__pulse { left: 50%; transform: translateX(-50%); }
  .wire__star { top: -30px; left: 50%; transform: translateX(-50%); }
  .wire__link small { top: auto; bottom: -24px; left: 50%; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
