/* ============================================================
   Brax — landing page
   ============================================================ */

:root {
  --bg: #06070d;
  --bg-soft: #0a0d17;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.028);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eefb;
  --muted: #94a1bb;
  --brand: #5865f2;
  --brand-2: #eb459e;
  --good: #57f287;
  --warn: #fee75c;
  --radius: 18px;
  --maxw: 1160px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------- background */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 12% 8%, rgba(88, 101, 242, 0.28), transparent 62%),
    radial-gradient(560px 420px at 88% 22%, rgba(235, 69, 158, 0.20), transparent 62%),
    radial-gradient(700px 520px at 50% 110%, rgba(87, 242, 135, 0.12), transparent 65%);
  filter: saturate(115%);
}

/* The cursor glow — this is the "mouse effect" layer. */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 620px;
  height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(
    circle,
    rgba(88, 101, 242, 0.30) 0%,
    rgba(235, 69, 158, 0.13) 38%,
    transparent 68%
  );
  mix-blend-mode: screen;
  will-change: transform;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.page { position: relative; z-index: 1; }

/* ------------------------------------------------------- layout */

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

section { padding: 92px 0; }

.section-head { max-width: 640px; margin-bottom: 46px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 14px;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; }

h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 750; }
h3 { font-size: 19px; font-weight: 650; }

p { margin: 0 0 16px; color: var(--muted); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }

.grad {
  background: linear-gradient(105deg, #7c8cff 0%, #5865f2 34%, #eb459e 72%, #ff8ad0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 7, 13, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; font-size: 17px; }

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 22px rgba(88, 101, 242, 0.45);
}

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

.nav-links a {
  font-size: 14.5px;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  transition: color 0.22s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease,
    background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #7b5cf0 55%, var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(88, 101, 242, 0.75);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -12px rgba(88, 101, 242, 0.9);
}

.btn-ghost {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.075);
}

.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 11px; }

/* ----------------------------------------------------------- hero */

.hero {
  padding: 96px 0 84px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(87, 242, 135, 0.7);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 242, 135, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(87, 242, 135, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 242, 135, 0); }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.stats {
  display: flex;
  gap: 44px;
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat b { display: block; font-size: 32px; font-weight: 780; letter-spacing: -0.03em; }
.stat span { font-size: 13.5px; color: var(--muted); }

/* hero preview card */

.preview {
  position: relative;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}

.preview-head .brand-mark { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }

.msg { display: flex; gap: 12px; margin-bottom: 14px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.msg-body { min-width: 0; }
.msg-name { font-size: 14px; font-weight: 650; margin-bottom: 3px; }
.msg-name .app {
  font-size: 10px;
  background: var(--brand);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 7px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.msg-text { font-size: 14.5px; color: #cfd8ea; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.chip {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(88, 101, 242, 0.32);
  color: #c3caff;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chip:hover { transform: translateY(-2px); background: rgba(88, 101, 242, 0.26); }

/* -------------------------------------------------------- features */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.32s ease,
    background 0.32s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 200px at var(--mx, 50%) var(--my, 0%), rgba(88, 101, 242, 0.20), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(88, 101, 242, 0.42);
  background: rgba(255, 255, 255, 0.05);
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
  background: linear-gradient(140deg, rgba(88, 101, 242, 0.28), rgba(235, 69, 158, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.card p { font-size: 14.5px; margin-bottom: 0; }

/* -------------------------------------------------------- commands */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
}

.cat {
  padding: 17px 19px;
  border-radius: 15px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  transition: transform 0.28s ease, border-color 0.28s ease;
}
.cat:hover { transform: translateY(-4px); border-color: rgba(235, 69, 158, 0.38); }

.cat h4 {
  margin: 0 0 9px;
  font-size: 14.5px;
  font-weight: 680;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat .list {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.85;
  word-break: break-word;
}
.cat .list b { color: #b9c4dd; font-weight: 500; }

/* ------------------------------------------------------------ cta */

.cta {
  position: relative;
  border-radius: 26px;
  padding: 60px 44px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.30), rgba(235, 69, 158, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cta::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.10), transparent 40%);
  animation: spin 12s linear infinite;
  pointer-events: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

.cta > * { position: relative; z-index: 1; }
.cta p { max-width: 540px; margin: 0 auto 28px; color: #d7ddf0; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--border);
  padding: 54px 0 40px;
  background: rgba(0, 0, 0, 0.35);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 38px;
}

.foot-grid h5 {
  margin: 0 0 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 650;
}

.foot-grid a, .foot-grid li {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.foot-grid a:hover { color: var(--text); transform: translateX(4px); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }

.foot-bot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}

/* ----------------------------------------------------------- prose */

.prose { max-width: 780px; }
.prose h1 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 12px; }
.prose .updated { font-size: 14px; color: var(--muted); margin-bottom: 42px; }
.prose h2 {
  font-size: 24px;
  margin: 44px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.prose p, .prose li { color: var(--muted); font-size: 15.5px; }
.prose ul { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 620; }
.prose a { color: #97a5ff; border-bottom: 1px solid rgba(151, 165, 255, 0.35); }
.prose a:hover { color: #fff; }
.prose .callout {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
}

/* -------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ----------------------------------------------------- responsive */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 62px; }
  .preview { order: 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  section { padding: 66px 0; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(6, 7, 13, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; width: 100%; font-size: 16px; }
  .burger { display: block; }
  .nav-cta .btn { display: none; }
  .stats { gap: 28px; }
  .stat b { font-size: 26px; }
  .cta { padding: 44px 24px; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
