/* FlowPM shared design tokens + base styles for marketing/auth pages.
   Linked from home.html, login.html, pricing.html, info.html, team-login.html. */

:root {
  --violet-600: #7c3aed;
  --violet-500: #8b5cf6;
  --violet-400: #a78bfa;
  --violet-300: #c4b5fd;
  --violet-glow: rgba(124, 58, 237, 0.35);

  --bg:          #08080d;
  --bg-canvas:   #0b0b10;
  --bg-surface:  #11111a;
  --bg-elev:     #16161f;
  --bg-elev-2:   #1c1c27;
  --bg-hover:    #22222e;

  --line-strong: rgba(255, 255, 255, 0.12);
  --line:        rgba(255, 255, 255, 0.07);
  --line-soft:   rgba(255, 255, 255, 0.04);

  --fg:       #ececf1;
  --fg-muted: #a0a0b0;
  --fg-faint: #6e6e7e;
  --fg-dim:   #4a4a55;

  --st-progress: #f0b35e;
  --st-done:     #5ec792;
  --st-blocked:  #e07a8b;
  --st-pending:  #8e8ea0;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px -8px rgba(0,0,0,0.5);
  --shadow-3: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 60px -12px rgba(0,0,0,0.6);

  --max-w: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--violet-500); color: white; }
img { display: block; max-width: 100%; }

a { color: inherit; }
a.link { color: var(--violet-400); text-decoration: none; }
a.link:hover { color: var(--violet-300); }

.mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; }

/* ── Backdrop: subtle violet glow + dot grid ─────────────────────────── */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 20% -10%, rgba(124,58,237,0.18), transparent 60%),
    radial-gradient(700px 500px at 90% 20%, rgba(56,189,248,0.10), transparent 60%);
}
.bg-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 28px 28px;
  mask: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 80%);
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 920px; }
.container.tight  { max-width: 720px; }

/* ── Top nav (marketing pages) ───────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.brand .mark {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-600));
  border-radius: 6px;
  box-shadow: 0 2px 8px -1px var(--violet-glow);
  color: white;
}
.brand .mark svg { display: block; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navlinks a {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--fg-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.navlinks a:hover { background: var(--bg-hover); color: var(--fg); }
.navlinks a.is-active { color: var(--fg); }

.nav-spacer { flex: 1; }

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

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  --pad-x: 18px;
  --h: 40px;
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 var(--pad-x);
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s, transform .08s, box-shadow .12s;
  color: var(--fg);
  background: transparent;
}
.btn:active { transform: translateY(1px); }
.btn.sm { --h: 32px; --pad-x: 12px; font-size: 13px; gap: 6px; }
.btn.lg { --h: 48px; --pad-x: 22px; font-size: 15px; border-radius: 10px; }

.btn.primary {
  background: var(--violet-600);
  color: white;
  border-color: transparent;
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--violet-600) 60%, black 40%) inset,
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 6px 20px -4px var(--violet-glow);
}
.btn.primary:hover { background: color-mix(in oklab, var(--violet-600) 88%, white 12%); }

.btn.secondary {
  background: var(--bg-elev);
  border-color: var(--line);
  color: var(--fg);
}
.btn.secondary:hover { background: var(--bg-hover); border-color: var(--line-strong); }

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--fg-muted);
}
.btn.ghost:hover { background: var(--bg-hover); color: var(--fg); }

.btn.link-like {
  height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--violet-400);
}
.btn.link-like:hover { color: var(--violet-300); }

/* ── Form ───────────────────────────────────────────────────────────── */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.005em;
}
.input {
  height: 42px;
  padding: 0 13px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
  width: 100%;
}
.input::placeholder { color: var(--fg-faint); }
.input:hover { background: var(--bg-hover); }
.input:focus { border-color: var(--violet-500); background: var(--bg-hover); box-shadow: 0 0 0 4px color-mix(in oklab, var(--violet-600) 14%, transparent); }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 38px; }
.input-wrap .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--fg-faint);
}
.input-wrap .suffix {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--fg-faint);
  font-size: 12.5px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.check {
  appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-elev);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.check:hover { border-color: var(--violet-500); }
.check:checked { background: var(--violet-600); border-color: var(--violet-600); }
.check:checked::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 1.8px solid white;
  border-bottom: 1.8px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card.padded { padding: 36px; }
.card.elev { background: var(--bg-elev); box-shadow: var(--shadow-2); }

/* ── Typography ────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}
h1 { font-size: 56px; line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: 36px; line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: 22px; line-height: 1.2; }
h4 { font-size: 16px; line-height: 1.3; }

@media (max-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--line-strong);
  background: color-mix(in oklab, var(--violet-600) 8%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--violet-300);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.02em;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--violet-400);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--violet-500) 30%, transparent);
}

.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  text-wrap: pretty;
  max-width: 56ch;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 36px 0 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--fg-faint);
  font-size: 12.5px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--fg-faint); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }

/* ── Utility ─────────────────────────────────────────────────────── */
.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.spacer { flex: 1; }

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .4s cubic-bezier(.32,.72,.36,1) both; }
.fade-in.d1 { animation-delay: 80ms; }
.fade-in.d2 { animation-delay: 160ms; }
.fade-in.d3 { animation-delay: 240ms; }
.fade-in.d4 { animation-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
