/* CrysMed version 2 — shared base + the version 1 header (notice bar, pill header, mega menu, phone sheet) and the
   launch form. Copied from version 1 (site/assets/css/site.css) unchanged, so both versions look the same. If the header
   changes in one version, change it in both. Section styles live in their own files. */
:root {
  --ink: #0b3a39;
  --text: #4c5b5a;
  --teal: #03847f;
  --teal-btn: #036f6b;
  --teal-text: #02706c;
  --deep: #0b3a39;
  --skyblue: #54c1f2;
  --gold: #dcaa3c;
  --r: 22px;
  --m: clamp(16px, 4.6vw, 72px);
  --head: 'Bricolage Grotesque', system-ui, sans-serif;
  --f: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
/* 2026-10-19 (tablet: page slid left/right and scrolling felt stuck): tablet browsers ignore body's overflow-x below
   and widen the page to fit anything that sticks out; on html it holds. Safety net only — the real cause, the
   services slider's arrows, is fixed at the end of eco.css.
   2026-10-19 (later) SWITCHED OFF: with it on, opening the phone menu partway down the page (which sets
   body overflow:hidden) made the sticky header jump off-screen, taking the menu's close button with it. The arrow fix
   alone keeps every width free of sideways scrolling (checked 360-1920). Don't put it back without re-testing that.
html { overflow-x: clip; } */
body { margin: 0; background: #fff; color: var(--text); font: 400 16px/1.6 var(--f); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--teal); color: #fff; }
:focus-visible { outline: 3px solid var(--skyblue); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.soft { color: var(--text); }

/* ---------- buttons ---------- */
.btn { --bg: var(--ink); --fg: #fff; --c: rgba(255,255,255,.18); --cf: currentColor; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 0 9px 0 24px;
  border: 0; border-radius: 999px; background: var(--bg); color: var(--fg); font-weight: 500; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .5s var(--ease), background-color .3s, box-shadow .3s; }
.btn__arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: var(--cf); transition: transform .5s var(--ease); }
.btn__arrow svg { width: 16px; height: 16px; }
.btn:hover .btn__arrow { transform: rotate(-45deg); }
.btn:active { scale: .97; }
.btn--teal { --bg: var(--teal-btn); --c: #fff; --cf: var(--teal-btn); box-shadow: 0 14px 30px -14px rgba(3,111,107,.7); }
.btn--teal:hover { --bg: #025a57; }
.count { display: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #2d2004; font-size: .75rem; font-weight: 600; place-items: center; }
.has-count .count { display: inline-grid; }

/* ---------- notice + header ---------- */
.notice { position: relative; z-index: 30; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 9px var(--m);
  background: var(--deep); color: #e8f2f1; font-size: .875rem; text-align: center; }
.notice a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
.notice__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; scale: .7; } }
.head { position: sticky; top: 12px; z-index: 40; height: 0; }
.pill { position: relative; display: flex; align-items: center; gap: 20px; width: min(100% - 2 * var(--m), 1320px); margin: 12px auto 0; padding: 10px 10px 10px 24px; min-height: 70px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 999px; box-shadow: 0 16px 50px -24px rgba(10,43,42,.4), inset 0 0 0 1px rgba(255,255,255,.9); transition: transform .6s var(--ease); }
.head.is-hidden .pill { transform: translateY(calc(-100% - 36px)); }
.pill__logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav > a, .nav > button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; background: none; border-radius: 999px; font-size: .9375rem; font-weight: 500; color: var(--ink); text-decoration: none; cursor: pointer; transition: background-color .25s; }
.nav > a:hover, .nav > button:hover, .nav > button[aria-expanded="true"] { background: rgba(10,43,42,.06); }
.nav svg { width: 10px; height: 10px; transition: transform .35s var(--ease); }
.nav__mega[aria-expanded="true"] svg { transform: rotate(180deg); }
.pill__cta { flex: none; }
.progress { position: absolute; left: 34px; right: 34px; bottom: 0; height: 2px; border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--skyblue)); transform-origin: left; transform: scaleX(0); }
.burger { display: none; width: 50px; height: 50px; border: 0; border-radius: 50%; background: rgba(10,43,42,.06); cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--ink); border-radius: 2px; transition: transform .4s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.mega { position: absolute; left: 0; right: 0; top: calc(100% + 10px); display: grid; grid-template-columns: repeat(4, 1fr) 1.1fr; gap: 26px; padding: 30px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: var(--r); box-shadow: 0 40px 90px -40px rgba(10,43,42,.5);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.985); transform-origin: top; transition: opacity .3s, transform .5s var(--ease), visibility 0s .5s; }
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .5s var(--ease); }
.mega h3 { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-text); margin-bottom: 14px; }
.mega li a { display: block; padding: 6px 0; font-size: .9375rem; color: var(--ink); text-decoration: none; transition: color .2s, transform .35s var(--ease); }
.mega li a:hover { color: var(--teal-text); transform: translateX(4px); }
.mega__feature { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; border-radius: 20px; background: var(--teal); color: #fff; text-decoration: none; position: relative; overflow: hidden; min-height: 230px; }
.mega__feature img { position: absolute; right: -24px; top: -20px; width: 150px; opacity: .22; transition: transform 1.2s var(--ease); }
.mega__feature:hover img { transform: rotate(-12deg) scale(1.08); }
.mega__feature b { font-family: var(--head); font-size: 1.4rem; font-weight: 500; line-height: 1.15; position: relative; }
.mega__feature span { font-size: .9375rem; opacity: .9; position: relative; }
.sheet { position: fixed; inset: 0; z-index: 39; background: rgba(255,255,255,.97); padding: 110px var(--m) 32px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.sheet.is-open { opacity: 1; visibility: visible; transition: opacity .35s; }
.sheet > a:not(.btn) { display: block; padding: 12px 0; font-family: var(--head); font-size: 1.9rem; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.sheet summary { font-family: var(--head); font-size: 1.9rem; font-weight: 500; color: var(--ink); letter-spacing: -.02em; padding: 12px 0; cursor: pointer; list-style: none; }
.sheet summary::-webkit-details-marker { display: none; }
.sheet details ul { padding: 4px 0 10px; columns: 2; gap: 16px; }
.sheet details a { display: block; padding: 7px 0; color: var(--text); text-decoration: none; font-size: .95rem; }
.sheet .btn { margin-top: 24px; }
@media (min-width: 1101px) { .sheet { display: none; } }
@media (max-width: 1100px) {
  .nav, .mega { display: none; } .burger { display: block; } .pill { gap: 10px; min-height: 64px; padding-left: 18px; } .pill__cta { margin-left: auto; }
}
@media (max-width: 560px) {
  .pill__logo img { height: 27px; }
  .pill__cta .btn { padding: 0 16px; min-height: 46px; font-size: .9375rem; }
  .pill__cta .btn__arrow { display: none; }
  .pill__cta .btn > span:first-child { font-size: 0; } .pill__cta .btn > span:first-child::after { content: 'Join'; font-size: .9375rem; }
  .burger { width: 46px; height: 46px; }
}

/* ---------- launch form dialog (opened by the header buttons) ---------- */
.dialog { width: min(680px, 100% - 24px); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: var(--r); background: #fff; color: var(--ink); box-shadow: 0 50px 120px -30px rgba(0,0,0,.5);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; } /* scrolls inside on phones/tablets */
.dialog::backdrop { background: rgba(9,40,39,.45); backdrop-filter: blur(6px); }
.dialog[open] { animation: dlg .6s var(--ease); }
@keyframes dlg { from { opacity: 0; translate: 0 26px; scale: .98; } }
.dialog__in { padding: clamp(22px, 4vw, 42px); }
.dialog__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(10,43,42,.06); cursor: pointer; font-size: 1.4rem; }
.dialog h2 { font-family: var(--head); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 500; letter-spacing: -.02em; margin: 4px 48px 8px 0; }
.dialog .lede { color: var(--text); font-size: 1rem; margin-bottom: 20px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(10,43,42,.06); margin-bottom: 20px; }
.seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-size: .875rem; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-size: .875rem; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid #d6e2e1; border-radius: 14px; background: #fff; font-size: 1rem; font-weight: 400; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(3,132,127,.14); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 180px; overflow: auto; }
.chip { position: relative; } .chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 8px 13px; border-radius: 999px; background: rgba(10,43,42,.06); font-size: .8125rem; font-weight: 400; cursor: pointer; }
.chip input:checked + span { background: var(--gold); color: #2d2004; }
.chip input:focus-visible + span { outline: 3px solid var(--skyblue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; font-weight: 400; color: var(--text); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal-btn); flex: none; }
.form-note { font-size: .8125rem; color: var(--text); }
/* 2026-10-20 (client screenshot): "Organisation name" and "Partner type" showed in "Individual or family" mode —
   .field's display:grid above beat the browser's own [hidden] rule, so header.js's hidden flag did nothing. */
.field[hidden] { display: none; }
/* 2026-10-20: spinner while the launch form sends (header.js adds .is-busy); spinner itself is .cdlg__spin in careers.css */
.join__label { display: inline-flex; align-items: center; gap: 12px; }
.join__busy { display: none; align-items: center; gap: 10px; min-height: 36px; padding-right: 15px; font-weight: 600; }
.join__submit.is-busy { cursor: progress; }
.join__submit.is-busy .join__label { display: none; }
.join__submit.is-busy .join__busy { display: inline-flex; }
/* 2026-10-20 (client screenshot): on phones the two tabs reach under the × button, covering "Healthcare partner".
   Start the popup's content below the button there; wider screens have room beside it. */
@media (max-width: 600px) { #launch .dialog__in { padding-top: 70px; } }
.done { display: none; } .dialog.is-done .form, .dialog.is-done .seg, .dialog.is-done .lede { display: none; } .dialog.is-done .done { display: block; }
.done__mark { width: 60px; height: 60px; margin-bottom: 16px; }
.tray { display: none; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- placeholder shown only while no sections are configured ---------- */
.todo { display: grid; place-items: center; min-height: 160vh; padding: 160px var(--m) 80px; text-align: center; background: linear-gradient(180deg, #f3f8f7, #fff); }
.todo p { max-width: 46ch; font-size: 1.0625rem; }
.todo b { display: block; font-family: var(--head); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); font-weight: 500; color: var(--ink); margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
