/* ==========================================================================
   Murray Coulter, MACP, RP (Qualifying) — Online Psychotherapy
   Professional practice stylesheet. Self-hosted fonts, no external requests.
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */

:root {
  color-scheme: light;
  --paper:     #FBFAF8;
  --white:     #FFFFFF;
  --sage:      #E9F0E5;

  --ink:       #16201A;
  --body:      #3E4842;
  --muted:     #5C6A61;

  --line:      #E3E6E0;
  --line-soft: #EFF1EC;

  --pine:      #1C3A2D;
  --pine-dark: #14291F;
  --accent:    #2B5238;

  --serif: 'Source Serif 4', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans:  'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --t-h1:   clamp(1.95rem, 1.6rem + 1.3vw, 2.6rem);
  --t-h2:   clamp(1.6rem, 1.4rem + 0.8vw, 2.05rem);
  --t-h3:   clamp(1.18rem, 1.12rem + 0.3vw, 1.38rem);
  --t-body: clamp(1.1rem, 1.07rem + 0.14vw, 1.19rem);
  --t-sm:   1rem;

  --wrap: 70rem;
  --measure: 42rem;
  --header-h: 4.5rem;
}

/* --- Reset --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.25rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* Selection, the browser surface that belongs to the palette. */
::selection { background: var(--sage); color: var(--ink); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h1, h2 { letter-spacing: -0.01em; }
h3, h4 { letter-spacing: 0; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: 0.5em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
strong { font-weight: 700; color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* --- Layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.75rem);
}

.section { padding-block: clamp(2.5rem, 5vw, 4.25rem); }
.section--white { background: var(--white); }
.section--sage  { background: var(--sage); }
.section--pine  { background: var(--pine); color: #C9D8CE; }
.section--pine h2, .section--pine h3 { color: #fff; }
.section--pine a { color: #DCE9DF; }
.section--pine a:hover { color: #fff; }
.section--bordered { border-top: 1px solid var(--line); }

.measure { max-width: var(--measure); }
.section-head { max-width: var(--measure); margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem); }

/* --- Utility bar --------------------------------------------------------- */

.utility-bar {
  background: var(--pine-dark);
  color: #B8C9BE;
  font-size: var(--t-sm);
}

.utility-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.75rem; flex-wrap: wrap;
  padding-block: 0.45rem;
}

.utility-bar__note { margin: 0; white-space: nowrap; }

.utility-bar__links {
  display: flex; gap: 0.4rem 1.5rem; list-style: none; margin: 0; padding: 0;
}
.utility-bar__links li { margin: 0; }
.utility-bar__links a {
  color: #D3E0D7; text-decoration: none;
}
.utility-bar__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.75rem 1.25rem; text-decoration: none;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h); flex-wrap: wrap;
}

.brand { text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__name {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.012em;
}
.brand__role {
  display: block; font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}

.nav { margin-left: auto; }
.nav__links { display: flex; gap: clamp(1rem, 2.2vw, 1.8rem); list-style: none; margin: 0; padding: 0; }
.nav__links li { margin: 0; }
.nav__links a {
  display: block; white-space: nowrap; font-size: 1.02rem; font-weight: 600;
  color: var(--body); text-decoration: none; padding: 0.55rem 0;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav__links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 900px) {
  .site-header__inner { row-gap: 0.5rem; padding-block: 0.65rem; }
  .brand { margin-right: auto; }
  .brand__role { display: none; }
  .header-cta { order: 2; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .nav__links { flex-wrap: wrap; gap: 0.1rem 1.2rem; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent; border-radius: 4px;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary { background: var(--pine); color: #fff; }
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--outline { background: transparent; color: var(--ink); border-color: #b4bfb7; }
.btn--outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--light { background: #fff; color: var(--pine); }
.btn--light:hover { background: var(--sage); color: var(--pine); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--outline-light:hover { background: #fff; color: var(--pine); border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.header-cta { padding: 0.75rem 1.3rem; font-size: 1rem; white-space: nowrap; }

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

.hero {
  background: var(--paper);
  padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(2rem, 4.5vw, 3rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.hero__title { margin-bottom: 0.75rem; }
.hero__accent {
  font-size: 1.15rem; font-weight: 700; color: var(--accent);
  margin-bottom: 1.25rem;
}
.hero__lede { font-size: 1.14rem; max-width: 38rem; margin-bottom: 1.5rem; }

.hero__press {
  margin-top: 0.9rem; font-size: var(--t-sm); font-weight: 700;
  letter-spacing: 0.02em; color: var(--muted);
}

.hero__facts {
  margin: 1.9rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-size: var(--t-sm); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem;
}

.hero__media { justify-self: end; width: 100%; max-width: 22rem; }
.hero__media img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  background: var(--sage); border: 1px solid var(--line);
}
.hero__grid--flush { margin-bottom: 0; }

/* --- Photo frames (placeholder images; swap the file in images/ to replace) */

.photo-frame {
  display: block; background: var(--sage); border: 1px solid var(--line);
  overflow: hidden;
}
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-frame--portrait { max-width: 20rem; margin: 0; }
.photo-frame--wide { aspect-ratio: 4 / 3; }


@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__media { max-width: 17rem; }
}

/* --- Quick tiles (hero quick-explore) ------------------------------------ */

.tiles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
}
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

.tile {
  display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--white); border: 1px solid var(--line);
  padding: 1.15rem 1.3rem 1.05rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.tile:hover { border-color: #B5C4BA; }
.tile__title {
  margin: 0; font-family: var(--serif); font-size: 1.08rem; font-weight: 700;
  color: var(--ink);
}
.tile p { font-size: var(--t-sm); color: var(--muted); margin: 0; }
.tile p:last-child { margin-bottom: 0; }
.tile__more {
  margin-top: 0.35rem; font-size: 0.84rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.02em;
}
.tile:hover .tile__more { color: var(--ink); }

/* --- Two column ---------------------------------------------------------- */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.cols--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

@media (max-width: 820px) {
  .cols, .cols--even { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* --- Photo frames -------------------------------------------------------- */

.photo-frame {
  display: block; background: var(--sage); border: 1px solid var(--line);
  overflow: hidden;
}
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-frame--portrait { max-width: 20rem; margin: 0; }
.photo-frame--wide { aspect-ratio: 4 / 3; }

@media (max-width: 820px) { .photo-frame--portrait { max-width: 15rem; } }

/* --- Credential banner ---------------------------------------------------- */

/* --- Check list ----------------------------------------------------------- */

.check-list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.check-list li {
  position: relative; padding: 0.65rem 0 0.65rem 2.1rem; margin: 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.12rem; color: var(--body);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: ""; position: absolute; left: 0.15rem; top: 1.05rem;
  width: 1.15rem; height: 0.65rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-52deg) scaleY(1.35);
}

.familiar__close { font-size: 1.06rem; }

/* --- Credentials list ------------------------------------------------------ */

.creds { margin: 0; border-top: 1px solid var(--line); }
.creds > div {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr);
  gap: 0.5rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.creds dt { font-weight: 700; color: var(--ink); font-size: var(--t-sm); }
.creds dd { margin: 0; font-size: var(--t-sm); }

@media (max-width: 560px) { .creds > div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }

/* --- Service cards --------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line);
  padding: clamp(1.35rem, 3vw, 1.9rem);
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: var(--t-sm); margin-bottom: 1.25rem; }
.card .link-more { margin-top: auto; }

.also-supporting {
  margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-size: var(--t-sm); color: var(--muted);
}

.link-more {
  font-size: var(--t-sm); font-weight: 700; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px; align-self: flex-start;
}

/* --- Service blocks (services page) ---------------------------------------- */

.service + .service { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.service h2 { margin-bottom: 0.5rem; }
.service__tagline { color: var(--muted); font-size: 1.03rem; margin-bottom: 1.5rem; }

/* --- Online / photo tiles -------------------------------------------------- */

.photo-tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem;
}
@media (max-width: 900px) { .photo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .photo-tiles { grid-template-columns: minmax(0, 1fr); } }

.photo-tile { margin: 0; }
.photo-tile figcaption { font-size: var(--t-sm); color: var(--muted); margin-top: 0.7rem; }

/* --- Steps ----------------------------------------------------------------- */

.steps { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.step { border-top: 1px solid var(--line); padding-top: 0.85rem; }
.step__num {
  font-weight: 700; color: var(--accent); display: block; margin-bottom: 0.4rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.step p { font-size: var(--t-sm); margin: 0; }

/* --- Sessions / format ------------------------------------------------------ */

.facts { list-style: none; margin: 1rem 0 0; padding: 0; }
.facts li {
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
  font-size: var(--t-sm); margin: 0;
}
.section--pine .facts li { border-bottom-color: rgba(255,255,255,0.16); }

/* --- Notes ------------------------------------------------------------------ */

.note {
  border: 1px solid #CFDCD2; background: var(--sage);
  padding: 1rem 1.35rem; font-size: var(--t-sm); margin-top: 2rem;
}
.note h4 {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem;
  color: var(--pine);
}
.note--safety { border-color: #D9C4B5; background: #F7EFE9; }
.note--safety h4 { color: #6E3417; }
.note p { margin-bottom: 0; }

/* --- FAQ ---------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.2rem 2.5rem 1.2rem 0;
  font-family: var(--serif); font-size: 1.18rem; font-weight: 700; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__body { padding: 0 0 1.15rem; font-size: var(--t-sm); max-width: var(--measure); }
.faq__body p:last-child { margin-bottom: 0; }

/* --- CTA ---------------------------------------------------------------------- */

.cta { text-align: left; }
.cta .btn-row { margin-top: 1.75rem; }
.cta__fine { font-size: var(--t-sm); color: #A8BDB1; margin-top: 1rem; }
.section--pine .cta__fine { color: #A8BDB1; }

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

.site-footer {
  background: var(--pine-dark); color: #A8BDB1;
  padding-block: 3rem; font-size: var(--t-sm);
}
.site-footer a { color: #D3E0D7; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 0.8fr 0.9fr 1.2fr;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-grid h4 {
  font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: #fff; margin-bottom: 0.75rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-cta { margin-top: 0.75rem; padding: 0.65rem 1.15rem; font-size: 0.9rem; }
.hours { margin: 0; }
.hours div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.hours dt { font-weight: 700; color: #D3E0D7; }
.hours dd { margin: 0; text-align: right; }
.footer-bottom {
  padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  justify-content: space-between;
}
.crisis {
  border: 1px solid rgba(255,255,255,0.18);
  padding: 1rem 1.25rem; margin-top: 1.25rem; color: #B8C9BE;
}
.crisis strong { color: #fff; }

/* --- Motion & print ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

@media print {
  .site-header, .site-footer, .btn-row { display: none; }
  body { background: #fff; font-size: 11pt; }
  .section { padding-block: 1rem; }
  a { color: #000; }
  .faq details:not([open]) .faq__body { display: block; }
}