/* ==========================================================================
   Brooktree Counseling & Consulting, PLLC
   Static stylesheet — replaces the WordPress "Shapely" theme.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --accent:        #475a00;
  --accent-hover:  #5a6f09;
  --text:          #626364;
  --heading:       #475a00;
  --nav-link:      #4c4c4c;
  --dark:          #0e1015;
  --cream:         #f7f5e7;
  --rule:          rgba(0, 0, 0, .1);
  --shell:         1170px;
  --nav-h:         88px;
  --font: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  color: var(--text);
  background: #fff;
  /* `clip` rather than `hidden`: `hidden` would make the body a scroll
     container and break `position: sticky` on the nav bar. */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; border: 0; }

h1, h2, h3, h4, h5, h6, p, ul, ol, table, blockquote {
  margin-top: 0;
  margin-bottom: 24px;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: 300;
  color: var(--heading);
}

h1 { font-size: 45px; line-height: 48px; }
h2 { font-size: 36px; line-height: 42px; }
h3 { font-size: 30px; line-height: 33px; }
h4 { font-size: 25px; line-height: 30px; }
h5 { font-size: 22px; line-height: 28px; }

a { color: var(--accent); text-decoration: none; transition: color .3s ease; }
a:hover, a:focus { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; }

ul, ol { padding-left: 22px; }
li { margin-bottom: 4px; }

hr { border: 0; border-top: 1px solid #ccc; margin: 0 0 24px; }

.container {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 15px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #fff;
  color: var(--accent);
  padding: 12px 20px;
  font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  padding: 0 26px;
  min-width: 150px;
  border: 2px solid var(--accent);
  border-radius: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: all .3s ease;
  margin: 0 8px 24px 0;
}
.btn:hover, .btn:focus { background: var(--accent); color: #fff; }

.btn-filled {
  background: var(--accent);
  color: #fff;
}
.btn-filled:hover, .btn-filled:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-lg {
  line-height: 24px;
  min-width: 200px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.btn-white {
  color: #fff;
  border-color: #fff;
}
.btn-white:hover, .btn-white:focus { background: #fff; border-color: #fff; color: #222; }

/* ---------- Header / navigation ---------- */
/* The header itself is the sticky element: a sticky child could only stick
   within the header's own box, which is barely taller than the bar. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.nav-bar {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  transition: background-color .3s ease, box-shadow .3s ease;
}

/* Toggled by the IntersectionObserver in main.js once the page scrolls. */
.site-header.is-stuck .nav-bar {
  background: var(--cream);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

/* A 1px marker at the very top of the document, sitting outside the sticky
   header; when it scrolls out of view the bar is "stuck". */
.nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 1px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
}

.site-logo { display: inline-block; line-height: 0; flex: 0 0 auto; }
.site-logo img { width: 151px; height: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  color: var(--accent);
  line-height: 0;
}
.nav-toggle svg { width: 26px; height: 26px; fill: currentColor; }

.menu, .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu {
  display: flex;
  align-items: center;
}

.menu > li {
  position: relative;
  margin: 0 0 0 32px;
}

.menu a {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  line-height: 55px;
  letter-spacing: -.4px;
  text-transform: uppercase;
  color: var(--nav-link);
  transition: color .3s ease;
}
.menu a:hover,
.menu a:focus,
.menu li:hover > a,
.menu li:focus-within > a { color: var(--accent-hover); }

.menu .current > a { color: var(--accent); }

/* caret on items that have a submenu */
.menu .has-sub > a { padding-right: 16px; }
.menu .has-sub > a::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -2px;
  border: 4px solid transparent;
  border-top-color: currentColor;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 232px;
  margin-top: -1px;
  background: var(--dark);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 10px, 0);
  transition: all .3s ease;
  z-index: 99;
}

.menu > li:hover > .sub-menu,
.menu > li:focus-within > .sub-menu,
.menu > li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.sub-menu a {
  display: block;
  line-height: 24px;
  padding: 8px 24px;
  color: #fff;
  letter-spacing: 0;
}
.sub-menu a:hover, .sub-menu a:focus { color: #b9cc5b; }

@media (max-width: 991px) {
  :root { --nav-h: 76px; }

  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .site-nav.is-open { display: block; }

  .menu { display: block; padding: 8px 0; }
  .menu > li { margin: 0; border-top: 1px solid var(--rule); }
  .menu > li:first-child { border-top: 0; }

  .menu a { display: block; line-height: 1.4; padding: 14px 20px; font-size: 14px; }

  .menu .has-sub > a::after { right: 20px; }

  .sub-menu {
    position: static;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: #f5f5f0;
    display: none;
    margin: 0;
  }
  .menu > li.is-open > .sub-menu { display: block; }
  .sub-menu a { color: var(--nav-link); padding: 12px 20px 12px 36px; }
  .sub-menu a:hover, .sub-menu a:focus { color: var(--accent-hover); }
}

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #6c7a52;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-1920.jpg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  will-change: transform;
}

/* background-attachment: fixed is unreliable on touch devices */
@media (hover: none), (max-width: 991px) {
  .hero-bg { background-attachment: scroll; }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .28);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 15px;
  max-width: 800px;
}

.hero h1 {
  font-size: 65px;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 32px;
}
.hero .eyebrow {
  font-size: 25px;
  line-height: 30px;
  font-weight: 300;
  color: #fff;
  margin-bottom: 8px;
}

@media (max-width: 767px) {
  .hero h1 { font-size: 46px; }
  .hero .eyebrow { font-size: 20px; }
}

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  height: 225px;
  background-image: url("../img/page-banner.jpg");
  background-size: cover;
  background-position: center;
  background-color: #f5f5f5;
}

@media (max-width: 767px) {
  .page-banner { height: 150px; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; }
.border-bottom { border-bottom: 1px solid var(--rule); }
.text-center { text-align: center; }

@media (max-width: 767px) {
  .section { padding: 64px 0; }
}

.section-title {
  text-align: center;
  margin-bottom: 0;
}

.lede {
  max-width: 960px;
  margin: 30px auto 40px;
  text-align: center;
}

/* ---------- Home: service tiles ---------- */
.service-tiles {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  margin: 80px auto 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.service-tiles li { margin: 0; }

.service-tile {
  position: relative;
  overflow: hidden;
  width: 20%;
  background: var(--accent);
}

.service-tile a { display: block; position: relative; }

.service-tile img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  opacity: .99;
  transition: transform .5s ease, opacity .5s ease;
}

.service-tile h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin: 0;
  padding: 10px;
  width: 100%;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 300;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0);
  transition: color .5s ease-out;
  user-select: none;
}

.service-tile a:hover img,
.service-tile a:focus img {
  opacity: .3;
  transform: scale(1.3);
}
.service-tile a:hover h3,
.service-tile a:focus h3 { color: #fff; }

@media (max-width: 1199px) {
  .service-tile h3 { font-size: 20px; }
}

/* On touch screens there is no hover, so the label is always shown over a
   scrim instead of fading in. */
@media (max-width: 767px) {
  .service-tiles { margin-top: 48px; }
  .service-tile { width: 50%; }
  .service-tile:last-child { width: 100%; }

  .service-tile a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .15));
  }
  .service-tile h3 {
    z-index: 2;
    color: #fff;
    font-size: 19px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
  }
}

@media (max-width: 420px) {
  .service-tile, .service-tile:last-child { width: 100%; }
}

/* ---------- Home: therapist intro ---------- */
.intro-grid {
  display: flex;
  align-items: center;
  gap: 60px;
}
.intro-grid .intro-media { flex: 0 0 42%; text-align: center; }
.intro-grid .intro-body { flex: 1 1 auto; }
.intro-grid img { display: block; margin: 0 auto; }

.pt-seal { max-width: 292px; }

@media (max-width: 991px) {
  .intro-grid { display: block; }
  .intro-grid .intro-media { margin-bottom: 32px; }
}

/* ---------- Home: insurance logos ---------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 48px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logo-strip li { margin: 0; }
.logo-strip img {
  max-height: 60px;
  width: auto;
}

/* ---------- Article content ---------- */
.entry { padding: 72px 0 88px; }

.entry-title { margin-bottom: 32px; }

.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2 { font-size: 32px; line-height: 38px; }
.entry-content h4 { margin-top: 36px; }
.entry-content h4:first-child { margin-top: 0; }

.entry-content figure { margin: 0 0 24px; }

/* media + text block (the WP "Media & Text" pattern) */
.media-text {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 40px;
}
.media-text .media-text__media { flex: 0 0 44%; }
.media-text .media-text__media img { display: block; width: 100%; }
.media-text .media-text__body { flex: 1 1 auto; }
.media-text .media-text__body > *:last-child { margin-bottom: 0; }
.media-text.media-right .media-text__media { order: 2; }

/* For a tall image beside a long column of text, centring leaves a big gap. */
.media-text.media-top { align-items: flex-start; }
.media-text.media-third .media-text__media { flex: 0 0 33%; }

@media (max-width: 767px) {
  .media-text { display: block; }
  .media-text .media-text__media { margin-bottom: 28px; }
}

.text-right { text-align: right; }

/* ---------- FAQ accordion ---------- */
.accordion { margin-bottom: 32px; }

.accordion-item + .accordion-item { margin-top: 2px; }

.accordion-trigger {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 18px 24px;
  border: 0;
  background: #969696;
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  line-height: 30px;
  font-weight: 300;
  text-align: left;
  cursor: pointer;
  transition: background-color .3s ease;
}
.accordion-trigger:hover { background: #7d8a5e; }
.accordion-trigger[aria-expanded="true"] { background: var(--accent); }

.accordion-trigger .chev {
  flex: 0 0 auto;
  margin-top: 9px;
  border: 6px solid transparent;
  border-left-color: currentColor;
  transition: transform .3s ease;
}
.accordion-trigger[aria-expanded="true"] .chev {
  transform: rotate(90deg) translateX(-2px);
}

.accordion-panel {
  padding: 40px;
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 0;
}
.accordion-panel > *:last-child { margin-bottom: 0; }
.accordion-panel[hidden] { display: none; }

@media (max-width: 767px) {
  .accordion-trigger { font-size: 18px; line-height: 26px; padding: 14px 16px; }
  .accordion-panel { padding: 24px 16px; }
}

/* ---------- Contact card ---------- */
.contact-card {
  background: #f7f7f4;
  border: 1px solid var(--rule);
  padding: 40px;
  margin-bottom: 32px;
}
.contact-card p:last-child { margin-bottom: 0; }
.contact-card strong { color: var(--accent); }

/* ---------- Legal / privacy copy ---------- */
.legal h2 { font-size: 30px; line-height: 36px; margin-top: 48px; }
.legal h3 { font-size: 24px; line-height: 30px; margin-top: 36px; }
.legal h4 { font-size: 20px; line-height: 26px; margin-top: 28px; }
.legal h2:first-child, .legal h3:first-child { margin-top: 0; }
.legal ul { margin-bottom: 24px; }
.legal li { margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #fefefe;
  padding: 72px 0 60px;
}

.site-footer a { color: #b9cc5b; }
.site-footer a:hover, .site-footer a:focus { color: #fff; }

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.footer-nav {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-nav li { margin: 0; }

.copyright-text { font-size: 15px; line-height: 24px; }
.footer-credits { font-size: 13px; color: #9aa0a6; margin-top: 6px; }

.social-list {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.social-list li { margin: 0; }
.social-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  transition: background-color .3s ease, border-color .3s ease;
}
.social-list a:hover, .social-list a:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.social-list svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 767px) {
  .footer-grid { display: block; }
  .social-list { margin-top: 24px; }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: var(--accent);
  border: 2px solid var(--accent);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease, background-color .3s ease;
}
.back-to-top.is-visible { opacity: .85; visibility: visible; }
.back-to-top:hover, .back-to-top:focus {
  opacity: 1;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.back-to-top svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}
.contact-main { flex: 1 1 auto; min-width: 0; }
.contact-aside { flex: 0 0 320px; }

@media (max-width: 767px) {
  .contact-grid { display: block; }
  .contact-aside { margin-top: 48px; }
}

.site-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
}
.site-form .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.site-form input,
.site-form textarea {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-form input:focus,
.site-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(71, 90, 0, .15);
}
.site-form textarea { resize: vertical; }

.site-form button[type="submit"] { cursor: pointer; }
.site-form button[disabled] { opacity: .6; cursor: default; }

.form-status {
  padding: 24px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  background: #f7f7f4;
}
.form-status[hidden] { display: none; }
.form-status p:last-child { margin-bottom: 0; }
.form-fail { border-left-color: #a33; }

.form-note {
  margin-top: 24px;
  font-size: 15px;
  line-height: 24px;
  color: #7a7b7c;
}
