/* bipolar.ai — shared design tokens and common elements */
/* Linked by: welcome/, privacy/, crisis/, signature/ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b0d12;
  --bg-raised: #11141b;
  --bg-card: #141823;
  --border: #232938;
  --border-bright: #313a4f;
  --text: #e8ebf1;
  --text-dim: #9aa3b5;
  --text-faint: #6b7384;
  --accent: #7c8cff;
  --accent-bright: #98a5ff;
  --signal: #ffb454;
  --good: #4ade80;
  --danger: #f87171;
  --radius: 12px;
  --maxw: 1080px;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 140, 255, .35); }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ============ HEADER ============ */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.wordmark {
  font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em;
  color: var(--text);
}
.wordmark .dot { color: var(--accent); }
.wordmark:hover { text-decoration: none; }
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-links a.nav-text {
  font-size: .85rem; color: var(--text-dim);
  padding: 6px 10px; border-radius: 6px;
  transition: color .15s;
}
.nav-links a.nav-text:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  display: inline-block;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 600; font-size: .875rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background .15s ease;
  margin-left: 6px;
}
.nav-cta:hover { background: var(--accent-bright); text-decoration: none; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  font-size: .82rem;
  color: var(--text-faint);
}
footer p + p { margin-top: 8px; }
footer a { color: var(--text-faint); }
footer a:hover { color: var(--text-dim); text-decoration: underline; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 14px;
}

/* ============ COMMON PAGE ELEMENTS ============ */
.kicker {
  font-family: var(--font-mono);
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.page-hero {
  padding: 72px 0 64px;
}
.page-hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 18px;
  max-width: 16em;
}
.page-hero .lede {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 38em;
}
h2 {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}
h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* ============ EMAIL FORM (shared) ============ */
.signup-form {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 460px;
}
.signup-form input[type="email"] {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color .15s;
}
.signup-form input[type="email"]::placeholder { color: var(--text-faint); }
.signup-form input[type="email"]:focus { border-color: var(--accent); }
.signup-form button {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #0b0d12;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.signup-form button:hover { background: var(--accent-bright); }
.signup-form button:active { transform: scale(.985); }
.signup-form button:disabled { opacity: .6; cursor: wait; }
.form-msg { font-size: .9rem; margin-top: 8px; display: none; }
.form-msg.ok { display: block; color: var(--good); }
.form-msg.err { display: block; color: var(--danger); }

@media (min-width: 560px) {
  .signup-form { flex-direction: row; }
  .signup-form input[type="email"] { flex: 1; }
  .signup-form button { width: auto; white-space: nowrap; }
}

/* ============ CTA BUTTON ============ */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: 10px;
  transition: background .15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:hover { background: var(--accent-bright); text-decoration: none; }
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--border-bright);
  color: var(--text-dim);
  font-weight: 600;
  font-size: .95rem;
  padding: 12px 20px;
  border-radius: 10px;
  transition: border-color .15s, color .15s;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
