/**
 * Pathway Behavioral Group — reusable style variants
 * Pair with Tailwind for spacing/typography: e.g. class="pbg-btn pbg-btn--primary px-xl py-md rounded-full font-label-md text-label-md"
 */

:root {
  --pbg-primary: #066b5c;
  --pbg-primary-dark: #055a4d;
  --pbg-on-primary: #ffffff;
  --pbg-secondary: #30628a;
  --pbg-on-secondary: #ffffff;
  --pbg-tertiary: #765b06;
  --pbg-primary-container: #72c3b1;
  --pbg-on-primary-container: #005044;
  --pbg-secondary-container: #a1d1fe;
  --pbg-on-secondary-container: #265a81;
  --pbg-tertiary-container: #d3b059;
  --pbg-on-tertiary-container: #584300;
  --pbg-surface: #fef8f5;
  --pbg-surface-low: #f8f2f0;
  --pbg-outline: #6e7976;
  --pbg-outline-variant: #bec9c5;
  --pbg-on-surface: #1d1b1a;
  --pbg-error: #ba1a1a;
  --pbg-shadow-color: rgba(6, 107, 92, 0.12);
  --pbg-shadow-soft: 0 4px 20px rgba(6, 107, 92, 0.08);
  --pbg-shadow-lift: 0 12px 32px rgba(6, 107, 92, 0.14);
  --pbg-shadow-deep: 0 24px 48px -12px rgba(48, 98, 138, 0.18);
  --pbg-ring: 0 0 0 3px rgba(6, 107, 92, 0.28);
}

/* Native disclosure marker off (header menu + in-page accordions) */
details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::marker {
  content: none;
}

/* -------- Focus (use with buttons/links) -------- */
.pbg-focusable:focus-visible {
  outline: none;
  box-shadow: var(--pbg-ring);
}

.dark .pbg-focusable:focus-visible {
  box-shadow: 0 0 0 3px rgba(132, 213, 195, 0.45);
}

/* -------- Buttons -------- */
.pbg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-weight: 600;
  text-align: center;
  transition-property: transform, box-shadow, background-color, border-color, color, opacity;
  transition-duration: 200ms;
  transition-timing-function: ease-out;
  -webkit-tap-highlight-color: transparent;
}

.pbg-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.pbg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pbg-btn--primary {
  background: linear-gradient(180deg, var(--pbg-primary) 0%, var(--pbg-primary-dark) 100%);
  color: var(--pbg-on-primary);
  box-shadow: 0 8px 20px var(--pbg-shadow-color);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pbg-btn--primary:hover:not(:disabled) {
  box-shadow: var(--pbg-shadow-lift);
}

.pbg-btn--secondary {
  background: linear-gradient(180deg, #3a6d95 0%, var(--pbg-secondary) 100%);
  color: var(--pbg-on-secondary);
  box-shadow: 0 6px 16px rgba(48, 98, 138, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pbg-btn--secondary:hover:not(:disabled) {
  box-shadow: var(--pbg-shadow-deep);
}

.pbg-btn--tertiary {
  background: linear-gradient(180deg, #8a6910 0%, var(--pbg-tertiary) 100%);
  color: var(--pbg-on-primary);
  box-shadow: 0 6px 16px rgba(118, 91, 6, 0.22);
}

.pbg-btn--soft-primary {
  background: rgba(114, 195, 177, 0.35);
  color: var(--pbg-on-primary-container);
  border: 1px solid rgba(6, 107, 92, 0.18);
}

.pbg-btn--soft-primary:hover:not(:disabled) {
  background: rgba(114, 195, 177, 0.5);
}

.pbg-btn--soft-secondary {
  background: rgba(161, 209, 254, 0.45);
  color: var(--pbg-on-secondary-container);
  border: 1px solid rgba(48, 98, 138, 0.2);
}

.pbg-btn--soft-secondary:hover:not(:disabled) {
  background: rgba(161, 209, 254, 0.62);
}

.pbg-btn--outline-primary {
  background: transparent;
  color: var(--pbg-primary);
  border: 2px solid var(--pbg-primary);
  box-shadow: none;
}

.pbg-btn--outline-primary:hover:not(:disabled) {
  background: rgba(6, 107, 92, 0.06);
}

.pbg-btn--outline-secondary {
  background: var(--pbg-surface-low);
  color: var(--pbg-secondary);
  border: 2px solid rgba(48, 98, 138, 0.35);
  box-shadow: var(--pbg-shadow-soft);
}

.pbg-btn--outline-secondary:hover:not(:disabled) {
  background: rgba(161, 209, 254, 0.15);
  border-color: var(--pbg-secondary);
}

.pbg-btn--ghost {
  background: transparent;
  color: var(--pbg-primary);
  border: 2px solid transparent;
  box-shadow: none;
}

.pbg-btn--ghost:hover:not(:disabled) {
  background: rgba(6, 107, 92, 0.08);
}

.pbg-btn--surface {
  background: #ffffff;
  color: var(--pbg-primary);
  border: 1px solid var(--pbg-outline-variant);
  box-shadow: var(--pbg-shadow-soft);
}

.pbg-btn--surface:hover:not(:disabled) {
  border-color: var(--pbg-primary-container);
}

.dark .pbg-btn--outline-secondary {
  background: rgba(50, 48, 46, 0.5);
  color: #cde5ff;
  border-color: rgba(155, 203, 248, 0.35);
}

.dark .pbg-btn--ghost {
  color: #84d5c3;
}

.dark .pbg-btn--ghost:hover:not(:disabled) {
  background: rgba(132, 213, 195, 0.12);
}

.dark .pbg-btn--surface {
  background: #32302e;
  color: #a0f2df;
  border-color: rgba(190, 201, 197, 0.25);
}

/* -------- Cards -------- */
.pbg-card {
  border-radius: 1rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pbg-card--flat {
  background: var(--pbg-surface);
  border: 1px solid rgba(190, 201, 197, 0.55);
}

.pbg-card--raised {
  background: #ffffff;
  border: 1px solid rgba(190, 201, 197, 0.4);
  box-shadow: var(--pbg-shadow-soft);
}

.pbg-card--raised:hover {
  box-shadow: var(--pbg-shadow-lift);
}

.pbg-card--glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--pbg-shadow-soft);
}

.pbg-card--tint-teal {
  background: linear-gradient(165deg, rgba(114, 195, 177, 0.2) 0%, rgba(254, 248, 245, 0.9) 100%);
  border: 1px solid rgba(6, 107, 92, 0.15);
}

.pbg-card--tint-sky {
  background: linear-gradient(165deg, rgba(161, 209, 254, 0.35) 0%, rgba(254, 248, 245, 0.95) 100%);
  border: 1px solid rgba(48, 98, 138, 0.18);
}

.pbg-card--tint-warm {
  background: linear-gradient(165deg, rgba(211, 176, 89, 0.28) 0%, rgba(254, 248, 245, 0.92) 100%);
  border: 1px solid rgba(118, 91, 6, 0.15);
}

.dark .pbg-card--raised {
  background: #2c2a28;
  border-color: rgba(190, 201, 197, 0.2);
}

.dark .pbg-card--tint-teal {
  background: linear-gradient(165deg, rgba(6, 107, 92, 0.35) 0%, rgba(50, 48, 46, 0.95) 100%);
}

/* -------- Chips / badges -------- */
.pbg-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.pbg-chip--primary {
  background: rgba(6, 107, 92, 0.12);
  color: var(--pbg-primary);
}

.pbg-chip--secondary {
  background: rgba(48, 98, 138, 0.12);
  color: var(--pbg-secondary);
}

.pbg-chip--tertiary {
  background: rgba(211, 176, 89, 0.35);
  color: var(--pbg-tertiary);
}

.pbg-chip--neutral {
  background: var(--pbg-surface-low);
  color: var(--pbg-on-surface);
  border: 1px solid rgba(190, 197, 197, 0.6);
}

.pbg-chip--inverse {
  background: var(--pbg-primary);
  color: var(--pbg-on-primary);
}

.pbg-chip--outline {
  background: transparent;
  color: var(--pbg-primary);
  border: 1px solid var(--pbg-primary);
}

/* -------- Hero (combined gradient + mesh) -------- */
.pbg-hero-mesh {
  background-color: var(--pbg-surface);
  background-image:
    linear-gradient(135deg, #fef8f5 0%, #f2edea 100%),
    radial-gradient(ellipse 120% 80% at 100% -15%, rgba(211, 176, 89, 0.16) 0%, transparent 52%),
    radial-gradient(ellipse 90% 55% at -5% 100%, rgba(114, 195, 177, 0.12) 0%, transparent 48%);
}

/* -------- Section backgrounds -------- */
  background-color: var(--pbg-surface);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(211, 176, 89, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 100% 60% at -10% 100%, rgba(114, 195, 177, 0.18) 0%, transparent 45%);
}

.pbg-section--mesh-cool {
  background-color: var(--pbg-surface-low);
  background-image:
    radial-gradient(ellipse 90% 70% at 90% 10%, rgba(161, 209, 254, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 0% 90%, rgba(6, 107, 92, 0.08) 0%, transparent 50%);
}

.pbg-section--stripe-soft {
  background: repeating-linear-gradient(
    -8deg,
    var(--pbg-surface),
    var(--pbg-surface) 12px,
    rgba(114, 195, 177, 0.06) 12px,
    rgba(114, 195, 177, 0.06) 24px
  );
}

.pbg-section--band-primary {
  background: linear-gradient(180deg, var(--pbg-primary-dark) 0%, var(--pbg-primary) 50%, #077d6c 100%);
  color: var(--pbg-on-primary);
}

.pbg-section--band-primary .pbg-on-inverse {
  color: inherit;
  opacity: 0.92;
}

/* -------- Elevation helpers -------- */
.pbg-elevate-xs {
  box-shadow: 0 2px 8px rgba(29, 27, 26, 0.06);
}
.pbg-elevate-sm {
  box-shadow: var(--pbg-shadow-soft);
}
.pbg-elevate-md {
  box-shadow: var(--pbg-shadow-lift);
}
.pbg-elevate-lg {
  box-shadow: var(--pbg-shadow-deep);
}

/* -------- Typography scale (extra) -------- */
.pbg-text-display {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.pbg-text-title-sm {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pbg-text-lede {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  line-height: 1.65;
  color: var(--pbg-outline);
}

.dark .pbg-text-lede {
  color: #bec9c5;
}

/* -------- Dividers -------- */
.pbg-rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--pbg-outline-variant) 15%,
    var(--pbg-outline-variant) 85%,
    transparent
  );
}

/* -------- Links -------- */
.pbg-link-primary {
  color: var(--pbg-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.pbg-link-primary:hover {
  opacity: 0.85;
}

.pbg-link-secondary {
  color: var(--pbg-secondary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* -------- Callout strip -------- */
.pbg-callout {
  border-radius: 1rem;
  border-left: 4px solid var(--pbg-primary);
  background: rgba(114, 195, 177, 0.15);
  padding: 1rem 1.25rem;
}

.pbg-callout--info {
  border-left-color: var(--pbg-secondary);
  background: rgba(161, 209, 254, 0.22);
}

.pbg-callout--caution {
  border-left-color: var(--pbg-tertiary);
  background: rgba(255, 223, 150, 0.35);
}

.pbg-callout--alert {
  border-left-color: var(--pbg-error);
  background: rgba(255, 218, 214, 0.6);
}

/* -------- Primary header nav (desktop): compact horizontal scroll -------- */
.primary-nav-links {
  flex-wrap: nowrap;
  gap: 0.375rem;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 1px;
  justify-content: flex-end;
}

.primary-nav-links::-webkit-scrollbar {
  display: none;
}

.primary-nav-links a {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .primary-nav-links {
    gap: 0.5rem;
  }
}

@media (min-width: 1280px) {
  .primary-nav-links {
    gap: 0.625rem;
  }
}

/* -------- Site header: compact bar; logo left; actions don’t get squeezed -------- */
.site-header-inner {
  align-items: center;
  row-gap: 0.25rem;
  flex-wrap: nowrap;
}

.site-brand {
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-start;
  max-width: min(52%, 14rem);
}

.site-brand img {
  width: 2rem;
  height: 2rem;
}

@media (min-width: 640px) {
  .site-brand {
    max-width: none;
  }

  .site-brand img {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.site-brand.flex {
  gap: 0.375rem !important;
}

.site-brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Keep wordmark compact; avoid min-[400px]:text-headline-md blowing up the bar */
  font-size: clamp(0.8125rem, 0.72rem + 0.45vw, 1rem) !important;
  line-height: 1.2;
  font-weight: 700;
}

@media (max-width: 639px) {
  .site-brand-text {
    display: none;
  }

  .site-brand {
    max-width: none;
  }
}

.site-header-actions {
  flex: 1 1 auto;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 0.25rem !important;
}

@media (min-width: 640px) {
  .site-header-actions {
    flex: 0 0 auto;
    gap: 0.375rem !important;
  }
}

@media (min-width: 768px) {
  .site-header-actions {
    gap: 0.5rem !important;
  }
}

@media (min-width: 1024px) {
  .site-header-actions {
    gap: 0.625rem !important;
  }
}

.site-header-cta {
  min-height: 40px;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .site-header-cta {
    min-height: 42px;
    font-size: 0.875rem;
    padding: 0.45rem 0.65rem;
  }
}

@media (min-width: 768px) {
  .site-header-cta {
    min-height: 44px;
    font-size: inherit;
    line-height: inherit;
    padding: 0.5rem 0.85rem;
  }
}

.site-mobile-nav summary.site-mobile-nav-trigger {
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  padding-inline: 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  -webkit-tap-highlight-color: transparent;
}

.site-mobile-nav-icon {
  display: block;
  width: 1.25rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.site-mobile-nav-trigger:focus-visible {
  outline: none;
  box-shadow: var(--pbg-ring);
}

.dark .site-mobile-nav-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(132, 213, 195, 0.45);
}

.site-nav-dropdown {
  width: auto;
  left: max(0.5rem, env(safe-area-inset-left, 0px));
  right: max(0.5rem, env(safe-area-inset-right, 0px));
  margin-top: 0.375rem;
  padding: 0.625rem 0.75rem;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(6, 107, 92, 0.08);
}

.site-nav-dropdown > a {
  display: flex;
  min-height: 44px;
  align-items: center;
}

@media (min-width: 640px) {
  .site-nav-dropdown {
    left: auto;
    right: 0;
    width: min(17rem, calc(100vw - 1.5rem));
  }
}

/* FAQ accordion chevron (SVG; no icon font on mobile) */
.pbg-faq-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pbg-faq-chevron svg {
  display: block;
}

/* FAQ accordion: multi-line questions align with chevron on small screens */
main details.group > summary {
  gap: 0.5rem;
}

@media (max-width: 639px) {
  main details.group > summary {
    align-items: flex-start;
    text-align: left;
  }

  main details.group > summary .pbg-faq-chevron {
    margin-top: 0.125rem;
  }
}
