@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500&display=swap');

:root {
  /* Brand — navy */
  --navy-900: #0A2540;  /* darkest: footer */
  --navy-800: #0E3A5F;  /* primary: header, headings on light, primary button, navy bands */
  --navy-700: #155080;  /* hover / links on light */

  /* Brand — gold accent */
  --gold-500: #E8A33D;  /* accent: icons, underlines, eyebrows, highlighted words, high-emphasis CTA */
  --gold-600: #C9851F;  /* gold hover */

  /* Secondary accent (for dark surfaces) */
  --sky-400: #7CC0F0;   /* links/highlights on navy, focus ring */

  /* Optional health accent — use sparingly (e.g., benefit checkmarks) */
  --teal-600: #2E7D6B;

  /* Surfaces */
  --surface: #FFFFFF;        /* default page background */
  --surface-soft: #F4F7FB;   /* alternating sections, cards */
  --surface-dark: #0E3A5F;   /* navy band */
  --surface-darker: #0A2540; /* footer */

  /* Borders / dividers */
  --border: #E2E8F0;                 /* on light */
  --border-dark: rgba(255, 255, 255, .18); /* on dark */

  /* Text */
  --ink: #14233A;          /* primary text on light  (15.8:1 on white) */
  --ink-muted: #51607A;    /* secondary text on light (~6:1 on white) */
  --on-dark: #F5F8FC;      /* primary text on dark   (11:1 on navy) */
  --on-dark-muted: #C3D3E5;/* secondary text on dark (~6:1 on navy) */
  --on-gold: #0A2540;      /* text on gold           (5.4:1) */

  /* Links */
  --link: #155080;         /* on light; hover --navy-900 */
  --link-on-dark: #7CC0F0; /* on dark */

  /* Buttons */
  --btn-primary-bg: #0E3A5F;  --btn-primary-text: #FFFFFF; /* 11:1 */
  --btn-accent-bg: #E8A33D;   --btn-accent-text: #0A2540;  /* 5.4:1 */

  /* Focus */
  --focus: #7CC0F0;

  /* Approved text → background pairings:
     - --ink on --surface / --surface-soft ✓
     - --ink-muted on --surface / --surface-soft ✓ (secondary text only)
     - --on-dark on --surface-dark / --surface-darker ✓
     - --on-dark-muted on --surface-dark ✓ (secondary text only)
     - --on-gold (navy) on --gold-500 ✓
     - --gold-500 text/icons on --surface-dark ✓ (8.3:1 — use for accents on navy)
     - --link on light; --link-on-dark on navy ✓
  */

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Typography */
  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-md: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-size-2xl: clamp(2rem, 1.7rem + 1.5vw, 3.5rem);

  --line-height: 1.7;
  --border-radius: 0.5rem;

  --container-max-width: 1100px;
  --header-height: 5rem;

  /* Re-mapping old semantic variables to new palette for easier transition */
  --bg-color: var(--surface);
  --text-color: var(--ink);
  --text-muted: var(--ink-muted);
  --primary: var(--navy-800);
  --accent: var(--gold-500);
  --border-color: var(--border);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --focus-ring: 0 0 0 3px var(--focus);
}

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

body, h1, h2, h3, h4, p, ul, figure, blockquote, dl, dd {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height);
  color: var(--ink);
  background-color: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--navy-800);
}

img, picture, svg {
  max-width: 100%;
  display: block;
}

.headshot {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--border-radius);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--navy-800);
  color: var(--on-dark);
  padding: var(--space-sm);
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
  top: 0;
  outline: none;
  box-shadow: var(--focus-ring);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Layout Components */
.container {
  width: 90%;
  max-width: var(--container-max-width);
  margin-inline: auto;
}

header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--surface-dark);
  color: var(--on-dark);
  z-index: 50;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.wordmark {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: 700;
  text-decoration: none;
  color: var(--on-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: var(--space-md);
}

.wordmark .first-name { color: var(--on-dark); }
.wordmark .last-name { color: var(--gold-500); }

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  color: var(--primary);
}

.nav-list {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--on-dark-muted);
  font-weight: 500;
  transition: color 0.2s ease;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--on-dark);
}

@media (max-width: 850px) {
  .js-enabled .nav-toggle {
    display: block;
    z-index: 60;
  }

  .js-enabled .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease-in-out, visibility 0.3s;
    z-index: 55;
  }

  .js-enabled .nav-menu[data-visible="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }

  .nav-link {
    font-size: var(--font-size-xl);
  }
}

main {
  flex: 1;
}

footer {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-dark);
  background: var(--surface-darker);
  margin-top: var(--space-2xl);
  color: var(--on-dark-muted);
}

.footer-inner {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1.5fr;
  }
}

.footer-heading {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  color: var(--on-dark);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  text-decoration: none;
  color: var(--on-dark-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--on-dark);
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--on-dark-muted);
  max-width: 80ch;
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border-dark);
  padding-top: var(--space-md);
}

/* Page Components */
.section {
  padding: var(--space-2xl) 0;
}

.bg-soft {
  background-color: var(--surface-soft);
}

.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
  background: var(--surface-soft);
}

.hero h1 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-md);
  max-width: 20ch;
  margin-inline: auto;
  color: var(--navy-800);
}

.hero-text {
  font-size: var(--font-size-lg);
  color: var(--ink-muted);
  max-width: 55ch;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 2px solid var(--btn-primary-bg);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.btn:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: inherit; /* Use context color (e.g., --on-dark on navy) */
  border-color: currentColor;
}

.bg-soft .btn-secondary,
.section:not(.bg-soft):not(.cta-band) .btn-secondary {
  color: var(--navy-800);
  border-color: var(--navy-800);
}

.cta-band .btn-secondary {
  color: var(--on-dark);
  border-color: var(--sky-400);
}

.hero .btn-secondary {
  color: var(--navy-800);
  border-color: var(--navy-800);
}

.btn-secondary:hover {
  background: rgba(14, 58, 95, 0.05);
  border-color: var(--navy-900);
  color: var(--navy-900);
}

.cta-band .btn-secondary:hover,
.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--on-dark);
  color: var(--on-dark);
}

.btn-accent {
  background: var(--btn-accent-bg);
  border-color: var(--btn-accent-bg);
  color: var(--btn-accent-text);
}

.btn-accent:hover {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: var(--btn-accent-text);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
  color: var(--navy-800);
}

.card p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.card-link {
  margin-top: auto;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
}

.card-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-link::after {
  content: '→';
  transition: transform 0.2s;
}

.card-link:hover::after {
  transform: translateX(4px);
}

.icon-box {
  width: 48px;
  height: 48px;
  background: var(--surface-soft);
  color: var(--gold-500);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
}

.bg-soft .icon-box {
  background: var(--surface);
}

.cta-band .icon-box,
.surface-dark .icon-box {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-dark);
  color: var(--gold-500);
}

/* Utils */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-xl { margin-top: var(--space-xl); }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.contact-item svg {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.cta-band {
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--on-dark);
  margin-bottom: var(--space-md);
}

.cta-band p {
  color: var(--on-dark-muted);
  margin-bottom: var(--space-xl);
}

.testimonial {
  font-style: italic;
  position: relative;
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--gold-500);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.testimonial cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  margin-top: var(--space-sm);
  color: var(--navy-800);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--navy-800);
  color: var(--gold-500);
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, background-color 0.2s, opacity 0.3s;
  z-index: 100;
}

.back-to-top:hover {
  background: var(--navy-700);
  transform: translateY(-4px);
}

.back-to-top[hidden] {
  display: none;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
