/* Northside — one stylesheet, no framework.
   Brand colours come from agency.yml in the agency-tools repo so the site and
   the printed PDF reports read as one company.

   Two of those colours cannot be used for text as-is. accent #5FA8D3 is
   2.62:1 on white and fails AA at every size, and muted #6B7A87 is 4.41:1,
   just under the 4.5 line. Both are kept for rules and fills, with darkened
   text variants alongside. We hand people reports that check their contrast;
   this page has to survive the same check. */

:root {
  --primary:      #1B4965;   /* headings            9.60:1 */
  --ink:          #22303C;   /* body               13.50:1 */
  --good:         #2E7D5B;   /* positive            5.00:1 */

  --accent:       #5FA8D3;   /* rules and fills only — never text */
  --accent-text:  #2E7BA8;   /* links               4.65:1 */
  --muted-text:   #697784;   /* secondary           4.59:1 */

  --bg:           #FFFFFF;
  --bg-soft:      #F6F8FA;
  --line:         #E2E8ED;

  --measure: 34rem;          /* readable line length */
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3 { color: var(--primary); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); letter-spacing: -.01em; }
h3 { font-size: 1.0625rem; }
p  { margin: 0 0 1rem; max-width: var(--measure); }

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

/* Visible focus everywhere. Keyboard users and anyone auditing this page. */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { max-width: 56rem; margin: 0 auto; padding: 0 var(--pad); }

section { padding: clamp(2.5rem, 8vw, 4.5rem) 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* -- hero ------------------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 9vw, 5rem); }
.hero p.lede { font-size: 1.1875rem; color: var(--ink); }
.towns { color: var(--muted-text); font-size: .9375rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button {
  display: inline-block;
  padding: .8rem 1.4rem;
  border-radius: 7px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--primary);
}
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: #163C53; color: #fff; }
.button.ghost { color: var(--primary); background: transparent; }
.button.ghost:hover { background: var(--bg-soft); color: var(--primary); }

/* -- services --------------------------------------------------------- */
.services { display: grid; gap: 1rem; margin-top: 1.75rem; }
.service {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.25rem 1.35rem;
  background: var(--bg);
}
.service h3 { margin-bottom: .2rem; }
.service .price { font-weight: 600; color: var(--good); display: block; margin-bottom: .55rem; }
.service p { margin: 0; color: var(--ink); }

/* -- audit form ------------------------------------------------------- */
.audit { background: var(--bg-soft); }
form { margin-top: 1.5rem; max-width: 30rem; }
label { display: block; margin-bottom: 1rem; font-size: .9375rem; font-weight: 600; color: var(--primary); }
input {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .7rem .8rem;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #C9D4DC;
  border-radius: 7px;
}
input::placeholder { color: var(--muted-text); }
.hint { color: var(--muted-text); font-size: .875rem; }

/* -- work ------------------------------------------------------------- */
.work-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .85rem; }
.work-list li { border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.25rem; }
.work-list h3 { margin-bottom: .15rem; }
.work-list p { margin: 0; color: var(--muted-text); font-size: .9375rem; }

/* -- footer ----------------------------------------------------------- */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted-text); font-size: .9375rem; }
footer p { max-width: none; }
.footer-name { color: var(--primary); font-weight: 600; font-size: 1rem; }

/* The audience reads this on a phone, outdoors, one-handed. An 18px-tall
   inline link is a miss waiting to happen, so the contact details get a real
   44px target and sit on their own lines rather than running together. */
.contact { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent-text);
  font-size: 1rem;
}

/* Same reasoning for a linked piece of work. */
.work-list h3 a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 42rem) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .work-list { grid-template-columns: repeat(2, 1fr); }
}

/* Honour a reduced-motion preference. There is no animation here by design —
   the brief rules out anything that delays first paint — but scroll
   behaviour counts too. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
