/* ============================================================
   HOME REDESIGN — custom styles for the new homepage layout
   Design system: white #ffffff canvas, cobalt #0022cb accent,
   #f4f6fc surfaces, SF Pro Display headings, Space Grotesk body,
   22-28px border radius, 99px pills, chromatic cobalt shadows.
   ============================================================ */

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

/* ---- CSS tokens ------------------------------------------- */
:root {
  --cobalt: #0022cb;
  --cobalt-hover: #001cb3;
  --cobalt-pale: #dce5ff;
  --cobalt-tint: #f4f6fc;
  --ink: #1d1d1f;
  --muted: #4f5b6e;
  --muted-2: #536173;
  --border: #e3e9f0;
  --border-pale: #dce5ff;
  --white: #ffffff;
  --shadow-card: 0 12px 36px rgba(0, 34, 203, 0.05);
  --shadow-drawer: 0 24px 70px rgba(10, 26, 51, 0.19);
  --r-pill: 99px;
  --r-card: 22px;
  --r-card-lg: 28px;
  --space: 28px;
}

/* ---- Sticky nav bar --------------------------------------- */
.hn-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hn-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
}
.hn-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.hn-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: transparent;
  flex-shrink: 0;
  overflow: hidden;
}
.hn-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.hn-name { font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.hn-title { font-size: 10px; color: var(--muted-2); display: block; }

.hn-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 768px) { .hn-nav { display: flex; } }
.hn-nav a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-2);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.hn-nav a:hover { color: var(--cobalt); }
.hn-nav a.active {
  color: var(--cobalt);
  background: var(--cobalt-tint);
  font-weight: 600;
}

.hn-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-pale);
  background: var(--cobalt-tint);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.hn-cta:hover { background: var(--cobalt-pale); }
.hn-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ---- Section wrapper ------------------------------------- */
.hx-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}
@media (max-width: 640px) {
  .hx-wrap { padding-left: 20px; padding-right: 20px; }
}

/* ---- Hero --------------------------------------------- */
.hx-hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hx-hero-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.hx-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--cobalt-pale);
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.hx-location {
  font-size: 12px;
  color: var(--muted-2);
}
.hx-h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.04;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: 820px;
}
.hx-h1 span { color: var(--cobalt); }
.hx-lede {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--muted);
  line-height: 1.65;
  max-width: 580px;
  margin: 0 0 36px;
}
.hx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Buttons ------------------------------------------ */
.btn-cobalt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,34,203,0.25);
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-cobalt:hover {
  background: var(--cobalt-hover);
  box-shadow: 0 6px 20px rgba(0,34,203,0.35);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-pale);
  background: var(--cobalt-tint);
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--cobalt-pale); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-outline:hover { color: var(--ink); border-color: rgba(0,34,203,0.3); }

/* ---- Section header ------------------------------------ */
.hx-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}
.hx-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hx-section-note {
  font-size: 12px;
  color: var(--muted-2);
}

/* ---- Persona switcher ---------------------------------- */
.hx-persona {
  padding: 72px 0;
}
.hx-persona-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .hx-persona-grid { grid-template-columns: repeat(3, 1fr); }
}
.hx-persona-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--cobalt-tint);
  padding: 28px;
  transition: border-color 0.2s;
}
.hx-persona-card:hover { border-color: rgba(0,34,203,0.35); }
.hx-persona-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
}
.hx-persona-h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 10px;
}
.hx-persona-p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.hx-persona-foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.hx-persona-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--cobalt);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hx-persona-link:hover { text-decoration: underline; }

/* ---- Work section ------------------------------------- */
.hx-work {
  padding: 72px 0;
}
.hx-work-header {
  margin-bottom: 48px;
}
.hx-work-pretitle {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--cobalt-pale);
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hx-work-h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--ink);
  margin: 0 0 12px;
}
.hx-work-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 400px;
}
.hx-case-card {
  border-radius: var(--r-card-lg);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 40px 48px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.hx-case-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  margin-bottom: 20px;
}
.hx-case-meta-co { color: var(--cobalt); }
.hx-case-h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--ink);
  margin: 0 0 16px;
}
.hx-case-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 700px;
  margin: 0 0 28px;
}
.hx-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 480px) { .hx-metrics { grid-template-columns: repeat(3, 1fr); } }
.hx-metric {
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--cobalt-tint);
  padding: 22px 20px;
}
.hx-metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.hx-metric-value {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.75rem;
  color: var(--cobalt);
  margin-bottom: 4px;
}
.hx-metric-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* Work CTA row */
.hx-work-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hx-work-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--cobalt);
  text-decoration: none;
}
.hx-work-more:hover { text-decoration: underline; }

/* ---- Evaluator / Tools section ----------------------- */
.hx-eval {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
.hx-eval-header {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 40px;
}
.hx-eval-h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--ink);
  margin: 12px 0 10px;
}
.hx-eval-desc { font-size: 13px; color: var(--muted); }
.hx-eval-widget {
  max-width: 680px;
  margin: 0 auto;
  border-radius: var(--r-card-lg);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 32px 36px;
  box-shadow: 0 12px 36px rgba(0,34,203,0.06);
}
.hx-eval-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hx-eval-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.hx-eval-title-txt {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.hx-eval-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.hx-eval-score-num {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--cobalt);
  letter-spacing: -0.02em;
}
.hx-eval-score-denom {
  font-size: 12px;
  color: var(--muted-2);
}
.hx-eval-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.hx-eval-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.hx-eval-badge {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--cobalt-pale);
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 700;
}
.hx-eval-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.hx-eval-launch:hover { background: var(--cobalt-hover); }

/* ---- Drawer ------------------------------------------- */
.hx-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10,26,51,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.hx-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.hx-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  height: 100%;
  border-left: 1px solid var(--border);
  background: var(--white);
  padding: 32px;
  overflow-y: auto;
  box-shadow: var(--shadow-drawer);
  transform: translateX(32px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hx-overlay.open .hx-drawer { transform: translateX(0); }

.hx-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hx-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hx-drawer-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.hx-drawer-close {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  background: none;
  border: none;
  cursor: pointer;
}
.hx-drawer-close:hover { color: var(--ink); }

.hx-drawer-name-block { margin-bottom: 24px; }
.hx-drawer-name {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 6px 0 2px;
}
.hx-drawer-role { font-size: 12px; color: var(--muted-2); }

.hx-drawer-avail {
  border-radius: 20px;
  background: var(--cobalt-tint);
  padding: 14px 16px;
  margin-bottom: 24px;
}
.hx-drawer-avail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 4px;
}
.hx-drawer-avail-text { font-size: 13px; color: var(--ink); }
.hx-drawer-avail-text strong { font-weight: 600; }

.hx-drawer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hx-drawer-stat {
  background: var(--cobalt-tint);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}
.hx-drawer-stat-val {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--cobalt);
  letter-spacing: -0.02em;
}
.hx-drawer-stat-lbl { font-size: 11px; color: var(--muted-2); }

.hx-drawer-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.hx-drawer-cta-primary {
  display: block;
  padding: 14px;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.hx-drawer-cta-primary:hover { background: var(--cobalt-hover); }
.hx-drawer-cta-secondary {
  display: block;
  padding: 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--cobalt-tint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.hx-drawer-cta-secondary:hover { background: var(--border); }

/* ---- Responsive tweaks -------------------------------- */
@media (max-width: 640px) {
  .hx-hero { padding: 48px 0 56px; }
  .hx-case-card { padding: 24px 20px; }
  .hx-eval-widget { padding: 24px 20px; }
  .hn-inner { padding: 0 20px; }
}
