/* ==========================================================================
   PATH. Psychology, Assessment, Treatment Services of Halton
   Transition / closure page. Static HTML + CSS, no JavaScript.

   Brand colours sampled directly from the PATH logo artwork:
     teal  #436F78  (57% of the logo's opaque pixels)
     gold  #FFE090  (41% of the logo's opaque pixels)
   ========================================================================== */

/* --------------------------------------------------------------- Fonts --- */

@font-face {
  font-family: 'Questrial';
  src: url('/assets/fonts/questrial-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2122, U+FEFF, U+FFFD;
}

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

:root {
  --brand:       #436F78;  /* PATH teal, sampled from the logo */
  --brand-deep:  #33565D;  /* darkened teal for text and links */
  --gold:        #FFE090;  /* PATH gold, sampled from the logo */
  --paper:       #FBF6F3;  /* warm off-white page background */
  --surface:     #FFFFFF;
  --tint:        #EEF3F4;  /* announcement panel */
  --ink:         #23353A;  /* body text, 11.9:1 on paper */
  --ink-soft:    #55686E;  /* secondary text, 5.5:1 on paper */
  --rule:        rgba(67, 111, 120, 0.18);
  --rule-soft:   rgba(67, 111, 120, 0.12);

  --font-display: 'Questrial', 'Century Gothic', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --gutter:  clamp(1.25rem, 5vw, 2.5rem);
  --measure: 62ch;
  --radius:  3px;
}

/* ---------------------------------------------------------------- Base --- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a { color: var(--brand-deep); }

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

.wrap {
  width: min(100% - (var(--gutter) * 2), 1140px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  text-decoration: none;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

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

.site-header {
  border-top: 5px solid var(--brand);
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3.25rem);
  text-align: center;
}

.logo {
  display: block;
  width: clamp(76px, 13vw, 116px);
  height: auto;
  margin: 0 auto clamp(1.25rem, 3vw, 1.75rem);
}

.brand-mark {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 1.5rem + 4vw, 3.75rem);
  line-height: 1;
  letter-spacing: 0.16em;
  text-indent: 0.16em;       /* offsets the trailing letter-space */
  color: var(--brand);
}

.brand-line {
  margin: 0;
  font-size: clamp(0.8125rem, 0.74rem + 0.35vw, 0.9375rem);
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.header-lockup::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
  background: var(--gold);
}

/* ---------------------------------------------------------------- Main --- */

main > section + section { margin-top: clamp(2.5rem, 6vw, 4.5rem); }

/* -------------------------------------------------------- Announcement --- */

.notice {
  background: var(--tint);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4.5vw, 3.25rem) clamp(1.5rem, 4vw, 3.25rem);
}

.notice h1 {
  max-width: 24ch;
  margin: 0 auto clamp(1.25rem, 3vw, 1.75rem);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.1rem + 2.4vw, 2.5rem);
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  color: var(--brand-deep);
}

.notice p {
  max-width: var(--measure);
  margin-inline: auto;
  text-align: center;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  text-wrap: pretty;
}

/* --------------------------------------------------------------- Cards --- */

.practitioners {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: clamp(1.625rem, 3.5vw, 2.5rem);
}

.card-name {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  line-height: 1.35;
  color: var(--brand-deep);
  text-wrap: balance;
}

.card-name .surname { white-space: nowrap; }

/* No flex-grow here: the contact block follows the text directly instead of
   being pushed to the card's bottom edge, which left a gap in the shorter
   card. The grid still stretches both cards to the same height. */
.card-text {
  margin: 0;
  color: var(--ink);
}

/* ------------------------------------------------------- Contact block --- */

.contact-list {
  display: grid;
  gap: clamp(1rem, 2vw, 1.375rem);
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--rule-soft);
}

.contact-item dt {
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact-item dd { margin: 0; }

.contact-item address {
  font-style: normal;          /* browsers italicise <address> by default */
  line-height: 1.6;
}

/* Icon plus value, shared by the address, email and website rows. */
.with-icon {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.with-icon .c-icon { margin-top: 0.2em; }

.c-icon {
  flex: none;
  color: var(--brand);
}

/* Links in the contact block: email and Ms. Kaczmarzyk-Kozlowski's website.
   Ms. Spudic's website is deliberately plain text, not a link. */
.link {
  color: var(--brand-deep);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link span {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.link:hover span,
.link:focus-visible span { text-decoration-color: currentColor; }

.phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;             /* comfortable tap target */
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 1.1rem + 0.6vw, 1.4375rem);
  line-height: 1.2;
  color: var(--brand-deep);
  text-decoration: none;
}

.phone:hover span,
.phone:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------- Closing --- */

.closing { text-align: center; }

.closing::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
  background: var(--gold);
}

.closing p {
  max-width: 44ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.7vw, 1.4375rem);
  line-height: 1.6;
  color: var(--brand-deep);
  text-wrap: balance;
}

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

.site-footer {
  margin-top: clamp(3.5rem, 9vw, 6rem);
  padding-block: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule-soft);
  text-align: center;
}

.crisis {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink);
}

.crisis a {
  color: var(--brand-deep);
  font-weight: 600;
  text-underline-offset: 3px;
}

.colophon {
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ 404 page --- */

.not-found {
  text-align: center;
  padding-block: clamp(1rem, 3vw, 2rem);
}

.not-found h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem);
  line-height: 1.25;
  color: var(--brand-deep);
  text-wrap: balance;
}

.not-found p {
  max-width: 52ch;
  margin-inline: auto;
}

.back-link {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.85rem 1.75rem;
  background: var(--brand);
  border-radius: var(--radius);
  color: #fff;                  /* 5.55:1 against the teal */
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible { background: var(--brand-deep); }

/* -------------------------------------------------------------- Narrow --- */

/* Long centred paragraphs are harder to read on a narrow column, so the
   announcement copy reverts to left alignment on phones. */
@media (max-width: 600px) {
  .notice p { text-align: left; }
}

@media (max-width: 480px) {
  body { line-height: 1.65; }
  .brand-mark { letter-spacing: 0.12em; text-indent: 0.12em; }
  .brand-line { letter-spacing: 0.06em; }
  .notice h1 { max-width: none; }
}

/* --------------------------------------------------------------- Print --- */

@media print {
  body { background: #fff; color: #000; }
  .skip-link, .header-lockup::after, .closing::before { display: none; }
  .notice, .card { border: 1px solid #999; background: #fff; }
  .phone::after { content: ' ' attr(href); }
}
