/* Chelmsford "Have Your Say" — styled to echo chelmsford.gov.uk:
   Open Sans, council purple (#6d2077), warm-black text, cyan accent,
   a council header band and a rich multi-column footer.
   Still tuned for older, low-tech users: big type, high contrast, large targets. */

/* ---- Open Sans (self-hosted; no third-party font CDN) ---- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/open-sans-v44-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/open-sans-v44-latin-600.woff2") format("woff2");
}

:root {
  --purple: #6d2077;        /* council primary */
  --purple-dark: #48154f;   /* hover / footer */
  --cyan: #05c3dd;          /* council accent */
  --ink: #2d2926;           /* warm near-black body text */
  --muted: #53565a;
  --bg: #ffffff;
  --soft: #f4f2f6;          /* light purple-grey panel */
  --line: #d8d7d9;
  --focus: #ffdd00;         /* high-visibility focus (UK gov convention) */
  --wrap: 46rem;
  --wrap-wide: 62rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.1rem 3rem; }

/* ---- Skip link (accessibility) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--focus);
  color: #000;
  padding: 0.7rem 1rem;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Council header band ---- */
.site-header { background: var(--purple); border-bottom: 4px solid var(--cyan); }
.header-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.council-mark { display: inline-flex; flex: 0 0 auto; }
.council-mark svg { display: block; height: 40px; width: 40px; }
.council-name {
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.council-name:hover { text-decoration: underline; }

/* ---- Service bar (the survey's own title strip, GOV.UK-style) ---- */
.service-bar { background: var(--purple-dark); }
.service-bar .header-inner { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.service-name {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.service-name:hover { text-decoration: underline; }

/* ---- Headings & text ---- */
h1 { font-size: 2rem; line-height: 1.2; margin: 0.3rem 0 0.9rem; color: var(--ink); }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 1.7rem 0 0.6rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.3rem; }
.muted { color: var(--muted); }
a { color: var(--purple); }
a:hover { color: var(--purple-dark); }
.center { text-align: center; }

.reassure {
  background: var(--soft);
  border-left: 6px solid var(--purple);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  font-size: 1.1rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  width: 100%;
  max-width: 26rem;
  margin: 0.6rem auto;
  padding: 1rem 1.25rem;
  font: inherit;
  font-weight: 600;
  font-size: 1.25rem;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--purple);
  border: 2px solid var(--purple-dark);
  border-radius: 6px;
  box-shadow: 0 3px 0 var(--purple-dark);
  cursor: pointer;
  min-height: 56px;
}
.btn:hover { background: var(--purple-dark); color: #fff; }
.btn:active { box-shadow: none; transform: translateY(2px); }
.btn.secondary {
  color: var(--purple-dark);
  background: #fff;
  border-color: var(--purple);
  box-shadow: 0 3px 0 var(--line);
}
.btn-row { display: flex; gap: 0.75rem; }
.btn-row .btn { margin: 0.6rem 0; }

/* ---- Form ---- */
fieldset { border: 2px solid var(--line); border-radius: 8px; padding: 1.1rem; margin: 0 0 1.4rem; }
legend { font-size: 1.35rem; font-weight: 600; padding: 0 0.4rem; color: var(--purple-dark); }
.hint { font-size: 1.05rem; color: var(--muted); margin: -0.2rem 0 0.8rem; }

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  margin: 0.55rem 0;
  min-height: 56px;
  cursor: pointer;
}
.option input { width: 1.6rem; height: 1.6rem; accent-color: var(--purple); flex: 0 0 auto; }
.option:has(input:checked) { border-color: var(--purple); background: var(--soft); }
.option:hover { border-color: var(--purple); }

textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem;
  border: 2px solid var(--muted);
  border-radius: 6px;
  min-height: 5.5rem;
  resize: vertical;
}

.consent {
  background: var(--soft);
  border: 2px solid var(--line);
  border-left: 6px solid var(--purple);
  border-radius: 6px;
  padding: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.consent input { width: 1.7rem; height: 1.7rem; accent-color: var(--purple); margin-top: 0.15rem; }

.cf-turnstile { margin: 1rem 0; }

/* Honeypot — off-screen, not announced */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* High-visibility focus (UK gov convention: yellow block + black underline) */
a:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
.council-name:focus-visible,
.service-name:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  box-shadow: 0 4px 0 0 #000;
  background-color: var(--focus);
  color: #000;
}
textarea:focus-visible { background-color: #fff; box-shadow: none; outline-offset: 1px; }
.option:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---- Progress (added by JS; hidden if no JS) ---- */
.progress { margin: 0 0 1.2rem; }
.progress-track { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--purple); transition: width 0.25s ease; }
.progress-text { font-weight: 600; margin: 0.4rem 0 0; color: var(--purple-dark); }

.js-steps .step { display: none; }
.js-steps .step.active { display: block; }

/* ---- Council-style footer ---- */
.site-footer { margin-top: 2.5rem; background: var(--purple); color: #fff; }
.footer-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 1.8rem 1.1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.4rem;
}
.footer-title { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.5rem; color: #fff; }
.site-footer p { margin: 0 0 0.6rem; font-size: 1.02rem; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--focus); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 0.5rem; }
.trust-line { font-weight: 600; }
.footer-bar { background: var(--purple-dark); }
.footer-bar .footer-inner { display: block; padding: 0.9rem 1.1rem; }
.footer-copy { margin: 0; font-size: 0.98rem; }

@media (max-width: 30rem) {
  .council-name { font-size: 1.1rem; }
  h1 { font-size: 1.7rem; }
}
