/* ============================================================
   HireHax — Leadership Readiness Snapshot
   Design tokens + base + primitives
   ============================================================ */

:root {
  /* Ink / neutrals (slightly cool charcoal, warm-neutral paper) */
  --ink:        #14171a;
  --ink-2:      #2b3036;
  --ink-3:      #565d66;
  --ink-4:      #828a93;
  --ink-5:      #aab0b8;

  --paper:      #ffffff;
  --paper-2:    #f7f8f9;
  --paper-3:    #eef0f2;
  --line:       #e4e7ea;
  --line-2:     #d4d8dd;

  --dark:       #14171a;   /* dark sections */
  --dark-2:     #1c2024;
  --dark-3:     #2a2f35;
  --on-dark:    #f4f5f6;
  --on-dark-2:  #9aa1aa;
  --on-dark-3:  #6b727b;
  --dark-line:  #2c3137;

  /* Accent (themeable via --accent on :root) */
  --accent:     #2f5fb0;
  --accent-700: #244c90;
  --accent-600: #2f5fb0;
  --accent-500: #3b6fd4;
  --accent-tint:#eef3fb;
  --accent-tint-2:#dfeaf8;
  --accent-ink: #1d3a6e;

  /* Score band colors (desaturated, premium) */
  --band-risk:   #b34a36;  /* High Risk — clay   */
  --band-risk-bg:#f7ece9;
  --band-vuln:   #b07f2b;  /* Vulnerable — amber */
  --band-vuln-bg:#f7f1e4;
  --band-ready:  #2f8a6b;  /* Growth Ready — teal*/
  --band-ready-bg:#e8f3ee;
  --band-high:   #2f5fb0;  /* High Performance   */
  --band-high-bg:#eaf1fb;

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono:  "Geist Mono", "SFMono-Regular", ui-monospace, "JetBrains Mono", monospace;

  /* Radius / shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20,23,26,.05), 0 1px 1px rgba(20,23,26,.04);
  --shadow-md: 0 4px 14px rgba(20,23,26,.07), 0 1px 3px rgba(20,23,26,.05);
  --shadow-lg: 0 18px 50px rgba(20,23,26,.13), 0 6px 16px rgba(20,23,26,.07);

  --maxw: 1160px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; }

::selection { background: var(--accent-tint-2); color: var(--accent-ink); }

/* ---------- Typographic primitives ---------- */
.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-4);
}
.eyebrow.on-dark { color: var(--on-dark-3); }
.eyebrow .dot { color: var(--accent); }

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.app-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 540; font-size: 15px;
  letter-spacing: -0.005em;
  padding: 13px 22px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-700); box-shadow: 0 8px 22px rgba(47,95,176,.28); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--paper); }
.btn-ghost.on-dark { color: var(--on-dark); border-color: var(--dark-line); }
.btn-ghost.on-dark:hover { border-color: var(--on-dark-3); background: rgba(255,255,255,.04); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px; border: 1px solid var(--line-2);
  color: var(--ink-3); background: var(--paper);
}
.pill .led { width: 6px; height: 6px; border-radius: 100px; background: var(--accent); }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- Fade / motion ---------- */
@keyframes riseIn { from { transform: translateY(16px); } to { transform: none; } }
@keyframes fadeIn { from { transform: translateY(6px); } to { transform: none; } }
@keyframes drawDash { to { stroke-dashoffset: var(--dash-final); } }
.rise { animation: riseIn .6s cubic-bezier(.2,.7,.2,1) both; }
.fade { animation: fadeIn .45s ease both; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; }
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 540; color: var(--ink-3); letter-spacing: .005em; }
.field input, .field select {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.field input:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.field input::placeholder { color: var(--ink-5); }

/* ---------- Scrollbar (subtle) ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #cdd2d8; border-radius: 8px; border: 3px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: #b7bdc4; }

/* ====================== PRINT / PDF ====================== */
.print-only { display: none; }
.no-print { }

/* Spinner */
.hh-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--dark-3); border-top-color: var(--accent-500);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* PDF page chrome (screen + print) */
.pdf-mono { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.pdf-page {
  width: 210mm; min-height: 297mm; background: #fff; color: var(--ink);
  margin: 0 auto; padding: 18mm 18mm 14mm; display: flex; flex-direction: column;
  position: relative; box-sizing: border-box;
}
.pdf-head { display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.pdf-body { flex: 1; }
.pdf-foot { display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--line); margin-top: 22px; }
.pdf-h2 { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.pdf-p { font-size: 12px; line-height: 1.6; color: var(--ink-2); margin: 0 0 8px; }
.pdf-cover { justify-content: space-between; }
.pdf-cover-top { display: flex; justify-content: space-between; align-items: center; }
.pdf-cover-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; }
.pdf-cover-bot { display: flex; justify-content: space-between; align-items: flex-end;
  padding-top: 20px; border-top: 1px solid var(--line); }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff; }
  .screen-only, .no-print { display: none !important; }
  .print-only { display: block !important; }
  .pdf-page { margin: 0; page-break-after: always; break-after: page; box-shadow: none; }
  .pdf-page:last-child { page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 980px) {
  .wrap { padding: 0 24px; }
  .hero-grid, .two-col, .hero-report-grid { grid-template-columns: 1fr !important; }
  .three-col { grid-template-columns: 1fr !important; }
  .hero-report-grid > div:last-child { display: none; }      /* hide radar on narrow */
  .display { font-size: clamp(30px, 7vw, 48px) !important; }
}
@media (max-width: 640px) {
  .three-col { grid-template-columns: 1fr !important; }
  .dim-row { grid-template-columns: 1fr !important; gap: 10px !important; }
  .dim-row > div:last-child { text-align: left !important; }
  .hire-row { grid-template-columns: 1fr !important; }
  .hire-row > div:last-child { grid-template-columns: 1fr !important; }
}
