/* ============================================================
   Human Factors Advisory — website stylesheet
   Self-contained: brand tokens inlined. No build step.
   ============================================================ */

:root {
  --hfa-slate: #38415D;
  --hfa-violet: #5D4FA6;
  --hfa-mauve: #A259A0;
  --hfa-periwinkle: #818FB8;
  --hfa-pink: #CD5D9A;

  --slate-950: #1c2033;
  --slate-900: #262b40;
  --slate-800: #38415D;
  --slate-600: #5d688c;
  --slate-500: #818FB8;
  --slate-400: #9fabca;
  --slate-300: #c2cadd;
  --slate-200: #dde2ee;
  --slate-100: #eceff6;
  --slate-50: #f5f7fb;
  --slate-25: #fafbfd;

  --violet-900: #322a5c;
  --violet-800: #433a7d;
  --violet-700: #5D4FA6;
  --violet-500: #8375c6;
  --violet-300: #b3aade;
  --violet-100: #e4e0f4;
  --violet-50: #f2f0fb;

  --mauve-700: #7f4380;
  --mauve-600: #A259A0;
  --pink-700: #b0447f;
  --pink-600: #CD5D9A;
  --pink-100: #f9e8f1;

  --text-strong: #38415D;
  --text-body: #414a68;
  --text-muted: #5d688c;
  --text-subtle: #818FB8;
  --accent: #5D4FA6;
  --accent-hover: #433a7d;

  --grad-brand: linear-gradient(90deg, #5D4FA6 0%, #A259A0 55%, #CD5D9A 100%);

  --font-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(56,65,93,.08), 0 1px 2px rgba(56,65,93,.05);
  --shadow-md: 0 4px 12px rgba(56,65,93,.09), 0 2px 4px rgba(56,65,93,.05);
  --shadow-lg: 0 12px 28px rgba(56,65,93,.12), 0 4px 8px rgba(56,65,93,.06);

  --ease: cubic-bezier(.4,0,.2,1);
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.45em;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--accent); text-decoration: none; transition: color .12s var(--ease); }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }

img { max-width: 100%; height: auto; }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.eyebrow .node-mini { flex-shrink: 0; }

.lead { font-size: 21px; line-height: 1.55; color: var(--text-body); max-width: 58ch; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-100);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 72px;
}
.nav-logo img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 13px; border-radius: var(--radius-sm);
  color: var(--text-strong); font-weight: 600; font-size: 15.5px; text-decoration: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.nav-links a:hover { background: var(--slate-50); color: var(--accent); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-cta {
  display: inline-block; padding: 10px 20px; border-radius: var(--radius-md);
  background: var(--accent); color: #fff !important; font-weight: 600; font-size: 15.5px;
  transition: background .12s var(--ease);
}
.nav-cta:hover { background: var(--accent-hover); text-decoration: none !important; }

/* dropdown */
.nav-dd { position: relative; }
.nav-dd > a { cursor: pointer; }
.nav-dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 8px; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s var(--ease), transform .15s var(--ease), visibility .15s;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dd-menu a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 15px; }
.nav-dd-menu .dd-note { font-size: 12.5px; font-weight: 500; color: var(--text-subtle); display: block; }

/* mobile */
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; color: var(--text-strong); }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--slate-100);
    flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-dd-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 16px; }
  .nav-cta-wrap { margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--slate-800); color: #fff; overflow: hidden;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner { position: relative; z-index: 2; padding: 120px 0 130px; max-width: 640px; }
.hero .eyebrow { color: var(--slate-400); }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero p { color: var(--slate-300); font-size: 20px; line-height: 1.6; max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(56,65,93,.94) 34%, rgba(56,65,93,.55) 62%, rgba(56,65,93,.18) 100%); z-index: 1; }
@media (max-width: 700px) { .hero-inner { padding: 84px 0 92px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: var(--radius-md);
  font-family: var(--font-sans); font-weight: 600; font-size: 16.5px; line-height: 1;
  cursor: pointer; border: 1px solid transparent; text-decoration: none !important;
  white-space: nowrap;
  transition: background .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: #fff; color: var(--text-strong) !important; }
.btn-light:hover { background: var(--slate-100); }
.btn-outline { background: transparent; color: var(--text-strong) !important; border-color: var(--slate-300); }
.btn-outline:hover { background: var(--slate-50); }
.btn-outline-light { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-tint { background: var(--slate-25); }
.section-dark { background: var(--slate-800); color: var(--slate-300); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-violet { background: var(--violet-50); }
.section-head { max-width: 720px; margin-bottom: 48px; }
@media (max-width: 700px) { .section { padding: 64px 0; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 34px 32px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
a.card { display: block; color: inherit; text-decoration: none !important; }
a.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; color: var(--text-body); font-size: 16px; }
.card .card-link { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--accent); font-size: 15.5px; }
.card-accent-top { position: relative; overflow: hidden; }
.card-accent-top::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-brand); }

/* ---------- Belt path (attunement) ---------- */
.belts { display: flex; flex-direction: column; gap: 0; max-width: 760px; }
.belt { display: flex; gap: 22px; position: relative; padding-bottom: 34px; }
.belt:last-child { padding-bottom: 0; }
.belt::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px; width: 2px; background: var(--slate-200); }
.belt:last-child::before { display: none; }
.belt-dot { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--slate-200); background: #fff; position: relative; z-index: 1; }
.belt h3 { margin-bottom: 4px; font-size: 1.15rem; }
.belt p { margin: 0; font-size: 16px; color: var(--text-body); max-width: 56ch; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 14.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; font-family: var(--font-sans); font-size: 16px; color: var(--text-strong);
  padding: 12px 14px; background: #fff; border: 1px solid var(--slate-300);
  border-radius: var(--radius-md); outline: none;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93,79,166,.22);
}
textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 14px; color: var(--text-muted); }

/* ---------- Stats / trust strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 800px) { .stat-strip { grid-template-columns: 1fr; } }
.stat .stat-val { font-size: 46px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.stat .stat-lbl { font-weight: 600; color: var(--text-strong); margin-top: 8px; }
.stat .stat-note { font-size: 14.5px; color: var(--text-muted); margin-top: 2px; }
.section-dark .stat .stat-lbl { color: #fff; }
.section-dark .stat .stat-note { color: var(--slate-400); }

/* ---------- Book cards ---------- */
.book-cover {
  aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 26px 22px; color: #fff; box-shadow: var(--shadow-md);
  background: var(--slate-800); position: relative;
}
.book-cover.violet { background: linear-gradient(160deg, #433a7d, #5D4FA6); }
.book-cover.mauve { background: linear-gradient(160deg, #7f4380, #A259A0); }
.book-cover.slate { background: linear-gradient(160deg, #262b40, #38415D); }
.book-cover .bc-title { font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.book-cover .bc-author { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.book-cover::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 58px; height: 2px; background: var(--grad-brand); opacity: .9; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: var(--slate-400); padding: 64px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer a { color: var(--slate-400); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-brand img { height: 30px; width: auto; filter: none; opacity: 1; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--slate-500); }

/* ---------- Misc ---------- */
.gradient-rule { height: 3px; width: 88px; border-radius: 2px; background: var(--grad-brand); border: none; margin: 0 0 26px; }
.pill {
  display: inline-block; padding: 5px 14px; border-radius: var(--radius-full);
  background: var(--violet-50); color: var(--violet-700); font-size: 13.5px; font-weight: 600;
}
.pill.pink { background: var(--pink-100); color: var(--pink-700); }
.check-list { list-style: none; margin: 0 0 1.2em; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; margin-top: 9px;
}
.breadcrumb { font-size: 14px; color: var(--text-subtle); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-subtle); }

/* ---------- Article pages ---------- */
.article-body { font-size: 17.5px; line-height: 1.7; }
.article-body h2 { font-size: 1.55rem; margin-top: 1.6em; }
.article-body h3 { font-size: 1.2rem; margin-top: 1.4em; }
.article-body img { border-radius: var(--radius-md); display: block; margin: 10px auto; }
.article-body figure { margin: 28px 0; }
.article-body figcaption { font-size: 14px; color: var(--text-subtle); text-align: center; margin-top: 8px; }
.article-body blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--violet-500); color: var(--text-strong); font-size: 1.12em; }
.article-body hr { border: none; border-top: 1px solid var(--slate-200); margin: 36px auto; width: 120px; }
.article-body pre { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 16px 18px; overflow-x: auto; font-size: 14.5px; }

/* ---------- Archive list ---------- */
.archive-year { font-size: 1.1rem; letter-spacing: .1em; color: var(--text-subtle); font-weight: 700; margin: 40px 0 8px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { border-bottom: 1px solid var(--slate-100); }
.archive-list a { display: flex; gap: 18px; align-items: baseline; padding: 13px 4px; color: var(--text-strong); font-weight: 600; text-decoration: none; border-radius: var(--radius-sm); }
.archive-list a:hover { background: var(--slate-50); color: var(--accent); text-decoration: none; }
.archive-list .a-date { font-size: 13.5px; color: var(--text-subtle); font-weight: 500; flex-shrink: 0; width: 84px; font-variant-numeric: tabular-nums; }
.archive-search { max-width: 420px; margin-bottom: 8px; }

.page-hero { background: var(--slate-800); color: #fff; padding: 84px 0 72px; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero p { color: var(--slate-300); font-size: 19.5px; max-width: 54ch; }
.page-hero .eyebrow { color: var(--slate-400); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
