/* =========================================================================
 * Collective Code Widgets — Isolation / Reset / Anti-bleed Layer
 * -------------------------------------------------------------------------
 * Loaded on every page at priority 999 so it always wins the cascade against
 * the active theme (e.g. Hello Elementor) and the page builder.
 *
 * Everything here is scoped to `.ccw` — the universal wrapper class every
 * widget renders on its root element (alongside a per-widget block class).
 * We NEVER style bare h1/p/a/div globally.
 * ===================================================================== */

/* ---- Box model + inheritance reset (scoped) --------------------------- */
.ccw,
.ccw *,
.ccw *::before,
.ccw *::after {
	box-sizing: border-box;
}

/* ---- Stop stray page-wide horizontal overflow ------------------------- *
 * A full-width Elementor section a hair wider than the viewport creates an
 * ugly sideways scrollbar. `clip` removes it WITHOUT breaking position:
 * sticky headers or the fixed off-canvas (unlike overflow: hidden). */
html { overflow-x: clip; }

/* Neutralise inherited theme colours on our wrapper. The actual brand
 * colours are then applied intentionally by each widget's stylesheet. */
.elementor .ccw,
.elementor-page .ccw,
.elementor-widget-container .ccw,
.e-con .ccw,
.e-con-inner .ccw {
	color: var(--ccw-text);
	font-family: var(--ccw-font-body);
	font-size: var(--ccw-fs-body);
	line-height: var(--ccw-lh-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---- Headings ---------------------------------------------------------- */
.ccw h1,
.ccw h2,
.ccw h3,
.ccw h4,
.ccw h5,
.ccw h6 {
	margin: 0;
	padding: 0;
	font-family: var(--ccw-font-display);
	line-height: var(--ccw-lh-tight);
	color: var(--ccw-heading);
}

/* ---- Text + lists ------------------------------------------------------ */
.ccw p {
	margin: 0;
	padding: 0;
	color: var(--ccw-text);
}

.ccw ul,
.ccw ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---- Links: kill theme pink/underline, apply controlled brand colour --- */
.ccw a {
	color: var(--ccw-primary);
	text-decoration: none;
	transition: var(--ccw-transition-fast);
}

.ccw a:hover,
.ccw a:focus {
	color: var(--ccw-primary-hover);
}

/* ---- Media ------------------------------------------------------------- */
.ccw img,
.ccw svg,
.ccw video {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---- Form + button element reset (scoped) ------------------------------ */
.ccw button,
.ccw input,
.ccw select,
.ccw textarea {
	font-family: inherit;
	font-size: 100%;
	margin: 0;
	color: inherit;
}

.ccw button {
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}

/* ---- Accessibility helpers -------------------------------------------- */
.ccw :focus-visible {
	outline: 2px solid var(--ccw-rose);
	outline-offset: 2px;
}

.ccw .ccw-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Shared building blocks ------------------------------------------- */
.ccw .ccw-container {
	width: 100%;
	max-width: var(--ccw-container);
	margin-inline: auto;
	padding-inline: var(--ccw-gutter);
}

.ccw .ccw-eyebrow {
	display: inline-block;
	font-family: var(--ccw-font-body);
	font-size: var(--ccw-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--ccw-tracking-eyebrow);
	text-transform: uppercase;
	color: var(--ccw-rose-deep);
}

/* Thin gold divider used across sections. */
.ccw .ccw-rule-gold {
	width: 64px;
	height: 2px;
	border: 0;
	background: var(--ccw-grad-gold);
	border-radius: var(--ccw-radius-pill);
}
