/* Homepage layout and navigation. */
.home-page {
  background: var(--people-canvas);
}
.home-page .site-header {
  position: sticky;
  top: 0;
  border-bottom-color: #f0f2f1;
}
.home-page .header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: min(1840px, calc(100% - 48px));
  column-gap: 28px;
}
.home-page .solvefolk-brand {
  width: max-content;
}
.home-page .wordmark {
  align-items: center;
  justify-self: start;
  gap: 9px;
  margin-right: 0;
}
@media (min-width: 1041px) {
  .home-page .site-header .wordmark .solvefolk-brand {
    --solvefolk-brand-width: 194px;
    --solvefolk-logo-size: 46px;
    --solvefolk-name-size: 28px;
    --solvefolk-brand-gap: 7px;
  }
}
.home-page .desktop-navigation {
  justify-content: center;
  gap: 28px;
}
.home-page .desktop-navigation .navigation-link {
  position: relative;
  border-radius: 0;
  background: transparent;
  color: #626866;
  font-weight: 400;
}
.home-page .desktop-navigation .navigation-link:hover,
.home-page .desktop-navigation .navigation-link[aria-current='page'] {
  color: #009878;
}
.home-page .desktop-navigation .navigation-link[aria-current='page']::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  background: currentColor;
}
.home-page .header-actions {
  justify-self: end;
  gap: 24px;
  margin-left: 0;
  padding-left: 0;
}
.home-page .header-admission {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #626866;
  font-weight: 400;
}
.home-page .header-admission:hover {
  color: #009878;
}
.home-page .login-button {
  color: #252a27;
}
.home-page .site-header .navigation-link:focus-visible,
.home-page .site-header .mobile-navigation-link:focus-visible {
  outline: 2px solid #14856c;
  outline-offset: 5px;
}
.home-page .page-width {
  width: min(1840px, calc(100% - clamp(32px, 6vw, 96px)));
  margin-inline: auto;
}
#main-content,
.embedded-directory {
  scroll-margin-top: var(--header-height);
}

/* White hero with layered teal washes and a soft directory transition. */
.home-page .hero {
  --hero-surface: #fff;
  --hero-wash-left: rgb(84 207 163 / 50%);
  --hero-wash-right: rgb(121 217 181 / 44%);
  --hero-wash-middle: rgb(132 222 189 / 34%);
  --hero-wash-outer: rgb(204 241 226 / 14%);
  --hero-heading: #1b1c1b;
  --hero-body: #626866;
  --hero-primary: #1b1c1b;
  --hero-primary-hover: #373a38;
  --hero-on-primary: #fff;
  --hero-link: #14856c;
  --hero-link-hover: #07664f;
  --hero-focus: #14856c;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: start;
  justify-items: center;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: clamp(60px, 6vw, 84px) 40px 58px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(
      180deg,
      var(--hero-surface) 0%,
      var(--hero-surface) 66%,
      rgb(255 255 255 / 70%) 80%,
      rgb(255 255 255 / 28%) 88%,
      rgb(255 255 255 / 42%) 93%,
      rgb(255 255 255 / 82%) 98%,
      var(--hero-surface) 100%
    ),
    radial-gradient(
      ellipse 44% 74% at 10% 116%,
      var(--hero-wash-left) 0%,
      var(--hero-wash-middle) 30%,
      var(--hero-wash-outer) 54%,
      rgb(204 241 226 / 0%) 80%
    ),
    radial-gradient(
      ellipse 42% 70% at 94% 121%,
      var(--hero-wash-right) 0%,
      var(--hero-wash-middle) 34%,
      var(--hero-wash-outer) 58%,
      rgb(204 241 226 / 0%) 84%
    ),
    var(--hero-surface);
  color: var(--hero-heading);
  text-align: center;
}
.home-page .hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}
.home-page .hero-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.22em;
  margin: 0;
  color: var(--hero-heading);
  font-size: clamp(52px, 6.6vw, 96px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.home-page .hero-title-brand,
.home-page .hero-title-message {
  white-space: nowrap;
}
.home-page .hero-description {
  max-width: 760px;
  margin: 30px auto 0;
  color: var(--hero-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  text-wrap: pretty;
}
.home-page .hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
}
.home-page .button-hero {
  min-width: 220px;
  min-height: 50px;
  margin-top: 0;
  padding: 0 30px;
  border-color: var(--hero-primary);
  border-radius: 999px;
  background: var(--hero-primary);
  color: var(--hero-on-primary);
  font-size: 16px;
  font-weight: 500;
}
.home-page .button-hero:hover {
  background: var(--hero-primary-hover);
  border-color: var(--hero-primary-hover);
}
.home-page .hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 12px;
  color: var(--hero-link);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.home-page .hero-secondary:hover {
  color: var(--hero-link-hover);
  text-decoration: underline;
}
.home-page .hero button:focus-visible,
.home-page .hero a:focus-visible {
  outline: 2px solid var(--hero-focus);
  outline-offset: 5px;
}

/* Searchable expert directory. */
.home-page .embedded-directory {
  min-height: calc(100svh - var(--header-height));
  background:
    linear-gradient(
      180deg,
      #fff 0,
      rgb(255 255 255 / 95%) 24px,
      rgb(255 255 255 / 65%) 72px,
      rgb(255 255 255 / 8%) 128px,
      rgb(255 255 255 / 0%) 152px
    ),
    var(--people-canvas);
}
.embedded-directory:focus {
  outline: none;
}
.home-page .embedded-directory .page-width {
  width: min(1280px, calc(100% - 80px));
}
.home-page .directory-intro {
  padding-top: 40px;
  padding-bottom: 20px;
}
.home-page .section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.home-page .section-heading-row h2 {
  margin: 0;
  color: var(--brand-ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.home-page .directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  align-items: start;
  gap: 12px;
}
.home-page .provider-search {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 14px 0 15px;
  border: 1px solid #dce5e2;
  border-radius: 10px;
  background: #fff;
}
.provider-search:focus-within {
  outline: 2px solid #43727826;
}
.provider-search svg {
  width: 19px;
  height: 19px;
  stroke: var(--brand-muted);
  stroke-width: 1.7;
  flex-shrink: 0;
}
.home-page .provider-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--brand-ink);
  font-size: 14px;
  outline: none;
}
.provider-search input::placeholder {
  color: var(--brand-muted);
}
.filter-control {
  display: block;
  position: relative;
  min-width: 0;
}
.filter-control::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 16px;
  top: 20px;
  width: 5px;
  height: 5px;
  border-right: 1.3px solid var(--brand-muted);
  border-bottom: 1.3px solid var(--brand-muted);
  transform: rotate(45deg);
}
.filter-control select {
  appearance: none;
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 32px 0 14px;
  border: 1px solid #dce5e2;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.filter-control select:focus-visible {
  outline: 2px solid var(--brand-link);
  outline-offset: 3px;
}
.filter-control select.selected {
  border-color: var(--brand-link);
  background: #edf3f1;
}
.clear-filters {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-link);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-page .results-section {
  padding: 8px 0 64px;
  background: var(--people-canvas);
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.empty-state {
  padding: 50px 20px;
  border: 1px dashed var(--brand-line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.empty-state h3 {
  font-size: 20px;
}
.empty-state p {
  margin-bottom: 24px;
  color: var(--brand-text);
  font-size: 14px;
}
.button-outline {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--brand-line);
  border-radius: 5px;
  background: #fff;
  color: var(--brand-ink);
  font-size: 14px;
}
.directory-footer {
  display: flex;
  align-items: center;
  gap: 23px;
  padding-block: 27px;
}
.footer-brand {
  flex-shrink: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.directory-footer p {
  color: var(--brand-muted);
  font-size: 12px;
}
.directory-footer > a:last-child {
  margin-left: auto;
  color: var(--brand-text);
  font-size: 12px;
}
.directory-footer > a:last-child span {
  padding-left: 12px;
}
.preview-toast {
  position: fixed;
  z-index: 40;
  bottom: 30px;
  left: 50%;
  max-width: calc(100% - 40px);
  transform: translate(-50%, 15px);
  padding: 13px 20px;
  border-radius: 6px;
  background: #20242e;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}
.preview-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.noscript-note {
  padding: 30px;
  text-align: center;
}

/* Floating consultation entry. */
.consultation-launcher {
  position: fixed;
  z-index: 20;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 64px;
  padding: 0 0 9px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #005c49;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  touch-action: manipulation;
}
.consultation-launcher svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgb(0 152 120 / 35%);
  filter: drop-shadow(0 3px 6px rgb(0 90 69 / 5%));
  transition: color 160ms ease;
}
.consultation-launcher span {
  position: relative;
}
.consultation-launcher:hover svg {
  color: rgb(0 152 120 / 42%);
}
.consultation-launcher:focus-visible {
  outline-color: #009878;
  outline-offset: 4px;
}
body:has(dialog[open]) .consultation-launcher {
  visibility: hidden;
}

/* Tablet and mobile layouts. */
@media (max-width: 1050px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 850px;
  }
}
@media (max-width: 1040px) {
  .home-page .directory-toolbar {
    grid-template-columns: minmax(0, 1fr) 165px 165px;
  }
}
@media (min-width: 761px) and (max-width: 1040px) {
  .home-page .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 12px;
  }
  .home-page .wordmark .solvefolk-brand {
    --solvefolk-brand-width: 176px;
    --solvefolk-logo-size: 40px;
    --solvefolk-name-size: 26px;
    --solvefolk-brand-gap: 6px;
  }
  .home-page .desktop-navigation {
    gap: 14px;
  }
  .home-page .site-header .navigation-link {
    font-size: 13px;
  }
  .home-page .header-actions {
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .home-page .header-inner {
    display: flex;
    width: calc(100% - 40px);
    column-gap: 0;
  }
  .home-page .wordmark {
    gap: 7px;
  }
  .home-page .desktop-navigation {
    display: none;
  }
  .home-page .header-actions {
    margin-left: auto;
    gap: 10px;
  }
  .home-page .header-admission,
  .home-page .login-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
  }
  .home-page .mobile-navigation-link[aria-current='page'] {
    color: #009878;
  }
  .home-page .hero {
    padding: 48px 22px 44px;
  }
  .home-page .hero-title {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: clamp(40px, 8.5vw, 60px);
  }
  .home-page .hero-description {
    max-width: 430px;
    margin-top: 24px;
    font-size: 14px;
  }
  .home-page .hero-description br {
    display: none;
  }
  .home-page .hero-actions {
    margin-top: 26px;
  }
  .home-page .button-hero {
    min-width: 200px;
    min-height: 48px;
    padding-inline: 24px;
    font-size: 14px;
  }
  .home-page .hero-secondary {
    font-size: 13px;
  }
  .home-page .embedded-directory .page-width {
    width: calc(100% - 40px);
  }
  .home-page .directory-intro {
    padding-top: 32px;
  }
  .home-page .section-heading-row {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
  }
  .home-page .section-heading-row h2 {
    font-size: 26px;
  }
  .clear-filters {
    margin-left: auto;
  }
  .home-page .directory-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .directory-search-field {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .home-page .provider-search {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-left: 12px;
  }
  .home-page .provider-search input {
    padding-inline: 8px;
    font-size: 13px;
  }
  .people-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 390px;
  }
  .home-page .directory-footer.page-width {
    padding-bottom: 112px;
  }
  .consultation-launcher {
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 450px) {
  .filter-control select {
    font-size: 13px;
  }
  .directory-footer {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .directory-footer > a:last-child {
    width: 100%;
    margin: 0;
  }
  .directory-footer p {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .home-page .header-inner {
    width: calc(100% - 32px);
  }
  .home-page .header-actions {
    gap: 5px;
  }
  .home-page .hero {
    padding-inline: 18px;
  }
}
@media (max-width: 760px) and (max-height: 640px) {
  .home-page .hero {
    padding-block: 36px;
  }
  .home-page .hero-title {
    gap: 4px;
    font-size: clamp(32px, 6vw, 46px);
  }
  .home-page .hero-description {
    margin-top: 16px;
  }
  .home-page .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }
  .home-page .button-hero {
    min-width: 190px;
    min-height: 44px;
    padding-inline: 20px;
  }
  .home-page .hero-secondary {
    padding-inline: 4px;
  }
}
@media (min-width: 761px) and (max-height: 600px) {
  .home-page .hero {
    padding-block: 44px;
  }
  .home-page .hero-title {
    font-size: clamp(44px, 5vw, 64px);
  }
  .home-page .hero-description {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.7;
  }
  .home-page .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .consultation-launcher svg {
    transition: none;
  }
}
