/* Annette Markowitz, MA, LMFT - accessible site stylesheet (earth-tone palette)
   Colour contrast (WCAG 2.1 AA, 4.5:1 text / 3:1 UI) verified:
   body text #2E2A22 on #FAF6EC = 13:1   links #8A4B22 on #FAF6EC = 6.3:1 (5.3:1 on sage cards)
   header text #F3EBD6 on #2F3B27 = 10:1  white on button #8A4B22 = 6.8:1 */

:root {
  --ink: #2E2A22;
  --paper: #FAF6EC;
  --page: #EFE6D2;
  --brown: #2F3B27;        /* deep moss (header, footer, headings) */
  --brown-2: #445536;      /* olive (navigation) */
  --link: #8A4B22;         /* terracotta */
  --link-visited: #6B3A1A; /* dark clay */
  --gold: #E3E6D0;         /* sage tint (cards, current tab) */
  --gold-line: #9A8350;    /* tan/khaki accent lines */
  --cream-text: #F3EBD6;
  --focus: #1F5FBF;
  --focus-dark: #E3C98A;
}

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

html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;       /* 18px base, scales with user settings */
  line-height: 1.65;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
  background: var(--cream-text); color: var(--brown);
  padding: 0.75rem 1.25rem; font-weight: 700; border: 3px solid var(--brown);
  border-radius: 0.25rem; text-decoration: underline;
}
.skip-link:focus { top: 0.5rem; }

/* Header */
.site-header { background: var(--brown); color: var(--cream-text); border-bottom: 6px solid var(--gold-line); }
.site-header .wrap { padding-top: 1.5rem; padding-bottom: 1rem; }
.site-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1.2; font-weight: 700; }
.site-title a, .site-title a:visited { color: var(--cream-text); text-decoration: none; }
.site-title a:hover { text-decoration: underline; }
.site-sub { margin: 0.25rem 0 0; font-size: 1.05rem; }
.site-tagline { margin: 0.25rem 0 0; font-family: Georgia, serif; font-style: italic; color: #D9DCB8; }

/* Navigation */
.site-nav { background: var(--brown-2); border-top: 1px solid var(--gold-line); }
.site-nav .wrap { padding-top: 0; padding-bottom: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav a, .site-nav a:visited {
  display: block; min-height: 44px; padding: 0.7rem 1.1rem;
  color: var(--cream-text); text-decoration: none; font-weight: 600;
  border-bottom: 4px solid transparent;
}
.site-nav a:hover { background: var(--brown); color: var(--cream-text); text-decoration: underline; }
.site-nav a[aria-current="page"], .site-nav a[aria-current="page"]:visited { background: var(--gold); color: var(--brown); border-bottom-color: var(--gold-line); }
.site-nav a[aria-current="page"]:hover { background: var(--gold); color: var(--brown); }

/* Main */
main { display: block; background: var(--paper); border-bottom: 1px solid var(--gold-line); padding: 2rem 0 3rem; }
main:focus { outline: none; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--brown); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 4vw, 1.9rem); margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.3rem; margin: 0 0 0.5rem; }
main .wrap > h2:first-child { margin-top: 0; }
p, ul, ol, blockquote, address { margin: 0 0 1.1rem; }
main a, .card { overflow-wrap: anywhere; }
address { font-style: normal; }
main p, main li, main address { max-width: 70ch; }

.lead { font-size: 1.35rem; font-family: Georgia, serif; color: var(--brown); font-weight: 700; }
.name-line { font-weight: 700; color: var(--brown); }
.signoff { margin-top: 1.5rem; font-family: Georgia, serif; font-style: italic; }
.meta { font-size: 1rem; }
.note { font-size: 1rem; background: var(--gold); border-left: 5px solid var(--brown); padding: 0.75rem 1rem; }

/* Links: always underlined so colour is not the only cue */
a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 0.08em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 0.18em; }

/* Visible focus on everything interactive */
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px;
  box-shadow: 0 0 0 6px #fff;
}
.site-header a:focus-visible, .site-nav a:focus-visible, .site-footer a:focus-visible {
  outline-color: var(--focus-dark); box-shadow: none;
}
.site-nav a:focus-visible { outline-offset: -4px; }

.button, .button:visited {
  display: inline-block; min-height: 44px; padding: 0.7rem 1.5rem;
  background: var(--link); color: #fff !important; font-weight: 700; text-decoration: none;
  border: 2px solid var(--brown); border-radius: 0.4rem;
}
.button:hover { background: var(--brown); text-decoration: underline; }

/* Layout helpers */
.two-col { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; margin-bottom: 1.5rem; }
@media (min-width: 48rem) {
  .two-col { grid-template-columns: 2fr 1fr; }
  .two-col--reverse { grid-template-columns: 1fr 2fr; }
}

figure { margin: 0 0 1.25rem; }
figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.photo--wide img { max-width: min(100%, 300px); }
figcaption { margin-top: 0.5rem; text-align: center; font-style: italic; }
.logo img { max-width: 240px; }
.logo { margin: 1rem 0 2rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 1rem 0 2rem; }
.card { background: var(--gold); border: 2px solid var(--gold-line); border-radius: 0.5rem; padding: 1.25rem; }
.card h2, .card h3 { margin-top: 0; }
.card ul { padding-left: 1.25rem; }
.card > :last-child { margin-bottom: 0; }

.questions { padding-left: 1.4rem; }
.questions li { margin-bottom: 0.4rem; }
.check-list { list-style: none; padding: 0; columns: 1; }
@media (min-width: 40rem) { .check-list { columns: 2; column-gap: 2rem; } }
.check-list li { position: relative; padding-left: 1.75rem; margin-bottom: 0.5rem; break-inside: avoid; }
.check-list li::before { content: ""; position: absolute; left: 0.25rem; top: 0.55em; width: 0.7rem; height: 0.7rem; background: var(--link); border-radius: 50%; }

.quote { border-left: 5px solid var(--gold-line); padding: 0.25rem 0 0.25rem 1.25rem; font-family: Georgia, serif; font-style: italic; }
.quote p { margin-bottom: 0.5rem; }
.quote footer { font-style: normal; }


/* Footer */
.site-footer { background: var(--brown); color: var(--cream-text); border-top: 6px solid var(--gold-line); padding: 1.75rem 0; font-size: 1rem; }
.site-footer a { color: var(--cream-text); }
.site-footer a:visited { color: var(--cream-text); }
.site-footer p:last-child { margin-bottom: 0; }

/* User preferences */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .button, .card { border: 2px solid ButtonText; } .site-nav a[aria-current="page"] { text-decoration: underline; } }
@media print {
  .skip-link, .site-nav { display: none; }
  body, main { background: #fff; } .site-header, .site-footer { background: #fff; color: #000; border: 0; }
  .site-title a, .site-footer a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
}
