/* Megan Byrne Speech and Language Therapy
   Palette derived from the existing brand (sage green on warm paper).
   Radius system: single 12px scale, locked.
   Motion: hover and focus transitions only. No autoplay, no scroll effects. */

:root {
  --paper:      #FBFAF8;
  --surface:    #FFFFFF;
  --panel:      #EFF2EE;
  --ink:        #1E2A24;
  --muted:      #55665D;
  --line:       #DCE3DB;
  --accent:     #3E5F4C;
  --accent-ink: #FFFFFF;
  --accent-soft:#E7EEE8;
  --shadow:     0 1px 2px rgba(30,42,36,.05), 0 8px 24px rgba(30,42,36,.06);
  --r:          12px;
  --wrap:       1120px;
  --font-display: "Outfit", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-body:    "Work Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #141917;
    --surface:    #1B221E;
    --panel:      #222A25;
    --ink:        #E9EEEA;
    --muted:      #A5B2AA;
    --line:       #2F3831;
    --accent:     #8FBFA1;
    --accent-ink: #0F1E18;
    --accent-soft:#242F28;
    --shadow:     0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* height:auto is required, not optional: the width/height attributes on every
   <img> are there to reserve space and stop layout shift, but without this they
   also act as a presentational height and distort any image sized with width:100%. */
img, video { max-width: 100%; height: auto; display: block; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1rem; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

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

.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 72px;
}

.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: .06em; text-transform: uppercase; }
.brand-sub { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .9375rem;
  padding: .35rem 0; border-bottom: 2px solid transparent;
  transition: border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.nav a:hover { border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--r); color: var(--ink); font: inherit; font-size: .9375rem;
  padding: .5rem .8rem; cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: -1.25rem; right: -1.25rem; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 500;
  font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  padding: .9rem 1.5rem; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #33503F; }
@media (prefers-color-scheme: dark) { .btn-primary:hover { background: #A6CFB5; } }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 72vh; display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(14,24,19,.88) 0%, rgba(14,24,19,.66) 44%, rgba(14,24,19,.18) 80%);
}
.hero .wrap { position: relative; padding-block: 3.5rem 4rem; }
/* Widths here are in rem, not ch: the wrapper uses the body font, so a ch cap
   would squeeze the much larger display headline into a narrow column. */
.hero-copy { max-width: 44rem; color: #fff; }
.hero h1 { font-size: clamp(2.05rem, 4.6vw, 3.1rem); color: #fff; max-width: 17em; }
.hero p { margin: 1.1rem 0 1.9rem; font-size: 1.125rem; color: rgba(255,255,255,.94); max-width: 34rem; }

/* Interior page header */
.page-head { padding-block: 4.5rem 2.75rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); max-width: 20ch; }
.page-head .lede { margin-top: 1.1rem; font-size: 1.1875rem; color: var(--muted); max-width: 58ch; }

/* Opening sentence used in place of a visible page heading. Carries the
   weight the heading would have, so the page does not start on a whisper. */
.page-head .lede-lead {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 30ch;
}

/* Available to screen readers and keyboard users, hidden visually. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.25rem); max-width: 22ch; }
.section-intro { margin-top: 1rem; color: var(--muted); max-width: 60ch; }

/* Credentials */
.creds { padding-block: 2.25rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.creds-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(2rem, 6vw, 4.5rem); }
.creds-row img { height: 52px; width: auto; object-fit: contain; }
@media (prefers-color-scheme: dark) { .creds-row img { background: #fff; padding: 6px 10px; border-radius: 6px; } }

/* Split */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-media img { border-radius: var(--r); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Two-panel */
.panels { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 860px) { .panels { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column;
  transition: border-color .18s ease;
}
.panel:hover { border-color: var(--accent); }
.panel h3 { font-size: 1.375rem; }
.panel p { margin-top: .75rem; color: var(--muted); }
.panel .panel-link { margin-top: auto; padding-top: 1.5rem; font-weight: 500; }
.panel-media { padding: 0; overflow: hidden; }
.panel-media img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }

/* Statement band */
.band { background: var(--accent-soft); border-block: 1px solid var(--line); }
.band-inner { max-width: 40rem; }
.band p { font-family: var(--font-display); font-size: clamp(1.25rem, 2.8vw, 1.7rem); line-height: 1.4; }

/* ---------- Grouped lists ---------- */
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 2.25rem; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; }
.group h3 { font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.group ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.group li { padding: .4rem 0; }

.tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.tags li {
  background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r); padding: .5rem .9rem; font-size: .9375rem;
}

/* ---------- Services grid ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.5rem; padding: 0; }
.services > li { list-style: none; }
.service {
  height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.services > li.wide { grid-column: 1 / -1; }
.service h3 { font-size: 1.3125rem; }
.service .meta { margin-top: .5rem; font-size: .9375rem; color: var(--accent); font-weight: 500; }
.service p { margin-top: .9rem; color: var(--muted); }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } .services > li.wide { grid-column: auto; } }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 2.75rem; }
.prose h3 { font-size: 1.1875rem; margin-top: 2rem; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: .4rem; }
.prose .updated { color: var(--muted); font-size: .9375rem; }

/* ---------- Contact ---------- */
.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-direct { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.contact-direct li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-direct li:last-child { border-bottom: none; }
.contact-direct .label { display: block; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.contact-direct a { font-family: var(--font-display); font-size: 1.1875rem; text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; }

form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .9375rem; font-weight: 500; }
.field .hint { font-size: .875rem; color: var(--muted); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: .8rem .9rem; width: 100%;
  transition: border-color .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--panel); border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-legal p { margin: 0; }
