/* ==========================================================================
   Westmere Care Limited — shared stylesheet
   Calm, professional palette for a regulated children's residential care
   provider. Audience: local authority social workers & commissioners.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-opsz.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/public-sans-latin-wght.woff2") format("woff2");
}

:root {
  /* Colour palette — deep teal (trust, calm) + warm neutral + muted sand accent */
  --color-bg: #faf8f4;
  --color-surface: #ffffff;
  --color-surface-alt: #f1efe8;
  --color-primary: #2f5d5a;
  --color-primary-dark: #1e3e3c;
  --color-primary-light: #e6efee;
  --color-accent: #9c6b2e;
  --color-accent-light: #f3e8d8;
  --color-text: #262622;
  --color-text-muted: #55564f;
  --color-border: #ddd7c8;
  --color-success-bg: #e7f0ea;
  --color-success-text: #244d34;
  --focus-ring: #1a73e8;

  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;

  --container-width: 1120px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(30, 40, 38, 0.08);
  --shadow-md: 0 6px 20px rgba(30, 40, 38, 0.10);
  --shadow-lg: 0 12px 32px rgba(30, 40, 38, 0.14);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
ul, ol { padding-left: 1.25em; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-primary-dark);
  margin-top: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- Focus visibility (WCAG 2.1 AA) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 1000;
  transition: top 0.15s ease-in-out;
}
.skip-link:focus { top: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 500;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.brand:hover { color: var(--color-primary-dark); }
.brand-mark { height: 38px; width: auto; flex-shrink: 0; }
.brand-text-org { display: block; font-size: 0.68rem; font-weight: 400; letter-spacing: 0.04em; color: var(--color-text-muted); font-family: var(--font-body); text-transform: uppercase; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-phone:hover { background: var(--color-primary-light); }
.header-phone-icon { width: 20px; height: 20px; flex-shrink: 0; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  cursor: pointer;
}
.nav-toggle-icon { width: 20px; height: 20px; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.primary-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-accent);
}
.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: 999px;
  border-bottom: none !important;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--color-primary-dark); }

@media (max-width: 359px) {
  .brand { font-size: 1rem; gap: 0.45rem; }
  .brand-mark { height: 32px; }
  .header-actions { gap: 0.25rem; }
  .nav-toggle { padding-inline: 0.55rem; }
}
@media (max-width: 860px) {
  .header-phone-text { display: none; }
  .header-phone { padding: 0.5rem; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 1.25rem 1rem;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 0.7rem 0.2rem; border-bottom: 1px solid var(--color-surface-alt); }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}
@media (min-width: 861px) {
  .nav-toggle { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 2px 8px rgba(30, 62, 60, 0.18); }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30, 62, 60, 0.22); }
.btn-outline { background: transparent; color: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn-outline:hover { background: var(--color-primary-light); transform: translateY(-1px); }
.btn-accent { background: var(--color-accent); color: #fff; box-shadow: 0 2px 8px rgba(125, 86, 35, 0.2); }
.btn-accent:hover { background: #7d5623; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(125, 86, 35, 0.26); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg) 65%);
  padding-block: clamp(2.5rem, 6vw, 5rem);
  border-bottom: 1px solid var(--color-border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7d5623;
  margin-bottom: 0.75rem;
}
.hero-lede { font-size: 1.15rem; color: var(--color-text-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.hero-art { width: 100%; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section-header { max-width: 65ch; margin-bottom: 2.25rem; }
.section-header p { color: var(--color-text-muted); }

.grid {
  display: grid;
  gap: 1.75rem;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.5rem; }
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-light);
  margin-bottom: 1.1rem;
}
.card-icon { width: 26px; height: 26px; color: var(--color-primary); }

.callout {
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-block: 1.5rem;
}
.callout-accent { border-left-color: var(--color-accent); background: var(--color-accent-light); }
.callout h2 { font-size: 1.25rem; }

.stat-list { list-style: none; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .stat-list { grid-template-columns: repeat(3, 1fr); } }
.stat-list li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.stat-num { display: block; font-family: var(--font-heading); font-size: 1.75rem; color: var(--color-primary-dark); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.15rem; }

.placeholder-tag {
  display: inline-block;
  background: #fff4e0;
  color: #7a4c00;
  border: 1px dashed #c98f1a;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.85em;
  font-weight: 600;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-primary-dark);
  color: #fff;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d7e3e1; }
.cta-band a { color: #cfe0dd; }
.cta-band a:hover { color: #fff; }
.cta-band .btn-accent { color: #fff; }
.cta-band .btn-outline { color: #fff; border-color: #fff; }
.cta-band .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1.5rem; }
.steps li {
  position: relative;
  padding-left: 3.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  padding-right: 1.25rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.2rem;
  width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 640px; }
.form-row-2 { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.hint { font-weight: 400; color: var(--color-text-muted); font-size: 0.88rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fff;
  color: var(--color-text);
}
textarea { resize: vertical; min-height: 130px; }
.required-mark { color: #8a3324; }
fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem 1.25rem; }
legend { font-weight: 700; padding: 0 0.4rem; }
.form-note { font-size: 0.9rem; color: var(--color-text-muted); margin-top: 1rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-message {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid #b7d3c0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.form-error {
  background: #fbe9e7;
  border-color: #e0a89e;
  color: #7a2e1f;
}
.field-error {
  color: #7a2e1f;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}
[aria-invalid="true"] {
  border-color: #a9432f !important;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #dfe8e6;
  padding-block: 2.75rem 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 750px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}
.site-footer h2, .site-footer h3 { color: #fff; font-size: 1rem; font-family: var(--font-body); }
.footer-logo { height: 44px; width: auto; margin-bottom: 0.85rem; }
.site-footer a { color: #cfe0dd; }
.site-footer a:hover { color: #fff; }
.footer-legal-org {
  font-size: 0.85rem;
  color: #b7c8c4;
  line-height: 1.6;
}
.footer-nav-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: #a9bcb8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* ---------- Cookie banner ---------- */

/* ---------- Utility ---------- */
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}
/* ---------- Inner-page hero summary panel ---------- */
.hero-aside {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.75rem;
}
.hero-aside h2,
.toc h2,
.card-tag {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d5623;
  margin: 0 0 0.9rem;
}
.fact-list { margin: 0; }
.fact-list > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--color-border);
}
.fact-list > div:first-child { border-top: 0; padding-top: 0; }
.fact-list > div:last-child { padding-bottom: 0; }
.fact-list dt { font-weight: 600; color: var(--color-primary-dark); }
.fact-list dd { margin: 0; }
@media (max-width: 420px) {
  .fact-list > div { grid-template-columns: 1fr; gap: 0.1rem; }
}
.check-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.7rem; }
.check-list:last-child { margin-bottom: 0; }
.check-list li { position: relative; padding-left: 1.7rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.4em;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(-45deg);
}

/* ---------- Heading-left, text-right layout for long-form sections ---------- */
.split { display: grid; gap: 1rem 3.5rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
}
.split > h2 { margin-top: 0; }
.split-body > :first-child { margin-top: 0; }
.split-body > :last-child { margin-bottom: 0; }
.lead { font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.5; color: var(--color-primary-dark); }

/* ---------- Privacy policy contents list ---------- */
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--color-border); }
.toc a {
  display: block;
  margin-left: -2px;
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 2px solid transparent;
  color: var(--color-text-muted);
  text-decoration: none;
}
.toc a:hover { color: var(--color-primary-dark); border-left-color: var(--color-accent); }
@media (min-width: 900px) { .toc { position: sticky; top: 6rem; } }
.split-body h2[id] { scroll-margin-top: 6rem; }

/* ---------- Form beside an information panel ---------- */
.form-layout { display: grid; gap: 2rem 3rem; }
@media (min-width: 900px) {
  .form-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}
.form-layout .form-grid { max-width: none; }
.mini-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.contact-details-grid { gap: 1.25rem; }
.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
