/* Good Business Partners — shared styles
   Brand: Poppins (headings) + Lato (everything else), green/teal gradient,
   matching the Good Business Pays board-brief system. */

:root {
  --green: #5FBE4C;
  --teal: #4FA5BE;
  --gold: #c9a13b;
  --grad-green: #70C06B;
  --dark: #151515;
  --body: #2C2C2C;
  --muted: #6b7280;
  --border: #e6e9ec;
  --bg-soft: #f6f9f7;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 30, 25, 0.06);
  --shadow-hover: 0 8px 24px rgba(20, 30, 25, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--body);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-soft);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4, .heading-font {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.5em;
}

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

img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--dark);
}
.brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), var(--grad-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 700;
}
.brand small {
  display: block;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 700;
}
.nav-links a { color: var(--body); }
.nav-links a.active,
.nav-links a:hover { color: var(--green); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--grad-green));
  color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-outline {
  background: transparent;
  border-color: var(--dark);
  color: var(--dark);
}
.btn-outline:hover { background: var(--dark); color: white; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-white {
  background: white;
  color: var(--dark);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--grad-green) 100%);
  color: white;
  padding: 84px 0 96px;
}
.hero .eyebrow {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;
  margin-bottom: 14px;
}
.hero h1 {
  color: white;
  font-size: 46px;
  line-height: 1.12;
  max-width: 720px;
}
.hero p.lead {
  font-size: 18px;
  max-width: 560px;
  opacity: 0.95;
  margin: 18px 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stat-row {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.stat-row .stat b {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
}
.stat-row .stat span {
  font-size: 13px;
  opacity: 0.9;
}

/* ---------- Sections ---------- */
section.section { padding: 76px 0; }
.section-label {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: 30px; }
.section-head p { color: var(--muted); font-size: 16px; }
.bg-white { background: white; }

/* how it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 14px;
}
.step-card h3 { font-size: 18px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* callout banner (reused from board brief) */
.callout {
  background: var(--green);
  color: white;
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.5;
  padding: 34px 24px;
}

/* company cards / directory */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 30px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.filters input[type="text"],
.filters select {
  font-family: 'Lato', sans-serif;
  font-size: 14.5px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.filters input[type="text"] { flex: 1; min-width: 220px; }
.result-count { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.company-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.company-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: white;
  font-size: 15px;
  flex-shrink: 0;
}
/* Company Spotlight benefit: an approved company logo replaces the coloured-initials badge,
   sized to fit the same box (contain, never cropped or stretched) with a thin border since
   the background switches to white to suit transparent-background logo files. */
.avatar.avatar-logo, .profile-avatar.avatar-logo {
  border: 1px solid var(--border);
  padding: 5px;
  box-sizing: border-box;
}
.avatar-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-top h3 { font-size: 16.5px; margin: 0; }
.card-top .sector { font-size: 12.5px; color: var(--muted); }
.badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef8ec;
  color: #2f7a24;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #2f7a24; }
/* Tier-specific fills so Platinum/Gold/Recognised read apart at a glance, not just by their
   text label. Recognised Fast Payer keeps the original green .badge styling above. */
.badge-platinum { background: #e3e8ec; color: #51606c; }
.badge-platinum .dot { background: #8494a1; }
.badge-gold { background: #fbe8a6; color: #8a6a00; }
.badge-gold .dot { background: #d4a017; }

/* payment-speed stacked bar chart */
.bucket-chart { overflow-x: auto; padding-bottom: 4px; }
.bucket-bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-width: min-content;
}
.bucket-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bucket-bar {
  width: 34px;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.bucket-seg { width: 100%; }
.bucket-green { background: #5FBE4C; }
.bucket-amber { background: #E8A83C; }
.bucket-red { background: #D9573B; }
.bucket-year { font-size: 12px; color: var(--muted); font-weight: 700; }
.bucket-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--body);
  flex-wrap: wrap;
}
.bucket-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bucket-swatch {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 3px;
}
.sci-score { font-size: 12.5px; color: var(--muted); }
.sci-score b { color: var(--dark); }
.descriptor-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px;
  color: var(--body);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}
.card-cta { margin-top: auto; font-size: 13.5px; font-weight: 700; color: var(--teal); }

/* certified / concept-demo styling -- same white card as Platinum/Gold/Listed (a dark reversed-out
   card read as too jarring next to the newly coloured tier badges); only the "Certified Customer
   of Choice" badge itself uses a dark gold fill, so certified companies still stand out without
   the whole card clashing visually. */
.certified-card {
  background: white;
  border: 1.5px solid var(--gold);
  position: relative;
}
.badge-certified {
  background: #3a2d12;
  color: #f4ead0;
}
.badge-certified .dot { display: none; }
.demo-flag {
  display: block;
  background: #f4ead0;
  color: #6b5220;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 6px;
  margin: -6px -6px 4px;
  text-align: center;
}
.demo-banner {
  display: block;
  background: #2f2410;
  color: #f0d99a;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.cert-before-after {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 0;
}
.cert-before-after .cba-item { text-align: center; }
.cert-before-after .cba-item b { font-family: 'Poppins', sans-serif; font-size: 22px; display: block; }
.cert-before-after .cba-item span { font-size: 11.5px; color: var(--muted); }
.cert-before-after .cba-arrow { font-size: 20px; color: var(--muted); }
.cert-dimensions { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cert-dimensions li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.cert-rating {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.cert-rating-green { background: #eef8ec; color: #2f7a24; }
.cert-rating-amber { background: #fdf1de; color: #93600f; }
.cert-rating-red { background: #fbe9e6; color: #a3341f; }

.history-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.history-legend .chip b { color: var(--dark); }

/* profile page */
.profile-hero {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.profile-top { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile-avatar {
  width: 84px; height: 84px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: white;
}
.profile-meta h1 { font-size: 30px; margin-bottom: 6px; }
.profile-meta .sector { color: var(--muted); font-size: 14.5px; }
.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 44px;
}
.score-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  height: fit-content;
}
.score-ring {
  width: 130px; height: 130px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--green) calc(var(--pct) * 1%), #eef1ee 0);
}
.score-ring-inner {
  width: 104px; height: 104px;
  border-radius: 50%;
  background: white;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-ring-inner b { font-family: 'Poppins', sans-serif; font-size: 28px; }
.score-ring-inner span { font-size: 11px; color: var(--muted); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.pricing-grid .pricing-card { max-width: none; margin: 0; display: flex; flex-direction: column; }
.pricing-grid .pricing-list { flex: 1; }
.pricing-card {
  background: white;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}
.pricing-card.pricing-card-free { border-color: var(--border); }
.pricing-card .price {
  font-family: 'Poppins', sans-serif;
  font-size: 42px;
  margin: 10px 0 2px;
}
.pricing-card .price span { font-size: 15px; font-weight: 400; color: var(--muted); }
.pricing-list { text-align: left; margin: 26px 0; padding: 0; list-style: none; }
.pricing-list li { padding: 8px 0; font-size: 14.5px; display: flex; gap: 10px; }
.pricing-list li:before { content: "✓"; color: var(--green); font-weight: 700; }

.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  font-family: 'Lato', sans-serif;
  font-size: 14.5px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.form-row textarea { min-height: 100px; resize: vertical; }

footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 46px 0;
  font-size: 13.5px;
}
footer .foot-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px; margin-bottom: 24px;
}
footer .brand { color: white; }
footer a:hover { color: white; }
footer .foot-links { display: flex; gap: 26px; flex-wrap: wrap; }

.sample-flag {
  display: inline-block;
  background: #fff7e6;
  color: #8a6100;
  border: 1px solid #f0dca6;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 18px;
}

@media (max-width: 860px) {
  .steps, .card-grid, .pricing-grid { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .steps, .card-grid, .pricing-grid { grid-template-columns: 1fr; }
}

/* ============ Certified profile: premium hero, heatmap, review, sponsor panel ============
   Folded in from the mockup-certified-profile.html design pass. Applied via JS to any
   profile with a `certification` object (real or demo), not just one company. */
.profile-hero.cert-premium {
  background: linear-gradient(135deg, #1f1a10 0%, #3a2d12 55%, #6b5220 100%);
  color: #f4ead0;
  border-bottom: none;
}
.profile-hero.cert-premium .back-link,
.profile-hero.cert-premium a { color: #e7d19c; }
.profile-hero.cert-premium .profile-avatar { border: 2px solid #f4ead0; }
.profile-hero.cert-premium h1 { color: #fff; }
.profile-hero.cert-premium .sector { color: #e7d19c; }
.cert-crest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(244,234,208,0.35);
  color: #f4ead0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tier-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; }
.tier-legend span {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #e7d19c;
  border: 1px solid rgba(244,234,208,0.25);
}
.tier-legend .current { background: #f4ead0; color: #4a3a12; font-weight: 700; }

.heatmap-domain { margin-bottom: 18px; }
.heatmap-domain h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 4px; }
.heatmap-domain-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.heatmap-standards { display: flex; flex-direction: column; gap: 6px; }
.heatmap-standard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.heatmap-standard.hm-green { background: #eef8ec; }
.heatmap-standard.hm-amber { background: #fdf1de; }
.heatmap-standard.hm-red { background: #fbe9e6; }
.heatmap-standard .code { font-weight: 700; color: var(--muted); font-size: 11.5px; margin-right: 8px; }
.heatmap-status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; flex-shrink: 0; }
.hm-green .heatmap-status { background: #d9f0d3; color: #2f7a24; }
.hm-amber .heatmap-status { background: #fbe3ba; color: #93600f; }
.hm-red .heatmap-status { background: #f6d0c8; color: #a3341f; }

.gbp-review-panel {
  margin-bottom: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 20px 24px;
}
.gbp-review-panel .label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--green); margin-bottom: 10px; display: block;
}
.gbp-review-panel p { font-size: 14px; color: var(--body); line-height: 1.6; margin: 0 0 12px; }
.gbp-review-panel p:last-of-type { margin-bottom: 0; }
.gbp-review-source-note { margin-top: 14px; font-size: 12px; color: var(--muted); font-style: italic; }

.sponsor-panel { margin-top: 32px; border: 1.5px solid var(--gold); border-radius: 14px; overflow: hidden; background: #fffdf7; }
.sponsor-panel-head { background: #f4ead0; padding: 12px 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.sponsor-panel-head .label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #6b5220; }
.sponsor-panel-head .disclaimer { font-size: 11px; color: #8a7a4f; }
.sponsor-panel-body { padding: 22px 24px 26px; }
.sponsor-tagline { font-family: 'Poppins', sans-serif; font-size: 19px; margin: 0 0 10px; color: var(--dark); }
.sponsor-about { font-size: 14px; color: var(--body); margin: 0 0 18px; line-height: 1.6; }
.sponsor-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.sponsor-highlight { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 13px; color: var(--body); }
.sponsor-highlight b { display: block; font-family: 'Poppins', sans-serif; font-size: 14px; margin-bottom: 4px; color: var(--dark); }
.sponsor-links { display: flex; gap: 10px; flex-wrap: wrap; }
.sponsor-links a { font-size: 13px; font-weight: 700; color: #fff; background: #4a3a12; padding: 8px 16px; border-radius: 999px; text-decoration: none; }
.sponsor-links a:hover { background: #6b5220; }

/* Placeholder/pricing-preview sponsor content on an otherwise real company profile (e.g. the
   M Group mockup) -- deliberately styled in red/warning tones, distinct from the gold "real"
   sponsor panel, so a visitor can never mistake bracketed demo text for genuine paid content. */
.sponsor-demo-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #b23b3b; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.sponsor-demo-disclaimer { color: #b23b3b; font-weight: 700; }
