/* Human Performance Group — styles.
   Redesign 2026-07-30: replaces the earlier navy/violet first pass with the
   client-supplied dark/teal design sample (HPG_LB 2.html) — now the
   authoritative visual + content reference for this site. System font stack
   (no self-hosted fonts) matches the sample exactly; no custom @font-face,
   so the CSP needs no font-src exception either.

   Layout/a11y structure per the starter kit (LAYOUT.md), carried over from
   the previous pass and preserved here even where the raw sample didn't
   have it (skip link, focus-visible, prefers-reduced-motion, honeypot,
   explicit `background` on every button variant, grid tiers stepping
   N → 2 → 1): the sample is a static mockup, these are a quality bar. */

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

:root {
  --bg: #0b1220;
  --panel: #111c31;
  --panel-2: #0f1830;
  --line: rgba(255,255,255,.08);
  --text: #e7ecf3;
  --muted: #9aa7bd;
  --accent: #2DD48E;      /* brand kit --chpg-accent (the design sample's #2dd4bf was
                             a near-miss on this; kit is authoritative) */
  --accent-2: #22b8a3;    /* brand kit --chpg-accent-2 */
  --accent-light: #68E0AE;/* brand kit --chpg-accent-light */
  --on-accent: #0b1220;   /* brand dark as text on accent fills — 9.7:1 */
  --radius: 14px;
  --maxw: 1180px;
  --gutter: 24px;
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}
@media (min-width: 1600px) { :root { --maxw: 1320px; } }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 88px 0; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; }

/* ---------- accessibility helpers (kept even though the sample lacks them) ---------- */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; padding: 10px 16px; border-radius: 8px; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
section[id] { scroll-margin-top: 76px; }
.honeypot { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 10px; display: block;
}
.lede { color: var(--muted); font-size: 17px; max-width: 640px; }

/* ---------- buttons (every variant sets an explicit background — the
   recurring UA-default ButtonFace bug this family has shipped twice) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: rgba(255,255,255,.25); }

/* ---------- header / nav ---------- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,18,32,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Keep .wrap's horizontal gutter — a bare `padding: 16px 0` here (as in the design
   sample) overrides it entirely, so the header ignores the container and the logo
   sits flush to the viewport edge on narrow screens. */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter); }
.brand { display: flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }
@media (max-width: 420px) { .brand-logo { height: 32px; } }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; }
.nav-links a { font-size: 14px; color: var(--muted); font-weight: 600; padding: .3rem 0; }
.nav-links a:hover { color: var(--text); }
.navcta { display: flex; align-items: center; gap: 16px; }
.menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; min-height: 44px; min-width: 44px; }

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--panel); flex-direction: column; padding: 16px var(--gutter); gap: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; }
}

/* ---------- hero ---------- */
.hero { padding-top: 64px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; }
.hero h1 .accent { color: var(--accent); }
.pillbar { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--muted); }
.hero-ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.stat-strip {
  margin-top: 52px; border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(3, 1fr); background: var(--panel); overflow: hidden;
}
.stat-strip > div { padding: 22px 18px; border-right: 1px solid var(--line); }
.stat-strip > div:last-child { border-right: none; }
.stat-strip .num { font-size: 26px; font-weight: 800; }
.stat-strip .lab { font-size: 12px; color: var(--muted); letter-spacing: .04em; margin-top: 4px; }
/* 3 stats stack straight to one column — a 2-col tier would leave a ragged
   empty cell on the second row. */
@media (max-width: 700px) {
  .stat-strip { grid-template-columns: 1fr; }
  .stat-strip > div { border-right: none; border-bottom: 1px solid var(--line); }
  .stat-strip > div:last-child { border-bottom: none; }
}

/* ---------- section headers ---------- */
.sec-head { max-width: 680px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }

/* ---------- 3-step ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1180px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step .step-no { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.step h3 { margin-top: 10px; font-size: 20px; }
.step p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- brand grid ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .brand-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: .6rem; }
.card .eyebrow { margin-bottom: 4px; }
.badge { font-size: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); white-space: nowrap; }
.badge.established { color: var(--accent); border-color: rgba(45,212,191,.35); }
.card h3 { font-size: 19px; margin: 2px 0 4px; }
.card .sub { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; flex: 1; margin: 0 0 16px; }
.card .cta { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.card .cta:hover { color: var(--accent-2); }

/* ---------- philosophy / method panel ---------- */
.philosophy { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.philosophy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .philosophy-grid { grid-template-columns: 1fr; } }
.philosophy ul { list-style: none; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.philosophy li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- ecosystem chip list ---------- */
.eco-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.eco-list span { border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px; color: var(--muted); }

/* ---------- education & network ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .edu-grid { grid-template-columns: 1fr; } }

/* ---------- closing CTA / contact ---------- */
.closing {
  background: linear-gradient(135deg, #0f2b28, #0b1220);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 44px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center;
}
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } }
.closing h2 { font-size: 28px; margin-bottom: 10px; }
.closing p { color: var(--muted); margin: 0 0 20px; }
.closing-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) { .closing-ctas { justify-content: flex-start; } }
.contact-line { margin-top: 14px; font-size: 14px; color: var(--muted); }
.contact-line a { color: var(--accent); font-weight: 600; }

/* the enquiry form (kept, restyled — see index.html for why it stays instead
   of the sample's plain mailto: it's real, tested lead-capture infra that
   also routes by brand, which the sample's flat "start a conversation"
   mailto can't do) */
.form-panel {
  margin-top: 44px; max-width: 820px; background: var(--panel);
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius); padding: 2.4rem; text-align: left;
}
.form-panel h3 { font-size: 22px; margin-bottom: .4rem; }
.fp-sub { font-size: 14px; color: var(--muted); margin-bottom: 1.6rem; line-height: 1.6; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.3rem; }
@media (max-width: 640px) { .f-grid { grid-template-columns: 1fr; } }
.f-field { display: flex; flex-direction: column; min-width: 0; }
.f-field.full { grid-column: 1 / -1; }
.f-field label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: .4rem; }
.f-field label b { color: var(--accent); }
.f-field input, .f-field select, .f-field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: .7rem .85rem; min-height: 44px; width: 100%; min-width: 0;
}
.f-field textarea { min-height: 120px; resize: vertical; }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent);
}
.f-consent { display: flex; gap: .7rem; align-items: flex-start; margin: 1.3rem 0; }
.f-consent input { width: 18px; height: 18px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--accent); }
.f-consent label { font-size: 13.5px; font-weight: 400; color: var(--muted); line-height: 1.55; }
.f-actions { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.f-note { font-size: 12.5px; color: var(--muted); }
.f-note a { color: var(--accent); }
.f-status { margin-top: 1rem; font-size: 14px; min-height: 1.4em; }
.f-status.ok { color: #6fe3a3; }
.f-status.err { color: #ff9b8a; }

/* ---------- cookie bar ---------- */
.cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: var(--panel); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s ease;
}
.cookiebar.show { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .cookiebar { transition: none; } }
.cb-inner { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap; }
.cb-inner p { font-size: .85rem; color: var(--muted); max-width: 640px; margin: 0; }
.cb-inner a { color: var(--accent); }
.cb-btns { display: flex; gap: .8rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 28px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { color: var(--text); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-grid ul a:hover { color: var(--text); }
.foot-bottom {
  display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; gap: 10px;
}

/* ---------- legal pages / 404 (dark theme to match) ---------- */
.doc-page { background: var(--bg); }
.back-link { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 2rem; }
.back-link:hover { color: var(--accent-2); }
.back-link.bottom { margin: 2.5rem 0 0; }
.doc { max-width: 800px; margin: 0 auto; padding: 8rem var(--gutter) 5rem; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; color: var(--text); margin-bottom: .5rem; }
.doc .doc-updated { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2rem; }
.doc h2 { font-size: 1.25rem; font-weight: 800; color: var(--text); margin: 2.1rem 0 .8rem; }
.doc h3 { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 1.5rem 0 .6rem; }
.doc p, .doc li { font-size: .95rem; line-height: 1.75; color: var(--muted); }
.doc ul, .doc ol { padding-left: 1.4rem; margin: .6rem 0 1rem; }
.doc p { margin-bottom: 1rem; }
.doc a { color: var(--accent); }
.doc table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: .6rem .8rem; font-size: .88rem; text-align: left; vertical-align: top; color: var(--muted); }
.doc th { color: var(--text); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .74rem; background: var(--panel); }
.doc-tablewrap, .table-wrap { overflow-x: auto; }
.notfound { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.notfound .wrap { width: 100%; padding-top: 8rem; padding-bottom: 4rem; }
.notfound h1 { font-size: clamp(4rem, 10vw, 8rem); font-weight: 800; color: var(--accent); line-height: 1; }
.notfound p { color: var(--muted); margin: 1rem 0 2rem; }

/* ---------- reveal on scroll (additive polish, not in the raw sample —
   kept from the previous pass since it doesn't contradict the design) ---------- */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.fade-up.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-up { opacity: 1; transform: none; transition: none; } }

@media (max-width: 540px) {
  section { padding: 56px 0; }
  .philosophy { padding: 24px; }
  .closing { padding: 28px; }
  .form-panel { padding: 1.5rem; }
}
