/* Sparrow Panton Psychotherapy — one stylesheet, no build step.
   Default: black, white, Scrabble-tile collages. Calm mode: light, no images, smaller type. */

:root {
  --bg: #faf8f4;
  --panel: #f1eee8;
  --text: #141414;
  --muted: #4a4a4a;
  --line: #dcd8d0;
  --focus: #1b4fd8;
  --accent: #ffd400;
  --max: 1080px;
  --measure: 62ch;
  --font-head: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --h1: clamp(2.2rem, 6vw, 4.2rem);
  --h2: clamp(1.5rem, 3vw, 2.1rem);
  --body: 1.125rem;
}

/* Calm mode: same paper, no yellow, quieter type. Opt-in via toggle. */
body.calm {
  --h1: clamp(1.8rem, 4vw, 2.6rem);
  --h2: clamp(1.3rem, 2.4vw, 1.6rem);
  --body: 1.0625rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: var(--h1); font-weight: 700; }
h2 { font-size: var(--h2); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

.skip {
  position: absolute; left: -999px; top: 0; background: var(--focus); color: #fff;
  padding: 0.6em 1em; z-index: 100; font-weight: 700;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.site-header .wrap {
  display: grid; grid-template-columns: 1fr auto;
  grid-template-areas: "brand nav";
  align-items: center; gap: 0.55rem 1.5rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 0.85rem; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; white-space: nowrap; }
.brand .mark { width: 60px; height: 60px; display: inline-grid; place-items: center; }
.brand .mark img { height: 60px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-sub { font-family: var(--font-body); font-weight: 500; font-size: 0.95rem; color: var(--muted); letter-spacing: 0.02em; margin-top: 0.15em; }
nav.main { grid-area: nav; justify-self: end; display: flex; gap: 0.5rem 2.1rem; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 1.2rem; padding: 0.15em 0; }
nav.main a[aria-current="page"], nav.main a:hover { color: var(--text); text-decoration: underline; }

/* View options */
.view-bar { background: var(--panel); border-bottom: 1px solid var(--line); }
.view-bar .wrap { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.view-bar .toggle:not([aria-pressed="true"]) { background: var(--bg); }
.toggles { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.toggles-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.toggle {
  font: inherit; font-size: 0.88rem; font-weight: 700; text-align: left; line-height: 1.2;
  display: inline-flex; flex-direction: column; gap: 0.1em;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0.4em 0.65em; cursor: pointer;
}
.t-desc { font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.toggle[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.toggle[aria-pressed="true"] .t-desc { color: var(--bg); opacity: 0.85; }

/* Plain-language switching */
[data-lang="plain"] { display: none; }
body.plain [data-lang="plain"] { display: revert; }
body.plain [data-lang="rich"] { display: none; }

/* Sections */
/* In-page jump targets land below the sticky header */
[id] { scroll-margin-top: 11rem; }
#main { scroll-margin-top: 0; }
section { padding: clamp(2.5rem, 7vw, 6rem) 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--muted); }

/* Hero: the sparrow making the zine, as a banner. Drawing first, full
   width but capped in height; headline underneath. Nothing sits on top of the bird. */
.hero.zine { padding-top: 0.5rem; padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero.zine .wrap { display: block; }
.hero.zine .art img { width: 100%; height: auto; max-height: 58vh; object-fit: contain; object-position: left center; filter: none; display: block; }
.hero.zine .copy { margin-top: 1.5rem; max-width: 46rem; }
.art.sparrow img { filter: none !important; border: 0 !important; }
body.calm .hero.zine .art img { max-height: 36vh; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero .art img { width: 100%; height: auto; max-height: 70vh; object-fit: cover; object-position: top; display: block; filter: grayscale(1); border: 1px solid var(--line); }
.hero h1 { margin-bottom: 0.4em; }

/* Split rows: tile collage on one side, text on the other */
.split .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.split.flip .wrap > .art { order: 2; }
.split .art img { width: 100%; height: auto; display: block; filter: grayscale(1); border: 1px solid var(--line); }

/* Page sparrows: one per inner page, sized as a feature not a banner */
.page-art { margin: 0.5rem 0 1.75rem; max-width: 520px; }
.page-art img { width: 100%; height: auto; display: block; }
body.calm .page-art { max-width: 300px; }

/* How I work: four blocks, two by two */
.values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem); }
.value h3 { font-size: var(--h2); }
.value-lead { grid-column: 1 / -1; }
.value-lead p { max-width: 70ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) { .values-grid { grid-template-columns: 1fr; } }
.about-copy { max-width: 72ch; }

/* Fee tiers */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tier { border: 1px solid var(--line); border-top: 4px solid var(--accent); background: var(--panel); padding: 1.2rem 1.3rem; }
body.calm .tier { border-top-color: var(--line); }
.tier .price { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; margin: 0 0 0.2em; }
.tier p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.note { border-left: 3px solid var(--line); padding: 0.6em 1em; color: var(--muted); font-size: 1rem; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-family: var(--font-head);
  background: var(--text); color: var(--bg); padding: 0.8em 1.4em; border-radius: 4px; border: 2px solid var(--text);
}
.btn.ghost { background: transparent; color: var(--text); }
.btn + .btn { margin-left: 0.6rem; }

/* Crisis note on contact */
.crisis { border: 1px solid var(--line); background: var(--panel); padding: 1.2rem 1.4rem 0.6rem; margin-top: 1.5rem; max-width: 72ch; }
.crisis ul { margin-top: 0; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* Definition-ish lists on contact */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.site-footer p { margin: 0 0 0.4em; }
.site-footer strong { color: var(--text); }

/* Ink swapping: the sparrow drawings exist as black ink + yellow headphones (Full)
   and black ink only (Calm). Only one shows at a time. */
.ink-calm { display: none !important; }
body.calm .ink-full { display: none !important; }
body.calm .ink-calm { display: block !important; }

/* Calm mode hides the collage art and flattens the layout;
   .art.sparrow stays (it's the calm line-work version), just smaller. */
body.calm .art:not(.sparrow) { display: none; }
body.calm .art.sparrow { max-width: 320px; }
body.calm .hero .wrap, body.calm .split .wrap { grid-template-columns: 1fr; }
body.calm .hero h1 { margin-top: 0; }
body.calm section { padding: 2.2rem 0; }

@media (max-width: 760px) {
  .hero .wrap, .split .wrap { grid-template-columns: 1fr; }
  .split.flip .wrap > .art { order: 0; }
  .hero .art img { max-height: 42vh; }
  .btn + .btn { margin-left: 0; margin-top: 0.6rem; }
  /* Phones: header scrolls away instead of pinning a third of the screen */
  .site-header { position: static; }
  .site-header .wrap { grid-template-columns: 1fr; grid-template-areas: "brand" "nav"; gap: 0.6rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
  nav.main { justify-self: start; }
  .brand { font-size: 1.25rem; gap: 0.65rem; white-space: normal; }
  .brand .mark, .brand .mark img { width: auto; height: 46px; }
  .brand-sub { font-size: 0.85rem; }
  nav.main { gap: 0.4rem 0.8rem; width: 100%; }
  nav.main a { font-size: 1rem; }
  .toggles-label { width: 100%; }
  .toggle { font-size: 0.85rem; padding: 0.35em 0.7em; }
  [id] { scroll-margin-top: 1rem; }
}

/* Office map (OpenStreetMap embed: no Google tracking on a therapy site) */
.map { margin-top: 2rem; }
.map iframe { display: block; width: 100%; height: 340px; border: 1px solid var(--line); border-radius: 4px; }
.map-links { margin-top: 0.5rem; font-size: 1rem; color: var(--muted); }
body.calm .map iframe { filter: grayscale(1); height: 260px; }

/* Photo of Sparrow (About) */
.headshot { float: right; width: min(240px, 40%); margin: 0.3rem 0 1rem 1.5rem; }
.headshot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.headshot figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
.about-copy::after { content: ""; display: block; clear: both; }
body.calm .headshot img { filter: grayscale(1); }
@media (max-width: 560px) { .headshot { float: none; width: 220px; margin: 0 0 1.25rem; } }
