/* ── BDF Shared Styles ── */
/* Fonts are loaded via <link> tags in each HTML <head> — not @import, to avoid render-blocking */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
  background: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Tokens as CSS variables ── */
:root {
  --primary: #0384c6;
  --primary-dark: #026a9e;
  --primary-light: #e8f4fa;
  --slate: #1e293b;
  --slate-mid: #334155;
  --slate-light: #64748b;
  --slate-muted: #94a3b8;   /* muted text on dark backgrounds */
  --slate-bright: #cbd5e1;  /* bright text on dark backgrounds */
  --footer-bg: #0f172a;
  --surface: #f9fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --border-light: #f0f0f0;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1120px;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-text {
  font-weight: 700;
  font-size: 15px;
  color: var(--slate);
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 13px;
  color: var(--slate-light);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}
.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--primary);
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.nav-links .btn-primary { color: var(--white); }
.btn-primary-lg {
  font-size: 14px;
  padding: 12px 24px;
}
.btn-secondary {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-mid);
  transition: color 0.2s;
}
.btn-secondary:hover { color: var(--primary); }

/* ── Hero ── */
.hero {
  padding: 112px 24px 56px;
  background: var(--white);
}
.hero-inner {
  max-width: 660px;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero p {
  font-size: 15px;
  color: var(--slate-mid);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 14px;
}
.hero p:last-of-type { margin-bottom: 36px; }
.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ── Trust strip ── */
.trust-strip {
  padding: 32px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.trust-strip-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.trust-logo-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-mid);
  letter-spacing: 0.01em;
}
.trust-logo-sep {
  color: var(--border);
  font-size: 16px;
  line-height: 1;
  user-select: none;
}
.trust-traction {
  font-size: 12px;
  color: var(--slate-light);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Section shared ── */
.section {
  padding: 60px 24px;
}
.section--white { background: var(--white); }
.section--surface { background: var(--surface); }

.section-header {
  text-align: center;
  margin-bottom: 36px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.25;
  margin-bottom: 10px;
}
.section-header p {
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.6;
}

/* Left-aligned section header variant */
.section-header--left {
  text-align: left;
  margin-bottom: 40px;
}
.section-header--left h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.25;
  margin-bottom: 10px;
}
.section-header--left p {
  max-width: 640px;
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.6;
}

/* ── Steps grid (How it works) ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step--setup {
  grid-column: 1 / -1;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.step--setup p {
  max-width: 560px;
}
.step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.3;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.7;
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.card-grid--two {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(3,132,198,0.08);
}
.card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 8px;
}
.card p {
  font-size: 13px;
  color: var(--slate-light);
  line-height: 1.65;
  margin-bottom: 16px;
}
.card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s;
}
.card-link:hover { color: var(--primary-dark); }

/* ── CTA band ── */
.cta-band {
  padding: 52px 24px;
  background: var(--slate);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 10px;
}
.cta-band p {
  font-size: 14px;
  color: var(--slate-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.btn-white {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  background: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s;
}
.btn-white:hover { opacity: 0.9; }
.btn-ghost {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-muted);
  padding: 12px 12px;
}

/* ── Footer ── */
.site-footer {
  padding: 44px 24px;
  background: var(--footer-bg);
  border-top: 1px solid var(--slate);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-bright);
  margin-bottom: 6px;
}
.footer-entity {
  font-size: 12px;
  color: var(--slate-light);
}
.footer-columns {
  display: flex;
  gap: 40px;
}
.footer-col-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--slate-muted);
  margin-bottom: 7px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--slate-bright); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--slate);
}
.footer-bottom p {
  font-size: 11px;
  color: var(--slate-muted);
}

/* ── FAQ accordion ── */
.faq-list {
  max-width: 760px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  text-align: left;
}
.faq-question:hover { color: var(--primary); }
.faq-icon {
  font-size: 18px;
  color: var(--slate-light);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
  user-select: none;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.7;
  padding: 0 0 18px;
}
.faq-item.open .faq-answer { display: block; }

/* ── Two-column layout (science page) ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.prose p {
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.75;
  margin-bottom: 20px;
}
.prose p:last-child { margin-bottom: 0; }

/* Sidebar panel */
.sidebar-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.sidebar-panel--offset {
  margin-top: 88px; /* aligns with prose body below the section-header--left */
}
.sidebar-panel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}
.sidebar-item { margin-bottom: 20px; }
.sidebar-item:last-child { margin-bottom: 0; }
.sidebar-item dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 4px;
}
.sidebar-item dd {
  font-size: 13px;
  color: var(--slate-light);
  line-height: 1.6;
}

/* ── Team group label ── */
.team-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 20px;
}
.team-group-label + .card-grid { margin-top: 0; }

/* ── Team cards ── */
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.team-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 16px;
}
.team-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 4px;
}
.team-card .team-role {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 16px;
}
.team-card .team-bio {
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.7;
}

/* ── Template detail cards (use cases page) ── */
details.template-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
}
details.template-card[open] {
  padding-bottom: 26px;
}
.template-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.template-summary::-webkit-details-marker { display: none; }
.template-summary::marker { content: ''; }
.template-summary:hover h3 { color: var(--primary); }
.template-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0;
  transition: color 0.15s;
}
.template-chevron {
  color: var(--slate-light);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}
details.template-card[open] .template-chevron {
  transform: rotate(180deg);
}
.template-criteria {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.template-criteria dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 2px;
  margin-top: 14px;
}
.template-criteria dt:first-of-type { margin-top: 0; }
.template-criteria dd {
  font-size: 13px;
  color: var(--slate-light);
  line-height: 1.6;
}

/* ── Legal / prose pages ── */
.legal-content {
  max-width: 720px;
}
.legal-content h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 8px;
}
.legal-content .legal-updated {
  font-size: 13px;
  color: var(--slate-light);
  margin-bottom: 36px;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--slate);
  margin-top: 36px;
  margin-bottom: 12px;
}
.legal-content p {
  font-size: 14px;
  color: var(--slate-mid);
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal-content a { color: var(--primary); }

/* ── Request Access page ── */
.request-access-panel {
  max-width: 560px;
}
.request-access-h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.2;
  margin-bottom: 20px;
}
.request-access-p {
  font-size: 15px;
  color: var(--slate-mid);
  line-height: 1.75;
  margin-bottom: 14px;
}
.request-access-hint {
  font-size: 13px;
  color: var(--slate-light);
  line-height: 1.6;
}

/* ── Pricing table ── */
.pricing-table-outer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;           /* clips corners; requires border-collapse:separate below */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--white);   /* fills rounded corners against surface section bg */
  max-width: 800px;
}
.pricing-table {
  width: 100%;
  border-collapse: separate;  /* border-collapse:collapse ignores overflow:hidden on parent, breaking the rounded corners */
  border-spacing: 0;
  font-size: 14px;
  min-width: 560px;
}
/* Header cells */
.pricing-table thead th {
  padding: 24px 20px 22px;
  vertical-align: top;
  text-align: center;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.pricing-table thead th:first-child {
  width: 22%;
  text-align: left;
}
.pricing-table thead th.col-featured {
  background: var(--primary-light);
  box-shadow: inset 0 3px 0 var(--primary); /* drawn inside cell, no border conflicts */
}
/* Body feature-label cells */
.pricing-table tbody th {
  padding: 9px 16px;
  text-align: left;
  font-weight: 400;
  color: var(--slate-light);
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
/* Body data cells */
.pricing-table tbody td {
  padding: 9px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  font-weight: 500;
  color: var(--slate);
  background: var(--white);
}
.pricing-table tbody tr:last-child th,
.pricing-table tbody tr:last-child td { border-bottom: none; }
/* Featured column — applied before hover so hover can layer on top */
.pricing-table .col-featured { background: rgba(3, 132, 198, 0.05); }
/* Row hover */
.pricing-table tbody tr:hover td { background: var(--surface); }
.pricing-table tbody tr:hover .col-featured { background: rgba(3, 132, 198, 0.09); }
/* Plan name & desc */
.pt-plan-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 6px;
}
.col-featured .pt-plan-name { color: var(--primary); }
.pt-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
}
.pt-plan-desc {
  font-size: 13px;
  color: var(--slate-light);
  line-height: 1.5;
  margin-bottom: 18px;
}
/* CTA button */
.pt-cta {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--slate-mid);
  transition: border-color 0.15s, color 0.15s;
}
.pt-cta:hover { border-color: var(--primary); color: var(--primary); }
.pt-cta--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.pt-cta--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
/* Cell value types */
.pt-check { color: var(--primary); font-weight: 700; }
.pt-na { color: var(--border); font-weight: 400; }
.pt-dev { color: var(--slate-light); font-style: italic; font-weight: 400; font-size: 13px; }
.pt-free { color: var(--primary); font-weight: 600; }
/* All plans include strip */
.pricing-includes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pricing-includes-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-light);
  white-space: nowrap;
  padding-right: 4px;
}
.pricing-includes-item {
  font-size: 13px;
  color: var(--slate-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pricing-includes-item::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--primary); /* color driven by CSS variable, not hardcoded in SVG */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 7l3 3 6-6' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 7l3 3 6-6' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-size: cover;
  mask-size: cover;
  flex-shrink: 0;
}

/* ── Focus styles ── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Mobile nav toggle ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--slate);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive nav ── */
@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
}
@media (max-width: 980px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12px; }
  .nav-logo-text { font-size: 14px; }
}

/* ── Mobile layout ── */
@media (max-width: 768px) {
  /* Nav: collapse to hamburger */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 11px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-divider { display: none; }
  .nav-links .btn-primary {
    display: block;
    text-align: center;
    margin-top: 4px;
    padding: 10px 18px;
  }

  /* Content grids: stack to single column */
  .card-grid,
  .card-grid--two,
  .steps-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero h1 { font-size: 28px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Section headers */
  .section-header h2,
  .section-header--left h2 { font-size: 22px; }

  /* Science sidebar: remove desktop offset when stacked */
  .sidebar-panel--offset { margin-top: 0; }
}
