/* ==========================================================================
   PB Investology — shared design system
   Dark, engineered, dimensional. Deep navy ground, chrome/steel structure
   (from the corporate mark), electric-blue + teal signal accents (from the
   Portfolio Brain mark's neural glow). Deliberately single-theme — this is
   brand identity, not an app surface that should follow OS light/dark.
   ========================================================================== */

:root {
  /* ground */
  --bg:            #05090f;
  --bg-soft:       #0a121f;
  --surface:       #0f1a2c;
  --surface-2:     #142339;
  --surface-3:     #1b2d4a;
  --border:        rgba(150, 172, 204, 0.14);
  --border-strong: rgba(150, 172, 204, 0.28);

  /* text */
  --text:       #eef3fa;
  --text-dim:   #a9b8cf;
  --text-faint: #6c7c96;

  /* signal accents */
  --blue:      #4f9dff;
  --blue-dim:  #2f6fc2;
  --teal:      #23d9c4;
  --teal-dim:  #14867a;

  /* chrome / steel, lifted from the corporate mark's facets */
  --chrome-hi:  #dbe4ee;
  --chrome-mid: #93a2b7;
  --chrome-lo:  #3c4a63;
  --navy-mark:  #1c355f;

  /* type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;

  /* rhythm */
  --maxw: 1180px;
  --radius: 18px;
  --radius-sm: 10px;

  color-scheme: dark;
}

* { 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; }

::selection { background: var(--blue); color: #04070d; }

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

/* ---------------------------------- type ---------------------------------- */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--teal);
}

p { color: var(--text-dim); margin: 0; }
.lede { font-size: 19px; line-height: 1.65; max-width: 60ch; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s, background 0.25s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #04070d;
  box-shadow: 0 8px 30px -8px rgba(79, 157, 255, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(79, 157, 255, 0.7);
}

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--chrome-mid);
  transform: translateY(-2px);
}

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

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: linear-gradient(to bottom, rgba(5,9,15,0.92), rgba(5,9,15,0.55) 80%, transparent);
  backdrop-filter: blur(10px);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brandmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brandmark .mark { width: 30px; height: 30px; }
.brandmark small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}
.nav-links a { transition: color 0.2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a.current { color: var(--teal); }

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

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

/* ------------------------------- lead strip ------------------------------- */

.lead-strip {
  max-width: 560px; margin: 0 auto; padding: 48px 28px 0;
  text-align: center;
}
.lead-strip p.lead-kicker {
  font-size: 13px; color: var(--text-faint); margin-bottom: 16px;
}
.lead-strip form {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
}
.lead-strip input[type="email"] {
  flex: 1; min-width: 200px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}
.lead-strip input[type="email"]::placeholder { color: var(--text-faint); }
.lead-strip input[type="email"]:focus {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.05);
}
.lead-strip .btn { padding: 11px 20px; font-size: 13px; }
.lead-strip .lead-note {
  font-size: 11px; color: var(--text-faint); margin-top: 12px;
}
.lead-strip .lead-status {
  font-size: 12px; color: var(--teal); margin-top: 12px;
  display: none;
}
.lead-strip.sent form,
.lead-strip.sent p.lead-kicker { opacity: 0.35; pointer-events: none; }
.lead-strip.sent .lead-status { display: block; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  margin-top: 140px;
}
.lead-strip + .site-footer { margin-top: 48px; }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-brand .mark { width: 26px; height: 26px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 14px; color: var(--text-dim);
  margin-bottom: 10px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  max-width: var(--maxw); margin: 40px auto 0; padding: 20px 28px 0;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-faint);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* -------------------------------- sections -------------------------------- */

section { position: relative; padding: 120px 0; }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 18px; }

/* ------------------------------ particle canvas ---------------------------- */

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

/* --------------------------------- cards (3D) ------------------------------- */

.tilt-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  padding: 32px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.tilt-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(79,157,255,0.5), rgba(35,217,196,0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.tilt-card:hover { border-color: var(--border-strong); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6); }
.tilt-card:hover::before { opacity: 1; }
.tilt-card > * { transform: translateZ(30px); }

/* generic scroll-reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* stat chips */
.stat {
  display: flex; flex-direction: column; gap: 4px;
}
.stat .n {
  font-size: 34px; font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .l { font-size: 13px; color: var(--text-faint); font-weight: 600; }

/* badge / pill */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(79,157,255,0.08);
  border: 1px solid rgba(79,157,255,0.25);
  color: var(--blue);
  font-size: 12.5px; font-weight: 600;
}
.pill.teal { background: rgba(35,217,196,0.08); border-color: rgba(35,217,196,0.25); color: var(--teal); }
