/* ============================================
   TAS — Base & Reset
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:      #fafafa;
  --bg2:     #f0f0f2;
  --fg:      #111;
  --fg2:     #555;
  --fg3:     #999;
  --bd:      #e0e0e3;
  --code-bg: #f3f3f5;
  --code-fg: #1a1a2e;
  --accent:  #0055dd;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', 'SF Mono', monospace;
}

body.dk {
  --bg:      #09090b;
  --bg2:     #141416;
  --fg:      #e4e4e7;
  --fg2:     #a0a0a6;
  --fg3:     #52525a;
  --bd:      #1e1e22;
  --code-bg: #18181b;
  --code-fg: #d4d4d8;
  --accent:  #6b9fff;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.72;
  font-size: 16.5px;
  transition: background .15s, color .15s;
}

::selection { background: var(--accent); color: #fff; }


/* ============================================
   Typography
   ============================================ */
h1, h2 { font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
h1     { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
h2     { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .4em; }
h3     { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }

small {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--fg3);
  margin-bottom: 10px;
}

p { max-width: 620px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: .84em;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 2px 7px;
  border-radius: 4px;
}


/* ============================================
   Layout
   ============================================ */
.w { max-width: 680px; margin: 0 auto; padding: 0 28px; }

section { padding: 72px 0; border-bottom: 1px solid var(--bd); }
section:last-of-type { border-bottom: none; }


/* ============================================
   Nav
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bd);
  transition: background .15s;
}

.nav-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 28px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--fg);
  letter-spacing: -.03em;
}
.nav-brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--fg3);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover { color: var(--fg); }

.theme-btn {
  background: none;
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  color: var(--fg3);
  font-family: var(--sans);
  transition: border-color .15s;
}
.theme-btn:hover { border-color: var(--fg3); }

@media (max-width: 600px) {
  .nav-links a:nth-child(-n+3) { display: none; }
}


/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 130px 0 70px;
  text-align: center;
  border-bottom: 1px solid var(--bd);
}

.hero-sub {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg3);
  margin-bottom: 20px;
}

.hero-lead {
  color: var(--fg2);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 16px auto 0;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-p, .btn-s {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .88rem;
  font-family: var(--sans);
  text-decoration: none;
  transition: opacity .15s;
}

.btn-p { background: var(--fg); color: var(--bg); }
.btn-p:hover { opacity: .85; text-decoration: none; }

.btn-s { border: 1px solid var(--bd); color: var(--fg); }
.btn-s:hover { background: var(--bg2); text-decoration: none; }

.install-cmd {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--code-bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color .15s;
}
.install-cmd:hover { border-color: var(--fg3); }
.install-cmd code { background: none; padding: 0; font-size: .84rem; color: var(--code-fg); }
.install-cmd .copy-hint {
  font-style: normal;
  font-size: .75rem;
  color: var(--fg3);
  font-family: var(--sans);
  font-weight: 500;
}


/* ============================================
   Prose (story / longform)
   ============================================ */
.prose p {
  color: var(--fg2);
  font-size: 1rem;
  line-height: 1.82;
  margin-bottom: 1.15em;
}
.prose p strong { color: var(--fg); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }


/* ============================================
   Pipeline Steps
   ============================================ */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bd);
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  margin: 28px 0;
}

.step {
  background: var(--bg);
  padding: 24px 26px;
  font-size: .9rem;
  color: var(--fg2);
  line-height: 1.65;
}
.step strong { display: block; color: var(--fg); margin-bottom: 4px; font-size: .92rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--code-bg);
  font-size: .72rem;
  font-weight: 700;
  color: var(--fg3);
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 600px) { .pipeline { grid-template-columns: 1fr; } }


/* ============================================
   Zero-Knowledge Box
   ============================================ */
.zk-box {
  background: var(--code-bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  margin: 32px 0;
}
.zk-box .zk-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg3);
  margin-bottom: 10px;
}
.zk-box code {
  background: none;
  font-size: .95rem;
  color: var(--fg2);
  display: block;
  margin-bottom: 10px;
}
.zk-box .zk-note { font-size: .84rem; color: var(--fg3); margin: 0; }


/* ============================================
   Feature List
   ============================================ */
.feat-list { margin-top: 28px; }

.feat-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--bd);
}
.feat-item:last-child { border-bottom: none; }
.feat-item h3 { margin-bottom: 6px; }
.feat-item p { color: var(--fg2); font-size: .92rem; line-height: 1.7; }


/* ============================================
   Security Grid
   ============================================ */
.sec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bd);
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 28px;
}

.sec-item { background: var(--bg); padding: 20px 22px; }
.sec-item .label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg3);
  margin-bottom: 3px;
}
.sec-item .value { font-weight: 700; font-size: .92rem; }
.sec-item .desc  { font-size: .8rem; color: var(--fg3); margin-top: 2px; }

@media (max-width: 600px) { .sec-grid { grid-template-columns: 1fr; } }


/* ============================================
   Code blocks
   ============================================ */
pre {
  background: var(--code-bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 22px 26px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.75;
  color: var(--code-fg);
  margin: 20px 0;
}
pre .c { color: var(--fg3); }

.sec-alt { background: var(--bg2); }


/* ============================================
   FAQ
   ============================================ */
.faq details {
  border-bottom: 1px solid var(--bd);
  padding: 16px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--fg3);
  transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: 10px;
  color: var(--fg2);
  font-size: .9rem;
  line-height: 1.7;
}


/* ============================================
   Footer
   ============================================ */
footer {
  padding: 36px 0;
  text-align: center;
  font-size: .8rem;
  color: var(--fg3);
  border-top: 1px solid var(--bd);
}
footer a { color: var(--fg2); }


/* ============================================
   Scroll animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
