/* ============ Tokens ============ */
:root {
  color-scheme: dark;

  --bg: #0a0c10;
  --bg-alt: #0d1016;
  --surface: #12151c;
  --surface-2: #171b24;
  --border: #22262f;
  --text: #e7e9ee;
  --text-muted: #9099a8;
  --text-dim: #5b6372;

  --accent: #4fd1c5;
  --accent-2: #a78bfa;
  --accent-ink: #06201d;

  --danger: #ff6b6b;
  --ok: #4fd1c5;

  --radius: 14px;
  --radius-sm: 8px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
}

/* ============ Reset ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(79, 209, 197, 0.08);
  color: var(--accent);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

/* subtle grain so the dark background doesn't look flat */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65em 1.2em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #38bdb3);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.5);
}
.btn-primary:hover { box-shadow: 0 6px 24px -6px rgba(79, 209, 197, 0.55); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 0.8em 1.6em; font-size: 1rem; }
.btn-sm { padding: 0.5em 1em; font-size: 0.875rem; }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(14px);
  background: rgba(10, 12, 16, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand-mark {
  width: 18px; height: 18px; border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px -2px rgba(79, 209, 197, 0.7);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-muted); font-size: 0.92rem; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============ Hero ============ */
.hero { position: relative; z-index: 1; padding: 96px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 60%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(79, 209, 197, 0.14), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(167, 139, 250, 0.12), transparent 70%);
  z-index: -1;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
  margin-bottom: 20px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 1px rgba(79, 209, 197, 0.8);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  max-width: 14ch;
}
.cursor { color: var(--accent); }

.lede, .section-lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 54ch;
  margin-top: 20px;
}
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.85rem; color: var(--text-dim); }

/* ---- terminal mock ---- */
.hero-visual { position: relative; }
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); opacity: 0.85; }
.terminal-title {
  margin-left: 8px; font-size: 0.78rem; color: var(--text-dim); font-family: var(--mono);
}
.terminal-body {
  margin: 0;
  padding: 20px 18px 28px;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--text);
  min-height: 220px;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .line { display: block; min-height: 1.5em; }
.terminal-body .muted { color: var(--text-dim); }
.terminal-body .secret { color: var(--danger); }
.terminal-body .placeholder { color: var(--accent-2); }
.terminal-body .ok { color: var(--ok); }
.terminal-body .caret {
  display: inline-block; width: 7px; height: 1.1em; background: var(--text);
  vertical-align: -2px; margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ Sections ============ */
.section { padding: 88px 0; position: relative; z-index: 1; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kicker {
  color: var(--accent); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.section h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); max-width: 22ch; }

/* problem chips */
.leak-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip {
  font-family: var(--mono); font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 12px; border-radius: 999px;
  text-decoration: line-through;
  text-decoration-color: var(--danger);
}

/* steps */
.steps {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  counter-reset: step;
}
@media (max-width: 920px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(79, 209, 197, 0.12); color: var(--accent);
  font-family: var(--mono); font-weight: 700; font-size: 0.85rem;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1rem; margin-bottom: 8px; }
.steps p { color: var(--text-muted); font-size: 0.92rem; }

/* install steps: same card, but stacks a code block above the caption */
.install-steps { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
@media (max-width: 920px) { .install-steps { grid-template-columns: 1fr; } }
.install-steps li { display: flex; flex-direction: column; }
.install-steps .code-block { margin: 2px 0 14px; }
.install-steps p:last-child { color: var(--text-muted); font-size: 0.88rem; margin-top: auto; }

.code-block {
  display: block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}
.code-block code { background: none; padding: 0; color: inherit; }

/* scenarios (non-dev PII examples) */
.scenario-grid { margin-top: 40px; }
.scenario-card { display: flex; flex-direction: column; gap: 14px; }
.scenario-label {
  font-weight: 600; font-size: 0.95rem; color: var(--text);
}
.scenario-diff {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.scenario-diff code {
  background: none; padding: 0; font-size: 0.8rem;
  white-space: normal; word-break: break-word;
}
.scenario-diff .before { color: var(--danger); }
.scenario-diff .after { color: var(--accent-2); }
.scenario-diff .arrow { color: var(--text-dim); font-size: 0.9rem; }
.scenario-card > p:last-child { color: var(--text-muted); font-size: 0.9rem; }

/* feature grid */
.grid {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 920px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(79, 209, 197, 0.4); transform: translateY(-2px); }
.card h3 { font-size: 1.02rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.92rem; }

/* faq */
.faq-list { margin-top: 36px; display: grid; gap: 10px; max-width: 760px; }
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
summary {
  cursor: pointer; font-weight: 600; font-size: 0.98rem;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; color: var(--text-dim); font-size: 1.1rem; margin-left: 12px;
  transition: transform 0.15s ease;
}
details[open] summary::after { content: "–"; }
details p { margin-top: 12px; color: var(--text-muted); font-size: 0.92rem; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-dim); font-size: 0.85rem;
}

/* scroll-reveal */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
