/* ============ North West Health & Care — design system ============ */
:root {
  --ink: #231a44;
  --ink-2: #524b73;
  --purple: #5b34b1;
  --violet: #3b1f8b;
  --blue: #2e6be6;
  --blue-deep: #1d4fb8;
  --lilac: #f5f2fc;
  --sky: #eaf1fe;
  --line: #e4def2;
  --ok: #157a50;
  --warn: #9c6a08;
  --danger: #c2314a;
  --grad: linear-gradient(115deg, #5b34b1 0%, #2e6be6 100%);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(35, 26, 68, 0.10);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  font-size: 16.5px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.6em; }
h3 { font-size: 1.18rem; }

.mono { font-family: var(--font-mono); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.center-narrow { max-width: 640px; text-align: center; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(91, 52, 177, 0.35); }
.btn-solid:hover { box-shadow: 0 10px 24px rgba(91, 52, 177, 0.45); }
.btn-ghost { background: #fff; color: var(--purple); border-color: var(--purple); }
.btn-ghost:hover { background: var(--lilac); }
.btn-invert { background: #fff; color: var(--violet); }
.btn-outline-invert { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-outline-invert:hover { background: rgba(255, 255, 255, 0.12); }
.btn-tiny { padding: 6px 14px; font-size: 0.82rem; background: var(--lilac); color: var(--violet); border: 1px solid var(--line); border-radius: 8px; }
.btn-tiny:hover { background: var(--sky); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-text em { font-style: normal; font-size: 0.78rem; color: var(--purple); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.brand-invert .brand-text strong { color: #fff; }
.brand-invert .brand-text em { color: #b9a7f0; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.93rem; }
.main-nav a:hover, .main-nav a.active { color: var(--purple); }
.main-nav .nav-cta { color: #fff; padding: 9px 18px; }
.nav-portal { font-family: var(--font-mono); font-size: 0.8rem !important; border: 1px solid var(--line); padding: 7px 13px; border-radius: 8px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(46, 107, 230, 0.35), transparent 60%),
    radial-gradient(700px 420px at -8% 110%, rgba(91, 52, 177, 0.45), transparent 60%),
    var(--ink);
  color: #fff;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 84px;
}
.hero .eyebrow { color: #b9a7f0; }
.hero .lede { color: rgba(255, 255, 255, 0.82); margin: 20px 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; margin-top: 26px; }

.trust-strip { list-style: none; display: flex; gap: 26px; flex-wrap: wrap; margin-top: 38px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.trust-strip li { font-size: 0.88rem; color: rgba(255, 255, 255, 0.75); }
.trust-strip strong { color: #fff; display: block; font-family: var(--font-display); font-size: 1.05rem; }

/* aurora blobs */
.aurora {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
.aurora-a { background: #5b34b1; top: -220px; left: -140px; animation: drift-a 16s ease-in-out infinite alternate; }
.aurora-b { background: #2e6be6; bottom: -260px; right: -120px; animation: drift-b 20s ease-in-out infinite alternate; }
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(90px, 60px) scale(1.15); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-80px, -70px) scale(0.95); } }
.hero-grid { position: relative; z-index: 1; }

/* rotating headline word */
.rotator { display: inline-block; transition: opacity 0.35s ease, transform 0.35s ease; }
.rotator.swap { opacity: 0; transform: translateY(0.35em); }

/* marquee */
.marquee { background: var(--grad); color: #fff; overflow: hidden; padding: 13px 0; }
.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: marquee 36s linear infinite;
  white-space: nowrap;
}
.marquee-track span:nth-child(even) { opacity: 0.5; font-size: 0.6rem; align-self: center; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* framed imagery */
.img-frame { position: relative; margin-bottom: 18px; }
.img-frame img {
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow);
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(91, 52, 177, 0.18), rgba(46, 107, 230, 0.06));
  pointer-events: none;
}
.img-chip {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.94);
  color: var(--violet);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(35, 26, 68, 0.25);
}

/* hero visual: full constellation with a photo card tucked into its corner */
.hero-visual { position: relative; padding-bottom: 110px; }
.hero-visual .constellation { width: 100%; }
.hero-photo {
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 54%;
  margin: 0;
  z-index: 1;
  transform: rotate(1.5deg);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 60px rgba(10, 5, 30, 0.55);
}
.hero-photo .img-chip {
  color: var(--violet);
  left: 12px;
  bottom: 12px;
  font-size: 0.72rem;
  padding: 6px 11px;
}

/* constellation */
.constellation { width: 100%; height: auto; }
.constellation .node circle { fill: #fff; }
.constellation .node text {
  fill: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-anchor: middle;
}
.constellation .node-hub circle { fill: #ffd166; }
.constellation .node-hub text { fill: #ffd166; font-size: 13.5px; }
.constellation .pulse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 2;
  animation: pulse 3s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.constellation .node-hub .pulse { stroke: rgba(255, 209, 102, 0.6); }
.constellation .node:nth-of-type(3) .pulse { animation-delay: 0.6s; }
.constellation .node:nth-of-type(4) .pulse { animation-delay: 1.2s; }
.constellation .node:nth-of-type(5) .pulse { animation-delay: 1.8s; }
.constellation .node:nth-of-type(6) .pulse { animation-delay: 2.4s; }
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-tint { background: var(--lilac); }
.page-head { background: linear-gradient(180deg, var(--lilac), #fff); padding: 72px 0 54px; }
.page-head .lede { margin-top: 16px; }
.page-head .wrap.center-narrow { margin: 0 auto; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 34px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--purple); }
.card-icon { font-size: 1.7rem; }
.card p { color: var(--ink-2); font-size: 0.95rem; flex: 1; }
.card-link { color: var(--purple); font-weight: 700; font-size: 0.9rem; }
.area-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--grad);
  color: #fff;
  padding: 4px 11px;
  border-radius: 999px;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: start; }
.split > div > p { margin-bottom: 16px; color: var(--ink-2); }

.stat-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.stat-num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 0.87rem; color: var(--ink-2); }

.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 30px; }
.quote { background: var(--lilac); border-radius: var(--radius); padding: 28px; border-left: 4px solid var(--purple); }
.quote p { font-size: 1.02rem; margin-bottom: 14px; }
.quote cite { font-style: normal; font-size: 0.85rem; color: var(--ink-2); font-family: var(--font-mono); }

.cta-band { background: var(--grad); color: #fff; padding: 64px 0; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* services */
.service-list { display: flex; flex-direction: column; gap: 34px; }
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 36px;
  background: #fff;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: start;
}
.service:nth-child(even) .service-photo { order: 2; }
.service-photo { margin: 0; position: relative; }
.service-photo img {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  border-radius: 12px;
}
.service-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(91, 52, 177, 0.22), rgba(46, 107, 230, 0.08));
  pointer-events: none;
}
.service-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.service-tag { font-family: var(--font-mono); font-size: 0.8rem; background: var(--grad); color: #fff; border-radius: 8px; padding: 6px 10px; }
.service p { color: var(--ink-2); max-width: 78ch; }
.ticks { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; color: var(--ink-2); }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--purple); font-weight: 800; }
.ticks strong { color: var(--ink); }

.kloe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 10px 0 54px; }
.kloe { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--purple); border-radius: 12px; padding: 22px; }
.kloe:nth-child(even) { border-top-color: var(--blue); }
.kloe p { font-size: 0.9rem; color: var(--ink-2); }
.legal-split { margin-top: 20px; }

.panel { background: var(--lilac); border-radius: var(--radius); padding: 30px; }
.panel h3 { margin: 18px 0 6px; }
.panel h3:first-child { margin-top: 0; }
.panel p { color: var(--ink-2); font-size: 0.95rem; }
.panel-note { margin-top: 16px; font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 14px; }
.note-strip { margin-top: 34px; }
.note-strip p { background: var(--sky); border-radius: 12px; padding: 20px 24px; color: var(--ink-2); }

/* ---------- forms ---------- */
.form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 16px; }
.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 400;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px rgba(91, 52, 177, 0.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.8rem; color: var(--ink-2); margin-top: 12px; }
.form-inline { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.form-inline label { margin-bottom: 0; }
.form-wrap { max-width: 860px; }

.apply-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 26px; background: #fff; }
.apply-form legend { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; padding: 0 10px; display: flex; align-items: center; gap: 10px; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.85rem; font-family: var(--font-mono); }
.field-hint { font-size: 0.84rem; color: var(--ink-2); background: var(--sky); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.subblock { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 6px; }
.subblock h4 { margin-bottom: 12px; color: var(--purple); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-field { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; background: var(--lilac); }
.upload-field span { display: block; margin-bottom: 8px; font-size: 0.86rem; }
.upload-field input[type="file"] { border: 0; padding: 0; background: none; font-size: 0.82rem; }
.check-label { display: flex !important; gap: 12px; align-items: start; font-weight: 400 !important; margin-bottom: 22px !important; }
.check-label input { width: auto !important; margin-top: 5px; }

.alert { border-radius: 12px; padding: 16px 20px; margin-bottom: 22px; font-size: 0.95rem; }
.alert a { font-weight: 700; }
.alert-success { background: #e7f6ee; border: 1px solid #bfe6d0; color: var(--ok); }
.alert-error { background: #fdecef; border: 1px solid #f5c6cf; color: var(--danger); }

.ref-badge { font-size: 1.6rem; background: var(--lilac); border: 1px dashed var(--purple); color: var(--violet); display: inline-block; padding: 10px 26px; border-radius: 12px; margin: 10px 0 22px; letter-spacing: 0.06em; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding: 64px 24px 40px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 0.95rem; }
.site-footer a { display: block; color: rgba(255, 255, 255, 0.78); text-decoration: none; margin-bottom: 8px; font-size: 0.9rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 0.9rem; margin-bottom: 12px; }
.footer-blurb { margin-top: 16px; }
.footer-cqc { font-family: var(--font-mono); font-size: 0.74rem !important; color: rgba(255, 255, 255, 0.5); }
.footer-hours { color: #b9a7f0; }
.footer-legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; padding-bottom: 30px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.footer-legal a { display: inline; color: inherit; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.revealed { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 60px; padding-bottom: 60px; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service { grid-template-columns: 1fr; }
  .service:nth-child(even) .service-photo { order: 0; }
  .hero-visual { padding-bottom: 0; }
  .hero-photo { position: static; width: 100%; margin-top: 24px; transform: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 26px;
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .form-row, .upload-grid, .stat-stack { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .constellation .pulse { animation: none; opacity: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .aurora, .marquee-track { animation: none; }
  .rotator { transition: none; }
}
