/* ─── Layout primitives ─────────────────────────── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.page-body { flex: 1; position: relative; }
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── Top nav (Linear-style) ─────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.topnav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 15px;
}
.topnav .brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: url("../assets/icon-dark.png") center/cover no-repeat;
  display: grid; place-items: center;
  color: transparent; font-size: 0;
}
[data-mode="light"] .topnav .brand-mark { background-image: url("../assets/icon-light.png"); }

/* Shared brand-mark (used outside topnav: footer, login, landing-nav) */
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: url("../assets/icon-dark.png") center/cover no-repeat;
  color: transparent !important;
  font-size: 0 !important;
  flex: none;
}
[data-mode="light"] .brand-mark { background-image: url("../assets/icon-light.png"); }
.topnav .tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
}
.topnav .tab {
  border: none; background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: color .15s, background .15s;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.topnav .tabs { flex: none; }
.topnav .search-mini, .topnav .brand { flex: none; }
.topnav .tab:hover { color: var(--text); }
.topnav .tab.active {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}
.topnav .right { display: flex; align-items: center; gap: 10px; }
.topnav .search-mini {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12.5px;
  min-width: 200px;
}
.topnav .search-mini kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-dim);
  margin-left: auto;
}
.topnav .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: white; font-size: 11px; font-weight: 600;
}
.topnav .login-btn {
  height: 32px; padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--text); color: var(--bg);
  border: none; font-size: 13px; font-weight: 500;
}

/* ─── Buttons ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s, transform .12s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: #fff; }
.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 18px rgba(var(--accent-rgb),0.35);
}
.btn-accent:hover { background: color-mix(in oklab, var(--accent) 90%, white); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-quiet:hover { background: var(--surface-2); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 10px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }

/* ─── Cards ─────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ─── Type ─────────────────────────── */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}
.h1, .h2, .h3 {
  margin: 0;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "ss03", "cv11";
  text-wrap: balance;
}
.h1 { font-size: clamp(46px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -0.045em; }
.h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -0.04em; }
.h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.18; letter-spacing: -0.025em; }
.lead {
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--text-dim);
  max-width: 620px;
  text-wrap: pretty;
  line-height: 1.5;
}
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }

/* ─── Hero gradient background ─────────────────────────── */
.mesh-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 18%, rgba(var(--glow-1),0.45) 0%, transparent 60%),
    radial-gradient(50% 40% at 80% 8%, rgba(var(--glow-2),0.28) 0%, transparent 60%),
    radial-gradient(45% 50% at 70% 60%, rgba(var(--glow-3),0.22) 0%, transparent 60%);
  filter: blur(20px) saturate(120%);
  opacity: 0.9;
}
.grain {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* ─── Footer (Linear-style multi-col) ─────────────────────────── */
.footer {
  position: relative;
  border-top: 1px solid var(--border);
  margin-top: 120px;
  padding: 80px 0 0;
  overflow: hidden;
}
.footer-mark {
  position: absolute;
  left: 50%; bottom: -42%;
  transform: translateX(-50%);
  font-size: clamp(180px, 22vw, 320px);
  font-weight: 700;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
  font-family: var(--font-sans);
}
.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 80px;
}
.footer h4 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  margin: 0 0 16px;
  letter-spacing: 0;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a {
  color: var(--text-soft);
  font-size: 13.5px;
}
.footer ul a:hover { color: var(--text); }
.footer-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
}
.footer-meta .status {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim);
}
.footer-meta .status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-fresh);
  box-shadow: 0 0 8px var(--accent-fresh);
}

/* ─── Misc ─────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-dim);
}
.badge-new {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.06);
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
  text-transform: uppercase;
}
.badge-new.accent {
  background: rgba(var(--accent-rgb),0.14);
  color: var(--accent-2);
  border-color: rgba(var(--accent-2-rgb),0.28);
}
.badge-soon { background: rgba(255,255,255,0.06); color: var(--text-dim); border-color: var(--border); }

.divider-line {
  border-top: 1px solid var(--border);
  margin: 80px 0;
}

/* page transitions */
.page-fade {
  animation: fadeUp .35s ease-out;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }
