/* ──────────────────────────────────────────────────────────────
 * Canter.Health — marketing site
 *
 * Tokens are copied verbatim from the app's own v2 design system,
 * src/design/v2/src/tokens/ in the Canter-Health/Canter repo. That is the
 * authoritative source: the site and the product share one vocabulary,
 * so a value lifted from either resolves in the other.
 *
 * The brand hue is rose --brand-600 #C22551, sampled from the ECG trace
 * in the app icon. v2 deprecates the earlier oxblood #7A2E2E (kept there
 * only as --ox-* aliases), and the interim brick #B3342F this site used
 * before the logo was updated is gone with it.
 *
 * Contrast, verified against these exact pairings:
 *   white on --brand-600 (button fill) 5.71:1
 *   --brand-600 on --n-50 (link, figure) 5.31:1
 *   --brand-700 on --n-50 7.07:1
 *   --n-500 muted text on --n-50 5.10:1
 *   --brand-200 on --brand-800 (inverse band) 6.5:1
 *   status chips (600 on its own 50 tint) 5.4:1 or better
 * All clear WCAG AA. --brand-300 #EB8290 is 2.58:1 on white and is an
 * accent only — it must never carry text or a button fill.
 * ────────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Public+Sans:ital,wght@0,300..700;1,400&family=Newsreader:ital,opsz,wght@0,6..72,300..600;1,6..72,300..500&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  /* Rose — brand primary */
  --brand-50: #FDEFF2;
  --brand-100: #FBDCE3;
  --brand-200: #F6BCC8;
  --brand-300: #EB8290;
  --brand-400: #DE5C75;
  --brand-500: #D13A62;
  --brand-600: #C22551;
  --brand-700: #A11C43;
  --brand-800: #7A1533;
  --brand-900: #520D22;

  /* Warm neutrals — paper & ink. No cool or blue-grey anywhere. */
  --n-0: #FFFFFF;
  --n-25: #FFFCFA;
  --n-50: #FAF6F3;
  --n-100: #F2ECE7;
  --n-200: #E4DCD5;
  --n-300: #CBC0B6;
  --n-400: #A2958A;
  --n-500: #73675F;
  --n-600: #5C534D;
  --n-700: #423B37;
  --n-800: #2B2622;
  --n-900: #1A1614;

  /* Status. The denied red is deliberately orange-leaning so a primary
     action and a destructive one never read alike against the rose. */
  --green-50: #E8F5EE;
  --green-100: #CDEBDB;
  --green-600: #2F6B4F;
  --amber-50: #FDF2DF;
  --amber-100: #FAE3B8;
  --amber-600: #8A580F;
  --amber-500: #C9821A;
  --blue-50: #EAF3FA;
  --blue-100: #D2E5F4;
  --blue-600: #2C5D82;
  --red-600: #A72B24;
  --red-100: #FAD5D0;
  --red-50: #FDEBE8;

  /* Semantic aliases — the only names markup should use */
  --text-strong: var(--n-900);
  --text-body: var(--n-700);
  --text-muted: var(--n-500);
  --text-faint: var(--n-400);
  --surface-page: var(--n-50);
  --surface-card: var(--n-0);
  --surface-sunken: var(--n-100);
  --border-subtle: var(--n-200);
  --border-heavy: var(--n-300);

  /* Type */
  --font-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --font-ui: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-editorial: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-tag: 6px;
  --r-btn: 10px;
  --r-card: 14px;
  --r-dialog: 20px;
  --r-pill: 999px;

  /* Elevation — brand-tinted, never neutral black. rgba of --brand-900. */
  --sh-1: 0 1px 2px rgba(82, 13, 34, .06);
  --sh-2: 0 2px 6px rgba(82, 13, 34, .07), 0 1px 2px rgba(82, 13, 34, .05);
  --sh-3: 0 8px 20px -6px rgba(82, 13, 34, .14), 0 2px 6px rgba(82, 13, 34, .06);
  --sh-4: 0 20px 44px -12px rgba(82, 13, 34, .22), 0 4px 10px rgba(82, 13, 34, .07);

  /* Motion — short and decelerating. Nothing bounces. */
  --ease-standard: cubic-bezier(.2, .8, .25, 1);
  --dur-hover: 140ms;
  --dur-toggle: 200ms;

  /* Layout */
  --gutter: 32px;
  --page-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--surface-page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* A column, so a short page (thanks, 404) still puts the footer at the
   bottom of the window instead of halfway up it. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img, svg { max-width: 100%; }

a { color: var(--brand-700); text-decoration-color: var(--brand-300); text-underline-offset: 2px; }
a:hover { color: var(--brand-800); }

/* Focus: brand ring everywhere a keyboard lands. Outline (not box-shadow)
   so it traces the element's own radius and never replaces its shadow. */
:focus-visible {
  outline: 3px solid rgba(194, 37, 81, .24);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Anchored sections land below the sticky header, not under it. */
[id] { scroll-margin-top: 88px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--n-0);
  color: var(--brand-700);
  padding: 10px 16px;
  border-radius: var(--r-btn);
  box-shadow: var(--sh-3);
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ── Layout ───────────────────────────────────────────────── */

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--sunken { background: var(--surface-sunken); }
.section__title { margin: 18px 0 40px; max-width: 32ch; }

/* The one deep band on a page: proof and security on the home page. */
.section--inverse { background: var(--brand-800); color: var(--brand-100); }
.section--inverse h2, .section--inverse h3 { color: var(--n-0); }
.section--inverse .eyebrow { color: var(--brand-200); }

.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
}
.split > * { min-width: 0; }
.split--top { align-items: start; }
/* Alternate sides down a long page: the second child leads on desktop. */
.split--flip > :first-child { order: 2; }

/* ── Header ───────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 250, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark { width: 30px; height: 30px; display: block; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  white-space: nowrap;
}
.brand__word span { color: var(--n-400); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-hover) var(--ease-standard),
              color var(--dur-hover) var(--ease-standard);
}
.nav a:hover { background: var(--n-100); color: var(--text-strong); }
.nav a[aria-current="page"] { color: var(--brand-700); background: var(--brand-50); }
/* Sign in lives in the header actions on desktop and in the nav row on a
   phone; only one of the two is ever displayed. */
.nav__signin { display: none; }

.header__actions { display: flex; align-items: center; gap: 8px; }

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-hover) var(--ease-standard),
              border-color var(--dur-hover) var(--ease-standard),
              color var(--dur-hover) var(--ease-standard),
              transform 90ms var(--ease-standard);
}
.btn:active { transform: scale(.985); }

.btn--primary { background: var(--brand-600); color: #fff; box-shadow: var(--sh-1); }
.btn--primary:hover { background: var(--brand-700); color: #fff; }
.btn--primary:active { background: var(--brand-800); }

.btn--secondary {
  background: var(--n-0);
  color: var(--text-strong);
  border-color: var(--border-heavy);
  box-shadow: var(--sh-1);
}
.btn--secondary:hover { background: var(--n-50); color: var(--text-strong); }

.btn--ghost { background: transparent; color: var(--brand-700); }
.btn--ghost:hover { background: var(--brand-50); color: var(--brand-800); }

.btn--lg { font-size: 16px; padding: 15px 26px; min-height: 52px; }
.btn--block { width: 100%; }

.btn__chev { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Type helpers ─────────────────────────────────────────── */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
  margin: 0;
}

.h-hero {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
}
.h-section {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.h-card { font-size: 20px; line-height: 1.2; letter-spacing: -0.015em; }

.lede {
  font-family: var(--font-editorial);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-body);
  max-width: 46ch;
}

.prose { max-width: 64ch; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }

/* A plain statement of what a part does not do. Muted, never hidden. */
.scope {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-muted);
  max-width: 52ch;
}

/* ── Cards ────────────────────────────────────────────────── */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  box-shadow: var(--sh-2);
  padding: 28px;
}
.card--flat { box-shadow: none; }
.card__title { margin: 18px 0 14px; }

/* A card whose title links somewhere: the link's hit area covers the card. */
.card--link { position: relative; transition: border-color var(--dur-hover) var(--ease-standard), box-shadow var(--dur-hover) var(--ease-standard); }
.card--link:hover { border-color: var(--brand-200); box-shadow: var(--sh-3); }
.card--link h3 { margin: 18px 0 10px; }
.card--link h3 a { color: inherit; text-decoration: none; }
.card--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.card--link:focus-within { outline: 3px solid rgba(194, 37, 81, .24); outline-offset: 2px; }
.card--link h3 a:focus-visible { outline: none; }

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
}
.icon-tile svg { width: 20px; height: 20px; }

/* ── Hero ─────────────────────────────────────────────────── */

.hero { padding: 96px 0 80px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-muted);
}
.assurance { display: inline-flex; align-items: center; gap: 7px; }
.assurance svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--brand-600); }

/* ── Where Canter sits: the EMR / Canter / billing-system stack ── */

.stack { margin: 0; display: grid; gap: 12px; }
.stack__tier {
  border: 1.5px dashed var(--border-heavy);
  border-radius: var(--r-card);
  background: var(--n-25);
  padding: 16px 22px;
}
.stack__tier--canter {
  border: 1px solid var(--brand-200);
  background: var(--surface-card);
  box-shadow: var(--sh-3);
  padding: 22px;
}
.stack__name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}
.stack__name img { width: 24px; height: 24px; }
.stack__what { margin-top: 3px; font-size: 14px; color: var(--text-muted); }
.stack__jobs {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack__jobs li {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-800);
  border: 1px solid var(--brand-100);
}
.stack__caption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 4px; }

/* ── Where it fits ────────────────────────────────────────── */

.fit { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
.fit__col { border-radius: var(--r-card); padding: 28px; }
.fit__col--canter { background: var(--surface-card); border: 1px solid var(--brand-200); box-shadow: var(--sh-2); }
.fit__col--kept { border: 1.5px dashed var(--border-heavy); background: var(--n-25); }
.fit__col h3 { margin-bottom: 18px; }
.fit__note { margin-top: 28px; max-width: 64ch; color: var(--text-muted); font-size: 15px; }

/* A list whose every line carries an icon. */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--green-600); }
.ticks--kept svg { color: var(--n-400); }
.section--inverse .ticks svg { color: var(--brand-200); }

/* ── Roles ────────────────────────────────────────────────── */

.role { padding: 24px; }
.role h3 { font-size: 18px; margin-bottom: 8px; }
.role p { font-size: 15px; }
.section__note { margin-top: 24px; color: var(--text-muted); font-size: 15px; }

/* ── Inverse band (home: built in a practice, data handling) ── */

.band__lede { margin-top: 20px; font-size: 17px; max-width: 46ch; }
.band__h { font-size: 18px; margin-bottom: 18px; }

/* ── Closing call to action ───────────────────────────────── */

.cta { text-align: center; }
.cta h2 { margin: 0 auto; max-width: 22ch; }
.cta p { margin: 20px auto 32px; max-width: 44ch; font-size: 17px; }

/* ── What it does: in-page index ──────────────────────────── */

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.toc a {
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-body);
  text-decoration: none;
  transition: border-color var(--dur-hover) var(--ease-standard), color var(--dur-hover) var(--ease-standard);
}
.toc a:hover { border-color: var(--brand-200); color: var(--brand-700); }

.blocks .h-card { margin: 0 0 8px; }

/* ── Illustration panels ──────────────────────────────────────
   Built from the app's own screen labels with sample rows. Every one sits
   in a figure captioned as an illustration, so none of it can read as a
   screenshot or as real patients. */

.illus { margin: 0; }
.panel { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--r-card); box-shadow: var(--sh-3); overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border-subtle); }
.panel__title { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text-strong); }
.panel__meta { font-size: 14px; }
.panel__group {
  padding: 9px 22px 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--n-25);
  border-bottom: 1px solid var(--n-100);
}
.panel__foot { padding: 13px 22px; border-top: 1px solid var(--border-subtle); background: var(--n-25); font-size: 13px; color: var(--text-muted); }

.row { display: flex; align-items: center; gap: 14px; padding: 15px 22px; min-height: 62px; border-bottom: 1px solid var(--n-100); }
.row:last-child { border-bottom: 0; }
.row__lead { width: 20px; height: 20px; color: var(--text-faint); flex-shrink: 0; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 500; color: var(--text-strong); font-size: 15px; }
.row__sub { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.row__meta { font-family: var(--font-mono); font-weight: 500; font-size: 15px; color: var(--text-strong); text-align: right; }
.row--flag .row__lead { color: var(--amber-600); }

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip--amber { background: var(--amber-50); color: var(--amber-600); border-color: var(--amber-100); }
.chip--green { background: var(--green-50); color: var(--green-600); border-color: var(--green-100); }
.chip--blue { background: var(--blue-50); color: var(--blue-600); border-color: var(--blue-100); }
.chip--neutral { background: var(--n-100); color: var(--text-muted); border-color: var(--border-subtle); }
.chip--rose { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }

.count {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  text-align: center;
  background: var(--brand-50);
  color: var(--brand-700);
}

.sample-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 14px;
  font-style: italic;
}

/* ── Feature checklist (contact page) ─────────────────────── */

.feature { display: flex; gap: 14px; }
.feature svg { width: 20px; height: 20px; color: var(--green-600); flex-shrink: 0; margin-top: 3px; }
.feature__h { font-weight: 600; color: var(--text-strong); line-height: 1.3; }

/* ── Forms ────────────────────────────────────────────────── */

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.field input, .field select, .field textarea {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-strong);
  background: var(--n-0);
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid var(--border-heavy);
  border-radius: var(--r-btn);
  width: 100%;
  transition: border-color var(--dur-hover) var(--ease-standard);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-600); }
.field .hint { font-size: 13px; color: var(--text-muted); }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.notice {
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: var(--r-btn);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--brand-800);
  margin-bottom: 22px;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer { background: var(--n-900); color: var(--n-300); padding: 56px 0 40px; }
.footer a { color: var(--n-300); text-decoration: none; }
.footer a:hover { color: var(--n-0); text-decoration: underline; }
.footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__word { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.03em; color: var(--n-0); }
.footer__word span { color: var(--brand-300); }
.footer__tag { margin-top: 10px; font-size: 14px; max-width: 30ch; }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__cols h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--n-500); margin-bottom: 14px; font-family: var(--font-ui); }
.footer__cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.footer__bottom { border-top: 1px solid var(--n-800); margin-top: 44px; padding-top: 22px; font-size: 13px; color: var(--n-500); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .section { padding: 60px 0; }
  .hero { padding: 56px 0 48px; }
  .split, .fit, .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; gap: 32px; }
  .split--flip > :first-child { order: 0; }
  .section__title { margin-bottom: 32px; }
  .hero__actions .btn { flex: 1 1 220px; }

  /* Phones get the nav as a second header row instead of losing it. */
  .header__inner { flex-wrap: wrap; height: auto; gap: 0 16px; padding-top: 12px; }
  .header nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); }
  .nav { padding: 6px var(--gutter) 8px; gap: 2px; }
  .nav a { padding: 8px 12px; font-size: 14px; }
  .nav__signin { display: list-item; }
  .header__actions .btn--ghost { display: none; }
  [id] { scroll-margin-top: 120px; }

  .field__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
