/* ===== Tokens ===== */
:root {
  --bg: #FBFDFC;
  --bg-alt: #EAF4F0;
  --ink: #1F2A2E;
  --ink-soft: #545E61;
  --pine: #1F4E8C;       /* navy, from wordmark */
  --pine-dark: #14355F;
  --gold: #3FA98A;       /* teal, from heart/hand mark */
  --gold-soft: #8FD9C4;
  --rose: #2E8B74;
  --line: #DCE7E3;

  --font-display: 'Fraunces', serif;
  --font-body: 'Public Sans', system-ui, sans-serif;

  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--pine-dark); margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; color: var(--ink-soft); }
em { font-style: italic; color: var(--gold); }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: .8em;
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31,61,58,.25); }
.btn-ghost { background: transparent; color: var(--pine); border: 1.5px solid var(--pine); }
.btn-ghost:hover { background: var(--pine); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .btn, html { transition: none !important; scroll-behavior: auto !important; }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--pine-dark);
  border-bottom: 1px solid var(--pine);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; text-decoration: none; background: #fff; padding: 8px 14px; border-radius: 12px; }
.logo img { display: block; height: 64px; width: auto; }
@media (max-width: 860px) {
  .logo img { height: 50px; }
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: #fff; }
.nav-cta { background: var(--gold); color: var(--pine-dark) !important; padding: 10px 20px; border-radius: 999px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 32px; height: 24px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 860px) {
  .nav { position: fixed; top: 76px; right: 0; bottom: 0; left: 0; height: calc(100vh - 76px); align-self: stretch; background: var(--pine-dark); flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 20px; transform: translateX(100%); transition: transform .25s ease; }
  .nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
}

/* ===== Interior page hero ===== */
.page-hero { padding: 90px 0 60px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero .hero-lede { max-width: 640px; }
.legal-content { padding: 0 0 90px; }
.legal-content h2 { margin-top: 2em; font-size: 1.4rem; }
.legal-content ul { color: var(--ink-soft); }
.legal-content li { margin-bottom: .4em; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 110px 0 90px; }
.hero-shape {
  position: absolute; top: -120px; right: -160px; width: 560px; height: 560px;
  background: radial-gradient(circle at 30% 30%, var(--gold-soft), transparent 70%),
              radial-gradient(circle at 70% 70%, var(--rose), transparent 60%);
  opacity: .35; border-radius: 50%; filter: blur(10px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-copy { max-width: 620px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.hero-lede { font-size: 1.15rem; max-width: 560px; }
.hero-seo { font-size: .95rem; color: var(--ink-soft); max-width: 560px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 36px; }
.hero-trust { list-style: none; display: flex; gap: 28px; flex-wrap: wrap; padding: 0; margin: 0; font-size: .9rem; font-weight: 600; color: var(--pine); }
.hero-trust li::before { content: "✓ "; color: var(--gold); }

.hero-media { position: relative; }
.hero-media img {
  width: 100%; height: 460px; object-fit: cover; border-radius: 24px;
  box-shadow: 0 24px 48px rgba(20,53,95,.18);
}
.hero-media-badge {
  position: absolute; left: -18px; bottom: -18px;
  background: #fff; border-radius: 16px; padding: 14px 18px;
  box-shadow: 0 12px 28px rgba(20,53,95,.15);
  display: flex; align-items: center; gap: 10px;
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media img { height: 320px; }
  .hero-media-badge { left: 12px; bottom: -14px; }
}

/* ===== CQC badge ===== */
.cqc-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid var(--pine); border-radius: 14px;
  padding: 10px 16px;
}
.cqc-badge-mark {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  background: var(--pine); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .02em;
}
.cqc-badge-text { line-height: 1.25; }
.cqc-badge-text strong { display: block; font-size: .82rem; color: var(--pine-dark); }
.cqc-badge-text span { display: block; font-size: .74rem; color: var(--ink-soft); }
.safeguard .cqc-badge { border-color: var(--gold-soft); background: rgba(255,255,255,.06); }
.safeguard .cqc-badge-text strong { color: #fff; }
.safeguard .cqc-badge-text span { color: rgba(255,255,255,.75); }

/* ===== Inline section image (services page) ===== */
.section-media { margin: 40px 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 32px rgba(31,61,58,.1); }
.section-media img { width: 100%; height: 340px; object-fit: cover; display: block; }
.section-media figcaption { padding: 14px 20px; background: #fff; font-size: .85rem; color: var(--ink-soft); }

/* ===== Team ===== */
.team { padding: 20px 0 30px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-top: 32px; max-width: 480px; }
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.team-avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--pine), var(--rose));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 600;
}
.team-card h3 { margin-bottom: 2px; font-size: 1.1rem; }
.team-role { color: var(--rose); font-weight: 600; font-size: .85rem; margin-bottom: 10px; }
.team-card p.bio { font-size: .92rem; margin: 0; }

/* ===== Services ===== */
.services { padding: 90px 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(31,61,58,.08); }
.card-photo { width: 100%; height: 180px; object-fit: cover; display: block; }
.card-body { padding: 24px 28px 32px; }
.card-icon { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 18px; background: var(--bg-alt); position: relative; }
.card-icon::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--gold); }
.card-icon[data-icon="palliative"]::after { background: var(--rose); }
.card-icon[data-icon="companion"]::after { background: var(--pine); }

@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

/* ===== Day timeline (signature element) ===== */
.day { padding: 90px 0; background: var(--bg-alt); }
.section-lede { max-width: 560px; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.timeline-track {
  position: absolute; top: -18px; left: 6%; right: 6%; height: 2px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold), var(--rose));
}
.timeline-stop { position: relative; padding-top: 12px; }
.timeline-dot {
  position: absolute; top: -30px; left: 0; width: 16px; height: 16px; border-radius: 50%;
  box-shadow: 0 0 0 6px var(--bg-alt);
}
.dot-morning { background: var(--gold-soft); }
.dot-midday { background: var(--gold); }
.dot-evening { background: var(--rose); }
.timeline-time { display: block; font-weight: 700; color: var(--pine); margin-bottom: 4px; font-size: .9rem; }

@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 40px; }
  .timeline-track { display: none; }
}

/* ===== Trust ===== */
.trust { padding: 90px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.trust-item h3 { font-size: 1.1rem; color: var(--rose); }
@media (max-width: 1024px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .trust-grid { grid-template-columns: 1fr; } }

/* ===== Safeguarding & CQC ===== */
.safeguard { padding: 90px 0; background: var(--pine-dark); color: #fff; }
.safeguard .eyebrow { color: var(--gold-soft); }
.safeguard h2 { color: #fff; }
.safeguard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 32px; }
.safeguard-item { padding: 26px 28px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.04); border-radius: 0 12px 12px 0; }
.safeguard-item h3 { color: var(--gold-soft); font-size: 1.05rem; }
.safeguard-item p { color: rgba(255,255,255,.85); margin: 0; }
.safeguard-item a { color: var(--gold-soft); font-weight: 600; }
@media (max-width: 860px) { .safeguard-grid { grid-template-columns: 1fr; } }

/* ===== Careers ===== */
.careers { padding: 70px 0; }
.careers-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--bg-alt); border-radius: var(--radius); padding: 48px; }
.careers-inner h2 { margin-bottom: .3em; }
@media (max-width: 860px) { .careers-inner { flex-direction: column; align-items: flex-start; } }

/* ===== Contact ===== */
.contact { padding: 90px 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-details { list-style: none; padding: 0; margin-top: 24px; }
.contact-details li { margin-bottom: 8px; }
.contact-form { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.contact-form label { font-weight: 600; font-size: .9rem; margin-top: 10px; }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.contact-form select {
  font-family: var(--font-body); font-size: 1rem; padding: 14px 44px 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; background-color: var(--bg);
  width: 100%; max-width: 100%; appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1L7 7L13 1' stroke='%231F4E8C' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form select:hover { border-color: var(--gold); }
.contact-form select:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(31,78,140,0.12); }
.contact-form button { margin-top: 20px; border: none; cursor: pointer; }
.hidden-field { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--ink-soft); }
.footer-links a { text-decoration: none; margin: 0 4px; }
