/* Empowering Children's Care · eccare.uk
   Brand: logo blue #6AAFD5, navy #021935, text grey #374151, Lato and Merriweather.
   See 02 Brand/Colours in the ECC vault. */

@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-weight: 300 900; font-style: normal; font-display: swap; src: url("/fonts/merriweather.woff2") format("woff2"); }

:root {
  --text: #374151;
  --navy: #021935;
  --navy-2: #0b2d55;
  --blue: #6aafd5;        /* logo blue: shapes and accents only, never small text */
  --blue-deep: #2f6f99;   /* darker blue that passes contrast for links */
  --tint: #f3f8fc;
  --line: #dde5ee;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(2, 25, 53, .06), 0 8px 24px rgba(2, 25, 53, .08);
  --shadow-lg: 0 2px 4px rgba(2, 25, 53, .06), 0 18px 40px rgba(2, 25, 53, .14);
  --max: 1160px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 17px/1.7 "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
h1, h2, h3 {
  font-family: "Merriweather", Georgia, serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .55em;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }

.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--white); padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }


/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(2, 25, 53, .06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; flex-shrink: 0; padding: 8px 0; }
/* Sized by height with width auto, so the logo always shows in full and is never cropped */
.logo img { height: 64px; width: auto; max-width: none; }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 9px 14px; text-decoration: none; color: var(--navy);
  font-weight: 700; font-size: .98rem; border-radius: 999px; transition: background-color .2s ease, color .2s ease;
}
.nav a:hover { background: var(--tint); }
.nav a[aria-current="page"] { background: var(--navy); color: var(--white); }

.nav-toggle {
  display: none; align-items: center; gap: 10px; background: none; border: 2px solid var(--navy); color: var(--navy);
  font: 700 .95rem "Lato", sans-serif; padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; transition: transform .25s ease, top .25s ease; }
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  :root { --header-h: 66px; }
  .logo img { height: 44px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); box-shadow: 0 16px 30px rgba(2, 25, 53, .1);
    display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease;
  }
  .nav > ul { overflow: hidden; flex-direction: column; padding: 0 16px; min-height: 0; }
  .nav.open { grid-template-rows: 1fr; border-bottom: 1px solid var(--line); }
  .nav.open > ul { padding: 12px 16px 18px; }
  .nav a { padding: 12px 16px; font-size: 1.05rem; }
}
@media (max-width: 380px) { .logo img { height: 36px; } .nav-toggle { padding: 8px 12px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(106, 175, 213, .35), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(106, 175, 213, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #e8f1f8; padding: clamp(64px, 10vw, 120px) 0;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: -40px; bottom: -60px;
  width: clamp(240px, 34vw, 460px); aspect-ratio: 1; opacity: .09;
  background: url("/images/symbol-white.webp") center / contain no-repeat;
}
.hero h1 { color: var(--white); max-width: 20ch; }
.hero p { max-width: 62ch; font-size: 1.12rem; }
.hero .eyebrow { color: #a9d2ea; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.eyebrow {
  display: inline-block; font: 700 .8rem/1 "Lato", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-deep); margin-bottom: 14px;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tint { background: var(--tint); }
.section--navy { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #e8f1f8; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy .eyebrow { color: #a9d2ea; }
.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.center { text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split--flip > :first-child { order: 2; }
.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--tint); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.media:hover img { transform: scale(1.03); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--flip > :first-child { order: 0; }
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card__body p { flex: 1; }
.card__link { font-weight: 700; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card__link::after { content: "\2192"; transition: transform .2s ease; }
.card__link:hover::after { transform: translateX(4px); }

.icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(106, 175, 213, .18); color: var(--navy); margin-bottom: 18px;
}
.icon svg { width: 26px; height: 26px; }

/* ---------- Statement (mission, closing quote) ---------- */
.statement { text-align: center; max-width: 860px; margin: 0 auto; }
.statement > img { width: 84px; height: 84px; margin: 0 auto 20px; }
.statement .big { font-family: "Merriweather", Georgia, serif; font-size: clamp(1.2rem, 2.4vw, 1.55rem); line-height: 1.6; color: var(--navy); }
.section--navy .statement .big { color: var(--white); }

/* ---------- Highlight panels, used where a photo was removed ---------- */
.highlight {
  border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); box-shadow: var(--shadow-lg);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(106, 175, 213, .35), transparent 65%),
    linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #e8f1f8; position: relative; overflow: hidden; isolation: isolate;
}
.highlight::after {
  content: ""; position: absolute; z-index: -1; right: -30px; bottom: -40px; width: 220px; aspect-ratio: 1; opacity: .1;
  background: url("/images/symbol-white.webp") center / contain no-repeat;
}
.stat { font-family: "Merriweather", Georgia, serif; font-size: clamp(4rem, 10vw, 6.5rem); line-height: 1; color: var(--white); font-weight: 700; }
.stat small { font-size: .3em; color: #a9d2ea; display: block; margin-top: 14px; font-family: "Lato", sans-serif; letter-spacing: .12em; text-transform: uppercase; line-height: 1.4; }
.journey { display: grid; gap: 12px; }
.journey .step { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 16px 20px; font-weight: 700; color: var(--white); font-size: 1.15rem; }
.journey .step small { display: block; font-weight: 700; color: #a9d2ea; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.journey .arrow { text-align: center; color: var(--blue); font-size: 1.6rem; line-height: 1; }
.journey .step--end { background: var(--blue); color: var(--navy); border-color: var(--blue); }
.journey .step--end small { color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: var(--white); text-decoration: none;
  font: 700 1rem/1 "Lato", sans-serif; padding: 15px 26px; border-radius: 999px; border: 2px solid var(--navy); cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(2, 25, 53, .18); }
.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .6); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.quote {
  margin: 0; background: var(--white); color: var(--text); border-radius: var(--radius); padding: 32px 28px 28px;
  box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column;
}
.quote::before { content: "\201C"; font-family: "Merriweather", Georgia, serif; font-size: 4.2rem; line-height: .7; color: var(--blue); display: block; margin-bottom: 8px; }
.quote p { font-size: 1.04rem; flex: 1; }
.quote footer { font-weight: 700; color: var(--navy); padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }

/* ---------- Pricing ---------- */
.prices { max-width: 820px; margin: 0 auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.prices__head, .prices__row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px 28px; align-items: center; }
.prices__head { background: var(--navy); color: var(--white); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; }
.prices__row + .prices__row { border-top: 1px solid var(--line); }
.prices__row:nth-child(even) { background: #fafcfe; }
.prices__price { font-family: "Merriweather", Georgia, serif; font-weight: 700; color: var(--navy); font-size: 1.15rem; text-align: right; }
.prices__price--text { font-family: "Lato", sans-serif; font-size: 1rem; }
@media (max-width: 520px) {
  .prices__head, .prices__row { padding: 16px 18px; }
  .prices__row { grid-template-columns: 1fr; gap: 2px; }
  .prices__price { text-align: left; }
}

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.form-card { background: var(--white); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.form label { display: block; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.form .field { margin-bottom: 18px; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--text); padding: 13px 14px; border: 1.5px solid #c3ccd8; border-radius: 10px; background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue-deep); box-shadow: 0 0 0 4px rgba(106, 175, 213, .3); }
.form textarea { min-height: 160px; resize: vertical; }
.form .btn { width: 100%; }
.hidden { position: absolute; left: -9999px; }
.contact-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.contact-points li { display: flex; gap: 12px; align-items: flex-start; }
.contact-points svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--blue-deep); margin-top: 3px; }

/* ---------- Long text ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--blue-deep); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d6e3; padding: 56px 0 32px; font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 24px; }
.footer-brand img { width: 64px; height: 64px; margin-bottom: 14px; }
.footer-brand p { max-width: 42ch; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.legal { margin: 0; font-size: .88rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Home page opening: heading word by word from the right, then the smaller text fades in ---------- */
.hero--animate h1 .w {
  display: inline-block; opacity: 0; transform: translate3d(36px, 0, 0);
  animation: word-in 1.6s cubic-bezier(.25, .46, .25, 1) forwards;
  animation-delay: calc(var(--i) * .5s + .3s);
  will-change: transform, opacity;
}
.hero--animate .fade {
  opacity: 0; filter: blur(3px); transform: translate3d(0, 6px, 0);
  animation: fade-up 1.8s cubic-bezier(.33, 0, .2, 1) forwards;
  animation-delay: var(--d);
  will-change: transform, opacity, filter;
}
@keyframes word-in { to { opacity: 1; transform: none; } }
@keyframes fade-up { to { opacity: 1; filter: none; transform: none; } }

/* ---------- Gentle reveal on scroll: only when JS runs, never with reduced motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .media img, .nav { transition: none; }
  .hero--animate h1 .w, .hero--animate .fade { animation: none; opacity: 1; transform: none; filter: none; }
}
