/* Rapidigm — Healthcare IT Solutions
   Single lightweight stylesheet (replaces the Canvas theme CSS). */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

:root {
	--navy: #00283c;
	--navy-2: #0b3a52;
	--green: #00843d;
	--green-dark: #006b31;
	--yellow: #fecc00;
	--ink: #1c2b33;
	--muted: #51626b;
	--line: #e3e8ea;
	--tint: #f4f8f6;
	--cream: #f9f5f2;
	--white: #fff;
	--radius: 16px;
	--shadow: 0 10px 30px rgba(0, 40, 60, .08);
	--wrap: 1160px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.2; color: var(--navy); font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }
.center { text-align: center; }
.center.narrow, .narrow.mx { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.125rem; color: var(--muted); }
.eyebrow { display: inline-block; margin-bottom: .9rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-dark); }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: 10px 16px; background: var(--navy); color: #fff; }
.skip:focus { left: 8px; top: 8px; color: #fff; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 48px; padding: .7rem 1.5rem;
	border: 2px solid transparent; border-radius: 999px;
	font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #ffd933; color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.center .btn-row { justify-content: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.logo { display: flex; align-items: center; flex-shrink: 0; margin-right: auto; }
.logo img { height: 52px; width: auto; }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--navy); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }

.nav > ul { display: flex; align-items: center; gap: .15rem; }
.nav a, .sub-toggle { display: flex; align-items: center; gap: .3rem; padding: .6rem .7rem; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .94rem; font-weight: 600; color: var(--navy); text-decoration: none; cursor: pointer; }
.nav a:hover, .sub-toggle:hover, .nav a[aria-current="page"] { color: var(--green-dark); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.has-sub { position: relative; display: flex; align-items: center; }
.has-sub > a { padding-right: .15rem; }
.sub-toggle { padding: .6rem .35rem; }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .15s; }
.sub { position: absolute; top: 100%; left: 0; z-index: 5; width: 340px; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.sub a { padding: .55rem .75rem; font-weight: 500; border-radius: 8px; box-shadow: none !important; }
.sub a:hover { background: var(--tint); }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub.open .sub-toggle svg { transform: rotate(180deg); }
.header-cta { flex-shrink: 0; min-height: 44px; padding: .5rem 1.25rem; }

@media (max-width: 1080px) {
	.nav-toggle { display: inline-flex; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 72px); overflow-y: auto; padding: .5rem 20px 1.25rem; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
	.nav.open { display: block; }
	.nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
	.nav a, .sub-toggle { padding: .85rem .25rem; font-size: 1rem; }
	.nav > ul > li { border-bottom: 1px solid var(--line); }
	.nav a[aria-current="page"] { box-shadow: none; }
	.has-sub { flex-wrap: wrap; }
	.has-sub > a { flex: 1; }
	.sub-toggle { padding: .85rem 1rem; }
	.sub { position: static; display: none; width: 100%; padding: 0 0 .5rem .75rem; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
	.has-sub.open .sub { display: block; }
	.sub a { padding: .6rem .25rem; font-size: .95rem; }
}
@media (max-width: 480px) {
	.header-cta { display: none; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--tint); }
.section-cream { background: var(--cream); }
.section-head { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }

.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::after { content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .06em; height: .34em; z-index: -1; background: var(--yellow); border-radius: 999px; opacity: .85; }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0; background: linear-gradient(160deg, #fff 0%, var(--tint) 60%, #e6f3ec 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero .lead { max-width: 36rem; }
.hero-media { position: relative; }
.hero-media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 28px; background: var(--yellow); opacity: .9; }
.hero-media img { position: relative; width: 100%; border-radius: 28px; box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }

/* Page hero (inner pages) */
.page-hero { position: relative; padding: clamp(3rem, 7vw, 5rem) 0; color: #dbe6ea; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #0f5a4a 100%); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(254, 204, 0, .12); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { max-width: 20ch; color: #fff; }
.page-hero .eyebrow { color: var(--yellow); }
.page-hero .lead { max-width: 46rem; margin-bottom: 0; color: #dbe6ea; }
.crumbs { margin-bottom: 1.25rem; font-size: .875rem; }
.crumbs a { color: #dbe6ea; }
.crumbs a:hover { color: #fff; }
.crumbs span { margin: 0 .4rem; opacity: .6; }

/* Grids & cards */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { display: flex; flex-direction: column; padding: 1.6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card p { margin-bottom: 0; color: var(--muted); font-size: .97rem; }
.card h2, .card h3 { margin-bottom: .5rem; font-size: 1.15rem; letter-spacing: -.01em; }
a.card { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: var(--shadow); }
.card .more { margin-top: auto; padding-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--green-dark); }
.icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem; border-radius: 12px; background: #e6f3ec; color: var(--green-dark); }
.icon svg { width: 24px; height: 24px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split img { width: 100%; border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }

.checks li { position: relative; padding: .45rem 0 .45rem 2rem; font-weight: 500; }
.checks li::before { content: ""; position: absolute; left: 0; top: .7rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }
.checks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 1.25rem; }
.checks-grid li { padding: 1rem 1rem 1rem 3rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.checks-grid li::before { left: 1rem; top: 1.2rem; }

.steps { counter-reset: step; }
.step { position: relative; padding: 1.6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; }
.step::before { content: "0" counter(step); display: block; margin-bottom: .6rem; font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--green); }
.step p { margin: 0; color: var(--muted); font-size: .97rem; }

.pills { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.pills li { padding: .7rem 1.4rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; color: var(--navy); }

.panel { padding: 2rem; border-radius: var(--radius); background: var(--navy); color: #dbe6ea; }
.panel h2, .panel h3 { color: #fff; }
.panel p:last-child { margin-bottom: 0; }
.panel-light { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.panel-light h2, .panel-light h3 { color: var(--navy); }

.linklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.25rem; }
.linklist a { display: block; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; color: var(--navy); text-decoration: none; }
.linklist a:hover { border-color: var(--green); color: var(--green-dark); }

/* CTA band */
.cta { padding: clamp(3rem, 6vw, 4.5rem) 0; text-align: center; color: #dbe6ea; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #0f5a4a 100%); }
.cta h2 { color: #fff; }
.cta p { max-width: 40rem; margin-left: auto; margin-right: auto; }
.cta .btn-row { justify-content: center; }

/* Prose (legal pages) */
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }

/* Form */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list li { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.contact-list svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: .2rem; color: var(--green-dark); }
.form-card { padding: clamp(1.5rem, 4vw, 2.5rem); background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { margin-bottom: .35rem; font-size: .9rem; font-weight: 600; color: var(--navy); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1px solid #b9c4c9; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 132, 61, .2); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field .err { margin-top: .3rem; font-size: .85rem; color: #b3261e; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid var(--yellow); border-radius: 6px; background: #fffaeb; font-size: .9rem; }
.form-status { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 10px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.ok { background: #e6f3ec; color: #064e27; }
.form-status.bad { background: #fdecea; color: #8a1c15; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Footer */
.site-footer { padding: 3.5rem 0 0; background: #fff; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr 1fr; gap: 2rem; }
.footer-grid img { height: 56px; width: auto; margin-bottom: 1rem; }
.site-footer h2 { margin-bottom: 1rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--green-dark); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.5rem; padding: 1.25rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.footer-bottom nav { display: flex; gap: 1.25rem; }

@media (max-width: 960px) {
	.hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
	.hero-media { max-width: 560px; }
	.hero-media::before { inset: 12px -10px -12px 10px; }
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.grid-3 { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
	.grid-2, .grid-3, .grid-4, .checks-grid, .linklist, .form-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.btn-row .btn { width: 100%; }
}

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