/* ==========================================================================
   Michele J. Karel, PhD, ABPP — Geriatric Mental Health Consulting
   Generous type (18px base), high contrast, wide line-height. Accessibility
   is a design principle here: the practice serves older adults and the
   people who care for them.
   ========================================================================== */

:root {
  --forest:      #1F4636;
  --forest-deep: #163327;
  --moss:        #3E6B54;
  --ink:         #2B3733;
  --muted:       #55645C;
  --terracotta:  #9C4420;
  --terracotta-light: #C2703F;
  --cream:       #FDFBF7;
  --sand:        #F4EEE3;
  --sand-deep:   #E8DFCF;
  --line:        #DCD3C2;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --narrow: 760px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--forest);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--forest); color: var(--cream);
  padding: 12px 20px; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--cream); }

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 18px; padding-bottom: 18px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--forest);
  text-decoration: none;
  line-height: 1.25;
}
.brand span {
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.brand:hover { color: var(--terracotta); }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 28px; flex-wrap: wrap; align-items: center;
}
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 1rem;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.site-nav a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--forest); font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--forest);
  color: var(--cream);
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--forest);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.btn:hover { background: var(--forest-deep); border-color: var(--forest-deep); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--cream); }
.btn-light { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--forest); border-color: var(--cream); }

/* ---------- Sections ---------- */

section { padding: 68px 0; }
section.tight { padding: 48px 0; }
.band-sand { background: var(--sand); }
.band-forest { background: var(--forest); color: var(--sand); }
.band-forest h1, .band-forest h2, .band-forest h3 { color: var(--cream); }
.band-forest a { color: #E8B48E; }
.band-forest a:hover { color: var(--cream); }

.eyebrow {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 700; margin-bottom: 14px;
}
.band-forest .eyebrow { color: #E8B48E; }

.lede { font-size: 1.18rem; line-height: 1.65; color: var(--muted); }
.band-forest .lede { color: var(--sand-deep); }

.section-head { max-width: var(--narrow); margin-bottom: 40px; }
.section-head p:last-child { margin-bottom: 0; }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 60px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.25fr .85fr;
  gap: 64px; align-items: center;
}
.hero h1 { margin-bottom: .3em; }
.hero .credential {
  font-family: var(--sans); font-size: 1rem; color: var(--muted);
  letter-spacing: .04em; margin-bottom: 22px;
}
.hero .tagline {
  font-size: 1.15rem; line-height: 1.65; color: var(--ink);
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }

.portrait {
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(31, 70, 54, .16);
  width: 100%;
}
.portrait-frame { position: relative; }
.portrait-frame::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 2px solid var(--sand-deep); border-radius: 6px; z-index: -1;
}

/* ---------- Mission pull quote ---------- */

.mission {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  line-height: 1.4;
  color: var(--cream);
  margin: 0;
  max-width: 900px;
}

/* ---------- Ways to work: compact 3-up card grid ---------- */

.ways-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.way {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.way h3 { margin: 0; font-size: 1.15rem; }
.way p { margin: 0; font-size: 1rem; color: var(--muted); flex: 1; }
.way .effort {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 700;
  padding-top: 4px;
}
.ways-note { margin-top: 30px; font-size: 1.05rem; color: var(--muted); }

/* ---------- CARES: one row per principle, letters form a spine ---------- */

.principles { display: grid; }
.principle {
  display: grid; grid-template-columns: 76px 1fr;
  gap: 30px; align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle .letter {
  font-family: var(--serif);
  font-size: 2.7rem; line-height: .95;
  color: var(--terracotta); font-weight: 600;
  text-align: center;
}
.principle h3 { margin: 0 0 .35em; font-size: 1.18rem; }
.principle p { margin: 0; font-size: 1rem; color: var(--muted); }

/* ---------- Areas of focus: three labelled groups ----------
   A flat list broke down because one item (late life concerns) is a category
   with five topics inside it, while the rest are single topics. Grouping lets
   that one keep its detail on a second line without wrecking the alignment. */

.focus-groups {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 44px 64px;
}

/* Ethics and competencies belong to the profession rather than to a patient
   group or a care setting, so they close the section instead of being forced
   into a third column with a label that fits neither. */
.focus-note {
  margin-top: 42px; padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 1.08rem; line-height: 1.6; color: var(--muted);
  max-width: 80ch;
}
.focus-note strong { color: var(--ink); font-weight: 600; }
.focus-group h3 {
  font-family: var(--sans);
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 700;
  margin: 0 0 18px; padding-bottom: 12px;
  border-bottom: 2px solid var(--sand-deep);
}
.focus-group ul { list-style: none; margin: 0; padding: 0; }
.focus-group li {
  margin-bottom: 20px;
  font-size: 1.05rem; line-height: 1.5; color: var(--ink);
}
.focus-group li:last-child { margin-bottom: 0; }
/* The specifics under "late life mental health concerns" are a sub-item, not a
   second sentence, so they are indented as well as set smaller and muted. */
.focus-group li span {
  display: block;
  margin-top: 9px;
  padding-left: 17px;
  font-size: .95rem; line-height: 1.5; color: var(--muted);
}

/* ---------- Program / work entries ---------- */

.program { padding: 32px 0; border-top: 1px solid var(--line); }
.program:first-of-type { border-top: none; padding-top: 4px; }
.program h3 { font-size: 1.4rem; margin-bottom: .35em; }
.program .meta {
  font-size: .82rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 700; margin-bottom: 10px;
}
.program p { color: var(--muted); max-width: 74ch; }
.refs { font-size: .95rem; margin-top: 10px; }
.refs a { margin-right: 18px; white-space: nowrap; }

/* ---------- Cards (honors, sidebars) ---------- */

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 24px;
}
.card h3 { margin-bottom: .4em; }
.card p { font-size: 1rem; color: var(--muted); }

/* ---------- CV lists ---------- */

.cv-block { margin-bottom: 50px; }
.cv-block h2 {
  font-size: 1.5rem; padding-bottom: 10px;
  border-bottom: 2px solid var(--sand-deep); margin-bottom: 22px;
}
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-list li {
  display: grid; grid-template-columns: 130px 1fr; gap: 24px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cv-list li:last-child { border-bottom: none; }
.cv-list .when {
  color: var(--terracotta); font-weight: 600; font-size: .95rem;
  font-variant-numeric: tabular-nums;
}
.cv-list .what strong { display: block; color: var(--forest); font-weight: 600; }
.cv-list .what span { color: var(--muted); font-size: 1rem; }

.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li {
  font-size: .98rem; line-height: 1.6; color: var(--ink);
  padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line);
  text-indent: -22px;
}
.pubs li:last-child { border-bottom: none; }
.pubs a { word-break: break-word; }

details.more {
  margin-top: 16px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--sand);
}
details.more > summary {
  cursor: pointer; padding: 14px 20px; font-weight: 600;
  color: var(--forest); list-style-position: inside;
}
details.more > summary:hover { color: var(--terracotta); }
details.more > div { padding: 0 20px 12px; }

/* ---------- Form ---------- */

.form-grid { display: grid; gap: 20px; max-width: 620px; }
.field label {
  display: block; font-weight: 600; color: var(--forest);
  margin-bottom: 6px; font-size: 1rem;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: .92rem; display: block; margin-top: 2px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--cream); color: var(--ink);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note {
  margin-top: 14px; max-width: 46ch;
  font-size: .95rem; line-height: 1.55; color: var(--muted);
}
#sent-note { color: var(--terracotta); }

/* ---------- Testimonials ---------- */

.quote {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 6px; padding: 28px 26px;
}
.quote blockquote {
  margin: 0 0 16px; font-family: var(--serif); font-size: 1.12rem;
  line-height: 1.55; color: var(--forest);
}
.quote cite { font-style: normal; font-size: .95rem; color: var(--muted); }

/* ---------- Testimonials: horizontal scroll strip (five quotes) ---------- */

.testi-scroll {
  display: flex; gap: 22px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 4px 4px 18px;
  margin: 0 -4px;
  scrollbar-width: thin;
}
.testi-scroll:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 4px; border-radius: 6px; }
.testi-scroll > .quote {
  scroll-snap-align: start;
  flex: 0 0 min(390px, 82%);
  display: flex; flex-direction: column;
}
/* Collapsed by default so the row of quotes stays a tidy band rather than a
   wall of text. The .is-clamped class is added by script, so with JavaScript
   off the full quote simply shows. */
.quote.is-clamped blockquote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
}
.quote.is-clamped.is-open blockquote {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
.quote-more {
  align-self: flex-start;
  margin-top: 10px; padding: 2px 0;
  background: none; border: 0; border-bottom: 1px solid currentColor;
  font: inherit; font-size: .95rem; font-weight: 600;
  color: var(--terracotta); cursor: pointer;
}
.quote-more:hover { color: var(--forest); }
.quote .who { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.quote.is-clamped .who { margin-top: 18px; }
.quote .who strong { display: block; color: var(--forest); font-weight: 600; font-size: 1rem; }
.quote .who span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.45; }

.testi-nav { display: flex; gap: 10px; margin-top: 10px; }
.testi-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--cream);
  color: var(--forest); font-size: 1.1rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  transition: background .15s ease, border-color .15s ease;
}
.testi-btn:hover { background: var(--forest); border-color: var(--forest); color: var(--cream); }

/* ---------- Abbreviated CV accordion (lives on the About page) ---------- */

.cv-acc {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.cv-acc:first-of-type { border-top: 1px solid var(--line); }
.cv-acc > summary {
  cursor: pointer;
  padding: 20px 8px 20px 0;
  font-family: var(--serif); font-size: 1.28rem; color: var(--forest);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cv-acc > summary::-webkit-details-marker { display: none; }
.cv-acc > summary::after {
  content: "+"; font-family: var(--sans); font-size: 1.5rem; font-weight: 400;
  color: var(--terracotta); line-height: 1; flex: none;
}
.cv-acc[open] > summary::after { content: "\2212"; }
.cv-acc > summary:hover { color: var(--terracotta); }
.cv-acc .acc-body { padding: 0 0 26px; }
.cv-acc .acc-body > p:first-child { margin-top: 0; }
.pub-area { margin-bottom: 30px; }
.pub-area:last-child { margin-bottom: 6px; }
.pub-area h4 {
  font-family: var(--sans); font-size: .82rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--terracotta); font-weight: 700;
  margin: 0 0 10px;
}

/* ---------- Pointer to another page ---------- */

.pagelink {
  display: block;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 26px 28px; background: var(--cream);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.pagelink:hover { border-color: var(--moss); background: var(--sand); }
.pagelink strong {
  display: block; font-family: var(--serif); font-weight: 500;
  font-size: 1.35rem; color: var(--forest); margin-bottom: 6px;
}
.pagelink span { display: block; color: var(--muted); font-size: 1rem; }
.pagelink em { font-style: normal; color: var(--terracotta); font-weight: 600; }

/* ---------- Checkbox group ---------- */

.checks { display: grid; gap: 10px; margin-top: 4px; }
.checks label {
  display: flex; align-items: flex-start; gap: 11px;
  font-weight: 400; color: var(--ink); font-size: 1rem;
  line-height: 1.5; cursor: pointer; margin: 0;
}
.checks input[type="checkbox"] {
  width: 19px; height: 19px; flex: none; margin: 3px 0 0;
  accent-color: var(--forest);
}
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend {
  padding: 0; font-weight: 600; color: var(--forest);
  margin-bottom: 8px; font-size: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest-deep); color: var(--sand-deep);
  padding: 50px 0 34px; font-size: 1rem;
}
.site-footer a { color: #E8B48E; }
.site-footer a:hover { color: var(--cream); }
.site-footer .cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  margin-bottom: 34px;
}
.site-footer h4 {
  color: var(--cream); font-family: var(--sans); font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer .name { font-family: var(--serif); font-size: 1.3rem; color: var(--cream); margin-bottom: 8px; }
.site-footer .fine {
  border-top: 1px solid rgba(244,238,227,.18); padding-top: 22px;
  font-size: .9rem; color: rgba(244,238,227,.7);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .ways-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero .portrait-frame { max-width: 380px; }
  .portrait-frame::after { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4, .ways-grid { grid-template-columns: 1fr; }
  .cv-acc > summary { font-size: 1.12rem; }
  .focus-groups { grid-template-columns: 1fr; gap: 36px; }
  /* The stacked brand + nav eats too much of a phone screen to stay pinned. */
  .site-header { position: static; }
  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
  .site-nav ul { gap: 18px; }
  .site-nav a { font-size: .95rem; }
  .brand { font-size: 1.08rem; }
  .principle { grid-template-columns: 48px 1fr; gap: 18px; }
  .principle .letter { font-size: 2rem; }
  .cv-list li { grid-template-columns: 1fr; gap: 4px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
}

.testi-btn[disabled] { opacity: .35; cursor: default; }
.testi-btn[disabled]:hover { background: var(--cream); border-color: var(--line); color: var(--forest); }
