:root {
  color-scheme: dark;
  --bg: #0c0d0f;
  --tile: #111214;
  --tile-2: #14161a;
  --paper: #f2f2ec;
  --paper-ink: #1e2520;
  --paper-muted: #505850;
  --paper-rule: #cfd3ca;
  --ink: #f0f1f3;
  --muted: #9b9fa8;
  --stroke: #262830;
  --mint: #afddd1;

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --r-outer: 16px;
  --r-inner: 8px;

  --font-display: 'LeanLab Compact', 'Bricolage Grotesque', Geist, sans-serif;
  --font-ui: Geist, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; min-width: 0; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
*:focus-visible { outline: 2px solid #d5dcfa; outline-offset: 2px; }
.hidden { display: none !important; }

/* Sticky 52px Topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(12, 13, 15, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner {
  max-width: 960px; margin: 0 auto;
  height: 52px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s1);
}
.brand-link { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.brand-mark { width: 26px; height: 30px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-word { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.03em; color: var(--paper); }
.brand-by { font-size: 11px; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-btn {
  min-height: 34px; padding: 0 11px; border-radius: var(--r-inner);
  font-size: 12px; font-weight: 600;
  border: 1px solid #353742; color: #d6d8df;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-btn.primary { background: var(--paper); color: var(--paper-ink); border-color: var(--paper); }
.nav-hide-sm { display: none; }

/* Zero-Scroll Mobile-First Bento */
.bento {
  max-width: 960px; margin: 0 auto;
  padding: 12px 14px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s1);
}
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--tile);
  border: 1px solid var(--stroke);
  border-radius: var(--r-outer);
  padding: 14px;
}
.span-full { grid-column: 1 / -1; }
.span-half { grid-column: span 1; }
.ll-wave { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.42; pointer-events: none; }

/* Hero */
.hero-tile { padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.eyebrow {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.hero-tile h1 { font-size: 26px; color: var(--paper); margin-top: 4px; }
.hero-tile p { font-size: 13px; color: #c4c7d0; line-height: 1.42; margin-top: 6px; max-width: 44ch; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-paper, .btn-ghost {
  min-height: 42px; padding: 0 14px; border-radius: var(--r-inner);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-paper { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper); }
.btn-ghost { background: rgba(17, 18, 20, 0.8); color: var(--ink); border: 1px solid #3c3f4a; }

/* Compact 2x2 Stats */
.stat-tile { padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.stat-val { font-family: var(--font-mono); font-size: 17px; font-weight: 800; color: var(--mint); line-height: 1.1; }
.stat-tile h3 { font-size: 13px; color: var(--paper); margin-top: 2px; }
.stat-tile p { font-size: 11px; color: var(--muted); line-height: 1.35; }

/* Drawer Trigger Rows */
.drawer-triggers { display: flex; flex-direction: column; gap: 8px; }
.drawer-btn {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--tile-2); border: 1px solid var(--stroke); border-radius: var(--r-outer);
  min-height: 54px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: border-color 140ms ease, background 140ms ease;
}
.drawer-btn:hover { border-color: #3f4350; background: #181a21; }
.drawer-btn strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--paper); }
.drawer-btn > div > span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.drawer-arrow {
  width: 28px; height: 28px; border-radius: 99px; flex: none;
  background: #1d2028; border: 1px solid #323540; color: var(--mint);
  font-family: var(--font-mono); font-size: 12px; display: grid; place-items: center;
}

/* Bottom Drawers */
.why-backdrop {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(4px);
}
@keyframes whyUp {
  from { transform: translate(-50%, 28px); opacity: 0.6; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.why-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 50;
  width: min(520px, 100%); max-height: 84vh; overflow-y: auto;
  background: var(--tile); border: 1px solid var(--stroke);
  border-radius: 20px 20px 0 0; padding: 12px 16px 24px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.6);
  animation: whyUp 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.why-handle { width: 40px; height: 4px; border-radius: 99px; background: #3a3d48; margin: 0 auto; }
.why-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.why-sheet-head h2 { font-size: 19px; color: var(--paper); }
.why-close {
  width: 34px; height: 34px; border-radius: 99px; flex: none;
  background: #1d2028; border: 1px solid #333642; color: var(--ink); cursor: pointer;
}
.sheet-card { border-radius: 12px; padding: 14px; }
.sheet-card.paper { background: var(--paper); color: var(--paper-ink); }
.sheet-card.dark { background: #181a21; border: 1px solid #2b2d37; color: var(--ink); }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.sc-head strong { font-family: var(--font-display); font-size: 16px; }
.sc-head span { font-family: var(--font-mono); font-size: 11px; opacity: 0.78; }
.sheet-card ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; }

.sheet-steps, .sheet-faq { display: flex; flex-direction: column; gap: 10px; }
.s-step {
  display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start;
  background: #171920; border: 1px solid #272933; border-radius: 10px; padding: 12px;
}
.s-step span { font-family: var(--font-mono); font-size: 13px; font-weight: 800; color: var(--mint); }
.s-step strong, .sheet-faq strong { display: block; font-size: 13.5px; color: var(--paper); margin-bottom: 3px; }
.s-step p, .sheet-faq p { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.sheet-faq > div { background: #171920; border: 1px solid #272933; border-radius: 10px; padding: 12px; }

@media (min-width: 768px) {
  .nav-hide-sm { display: inline-flex; }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 24px 20px; gap: 12px; }
  .hero-tile { padding: 28px; }
  .hero-tile h1 { font-size: 38px; }
  .hero-actions { display: flex; }
  .drawer-triggers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
