/* Shared across all landing pages (index.html, docs.html): variables, reset,
   nav, buttons, cosmic button, shader background layers, footer, generic
   section headings. Page-specific layout (hero, feature grid, docs sidebar,
   etc.) stays inline in each page. */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0a0d; --panel: #131318; --panel2: #1a1a21; --border: #26262f;
  --text: #f2f2f5; --muted: #96969f; --accent: #49d34c; --accent2: #2f3a20;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
img, svg { display: block; max-width: 100%; }

/* Animated shader background, fixed behind all content. Solid --bg color
   doubles as the fallback if the shader script fails to load (no
   internet, CDN down, etc.) — decorative only, nothing depends on it. */
#shaderBg { position: fixed; inset: 0; z-index: -2; background: var(--bg); }
/* Softens the shader pattern so body text stays readable over it —
   backdrop-filter blurs whatever's behind this layer (the shader),
   while normal content painted above it (z-index: auto/0+) stays sharp. */
#shaderBlur { position: fixed; inset: 0; z-index: -1;
  backdrop-filter: blur(64px); -webkit-backdrop-filter: blur(64px);
  background: rgba(10,10,13,.4); }

/* ---------- nav ---------- */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(10,10,13,.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
nav .inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: .2px; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand .mark svg { width: 17px; height: 17px; }
nav .navlinks { display: flex; align-items: center; gap: 28px; font-size: 13px; color: var(--muted); }
nav .navlinks a { text-decoration: none; transition: color .15s; }
nav .navlinks a:hover, nav .navlinks a.active { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 10px;
  padding: 12px 22px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit;
  text-decoration: none; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #06140a; }
.btn-primary:hover { background: #5ce65f; transform: translateY(-1px); }
.btn-ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: #3d3d4a; }
.btn-sm { padding: 9px 16px; font-size: 12.5px; }

/* ---------- cosmic button (ported from cult-ui's CosmicButton — pure CSS,
   no React needed for the effect itself; recolored to Focal's green) ---------- */
@keyframes cosmic-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes cosmic-spin-slow { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.cosmic-btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; min-height: 44px; border-radius: 15px; padding: 3px; text-decoration: none;
  cursor: pointer; border: none; background: none; font: inherit; }
.cosmic-btn:active .cosmic-inner { transform: scale(.98); }
.cosmic-btn .cosmic-border, .cosmic-btn .cosmic-noise { position: absolute; inset: 0; overflow: hidden;
  border-radius: 15px; transition: inset .3s ease-out; pointer-events: none; }
.cosmic-btn:hover .cosmic-border, .cosmic-btn:hover .cosmic-noise { inset: -3px; }
.cosmic-btn .cosmic-border::before { content: ""; position: absolute; inset: -200%;
  animation: cosmic-spin 3s linear infinite;
  background: conic-gradient(from 0deg, #49d34c, #8be88d, #d7ffd8, #2fae54, #1f7a38, #3fc44a, #49d34c);
  opacity: .95; }
.cosmic-btn .cosmic-noise { opacity: .55; mix-blend-mode: overlay; }
.cosmic-btn .cosmic-noise::before { content: ""; position: absolute; inset: -200%;
  animation: cosmic-spin-slow 5s linear infinite;
  background: conic-gradient(from 180deg, #d7ffd8 0%, transparent 30%, #49d34c 50%, transparent 70%, #2c8f3f 100%); }
.cosmic-btn .cosmic-inner { position: relative; z-index: 10; display: flex; align-items: center; gap: 9px;
  height: 100%; width: 100%; border-radius: 12px; background: #16161c; padding: 11px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(0,0,0,.5),
    0 1px 1px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.35);
  transition: box-shadow .3s, transform .15s; font-weight: 700; font-size: 13.5px;
  color: var(--text); white-space: nowrap; }
.cosmic-btn:hover .cosmic-inner { box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.6),
  0 2px 6px rgba(0,0,0,.55), 0 14px 34px rgba(0,0,0,.42); }
.cosmic-btn .plat-svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- generic section heading (used by both marketing sections and docs) ---------- */
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
h2 { font-size: 36px; font-weight: 800; letter-spacing: -.8px; margin-bottom: 16px; line-height: 1.2; }
.section-head { max-width: 620px; margin: 0 auto 64px; text-align: center; }
.section-head p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 28px; }
.foot-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--muted); }
.foot-inner .brand { font-size: 13px; }

@media (max-width: 880px) {
  nav .navlinks { display: none; }
}

/* theme-aware: this page defaults to dark (matches the app), but respect an explicit light override */
:root[data-theme="light"] body { background: #f5f5f7; color: #16161a; }
