/* 2Brains, Inc. — corporate site stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap');

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-muted: #f1efe8;
  --text-primary: #1a1a17;
  --text-secondary: #5f5e5a;
  --text-tertiary: #888780;
  --border: rgba(60, 60, 55, 0.12);
  --border-strong: rgba(60, 60, 55, 0.4);
  --brand: #081F46;
  --accent: #081F46;
  --c-purple-50: #eeedfe;
  --c-purple-600: #534ab7;
  --c-purple-800: #3c3489;
  --c-teal-50: #e1f5ee;
  --c-teal-600: #0f6e56;
  --c-teal-800: #085041;
  --c-coral-50: #faece7;
  --c-coral-600: #993c1d;
  --c-coral-800: #712b13;
  --c-amber-50: #faeeda;
  --c-amber-600: #854f0b;
  --c-amber-800: #633806;
  --c-gray-50: #f1efe8;
  --c-gray-600: #5f5e5a;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15151a;
    --surface: #1c1c22;
    --surface-muted: #24242b;
    --text-primary: #f0efeb;
    --text-secondary: #b4b2a9;
    --text-tertiary: #888780;
    --border: rgba(240, 239, 235, 0.12);
    --border-strong: rgba(240, 239, 235, 0.4);
    --brand: #7a9ed4;
    --accent: #7a9ed4;
    --c-purple-50: #2a2554;
    --c-purple-600: #afa9ec;
    --c-purple-800: #cecbf6;
    --c-teal-50: #07382e;
    --c-teal-600: #5dcaa5;
    --c-teal-800: #9fe1cb;
    --c-coral-50: #4a1b0c;
    --c-coral-600: #f0997b;
    --c-coral-800: #f5c4b3;
    --c-amber-50: #412402;
    --c-amber-600: #ef9f27;
    --c-amber-800: #fac775;
    --c-gray-50: #2c2c2a;
    --c-gray-600: #b4b2a9;
  }
}

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

html {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 0.5px solid var(--border-strong);
  transition: opacity 0.15s ease;
}

a:hover { opacity: 0.7; }

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--brand);
}

h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 18px; line-height: 1.35; }

p { margin: 0 0 1rem; }

.site-nav {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: none;
  color: var(--brand);
  line-height: 1;
}

.site-brand-suffix {
  display: none;
}

.site-nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 13px;
}

.site-nav-links a {
  color: var(--text-secondary);
  border: none;
}

.site-nav-links a.active {
  color: var(--text-primary);
}

.site-nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.section {
  padding: 3rem 1.5rem;
  border-top: 0.5px solid var(--border);
}

.section:first-of-type {
  border-top: none;
  padding-top: 4rem;
}

.section-muted { background: var(--surface-muted); }
.section-surface { background: var(--surface); }

.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section-inner-wide {
  max-width: 880px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 500;
}

.lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.tagline {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0.5px solid var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  transition: background 0.15s ease;
}

.email-btn:hover {
  background: var(--surface);
  opacity: 1;
}

.email-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-card {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
}

.metric-value {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.metric-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.card {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.card-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 12px;
}

.card-row .ref {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.card-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.figure-wrap {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  margin: 1.5rem 0;
}

.figure-wrap svg { width: 100%; height: auto; }

.figure-caption {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
  font-style: italic;
  text-align: center;
}

.cta-section { text-align: center; }

.cta-section h2 { margin-bottom: 0.75rem; }

.cta-section p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.site-footer {
  background: var(--surface-muted);
  border-top: 0.5px solid var(--border);
  padding: 1.5rem;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-tertiary);
  gap: 1rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  margin-bottom: 1rem;
}

.chart-disclaimer {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-tertiary);
  margin: 1rem 0 0;
  font-style: italic;
}

.big-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.big-metric {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
}

.big-metric-label {
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.big-metric-value {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.big-metric-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 720px) {
  h1 { font-size: 27px; }
  h2 { font-size: 19px; }
  .section { padding: 2.5rem 1.25rem; }
  .section:first-of-type { padding-top: 3rem; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .big-metric-grid { grid-template-columns: 1fr; }
  .big-metric-value { font-size: 32px; }
  .site-nav-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1.25rem; }
  .site-nav-links { gap: 1.25rem; flex-wrap: wrap; }
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; text-align: left; }
  .chart-wrap { height: 280px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
