/* Hawkins Behavioral Services. Fonts are self-hosted. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-36-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ivory: #f7f4ed;
  --ivory-deep: #efebe1;
  --white: #fffdf8;
  --rainwater: #4d7180;
  --blue: #193746;
  --blue-dark: #112b3a;
  --ink: #263c45;
  --muted: #4e6269;
  --line: #d6d9d2;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 5.4rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
p { margin: 0 0 1rem; text-wrap: pretty; }
h1, h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--blue-dark);
  text-wrap: balance;
}
h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; color: var(--blue-dark); }
ul, ol, dl, figure { margin: 0; padding: 0; }
address { font-style: normal; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link {
  position: absolute; left: -9999px; top: 0.75rem; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 8px; background: var(--blue); color: #fff;
}
.skip-link:focus { left: 0.75rem; color: #fff; }
.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;
}
.muted { color: var(--muted); }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 244, 237, 0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: var(--header-h); }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: min(15rem, calc(100vw - 8.25rem)); }
.nav { display: none; }
.menu { position: relative; }
.menu > summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  color: var(--blue-dark); font-size: 0.9375rem; font-weight: 600;
  list-style: none; cursor: pointer; user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { border-color: var(--blue); }
.menu-panel, .nav .nav-submenu {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  width: min(19rem, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - var(--header-h) - 1rem); overflow-y: auto;
  padding: 0.4rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--white); box-shadow: 0 18px 40px -20px rgba(19, 40, 51, 0.35);
}
.nav-group { position: relative; }
.nav-group > summary {
  display: flex; align-items: center; gap: 0.45rem; list-style: none; cursor: pointer;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: ""; width: 0.42rem; height: 0.42rem;
  border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
}
.nav-group[open] > summary::after { transform: translateY(0.1rem) rotate(225deg); }
.menu-panel a, .menu-panel .nav-group > summary, .nav-submenu a {
  display: flex; align-items: center; min-height: 44px; padding: 0.35rem 0.85rem;
  border-radius: 10px; color: var(--blue); font-weight: 500; line-height: 1.4; text-decoration: none;
}
.menu-panel .nav-group > summary { justify-content: space-between; }
.menu-panel .nav-submenu { margin: 0 0 0.1rem 0.6rem; padding-left: 0.2rem; border-left: 1px solid var(--line); }
.menu-panel a:hover, .menu-panel summary:hover, .nav-submenu a:hover,
.nav-submenu a[aria-current="page"] { background: var(--ivory); }
.menu-panel .nav-text { margin-top: 0.3rem; justify-content: center; background: var(--blue); color: #fff; font-weight: 600; }
.menu-panel .nav-text:hover { background: var(--blue-dark); }
@media (min-width: 1040px) {
  .nav { display: flex; align-items: center; gap: clamp(0.85rem, 2vw, 1.5rem); }
  .nav > a, .nav-group > summary {
    display: flex; align-items: center; min-height: 44px;
    color: var(--blue); font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  }
  .nav .nav-submenu { right: auto; left: 0; font-size: 0.9375rem; }
  .nav .nav-text {
    min-height: 40px; padding: 0 1.1rem; border-radius: 999px;
    background: var(--blue); color: #fff; font-weight: 600; text-decoration: none;
    transition: background-color 0.15s;
  }
  .nav .nav-text:hover { background: var(--blue-dark); color: #fff; }
  .menu { display: none; }
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.6rem; border-radius: 999px;
  background: var(--blue); color: #fff;
  font-size: 1rem; text-align: center; line-height: 1.35; font-weight: 600; text-decoration: none;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--blue-dark); color: #fff; }

/* ---------- Homepage hero ---------- */
.hero {
  padding: clamp(1.75rem, 5vw, 4.5rem) 0 clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; gap: 1.5rem; }
.hero h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(2rem, 4.2vw, 3rem);
}
.hero-lead { max-width: 35rem; margin-bottom: 1rem; font-size: clamp(1.0625rem, 1.6vw, 1.125rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1rem; }
.hero-actions .btn { padding-inline: 1rem; }
.hero-actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.visit-details {
  max-width: 35rem;
  margin: 0.85rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.hero-photo {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
}
.hero-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.hero-photo figcaption { display: grid; gap: 0.12rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }
.hero-photo strong { color: var(--blue-dark); }
@media (min-width: 800px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
  }
  .hero-photo { display: block; width: 100%; max-width: 21rem; justify-self: end; }
  .hero-photo img { border-radius: 8px; }
  .hero-photo figcaption { margin-top: 0.65rem; }
}

/* ---------- Sections: heading on the left, text on the right ---------- */
.section { padding: clamp(1.75rem, 4vw, 2.75rem) 0; border-bottom: 1px solid var(--line); }
.split { display: grid; gap: 1.25rem; }
.split-head h2 { font-size: clamp(1.875rem, 3.6vw, 2.5rem); }
.split-body { max-width: 44rem; }
.split-body > :last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 4rem; }
}
.service-links { list-style: none; }
.service-links a { display: flex; align-items: center; min-height: 44px; padding: 0.4rem 0; line-height: 1.4; }
.fine { color: var(--muted); font-size: 0.9375rem; }
/* ---------- Subpages ---------- */
.page-head { padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 2.75rem); }
.page-head h1 { margin-bottom: 1rem; font-size: clamp(2.375rem, 5.5vw, 3.5rem); }
.page-head .lede { max-width: 40rem; font-size: 1.1875rem; line-height: 1.6; }
.page-head .btn { margin-top: 0.5rem; }
.page-body { padding-bottom: clamp(3.5rem, 8vw, 5.5rem); }
.page-body .wrap > * { max-width: 44rem; }
.block { padding-top: 2.25rem; margin-top: 2.25rem; border-top: 1px solid var(--line); }
.block:first-child { margin-top: 0; }
.block h2 { margin-bottom: 0.85rem; font-size: clamp(1.5rem, 3vw, 1.875rem); }
.block > :last-child { margin-bottom: 0; }
.plain-list { margin-bottom: 1rem; padding-left: 1.25rem; }
.plain-list li { margin-bottom: 0.6rem; padding-left: 0.25rem; }
.plain-list li::marker { color: var(--rainwater); }
.doc-list { list-style: none; border-top: 1px solid var(--line); }
.doc-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.doc-list a { font-weight: 600; }
.doc-list p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.payment-qr { margin-top: 0.25rem; }
.payment-qr summary { width: fit-content; min-height: 44px; padding-block: 0.55rem; cursor: pointer; color: var(--blue); }
.payment-qr img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.cred-list { display: grid; gap: 1.1rem; }
.cred-list dt { color: var(--blue-dark); font-weight: 600; }
.cred-list dd { margin: 0.1rem 0 0; }
.contact-form { max-width: 35rem; margin-bottom: 1rem; }
.contact-fields { display: grid; gap: 0.75rem; margin-bottom: 0.75rem; }
.contact-form label { display: block; font-size: 0.9375rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; min-height: 44px; margin-top: 0.2rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--rainwater); border-radius: 6px; background: var(--white);
  color: var(--blue-dark); font: 400 1rem/1.45 var(--sans);
}
.contact-form button { border: 0; cursor: pointer; }
.contact-form .contact-fallback { margin: 0.75rem 0 0.4rem; }
.contact-form .contact-draft[hidden] { display: none; }
@media (min-width: 540px) { .contact-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Service pages: contact form sits beside the content so it shows above the fold. */
.page-body .wrap.service-layout > * { max-width: none; }
.service-main { max-width: 44rem; }
.service-aside {
  margin-bottom: 2.25rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--white);
}
.service-aside h2 { margin-bottom: 0.85rem; font-size: clamp(1.375rem, 2.6vw, 1.625rem); }
.service-aside > :last-child { margin-bottom: 0; }
@media (min-width: 960px) {
  .service-layout {
    display: grid; grid-template-columns: minmax(0, 44rem) minmax(17rem, 22rem);
    justify-content: space-between; align-items: start; column-gap: 3rem;
  }
  .service-main { grid-column: 1; grid-row: 1; }
  .service-aside {
    grid-column: 2; grid-row: 1; margin-bottom: 0;
    position: sticky; top: calc(var(--header-h) + 1rem);
  }
  .service-aside .contact-fields { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ivory-deep); font-size: 0.9375rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 0.35rem 2rem; padding-top: 1.5rem; padding-bottom: 0.75rem;
}
.footer-contact { line-height: 1.75; }
.footer-links { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; line-height: 1.4; }
.footer-base { padding-bottom: 1.25rem; color: var(--muted); font-size: 0.875rem; }
.footer-base p { margin: 0; padding-top: 0.15rem; }
.footer-base::before { content: ""; display: block; margin-bottom: 0.75rem; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
