/* =================================================================
   c-theme.css — Continuum Care landing page design system
   All styles scoped to .c-theme or use unique class names.
   No global resets. No Bootstrap/Tabler class redefinitions.
   Conflicting names remapped:
     .container -> .c-wrap
     .btn       -> .c-btn
     .btn-primary / .btn-secondary -> .c-btn--primary / .c-btn--secondary
     .lead      -> .c-lead
     .section   -> .c-section
   ================================================================= */

/* --- Fonts -------------------------------------------------------
   Roboto is loaded by templates/header.cfm. Playfair Display was this tier's
   heading face; it was dropped in Phase 2 Step 4 and the four rules that used
   it now take --font-sans, so Tier B headings are Roboto like the rest of the
   site. Lora remains below for one rule (.trust-stat) and is still pulled in
   Lora was pulled in by a render-blocking @import for a single rule
   (.trust-stat); both went with Playfair. No serif and no @import remain.
   This whole tier retires under docs/decisions.md D12. --- */

/* c-theme pages are full-bleed (p_fullbleed), the same as the .cst-oc-page
   landing pages: the shared .container-xl is dropped and .c-wrap below supplies
   the column width and gutter. Before 2026-09-16 they sat inside container-xl
   and clawed the spacing back with :has() overrides — see the note on .c-wrap. */

/* Force a vertical scrollbar so the centered container width is identical
   on every page. Without this, short pages (sign in, sometimes catalog
   before AJAX content arrives) have no scrollbar, gain ~17px of viewport
   width, and the centered content visibly shifts right on wide desktops
   compared to longer pages that do have a scrollbar. */
html { overflow-y: scroll; }

/* Kept after the hero gradient was removed. It costs nothing, and it is the
   guard against ANY full-bleed breakout on these pages creating a horizontal
   scrollbar — overflow-x: clip behaves like hidden but does not establish a
   scroll container, so sticky positioning elsewhere still works. */
body { overflow-x: clip; }

/* --- Theme wrapper (all design tokens live here, not :root) ------ */
.c-theme {
	/* palette */
	--c-paper: var(--cst-page-bg);
	--c-paper-deep: var(--cst-band);
	--c-surface: var(--cst-surface);
	--c-ink: var(--cst-ink);
	--c-ink-soft: var(--cst-ink-soft);
	--c-teal: var(--cst-accent);
	--c-teal-deep: var(--cst-ink);
	--c-teal-pale: var(--cst-accent-pale);
	--c-terracotta: var(--cst-terracotta-ink);
	--c-terracotta-pale: var(--cst-terracotta-pale);
	--c-gold: var(--cst-gold);
	--c-green-pale: var(--cst-accent-pale);
	--c-border: var(--cst-border-subtle);

	/* typography */
	--font-sans: "Roboto", "Avenir", system-ui, -apple-system, "Segoe UI", helvetica, arial, sans-serif;
	--fs-h1: 2rem;
	--fs-h2: 1.625rem;
	--fs-h3: 1.25rem;
	--fs-h4: 1.125rem;
	--fs-body: 1rem;
	--fs-small: .875rem;
	--lh-tight: 1.2;
	--lh-normal: 1.5;
	--lh-loose: 1.75;

	/* spacing */
	--space-1: .25rem;
	--space-2: .5rem;
	--space-3: .75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-7: 2.5rem;
	--space-8: 3rem;
	--space-9: 4rem;
	--space-10: 5rem;

	/* radii & shadows */
	--c-radius: 14px;
	--c-radius-lg: 22px;
	--c-shadow: 0 18px 40px rgb(31 41 55 / 8%);
	--c-shadow-lg: 0 28px 80px rgb(14 92 92 / 14%);

	/* layout */
	--gutter: 0.75rem;
	--transition-fast: .15s ease;

	background: var(--c-paper);
	color: var(--c-ink);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-normal);
}

/* Responsive token overrides */
@media (min-width: 48rem) {
	.c-theme {
		--fs-h1: 2.5rem;
		--fs-h2: 2rem;
		--fs-h3: 1.375rem;
		--fs-h4: 1.25rem;
		--gutter: 1.25rem;
	}
}
@media (min-width: 80rem) {
	.c-theme {
		--fs-h1: 3.25rem;
		--fs-h2: 2.25rem;
		--gutter: var(--space-7);
	}
}

/* --- Scoped resets (only inside .c-theme) ------------------------ */
.c-theme h1, .c-theme h2, .c-theme h3, .c-theme h4,
.c-theme p, .c-theme blockquote, .c-theme figure {
	margin: 0;
}
.c-theme ul[role=list],
.c-theme ol[role=list] {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* --- Typography -------------------------------------------------- */
.c-theme h1, .c-theme h2, .c-theme h3, .c-theme h4 {
	color: var(--c-ink);
	font-family: var(--font-sans);
	line-height: var(--lh-tight);
	font-weight: 600;
}
.c-theme h1 { font-size: var(--fs-h1); }
.c-theme h2 { font-size: var(--fs-h2); }
.c-theme h3 { font-size: var(--fs-h3); }
.c-theme h4 { font-size: var(--fs-h4); }
.c-theme p  { color: var(--c-ink-soft); line-height: var(--lh-loose); }
.c-theme a:not(.btn)  { color: inherit; }

/* --- Layout helpers ---------------------------------------------- */
/* One column width across every public page. These are Bootstrap/Tabler's
   .container-xl metrics — 1140px from xl, 1320px from xxl (1400px) — the same
   values .cst-oc-page uses in cst-public.css and the same ones the home page
   gets from container-xl itself.

   It was max-width:80rem (1280px) with c-theme's own --gutter, nested INSIDE
   container-xl. Two containers meant the narrower of the two won at any given
   width, and the pair landed on 1280px past 1400px against the landing pages'
   1320px — close enough to look like a mistake rather than a choice. The pages
   are full-bleed now, so this is the only container and it sets the width
   outright.

   --gutter (declared at :88/:105/:112 inside .c-theme) is no longer read by
   anything. Left in place rather than pulled out of three media blocks; Tier B
   retires whole under docs/decisions.md D12. */
.c-wrap {
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: var(--tblr-page-padding, 1rem);
}
@media (min-width: 1400px) {
	.c-wrap { max-width: 1320px; }
}
.c-section {
	padding-block: var(--space-8);
}
@media (min-width: 48rem) {
	.c-section { padding-block: var(--space-10); }
}

/* --- Shared component classes ------------------------------------ */
.eyebrow {
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: .75rem;
	font-weight: 700;
	color: var(--c-teal);
	margin-block-end: var(--space-3);
}
.eyebrow-light { color: var(--c-gold) !important; }

.section-head {
	max-width: 48rem;
	margin-block-end: var(--space-7);
}
.section-sub {
	margin-block-start: var(--space-3);
	font-size: 1rem;
	max-width: 40rem;
}

/* The colour is stated here, not left to the element. .c-lead set only size and
   spacing, so the text colour came from whatever the tag inherited: a <p> picked
   up `.c-theme p` (--c-ink-soft) while a <div> fell through to `.c-theme` itself
   (--c-ink). The catalog hero has one of each - the sponsor description is a div
   because that column may hold markup, the purchase-terms line is a p - so the
   two lead paragraphs rendered in two different colours. Two classes, so this
   also wins over `.c-theme p` (0,2,0 beats 0,1,1); it sets the same value there,
   leaving every existing <p class="c-lead"> unchanged. */
.c-theme .c-lead {
	color: var(--c-ink-soft);
}

.c-lead {
	margin-block-start: var(--space-4);
	font-size: 1.0625rem;
	max-width: 36rem;
}

.cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	margin-block-start: var(--space-5);
}

/* Buttons use the site's existing Bootstrap/Tabler .btn styles */

/* =================================================================
   SECTIONS
   ================================================================= */

/* --- Hero -------------------------------------------------------- */
/* Tightened 2026-09-16, from a flat 4rem/3rem (64px/48px) at every width to a
   symmetric 2rem (32px).

   These heroes carry one eyebrow, one h1 and one lead paragraph - on /login/
   and /registration/ the thing the visitor came for is the form BELOW the hero,
   and 7rem of vertical padding pushed it under the fold on a phone for no
   editorial gain.

   Deliberately ONE value, with no width breakpoint: 32px reads correctly on a
   360px screen and on a 1440px one, and equal top and bottom means the band
   sits square around its copy instead of looking bottom-heavy. If this ever
   needs to scale with width again, change it here - the seven pages that used
   to override it no longer do.

   The home page hero (.cst-hero in cst-public.css) is a separate system built
   from the comps and is intentionally NOT aligned to this.

   NO BAND. This hero used to paint a full-bleed green gradient plus a bottom
   rule through a ::before, matching the home page's .cst-hero-band. That was
   removed 2026-09-16: the .cst-oc-page landing pages set the house style for a
   public hero and they sit on plain page background, so a tinted band here made
   the info pages read as a different tier of the site. The page background now
   runs unbroken from the navbar's bottom rule through the hero and into the
   first section.

   position: relative stays. It is not left over from the ::before — .hero-copy
   h1 em::after and other hero decorations position against it. `isolation`
   went with the pseudo-element; there is no longer a negative z-index to
   contain. */
.hero {
	padding-block: var(--space-6);
	position: relative;
}
.hero-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-7);
	align-items: start;
}
.hero-copy h1 {
	font-size: clamp(2.25rem, 6vw, 3.5rem);
	letter-spacing: -.01em;
}
.hero-copy h1 em {
	font-style: italic;
	color: var(--c-teal);
	position: relative;
	white-space: nowrap;
}
.hero-copy h1 em::after {
	content: "";
	position: absolute;
	inset-block-end: .06em;
	inset-inline-start: 0;
	inline-size: 100%;
	block-size: .18em;
	background: var(--c-terracotta);
	opacity: .35;
	z-index: -1;
}
.hero-aside {
	padding-block-start: var(--space-2);
}
.hero-pull {
	font-family: var(--font-sans);
	font-style: italic;
	font-size: 1.375rem;
	color: var(--c-ink);
	line-height: var(--lh-normal);
	margin-block-end: var(--space-5);
}

/* Who-cards (hero sidebar) */
.who-cards {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}
.who-card {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-inline-start: 4px solid var(--c-teal);
	border-radius: var(--c-radius);
	padding: var(--space-4) var(--space-5);
	box-shadow: var(--c-shadow);
}
.who-label {
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: .6875rem;
	font-weight: 800;
	color: var(--c-teal);
	margin-block-end: 4px;
}
.who-copy {
	font-size: .875rem;
	color: var(--c-ink-soft);
}

/* Sections whose background color differs from the body (#faf6ee) need a
   full-bleed pseudo-element so the color extends past container-xl to the
   viewport edges. Sections with .c-paper backgrounds (.audience, .steps,
   .final-cta) already appear full-bleed because the body is the same
   color. */
.trust, .problem, .benefits {
	position: relative;
	isolation: isolate;
}
.trust::before, .problem::before, .benefits::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - 50vw);
	right: calc(50% - 50vw);
	z-index: -1;
	pointer-events: none;
}
.trust::before    { background: var(--c-teal); }
.problem::before  { background: var(--c-teal-deep); }
.benefits::before { background: var(--c-paper-deep); }

/* --- Trust strip ------------------------------------------------- */
.trust {
	background: var(--c-teal);
	color: var(--cst-surface);
	padding-block: var(--space-7);
}
.trust-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-5);
	text-align: center;
}
.trust-stat {
	font-family: var(--font-sans);
	font-size: 2.75rem;
	font-weight: 700;
	color: var(--cst-badge);
	line-height: 1;
}
.trust-label {
	color: rgb(255 255 255 / 92%);
	font-size: .875rem;
	margin-block-start: var(--space-2);
	line-height: var(--lh-normal);
}
.trust p {
	color: var(--cst-surface);
}

/* --- Audience ---------------------------------------------------- */
.audience {
	background: var(--c-paper);
}
.aud-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-5);
}
.aud-card {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	padding: var(--space-7);
	box-shadow: var(--c-shadow);
	display: flex;
	flex-direction: column;
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.aud-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--c-shadow-lg);
}
.aud-label {
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .6875rem;
	font-weight: 800;
	color: var(--c-terracotta);
	margin-block-end: var(--space-2);
}
.aud-card h3 {
	font-size: 1.375rem;
	margin-block-end: var(--space-3);
}
.aud-copy {
	color: var(--c-ink-soft);
	font-size: .9375rem;
	margin-block-end: var(--space-5);
	flex: 1;
}
.aud-cta {
	align-self: flex-start;
	color: var(--c-teal);
	font-weight: 700;
	text-decoration: none;
	font-size: .9375rem;
}
.aud-cta:hover {
	color: var(--c-teal-deep);
	text-decoration: underline;
}

/* --- Problem / Focus --------------------------------------------- */
.problem {
	background: var(--c-teal-deep);
	padding-block: var(--space-9);
}
.problem-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
}
.c-theme .problem h2 {
	color: var(--cst-surface);
	font-size: clamp(1.625rem, 3.5vw, 2.125rem);
}
.problem p {
	color: var(--cst-surface-muted);
}
.problem-sub {
	color: var(--cst-surface);
	margin-block-start: var(--space-3);
	font-size: 1rem;
}
.insight {
	margin-block-start: var(--space-5);
	border-inline-start: 4px solid var(--c-gold);
	padding: var(--space-4) var(--space-5);
	border-radius: 0 var(--c-radius) var(--c-radius) 0;
	background: rgb(255 255 255 / 6%);
	font-family: var(--font-sans);
	font-style: italic;
	color: rgb(255 255 255 / 85%);
	line-height: var(--lh-normal);
}
.focus-cards {
	margin-block-start: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}
.focus-cards li {
	border-block-end: 1px solid rgb(255 255 255 / 12%);
	padding-block-end: var(--space-3);
}
.focus-cards li:last-child {
	border-block-end: 0;
}
.focus-label {
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: .6875rem;
	font-weight: 800;
	color: var(--cst-badge);
	margin-block-end: 4px;
}
.focus-copy {
	color: rgb(255 255 255 / 85%);
	font-size: .9375rem;
}

/* --- Benefits ---------------------------------------------------- */
.benefits {
	background: var(--c-paper-deep);
}
.benefit-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
}
.benefit {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	padding: var(--space-6);
	box-shadow: var(--c-shadow);
}
.benefit-tag {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .6875rem;
	font-weight: 700;
	background: var(--c-green-pale);
	color: var(--cst-accent);
	padding: 4px 10px;
	border-radius: 6px;
	margin-block-end: var(--space-4);
}
.benefit h4 {
	font-size: 1.125rem;
	margin-block-end: var(--space-2);
}
.benefit p {
	font-size: .9375rem;
}

/* --- Steps ------------------------------------------------------- */
.steps {
	background: var(--c-paper);
}
.step-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-5);
}
.step-card {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	padding: var(--space-6);
}
.step-num {
	font-family: var(--font-sans);
	color: var(--c-terracotta);
	font-weight: 700;
	font-size: 1.5rem;
	margin-block-end: var(--space-2);
}
.step-card h3 {
	font-size: 1.25rem;
	margin-block-end: var(--space-2);
}
.step-card p {
	font-size: .9375rem;
}

/* --- Final CTA --------------------------------------------------- */
.final-cta {
	background: var(--c-paper);
	padding-block: var(--space-9);
}
.final-card {
	background: var(--c-teal);
	color: var(--cst-surface);
	padding: var(--space-9);
	border-radius: var(--c-radius-lg);
	text-align: center;
	box-shadow: var(--c-shadow-lg);
}
.final-card .eyebrow {
	color: var(--cst-surface);
}
.final-card h2 {
	color: var(--cst-surface);
	font-size: clamp(1.875rem, 4.5vw, 2.75rem);
	margin-block-end: var(--space-3);
}
.final-card p {
	color: rgb(255 255 255 / 85%);
	max-width: 36rem;
	margin-inline: auto;
}
.final-card .cta-row {
	justify-content: center;
	margin-block-start: var(--space-5);
}

/* =================================================================
   RESPONSIVE LAYOUTS
   ================================================================= */
@media (min-width: 48rem) {
	.trust-row     { grid-template-columns: repeat(3, 1fr); }
	.aud-grid      { grid-template-columns: repeat(2, 1fr); }
	.problem-grid  { grid-template-columns: 1fr 1fr; gap: var(--space-9); }
	.benefit-grid  { grid-template-columns: repeat(2, 1fr); }
	.benefit-wide  { grid-column: 1 / -1; }
	.step-grid     { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 64rem) {
	.hero-grid    { grid-template-columns: 1.3fr 1fr; gap: var(--space-9); }
	.benefit-grid { grid-template-columns: repeat(3, 1fr); }
	.benefit-wide { grid-column: 2 / 4; }
}

/* --- Alternate section background -------------------------------------
   A reusable modifier, so a section can take the banded treatment without
   borrowing .benefits, which carries that section's layout along with its
   colour. Same full-bleed mechanism as .trust / .problem / .benefits above:
   the body is --c-paper, so the colour needs a pseudo-element to reach past
   .c-wrap to the viewport edges.

   --c-paper-deep is the quiet alternate (= --cst-band). The teals are left to
   the bands that also invert their text, which a modifier cannot do on its own.

   Declared at the end of the file on purpose: the section classes it modifies
   set their own background at the same specificity (.audience is
   --c-paper), so the modifier has to come after them to win. */
.c-section--alt {
	position: relative;
	isolation: isolate;
	background: var(--c-paper-deep);
}
.c-section--alt::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - 50vw);
	right: calc(50% - 50vw);
	z-index: -1;
	pointer-events: none;
	background: var(--c-paper-deep);
}
