/* ============================================================
   Connect 2 Flexicare — public website stylesheet
   Palette and type follow connect2flexicare.co.uk:
   teal + magenta from the logo, yellow calls to action,
   Bricolage Grotesque throughout.
   ============================================================ */
:root {
  --teal: #18A59A;
  --teal-deep: #0F7F76;
  --teal-ink: #0A5D57;
  --teal-wash: #E7F6F4;
  --magenta: #A8298F;
  --magenta-wash: #F8EAF5;
  --yellow: #FFE100;
  --yellow-deep: #F2D400;
  --ink: #1C1C1C;
  --ink-2: #383838;
  --ink-3: #5F6368;
  --line: #E0E0E0;
  --paper: #FFFFFF;
  --mist: #F5F8F8;
  --night: #10233F;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --font: "Bricolage Grotesque", "Segoe UI", Arial, Helvetica, sans-serif;
  --shadow: 0 10px 30px rgba(16, 35, 63, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink-2); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--magenta); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; z-index: 200; }
.skip:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: var(--r-sm); font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn .arr { font-size: 15px; transition: transform .15s; }
.btn:hover .arr { transform: translate(2px, 2px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-deep); color: var(--ink); }
.btn-teal { background: var(--teal-deep); color: #fff; }
.btn-teal:hover { background: var(--teal-ink); color: #fff; }
.btn-outline { border-color: var(--teal-deep); color: var(--teal-ink); background: transparent; }
.btn-outline:hover { background: var(--teal-wash); color: var(--teal-ink); }
.btn-quiet { color: var(--ink); padding-left: 14px; padding-right: 14px; }
.btn-quiet:hover { color: var(--teal-ink); background: var(--teal-wash); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--yellow); color: var(--ink); }

/* ---------- Top bar ---------- */
.topbar { background: var(--teal-deep); color: #fff; font-size: 14.5px; font-weight: 600; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 46px; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; }
.topbar a:hover, .topbar a.on { text-decoration: underline; text-underline-offset: 5px; }
.topbar svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.topbar-contact, .topbar-nav { display: flex; align-items: center; gap: 26px; }

/* ---------- Masthead ---------- */
.masthead { background: #fff; position: sticky; top: 0; z-index: 60; border-bottom: 1px solid transparent; box-shadow: 0 1px 0 var(--line); }
.masthead-in { display: flex; align-items: center; gap: 28px; min-height: 92px; }
.brand { display: block; flex: none; }
.brand img { width: 225px; height: auto; }
.mainnav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mainnav > a, .has-menu > a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--r-sm); color: var(--ink); font-weight: 700; font-size: 17px; text-decoration: none; }
.mainnav > a:hover, .has-menu > a:hover, .mainnav a.on { color: var(--teal-ink); background: var(--teal-wash); }
.chev { width: 11px; height: 8px; }
.has-menu { position: relative; }
.menu { position: absolute; left: 0; top: 100%; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.menu a:hover { background: var(--teal-wash); color: var(--teal-ink); }
.masthead-cta { display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 46px; height: 46px; border: 0; background: var(--teal-wash); border-radius: var(--r-sm); padding: 13px 11px; flex-direction: column; justify-content: space-between; margin-left: auto; }
.burger span { display: block; height: 2.5px; background: var(--teal-ink); border-radius: 2px; }

/* ---------- Drawer ---------- */
.drawer-veil { position: fixed; inset: 0; background: rgba(16, 35, 63, .5); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 90; }
.drawer-veil.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: #fff; z-index: 100; transform: translateX(100%); visibility: hidden; transition: transform .22s ease, visibility .22s; display: flex; flex-direction: column; overflow-y: auto; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head img { width: 168px; }
.drawer-close { width: 42px; height: 42px; border: 0; border-radius: var(--r-sm); background: var(--mist); font-size: 18px; color: var(--ink); }
.drawer-nav { padding: 10px 20px 28px; display: flex; flex-direction: column; }
.drawer-label { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--magenta); margin: 18px 0 6px; }
.drawer-nav > a { padding: 11px 0; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.drawer-nav > a.on { color: var(--teal-ink); }
.drawer-cta { display: grid; gap: 10px; margin-top: 22px; }
.drawer-phone { text-align: center; font-weight: 700; padding: 8px; }

/* ---------- Hero (home) ---------- */
.hero { padding: 22px 0 0; }
.hero-card { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 520px; display: flex; align-items: center; background: linear-gradient(120deg, #DDF3F0 0%, #F6E9F3 100%); }
.hero-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 34%, rgba(255,255,255,0) 62%); }
.hero-copy { position: relative; z-index: 1; padding: 56px clamp(24px, 6vw, 84px); max-width: 640px; }
.hero-copy .over { font-size: 18px; font-weight: 500; color: var(--ink-2); margin-bottom: 14px; }
.hero-copy h1 { font-size: clamp(42px, 6.2vw, 68px); font-weight: 600; letter-spacing: -.03em; }
.hero-copy .sub { font-size: clamp(20px, 2.4vw, 27px); font-weight: 600; color: var(--ink); margin: 14px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Page hero (inner pages) ---------- */
.phero { padding: 22px 0 0; }
.phero-card { border-radius: var(--r-lg); background: var(--teal-deep); color: #fff; padding: clamp(40px, 6vw, 76px) clamp(24px, 6vw, 84px); position: relative; overflow: hidden; }
.phero-card::before, .phero-card::after { content: ""; position: absolute; border-radius: 50%; }
.phero-card::before { width: 420px; height: 420px; right: -120px; top: -160px; background: var(--teal); opacity: .55; }
.phero-card::after { width: 300px; height: 300px; right: 90px; bottom: -190px; background: var(--magenta); opacity: .5; }
.phero-card > * { position: relative; z-index: 1; }
.phero-card .crumb { font-size: 14.5px; font-weight: 600; opacity: .9; margin-bottom: 16px; }
.phero-card .crumb a { color: #fff; }
.phero-card h1 { color: #fff; font-size: clamp(38px, 5.4vw, 60px); font-weight: 600; letter-spacing: -.03em; }
.phero-card p { font-size: clamp(18px, 2vw, 22px); max-width: 620px; margin-top: 14px; font-weight: 500; }

/* ---------- Sections ---------- */
.sec { padding: clamp(56px, 8vw, 100px) 0; }
.sec.tight { padding-top: clamp(36px, 5vw, 60px); }
.sec.mist { background: var(--mist); }
.sec.wash { background: var(--teal-wash); }
.label { display: inline-block; font-size: 13.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); margin-bottom: 12px; }
.h2 { font-size: clamp(30px, 3.8vw, 44px); font-weight: 600; }
.lede { font-size: clamp(18px, 1.9vw, 21px); color: var(--ink-2); max-width: 760px; margin-top: 16px; }
.head-center { text-align: center; max-width: 820px; margin: 0 auto clamp(32px, 4vw, 52px); }
.head-center .lede { margin-left: auto; margin-right: auto; }
.prose p + p { margin-top: 16px; }
.quote-line { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -.015em; border-left: 5px solid var(--yellow); padding-left: 22px; }

/* ---------- Service cards (home, services) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.svc { background: #fff; border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s; }
.svc:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16, 35, 63, .13); color: inherit; }
.svc-img { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--teal-wash), var(--magenta-wash)); overflow: hidden; }
.svc-img img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.svc-body h3 { font-size: 25px; font-weight: 600; }
.svc-body p { font-size: 16px; }
.more { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--teal-ink); display: inline-flex; gap: 8px; align-items: center; }
.svc:hover .more { color: var(--magenta); }

/* ---------- Split (image + copy) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
.split-img { border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(135deg, var(--teal-wash), var(--magenta-wash)); min-height: 280px; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-img.contain { background: none; min-height: 0; }
.split-img.contain img { object-fit: contain; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
.badges img { height: 84px; width: auto; border-radius: 10px; }

/* ---------- "We work with" ---------- */
.partner { background: #fff; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.partner-img { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--magenta-wash), var(--teal-wash)); }
.partner-img img { width: 100%; height: 100%; object-fit: cover; }
.partner-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.partner-body small { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); }
.partner-body h3 { font-size: 24px; font-weight: 600; }
.partner-body p { font-size: 16px; }

/* ---------- Wings ---------- */
.wings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; text-align: center; }
.wing img { width: min(220px, 70%); margin: 0 auto 18px; }
.wing h3 { font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.wing:nth-child(1) h3 { color: var(--teal-ink); }
.wing:nth-child(2) h3 { color: var(--magenta); }
.wing p { font-size: 16.5px; max-width: 320px; margin: 0 auto; }

/* ---------- Feature tiles (service pages) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px 26px 28px; border-top: 5px solid var(--teal); }
.tile:nth-child(even) { border-top-color: var(--magenta); }
.tile h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.tile p { font-size: 16px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { background: #fff; border-radius: var(--r-md); padding: 28px 24px; box-shadow: var(--shadow); counter-increment: step; }
.step::before { content: "0" counter(step); display: block; font-size: 15px; font-weight: 800; color: var(--magenta); letter-spacing: .06em; margin-bottom: 12px; }
.step h3 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.step p { font-size: 15.5px; line-height: 1.6; }

/* ---------- Band / CTA ---------- */
.band { border-radius: var(--r-lg); background: var(--teal-deep); color: #fff; padding: clamp(40px, 6vw, 72px) clamp(24px, 6vw, 72px); display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: var(--magenta); opacity: .45; right: -110px; bottom: -200px; }
.band > * { position: relative; }
.band h2 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); font-weight: 600; max-width: 720px; }
.band p { margin-top: 12px; font-size: 18px; font-weight: 500; }
.band p a { color: #fff; font-weight: 700; }
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 24px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 34px 20px 0; font-weight: 700; font-size: 18.5px; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 500; color: var(--teal-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; }

/* ---------- Lists / resources ---------- */
.linklist { display: grid; gap: 10px; }
.linklist a { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 700; color: var(--ink); text-decoration: none; }
.linklist a:hover { border-color: var(--teal); color: var(--teal-ink); background: var(--teal-wash); }
.linklist a span { color: var(--teal-ink); font-weight: 700; flex: none; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.cols3 h3 { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.job { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--magenta); border-radius: var(--r-md); padding: 26px 28px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.job h3 { font-size: 24px; font-weight: 600; }
.job p { font-size: 16px; margin-top: 4px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.formcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.formcard h2 { font-size: 28px; font-weight: 600; margin-bottom: 6px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid #C9CDD2; border-radius: var(--r-sm); background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(24, 165, 154, .35); border-color: var(--teal-deep); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--ink-3); }
.form-error { display: none; color: #B42318; font-weight: 600; font-size: 15px; }
.thanks { display: none; text-align: center; padding: 30px 6px; }
.thanks h3 { font-size: 26px; margin-bottom: 8px; }
.info { display: grid; gap: 16px; }
.info-item { background: var(--mist); border-radius: var(--r-md); padding: 22px 24px; }
.info-item small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); margin-bottom: 6px; }
.info-item b, .info-item a { font-size: 19px; font-weight: 700; color: var(--ink); }
.info-item a:hover { color: var(--teal-ink); }
.info-item span { display: block; font-size: 15.5px; margin-top: 4px; }

/* ---------- Legal ---------- */
.legal { max-width: 800px; }
.legal h2 { font-size: 24px; font-weight: 600; margin: 38px 0 10px; }
.legal p, .legal li { font-size: 16.5px; }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 22px; margin-top: 10px; display: grid; gap: 6px; }
.legal .updated { color: var(--ink-3); font-size: 15px; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: clamp(60px, 10vw, 120px) 0; }
.lost .num { font-size: clamp(84px, 16vw, 160px); font-weight: 800; line-height: 1; color: var(--teal); letter-spacing: -.05em; }
.lost h1 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 12px; }
.lost p { max-width: 460px; margin: 0 auto 28px; }
.lost .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.foot { background: var(--night); color: #C9D3E1; padding: clamp(48px, 7vw, 76px) 0 26px; font-size: 16px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.foot h2 { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 0; margin-bottom: 16px; }
.foot ul { display: grid; gap: 9px; }
.foot a { color: #C9D3E1; text-decoration: none; }
.foot a:hover { color: var(--yellow); text-decoration: underline; }
.foot-logo { display: inline-block; background: #fff; border-radius: 14px; padding: 10px 16px; }
.foot-logo img { width: 180px; }
.foot-brand p { margin: 18px 0; max-width: 320px; }
.foot-social { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff !important; font-weight: 800; }
.foot-social:hover { background: var(--teal); text-decoration: none !important; }
.foot-contact li span { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8FE0D8; margin-bottom: 2px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .mainnav, .masthead-cta { display: none; }
  .burger { display: flex; }
  .masthead-in { min-height: 76px; }
  .brand img { width: 180px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .topbar-nav { display: none; }
  .topbar-in { justify-content: center; }
  .cards, .wings, .tiles, .tiles.two, .cols3 { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .band { grid-template-columns: 1fr; }
  .hero-card { min-height: 460px; }
  .hero-card::after { background: linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.78) 55%, rgba(255,255,255,.35) 100%); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar-contact { gap: 16px; font-size: 13.5px; }
  .cards, .wings, .tiles, .tiles.two, .cols3, .steps, .form, .foot-grid { grid-template-columns: 1fr; }
  .hero-card, .phero-card, .band { border-radius: 20px; }
  .btn { width: 100%; }
  .hero-actions, .band-actions { width: 100%; }
  .job .btn { width: 100%; }
}

/* ---------- Portal legal pages (app/terms.php, app/privacy.php) ---------- */
.page-hero { background: var(--teal-deep); color: #fff; padding: clamp(40px, 6vw, 72px) 0; }
.page-hero h1 { color: #fff; font-size: clamp(34px, 5vw, 52px); font-weight: 600; }
.page-hero p { margin-top: 10px; font-weight: 500; }
.block { padding: clamp(40px, 6vw, 72px) 0; }
.block p { margin-top: 12px; }
.block ul { list-style: none; }
.title { font-weight: 600; }
