/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  --c-bg:         #f0f6fa;
  --c-surface:    #ffffff;
  --c-primary:    #4a8fb8;
  --c-primary-dk: #2d6b91;
  --c-primary-lt: #7ab3cf;
  --c-accent:     #6fb5a3;
  --c-text:       #22303c;
  --c-text-2:     #4f6470;
  --c-text-3:     #8aa0ab;
  --c-border:     #c6d8e6;
  --c-border-lt:  #deeaf3;

  /* Hero keeps its own tokens so themes can make the banner neutral while
     leaving --c-primary free for accents. */
  --c-hero-bg:    #4a8fb8;
  --c-hero-bg-dk: #2d6b91;

  --c-primary-a10: rgba(74, 143, 184, 0.10);
  --c-primary-a07: rgba(74, 143, 184, 0.07);
  --c-accent-a09:  rgba(111, 181, 163, 0.09);
  --c-hero-overlay: rgba(20, 45, 65, 0.68);
  --c-focus-on-dark: #ffffff;

  --ff-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
             Ubuntu, Cantarell, 'Open Sans', sans-serif;

  --hdr-h:    64px;
  --content-w: 72ch;
  --wide-w:   1100px;

  --rad:    6px;
  --rad-lg: 12px;
  --sh-sm:  0 1px 4px rgba(0,0,0,0.07);
  --sh-md:  0 4px 14px rgba(0,0,0,0.09);
  --tr:     180ms ease;
}

/* ── Base ───────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--hdr-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--sh-sm);
}

.header-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.site-brand {
  text-decoration: none;
  color: var(--c-primary);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  flex-shrink: 0;
  flex: 1;
  display: flex;
  align-items: center;
}
.site-brand:hover { text-decoration: none; color: var(--c-primary-dk); }

.site-brand-logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* ── Hamburger button ───────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--rad);
  flex-shrink: 0;
  transition: background var(--tr);
}
.nav-toggle:hover { background: var(--c-border-lt); }

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform var(--tr), opacity var(--tr);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Navigation ─────────────────────────────────────────────────── */
#nav-list {
  list-style: none;
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.nav-link {
  display: block;
  padding: 0.4rem 0.85rem;
  color: var(--c-text-2);
  font-size: 0.915rem;
  font-weight: 500;
  border-radius: var(--rad);
  text-decoration: none;
  transition: color var(--tr), background var(--tr);
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--c-primary);
  background: var(--c-border-lt);
  text-decoration: none;
}
.nav-link--active {
  color: var(--c-primary);
  background: var(--c-primary-a10);
  font-weight: 600;
}

/* ── Main ───────────────────────────────────────────────────────── */
#page-content { flex: 1; }

/* ── Page wrapper ───────────────────────────────────────────────── */
.page-wrapper {
  min-height: calc(100vh - var(--hdr-h) - 60px);
  animation: pgFadeIn 0.22s ease both;
}

@keyframes pgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Content wrapper (constrains reading width) ─────────────────── */
.content-wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Clear floated images */
.content-wrap::after {
  content: '';
  display: table;
  clear: both;
}

/* ── Loading ─────────────────────────────────────────────────────── */
.page-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 7rem 1rem;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ───────────────────────────────────────────────────────── */
.error-msg {
  background: #fdf2f2;
  border: 1px solid #eec8c8;
  border-radius: var(--rad);
  padding: 1rem 1.5rem;
  color: #7a3030;
  margin: 2rem 0;
}

/* ── Hero section ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(140deg, var(--c-hero-bg) 0%, var(--c-hero-bg-dk) 100%);
  color: #fff;
  padding: 5.5rem 1.5rem;
  text-align: center;
}

.hero--has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.hero--has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-hero-overlay);
}

.hero-inner {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #000;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.175rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.87);
  margin-bottom: 2.25rem;
}

/* ── Button ──────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.7rem;
  border-radius: var(--rad);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
  border: 2px solid transparent;
}
.btn--hero {
  background: #fff;
  color: var(--c-primary);
}
.btn--hero:hover {
  background: var(--c-bg);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.16);
  text-decoration: none;
}

/* ── Section title (h1) ─────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--c-primary-dk);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

/* ── Section subtitle (h2 / h3) ─────────────────────────────────── */
.section-subtitle {
  font-weight: 600;
  color: var(--c-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 2.25rem;
  margin-bottom: 0.7rem;
}
h2.section-subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); }
h3.section-subtitle { font-size: 1.05rem; color: var(--c-text-2); }

/* Avoid gap when subtitle immediately follows title */
.section-title + .section-subtitle { margin-top: 1rem; }

/* ── Paragraph ───────────────────────────────────────────────────── */
.section-paragraph {
  color: var(--c-text);
  margin-bottom: 1.1rem;
  max-width: 68ch;
}
.section-paragraph:last-child { margin-bottom: 0; }

/* ── List ────────────────────────────────────────────────────────── */
.section-list {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.section-list li {
  margin-bottom: 0.45rem;
  color: var(--c-text);
}

/* ── Divider ─────────────────────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2.5rem 0;
}

/* ── Image / figure ──────────────────────────────────────────────── */
.section-image {
  margin: 1.75rem 0;
  overflow: hidden;
}
.section-image img {
  border-radius: var(--rad);
  box-shadow: var(--sh-md);
  width: 100%;
}

.section-image--center { text-align: center; }
.section-image--center img { margin: 0 auto; width: auto; }

.section-image--right {
  float: right;
  max-width: 45%;
  margin: 0.25rem 0 1.25rem 1.75rem;
}
.section-image--left {
  float: left;
  max-width: 45%;
  margin: 0.25rem 1.75rem 1.25rem 0;
}

figcaption {
  font-size: 0.84rem;
  color: var(--c-text-3);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Image placeholder (shown on load error) */
.image-placeholder {
  width: 100%;
  min-height: 180px;
  border-radius: var(--rad);
  background: var(--c-border-lt);
  border: 1px dashed var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-3);
  font-size: 0.875rem;
  font-style: italic;
}

/* ── Cards grid ───────────────────────────────────────────────────── */
.cards-section { margin-bottom: 1.5rem; }

.cards-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-primary-dk);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--rad-lg);
  padding: 1.4rem 1.25rem;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--tr), transform var(--tr);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

/* Card photo (therapist image) */
.card-image-wrap {
  margin: -1.4rem -1.25rem 1.1rem;
  height: 210px;
  overflow: hidden;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 0;
}
.card-image-placeholder {
  height: 100%;
  min-height: unset !important;
  border-radius: 0 !important;
}

.card-icon {
  font-size: 1.65rem;
  margin-bottom: 0.7rem;
  line-height: 1;
}
.card-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--c-primary-dk);
  margin-bottom: 0.2rem;
}
.card-role {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-primary-lt);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.card-text {
  font-size: 0.888rem;
  color: var(--c-text-2);
  line-height: 1.6;
}

/* People grid — centered, fixed column width so a single card doesn't stretch */
.cards-grid--people {
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  justify-content: center;
}

/* ── Callout ──────────────────────────────────────────────────────── */
.callout {
  border-left: 4px solid var(--c-primary-lt);
  background: var(--c-primary-a07);
  border-radius: 0 var(--rad) var(--rad) 0;
  padding: 0.9rem 1.2rem;
  margin: 1.75rem 0;
}
.callout--accent {
  border-left-color: var(--c-accent);
  background: var(--c-accent-a09);
}

.callout-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-primary);
  margin-bottom: 0.3rem;
}

/* ── Footer ───────────────────────────────────────────────────────── */
#site-footer {
  background: var(--c-border-lt);
  border-top: 1px solid var(--c-border);
}
.footer-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 1.35rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-text-3);
}

/* ── Focus ring ───────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}
/* The dark hero needs a light ring to reach 3:1 against its gradient. */
.hero .btn:focus-visible,
.hero a:focus-visible {
  outline-color: var(--c-focus-on-dark);
}

/* ── Responsive — tablet / mobile ─────────────────────────────────── */
@media (max-width: 780px) {
  .nav-toggle { display: flex; }

  #main-nav {
    display: none;
    position: fixed;
    top: var(--hdr-h);
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--sh-md);
    padding: 0.6rem 1rem 1rem;
    z-index: 199;
  }
  #main-nav.nav--open { display: block; }

  #nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }
  .nav-link { padding: 0.65rem 1rem; font-size: 1rem; }

  .content-wrap { padding: 2rem 1.25rem; }
  .hero { padding: 3.75rem 1.25rem; }

  .section-image--right,
  .section-image--left {
    float: none;
    max-width: 100%;
    margin: 1.5rem 0;
  }

  .cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 2.75rem 1rem; }
  .content-wrap { padding: 1.5rem 1rem; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
  #site-header, #site-footer { display: none; }
  .hero {
    background: none !important;
    color: var(--c-text) !important;
    padding: 1rem 0;
  }
  .hero-title { color: var(--c-text) !important; font-size: 1.5rem; }
  .hero-subtitle { color: var(--c-text-2) !important; }
  .btn { display: none; }
}
