/* Theme variables */

:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #1e3a5f;
  --color-text: #0f172a;
  --color-muted: #6b7280;
  --color-header-bg: #1e3a5f;
  --color-header-text: #e5e7eb;
  --color-footer-bg: #0b1628;
  --color-footer-text: #9ca3af;
  --color-border: #d1d5db;
  --color-accent: #3b82f6;
  --color-accent-soft: #dbeafe;
  --color-pill-bg: #e0effe;
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.06);
  --shadow-hero-card: 0 22px 45px rgba(15, 23, 42, 0.35);
}

html[data-theme="dark"] {
  --color-bg: #020617;
  --color-surface: #020617;
  --color-surface-soft: #1e3a5f;
  --color-text: #e5e7eb;
  --color-muted: #9ca3af;
  --color-header-bg: #0f1f3d;
  --color-header-text: #e5e7eb;
  --color-footer-bg: #000000;
  --color-footer-text: #6b7280;
  --color-border: #1f2933;
  --color-accent: #60a5fa;
  --color-accent-soft: #1e3a5f;
  --color-pill-bg: #1e3a5f;
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.6);
  --shadow-hero-card: 0 22px 45px rgba(15, 23, 42, 0.8);
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Header */

.site-header {
  background-color: var(--color-header-bg);
  color: var(--color-header-text);
}
.site-header .container {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 1 auto;
  min-width: 340px;
}
.nav-links {
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Brand block */

.brand-logo {
  display: flex;
  align-items: center;
}

.logo {
  height: 50px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1.15;
  opacity: 0.85;
}

.brand-name {
  font-weight: 600;
}

.brand-person {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.brand-role {
  margin-top: 2px;
  font-size: 0.78rem;
  opacity: 0.85;
}



/* Theme toggle */

.theme-toggle {
  border: none;
  background: transparent;
  color: var(--color-header-text);
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover {
  background-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .theme-toggle {
  color: var(--color-header-text);
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--color-header-text);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--color-accent);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.5rem;
}

.btn-nav {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-accent);
  background-color: transparent;
  color: var(--color-header-text);
  font-size: 0.85rem;
}

.btn-nav-primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-nav:hover {
  cursor: pointer;
  filter: brightness(1.08);
}

/* Hero */

.hero {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 60%);
}

html[data-theme="dark"] .hero {
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: center;
}

.hero-kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--color-surface);
  border-color: #cbd5f5;
  color: var(--color-text);
}

html[data-theme="dark"] .btn-secondary {
  border-color: #1f2937;
}

.btn-outline {
  background-color: transparent;
  border-color: #9ca3af;
  color: var(--color-text);
}

.btn:hover {
  cursor: pointer;
  filter: brightness(1.05);
}

.hero-note {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.hero-card {
  background-color: var(--color-surface-soft);
  color: #e5e7eb;
  border-radius: 1.25rem;
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-hero-card);
}

.hero-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem 0;
  font-size: 0.9rem;
}

.hero-card-list li {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.hero-card-list span.bullet {
  color: #60a5fa;
}

/* Sections */

.section {
  padding: 3rem 0 2.5rem;
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  font-weight: 600;
}

.section-title {
  font-size: 1.5rem;
  margin: 0.25rem 0;
}

.section-subtitle {
  font-size: 0.98rem;
  color: var(--color-muted);
}

/* Grids and cards */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--color-surface);
  border-radius: 1rem;
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* Inverse card (used for qualification / callout blocks) */

.card-inverse {
  background-color: var(--color-surface-soft);
  color: #e5e7eb;
  border: none;
}

.card-inverse h3 {
  color: #e5e7eb;
}

.card-inverse .hero-card-list span.bullet {
  color: #60a5fa;
}

/* Badge and inline list */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background-color: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 500;
}

html[data-theme="dark"] .badge {
  border: 1px solid var(--color-accent);
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.inline-list li {
  background-color: var(--color-pill-bg);
  color: var(--color-text);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* Footer */

.site-footer {
  margin-top: auto;
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Contact page */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
}

.contact-form {
  background-color: var(--color-surface);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.65rem;
  font: inherit;
  background-color: var(--color-surface);
  color: var(--color-text);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-help {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.form-select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid #d1d5db;
  font: inherit;
  background-color: var(--color-surface);
  color: var(--color-text);
}

/* About page */

.about-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
}

.about-headshot img {
  width: 120px;
  height: auto;
  border-radius: 4px;
  filter: grayscale(35%) contrast(95%);
  opacity: 0.9;
}

@media (max-width: 640px) {
  .about-header {
    grid-template-columns: 1fr;
  }

  .about-headshot img {
    width: 96px;
  }
}

/* Leadership page header (mirrors About) */

.leadership-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
}

.leadership-headshot img {
  width: 120px;
  border-radius: 4px;
  filter: grayscale(35%) contrast(95%);
  opacity: 0.9;
}

@media (max-width: 640px) {
  .leadership-header {
    grid-template-columns: 1fr;
  }

  .leadership-headshot img {
    width: 96px;
  }
}

/* Services page header (mirrors About/Leadership structure, no headshot) */

.services-header {
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
}

/* Problem list (homepage "Does this sound familiar?" section) */

.problem-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.problem-list li {
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.97rem;
  color: var(--color-text);
  align-items: flex-start;
}

.problem-list li:last-child {
  border-bottom: none;
}

.problem-list .check {
  color: var(--color-accent);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Credential bar */

.credential-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.credential-bar .cred {
  background-color: var(--color-accent-soft);
  color: var(--color-accent);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

html[data-theme="dark"] .credential-bar .cred {
  border: 1px solid var(--color-accent);
}

/* CTA close section */

.cta-close {
  background-color: var(--color-surface-soft);
  color: #e5e7eb;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-close h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #f1f5f9;
}

.cta-close p {
  color: #94a3b8;
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
}

/* Testimonial block */

.testimonial-block {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: 0.75rem;
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-card);
}

.testimonial-block blockquote {
  margin: 0 0 0.75rem;
  font-size: 0.97rem;
  color: var(--color-text);
  font-style: italic;
  line-height: 1.6;
}

.testimonial-block cite {
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-muted);
}

.testimonial-block cite strong {
  color: var(--color-text);
}

/* Story section */

.story-section {
  background: radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.07), transparent 60%);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--color-border);
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .nav-cta {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 1rem;
  }

  .hero-card {
    margin-top: 1rem;
  }
}


/* Floating back-to-top.
   Visual style mirrors the .scroll-top control in hfp/evo-lookups
   (app/templates/base.html): circular, an SVG arrow stacked above the word
   "Top", translucent and brightening on hover or focus. --hfp-navy becomes the
   site's own header navy so it follows the light/dark theme.
   Unlike evo, which is always present, this one is scroll-gated: the marketing
   pages are long, and a control floating over the hero is clutter. 400px is the
   single constant to tune. */

.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 34;
  width: 3.25rem;
  min-height: 3.25rem;
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.25rem;
  background: var(--color-header-bg);
  color: #ffffff;
  border: 1px solid #9eafca;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.26);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, background-color 0.15s ease, visibility 0.15s ease;
}

.scroll-top.is-visible {
  opacity: 0.2;
  visibility: visible;
  pointer-events: auto;
}

.scroll-top svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  background: #244a83;
  color: #ffffff;
  opacity: 1;
}

.scroll-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .scroll-top {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: none;
  }
}

@media print {
  .scroll-top {
    display: none !important;
  }
}
