/* Base */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2c5282; /* your dark blue */
  --light-gray: #f3f4f6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* Top Bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 3rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Logo in black square */
.logo-block {
  display: flex;
  align-items: center;
}

.bp-logo {
  width: 100px;
  height: 100px;
  background: #000;
  position: relative;
  display: inline-block;
}

.bp-logo span {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.05rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Hero */
.hero {
  padding: 4.5rem 3rem 3.5rem;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 4vw, 3rem);
  max-width: 700px;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.subhead {
  max-width: 650px;
  color: #4b5563;
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.btn-primary {
  background: #fff;
  color: #111;
  border: 1px solid #d1d5db;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: #f8f9fa;
}

.btn-outline {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: 0.2s ease;
  font-family: Arial, sans-serif;
}

/* Hover style for dealfinder button */
.dealfinder-btn:hover {
  background: #f8f9fa !important;
  border-color: #2c5282 !important;
  text-decoration: none;
}

.dealfinder-btn:hover .arrow-icon {
  transform: translateX(4px);
}

.arrow-icon {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: inherit;
  line-height: inherit;
}

/* Sections */
.section {
  padding: 3rem 3rem;
}

.section h2 {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.section-text {
  color: #4b5563;
  max-width: 600px;
  margin-bottom: 1.75rem;
  font-size: 1rem;
}

/* Thesis Section */
.thesis-section {
  background: #fafafa;
}

.thesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.thesis-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.thesis-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.thesis-card p {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Pills */
.pill-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.75rem;
  color: #374151;
  transition: background 0.2s ease;
}

.pill:hover {
  background: #e5e7eb;
}

/* Structure diagram */
.structure-section {
  background: #f9fafb;
}

.structure-diagram {
  padding: 2rem 0;
  margin-top: 1.25rem;
  position: relative;
}

.node {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  text-align: center;
  font-size: 0.8rem;
  min-width: 150px;
  max-width: 220px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  position: relative;
}

.node-top {
  margin: 0 auto;
  max-width: 320px;
  background: #ffffff;
  font-size: 0.85rem;
}

.node-sub {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.ownership-badge {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Connector lines */
.connector-container {
  position: relative;
  height: 60px;
  margin: 0.5rem auto 0.5rem;
  max-width: 1400px;
}

.connector-vertical {
  width: 2px;
  height: 30px;
  background: #d1d5db;
  margin: 0 auto;
}

.connector-horizontal {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  height: 2px;
  background: #d1d5db;
}

.connector-branches {
  display: none;
}

.connector-branch {
  display: none;
}

.node-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.node-column {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

/* Draw vertical branch from horizontal line down to each node */
.node-column::before {
  content: '';
  position: absolute;
  top: -31px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 31px;
  background: #d1d5db;
}

/* Nested structure under Research */
.nested-structure {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.nested-connector {
  width: 2px;
  height: 26px;
  background: #d1d5db;
  margin: 0 auto;
}

.nested-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0;
  position: relative;
}

.nested-row::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 2px;
  background: #d1d5db;
  max-width: 260px;
  margin: 0 auto;
}

/* Vertical drops to each small node */
.nested-row .node-small {
  position: relative;
}

.nested-row .node-small::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: #d1d5db;
}

.node-small {
  min-width: 140px;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
}

/* Operational Excellence Section */
.operational-section {
  background: #fff;
}

.structure-note {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  display: inline-block;
  max-width: 100%;
}

.structure-note p {
  color: #4b5563;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

.principle-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.principle-mark::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: #000;
}

.principle-mark span {
  font-size: 0.85rem;
  font-weight: 500;
  color: #111;
  letter-spacing: 0.03em;
}

/* Metrics Section */
.metrics-section {
  background: #fafafa;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.metric-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.85rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Contact */
.contact-section {
  background: #fff;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
}

.contact-form button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 9px;
  font-size: 0.9rem;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Footer */
.footer {
  background: #111;
  color: #d1d5db;
  padding: 3rem 3rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
}

.footer-left .bp-logo {
  margin-bottom: 1rem;
}

.footer-tagline {
  color: #9ca3af;
  font-size: 0.85rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-legal {
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.6;
}

.footer-legal small {
  font-size: 0.7rem;
  display: block;
  margin-top: 0.5rem;
  color: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 3.5rem 1.5rem 3rem;
  }

  .section {
    padding: 2rem 1.5rem;
  }

  .thesis-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .node-row {
    flex-direction: column;
    align-items: center;
  }

  /* Reorder for mobile: 100% owned companies first, then Research with nested structure */
  .node-column:nth-child(1) {
    order: 5; /* Bridgeport Research last (with nested GP/Fund/Properties) */
  }

  .node-column:nth-child(2) {
    order: 4; /* Property Management fourth */
  }

  .node-column:nth-child(3) {
    order: 3; /* CommunityPay third */
  }

  .node-column:nth-child(4) {
    order: 2; /* Contra second */
  }

  .node-column:nth-child(5) {
    order: 1; /* Rovik first */
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }
}
